X-Git-Url: https://git.llucax.com/z.facultad/75.52/treemulator.git/blobdiff_plain/f4c34c38f2c62087bbf7e0d6e618660f0e48023e..a7b40a39a402b6f4cbcf1b1a175c0e357704d43f:/src/btree.h?ds=sidebyside diff --git a/src/btree.h b/src/btree.h index cf9cc30..f888eea 100644 --- a/src/btree.h +++ b/src/btree.h @@ -140,7 +140,7 @@ class BTree { */ BTreeFindResult *FindKey (const Clave &k); - protected: + //protected: /* Funciones de Alta */ Clave* AddKeyR (const Clave *k, uint node_num, uint &left_child, uint &right_child); Clave* AddKeyOtherR (const Clave *k, uint node_num, uint &left_child, uint &right_child); @@ -149,9 +149,11 @@ class BTree { /* Funciones de Baja */ void DelKeyR (BTreeData *k, uint node, uint padre); void DelKeyFromLeaf (Clave *k, uint node_num, uint padre); - void DelKeyFromOther (const Clave &k, BTreeFindResult *r); - void FindB (uint node_num, uint padre, uint &left, uint &right); + void DelKeyFromNode (Clave *k, uint node_num, uint padre, uint left, uint right); + void FindBrothers (uint node_num, uint padre, uint &left, uint &right); + Clave *ReplaceKeyInFather (uint node_num, uint padre, Clave *k); Clave *GetKey (uint node_num, char maxmin); + void JoinNodes (uint node1, uint node2, uint padre, int); /* Funciones de Búsqueda */ BTreeFindResult *FindKeyR (const Clave *k, uint node); @@ -173,6 +175,10 @@ class BTree { void WriteKeys (uchar *node, BTreeNodeHeader &node_header, std::list &keys); void DeleteKeys (std::list &keys); + /* Abreviacion de Claves */ + void AbrevKey (std::list &lst); + void DeAbrevKey (std::list &lst); + std::string filename; BTreeFileHeader header; int key_type;