Public Types | Public Member Functions

typed_block< RawSize_, T_, NRef_, InfoType_ > Class Template Reference
[Block management layer]

Block containing elements of fixed length. More...

#include <mng.h>

Inheritance diagram for typed_block< RawSize_, T_, NRef_, InfoType_ >:
Inheritance graph
[legend]
Collaboration diagram for typed_block< RawSize_, T_, NRef_, InfoType_ >:
Collaboration graph
[legend]

List of all members.

Public Types

enum  { raw_size = RawSize_, size = block_w_info<T_ , size = block_w_info<T_ }

Public Member Functions

request_ptr write (const BID< raw_size > &bid, completion_handler on_cmpl=default_completion_handler())
 Writes block to the disk(s) !
request_ptr read (const BID< raw_size > &bid, completion_handler on_cmpl=default_completion_handler())
 Reads block from the disk(s) !

Detailed Description

template<unsigned RawSize_, class T_, unsigned NRef_ = 0, class InfoType_ = void>
class typed_block< RawSize_, T_, NRef_, InfoType_ >

Block containing elements of fixed length.

Template parameters:

The data array of type T_ is contained in the parent class stxxl::element_block, see related information there. The BID array of references is contained in the parent class stxxl::block_w_bids, see related information there. The "per block information" is contained in the parent class stxxl::block_w_info, see related information there.

Warning:
If RawSize_ > 2MB object(s) of this type can not be allocated on the stack (as a function variable for example), because Linux POSIX library limits the stack size for the main thread to (2MB - system page size)

Member Enumeration Documentation

template<unsigned RawSize_, class T_, unsigned NRef_ = 0, class InfoType_ = void>
anonymous enum
Enumerator:
raw_size 

size of block in bytes

size 

number of elements in block

size 

number of elements in block


Member Function Documentation

template<unsigned RawSize_, class T_, unsigned NRef_ = 0, class InfoType_ = void>
request_ptr typed_block< RawSize_, T_, NRef_, InfoType_ >::read ( const BID< raw_size > &  bid,
completion_handler  on_cmpl = default_completion_handler() 
) [inline]

Reads block from the disk(s) !

Parameters:
bid block identifier, points the file(disk) and position !
on_cmpl completion handler !
Returns:
pointer_ptr object to track status I/O operation after the call
template<unsigned RawSize_, class T_, unsigned NRef_ = 0, class InfoType_ = void>
request_ptr typed_block< RawSize_, T_, NRef_, InfoType_ >::write ( const BID< raw_size > &  bid,
completion_handler  on_cmpl = default_completion_handler() 
) [inline]

Writes block to the disk(s) !

Parameters:
bid block identifier, points the file(disk) and position !
on_cmpl completion handler !
Returns:
pointer_ptr object to track status I/O operation after the call

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