As far as I understand this is not meant to deal with the problem that drkbkr has,rather, its to be used when you have an abstract classes, and it is unknown which classes should be initialized by the implementations of these abstract classes, as it says in the link you gave:Yes, in C++ this is possible. Probably a factory method design pattern:But that is only how I understood it, I could be wrong."Obviously, a factory is not needed to make an object. A simple call to new will do it for you. However, the use of factories gives the programmer the opportunity to abstract the specific attributes of an Object into specific subclasses which create them."
Bookmarks