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; }
24 bool operator < (const BTreeData &data) const;
25 virtual operator std::string () const {
26 std::string out = (*clave);
29 ss << ")" << "[" << hijo << "]";
38 /** Dato a guardar en las hojas */
39 class BTreeLeafData:public BTreeData {
41 BTreeLeafData (Clave *k) { clave = k; }
42 BTreeLeafData (uchar *node) { clave = new ClaveFija (node); }
43 virtual ~BTreeLeafData ();
45 virtual uint Size () const;
46 virtual uchar *ToArray () const;
47 virtual operator std::string () const {
55 class BTreeChildData:public BTreeData {
57 BTreeChildData (uint child):BTreeData () { hijo = child; clave = NULL; }
58 BTreeChildData (uchar *node);
59 virtual ~BTreeChildData ();
61 virtual uint Size () const;
62 virtual uchar *ToArray () const;
63 virtual operator std::string () const {
66 ss << "|" << hijo << "|";