TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
CreatureAIFactory< REAL_AI > Struct Template Reference

#include <CreatureAIFactory.h>

Public Member Functions

 CreatureAIFactory (const char *name)
 
CreatureAICreate (void *) const override
 Abstract Factory create method. More...
 
int Permit (const Creature *c) const override
 
- Public Member Functions inherited from SelectableAI
 SelectableAI (const char *id)
 
- Public Member Functions inherited from FactoryHolder< CreatureAI >
 FactoryHolder (Key k)
 
virtual ~FactoryHolder ()
 
Key key () const
 
void RegisterSelf (void)
 
void DeregisterSelf (void)
 
- Public Member Functions inherited from Permissible< Creature >
virtual ~Permissible ()
 

Additional Inherited Members

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

Constructor & Destructor Documentation

template<class REAL_AI >
CreatureAIFactory< REAL_AI >::CreatureAIFactory ( const char *  name)
inline
35 : SelectableAI(name) { }
SelectableAI(const char *id)
Definition: CreatureAIFactory.h:29

Member Function Documentation

template<class REAL_AI >
CreatureAI * CreatureAIFactory< REAL_AI >::Create ( void *  data) const
inlineoverridevirtual

Abstract Factory create method.

Implements FactoryHolder< CreatureAI >.

45 {
46  Creature* creature = reinterpret_cast<Creature*>(data);
47  return (new REAL_AI(creature));
48 }
Definition: Creature.h:467
template<class REAL_AI >
int CreatureAIFactory< REAL_AI >::Permit ( const Creature c) const
inlineoverridevirtual

Implements Permissible< Creature >.

39 { return REAL_AI::Permissible(c); }

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