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_vectorbuf< CharVector, CharTraits > Class Template Reference

A streambuf class that controls the transmission of elements to and from a basic_ivectorstream, basic_ovectorstream or basic_vectorstream. More...

#include <vectorstream.hpp>

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

Public Types

typedef CharVector vector_type
 
typedef CharVector::value_type char_type
 
typedef CharTraits::int_type int_type
 
typedef CharTraits::pos_type pos_type
 
typedef CharTraits::off_type off_type
 
typedef CharTraits traits_type
 

Public Member Functions

 basic_vectorbuf (std::ios_base::openmode mode=std::ios_base::in|std::ios_base::out)
 Constructor. More...
 
template<class VectorParameter >
 basic_vectorbuf (const VectorParameter &param, std::ios_base::openmode mode=std::ios_base::in|std::ios_base::out)
 Constructor. 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)
 Preallocates memory from the internal vector. More...
 
void clear ()
 Calls clear() method of the internal vector. More...
 

Protected 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_vectorbuf< CharVector, CharTraits >

A streambuf class that controls the transmission of elements to and from a basic_ivectorstream, basic_ovectorstream or basic_vectorstream.

It 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 CharVector::value_type boost::interprocess::basic_vectorbuf< CharVector, CharTraits >::char_type
template<class CharVector , class CharTraits >
typedef CharTraits::int_type boost::interprocess::basic_vectorbuf< CharVector, CharTraits >::int_type
template<class CharVector , class CharTraits >
typedef CharTraits::off_type boost::interprocess::basic_vectorbuf< CharVector, CharTraits >::off_type
template<class CharVector , class CharTraits >
typedef CharTraits::pos_type boost::interprocess::basic_vectorbuf< CharVector, CharTraits >::pos_type
template<class CharVector , class CharTraits >
typedef CharTraits boost::interprocess::basic_vectorbuf< CharVector, CharTraits >::traits_type
template<class CharVector , class CharTraits >
typedef CharVector boost::interprocess::basic_vectorbuf< CharVector, CharTraits >::vector_type

Constructor & Destructor Documentation

template<class CharVector , class CharTraits >
boost::interprocess::basic_vectorbuf< CharVector, CharTraits >::basic_vectorbuf ( std::ios_base::openmode  mode = std::ios_base::in | std::ios_base::out)
inlineexplicit

Constructor.

Throws if vector_type default constructor throws.

template<class CharVector , class CharTraits >
template<class VectorParameter >
boost::interprocess::basic_vectorbuf< CharVector, CharTraits >::basic_vectorbuf ( const VectorParameter &  param,
std::ios_base::openmode  mode = std::ios_base::in | std::ios_base::out 
)
inlineexplicit

Constructor.

Throws if vector_type(const VectorParameter &param) throws.

Member Function Documentation

template<class CharVector , class CharTraits >
void boost::interprocess::basic_vectorbuf< CharVector, CharTraits >::clear ( void  )
inline
template<class CharVector , class CharTraits >
virtual int_type boost::interprocess::basic_vectorbuf< CharVector, CharTraits >::overflow ( int_type  c = CharTraits::eof())
inlineprotectedvirtual
template<class CharVector , class CharTraits >
virtual int_type boost::interprocess::basic_vectorbuf< CharVector, CharTraits >::pbackfail ( int_type  c = CharTraits::eof())
inlineprotectedvirtual
template<class CharVector , class CharTraits >
void boost::interprocess::basic_vectorbuf< CharVector, CharTraits >::reserve ( typename vector_type::size_type  size)
inline

Preallocates memory from the internal vector.

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

References boost::flyweights::in, and boost::out.

Referenced by boost::interprocess::basic_ivectorstream< CharVector, CharTraits >::reserve(), boost::interprocess::basic_ovectorstream< CharVector, CharTraits >::reserve(), and boost::interprocess::basic_vectorstream< CharVector, CharTraits >::reserve().

template<class CharVector , class CharTraits >
virtual pos_type boost::interprocess::basic_vectorbuf< CharVector, CharTraits >::seekoff ( off_type  off,
std::ios_base::seekdir  dir,
std::ios_base::openmode  mode = std::ios_base::in | std::ios_base::out 
)
inlineprotectedvirtual
template<class CharVector , class CharTraits >
virtual pos_type boost::interprocess::basic_vectorbuf< CharVector, CharTraits >::seekpos ( pos_type  pos,
std::ios_base::openmode  mode = std::ios_base::in | std::ios_base::out 
)
inlineprotectedvirtual
template<class CharVector , class CharTraits >
void boost::interprocess::basic_vectorbuf< CharVector, CharTraits >::swap_vector ( vector_type vect)
inline
template<class CharVector , class CharTraits >
virtual int_type boost::interprocess::basic_vectorbuf< CharVector, CharTraits >::underflow ( )
inlineprotectedvirtual
template<class CharVector , class CharTraits >
const vector_type& boost::interprocess::basic_vectorbuf< CharVector, CharTraits >::vector ( ) const
inline

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