/** Dato a guardar en los nodos */
class BTreeData {
public:
+ 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;
};
/** Dato a guardar en las hojas */
-class BTreeLeafData:BTreeData {
+class BTreeLeafData:public BTreeData {
public:
+ BTreeLeafData (Clave *k):BTreeData () { clave = k; }
+ BTreeLeafData (uchar *node) { clave = new ClaveFija (node); }
virtual ~BTreeLeafData ();
virtual uint Size ();