void UndoableAction::Redo() { if (!IsUndone()) // Can't redo an action that hasn't been undone return; redoAction(); m_Undone = false; }
bool SuiteCollection::Run() { while (IsUndone()) { int wait_result = WaitForSingleObject(global_semaphore_, INFINITE); if (wait_result == WAIT_OBJECT_0) { for (auto var = suits_.begin(); var != suits_.end(); ++var) { if (var->TryRun()) { break; } } } else { logger << "Wait for semaphore failed _1"; return false; } } return true; }
void UndoableAction::Undo() { if (IsUndone()) return; undoAction(); m_Undone = true; }