#include <Factory.h>
Public Types | |
typedef map< string, Factory< T, Arg > * > | FactoryMap |
Dictionary of factories (indexed by name). | |
Public Methods | |
Factory (const string &name) | |
Normal Constructor. | |
Static Public Methods | |
FactoryMap & | instance () |
Returns the single instance of the factory dictionay. | |
T * | make (string name, const Arg &arg) |
Virtual constructor using name. | |
T * | make (Arg arg) |
Virtual constructor using arguments. | |
Protected Methods | |
virtual T * | build (const Arg &arg)=0 |
Builds a new type (should be implemented by descendants). |