Thrill  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
BID< 0 > Class Template Reference

Detailed Description

template<>
class foxxll::BID< 0 >

Specialization of block identifier class (BID) for variable size block size.

Stores block identity, given by file, offset within the file, and size of the block

Definition at line 112 of file bid.hpp.

+ Collaboration diagram for BID< 0 >:

#include <bid.hpp>

Public Member Functions

 BID ()=default
 
 BID (file *f, const external_size_type &o, size_t s)
 
bool is_managed () const
 
bool operator!= (const BID< 0 > &b) const
 
bool operator== (const BID< 0 > &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...
 
size_t size = 0
 size of the block in bytes More...
 
filestorage = nullptr
 pointer to the file of the block More...
 

Static Public Attributes

static constexpr size_t t_size = 0
 Blocks size, given by the parameter. More...
 

Constructor & Destructor Documentation

BID ( )
default
BID ( file f,
const external_size_type o,
size_t  s 
)
inline

Definition at line 127 of file bid.hpp.

Member Function Documentation

bool is_managed ( ) const
inline

Definition at line 135 of file bid.hpp.

References file::get_allocator_id(), file::NO_ALLOCATOR, and BID< Size >::storage.

bool operator!= ( const BID< 0 > &  b) const
inline

Definition at line 159 of file bid.hpp.

References BID< Size >::operator==().

bool operator== ( const BID< 0 > &  b) const
inline
request_ptr read ( void *  data,
size_t  data_size,
completion_handler  on_complete = completion_handler() 
)
inline

Reads data from the disk(s).

Definition at line 148 of file bid.hpp.

References file::aread(), BID< Size >::offset, and BID< Size >::storage.

bool valid ( ) const
inline

Definition at line 130 of file bid.hpp.

References BID< Size >::storage.

request_ptr write ( void *  data,
size_t  data_size,
completion_handler  on_complete = completion_handler() 
)
inline

Writes data to the disk(s).

Definition at line 141 of file bid.hpp.

References file::awrite(), BID< Size >::offset, and BID< Size >::storage.

Member Data Documentation

size_t size = 0
constexpr size_t t_size = 0
static

Blocks size, given by the parameter.

Definition at line 123 of file bid.hpp.


The documentation for this class was generated from the following file: