Public Member Functions | Static Public Member Functions | Protected Attributes

ai::engine Class Reference

#include <engine.hpp>

Inheritance diagram for ai::engine:
Inheritance graph
[legend]
Collaboration diagram for ai::engine:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 engine (readonly_context &context, const config &cfg)
virtual ~engine ()
virtual void do_parse_aspect_from_config (const config &cfg, const std::string &id, std::back_insert_iterator< std::vector< aspect_ptr > > b)
virtual void do_parse_candidate_action_from_config (rca_context &context, const config &cfg, std::back_insert_iterator< std::vector< candidate_action_ptr > > b)
virtual void do_parse_goal_from_config (const config &cfg, std::back_insert_iterator< std::vector< goal_ptr > > b)
virtual void do_parse_engine_from_config (const config &cfg, std::back_insert_iterator< std::vector< engine_ptr > > b)
virtual void do_parse_stage_from_config (ai_context &context, const config &cfg, std::back_insert_iterator< std::vector< stage_ptr > > b)
virtual std::string evaluate (const std::string &str)
readonly_contextget_readonly_context ()
virtual void set_ai_context (ai_context_ptr context)
 set ai context (which is not available during early initialization)
virtual ai_context_ptr get_ai_context ()
virtual config to_config () const
 serialize
virtual std::string get_id () const
virtual std::string get_engine () const
virtual std::string get_name () const

Static Public Member Functions

static void parse_aspect_from_config (readonly_context &context, const config &cfg, const std::string &id, std::back_insert_iterator< std::vector< aspect_ptr > > b)
static void parse_goal_from_config (readonly_context &context, const config &cfg, std::back_insert_iterator< std::vector< goal_ptr > > b)
static void parse_candidate_action_from_config (rca_context &context, const config &cfg, std::back_insert_iterator< std::vector< candidate_action_ptr > > b)
static void parse_engine_from_config (readonly_context &context, const config &cfg, std::back_insert_iterator< std::vector< engine_ptr > > b)
static void parse_stage_from_config (ai_context &context, const config &cfg, std::back_insert_iterator< std::vector< stage_ptr > > b)

Protected Attributes

readonly_contextai_
ai_context_ptr ai_context_
std::string engine_
 name of the engine which has created this engine
std::string id_
std::string name_

Detailed Description

Definition at line 39 of file engine.hpp.


Constructor & Destructor Documentation

ai::engine::engine ( readonly_context context,
const config cfg 
)

Definition at line 34 of file engine.cpp.

References ai_, ai::side_context::get_side(), LOG_AI_ENGINE, and name_.

Here is the call graph for this function:

ai::engine::~engine (  )  [virtual]

Definition at line 44 of file engine.cpp.


Member Function Documentation

void ai::engine::do_parse_aspect_from_config ( const config cfg,
const std::string &  id,
std::back_insert_iterator< std::vector< aspect_ptr > >  b 
) [virtual]

Reimplemented in ai::engine_cpp, and ai::engine_lua.

Definition at line 96 of file engine.cpp.

void ai::engine::do_parse_candidate_action_from_config ( rca_context context,
const config cfg,
std::back_insert_iterator< std::vector< candidate_action_ptr > >  b 
) [virtual]

Reimplemented in ai::engine_cpp, ai::engine_fai, and ai::engine_lua.

Definition at line 102 of file engine.cpp.

void ai::engine::do_parse_engine_from_config ( const config cfg,
std::back_insert_iterator< std::vector< engine_ptr > >  b 
) [virtual]

Reimplemented in ai::engine_cpp.

Definition at line 106 of file engine.cpp.

void ai::engine::do_parse_goal_from_config ( const config cfg,
std::back_insert_iterator< std::vector< goal_ptr > >  b 
) [virtual]

Reimplemented in ai::engine_cpp, and ai::engine_lua.

Definition at line 111 of file engine.cpp.

void ai::engine::do_parse_stage_from_config ( ai_context context,
const config cfg,
std::back_insert_iterator< std::vector< stage_ptr > >  b 
) [virtual]

Reimplemented in ai::engine_cpp, ai::engine_fai, and ai::engine_lua.

Definition at line 116 of file engine.cpp.

std::string ai::engine::evaluate ( const std::string &  str  )  [virtual]

Reimplemented in ai::engine_fai, and ai::engine_lua.

Definition at line 121 of file engine.cpp.

ai_context_ptr ai::engine::get_ai_context (  )  [virtual]

Definition at line 131 of file engine.cpp.

References ai_context_.

Referenced by ai::cfun_ai_get_targets().

Here is the caller graph for this function:

virtual std::string ai::engine::get_engine (  )  const [inline, virtual]

Implements ai::component.

Definition at line 99 of file engine.hpp.

References engine_.

virtual std::string ai::engine::get_id (  )  const [inline, virtual]

Implements ai::component.

Definition at line 96 of file engine.hpp.

References id_.

virtual std::string ai::engine::get_name (  )  const [inline, virtual]

Implements ai::component.

Definition at line 102 of file engine.hpp.

References name_.

Referenced by to_config().

Here is the caller graph for this function:

readonly_context & ai::engine::get_readonly_context (  ) 

Definition at line 144 of file engine.cpp.

References ai_.

Referenced by ai::lua_ai_context::create(), and ai::get_readonly_context().

Here is the caller graph for this function:

void ai::engine::parse_aspect_from_config ( readonly_context context,
const config cfg,
const std::string &  id,
std::back_insert_iterator< std::vector< aspect_ptr > >  b 
) [static]

Definition at line 49 of file engine.cpp.

References ai::readonly_context::get_engine_by_cfg().

Referenced by ai::composite_aspect< T >::add_facet(), ai::composite_aspect< T >::composite_aspect(), ai::composite_aspect< T >::create_facet(), and ai::readonly_context_impl::on_readonly_context_create().

Here is the call graph for this function:

Here is the caller graph for this function:

void ai::engine::parse_candidate_action_from_config ( rca_context context,
const config cfg,
std::back_insert_iterator< std::vector< candidate_action_ptr > >  b 
) [static]

Definition at line 58 of file engine.cpp.

References ai::readonly_context::get_engine_by_cfg().

Referenced by ai::testing_ai_default::candidate_action_evaluation_loop::create_candidate_action(), and ai::testing_ai_default::candidate_action_evaluation_loop::on_create().

Here is the call graph for this function:

Here is the caller graph for this function:

void ai::engine::parse_engine_from_config ( readonly_context context,
const config cfg,
std::back_insert_iterator< std::vector< engine_ptr > >  b 
) [static]

Definition at line 67 of file engine.cpp.

References ai::readonly_context::get_engine_by_cfg().

Referenced by ai::ai_composite::add_stage(), and ai::readonly_context_impl::on_readonly_context_create().

Here is the call graph for this function:

Here is the caller graph for this function:

void ai::engine::parse_goal_from_config ( readonly_context context,
const config cfg,
std::back_insert_iterator< std::vector< goal_ptr > >  b 
) [static]

Definition at line 77 of file engine.cpp.

References ai::readonly_context::get_engine_by_cfg().

Referenced by ai::readonly_context_impl::on_readonly_context_create(), and ai::ai_composite::~ai_composite().

Here is the call graph for this function:

Here is the caller graph for this function:

void ai::engine::parse_stage_from_config ( ai_context context,
const config cfg,
std::back_insert_iterator< std::vector< stage_ptr > >  b 
) [static]

Definition at line 87 of file engine.cpp.

References ai::readonly_context::get_engine_by_cfg().

Referenced by ai::ministage::get_stage_ptr().

Here is the call graph for this function:

Here is the caller graph for this function:

void ai::engine::set_ai_context ( ai_context_ptr  context  )  [virtual]

set ai context (which is not available during early initialization)

Definition at line 126 of file engine.cpp.

References ai_context_.

config ai::engine::to_config (  )  const [virtual]

serialize

Reimplemented in ai::engine_fai, and ai::engine_lua.

Definition at line 136 of file engine.cpp.

References engine_, and get_name().

Here is the call graph for this function:


Member Data Documentation

Definition at line 106 of file engine.hpp.

Referenced by engine(), ai::engine_lua::evaluate(), and get_readonly_context().

Definition at line 107 of file engine.hpp.

Referenced by get_ai_context(), and set_ai_context().

std::string ai::engine::engine_ [protected]

name of the engine which has created this engine

Definition at line 110 of file engine.hpp.

Referenced by get_engine(), and to_config().

std::string ai::engine::id_ [protected]

Definition at line 111 of file engine.hpp.

Referenced by get_id().

std::string ai::engine::name_ [protected]

Definition at line 112 of file engine.hpp.

Referenced by engine(), and get_name().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated by doxygen 1.7.1 on Thu May 24 2012 01:18:24 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs