Originally posted by atomsymbol
Code:
class Interface { public: // factory method for constructing an instance. static Interface *create(); virtual ~Interface() {} virtual void f() = 0; };
Code:
class Impl: public Interface { public: void f(); private: // some types from a non-public library dependency can go here }; Interface *Interface::create() { return new Impl(); }
Comment