void Cmd::undo() { ASSERT(m_state == State::Executed || m_state == State::Redone); onUndo(); onFireNotifications(); #if _DEBUG m_state = State::Undone; #endif }
void Cmd::redo() { ASSERT(m_state == State::Undone); onRedo(); onFireNotifications(); #if _DEBUG m_state = State::Redone; #endif }
void Cmd::redo() { DLOG("Cmd: Redo cmd '%s'\n", typeid(*this).name()); ASSERT(m_state == State::Undone); onRedo(); onFireNotifications(); #if _DEBUG m_state = State::Redone; #endif }
void Cmd::execute(Context* ctx) { ASSERT(m_state == State::NotExecuted); m_ctx = ctx; onExecute(); onFireNotifications(); #if _DEBUG m_state = State::Executed; #endif }
void Cmd::execute(Context* ctx) { DLOG("Cmd: Executing cmd '%s'\n", typeid(*this).name()); ASSERT(m_state == State::NotExecuted); m_ctx = ctx; onExecute(); onFireNotifications(); #if _DEBUG m_state = State::Executed; #endif }