X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;f=action.cpp;h=626eb37475bb5487756381dafcd823fd2188380f;hb=e26fd7b3195576b25ffe51253a391b53f412a650;hp=695c74fb71d4b7b6d8e764e186a730ad4354317f;hpb=eb5481635b31a8517a2f443ca7b414e4ff515028;p=popboot.git diff --git a/action.cpp b/action.cpp index 695c74f..626eb37 100644 --- a/action.cpp +++ b/action.cpp @@ -1,21 +1,32 @@ #include "action.h" +#include +using namespace std; Action::Action(std::string executable, literals preconditions, literals effects){ - _execututable = executable; + _executable = executable; _preconditions = preconditions; _effects = effects; } +Action::Action(const Action& action){ + _executable = action._executable; + _preconditions = action._preconditions; + _effects = action._effects; +} -const literals Action::effects(){ +const literals& Action::effects() const{ return _effects; } -const literals Action::preconditions(){ +const literals& Action::preconditions() const{ return _preconditions; } -int Action::execute(){ - +int Action::execute() const{ + cout << "Executing: " << _executable << endl; return 0; } + +const string& Action::executable() const{ + return _executable; +}