#include <actions.hpp>

Public Types | |
| enum | tresult { AI_ACTION_SUCCESS = 0, AI_ACTION_STARTED = 1, AI_ACTION_FAILURE = -1 } |
Public Member Functions | |
| virtual | ~action_result () |
| void | check_before () |
| void | execute () |
| bool | is_gamestate_changed () const |
| bool | is_ok () |
| int | get_status () const |
| virtual std::string | do_describe () const =0 |
Protected Member Functions | |
| action_result (side_number side) | |
| virtual void | do_check_before ()=0 |
| virtual void | do_check_after ()=0 |
| virtual void | do_execute ()=0 |
| virtual void | do_init_for_execution ()=0 |
| bool | is_execution () const |
| int | get_side () const |
| game_info & | get_info () const |
| team & | get_my_team () const |
| void | set_error (int error_code, bool log_as_error=true) |
| bool | is_success () const |
| void | set_gamestate_changed () |
Private Member Functions | |
| void | check_after () |
| void | init_for_execution () |
| void | set_ok_checked () |
Private Attributes | |
| bool | return_value_checked_ |
| int | side_ |
| int | status_ |
| bool | is_execution_ |
| bool | is_gamestate_changed_ |
Definition at line 37 of file actions.hpp.
Reimplemented in ai::attack_result, ai::move_result, ai::recall_result, ai::recruit_result, and ai::stopunit_result.
Definition at line 40 of file actions.hpp.
| ai::action_result::~action_result | ( | ) | [virtual] |
Definition at line 64 of file actions.cpp.
| ai::action_result::action_result | ( | side_number | side | ) | [protected] |
Definition at line 58 of file actions.cpp.
| void ai::action_result::check_after | ( | ) | [private] |
Definition at line 72 of file actions.cpp.
| void ai::action_result::check_before | ( | ) |
Definition at line 78 of file actions.cpp.
References do_check_after().

| virtual void ai::action_result::do_check_after | ( | ) | [protected, pure virtual] |
Implemented in ai::attack_result, ai::move_result, ai::recall_result, ai::recruit_result, and ai::stopunit_result.
Referenced by check_before().

| virtual void ai::action_result::do_check_before | ( | ) | [protected, pure virtual] |
Implemented in ai::attack_result, ai::move_result, ai::recall_result, ai::recruit_result, and ai::stopunit_result.
Referenced by execute().

| virtual std::string ai::action_result::do_describe | ( | ) | const [pure virtual] |
Implemented in ai::attack_result, ai::move_result, ai::recall_result, ai::recruit_result, and ai::stopunit_result.
| virtual void ai::action_result::do_execute | ( | ) | [protected, pure virtual] |
Implemented in ai::attack_result, ai::move_result, ai::recall_result, ai::recruit_result, and ai::stopunit_result.
| virtual void ai::action_result::do_init_for_execution | ( | ) | [protected, pure virtual] |
Implemented in ai::attack_result, ai::move_result, ai::recall_result, ai::recruit_result, and ai::stopunit_result.
| void ai::action_result::execute | ( | ) |
Definition at line 84 of file actions.cpp.
References do_check_before().

| game_info & ai::action_result::get_info | ( | ) | const [protected] |
Definition at line 163 of file actions.cpp.
References is_execution_.
| team & ai::action_result::get_my_team | ( | ) | const [protected] |
Definition at line 169 of file actions.cpp.
References ai::manager::get_active_ai_info_for_side(), and get_side().

| int ai::action_result::get_side | ( | ) | const [inline, protected] |
Definition at line 84 of file actions.hpp.
References side_.
Referenced by get_my_team().

| int ai::action_result::get_status | ( | ) | const |
Definition at line 146 of file actions.cpp.
References is_gamestate_changed_.
| void ai::action_result::init_for_execution | ( | ) | [private] |
Definition at line 104 of file actions.cpp.
| bool ai::action_result::is_execution | ( | ) | const [protected] |
Definition at line 157 of file actions.cpp.
References AI_ACTION_SUCCESS, and status_.
| bool ai::action_result::is_gamestate_changed | ( | ) | const |
Definition at line 113 of file actions.cpp.
| bool ai::action_result::is_ok | ( | ) |
Definition at line 119 of file actions.cpp.
References is_gamestate_changed_.
| bool ai::action_result::is_success | ( | ) | const [protected] |
Definition at line 151 of file actions.cpp.
References status_.
| void ai::action_result::set_error | ( | int | error_code, | |
| bool | log_as_error = true | |||
| ) | [protected] |
Definition at line 126 of file actions.cpp.
| void ai::action_result::set_gamestate_changed | ( | ) | [protected] |
Definition at line 140 of file actions.cpp.
| void ai::action_result::set_ok_checked | ( | ) | [private] |
bool ai::action_result::is_execution_ [private] |
Definition at line 120 of file actions.hpp.
Referenced by get_info().
bool ai::action_result::is_gamestate_changed_ [private] |
Definition at line 122 of file actions.hpp.
Referenced by get_status(), and is_ok().
bool ai::action_result::return_value_checked_ [private] |
Definition at line 111 of file actions.hpp.
int ai::action_result::side_ [private] |
Definition at line 114 of file actions.hpp.
Referenced by get_side().
int ai::action_result::status_ [private] |
Definition at line 117 of file actions.hpp.
Referenced by is_execution(), and is_success().
| Generated by doxygen 1.7.1 on Thu May 24 2012 01:18:20 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |