X-Git-Url: https://git.llucax.com/z.facultad/75.52/treemulator.git/blobdiff_plain/e642d903800bc569707379b4a7f48293077d3c99..44c4c40e48cc4a72e81e0af80842738c45d6116f:/src/btree.h?ds=inline diff --git a/src/btree.h b/src/btree.h index 06a6941..999d798 100644 --- a/src/btree.h +++ b/src/btree.h @@ -92,19 +92,20 @@ class BTree { void AddKey (const Clave &k); void DelKey (const Clave &k); - private: - Clave* AddKeyR (const Clave *k, uint node_num); + protected: + Clave* AddKeyR (const Clave *k, uint node_num, uint &left_child, uint &right_child); void WriteFileHeader (); void WriteBlock (uchar *block, uint num); uchar *ReadBlock (uint num); + uchar *NewBlock (uint &num); void ReadNodoHeader (uchar *node, BTreeNodeHeader *header); void WriteNodoHeader (uchar *node, BTreeNodeHeader *header); - std::list ReadKeys (uchar *node, BTreeNodeHeader &node_header); - void WriteKeys (uchar *node, BTreeNodeHeader &node_header, std::list &keys); + std::list ReadKeys (uchar *node, BTreeNodeHeader &node_header); + void WriteKeys (uchar *node, BTreeNodeHeader &node_header, std::list &keys); std::string filename; BTreeFileHeader header;