BTreeLeafData::BTreeLeafData (uchar *node, int key_type)
{
+ hijo = 0;
if (key_type == BTree::KEY_FIXED)
clave = new ClaveFija (node);
else
BTreeChildData::BTreeChildData (uchar *node)
{
memcpy (&hijo, node, sizeof (uint));
+ clave = NULL;
}
BTreeChildData::~BTreeChildData ()
return out;
}
+bool BTreeChildData::operator < (const BTreeData &data) const
+{
+ return false;
+}
virtual operator std::string () const {
std::string out = (*clave);
std::stringstream ss;
- ss << "(" << out ;
+ ss << "(";
+ ss << out;
ss << ")" << "[" << hijo << "]";
- ss >> out;
- return out;
+ return ss.str ();
}
protected:
Clave *clave;
/** Dato a guardar en las hojas */
class BTreeLeafData:public BTreeData {
public:
- BTreeLeafData (Clave *k) { clave = k; }
+ BTreeLeafData (Clave *k) { clave = k; hijo = 0; }
BTreeLeafData (uchar *node, int key_type);
virtual ~BTreeLeafData ();
virtual uint Size () const;
virtual uchar *ToArray () const;
+ bool operator < (const BTreeData &data) const;
virtual operator std::string () const {
std::string out;
std::stringstream ss;