8 #include "clave_fija.h"
10 /** Dato a guardar en los nodos */
14 BTreeData (uchar *node);
15 BTreeData (Clave *k, uint child);
16 virtual ~BTreeData ();
18 virtual uint Size () const;
19 virtual uchar *ToArray () const;
21 Clave* getClave () { return clave; }
22 uint getChild () { return hijo; }
23 void setChild (uint c) { hijo = c; }
25 bool operator < (const BTreeData &data) const;
26 virtual operator std::string () const {
27 std::string out = (*clave);
30 ss << ")" << "[" << hijo << "]";
39 /** Dato a guardar en las hojas */
40 class BTreeLeafData:public BTreeData {
42 BTreeLeafData (Clave *k) { clave = k; }
43 BTreeLeafData (uchar *node) { clave = new ClaveFija (node); }
44 virtual ~BTreeLeafData ();
46 virtual uint Size () const;
47 virtual uchar *ToArray () const;
48 virtual operator std::string () const {
56 class BTreeChildData:public BTreeData {
58 BTreeChildData (uint child):BTreeData () { hijo = child; clave = NULL; }
59 BTreeChildData (uchar *node);
60 virtual ~BTreeChildData ();
62 virtual uint Size () const;
63 virtual uchar *ToArray () const;
64 virtual operator std::string () const {
67 ss << "|" << hijo << "|";