#include <Command.h>
Public Types | |
| enum | State { NONE = 0, EXECUTED = 1, UNDONE = 2, REDONE = 3, DISMISSED = 4 } |
Public Member Functions | |
| Command (unsigned cmd_number, const cl7::string_type &cmd_name, world::WorldDesc *world_desc) | |
| virtual | ~Command (void) |
| const cl7::string_type & | get_cmd_name () const |
| unsigned | get_cmd_number () const |
| world::WorldDesc * | get_world_desc () const |
| State | get_state () const |
| bool | is_in_effect () const |
| bool | execute () |
| bool | undo () |
| bool | redo () |
| bool | dismiss () |
Protected Attributes | |
| const unsigned | _cmd_number |
| const cl7::string_type | _cmd_name |
| world::WorldDesc *const | _world_desc |
| State | _state |
The base class for any editor command.
| cyber::editor::commands::Command::Command | ( | unsigned | cmd_number, | |
| const cl7::string_type & | cmd_name, | |||
| world::WorldDesc * | world_desc | |||
| ) |
Explicit constructor.
| cyber::editor::commands::Command::~Command | ( | void | ) | [virtual] |
Destructor.
| bool cyber::editor::commands::Command::dismiss | ( | ) |
Dismisses this command.
| bool cyber::editor::commands::Command::execute | ( | ) |
Executes this command.
| const cl7::string_type& cyber::editor::commands::Command::get_cmd_name | ( | ) | const [inline] |
Returns the name of this command.
| unsigned cyber::editor::commands::Command::get_cmd_number | ( | ) | const [inline] |
Returns the consecutive number of this command.
| State cyber::editor::commands::Command::get_state | ( | ) | const [inline] |
Returns the flag specifying whether this command has been executed, undone, redone or dismissed.
| world::WorldDesc* cyber::editor::commands::Command::get_world_desc | ( | ) | const [inline] |
Returns the world description any editing command is based on.
| bool cyber::editor::commands::Command::is_in_effect | ( | ) | const [inline] |
Returns true, if this command has been executed or redone, false otherwise.
| bool cyber::editor::commands::Command::redo | ( | ) |
"Redoes" this command.
| bool cyber::editor::commands::Command::undo | ( | ) |
"Undoes" this command.
const cl7::string_type cyber::editor::commands::Command::_cmd_name [protected] |
The name of this command.
const unsigned cyber::editor::commands::Command::_cmd_number [protected] |
The consecutive number of this command.
State cyber::editor::commands::Command::_state [protected] |
The flag specifying whether this command has been executed, undone, redone or dismissed.
world::WorldDesc* const cyber::editor::commands::Command::_world_desc [protected] |
The world description any editing command is based on.
1.7.1