X-Git-Url: https://ruin.nu/git/?p=popboot.git;a=blobdiff_plain;f=node.h;h=cfa02223854a9d66dfad039fc2fcd0deb57e2a76;hp=7bcf3a8c371338375df7d42604ce5d0ddf98ce74;hb=3dadaa088d9fff7ca05cbb297f3d7e88179faccb;hpb=13441470b3b895e08b4165e2154665863f1c3b33 diff --git a/node.h b/node.h index 7bcf3a8..cfa0222 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); + bool executed() const; + const literals& effects() const; protected: Action _action; std::vector _children; literals _preconditions; + bool _executed; + literals _effects; +}; + +class StartNode : Node { + public: + StartNode(const literals& init); +}; + +class EndNode : Node { + public: + EndNode(const literals& goal); }; #endif