Public Types | Public Member Functions | Protected Types | Protected Attributes

buf_istream< BlkTp_, BIDIteratorTp_ > Class Template Reference
[Block scheduling sublayer]

Buffered input stream. More...

#include <buf_istream.h>

Collaboration diagram for buf_istream< BlkTp_, BIDIteratorTp_ >:
Collaboration graph
[legend]

List of all members.

Public Types

typedef block_type::reference reference
typedef buf_istream
< block_type,
bid_iterator_type > 
_Self

Public Member Functions

 buf_istream (bid_iterator_type _begin, bid_iterator_type _end, int_type nbuffers)
 Constructs input stream object.
_Selfoperator>> (reference record)
 Input stream operator, reads in record.
reference current ()
 Returns reference to the current record in the stream.
reference operator* ()
 Returns reference to the current record in the stream.
_Selfoperator++ ()
 Moves to the next record in the stream.
virtual ~buf_istream ()
 Frees used internal objects.

Protected Types

typedef block_prefetcher
< block_type,
bid_iterator_type > 
prefetcher_type

Protected Attributes

prefetcher_typeprefetcher
bid_iterator_type begin_bid
bid_iterator_type end_bid
int_type current_elem
block_type * current_blk
int_type * prefetch_seq
bool not_finished

Detailed Description

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

Buffered input stream.

Reads data records from the stream of blocks.

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

Constructor & Destructor Documentation

template<typename BlkTp_ , typename BIDIteratorTp_ >
buf_istream< BlkTp_, BIDIteratorTp_ >::buf_istream ( bid_iterator_type  _begin,
bid_iterator_type  _end,
int_type  nbuffers 
) [inline]

Constructs input stream object.

Parameters:
_begin bid_iterator pointing to the first block of the stream
_end bid_iterator pointing to the ( last + 1 ) block of the stream
nbuffers number of buffers for internal use

References block_prefetcher< block_type, bid_iterator_type >::pull_block().

template<typename BlkTp_ , typename BIDIteratorTp_ >
virtual buf_istream< BlkTp_, BIDIteratorTp_ >::~buf_istream (  )  [inline, virtual]

Frees used internal objects.


Member Function Documentation

template<typename BlkTp_ , typename BIDIteratorTp_ >
reference buf_istream< BlkTp_, BIDIteratorTp_ >::current (  )  [inline]

Returns reference to the current record in the stream.

Returns:
reference to the current record in the stream
template<typename BlkTp_ , typename BIDIteratorTp_ >
reference buf_istream< BlkTp_, BIDIteratorTp_ >::operator* (  )  [inline]

Returns reference to the current record in the stream.

Returns:
reference to the current record in the stream
template<typename BlkTp_ , typename BIDIteratorTp_ >
_Self& buf_istream< BlkTp_, BIDIteratorTp_ >::operator++ (  )  [inline]

Moves to the next record in the stream.

Returns:
reference to itself after the advance

References block_prefetcher< block_type, bid_iterator_type >::block_consumed().

template<typename BlkTp_ , typename BIDIteratorTp_ >
_Self& buf_istream< BlkTp_, BIDIteratorTp_ >::operator>> ( reference  record  )  [inline]

Input stream operator, reads in record.

Parameters:
record reference to the block record type, contains value of the next record in the stream after the call of the operator
Returns:
reference to itself (stream object)

References block_prefetcher< block_type, bid_iterator_type >::block_consumed().


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