/* * ErrorAction.cpp * * Created on: Jan 5, 2010 * Author: crueger */ #include "Helpers/MemDebug.hpp" #include #include "Actions/ErrorAction.hpp" #include "log.hpp" #include "verbose.hpp" #include "Helpers/Assert.hpp" using namespace std; ErrorAction::ErrorAction(string _name,const char * _errorMsg,bool _doRegister) : Action(_name,_doRegister), errorMsg(_errorMsg) { } ErrorAction::~ErrorAction() { } Action::state_ptr ErrorAction::performCall() { Log() << Verbose(0) << errorMsg << endl; return Action::success; } Action::state_ptr ErrorAction::performUndo(Action::state_ptr) { ASSERT(0,"Undo called for an ErrorAction"); return Action::success; } Action::state_ptr ErrorAction::performRedo(Action::state_ptr) { ASSERT(0,"Redo called for an ErrorAction"); return Action::success; } bool ErrorAction::canUndo(){ return false; } bool ErrorAction::shouldUndo(){ return false; }