creaContours_lib
|
#include <CommandsHandler.h>
Public Member Functions | |
CommandsHandler () | |
~CommandsHandler () | |
void | registerCommand (CommandObject *doneAction, CommandObject *unDoAction) |
bool | undo () |
bool | redo () |
bool | isPosibleUNDO () |
bool | isPosibleREDO () |
void | setPosibleUNDO (bool UNDOstate) |
void | setPosibleREDO (bool REDOstate) |
void | clearActions () |
int | getTotalCommands () |
CommandObject * | getActual_UNDO () |
CommandObject * | getActual_REDO () |
CommandObject * | get_DO_CommandAt (int position) |
CommandObject * | get_UNDO_CommandAt (int position) |
void | validateOperationsAvaliability () |
void | setModelBoss (ICommandsUser *theModelParent) |
Private Attributes | |
CommandsRegisterStructure * | redo_actions |
CommandsRegisterStructure * | unDo_actions |
bool | posibleUNDO |
bool | posibleREDO |
ICommandsUser * | theWorksSpaceBoss |
bool | isLastREDO_executed |
bool | isLastUNDO_executed |
std::deque< CommandObject * > | executionQueue |
Definition at line 40 of file CommandsHandler.h.
CommandsHandler::CommandsHandler | ( | ) |
Definition at line 44 of file CommandsHandler.cxx.
References isLastREDO_executed, isLastUNDO_executed, posibleREDO, posibleUNDO, redo_actions, and unDo_actions.
CommandsHandler::~CommandsHandler | ( | ) |
Definition at line 59 of file CommandsHandler.cxx.
References clearActions(), redo_actions, and unDo_actions.
void CommandsHandler::clearActions | ( | ) |
Definition at line 223 of file CommandsHandler.cxx.
References CommandsRegisterStructure::clearActions(), redo_actions, and unDo_actions.
Referenced by ~CommandsHandler().
CommandObject * CommandsHandler::get_DO_CommandAt | ( | int | position | ) |
Definition at line 262 of file CommandsHandler.cxx.
References CommandsRegisterStructure::getCommandAt(), and redo_actions.
CommandObject * CommandsHandler::get_UNDO_CommandAt | ( | int | position | ) |
Definition at line 271 of file CommandsHandler.cxx.
References CommandsRegisterStructure::getCommandAt(), and unDo_actions.
CommandObject * CommandsHandler::getActual_REDO | ( | ) |
Definition at line 253 of file CommandsHandler.cxx.
References CommandsRegisterStructure::getActual_Pointer(), and redo_actions.
Referenced by redo().
CommandObject * CommandsHandler::getActual_UNDO | ( | ) |
Definition at line 244 of file CommandsHandler.cxx.
References CommandsRegisterStructure::getActual_Pointer(), and unDo_actions.
Referenced by undo().
int CommandsHandler::getTotalCommands | ( | ) |
Definition at line 233 of file CommandsHandler.cxx.
References CommandsRegisterStructure::getTotalCommandsCount(), redo_actions, and unDo_actions.
bool CommandsHandler::isPosibleREDO | ( | ) |
Definition at line 197 of file CommandsHandler.cxx.
References posibleREDO.
bool CommandsHandler::isPosibleUNDO | ( | ) |
Definition at line 188 of file CommandsHandler.cxx.
References posibleUNDO.
bool CommandsHandler::redo | ( | ) |
Definition at line 137 of file CommandsHandler.cxx.
References ICommandsUser::executeCommand(), getActual_REDO(), CommandsRegisterStructure::hasActualNext(), CommandsRegisterStructure::hasActualPrevious(), CommandsRegisterStructure::hasLastNext(), isLastREDO_executed, isLastUNDO_executed, CommandsRegisterStructure::moveBack_Last(), CommandsRegisterStructure::moveForward_Actual(), CommandsRegisterStructure::moveForward_Last(), posibleREDO, redo_actions, theWorksSpaceBoss, unDo_actions, and validateOperationsAvaliability().
Referenced by ContourWorkspace::callREDO().
void CommandsHandler::registerCommand | ( | CommandObject * | doneAction, |
CommandObject * | unDoAction | ||
) |
Definition at line 76 of file CommandsHandler.cxx.
References CommandsRegisterStructure::getActualIndex(), isLastREDO_executed, isLastUNDO_executed, posibleREDO, posibleUNDO, redo_actions, CommandsRegisterStructure::registerCommand(), CommandsRegisterStructure::setActualIndex(), and unDo_actions.
Referenced by ContourWorkspace::callRegisterCommand().
void CommandsHandler::setModelBoss | ( | ICommandsUser * | theModelParent | ) |
Definition at line 280 of file CommandsHandler.cxx.
References theWorksSpaceBoss.
Referenced by ContourWorkspace::ContourWorkspace().
void CommandsHandler::setPosibleREDO | ( | bool | REDOstate | ) |
Definition at line 215 of file CommandsHandler.cxx.
References posibleREDO.
void CommandsHandler::setPosibleUNDO | ( | bool | UNDOstate | ) |
Definition at line 206 of file CommandsHandler.cxx.
References posibleUNDO.
bool CommandsHandler::undo | ( | ) |
Definition at line 96 of file CommandsHandler.cxx.
References ICommandsUser::executeCommand(), getActual_UNDO(), CommandsRegisterStructure::hasActualNext(), CommandsRegisterStructure::hasActualPrevious(), CommandsRegisterStructure::hasLastNext(), isLastREDO_executed, isLastUNDO_executed, CommandsRegisterStructure::moveBack_Actual(), CommandsRegisterStructure::moveBack_Last(), posibleUNDO, redo_actions, theWorksSpaceBoss, unDo_actions, and validateOperationsAvaliability().
Referenced by ContourWorkspace::callUNDO().
void CommandsHandler::validateOperationsAvaliability | ( | ) |
Definition at line 288 of file CommandsHandler.cxx.
References CommandsRegisterStructure::hasActualNext(), CommandsRegisterStructure::hasActualPrevious(), isLastREDO_executed, isLastUNDO_executed, posibleREDO, posibleUNDO, redo_actions, and unDo_actions.
Referenced by redo(), and undo().
|
private |
Definition at line 175 of file CommandsHandler.h.
|
private |
Definition at line 171 of file CommandsHandler.h.
Referenced by CommandsHandler(), redo(), registerCommand(), undo(), and validateOperationsAvaliability().
|
private |
Definition at line 173 of file CommandsHandler.h.
Referenced by CommandsHandler(), redo(), registerCommand(), undo(), and validateOperationsAvaliability().
|
private |
Definition at line 167 of file CommandsHandler.h.
Referenced by CommandsHandler(), isPosibleREDO(), redo(), registerCommand(), setPosibleREDO(), and validateOperationsAvaliability().
|
private |
Definition at line 165 of file CommandsHandler.h.
Referenced by CommandsHandler(), isPosibleUNDO(), registerCommand(), setPosibleUNDO(), undo(), and validateOperationsAvaliability().
|
private |
Definition at line 161 of file CommandsHandler.h.
Referenced by clearActions(), CommandsHandler(), get_DO_CommandAt(), getActual_REDO(), getTotalCommands(), redo(), registerCommand(), undo(), validateOperationsAvaliability(), and ~CommandsHandler().
|
private |
Definition at line 169 of file CommandsHandler.h.
Referenced by redo(), setModelBoss(), and undo().
|
private |
Definition at line 163 of file CommandsHandler.h.
Referenced by clearActions(), CommandsHandler(), get_UNDO_CommandAt(), getActual_UNDO(), getTotalCommands(), redo(), registerCommand(), undo(), validateOperationsAvaliability(), and ~CommandsHandler().