20 #ifndef AI_COMPOSITE_STAGE_HPP_INCLUDED
21 #define AI_COMPOSITE_STAGE_HPP_INCLUDED
29 #pragma warning(disable:4250)
109 static factory_map *stage_factories;
110 if (stage_factories==
nullptr) {
113 return *stage_factories;
123 factory_ptr ptr_to_this(
this);
124 get_list().insert(make_pair(name,ptr_to_this));
131 template<
class STAGE>
virtual bool do_play_stage()
Play the turn - implementation.
idle_stage(ai_context &context, const config &cfg)
std::map< std::string, factory_ptr > factory_map
stage_factory(const std::string &name)
int get_recursion_count() const
get the value of the recursion counter
bool play_stage()
Play the turn - strategy.
std::pair< const std::string, factory_ptr > factory_map_pair
recursion_counter recursion_counter_
virtual std::string get_id() const
virtual std::string get_name() const
virtual ~stage()
Destructor.
A small explanation about what's going on here: Each action has access to two game_info objects First...
static factory_map & get_list()
virtual config to_config() const
serialize
bool is_duplicate(const std::string &name)
A component of the AI framework.
GLboolean GLboolean GLboolean GLboolean a
virtual void on_create()
Initialization.
stage(ai_context &context, const config &cfg)
Constructor.
virtual bool do_play_stage()=0
Play the turn - implementation.
boost::shared_ptr< stage_factory > factory_ptr
GLuint const GLchar * name
register_stage_factory(const std::string &name)
virtual stage_ptr get_new_instance(ai_context &context, const config &cfg)=0
virtual std::string get_engine() const
A config object defines a single node in a WML file, with access to child nodes.
GLsizei const GLcharARB ** string
virtual stage_ptr get_new_instance(ai_context &context, const config &cfg)