X-Git-Url: https://git.llucax.com/z.facultad/75.52/treemulator.git/blobdiff_plain/8699d7e1ccbda4282f8ba693422f337be31d100b..6eca7410b5a4c3c5225d852dd1d1ce9b74a7f4cd:/src/btree_data.h?ds=sidebyside diff --git a/src/btree_data.h b/src/btree_data.h index b07f6f5..5bbfc27 100644 --- a/src/btree_data.h +++ b/src/btree_data.h @@ -19,13 +19,14 @@ class BTreeData { virtual uchar *ToArray () const; Clave* getClave () { return clave; } + uint getChild () { return hijo; } bool operator < (const BTreeData &data) const; virtual operator std::string () const { std::string out = (*clave); std::stringstream ss; - ss << "(" << out << ") "; - ss << "[" << hijo << "]"; + ss << "(" << out ; + ss << ")" << "[" << hijo << "]"; ss >> out; return out; } @@ -53,7 +54,7 @@ class BTreeLeafData:public BTreeData { class BTreeChildData:public BTreeData { public: - BTreeChildData (uint child):BTreeData () { hijo = child; } + BTreeChildData (uint child):BTreeData () { hijo = child; clave = NULL; } BTreeChildData (uchar *node); virtual ~BTreeChildData ();