Esempio n. 1
0
	void UndoableAction::Redo()
	{
		if (!IsUndone()) // Can't redo an action that hasn't been undone
			return;
		redoAction();
		m_Undone = false;
	}
Esempio n. 2
0
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;
}
Esempio n. 3
0
	void UndoableAction::Undo()
	{
		if (IsUndone())
			return;
		undoAction();
		m_Undone = true;
	}