]> ruin.nu Git - popboot.git/blobdiff - node.h
delete remaining actions
[popboot.git] / node.h
diff --git a/node.h b/node.h
index cfa02223854a9d66dfad039fc2fcd0deb57e2a76..272bee93bc565977f03a9499f8d02f8255ed7831 100644 (file)
--- a/node.h
+++ b/node.h
@@ -8,32 +8,35 @@
 class Node {
 
        public:
-               Node(const Action& action);
+               Node(const Action* action);
                Node();
                Node(const Node& node);
                virtual ~Node(){}
                void addChild(Node* node);
-               const Action& action() const;
-               void execute(const literals& effects);
+               const Action* action() const;
+               void execute(const Literals& effects);
                bool executed() const;
-               const literals& effects() const;
+               const Literals& effects() const;
+               void satisfyCondition(std::string effect);
 
        protected:
-               Action _action;
+               const Action* _action;
                std::vector<Node*> _children;
-               literals _preconditions;
+               Preconditions _preconditions;
                bool _executed;
-               literals _effects;
+               Literals _effects;
 };
 
-class StartNode : Node {
+class StartNode :public Node {
        public:
-               StartNode(const literals& init);
+               StartNode(const Literals& init);
+               ~StartNode(){delete _action;}
 };
 
-class EndNode : Node {
+class EndNode :public Node {
        public:
-               EndNode(const literals& goal);
+               EndNode(const Literals& goal);
+               ~EndNode(){delete _action;}
 };
 
 #endif