From: Ricardo Markiewicz Date: Mon, 12 Sep 2005 21:26:11 +0000 (+0000) Subject: Unifico nomenclatura X-Git-Tag: 1_0-pre1~146 X-Git-Url: https://git.llucax.com/z.facultad/75.52/treemulator.git/commitdiff_plain/dba24fb6aa7fe829dc3e96039e7f717b0ef9668e?ds=sidebyside Unifico nomenclatura --- diff --git a/src/btree.cpp b/src/btree.cpp index 8803d20..c7d3b4b 100644 --- a/src/btree.cpp +++ b/src/btree.cpp @@ -17,7 +17,7 @@ BTree::BTree (const std::string &name, unsigned int block_size, bool create_new_ /* Inicializo el header */ header.block_size = block_size; - write_tree_header (); + WriteFileHeader (); /* Creo el primer bloque vacio */ node = new uchar[block_size]; @@ -26,7 +26,7 @@ BTree::BTree (const std::string &name, unsigned int block_size, bool create_new_ nh.free_space = block_size - sizeof (BTreeNodeHeader); nh.item_count = 0; WriteNodoHeader (node, &nh); - write_block (node, 0); + WriteBlock (node, 0); delete [] node; } @@ -36,13 +36,13 @@ BTree::~BTree () fclose (fp); } -void BTree::write_tree_header () +void BTree::WriteFileHeader () { fseek (fp, 0L, SEEK_SET); fwrite (&header, 1, sizeof (BTreeFileHeader), fp); } -void BTree::write_block (uchar *block, uint num) +void BTree::WriteBlock (uchar *block, uint num) { fseek (fp, num*header.block_size + sizeof (BTreeFileHeader), SEEK_SET); fwrite (block, 1, header.block_size, fp); @@ -69,7 +69,7 @@ void BTree::AddKey (const Clave &k) WriteKeys (root, root_header, node_keys); WriteNodoHeader (root, &root_header); - write_block (root, 0); + WriteBlock (root, 0); delete [] root; } diff --git a/src/btree.h b/src/btree.h index 9dbfc54..7d279f5 100644 --- a/src/btree.h +++ b/src/btree.h @@ -92,9 +92,9 @@ class BTree { void DelKey (const Clave &k); private: - void write_tree_header (); - void write_block (uchar *block, uint num); + void WriteFileHeader (); + void WriteBlock (uchar *block, uint num); uchar *ReadBlock (uint num); void ReadNodoHeader (uchar *node, BTreeNodeHeader *header);