B-Trees
B-tree implementation in C++ to index documents based on numerical id's and title strings.
Block.hpp
Go to the documentation of this file.
1 #ifndef _BLOCK_HPP_INCLUDED_
2 #define _BLOCK_HPP_INCLUDED_
3 
5 
9 #define BLOCK_SIZE 4096
10 
12 
29 template <typename T, unsigned int BlockSize = BLOCK_SIZE>
30 union Block {
31  char padding[BlockSize];
32  T var;
33 };
34 
35 #endif // _BLOCK_HPP_INCLUDED_
T var
Member used to access the wrapped value.
Definition: Block.hpp:32
Union for reading and writing blocks containing serialized data.
Definition: Block.hpp:30
char padding[BlockSize]
Byte array used to guarantee that the instance will have at least BLOCK_SIZE bytes.
Definition: Block.hpp:31