CFEL - ASG Software Suite  2.5.0
CASS
Public Types | Public Member Functions | List of all members
cass::Registrar< Base, Derived > Struct Template Reference

helper struct that will add Derived to the factory map More...

#include <generic_factory.hpp>

+ Inheritance diagram for cass::Registrar< Base, Derived >:

Public Types

typedef Factory< Base > factory_t
 define the factory More...
 
typedef factory_t::reference factory_r
 define a reference to the factory More...
 

Public Member Functions

 Registrar (const typename factory_t::instanciatorMap_t::key_type &type)
 constuctor More...
 
 Registrar (const typename factory_t::instanciatorMap_t::key_type &type, bool)
 constuctor More...
 

Detailed Description

template<class Base, class Derived>
struct cass::Registrar< Base, Derived >

helper struct that will add Derived to the factory map

Note
put a static instance of this struct into the derived class implementation that should be registered. When the static variable is defined this constructor will automatically register the derived class to the instanciator map of the factory.
Template Parameters
Basethe type of the base class
Derivedthe type of the derived class

Definition at line 171 of file generic_factory.hpp.

Member Typedef Documentation

template<class Base, class Derived>
typedef factory_t::reference cass::Registrar< Base, Derived >::factory_r

define a reference to the factory

Definition at line 177 of file generic_factory.hpp.

template<class Base, class Derived>
typedef Factory<Base> cass::Registrar< Base, Derived >::factory_t

define the factory

Definition at line 174 of file generic_factory.hpp.

Constructor & Destructor Documentation

template<class Base, class Derived>
cass::Registrar< Base, Derived >::Registrar ( const typename factory_t::instanciatorMap_t::key_type &  type)
inline

constuctor

register the derived class in the factorys instanciator map.

Parameters
typethe type as a human readable string

Definition at line 185 of file generic_factory.hpp.

template<class Base, class Derived>
cass::Registrar< Base, Derived >::Registrar ( const typename factory_t::instanciatorMap_t::key_type &  type,
bool   
)
inline

constuctor

register the derived singelton class in the factorys instanciator map.

Parameters
typethe type as a human readable string

Definition at line 197 of file generic_factory.hpp.


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