]> ruin.nu Git - popboot.git/blobdiff - action.cpp
references instead of copies
[popboot.git] / action.cpp
index 3e9cddf692163b41a515655c33e37ef29bffd270..626eb37475bb5487756381dafcd823fd2188380f 100644 (file)
@@ -1,4 +1,6 @@
 #include "action.h"
+#include <iostream>
+using namespace std;
 
 Action::Action(std::string executable, literals preconditions, literals effects){
        _executable = executable;
@@ -12,15 +14,19 @@ Action::Action(const Action& action){
        _effects = action._effects;
 }
 
-literals Action::effects() const{
+const literals& Action::effects() const{
        return _effects;
 }
 
-literals Action::preconditions() const{
+const literals& Action::preconditions() const{
        return _preconditions;
 }
 
 int Action::execute() const{
-
+       cout << "Executing: " << _executable << endl;
        return 0;
 }
+
+const string& Action::executable() const{
+       return _executable;
+}