/* * Project: MoleCuilder * Description: creates and alters molecular systems * Copyright (C) 2010 University of Bonn. All rights reserved. * Please see the LICENSE file or "Copyright notice" in builder.cpp for details. */ /* * RedoAction.cpp * * Created on: Oct 27, 2010 * Author: heber */ // include config.h #ifdef HAVE_CONFIG_H #include #endif #include "CodePatterns/MemDebug.hpp" #include "ActionHistory.hpp" #include #include "CodePatterns/Assert.hpp" #include "Actions/RedoAction.hpp" // and construct the stuff #include "RedoAction.def" #include "Action_impl_pre.hpp" /** =========== define the function ====================== */ Action::state_ptr RedoAction::performCall(){ std::cout << "Redo" << std::endl; ActionHistory::getInstance().redoLast(); return Action::success; } Action::state_ptr RedoAction::performUndo(Action::state_ptr){ ASSERT(0,"Cannot undo a redo (should use undo for this"); return Action::success; } Action::state_ptr RedoAction::performRedo(Action::state_ptr){ ASSERT(0,"Cannot redo a redo"); return Action::success; } bool RedoAction::canUndo(){ return false; } bool RedoAction::shouldUndo(){ return false; } /** =========== end of function ====================== */