Simulating interfaces when unsupported by a language
Is there a way to form pseudo interfaces when these aren't di开发者_开发知识库rectly supported by an OOP language?
Does it have virtual functions? An interface is nothing more than a base class with nothing but virtual functions, either without any body, or with a stub that throws an error if the base class version is used.
精彩评论