source: molecuilder/src/Actions/ErrorAction.cpp@ abd4a1

Last change on this file since abd4a1 was 521e29, checked in by Tillmann Crueger <crueger@…>, 15 years ago

Switched type of pointer used for ActionStates

  • Property mode set to 100644
File size: 893 bytes
Line 
1/*
2 * ErrorAction.cpp
3 *
4 * Created on: Jan 5, 2010
5 * Author: crueger
6 */
7
8#include <iostream>
9
10#include "Actions/ErrorAction.hpp"
11#include "log.hpp"
12#include "verbose.hpp"
13#include "Helpers/Assert.hpp"
14
15using namespace std;
16
17ErrorAction::ErrorAction(string _name,const char * _errorMsg,bool _doRegister) :
18Action(_name,_doRegister),
19errorMsg(_errorMsg)
20{
21}
22
23ErrorAction::~ErrorAction()
24{
25}
26
27Action::state_ptr ErrorAction::performCall() {
28 Log() << Verbose(0) << errorMsg << endl;
29 return Action::success;
30}
31Action::state_ptr ErrorAction::performUndo(Action::state_ptr) {
32 ASSERT(0,"Undo called for an ErrorAction");
33 return Action::success;
34}
35
36Action::state_ptr ErrorAction::performRedo(Action::state_ptr) {
37 ASSERT(0,"Redo called for an ErrorAction");
38 return Action::success;
39}
40
41bool ErrorAction::canUndo(){
42 return false;
43}
44
45bool ErrorAction::shouldUndo(){
46 return false;
47}
Note: See TracBrowser for help on using the repository browser.