]> ruin.nu Git - popboot.git/blobdiff - action.cpp
initial execution of the plan
[popboot.git] / action.cpp
index 2508b5c9fcdbd7cd56a1f6c3414a41977eb59ed4..427440b268c182270bd358d248870de02c78a8be 100644 (file)
@@ -1,3 +1,28 @@
 #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;
+}
+
+literals Action::effects() const{
+       return _effects;
+}
+
+literals Action::preconditions() const{
+       return _preconditions;
+}
+
+int Action::execute() const{
+       cout << "Executing: " << _executable << endl;
+       return 0;
+}