TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
FactoryHolder< T, Key > Class Template Referenceabstract

#include <FactoryHolder.h>

Public Types

typedef ObjectRegistry
< FactoryHolder< T, Key >, Key > 
FactoryHolderRegistry
 

Public Member Functions

 FactoryHolder (Key k)
 
virtual ~FactoryHolder ()
 
Key key () const
 
void RegisterSelf (void)
 
void DeregisterSelf (void)
 
virtual T * Create (void *data=NULL) const =0
 Abstract Factory create method. More...
 

Private Attributes

Key i_key
 

Detailed Description

template<class T, class Key = std::string>
class FactoryHolder< T, Key >

FactoryHolder holds a factory object of a specific type

Member Typedef Documentation

template<class T, class Key = std::string>
typedef ObjectRegistry<FactoryHolder<T, Key >, Key > FactoryHolder< T, Key >::FactoryHolderRegistry

Constructor & Destructor Documentation

template<class T, class Key = std::string>
FactoryHolder< T, Key >::FactoryHolder ( Key  k)
inline
34 : i_key(k) { }
Key i_key
Definition: FactoryHolder.h:44
template<class T, class Key = std::string>
virtual FactoryHolder< T, Key >::~FactoryHolder ( )
inlinevirtual
35 { }

Member Function Documentation

template<class T, class Key = std::string>
virtual T* FactoryHolder< T, Key >::Create ( void *  data = NULL) const
pure virtual

Abstract Factory create method.

Implemented in MovementGeneratorFactory< REAL_MOVEMENT >, GameObjectAIFactory< REAL_GO_AI >, and CreatureAIFactory< REAL_AI >.

+ Here is the caller graph for this function:

template<class T, class Key = std::string>
void FactoryHolder< T, Key >::DeregisterSelf ( void  )
inline
39 { FactoryHolderRegistry::instance()->RemoveItem(this, false); }
static ObjectRegistry< T, Key > * instance()
Definition: ObjectRegistry.h:36
template<class T, class Key = std::string>
Key FactoryHolder< T, Key >::key ( ) const
inline
36 { return i_key; }
Key i_key
Definition: FactoryHolder.h:44

+ Here is the caller graph for this function:

template<class T, class Key = std::string>
void FactoryHolder< T, Key >::RegisterSelf ( void  )
inline
38 { FactoryHolderRegistry::instance()->InsertItem(this, i_key); }
Key i_key
Definition: FactoryHolder.h:44
static ObjectRegistry< T, Key > * instance()
Definition: ObjectRegistry.h:36

Member Data Documentation

template<class T, class Key = std::string>
Key FactoryHolder< T, Key >::i_key
private

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