X-Git-Url: https://git.llucax.com/z.facultad/75.52/treemulator.git/blobdiff_plain/6d49476dc3816c4ba38637bc21f44693ca66af32..6d948f6bdab2bb66cd5eb8046ec67ca9b3ab76c1:/src/btree.h?ds=sidebyside diff --git a/src/btree.h b/src/btree.h index 8d86583..081c436 100644 --- a/src/btree.h +++ b/src/btree.h @@ -52,12 +52,12 @@ /* alias para codear menos :) */ /** Encabezado del archivo BTree */ -typedef struct _btree_file_ { +struct BTreeFileHeader { uint block_size; -} BTreeFileHeader; +}; /** Encabezado de un bloque */ -typedef struct _btree_header_ { +struct BTreeNodeHeader { /** Indica a que nivel corresponde un bloque * * nivel == 0 : una hoja @@ -73,7 +73,7 @@ typedef struct _btree_header_ { /** Cantidad de elementos en el nodo */ unsigned int item_count; -} BTreeNodeHeader; +}; /** Crea un nuevo arbol B * @@ -83,7 +83,7 @@ typedef struct _btree_header_ { */ class BTree { public: - BTree (const char *filename, unsigned int block_size, bool create_new_file = false); + BTree (const std::string &filename, unsigned int block_size, bool create_new_file = false); ~BTree (); void AddKey (Clave &k);