STXXL  1.4-dev
 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 34 of file buf_istream.h.

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

Public Types

typedef BidIteratorType bid_iterator_type
 
typedef BlockType block_type
 
typedef block_type::reference reference
 
typedef buf_istream
< block_type,
bid_iterator_type
self_type
 

Public Member Functions

 buf_istream (bid_iterator_type begin, bid_iterator_type end, unsigned_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...
 
self_typeoperator++ ()
 Moves to the next record in the stream. More...
 
self_typeoperator>> (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 BidIteratorType stxxl::buf_istream< BlockType, BidIteratorType >::bid_iterator_type

Definition at line 38 of file buf_istream.h.

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

Definition at line 37 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 44 of file buf_istream.h.

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

Definition at line 54 of file buf_istream.h.

template<typename BlockType , typename BidIteratorType >
typedef buf_istream<block_type, bid_iterator_type> stxxl::buf_istream< BlockType, BidIteratorType >::self_type

Definition at line 55 of file buf_istream.h.

Constructor & Destructor Documentation

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

Definition at line 41 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,
unsigned_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 61 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 146 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 112 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 118 of file buf_istream.h.

template<typename BlockType , typename BidIteratorType >
self_type& 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 125 of file buf_istream.h.

References UNLIKELY.

template<typename BlockType , typename BidIteratorType >
self_type& 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 90 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 47 of file buf_istream.h.

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

Definition at line 46 of file buf_istream.h.

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

Definition at line 50 of file buf_istream.h.

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

Definition at line 48 of file buf_istream.h.

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

Definition at line 45 of file buf_istream.h.


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