19 #ifndef AI_COMPOSITE_GOAL_HPP_INCLUDED
20 #define AI_COMPOSITE_GOAL_HPP_INCLUDED
26 #pragma warning(disable:4250)
37 #include <boost/shared_ptr.hpp>
46 namespace ai {
class lua_ai_action_handler; }
47 namespace ai {
class lua_ai_context; }
61 virtual void add_targets(std::back_insert_iterator< std::vector< target > > target_list);
94 virtual void add_targets(std::back_insert_iterator< std::vector< target > > target_list);
113 virtual void add_targets(std::back_insert_iterator< std::vector< target > > target_list);
133 virtual void add_targets(std::back_insert_iterator< std::vector< target > > target_list);
172 virtual void add_targets(std::back_insert_iterator< std::vector< target > > target_list);
189 static factory_map *goal_factories;
190 if (goal_factories==
nullptr) {
193 return *goal_factories;
203 factory_ptr ptr_to_this(
this);
204 get_list().insert(make_pair(name,ptr_to_this));
virtual void add_targets(std::back_insert_iterator< std::vector< target > > target_list)
virtual void add_targets(std::back_insert_iterator< std::vector< target > > target_list)
protect_location_goal(readonly_context &context, const config &cfg)
boost::shared_ptr< lua_ai_action_handler > handler_
target_location_goal(readonly_context &context, const config &cfg)
static factory_map & get_list()
goal(readonly_context &context, const config &cfg)
goal_factory(const std::string &name)
std::map< std::string, factory_ptr > factory_map
Definitions for the interface to Wesnoth Markup Language (WML).
virtual goal_ptr get_new_instance(readonly_context &context, const config &cfg)
virtual std::string get_engine() const
boost::shared_ptr< terrain_filter > filter_ptr_
A small explanation about what's going on here: Each action has access to two game_info objects First...
register_goal_factory(const std::string &name)
A component of the AI framework.
GLboolean GLboolean GLboolean GLboolean a
virtual void add_targets(std::back_insert_iterator< std::vector< target > > target_list)
virtual goal_ptr get_new_instance(readonly_context &context, const config &cfg)=0
lua_goal(readonly_context &context, const config &cfg)
virtual config to_config() const
protect_unit_goal(readonly_context &context, const config &cfg)
virtual std::string get_id() const
bool redeploy(const config &cfg)
boost::shared_ptr< goal_factory > factory_ptr
Game information for the AI.
virtual void add_targets(std::back_insert_iterator< std::vector< target > > target_list)
virtual void add_targets(std::back_insert_iterator< std::vector< target > > target_list)
boost::shared_ptr< terrain_filter > filter_ptr_
GLuint const GLchar * name
virtual std::string get_name() const
std::pair< const std::string, factory_ptr > factory_map_pair
protect_goal(readonly_context &context, const config &cfg, bool protect_unit)
target_unit_goal(readonly_context &context, const config &cfg)
bool is_duplicate(const std::string &name)
A config object defines a single node in a WML file, with access to child nodes.
GLsizei const GLcharARB ** string