00001 #ifndef PATH_CLASS
00002 #define PATH_CLASS
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #include "node_dll.h"
00019
00020 namespace nodes {
00021
00022
00023 class node;
00024 class path_node_stack;
00025
00027
00033 class NODES_CLASS_STYLE path
00034 {
00035 public:
00036 path(const node *root);
00038
00041 path(const path &to_copy);
00042
00043 ~path();
00044
00045 path &operator =(const path &to_copy);
00046
00047 int size() const;
00049
00050 node *root() const;
00052
00053 node *current() const;
00054 node *follow() const;
00056
00058 node *pop();
00060
00063 outcome push(node *to_add);
00065
00068 outcome push(int index);
00070
00073 bool generate_path(node *to_locate, path &to_follow) const;
00075
00079 node *operator [] (int index) const;
00081
00082 private:
00083 path_node_stack *_stack;
00084 };
00085
00086 }
00087
00088 #endif
00089