Main Page   Class Hierarchy   Compound List   File List   Compound Members  

Factory< T, Arg > Class Template Reference

Implements a template for the "Factory" pattern. More...

#include <Factory.h>

List of all members.

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

FactoryMapinstance ()
 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).


Detailed Description

template<class T, class Arg>
class Factory< T, Arg >

Implements a template for the "Factory" pattern.


The documentation for this class was generated from the following file:
Generated on Thu Apr 8 15:04:11 2004 for SOMCode by doxygen1.2.18