Public Types | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes

ai::move_result Class Reference

#include <actions.hpp>

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

List of all members.

Public Types

enum  tresult {
  E_EMPTY_MOVE = 2001, E_NO_UNIT = 2002, E_NOT_OWN_UNIT = 2003, E_INCAPACITATED_UNIT = 2004,
  E_AMBUSHED = 2005, E_FAILED_TELEPORT = 2006, E_NOT_REACHED_DESTINATION = 2007, E_NO_ROUTE = 2008
}

Public Member Functions

 move_result (side_number side, const map_location &from, const map_location &to, bool remove_movement, bool unreach_is_ok)
virtual std::string do_describe () const
virtual const map_locationget_unit_location () const

Protected Member Functions

virtual void do_check_before ()
virtual void do_check_after ()
virtual void do_execute ()
virtual void do_init_for_execution ()

Private Member Functions

const unitget_unit ()
bool test_route (const unit &un)

Private Attributes

const map_location from_
move_unit_spectator move_spectator_
const map_location to_
bool remove_movement_
boost::shared_ptr
< pathfind::plain_route
route_
map_location unit_location_
bool unreach_is_ok_

Detailed Description

Definition at line 160 of file actions.hpp.


Member Enumeration Documentation

Enumerator:
E_EMPTY_MOVE 
E_NO_UNIT 
E_NOT_OWN_UNIT 
E_INCAPACITATED_UNIT 
E_AMBUSHED 
E_FAILED_TELEPORT 
E_NOT_REACHED_DESTINATION 
E_NO_ROUTE 

Reimplemented from ai::action_result.

Definition at line 168 of file actions.hpp.


Constructor & Destructor Documentation

ai::move_result::move_result ( side_number  side,
const map_location from,
const map_location to,
bool  remove_movement,
bool  unreach_is_ok 
)

Definition at line 331 of file actions.cpp.


Member Function Documentation

void ai::move_result::do_check_after (  )  [protected, virtual]

Todo:
1.9 add 'new units spotted' failure mode

Implements ai::action_result.

Definition at line 419 of file actions.cpp.

References unit_location_.

void ai::move_result::do_check_before (  )  [protected, virtual]

Implements ai::action_result.

Definition at line 400 of file actions.cpp.

std::string ai::move_result::do_describe (  )  const [virtual]

Implements ai::action_result.

Definition at line 438 of file actions.cpp.

Referenced by operator<<().

Here is the caller graph for this function:

void ai::move_result::do_execute (  )  [protected, virtual]

Todo:
1.9 set to false after implemeting interrupt awareness

Implements ai::action_result.

Definition at line 454 of file actions.cpp.

void ai::move_result::do_init_for_execution (  )  [protected, virtual]

Implements ai::action_result.

Definition at line 512 of file actions.cpp.

const unit * ai::move_result::get_unit (  )  [private]

Definition at line 345 of file actions.cpp.

const map_location & ai::move_result::get_unit_location (  )  const [virtual]

Definition at line 413 of file actions.cpp.

bool ai::move_result::test_route ( const unit un  )  [private]

Todo:
1.9: see_all -> false

Definition at line 365 of file actions.cpp.


Member Data Documentation

Definition at line 189 of file actions.hpp.

Definition at line 190 of file actions.hpp.

Definition at line 192 of file actions.hpp.

boost::shared_ptr<pathfind::plain_route> ai::move_result::route_ [private]

Definition at line 193 of file actions.hpp.

Definition at line 191 of file actions.hpp.

Definition at line 194 of file actions.hpp.

Referenced by do_check_after().

Definition at line 195 of file actions.hpp.


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:20 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs