The Battle for Wesnoth  1.13.10+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Types | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
ai::stopunit_result Class Reference

#include <actions.hpp>

Inheritance diagram for ai::stopunit_result:
Inheritance graph

Public Types

enum  result { E_NO_UNIT = 4002, E_NOT_OWN_UNIT = 4003, E_INCAPACITATED_UNIT = 4004 }
 
- Public Types inherited from ai::action_result
enum  result { AI_ACTION_SUCCESS = 0, AI_ACTION_STARTED = 1, AI_ACTION_FAILURE = -1 }
 

Public Member Functions

 stopunit_result (side_number side, const map_location &unit_location, bool remove_movement, bool remove_attacks)
 
virtual std::string do_describe () const
 
- Public Member Functions inherited from ai::action_result
virtual ~action_result ()
 
void check_before ()
 
void execute ()
 
bool is_gamestate_changed () const
 
bool is_ok ()
 
int get_status () const
 

Protected Member Functions

virtual void do_check_before ()
 
virtual void do_check_after ()
 
virtual void do_execute ()
 
virtual void do_init_for_execution ()
 
- Protected Member Functions inherited from ai::action_result
 action_result (side_number side)
 
bool is_execution () const
 
int get_side () const
 
game_infoget_info () const
 
teamget_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

const unitget_unit ()
 

Private Attributes

const map_locationunit_location_
 
const bool remove_movement_
 
const bool remove_attacks_
 

Detailed Description

Definition at line 270 of file actions.hpp.

Member Enumeration Documentation

Enumerator
E_NO_UNIT 
E_NOT_OWN_UNIT 
E_INCAPACITATED_UNIT 

Definition at line 277 of file actions.hpp.

Constructor & Destructor Documentation

ai::stopunit_result::stopunit_result ( side_number  side,
const map_location unit_location,
bool  remove_movement,
bool  remove_attacks 
)

Definition at line 823 of file actions.cpp.

Member Function Documentation

void ai::stopunit_result::do_check_after ( )
protectedvirtual
void ai::stopunit_result::do_check_before ( )
protectedvirtual

Implements ai::action_result.

Definition at line 847 of file actions.cpp.

References get_unit(), and LOG_AI_ACTIONS.

std::string ai::stopunit_result::do_describe ( ) const
virtual

Implements ai::action_result.

Definition at line 873 of file actions.cpp.

References ai::action_result::get_side(), remove_attacks_, remove_movement_, s, and unit_location_.

Referenced by operator<<().

void ai::stopunit_result::do_execute ( )
protectedvirtual
void ai::stopunit_result::do_init_for_execution ( )
protectedvirtual

Implements ai::action_result.

Definition at line 923 of file actions.cpp.

const unit * ai::stopunit_result::get_unit ( )
private

Member Data Documentation

const bool ai::stopunit_result::remove_attacks_
private

Definition at line 293 of file actions.hpp.

Referenced by do_check_after(), do_describe(), and do_execute().

const bool ai::stopunit_result::remove_movement_
private

Definition at line 292 of file actions.hpp.

Referenced by do_check_after(), do_describe(), and do_execute().

const map_location& ai::stopunit_result::unit_location_
private

Definition at line 291 of file actions.hpp.

Referenced by do_check_after(), do_describe(), do_execute(), and get_unit().


The documentation for this class was generated from the following files: