STXXL  1.4.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
stxxl::buf_istream_reverse< BlockType, BidIteratorType > Class Template Reference

Detailed Description

template<typename BlockType, typename BidIteratorType>
class stxxl::buf_istream_reverse< BlockType, BidIteratorType >

Buffered input stream, reading the items in the blocks in reverse order.

Reads data records from the stream of blocks in reverse order.

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

Definition at line 36 of file buf_istream_reverse.h.

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

Public Types

typedef BidIteratorType bid_iterator_type
 
typedef BIDArray
< block_type::raw_size > 
bid_vector_type
 
typedef BlockType block_type
 
typedef block_type::reference reference
 
typedef buf_istream_reverse
< block_type,
bid_iterator_type
self_type
 

Public Member Functions

 buf_istream_reverse (bid_iterator_type begin, bid_iterator_type end, int_type nbuffers)
 Constructs input stream object, reading [first,last) blocks in reverse. More...
 
 ~buf_istream_reverse ()
 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 previous record in the stream. More...
 
self_typeoperator>> (reference record)
 Input stream operator, reads in record. More...
 

Protected Types

typedef block_prefetcher
< block_type, typename
bid_vector_type::iterator
prefetcher_type
 

Protected Attributes

bid_vector_type bids_
 
block_typecurrent_blk
 
int_type current_elem
 
bool not_finished
 
int_typeprefetch_seq
 
prefetcher_typeprefetcher
 

Private Member Functions

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

Member Typedef Documentation

template<typename BlockType , typename BidIteratorType >
typedef BidIteratorType stxxl::buf_istream_reverse< BlockType, BidIteratorType >::bid_iterator_type

Definition at line 40 of file buf_istream_reverse.h.

template<typename BlockType , typename BidIteratorType >
typedef BIDArray<block_type::raw_size> stxxl::buf_istream_reverse< BlockType, BidIteratorType >::bid_vector_type

Definition at line 44 of file buf_istream_reverse.h.

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

Definition at line 39 of file buf_istream_reverse.h.

template<typename BlockType , typename BidIteratorType >
typedef block_prefetcher<block_type, typename bid_vector_type::iterator> stxxl::buf_istream_reverse< BlockType, BidIteratorType >::prefetcher_type
protected

Definition at line 50 of file buf_istream_reverse.h.

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

Definition at line 61 of file buf_istream_reverse.h.

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

Definition at line 62 of file buf_istream_reverse.h.

Constructor & Destructor Documentation

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

Definition at line 47 of file buf_istream_reverse.h.

template<typename BlockType , typename BidIteratorType >
stxxl::buf_istream_reverse< BlockType, BidIteratorType >::buf_istream_reverse ( bid_iterator_type  begin,
bid_iterator_type  end,
int_type  nbuffers 
)
inline

Constructs input stream object, reading [first,last) blocks in reverse.

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 68 of file buf_istream_reverse.h.

References stxxl::compute_prefetch_schedule(), stxxl::block_prefetcher< BlockType, BidIteratorType >::pull_block(), and stxxl::STXXL_MAX().

template<typename BlockType , typename BidIteratorType >
stxxl::buf_istream_reverse< BlockType, BidIteratorType >::~buf_istream_reverse ( )
inline

Frees used internal objects.

Definition at line 157 of file buf_istream_reverse.h.

Member Function Documentation

template<typename BlockType , typename BidIteratorType >
reference stxxl::buf_istream_reverse< BlockType, BidIteratorType >::current ( )
inline

Returns reference to the current record in the stream.

Definition at line 123 of file buf_istream_reverse.h.

template<typename BlockType , typename BidIteratorType >
reference stxxl::buf_istream_reverse< BlockType, BidIteratorType >::operator* ( )
inline

Returns reference to the current record in the stream.

Definition at line 129 of file buf_istream_reverse.h.

template<typename BlockType , typename BidIteratorType >
self_type& stxxl::buf_istream_reverse< BlockType, BidIteratorType >::operator++ ( )
inline

Moves to the previous record in the stream.

Returns
reference to itself after the advance

Definition at line 136 of file buf_istream_reverse.h.

References UNLIKELY.

template<typename BlockType , typename BidIteratorType >
self_type& stxxl::buf_istream_reverse< 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 101 of file buf_istream_reverse.h.

References UNLIKELY.

Member Data Documentation

template<typename BlockType , typename BidIteratorType >
bid_vector_type stxxl::buf_istream_reverse< BlockType, BidIteratorType >::bids_
protected

Definition at line 58 of file buf_istream_reverse.h.

template<typename BlockType , typename BidIteratorType >
block_type* stxxl::buf_istream_reverse< BlockType, BidIteratorType >::current_blk
protected

Definition at line 53 of file buf_istream_reverse.h.

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

Definition at line 52 of file buf_istream_reverse.h.

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

Definition at line 56 of file buf_istream_reverse.h.

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

Definition at line 54 of file buf_istream_reverse.h.

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

Definition at line 51 of file buf_istream_reverse.h.


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