X-Git-Url: https://git.llucax.com/z.facultad/75.52/treemulator.git/blobdiff_plain/226df952388af8a4955b26b1ef0b5e1784103bf5..52d9e098f15ad0ca70f11b4549f3d55f55a22a83:/src/btree_data.h diff --git a/src/btree_data.h b/src/btree_data.h index b590040..44a3a77 100644 --- a/src/btree_data.h +++ b/src/btree_data.h @@ -10,12 +10,22 @@ /** Dato a guardar en los nodos */ class BTreeData { public: - BTreeData () {} + BTreeData () { clave = NULL; } BTreeData (uchar *node); virtual ~BTreeData (); virtual uint Size (); virtual uchar *ToArray (); + + Clave* getClave () { return clave; } + + bool operator < (const BTreeData &data) const; + virtual operator std::string () const { + if (clave) { + return (*clave); + } + return "NoKey"; + } protected: Clave *clave; uint hijo;