Boost  v1.57.0
doxygen for www.boost.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
boost::interprocess::basic_ivectorstream< CharVector, CharTraits > Class Template Reference

A basic_istream class that holds a character vector specified by CharVector template parameter as its formatting buffer. More...

#include <vectorstream.hpp>

Inheritance diagram for boost::interprocess::basic_ivectorstream< CharVector, CharTraits >:
Collaboration diagram for boost::interprocess::basic_ivectorstream< CharVector, CharTraits >:

Public Types

typedef CharVector vector_type
 
typedef std::basic_ios
< typename
CharVector::value_type,
CharTraits >::char_type 
char_type
 
typedef std::basic_ios
< char_type, CharTraits >
::int_type 
int_type
 
typedef std::basic_ios
< char_type, CharTraits >
::pos_type 
pos_type
 
typedef std::basic_ios
< char_type, CharTraits >
::off_type 
off_type
 
typedef std::basic_ios
< char_type, CharTraits >
::traits_type 
traits_type
 

Public Member Functions

 basic_ivectorstream (std::ios_base::openmode mode=std::ios_base::in)
 Constructor. More...
 
template<class VectorParameter >
 basic_ivectorstream (const VectorParameter &param, std::ios_base::openmode mode=std::ios_base::in)
 Constructor. More...
 
basic_vectorbuf< CharVector,
CharTraits > * 
rdbuf () const
 Returns the address of the stored stream buffer. More...
 
void swap_vector (vector_type &vect)
 Swaps the underlying vector with the passed vector. More...
 
const vector_typevector () const
 Returns a const reference to the internal vector. More...
 
void reserve (typename vector_type::size_type size)
 Calls reserve() method of the internal vector. More...
 
void clear ()
 Calls clear() method of the internal vector. More...
 

Private Member Functions

virtual int_type underflow ()
 
virtual int_type pbackfail (int_type c=CharTraits::eof())
 
virtual int_type overflow (int_type c=CharTraits::eof())
 
virtual pos_type seekoff (off_type off, std::ios_base::seekdir dir, std::ios_base::openmode mode=std::ios_base::in|std::ios_base::out)
 
virtual pos_type seekpos (pos_type pos, std::ios_base::openmode mode=std::ios_base::in|std::ios_base::out)
 

Detailed Description

template<class CharVector, class CharTraits>
class boost::interprocess::basic_ivectorstream< CharVector, CharTraits >

A basic_istream class that holds a character vector specified by CharVector template parameter as its formatting buffer.

The vector must have contiguous storage, like std::vector, boost::interprocess::vector or boost::interprocess::basic_string

Member Typedef Documentation

template<class CharVector , class CharTraits >
typedef std::basic_ios<typename CharVector::value_type, CharTraits>::char_type boost::interprocess::basic_ivectorstream< CharVector, CharTraits >::char_type
template<class CharVector , class CharTraits >
typedef std::basic_ios<char_type, CharTraits>::int_type boost::interprocess::basic_ivectorstream< CharVector, CharTraits >::int_type
template<class CharVector , class CharTraits >
typedef std::basic_ios<char_type, CharTraits>::off_type boost::interprocess::basic_ivectorstream< CharVector, CharTraits >::off_type
template<class CharVector , class CharTraits >
typedef std::basic_ios<char_type, CharTraits>::pos_type boost::interprocess::basic_ivectorstream< CharVector, CharTraits >::pos_type
template<class CharVector , class CharTraits >
typedef std::basic_ios<char_type, CharTraits>::traits_type boost::interprocess::basic_ivectorstream< CharVector, CharTraits >::traits_type
template<class CharVector , class CharTraits >
typedef CharVector boost::interprocess::basic_ivectorstream< CharVector, CharTraits >::vector_type

Constructor & Destructor Documentation

template<class CharVector , class CharTraits >
boost::interprocess::basic_ivectorstream< CharVector, CharTraits >::basic_ivectorstream ( std::ios_base::openmode  mode = std::ios_base::in)
inline

Constructor.

Throws if vector_type default constructor throws.

template<class CharVector , class CharTraits >
template<class VectorParameter >
boost::interprocess::basic_ivectorstream< CharVector, CharTraits >::basic_ivectorstream ( const VectorParameter &  param,
std::ios_base::openmode  mode = std::ios_base::in 
)
inline

Constructor.

Throws if vector_type(const VectorParameter &param) throws.

Member Function Documentation

template<class CharVector , class CharTraits >
void boost::interprocess::basic_ivectorstream< CharVector, CharTraits >::clear ( void  )
inline

Calls clear() method of the internal vector.

Resets the stream to the first position.

References boost::interprocess::basic_vectorbuf< CharVector, CharTraits >::clear().

template<class CharVector , class CharTraits >
basic_vectorbuf<CharVector, CharTraits>* boost::interprocess::basic_ivectorstream< CharVector, CharTraits >::rdbuf ( ) const
inline

Returns the address of the stored stream buffer.

template<class CharVector , class CharTraits >
void boost::interprocess::basic_ivectorstream< CharVector, CharTraits >::reserve ( typename vector_type::size_type  size)
inline

Calls reserve() method of the internal vector.

Resets the stream to the first position. Throws if the internals vector's reserve throws.

References boost::interprocess::basic_vectorbuf< CharVector, CharTraits >::reserve().

template<class CharVector , class CharTraits >
void boost::interprocess::basic_ivectorstream< CharVector, CharTraits >::swap_vector ( vector_type vect)
inline

Swaps the underlying vector with the passed vector.

This function resets the read position in the stream. Does not throw.

References boost::interprocess::basic_vectorbuf< CharVector, CharTraits >::swap_vector().

template<class CharVector , class CharTraits >
const vector_type& boost::interprocess::basic_ivectorstream< CharVector, CharTraits >::vector ( ) const
inline

Returns a const reference to the internal vector.

Does not throw.

References boost::interprocess::basic_vectorbuf< CharVector, CharTraits >::vector().


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