CLAM::FactoryRegistrator< TheFactoryType, ConcreteProductType > Class Template Reference

#include <Factory.hxx>

List of all members.


Detailed Description

template<typename TheFactoryType, typename ConcreteProductType>
class CLAM::FactoryRegistrator< TheFactoryType, ConcreteProductType >

This class provides a convenient way to add items (creators) into a factory.

To add class A (subclass of Base) to the factory it's useful to declare a static FactoryRegistrator object like this: static FactoryRegistrator<MyTypeFactory, MyConcreteType> reg("key"); The FactoryRegistrator constructor called at load-time is in charge to insert the creator to the factory. Various constructors exists giving the user options like using either the singleton factory or a given one.

Definition at line 522 of file Factory.hxx.


Public Member Functions

 FactoryRegistrator (const char *metadata[])
 FactoryRegistrator (RegistryKey key, TheFactoryType &fact)
 FactoryRegistrator (TheFactoryType &fact)
 FactoryRegistrator (RegistryKey key)
 ~FactoryRegistrator ()

Classes

class  ConcreteCreator

Constructor & Destructor Documentation

template<typename TheFactoryType, typename ConcreteProductType>
CLAM::FactoryRegistrator< TheFactoryType, ConcreteProductType >::FactoryRegistrator ( const char *  metadata[]  )  [inline]

Definition at line 527 of file Factory.hxx.

References CLAM_ASSERT, and RunTimeLibraryLoader::FileOfSymbol().

template<typename TheFactoryType, typename ConcreteProductType>
CLAM::FactoryRegistrator< TheFactoryType, ConcreteProductType >::FactoryRegistrator ( RegistryKey  key,
TheFactoryType &  fact 
) [inline]

Definition at line 551 of file Factory.hxx.

template<typename TheFactoryType, typename ConcreteProductType>
CLAM::FactoryRegistrator< TheFactoryType, ConcreteProductType >::FactoryRegistrator ( TheFactoryType &  fact  )  [inline]

Definition at line 557 of file Factory.hxx.

template<typename TheFactoryType, typename ConcreteProductType>
CLAM::FactoryRegistrator< TheFactoryType, ConcreteProductType >::FactoryRegistrator ( RegistryKey  key  )  [inline]

Definition at line 565 of file Factory.hxx.

template<typename TheFactoryType, typename ConcreteProductType>
CLAM::FactoryRegistrator< TheFactoryType, ConcreteProductType >::~FactoryRegistrator (  )  [inline]

Definition at line 580 of file Factory.hxx.


The documentation for this class was generated from the following file:

Generated on Tue Aug 12 22:33:47 2008 for CLAM by  doxygen 1.5.5