X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;f=node.h;h=77a9d7bbefce9d7265d870e2f80c9b5fb400dfc7;hb=dc4211bc1dc77ba3f1a71ec5737c61731614004b;hp=31568fc5a6b910ec44a91b7f71c97e0a2d4ab366;hpb=b177aeec472c3941b39b874a83883ff87a41919c;p=popboot.git diff --git a/node.h b/node.h index 31568fc..77a9d7b 100644 --- a/node.h +++ b/node.h @@ -2,18 +2,39 @@ #define __node_h__ #include +#include #include "action.h" class Node { public: - Node(Action action); + Node(const Action& action); + Node(); + Node(const Node& node); + virtual ~Node(){} void addChild(Node* node); - Action action(); + const Action& action() const; + void execute(const Literals& effects); + bool executed() const; + const Literals& effects() const; + void satisfyCondition(std::string effect); protected: Action _action; 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