delete [] node;
}
+BTree::BTree (const std::string &name)
+{
+ fp = fopen (name.c_str(), "rb+");
+ if (!fp) {
+ /* TODO : mandar una exception ? */
+ return;
+ }
+ ReadFileHeader ();
+}
+
BTree::~BTree ()
{
fclose (fp);
}
+void BTree::ReadFileHeader ()
+{
+ fseek (fp, 0L, SEEK_SET);
+ fread (&header, 1, sizeof (BTreeFileHeader), fp);
+}
+
void BTree::WriteFileHeader ()
{
fseek (fp, 0L, SEEK_SET);