Stxxl  1.3.2
Public Types | Public Member Functions | Protected Attributes | List of all members
buf_ostream< BlkTp_, BIDIteratorTp_ > Class Template Reference

Buffered output stream. More...

#include <buf_ostream.h>

Public Types

typedef block_type::const_reference const_reference
 
typedef block_type::reference reference
 
typedef buf_ostream
< block_type,
bid_iterator_type > 
_Self
 

Public Member Functions

 buf_ostream (bid_iterator_type first_bid, int_type nbuffers)
 Constructs output stream object. More...
 
_Selfoperator<< (const_reference record)
 Output stream operator, writes out record. More...
 
reference current ()
 Returns reference to the current record. More...
 
reference operator* ()
 Returns reference to the current record. More...
 
_Selfoperator++ ()
 Moves to the next record in the stream. More...
 
virtual ~buf_ostream ()
 Deallocates internal objects. More...
 

Protected Attributes

buffered_writer< block_type > writer
 
bid_iterator_type current_bid
 
int_type current_elem
 
block_type * current_blk
 

Detailed Description

template<typename BlkTp_, typename BIDIteratorTp_>
class buf_ostream< BlkTp_, BIDIteratorTp_ >

Buffered output stream.

Writes data records to the stream of blocks.

Remarks
Writing performed in the background, i.e. with overlapping of I/O and computation

Constructor & Destructor Documentation

template<typename BlkTp_, typename BIDIteratorTp_>
buf_ostream< BlkTp_, BIDIteratorTp_ >::buf_ostream ( bid_iterator_type  first_bid,
int_type  nbuffers 
)
inline

Constructs output stream object.

Parameters
first_bidbid_iterator pointing to the first block of the stream
nbuffersnumber of buffers for internal use
template<typename BlkTp_, typename BIDIteratorTp_>
virtual buf_ostream< BlkTp_, BIDIteratorTp_ >::~buf_ostream ( )
inlinevirtual

Deallocates internal objects.

Member Function Documentation

template<typename BlkTp_, typename BIDIteratorTp_>
reference buf_ostream< BlkTp_, BIDIteratorTp_ >::current ( )
inline

Returns reference to the current record.

Returns
reference to the current record
template<typename BlkTp_, typename BIDIteratorTp_>
reference buf_ostream< BlkTp_, BIDIteratorTp_ >::operator* ( )
inline

Returns reference to the current record.

Returns
reference to the current record
template<typename BlkTp_, typename BIDIteratorTp_>
_Self& buf_ostream< BlkTp_, BIDIteratorTp_ >::operator++ ( )
inline

Moves to the next record in the stream.

Returns
reference to itself after the advance
template<typename BlkTp_, typename BIDIteratorTp_>
_Self& buf_ostream< BlkTp_, BIDIteratorTp_ >::operator<< ( const_reference  record)
inline

Output stream operator, writes out record.

Parameters
recordconst reference to block record type, containing a value of record to write to the stream
Returns
reference to itself (stream object)

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