X-Git-Url: https://git.llucax.com/z.facultad/75.52/treemulator.git/blobdiff_plain/56b4eba70b4efa0149bab92cfbe5e83ecfa5524b..2ab8041933e77875de62bc73e76febc528af258e:/src/btree.cpp?ds=inline diff --git a/src/btree.cpp b/src/btree.cpp index 1bbb755..66f4026 100644 --- a/src/btree.cpp +++ b/src/btree.cpp @@ -1,8 +1,9 @@ #include "btree.h" -BTree::BTree (const std::string &name, unsigned int block_size, bool create_new_file) +BTree::BTree (const std::string &name, unsigned int block_size, int kt, bool create_new_file) { + key_type = kt; uchar *node; BTreeNodeHeader nh; @@ -417,9 +418,9 @@ std::list BTree::ReadKeys (uchar *node, BTreeNodeHeader &node_heade /* TODO : Detectar si estoy en una hoja */ BTreeData *data; if (node_header.level == 0) { - data = new BTreeLeafData (node); + data = new BTreeLeafData (node, key_type); } else { - data = new BTreeData (node); + data = new BTreeData (node, key_type); } node += data->Size (); keys.push_back (data);