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 Member Functions

 Factory (const string &name)
 Normal Constructor.

Static Public Member Functions

static FactoryMapinstance ()
 Returns the single instance of the factory dictionay.
static T * make (string name, const Arg &arg)
 Virtual constructor using name.
static T * make (Arg arg)
 Virtual constructor using arguments.

Protected Member Functions

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 Tue Aug 7 16:03:33 2007 for SOMCode by  doxygen 1.5.3