X-Git-Url: https://ruin.nu/git/?p=popboot.git;a=blobdiff_plain;f=node.h;h=b49d0109ee042005010a2bae4eb455395db8b57c;hp=7bcf3a8c371338375df7d42604ce5d0ddf98ce74;hb=c9c72023d15decebe700ad0bfe3e8cbac9a85248;hpb=e26fd7b3195576b25ffe51253a391b53f412a650 diff --git a/node.h b/node.h index 7bcf3a8..b49d010 100644 --- a/node.h +++ b/node.h @@ -2,20 +2,38 @@ #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); const Action& action() const; - void execute(const literals& effects); + void execute(const Literals& effects); + bool executed() const; + const Literals& effects() const; protected: Action _action; std::vector _children; - literals _preconditions; + 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