STXXL  1.4-dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
stxxl::stream::vector_iterator2stream< InputIterator > Class Template Reference

Detailed Description

template<class InputIterator>
class stxxl::stream::vector_iterator2stream< InputIterator >

A model of stream that retrieves data from an external stxxl::vector iterator. It is more efficient than generic iterator2stream thanks to use of overlapping For convenience use streamify function instead of direct instantiation of vector_iterator2stream .

Examples:
examples/containers/copy_file.cpp, and examples/stream/stream1.cpp.

Definition at line 111 of file stream.h.

+ Collaboration diagram for stxxl::stream::vector_iterator2stream< InputIterator >:

Public Types

typedef vector_iterator2stream
< InputIterator > 
self_type
 
typedef std::iterator_traits
< InputIterator >::value_type 
value_type
 Standard stream typedef. More...
 

Public Member Functions

 vector_iterator2stream (InputIterator begin, InputIterator end, unsigned_type nbuffers=0)
 
 vector_iterator2stream (const self_type &a)
 
virtual ~vector_iterator2stream ()
 
bool empty () const
 Standard stream method. More...
 
const value_typeoperator* () const
 Standard stream method. More...
 
self_typeoperator++ ()
 Standard stream method. More...
 
const value_typeoperator-> () const
 

Private Types

typedef buf_istream< typename
InputIterator::block_type,
typename
InputIterator::bids_container_iterator > 
buf_istream_type
 
typedef
stxxl::compat_unique_ptr
< buf_istream_type >::result 
buf_istream_unique_ptr_type
 

Private Member Functions

void delete_stream ()
 

Private Attributes

buf_istream_unique_ptr_type in
 
InputIterator m_current
 
InputIterator m_end
 

Member Typedef Documentation

template<class InputIterator>
typedef buf_istream<typename InputIterator::block_type, typename InputIterator::bids_container_iterator> stxxl::stream::vector_iterator2stream< InputIterator >::buf_istream_type
private

Definition at line 115 of file stream.h.

template<class InputIterator>
typedef stxxl::compat_unique_ptr<buf_istream_type>::result stxxl::stream::vector_iterator2stream< InputIterator >::buf_istream_unique_ptr_type
private

Definition at line 117 of file stream.h.

template<class InputIterator>
typedef vector_iterator2stream<InputIterator> stxxl::stream::vector_iterator2stream< InputIterator >::self_type

Definition at line 126 of file stream.h.

template<class InputIterator>
typedef std::iterator_traits<InputIterator>::value_type stxxl::stream::vector_iterator2stream< InputIterator >::value_type

Standard stream typedef.

Definition at line 129 of file stream.h.

Constructor & Destructor Documentation

template<class InputIterator>
stxxl::stream::vector_iterator2stream< InputIterator >::vector_iterator2stream ( InputIterator  begin,
InputIterator  end,
unsigned_type  nbuffers = 0 
)
inline

Definition at line 131 of file stream.h.

template<class InputIterator>
stxxl::stream::vector_iterator2stream< InputIterator >::vector_iterator2stream ( const self_type a)
inline

Definition at line 159 of file stream.h.

template<class InputIterator>
virtual stxxl::stream::vector_iterator2stream< InputIterator >::~vector_iterator2stream ( )
inlinevirtual

Definition at line 191 of file stream.h.

Member Function Documentation

template<class InputIterator>
void stxxl::stream::vector_iterator2stream< InputIterator >::delete_stream ( )
inlineprivate

Definition at line 120 of file stream.h.

template<class InputIterator>
bool stxxl::stream::vector_iterator2stream< InputIterator >::empty ( ) const
inline

Standard stream method.

Definition at line 187 of file stream.h.

template<class InputIterator>
const value_type& stxxl::stream::vector_iterator2stream< InputIterator >::operator* ( ) const
inline

Standard stream method.

Definition at line 164 of file stream.h.

template<class InputIterator>
self_type& stxxl::stream::vector_iterator2stream< InputIterator >::operator++ ( )
inline

Standard stream method.

Definition at line 175 of file stream.h.

References UNLIKELY.

template<class InputIterator>
const value_type* stxxl::stream::vector_iterator2stream< InputIterator >::operator-> ( ) const
inline

Definition at line 169 of file stream.h.

Member Data Documentation

template<class InputIterator>
buf_istream_unique_ptr_type stxxl::stream::vector_iterator2stream< InputIterator >::in
mutableprivate

Definition at line 118 of file stream.h.

template<class InputIterator>
InputIterator stxxl::stream::vector_iterator2stream< InputIterator >::m_current
private

Definition at line 113 of file stream.h.

template<class InputIterator>
InputIterator stxxl::stream::vector_iterator2stream< InputIterator >::m_end
private

Definition at line 113 of file stream.h.


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