Stxxl  1.4.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Types | Public Member Functions | Protected Types | Protected Attributes | Private Member Functions
stxxl::buf_istream< BlkTp_, BIDIteratorTp_ > Class Template Reference

Buffered input stream. More...

#include <buf_istream.h>

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

List of all members.

Public Types

typedef BlkTp_ block_type
typedef BIDIteratorTp_ bid_iterator_type
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_typecurrent_blk
int_typeprefetch_seq
bool not_finished

Private Member Functions

 buf_istream ()

Detailed Description

template<typename BlkTp_, typename BIDIteratorTp_>
class stxxl::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
Examples:
mng/test_buf_streams.cpp.

Definition at line 36 of file buf_istream.h.


Member Typedef Documentation

template<typename BlkTp_ , typename BIDIteratorTp_ >
typedef buf_istream<block_type, bid_iterator_type> stxxl::buf_istream< BlkTp_, BIDIteratorTp_ >::_Self

Definition at line 58 of file buf_istream.h.

template<typename BlkTp_ , typename BIDIteratorTp_ >
typedef BIDIteratorTp_ stxxl::buf_istream< BlkTp_, BIDIteratorTp_ >::bid_iterator_type

Definition at line 40 of file buf_istream.h.

template<typename BlkTp_ , typename BIDIteratorTp_ >
typedef BlkTp_ stxxl::buf_istream< BlkTp_, BIDIteratorTp_ >::block_type

Definition at line 39 of file buf_istream.h.

template<typename BlkTp_ , typename BIDIteratorTp_ >
typedef block_prefetcher<block_type, bid_iterator_type> stxxl::buf_istream< BlkTp_, BIDIteratorTp_ >::prefetcher_type [protected]

Definition at line 46 of file buf_istream.h.

template<typename BlkTp_ , typename BIDIteratorTp_ >
typedef block_type::reference stxxl::buf_istream< BlkTp_, BIDIteratorTp_ >::reference

Definition at line 57 of file buf_istream.h.


Constructor & Destructor Documentation

template<typename BlkTp_ , typename BIDIteratorTp_ >
stxxl::buf_istream< BlkTp_, BIDIteratorTp_ >::buf_istream ( ) [inline, private]

Definition at line 43 of file buf_istream.h.

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

Constructs input stream object.

Parameters:
_beginbid_iterator pointing to the first block of the stream
_endbid_iterator pointing to the ( last + 1 ) block of the stream
nbuffersnumber of buffers for internal use

Definition at line 64 of file buf_istream.h.

References stxxl::compute_prefetch_schedule(), and stxxl::STXXL_MAX().

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

Frees used internal objects.

Definition at line 152 of file buf_istream.h.


Member Function Documentation

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

Returns reference to the current record in the stream.

Returns:
reference to the current record in the stream

Definition at line 117 of file buf_istream.h.

template<typename BlkTp_ , typename BIDIteratorTp_ >
reference stxxl::buf_istream< BlkTp_, BIDIteratorTp_ >::operator* ( ) [inline]

Returns reference to the current record in the stream.

Returns:
reference to the current record in the stream

Definition at line 124 of file buf_istream.h.

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

Moves to the next record in the stream.

Returns:
reference to itself after the advance

Definition at line 131 of file buf_istream.h.

References UNLIKELY.

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

Input stream operator, reads in record.

Parameters:
recordreference 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)

Definition at line 94 of file buf_istream.h.

References UNLIKELY.


Member Data Documentation

template<typename BlkTp_ , typename BIDIteratorTp_ >
bid_iterator_type stxxl::buf_istream< BlkTp_, BIDIteratorTp_ >::begin_bid [protected]

Definition at line 48 of file buf_istream.h.

template<typename BlkTp_ , typename BIDIteratorTp_ >
block_type* stxxl::buf_istream< BlkTp_, BIDIteratorTp_ >::current_blk [protected]

Definition at line 50 of file buf_istream.h.

template<typename BlkTp_ , typename BIDIteratorTp_ >
int_type stxxl::buf_istream< BlkTp_, BIDIteratorTp_ >::current_elem [protected]

Definition at line 49 of file buf_istream.h.

template<typename BlkTp_ , typename BIDIteratorTp_ >
bid_iterator_type stxxl::buf_istream< BlkTp_, BIDIteratorTp_ >::end_bid [protected]

Definition at line 48 of file buf_istream.h.

template<typename BlkTp_ , typename BIDIteratorTp_ >
bool stxxl::buf_istream< BlkTp_, BIDIteratorTp_ >::not_finished [protected]

Definition at line 53 of file buf_istream.h.

template<typename BlkTp_ , typename BIDIteratorTp_ >
int_type* stxxl::buf_istream< BlkTp_, BIDIteratorTp_ >::prefetch_seq [protected]

Definition at line 51 of file buf_istream.h.

template<typename BlkTp_ , typename BIDIteratorTp_ >
prefetcher_type* stxxl::buf_istream< BlkTp_, BIDIteratorTp_ >::prefetcher [protected]

Definition at line 47 of file buf_istream.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines