std::cout << "__NO__ hay lugar para meter la clave" << std::endl;
}
+
+ WriteKeys (root, root_header, node_keys);
+ WriteNodoHeader (root, &root_header);
+ write_block (root, 0);
+
delete [] root;
}
return keys;
}
+void BTree::WriteKeys (uchar *node, BTreeNodeHeader &node_header, std::list<Clave *> &keys)
+{
+ std::list<Clave *>::iterator it = keys.begin ();
+
+ node += sizeof (BTreeNodeHeader);
+
+ while (it != keys.end ()) {
+ Clave *c = (*it);
+ memcpy (node, c->ToArray(), c->Size ());
+ node += c->Size ();
+ it++;
+ }
+
+ /* TODO : incrementar node_header.item_count aca o fuera de este metodo? */
+}