| | Abstract factory pattern - Wikipedia, the free encyclopedia |
 | | The factory determines the actual concrete type of object to be created, and it is here that the object is actually created (in C++, for instance, by the new operator). |
 | | As the factory only returns an abstract pointer, the client code (which requested the object from the factory) does not know - and is not burdened by - the actual concrete type of the object which was just created. |
 | | If all factory objects are stored globally in a singleton object, and all client code goes through the singleton to access the proper factory for object creation, then changing factories is as easy as changing the singleton object. |
| en.wikipedia.org /wiki/Abstract_factory_pattern (778 words) |