Boost  v1.57.0
doxygen for www.boost.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
boost::asio::buffers_iterator< BufferSequence, ByteType > Class Template Reference

A random access iterator over the bytes in a buffer sequence. More...

#include <buffers_iterator.hpp>

Public Types

typedef std::ptrdiff_t difference_type
 The type used for the distance between two iterators. More...
 
typedef ByteType value_type
 The type of the value pointed to by the iterator. More...
 
typedef
detail::buffers_iterator_types
< BufferSequence, ByteType >
::byte_type * 
pointer
 
typedef
detail::buffers_iterator_types
< BufferSequence, ByteType >
::byte_type & 
reference
 
typedef
std::random_access_iterator_tag 
iterator_category
 The iterator category. More...
 

Public Member Functions

 buffers_iterator ()
 Default constructor. Creates an iterator in an undefined state. More...
 
reference operator* () const
 Dereference an iterator. More...
 
pointer operator-> () const
 Dereference an iterator. More...
 
reference operator[] (std::ptrdiff_t difference) const
 Access an individual element. More...
 
buffers_iteratoroperator++ ()
 Increment operator (prefix). More...
 
buffers_iterator operator++ (int)
 Increment operator (postfix). More...
 
buffers_iteratoroperator-- ()
 Decrement operator (prefix). More...
 
buffers_iterator operator-- (int)
 Decrement operator (postfix). More...
 
buffers_iteratoroperator+= (std::ptrdiff_t difference)
 Addition operator. More...
 
buffers_iteratoroperator-= (std::ptrdiff_t difference)
 Subtraction operator. More...
 

Static Public Member Functions

static buffers_iterator begin (const BufferSequence &buffers)
 Construct an iterator representing the beginning of the buffers' data. More...
 
static buffers_iterator end (const BufferSequence &buffers)
 Construct an iterator representing the end of the buffers' data. More...
 

Friends

buffers_iterator operator+ (const buffers_iterator &iter, std::ptrdiff_t difference)
 Addition operator. More...
 
buffers_iterator operator+ (std::ptrdiff_t difference, const buffers_iterator &iter)
 Addition operator. More...
 
buffers_iterator operator- (const buffers_iterator &iter, std::ptrdiff_t difference)
 Subtraction operator. More...
 
std::ptrdiff_t operator- (const buffers_iterator &a, const buffers_iterator &b)
 Subtraction operator. More...
 
bool operator== (const buffers_iterator &a, const buffers_iterator &b)
 Test two iterators for equality. More...
 
bool operator!= (const buffers_iterator &a, const buffers_iterator &b)
 Test two iterators for inequality. More...
 
bool operator< (const buffers_iterator &a, const buffers_iterator &b)
 Compare two iterators. More...
 
bool operator<= (const buffers_iterator &a, const buffers_iterator &b)
 Compare two iterators. More...
 
bool operator> (const buffers_iterator &a, const buffers_iterator &b)
 Compare two iterators. More...
 
bool operator>= (const buffers_iterator &a, const buffers_iterator &b)
 Compare two iterators. More...
 

Detailed Description

template<typename BufferSequence, typename ByteType = char>
class boost::asio::buffers_iterator< BufferSequence, ByteType >

A random access iterator over the bytes in a buffer sequence.

Member Typedef Documentation

template<typename BufferSequence , typename ByteType = char>
typedef std::ptrdiff_t boost::asio::buffers_iterator< BufferSequence, ByteType >::difference_type

The type used for the distance between two iterators.

template<typename BufferSequence , typename ByteType = char>
typedef std::random_access_iterator_tag boost::asio::buffers_iterator< BufferSequence, ByteType >::iterator_category

The iterator category.

template<typename BufferSequence , typename ByteType = char>
typedef detail::buffers_iterator_types< BufferSequence, ByteType>::byte_type* boost::asio::buffers_iterator< BufferSequence, ByteType >::pointer
template<typename BufferSequence , typename ByteType = char>
typedef detail::buffers_iterator_types< BufferSequence, ByteType>::byte_type& boost::asio::buffers_iterator< BufferSequence, ByteType >::reference
template<typename BufferSequence , typename ByteType = char>
typedef ByteType boost::asio::buffers_iterator< BufferSequence, ByteType >::value_type

The type of the value pointed to by the iterator.

Constructor & Destructor Documentation

template<typename BufferSequence , typename ByteType = char>
boost::asio::buffers_iterator< BufferSequence, ByteType >::buffers_iterator ( )
inline

Default constructor. Creates an iterator in an undefined state.

Member Function Documentation

template<typename BufferSequence , typename ByteType = char>
static buffers_iterator boost::asio::buffers_iterator< BufferSequence, ByteType >::begin ( const BufferSequence &  buffers)
inlinestatic

Construct an iterator representing the beginning of the buffers' data.

References boost::asio::buffer_size().

Referenced by boost::asio::buffers_begin().

template<typename BufferSequence , typename ByteType = char>
static buffers_iterator boost::asio::buffers_iterator< BufferSequence, ByteType >::end ( const BufferSequence &  buffers)
inlinestatic

Construct an iterator representing the end of the buffers' data.

References boost::asio::buffer(), and boost::asio::buffer_size().

Referenced by boost::asio::buffers_end().

template<typename BufferSequence , typename ByteType = char>
reference boost::asio::buffers_iterator< BufferSequence, ByteType >::operator* ( ) const
inline

Dereference an iterator.

template<typename BufferSequence , typename ByteType = char>
buffers_iterator& boost::asio::buffers_iterator< BufferSequence, ByteType >::operator++ ( )
inline

Increment operator (prefix).

template<typename BufferSequence , typename ByteType = char>
buffers_iterator boost::asio::buffers_iterator< BufferSequence, ByteType >::operator++ ( int  )
inline

Increment operator (postfix).

template<typename BufferSequence , typename ByteType = char>
buffers_iterator& boost::asio::buffers_iterator< BufferSequence, ByteType >::operator+= ( std::ptrdiff_t  difference)
inline

Addition operator.

template<typename BufferSequence , typename ByteType = char>
buffers_iterator& boost::asio::buffers_iterator< BufferSequence, ByteType >::operator-- ( )
inline

Decrement operator (prefix).

template<typename BufferSequence , typename ByteType = char>
buffers_iterator boost::asio::buffers_iterator< BufferSequence, ByteType >::operator-- ( int  )
inline

Decrement operator (postfix).

template<typename BufferSequence , typename ByteType = char>
buffers_iterator& boost::asio::buffers_iterator< BufferSequence, ByteType >::operator-= ( std::ptrdiff_t  difference)
inline

Subtraction operator.

template<typename BufferSequence , typename ByteType = char>
pointer boost::asio::buffers_iterator< BufferSequence, ByteType >::operator-> ( ) const
inline

Dereference an iterator.

template<typename BufferSequence , typename ByteType = char>
reference boost::asio::buffers_iterator< BufferSequence, ByteType >::operator[] ( std::ptrdiff_t  difference) const
inline

Access an individual element.

Friends And Related Function Documentation

template<typename BufferSequence , typename ByteType = char>
bool operator!= ( const buffers_iterator< BufferSequence, ByteType > &  a,
const buffers_iterator< BufferSequence, ByteType > &  b 
)
friend

Test two iterators for inequality.

template<typename BufferSequence , typename ByteType = char>
buffers_iterator operator+ ( const buffers_iterator< BufferSequence, ByteType > &  iter,
std::ptrdiff_t  difference 
)
friend

Addition operator.

template<typename BufferSequence , typename ByteType = char>
buffers_iterator operator+ ( std::ptrdiff_t  difference,
const buffers_iterator< BufferSequence, ByteType > &  iter 
)
friend

Addition operator.

template<typename BufferSequence , typename ByteType = char>
buffers_iterator operator- ( const buffers_iterator< BufferSequence, ByteType > &  iter,
std::ptrdiff_t  difference 
)
friend

Subtraction operator.

template<typename BufferSequence , typename ByteType = char>
std::ptrdiff_t operator- ( const buffers_iterator< BufferSequence, ByteType > &  a,
const buffers_iterator< BufferSequence, ByteType > &  b 
)
friend

Subtraction operator.

template<typename BufferSequence , typename ByteType = char>
bool operator< ( const buffers_iterator< BufferSequence, ByteType > &  a,
const buffers_iterator< BufferSequence, ByteType > &  b 
)
friend

Compare two iterators.

template<typename BufferSequence , typename ByteType = char>
bool operator<= ( const buffers_iterator< BufferSequence, ByteType > &  a,
const buffers_iterator< BufferSequence, ByteType > &  b 
)
friend

Compare two iterators.

template<typename BufferSequence , typename ByteType = char>
bool operator== ( const buffers_iterator< BufferSequence, ByteType > &  a,
const buffers_iterator< BufferSequence, ByteType > &  b 
)
friend

Test two iterators for equality.

template<typename BufferSequence , typename ByteType = char>
bool operator> ( const buffers_iterator< BufferSequence, ByteType > &  a,
const buffers_iterator< BufferSequence, ByteType > &  b 
)
friend

Compare two iterators.

template<typename BufferSequence , typename ByteType = char>
bool operator>= ( const buffers_iterator< BufferSequence, ByteType > &  a,
const buffers_iterator< BufferSequence, ByteType > &  b 
)
friend

Compare two iterators.


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