Base class for actions which act on a specified location (and possibly on other locations that can be derived from the staring hex) More...
#include <action.hpp>
Public Member Functions | |
editor_action_location (map_location loc) | |
const std::string & | get_name () const override |
Public Member Functions inherited from editor::editor_action | |
editor_action () | |
virtual | ~editor_action () |
virtual std::unique_ptr< editor_action > | clone () const =0 |
Action cloning. More... | |
virtual std::unique_ptr< editor_action > | perform (map_context &) const |
Perform the action, returning an undo action that, when performed, shall reverse any effects of this action. More... | |
virtual void | perform_without_undo (map_context &) const =0 |
Perform the action without creating an undo action. More... | |
virtual int | action_count () const |
virtual std::string | get_description () const |
A textual description of the action. More... | |
int | get_id () const |
Debugging aid. More... | |
Protected Attributes | |
map_location | loc_ |
Additional Inherited Members | |
Static Public Member Functions inherited from editor::editor_action | |
static int | get_instance_count () |
Debugging aid. More... | |
Base class for actions which act on a specified location (and possibly on other locations that can be derived from the staring hex)
Definition at line 176 of file action.hpp.
|
inline |
Definition at line 179 of file action.hpp.
|
inlineoverridevirtual |
Reimplemented from editor::editor_action.
Reimplemented in editor::editor_action_village_delete, editor::editor_action_village, editor::editor_action_unit_facing, editor::editor_action_unit_replace, editor::editor_action_unit_delete, editor::editor_action_unit, editor::editor_action_label_delete, editor::editor_action_label, editor::editor_action_item_facing, editor::editor_action_item_replace, editor::editor_action_item_delete, editor::editor_action_item, editor::editor_action_starting_position, editor::editor_action_fill, and editor::editor_action_location_terrain.
Definition at line 184 of file action.hpp.
|
protected |
Definition at line 191 of file action.hpp.
Referenced by editor::editor_action_fill::perform_without_undo(), editor::editor_action_starting_position::perform_without_undo(), editor::editor_action_label::perform_without_undo(), editor::editor_action_label_delete::perform_without_undo(), editor::editor_action_unit::perform_without_undo(), editor::editor_action_unit_delete::perform_without_undo(), editor::editor_action_unit_replace::perform_without_undo(), editor::editor_action_unit_facing::perform_without_undo(), editor::editor_action_village::perform_without_undo(), and editor::editor_action_village_delete::perform_without_undo().