/** Dato a guardar en los nodos */
class BTreeData {
public:
- BTreeData () {}
+ BTreeData () { clave = NULL; }
BTreeData (uchar *node);
virtual ~BTreeData ();
virtual uint Size ();
virtual uchar *ToArray ();
+
+
+ bool operator < (const BTreeData &data) const;
+ virtual operator std::string () const {
+ if (clave) {
+ return (*clave);
+ }
+ return "NoKey";
+ }
protected:
Clave *clave;
uint hijo;
class BTreeLeafData:public BTreeData {
public:
BTreeLeafData (Clave *k):BTreeData () { clave = k; }
+ BTreeLeafData (uchar *node) { clave = new ClaveFija (node); }
virtual ~BTreeLeafData ();
virtual uint Size ();