]> ruin.nu Git - popboot.git/blobdiff - action.h
only execute an action when all preconditions are are true
[popboot.git] / action.h
index 4550771568b6b7a73d7286db32751d147126042d..35119c35c7d245615e10ab6c857d0e02702d089e 100644 (file)
--- a/action.h
+++ b/action.h
@@ -1,13 +1,24 @@
 #ifndef __ACTION_H__
 #define __ACTION_H__
 
+#include <vector>
+#include <string>
+
+typedef std::vector<std::string> literals;
+
 class Action {
+       public:
+               Action(std::string executable, literals preconditions, literals effects);
+               Action(const Action& action);
+               Action(){};
+               literals effects() 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