]> ruin.nu Git - popboot.git/commitdiff
added more to action
authorMichael Andreen <harv@ruin.nu>
Fri, 6 May 2005 12:55:15 +0000 (12:55 +0000)
committerMichael Andreen <harv@ruin.nu>
Fri, 6 May 2005 12:55:15 +0000 (12:55 +0000)
action.cpp
action.h

index 2508b5c9fcdbd7cd56a1f6c3414a41977eb59ed4..695c74fb71d4b7b6d8e764e186a730ad4354317f 100644 (file)
@@ -1,3 +1,21 @@
 #include "action.h"
 
+Action::Action(std::string executable, literals preconditions, literals effects){
+       _execututable = executable;
+       _preconditions = preconditions;
+       _effects = effects;
+}
 
+
+const literals Action::effects(){
+       return _effects;
+}
+
+const literals Action::preconditions(){
+       return _preconditions;
+}
+
+int Action::execute(){
+
+       return 0;
+}
index 4550771568b6b7a73d7286db32751d147126042d..60206a391c76119853c3beaf9fbde219f2f284c8 100644 (file)
--- a/action.h
+++ b/action.h
@@ -1,13 +1,19 @@
 #ifndef __ACTION_H__
 #define __ACTION_H__
 
+typedef literals std::vector<string>;
+
 class Action {
+       public:
+               Action(std::string executable, literals preconditions, literals effects);
+               const literals effects() const;
+               const literals preconditions() const;
+               int execute() const;
 
        protected:
-               std::string executable;
-               std::vector<string> preconditions;
-               std::vector<string> effects;
-
+               std::string _executable;
+               literals _preconditions;
+               literals _effects;
 };
 
 #endif