]> ruin.nu Git - popboot.git/blobdiff - action.cpp
references instead of copies
[popboot.git] / action.cpp
index 2508b5c9fcdbd7cd56a1f6c3414a41977eb59ed4..626eb37475bb5487756381dafcd823fd2188380f 100644 (file)
@@ -1,3 +1,32 @@
 #include "action.h"
+#include <iostream>
+using namespace std;
 
+Action::Action(std::string executable, literals preconditions, literals effects){
+       _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{
+       return _effects;
+}
+
+const literals& Action::preconditions() const{
+       return _preconditions;
+}
+
+int Action::execute() const{
+       cout << "Executing: " << _executable << endl;
+       return 0;
+}
+
+const string& Action::executable() const{
+       return _executable;
+}