TrinityCore
FactoryHolder< T, O, Key > Class Template Referenceabstract

#include <FactoryHolder.h>

+ Inheritance diagram for FactoryHolder< T, O, Key >:

Public Types

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

Public Member Functions

 FactoryHolder (Key const &k)
 
virtual ~FactoryHolder ()
 
void RegisterSelf ()
 
virtual T * Create (O *object=nullptr) const =0
 Abstract Factory create method. More...
 

Private Attributes

Key const _key
 

Detailed Description

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

FactoryHolder holds a factory object of a specific type

Definition at line 27 of file FactoryHolder.h.

Member Typedef Documentation

◆ FactoryHolderRegistry

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

Definition at line 30 of file FactoryHolder.h.

Constructor & Destructor Documentation

◆ FactoryHolder()

template<class T , class O , class Key = std::string>
FactoryHolder< T, O, Key >::FactoryHolder ( Key const &  k)
inlineexplicit

Definition at line 32 of file FactoryHolder.h.

◆ ~FactoryHolder()

template<class T , class O , class Key = std::string>
virtual FactoryHolder< T, O, Key >::~FactoryHolder ( )
inlinevirtual

Definition at line 33 of file FactoryHolder.h.

Member Function Documentation

◆ Create()

template<class T , class O , class Key = std::string>
virtual T * FactoryHolder< T, O, Key >::Create ( O *  object = nullptr) const
pure virtual

◆ RegisterSelf()

template<class T , class O , class Key = std::string>
void FactoryHolder< T, O, Key >::RegisterSelf ( )
inline

Definition at line 35 of file FactoryHolder.h.

+ Here is the call graph for this function:

Member Data Documentation

◆ _key

template<class T , class O , class Key = std::string>
Key const FactoryHolder< T, O, Key >::_key
private

Definition at line 40 of file FactoryHolder.h.


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