Public Member Functions | Private Attributes

ai::lua_candidate_action_wrapper Class Reference

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

List of all members.

Public Member Functions

 lua_candidate_action_wrapper (rca_context &context, const config &cfg, lua_ai_context &lua_ai_ctx)
virtual ~lua_candidate_action_wrapper ()
virtual double evaluate ()
 Evaluate the candidate action, resetting the internal state of the action.
virtual void execute ()
 Execute the candidate action.
virtual config to_config () const
 serialize

Private Attributes

std::string evaluation_
boost::shared_ptr
< lua_ai_action_handler
evaluation_action_handler_
std::string execution_
boost::shared_ptr
< lua_ai_action_handler
execution_action_handler_
config serialized_evaluation_state_

Detailed Description

Definition at line 45 of file engine_lua.cpp.


Constructor & Destructor Documentation

ai::lua_candidate_action_wrapper::lua_candidate_action_wrapper ( rca_context context,
const config cfg,
lua_ai_context lua_ai_ctx 
) [inline]

Definition at line 47 of file engine_lua.cpp.

Referenced by ai::lua_sticky_candidate_action_wrapper::evaluate().

Here is the caller graph for this function:

virtual ai::lua_candidate_action_wrapper::~lua_candidate_action_wrapper (  )  [inline, virtual]

Definition at line 55 of file engine_lua.cpp.


Member Function Documentation

virtual double ai::lua_candidate_action_wrapper::evaluate (  )  [inline, virtual]

Evaluate the candidate action, resetting the internal state of the action.

Returns:
the score
Return values:
>0 if the action is good
<=0 if the action is not good

Implements ai::candidate_action.

Reimplemented in ai::lua_sticky_candidate_action_wrapper.

Definition at line 58 of file engine_lua.cpp.

References LuaKernel::create_lua_ai_action_handler(), evaluation_, evaluation_action_handler_, execution_, execution_action_handler_, and resources::lua_kernel.

Here is the call graph for this function:

virtual void ai::lua_candidate_action_wrapper::execute (  )  [inline, virtual]

Execute the candidate action.

Implements ai::candidate_action.

Reimplemented in ai::lua_sticky_candidate_action_wrapper.

Definition at line 74 of file engine_lua.cpp.

References evaluation_action_handler_, and serialized_evaluation_state_.

virtual config ai::lua_candidate_action_wrapper::to_config (  )  const [inline, virtual]

serialize

Reimplemented from ai::candidate_action.

Definition at line 81 of file engine_lua.cpp.


Member Data Documentation

Definition at line 91 of file engine_lua.cpp.

Referenced by evaluate().

Definition at line 92 of file engine_lua.cpp.

Referenced by evaluate(), and execute().

Definition at line 93 of file engine_lua.cpp.

Referenced by evaluate().

Definition at line 94 of file engine_lua.cpp.

Referenced by evaluate().

Definition at line 95 of file engine_lua.cpp.

Referenced by execute().


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

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