#define __node_h__
#include <vector>
+#include <utility>
#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(bool strict, const Literals& effects);
+ bool executed() const;
+ const Literals& effects() const;
protected:
Action _action;
std::vector<Node*> _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