| 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 |
|
|---|
| 15 | using namespace std;
|
|---|
| 16 |
|
|---|
| 17 | ErrorAction::ErrorAction(string _name,const char * _errorMsg,bool _doRegister) :
|
|---|
| 18 | Action(_name,_doRegister),
|
|---|
| 19 | errorMsg(_errorMsg)
|
|---|
| 20 | {
|
|---|
| 21 | }
|
|---|
| 22 |
|
|---|
| 23 | ErrorAction::~ErrorAction()
|
|---|
| 24 | {
|
|---|
| 25 | }
|
|---|
| 26 |
|
|---|
| 27 | Action::state_ptr ErrorAction::performCall() {
|
|---|
| 28 | Log() << Verbose(0) << errorMsg << endl;
|
|---|
| 29 | return Action::success;
|
|---|
| 30 | }
|
|---|
| 31 | Action::state_ptr ErrorAction::performUndo(Action::state_ptr) {
|
|---|
| 32 | ASSERT(0,"Undo called for an ErrorAction");
|
|---|
| 33 | return Action::success;
|
|---|
| 34 | }
|
|---|
| 35 |
|
|---|
| 36 | Action::state_ptr ErrorAction::performRedo(Action::state_ptr) {
|
|---|
| 37 | ASSERT(0,"Redo called for an ErrorAction");
|
|---|
| 38 | return Action::success;
|
|---|
| 39 | }
|
|---|
| 40 |
|
|---|
| 41 | bool ErrorAction::canUndo(){
|
|---|
| 42 | return false;
|
|---|
| 43 | }
|
|---|
| 44 |
|
|---|
| 45 | bool ErrorAction::shouldUndo(){
|
|---|
| 46 | return false;
|
|---|
| 47 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.