B-Trees
B-tree implementation in C++ to index documents based on numerical id's and title strings.
|
Union for reading and writing blocks containing serialized data. More...
#include <Block.hpp>
Public Attributes | |
char | padding [BlockSize] |
Byte array used to guarantee that the instance will have at least BLOCK_SIZE bytes. More... | |
T | var |
Member used to access the wrapped value. More... | |
Union for reading and writing blocks containing serialized data.
Wraps a T-type value within a block-sized memory space. T must be a POD (Plain Old Data type).
The condition sizeof(T) <= BLOCK_SIZE
must be satisfied. Otherwise, the stored value will be bigger than the block size and reading and writing will be compromised.
This union is used to guarantee that written data in the files will always individually occupy exactly one block in size. The remaining unused bytes will have undefined values in the file.
After using Block instances to write a file, use Block again when reading the file.
T | Type of the data to be stored within the block |
char Block< T, BlockSize >::padding[BlockSize] |
Byte array used to guarantee that the instance will have at least BLOCK_SIZE
bytes.
T Block< T, BlockSize >::var |
Member used to access the wrapped value.