13 #ifndef FOXXLL_MNG_BUF_OSTREAM_HEADER 14 #define FOXXLL_MNG_BUF_OSTREAM_HEADER 29 template <
typename BlockType,
typename B
idIteratorType>
51 : writer(nbuffers, nbuffers / 2), current_bid(first_bid),
67 current_blk->elem[current_elem++] = record;
71 current_blk = writer.
write(current_blk, *(current_bid++));
98 current_blk = writer.
write(current_blk, *(current_bid++));
106 while (current_elem != 0)
118 current_blk = writer.
write(current_blk, *(current_bid++));
125 assert(current_elem == 0);
133 #endif // !FOXXLL_MNG_BUF_OSTREAM_HEADER
buffered_writer< block_type > writer
typename block_type::reference reference
block_type * get_free_block()
self_type & fill(const_reference record)
Fill current block with padding and flush.
typename block_type::const_reference const_reference
buf_ostream & operator=(const buf_ostream &)=delete
non-copyable: delete assignment operator
~buf_ostream()
Deallocates internal objects.
buf_ostream(bid_iterator_type first_bid, size_t nbuffers)
self_type & operator<<(const_reference record)
bid_iterator_type current_bid
block_type * write(block_type *filled_block, const bid_type &bid)
BidIteratorType bid_iterator_type