X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;f=node.h;h=28a828728e9109a73181baf6fde79d98198ed908;hb=fa83da5b8474e7308bae9865175c3c228976a1dc;hp=db9fb09663fbcff9fa99d797269a84ff1286e630;hpb=066d3c3659f52a73a0344c3e08989cc73a15164b;p=popboot.git diff --git a/node.h b/node.h index db9fb09..28a8287 100644 --- a/node.h +++ b/node.h @@ -2,17 +2,38 @@ #define __node_h__ #include +#include #include "action.h" class Node { - Node(Action action, std::vector children); - - addChild(Node& node); + public: + 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); + bool executed() const; + const Literals& effects() const; protected: Action _action; - std::vector _children; + std::vector _children; + Preconditions _preconditions; + bool _executed; + Literals _effects; +}; + +class StartNode :public Node { + public: + StartNode(const Literals& init); +}; + +class EndNode :public Node { + public: + EndNode(const Literals& goal); }; #endif