X-Git-Url: https://git.llucax.com/z.facultad/75.52/treemulator.git/blobdiff_plain/2c1d3ea3cf9a25e8f957587d4a1581fc292c831b..8699d7e1ccbda4282f8ba693422f337be31d100b:/src/btree.h diff --git a/src/btree.h b/src/btree.h index 467ed6f..023c5d7 100644 --- a/src/btree.h +++ b/src/btree.h @@ -93,18 +93,19 @@ class BTree { void DelKey (const Clave &k); private: - Clave* AddKeyR (const Clave *k, uint node_num); + 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; @@ -114,6 +115,10 @@ class BTree { * \TODO Ver si vale la pena */ FILE *fp; + + + /* DEBUG */ + void PrintNode (uint num); }; #endif // _B_TREE_H