X-Git-Url: https://git.llucax.com/z.facultad/75.52/treemulator.git/blobdiff_plain/2ec2ca34d681cc605142fabcd03efce9a73db76e..555cf8e7b36faa768e40d09665781c468424a91c:/src/btree_data.cpp?ds=inline diff --git a/src/btree_data.cpp b/src/btree_data.cpp index b74427b..1adeb83 100644 --- a/src/btree_data.cpp +++ b/src/btree_data.cpp @@ -70,7 +70,7 @@ bool BTreeData::Abrev (BTreeData *anterior) if (anterior == NULL) return false; ClaveVariable *c = (ClaveVariable *)clave; - return c->Abrev (dynamic_cast(anterior->getClave ())); + return c->Abrev (dynamic_cast(anterior->GetKey ())); } bool BTreeData::DesAbrev (BTreeData *anterior) @@ -78,11 +78,12 @@ bool BTreeData::DesAbrev (BTreeData *anterior) if (anterior == NULL) return false; ClaveVariable *c = (ClaveVariable *)clave; - return c->DesAbrev (dynamic_cast(anterior->getClave ())); + return c->DesAbrev (dynamic_cast(anterior->GetKey ())); } BTreeLeafData::BTreeLeafData (uchar *node, int key_type) { + hijo = 0; if (key_type == BTree::KEY_FIXED) clave = new ClaveFija (node); else @@ -114,6 +115,7 @@ uchar* BTreeLeafData::ToArray () const BTreeChildData::BTreeChildData (uchar *node) { memcpy (&hijo, node, sizeof (uint)); + clave = NULL; } BTreeChildData::~BTreeChildData () @@ -132,3 +134,7 @@ uchar* BTreeChildData::ToArray () const return out; } +bool BTreeChildData::operator < (const BTreeData &data) const +{ + return false; +}