Fabcoin Core  0.16.2
P2P Digital Currency
Classes | Public Member Functions | Static Public Member Functions | Private Types | Private Attributes | List of all members
ObjectFactoryRegistry< AbstractClass, instance > Class Template Reference

Object factory registry. More...

#include <factory.h>

Classes

class  FactoryNotFound
 

Public Member Functions

 ~ObjectFactoryRegistry ()
 
void RegisterFactory (const std::string &name, ObjectFactory< AbstractClass > *factory)
 
const ObjectFactory< AbstractClass > * GetFactory (const char *name) const
 
AbstractClass * CreateObject (const char *name) const
 
std::vector< std::string > GetFactoryNames () const
 

Static Public Member Functions

static CRYPTOPP_NOINLINE ObjectFactoryRegistry< AbstractClass, instance > & Registry (CRYPTOPP_NOINLINE_DOTDOTDOT)
 

Private Types

typedef std::map< std::string, void * > Map
 

Private Attributes

Map m_map
 

Detailed Description

template<class AbstractClass, int instance = 0>
class ObjectFactoryRegistry< AbstractClass, instance >

Object factory registry.

Template Parameters
AbstractClassBase class interface of the object
instanceunique identifier

Definition at line 45 of file factory.h.

Member Typedef Documentation

template<class AbstractClass, int instance = 0>
typedef std::map<std::string, void *> ObjectFactoryRegistry< AbstractClass, instance >::Map
private

Definition at line 97 of file factory.h.

Constructor & Destructor Documentation

template<class AbstractClass, int instance = 0>
ObjectFactoryRegistry< AbstractClass, instance >::~ObjectFactoryRegistry ( )
inline

Definition at line 54 of file factory.h.

Member Function Documentation

template<class AbstractClass, int instance = 0>
AbstractClass* ObjectFactoryRegistry< AbstractClass, instance >::CreateObject ( const char *  name) const
inline

Definition at line 74 of file factory.h.

Here is the call graph for this function:

template<class AbstractClass, int instance = 0>
const ObjectFactory<AbstractClass>* ObjectFactoryRegistry< AbstractClass, instance >::GetFactory ( const char *  name) const
inline

Definition at line 68 of file factory.h.

template<class AbstractClass, int instance = 0>
std::vector<std::string> ObjectFactoryRegistry< AbstractClass, instance >::GetFactoryNames ( ) const
inline

Definition at line 84 of file factory.h.

template<class AbstractClass, int instance = 0>
void ObjectFactoryRegistry< AbstractClass, instance >::RegisterFactory ( const std::string &  name,
ObjectFactory< AbstractClass > *  factory 
)
inline

Definition at line 63 of file factory.h.

template<class AbstractClass , int instance>
ObjectFactoryRegistry< AbstractClass, instance > & ObjectFactoryRegistry< AbstractClass, instance >::Registry ( CRYPTOPP_NOINLINE_DOTDOTDOT  )
static

Definition at line 102 of file factory.h.

Here is the caller graph for this function:

Member Data Documentation

template<class AbstractClass, int instance = 0>
Map ObjectFactoryRegistry< AbstractClass, instance >::m_map
private

Definition at line 98 of file factory.h.


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