X-Git-Url: https://git.llucax.com/z.facultad/75.52/treemulator.git/blobdiff_plain/1f2e83ab78a55bc0730bdd507c4fd64482fb0846..e6100aeea161cb8ca20b42243f33c7eea1dd3a2e:/viewer/view_btree.h diff --git a/viewer/view_btree.h b/viewer/view_btree.h index 529dab2..f4e3c47 100644 --- a/viewer/view_btree.h +++ b/viewer/view_btree.h @@ -4,6 +4,7 @@ #include #include +#include #include "btree.h" #include "view_node.h" @@ -14,7 +15,14 @@ class ViewNode; class ViewBTree : public Canvas::Group, public BTree { public: - ViewBTree (Canvas::Group *parent, std::string filename, uint block_size, int type); + ViewBTree (Canvas::Group *parent, std::string filename, uint block_size, int tree_type, int type); + ViewBTree (Canvas::Group *parent, const std::string filename); + + static ViewBTree* Open (const std::string &filename); + + void Clear (); + void HighliteKey (Clave &k); + void GoBack (); static double byte_to_pixels; static double node_width; @@ -30,6 +38,8 @@ class ViewBTree : public Canvas::Group, public BTree { /* Control para no poner 2 veces un nodo */ /* Un nodo que quiera ser puesto 2 veces es un bug :) */ std::map node_placed; + std::stack back; + uint last_visited; public: void AddNode (uint num, uint padre = 0);