STXXL  1.4.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
stxxl::buf_istream< BlockType, BIDIteratorType > Class Template Reference

Detailed Description

template<typename BlockType, typename BIDIteratorType>
class stxxl::buf_istream< BlockType, BIDIteratorType >

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

Definition at line 37 of file buf_istream.h.

+ Inheritance diagram for stxxl::buf_istream< BlockType, BIDIteratorType >:
+ Collaboration diagram for stxxl::buf_istream< BlockType, BIDIteratorType >:

Public Types

typedef buf_istream
< block_type,
bid_iterator_type
_Self
 
typedef BIDIteratorType bid_iterator_type
 
typedef BlockType block_type
 
typedef block_type::reference reference
 

Public Member Functions

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

Protected Types

typedef block_prefetcher
< block_type,
bid_iterator_type
prefetcher_type
 

Protected Attributes

block_typecurrent_blk
 
int_type current_elem
 
bool not_finished
 
int_typeprefetch_seq
 
prefetcher_typeprefetcher
 

Private Member Functions

 buf_istream ()
 
- Private Member Functions inherited from stxxl::noncopyable
 noncopyable ()
 

Member Typedef Documentation

template<typename BlockType , typename BIDIteratorType >
typedef buf_istream<block_type, bid_iterator_type> stxxl::buf_istream< BlockType, BIDIteratorType >::_Self

Definition at line 58 of file buf_istream.h.

template<typename BlockType , typename BIDIteratorType >
typedef BIDIteratorType stxxl::buf_istream< BlockType, BIDIteratorType >::bid_iterator_type

Definition at line 41 of file buf_istream.h.

template<typename BlockType , typename BIDIteratorType >
typedef BlockType stxxl::buf_istream< BlockType, BIDIteratorType >::block_type

Definition at line 40 of file buf_istream.h.

template<typename BlockType , typename BIDIteratorType >
typedef block_prefetcher<block_type, bid_iterator_type> stxxl::buf_istream< BlockType, BIDIteratorType >::prefetcher_type
protected

Definition at line 47 of file buf_istream.h.

template<typename BlockType , typename BIDIteratorType >
typedef block_type::reference stxxl::buf_istream< BlockType, BIDIteratorType >::reference

Definition at line 57 of file buf_istream.h.

Constructor & Destructor Documentation

template<typename BlockType , typename BIDIteratorType >
stxxl::buf_istream< BlockType, BIDIteratorType >::buf_istream ( )
inlineprivate

Definition at line 44 of file buf_istream.h.

template<typename BlockType , typename BIDIteratorType >
stxxl::buf_istream< BlockType, BIDIteratorType >::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 BlockType , typename BIDIteratorType >
stxxl::buf_istream< BlockType, BIDIteratorType >::~buf_istream ( )
inline

Frees used internal objects.

Definition at line 150 of file buf_istream.h.

Member Function Documentation

template<typename BlockType , typename BIDIteratorType >
reference stxxl::buf_istream< BlockType, BIDIteratorType >::current ( )
inline

Returns reference to the current record in the stream.

Definition at line 116 of file buf_istream.h.

template<typename BlockType , typename BIDIteratorType >
reference stxxl::buf_istream< BlockType, BIDIteratorType >::operator* ( )
inline

Returns reference to the current record in the stream.

Definition at line 122 of file buf_istream.h.

template<typename BlockType , typename BIDIteratorType >
_Self& stxxl::buf_istream< BlockType, BIDIteratorType >::operator++ ( )
inline

Moves to the next record in the stream.

Returns
reference to itself after the advance

Definition at line 129 of file buf_istream.h.

References UNLIKELY.

template<typename BlockType , typename BIDIteratorType >
_Self& stxxl::buf_istream< BlockType, BIDIteratorType >::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 BlockType , typename BIDIteratorType >
block_type* stxxl::buf_istream< BlockType, BIDIteratorType >::current_blk
protected

Definition at line 50 of file buf_istream.h.

template<typename BlockType , typename BIDIteratorType >
int_type stxxl::buf_istream< BlockType, BIDIteratorType >::current_elem
protected

Definition at line 49 of file buf_istream.h.

template<typename BlockType , typename BIDIteratorType >
bool stxxl::buf_istream< BlockType, BIDIteratorType >::not_finished
protected

Definition at line 53 of file buf_istream.h.

template<typename BlockType , typename BIDIteratorType >
int_type* stxxl::buf_istream< BlockType, BIDIteratorType >::prefetch_seq
protected

Definition at line 51 of file buf_istream.h.

template<typename BlockType , typename BIDIteratorType >
prefetcher_type* stxxl::buf_istream< BlockType, BIDIteratorType >::prefetcher
protected

Definition at line 48 of file buf_istream.h.


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