Boost  v1.57.0
doxygen for www.boost.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
boost::iterator_range< IteratorT > Singleton Reference

iterator_range class More...

#include <range_fwd.hpp>

Inheritance diagram for boost::iterator_range< IteratorT >:
Collaboration diagram for boost::iterator_range< IteratorT >:

Public Types

typedef iterator_range< IteratorT > type
 
typedef BOOST_DEDUCED_TYPENAME
safe_bool_t::unspecified_bool_type 
unspecified_bool_type
 
typedef BOOST_DEDUCED_TYPENAME
iterator_value< IteratorT >
::type 
value_type
 
typedef BOOST_DEDUCED_TYPENAME
iterator_difference< IteratorT >
::type 
difference_type
 
typedef std::size_t size_type
 
typedef BOOST_DEDUCED_TYPENAME
iterator_reference< IteratorT >
::type 
reference
 
typedef IteratorT const_iterator
 const_iterator type More...
 
typedef IteratorT iterator
 iterator type More...
 

Public Member Functions

 iterator_range ()
 
template<class Iterator >
 iterator_range (Iterator first, Iterator last)
 
template<class SinglePassRange >
 iterator_range (const SinglePassRange &r, BOOST_DEDUCED_TYPENAME::boost::enable_if< is_compatible_range< const SinglePassRange > >::type *=0)
 
template<class SinglePassRange >
 iterator_range (SinglePassRange &r, BOOST_DEDUCED_TYPENAME::boost::enable_if< is_compatible_range< SinglePassRange > >::type *=0)
 
template<class SinglePassRange >
 iterator_range (const SinglePassRange &r, iterator_range_detail::const_range_tag)
 
template<class SinglePassRange >
 iterator_range (SinglePassRange &r, iterator_range_detail::range_tag)
 
template<class Iterator >
iterator_rangeoperator= (const iterator_range< Iterator > &other)
 
template<class Iterator >
iterator_rangeoperator= (iterator_range< Iterator > &other)
 
template<class SinglePassRange >
iterator_rangeoperator= (SinglePassRange &r)
 
template<class SinglePassRange >
iterator_rangeoperator= (const SinglePassRange &r)
 
iterator_rangeadvance_begin (BOOST_DEDUCED_TYPENAME base_type::difference_type n)
 
iterator_rangeadvance_end (BOOST_DEDUCED_TYPENAME base_type::difference_type n)
 
IteratorT begin () const
 
IteratorT end () const
 
bool empty () const
 
 operator unspecified_bool_type () const
 
bool operator! () const
 
bool equal (const iterator_range_base &r) const
 
reference front () const
 
void drop_front ()
 
void drop_front (difference_type n)
 
void pop_front ()
 

Protected Types

typedef
iterator_range_detail::iterator_range_impl
< IteratorT > 
impl
 
typedef iterator_range iterator_range_
 

Protected Member Functions

void assign (Iterator first, Iterator last)
 
void assign (const SinglePassRange &r)
 
void assign (SinglePassRange &r)
 

Protected Attributes

IteratorT m_Begin
 
IteratorT m_End
 

Detailed Description

template<class IteratorT>
singleton boost::iterator_range< IteratorT >

iterator_range class

An iterator_range delimits a range in a sequence by beginning and ending iterators. An iterator_range can be passed to an algorithm which requires a sequence as an input. For example, the toupper() function may be used most frequently on strings, but can also be used on iterator_ranges:

boost::tolower( find( s, "UPPERCASE STRING" ) );

Many algorithms working with sequences take a pair of iterators, delimiting a working range, as an arguments. The iterator_range class is an encapsulation of a range identified by a pair of iterators. It provides a collection interface, so it is possible to pass an instance to an algorithm requiring a collection as an input.

Member Typedef Documentation

const_iterator type

There is no distinction between const_iterator and iterator. These typedefs are provides to fulfill container interface

template<class IteratorT>
typedef iterator_range_detail::iterator_range_impl<IteratorT> boost::iterator_range< IteratorT >::impl
protected
template<class IteratorT>
typedef iterator_range boost::iterator_range< IteratorT >::iterator_range_
protected
template<class IteratorT>
typedef iterator_range<IteratorT> boost::iterator_range< IteratorT >::type

Constructor & Destructor Documentation

template<class IteratorT>
boost::iterator_range< IteratorT >::iterator_range ( )
inline
template<class IteratorT>
template<class Iterator >
boost::iterator_range< IteratorT >::iterator_range ( Iterator  first,
Iterator  last 
)
inline
template<class IteratorT>
template<class SinglePassRange >
boost::iterator_range< IteratorT >::iterator_range ( const SinglePassRange &  r,
BOOST_DEDUCED_TYPENAME::boost::enable_if< is_compatible_range< const SinglePassRange > >::type = 0 
)
inline
template<class IteratorT>
template<class SinglePassRange >
boost::iterator_range< IteratorT >::iterator_range ( SinglePassRange &  r,
BOOST_DEDUCED_TYPENAME::boost::enable_if< is_compatible_range< SinglePassRange > >::type = 0 
)
inline
template<class IteratorT>
template<class SinglePassRange >
boost::iterator_range< IteratorT >::iterator_range ( const SinglePassRange &  r,
iterator_range_detail::const_range_tag   
)
inline
template<class IteratorT>
template<class SinglePassRange >
boost::iterator_range< IteratorT >::iterator_range ( SinglePassRange &  r,
iterator_range_detail::range_tag   
)
inline

Member Function Documentation

template<class IteratorT>
iterator_range& boost::iterator_range< IteratorT >::advance_begin ( BOOST_DEDUCED_TYPENAME base_type::difference_type  n)
inline
template<class IteratorT>
iterator_range& boost::iterator_range< IteratorT >::advance_end ( BOOST_DEDUCED_TYPENAME base_type::difference_type  n)
inline
void boost::iterator_range_detail::iterator_range_base< IteratorT, BOOST_DEDUCED_TYPENAME iterator_range_detail::pure_iterator_traversal< IteratorT >::type >::assign ( const SinglePassRange &  r)
inlineprotectedinherited
void boost::iterator_range_detail::iterator_range_base< IteratorT, BOOST_DEDUCED_TYPENAME iterator_range_detail::pure_iterator_traversal< IteratorT >::type >::assign ( SinglePassRange &  r)
inlineprotectedinherited
template<class IteratorT>
template<class Iterator >
iterator_range& boost::iterator_range< IteratorT >::operator= ( const iterator_range< Iterator > &  other)
inline
template<class IteratorT>
template<class Iterator >
iterator_range& boost::iterator_range< IteratorT >::operator= ( iterator_range< Iterator > &  other)
inline
template<class IteratorT>
template<class SinglePassRange >
iterator_range& boost::iterator_range< IteratorT >::operator= ( SinglePassRange &  r)
inline
template<class IteratorT>
template<class SinglePassRange >
iterator_range& boost::iterator_range< IteratorT >::operator= ( const SinglePassRange &  r)
inline

Member Data Documentation


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