#include <undo_dismiss_action.hpp>
Public Member Functions | |
dismiss_action (const unit_const_ptr dismissed) | |
dismiss_action (const config &cfg, const config &unit_cfg) | |
virtual const char * | get_type () const |
virtual | ~dismiss_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 Attributes | |
unit_ptr | dismissed_unit |
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 |
Additional Inherited Members | |
Public Types inherited from actions::undo_action | |
typedef std::vector< undo_event > | event_vector |
actions wml (specified by wml) that should be executed when undoing this command. More... | |
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) |
Definition at line 12 of file undo_dismiss_action.hpp.
|
inlineexplicit |
Definition at line 17 of file undo_dismiss_action.hpp.
|
inlineexplicit |
Definition at line 22 of file undo_dismiss_action.hpp.
|
inlinevirtual |
Definition at line 28 of file undo_dismiss_action.hpp.
|
inlinevirtual |
Implements actions::undo_action_base.
Definition at line 27 of file undo_dismiss_action.hpp.
|
virtual |
Redoes this action.
Implements actions::undo_action.
Definition at line 37 of file undo_dismiss_action.cpp.
References config::clear(), dismissed_unit, recall_list_manager::erase_if_matches_id(), actions::undo_action::execute_redo_umc_wml(), team::recall_list(), resources::recorder, replay::redo(), and actions::undo_action::replay_data.
|
virtual |
Undoes this action.
Implements actions::undo_action.
Definition at line 24 of file undo_dismiss_action.cpp.
References recall_list_manager::add(), dismissed_unit, actions::undo_action::execute_undo_umc_wml(), and team::recall_list().
Writes this into the provided config.
Reimplemented from actions::undo_action.
Definition at line 14 of file undo_dismiss_action.cpp.
References config::add_child(), dismissed_unit, and actions::undo_action::write().
unit_ptr actions::undo::dismiss_action::dismissed_unit |
Definition at line 14 of file undo_dismiss_action.hpp.