STXXL
1.4-dev
|
Buffered writing of values. New Blocks are allocated as needed.
Public Types | |
enum | { block_size = block_type::size, subblock_size = subblock_type::size } |
typedef BidContainer | bid_container_type |
typedef BlockType | block_type |
typedef block_type::value_type | subblock_type |
typedef subblock_type::value_type | value_type |
typedef stxxl::buffered_writer < block_type > | writer_type |
Public Member Functions | |
buffered_writer (bid_container_type *c, int_type buffer_size, int_type batch_size) | |
Create a new buffered writer. More... | |
~buffered_writer () | |
void | append (const value_type &value) |
Write given value. More... | |
template<class StreamType > | |
void | append_from_stream (StreamType &stream) |
Write all values from given stream. More... | |
void | finish_subblock () |
Continue writing at the beginning of the next subblock. TODO more efficient. More... | |
void | flush () |
Flushes not yet written blocks. More... | |
internal_size_type | i_block () |
Index of current block. More... | |
internal_size_type | i_subblock () |
Index of current subblock. More... | |
Private Attributes | |
bid_container_type * | bids_ |
sequence of allocated blocks (to be expanded as needed) More... | |
block_type * | block_ |
current buffer-block More... | |
unsigned_type | i_block_ |
current block's index More... | |
unsigned_type | i_value_ |
current value's index in the range of [0..#values per block[ More... | |
unsigned_type | increase_ |
number of blocks to allocate in a row More... | |
writer_type | writer_ |
buffered writer More... | |
Additional Inherited Members | |
![]() | |
noncopyable () | |
typedef BidContainer stxxl::hash_map::buffered_writer< BlockType, BidContainer >::bid_container_type |
typedef BlockType stxxl::hash_map::buffered_writer< BlockType, BidContainer >::block_type |
typedef block_type::value_type stxxl::hash_map::buffered_writer< BlockType, BidContainer >::subblock_type |
typedef subblock_type::value_type stxxl::hash_map::buffered_writer< BlockType, BidContainer >::value_type |
typedef stxxl::buffered_writer<block_type> stxxl::hash_map::buffered_writer< BlockType, BidContainer >::writer_type |
anonymous enum |
|
inline |
|
inline |
|
inline |
Write given value.
Definition at line 367 of file util.h.
References stxxl::singleton< block_manager >::get_instance(), and stxxl::block_manager::new_blocks().
|
inline |
|
inline |
|
inline |
Flushes not yet written blocks.
Definition at line 402 of file util.h.
References stxxl::singleton< block_manager >::get_instance(), and stxxl::block_manager::new_blocks().
|
inline |
|
inline |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |