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

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

#include <Factory.hxx>

List of all members.

Classes

class  ConcreteCreator

Public Member Functions

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

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 519 of file Factory.hxx.


Constructor & Destructor Documentation

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

Definition at line 524 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 550 of file Factory.hxx.

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

Definition at line 556 of file Factory.hxx.

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

Definition at line 564 of file Factory.hxx.

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

Definition at line 579 of file Factory.hxx.


The documentation for this class was generated from the following file:
Generated by  doxygen 1.6.3