X-Git-Url: https://git.llucax.com/z.facultad/75.52/treemulator.git/blobdiff_plain/fd68ec89fabf4a95e4ebba38fe54041a9ad6d667..280cd402a11777c2f428e110e195280d42d30aa5:/src/btree_data.h?ds=sidebyside diff --git a/src/btree_data.h b/src/btree_data.h index 53af1fc..b7f457a 100644 --- a/src/btree_data.h +++ b/src/btree_data.h @@ -61,10 +61,10 @@ class BTreeData { virtual operator std::string () const { std::string out = (*clave); std::stringstream ss; - ss << "(" << out ; + ss << "("; + ss << out; ss << ")" << "[" << hijo << "]"; - ss >> out; - return out; + return ss.str (); } protected: Clave *clave; @@ -74,7 +74,7 @@ class BTreeData { /** Dato a guardar en las hojas */ class BTreeLeafData:public BTreeData { public: - BTreeLeafData (Clave *k) { clave = k; } + BTreeLeafData (Clave *k) { clave = k; hijo = 0; } BTreeLeafData (uchar *node, int key_type); virtual ~BTreeLeafData (); @@ -96,6 +96,7 @@ class BTreeChildData:public BTreeData { virtual uint Size () const; virtual uchar *ToArray () const; + bool operator < (const BTreeData &data) const; virtual operator std::string () const { std::string out; std::stringstream ss;