]> ruin.nu Git - popboot.git/blobdiff - node.h
delete remaining actions
[popboot.git] / node.h
diff --git a/node.h b/node.h
index 28a828728e9109a73181baf6fde79d98198ed908..272bee93bc565977f03a9499f8d02f8255ed7831 100644 (file)
--- a/node.h
+++ b/node.h
@@ -8,18 +8,19 @@
 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(bool strict, const Literals& effects);
+               const Action* action() const;
+               void execute(const Literals& effects);
                bool executed() const;
                const Literals& effects() const;
+               void satisfyCondition(std::string effect);
 
        protected:
-               Action _action;
+               const Action* _action;
                std::vector<Node*> _children;
                Preconditions _preconditions;
                bool _executed;
@@ -29,11 +30,13 @@ class Node {
 class StartNode :public Node {
        public:
                StartNode(const Literals& init);
+               ~StartNode(){delete _action;}
 };
 
 class EndNode :public Node {
        public:
                EndNode(const Literals& goal);
+               ~EndNode(){delete _action;}
 };
 
 #endif