#ifndef TREE_H #define TREE_H #include using std::string; class Node { private: Node*up; Node*next; Node*prev; Node*first; Node*last; void link (Node*a, Node*b, Node*c); //b novy prvek public: string name; Node*getUp() {return up;} Node*getNext() {return next;} Node*getPrev() {return prev;} Node*getFirst( ){return first;} Node*getLast() {return last;} void linkNext (Node*p); void linkPrev (Node*p); void linkFirst (Node*p); void linkLast (Node*p); void unlink (); void print (int level = 1); int count (); int height (); Node * find (string s); Node(string name0 = "") : up (nullptr), next (nullptr), prev (nullptr), first (nullptr), last (nullptr), name (name0) { } ~ Node (); }; #endif // TREE_H