19 #ifndef TRINITY_CREATUREAIFACTORY_H
20 #define TRINITY_CREATUREAIFACTORY_H
32 template<
class REAL_AI>
39 int Permit(
const Creature* c)
const override {
return REAL_AI::Permissible(c); }
42 template<
class REAL_AI>
47 return (
new REAL_AI(creature));
53 #define sCreatureAIRegistry CreatureAIRegistry::instance()
61 template<
class REAL_GO_AI>
71 template<
class REAL_GO_AI>
76 return (
new REAL_GO_AI(go));
82 #define sGameObjectAIRegistry GameObjectAIRegistry::instance()
Definition: CreatureAIFactory.h:27
Definition: CreatureAIFactory.h:33
Definition: FactoryHolder.h:29
Definition: Creature.h:467
FactoryHolder< CreatureAI >::FactoryHolderRegistry CreatureAIRegistry
Definition: CreatureAIFactory.h:51
Definition: GameObjectAI.h:29
CreatureAIFactory(const char *name)
Definition: CreatureAIFactory.h:35
SelectableAI(const char *id)
Definition: CreatureAIFactory.h:29
Definition: CreatureAI.h:68
Definition: GameObject.h:880
CreatureAI * Create(void *) const override
Abstract Factory create method.
Definition: CreatureAIFactory.h:44
FactoryHolder< GameObjectAI >::FactoryHolderRegistry GameObjectAIRegistry
Definition: CreatureAIFactory.h:80
FactoryHolder< CreatureAI > CreatureAICreator
Definition: CreatureAIFactory.h:50
Definition: CreatureAIFactory.h:56
Definition: CreatureAIFactory.h:62
GameObjectAIFactory(const char *name)
Definition: CreatureAIFactory.h:64
FactoryHolder< GameObjectAI > GameObjectAICreator
Definition: CreatureAIFactory.h:79
Definition: FactoryHolder.h:52
SelectableGameObjectAI(const char *id)
Definition: CreatureAIFactory.h:58
int Permit(const GameObject *g) const override
Definition: CreatureAIFactory.h:68
GameObjectAI * Create(void *) const override
Abstract Factory create method.
Definition: CreatureAIFactory.h:73
int Permit(const Creature *c) const override
Definition: CreatureAIFactory.h:39