A class to manage writing and reading of block to disk.
More...
#include <tpie/blocks/block_collection.h>
A class to manage writing and reading of block to disk.
Definition at line 39 of file block_collection.h.
tpie::blocks::block_collection::block_collection |
( |
std::string |
fileName, |
|
|
memory_size_type |
blockSize, |
|
|
bool |
writeable |
|
) |
| |
Create a block collection.
- Parameters
-
fileName | the file in which blocks are saved |
blockSize | the size of the blocks |
writeable | indicates whether the collection is writeable |
void tpie::blocks::block_collection::free_block |
( |
block_handle |
handle | ) |
|
frees a block
- Parameters
-
handle | the handle of the block to be freed |
block_handle tpie::blocks::block_collection::get_free_block |
( |
| ) |
|
Allocates a new block.
- Returns
- the handle of the new block
Reads the content of a block from disk.
- Parameters
-
handle | the handle of the block to read |
b | the block to store the content in |
void tpie::blocks::block_collection::write_block |
( |
block_handle |
handle, |
|
|
const block & |
b |
|
) |
| |
Writes the content of a block to disk.
- Parameters
-
handle | the handle of the block to write |
b | the block type in which the content is stored |
The documentation for this class was generated from the following file: