The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | Public Attributes | List of all members
actions::undo::move_action Struct Reference

#include <undo_move_action.hpp>

Inheritance diagram for actions::undo::move_action:
Inheritance graph

Public Member Functions

 move_action (const unit_const_ptr moved, const std::vector< map_location >::const_iterator &begin, const std::vector< map_location >::const_iterator &end, int sm, int timebonus, int orig, const map_location::DIRECTION dir)
 
 move_action (const config &cfg, const config &unit_cfg, int sm, const map_location::DIRECTION dir)
 
virtual const char * get_type () const
 
virtual ~move_action ()
 
virtual void write (config &cfg) const
 Writes this into the provided config. More...
 
virtual bool undo (int side)
 Undoes this action. More...
 
virtual bool redo (int side)
 Redoes this action. More...
 
- Public Member Functions inherited from actions::undo_action
 undo_action ()
 Default constructor. More...
 
 undo_action (const config &cfg)
 
virtual ~undo_action ()
 
void execute_undo_umc_wml ()
 
void execute_redo_umc_wml ()
 
- Public Member Functions inherited from actions::undo_action_base
 undo_action_base ()
 Default constructor. More...
 
virtual ~undo_action_base ()
 
- Public Member Functions inherited from actions::shroud_clearing_action
 shroud_clearing_action (const config &cfg)
 
 shroud_clearing_action (const unit_const_ptr u, const map_location &loc, int village_owner, bool village_bonus)
 
 shroud_clearing_action (const unit_const_ptr u, const t_route::const_iterator &begin, const t_route::const_iterator &end, int village_owner, bool village_bonus)
 
void return_village ()
 Change village owner on undo. More...
 
void take_village ()
 Change village owner on redo. More...
 
void write (config &cfg) const
 
virtual ~shroud_clearing_action ()
 

Public Attributes

int starting_moves
 
map_location::DIRECTION starting_dir
 
map_location goto_hex
 
- Public Attributes inherited from actions::undo_action
config replay_data
 the replay data to do this action, this is only !empty() when this action is on the redo stack we need this because we don't recalculate the redos like they would be in real game, but even undoable commands can have "dependent" (= user_input) commands, which we save here. More...
 
int unit_id_diff
 the difference in the unit ids TODO: does it really make sense to allow undoing if the unit id counter has changed? More...
 
event_vector umc_commands_undo
 
event_vector umc_commands_redo
 
- Public Attributes inherited from actions::shroud_clearing_action
t_route route
 The hexes occupied by the affected unit during this action. More...
 
clearer_info view_info
 A record of the affected unit's ability to see. More...
 
int original_village_owner
 The number of the side that preivously owned the village that the unit stepped on Note, that recruit/recall actions can also take a village if the unit was recruits/recalled onto a village. More...
 
bool take_village_timebonus
 Whether this actions got a timebonus becasue it took a village. More...
 

Additional Inherited Members

- Public Types inherited from actions::undo_action
typedef std::vector< undo_eventevent_vector
 actions wml (specified by wml) that should be executed when undoing this command. More...
 
- Public Types inherited from actions::shroud_clearing_action
typedef std::vector< map_locationt_route
 
- Static Public Member Functions inherited from actions::undo_action
static void read_event_vector (event_vector &vec, const config &cfg, const std::string &tag)
 
static void write_event_vector (const event_vector &vec, config &cfg, const std::string &tag)
 

Detailed Description

Definition at line 13 of file undo_move_action.hpp.

Constructor & Destructor Documentation

actions::undo::move_action::move_action ( const unit_const_ptr  moved,
const std::vector< map_location >::const_iterator &  begin,
const std::vector< map_location >::const_iterator &  end,
int  sm,
int  timebonus,
int  orig,
const map_location::DIRECTION  dir 
)
inline

Definition at line 20 of file undo_move_action.hpp.

actions::undo::move_action::move_action ( const config cfg,
const config unit_cfg,
int  sm,
const map_location::DIRECTION  dir 
)
inline

Definition at line 31 of file undo_move_action.hpp.

virtual actions::undo::move_action::~move_action ( )
inlinevirtual

Definition at line 42 of file undo_move_action.hpp.

Member Function Documentation

virtual const char* actions::undo::move_action::get_type ( ) const
inlinevirtual

Implements actions::undo_action_base.

Definition at line 41 of file undo_move_action.hpp.

bool actions::undo::move_action::redo ( int  side)
virtual
bool actions::undo::move_action::undo ( int  side)
virtual
void actions::undo::move_action::write ( config cfg) const
virtual

Member Data Documentation

map_location actions::undo::move_action::goto_hex

Definition at line 17 of file undo_move_action.hpp.

Referenced by redo(), undo(), and write().

map_location::DIRECTION actions::undo::move_action::starting_dir

Definition at line 16 of file undo_move_action.hpp.

Referenced by undo(), and write().

int actions::undo::move_action::starting_moves

Definition at line 15 of file undo_move_action.hpp.

Referenced by redo(), undo(), and write().


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