AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
CreatureAIFactory< REAL_AI > Struct Template Reference

#include "CreatureAIFactory.h"

Inheritance diagram for CreatureAIFactory< REAL_AI >:
SelectableAI FactoryHolder< T, O, Key > Permissible< Creature >

Public Member Functions

 CreatureAIFactory (std::string const &name)
 
CreatureAICreate (Creature *c) const override
 
int32 Permit (Creature const *c) const override
 
- Public Member Functions inherited from SelectableAI
 SelectableAI (std::string const &name)
 
- Public Member Functions inherited from FactoryHolder< T, O, Key >
 FactoryHolder (Key const &k)
 
virtual ~FactoryHolder ()
 
void RegisterSelf ()
 
virtual T * Create (O *object=nullptr) const =0
 Abstract Factory create method. More...
 
- Public Member Functions inherited from Permissible< Creature >
virtual ~Permissible ()
 
virtual int32 Permit (Creature const *) const=0
 

Additional Inherited Members

- Public Types inherited from FactoryHolder< T, O, Key >
typedef ObjectRegistry< FactoryHolder< T, O, Key >, Key > FactoryHolderRegistry
 

Detailed Description

template<class REAL_AI>
struct CreatureAIFactory< REAL_AI >

Constructor & Destructor Documentation

◆ CreatureAIFactory()

template<class REAL_AI >
CreatureAIFactory< REAL_AI >::CreatureAIFactory ( std::string const &  name)
inline
34: SelectableAI(name) { }
Definition: CreatureAIFactory.h:27

Member Function Documentation

◆ Create()

template<class REAL_AI >
CreatureAI * CreatureAIFactory< REAL_AI >::Create ( Creature c) const
inlineoverride
37 {
38 return new REAL_AI(c);
39 }

◆ Permit()

template<class REAL_AI >
int32 CreatureAIFactory< REAL_AI >::Permit ( Creature const *  c) const
inlineoverridevirtual

Implements Permissible< Creature >.

42 {
43 return REAL_AI::Permissible(c);
44 }