if ((*data) < (*datait))
/* Me pase, lo agrego aca! */
break;
- it++;
}
node_keys.insert (it, data);
WriteKeys (node, node_header, node_keys);
{
std::list<BTreeData *> keys;
node += sizeof (BTreeNodeHeader);
+ uint count = node_header.item_count;
if (node_header.item_count == 0) return keys;
BTreeChildData *d = new BTreeChildData (node);
node += d->Size ();
keys.push_back (d);
+ count--;
}
- for (uint i=0; i<node_header.item_count; i++) {
+ for (uint i=0; i<count; i++) {
/* TODO : El tipo de clave deberia ser usado
* dependiendo de algun dato en el header del
* arbol
std::cout << "Items : " << node_header.item_count << std::endl;
std::cout << "Free : " << node_header.free_space << " (" << (header.block_size - sizeof (BTreeNodeHeader)) << ")" << std::endl;
while (it != node_keys.end ()) {
- std::string s = *(*it);
- std::cout << s << " ";
- it++;
+ std::string s = (*it);
+ std::cout << "(" << s << ") ";
}
std::cout << std::endl;