Thrill
0.1
|
Block identifier class.
Stores block identity, given by file and offset within the file
#include <bid.hpp>
Public Member Functions | |
BID ()=default | |
BID (file *s, const external_size_type &o) | |
template<size_t BlockSize> | |
BID (const BID< BlockSize > &obj) | |
construction from another block size More... | |
bool | is_managed () const |
bool | operator!= (const BID< Size > &b) const |
template<size_t BlockSize> | |
BID & | operator= (const BID< BlockSize > &obj) |
assignment from another block size More... | |
bool | operator== (const BID< Size > &b) const |
request_ptr | read (void *data, size_t data_size, completion_handler on_complete=completion_handler()) |
Reads data from the disk(s). More... | |
bool | valid () const |
request_ptr | write (void *data, size_t data_size, completion_handler on_complete=completion_handler()) |
Writes data to the disk(s). More... | |
Public Attributes | |
external_size_type | offset = 0 |
offset within the file of the block (uint64_t) More... | |
file * | storage = nullptr |
pointer to the file of the block More... | |
Static Public Attributes | |
static constexpr size_t | size = Size |
Block size. More... | |
static constexpr size_t | t_size = Size |
Blocks size, given by the parameter. More... | |
|
default |
|
inline |
|
inline |
Definition at line 75 of file bid.hpp.
Referenced by block_manager::delete_block().
|
inline |
Definition at line 94 of file bid.hpp.
Referenced by BID< raw_size >::operator!=(), and BID< 0 >::operator!=().
|
inline |
|
inline |
Definition at line 70 of file bid.hpp.
Referenced by block_manager::delete_block().
|
inline |
external_size_type offset = 0 |
offset within the file of the block (uint64_t)
Definition at line 50 of file bid.hpp.
Referenced by block_manager::delete_block(), disk_block_allocator::delete_block(), BID< raw_size >::operator=(), BID< raw_size >::operator==(), typed_block< RawSize, Type, NRef, MetaInfoType >::read(), and typed_block< RawSize, Type, NRef, MetaInfoType >::write().
|
static |
Block size.
Definition at line 43 of file bid.hpp.
Referenced by block_manager::delete_block(), and disk_block_allocator::delete_block().
file* storage = nullptr |
pointer to the file of the block
Definition at line 48 of file bid.hpp.
Referenced by block_manager::delete_block(), BID< raw_size >::operator=(), BID< raw_size >::operator==(), typed_block< RawSize, Type, NRef, MetaInfoType >::read(), and typed_block< RawSize, Type, NRef, MetaInfoType >::write().
|
static |