Quick Links:

bal | bbl | bdl | bsl

Public Types | Public Member Functions

bslstl::BidirectionalIterator< T, ITER_IMP, TAG_TYPE > Class Template Reference

#include <bslstl_bidirectionaliterator.h>

Inheritance diagram for bslstl::BidirectionalIterator< T, ITER_IMP, TAG_TYPE >:
bslstl::ForwardIterator< T, ITER_IMP, TAG_TYPE > bslstl::RandomAccessIterator< T, ITER_IMP, TAG_TYPE >

List of all members.

Public Types

typedef UnCvqT value_type
typedef std::ptrdiff_t difference_type
typedef T * pointer
typedef T & reference
typedef
std::bidirectional_iterator_tag 
iterator_category

Public Member Functions

 BidirectionalIterator ()
 BidirectionalIterator (const ITER_IMP &implementation)
 BidirectionalIterator (const BidirectionalIterator &original)
 BidirectionalIterator (const BidirectionalNonConstIterator &other)
 ~BidirectionalIterator ()
BidirectionalIteratoroperator= (const BidirectionalIterator &rhs)
BidirectionalIteratoroperator= (const BidirectionalNonConstIterator &rhs)
BidirectionalIteratoroperator++ ()
BidirectionalIteratoroperator-- ()
ITER_IMP & imp ()
const ITER_IMP & imp () const
T & operator* () const
T * operator-> () const

Detailed Description

template<class T, class ITER_IMP, class TAG_TYPE = std::bidirectional_iterator_tag>
class bslstl::BidirectionalIterator< T, ITER_IMP, TAG_TYPE >

Given an ITER_IMP type that implements a minimal subset of an iterator interface, this template generates a complete iterator that meets all of the requirements of a "bidirectional iterator" in the C++ standard. If T is const-qualified, then the resulting type is a constant iterator. T shall not be a function, reference type or void. ITER_IMP must provide public operations so that, for objects i and j of type ITER_IMP, the following operations are supported:

         ITER_IMP i;                            default construction
         ITER_IMP j(i);                         copy construction
         i = j                                  assignment
         ++i                                    increment to next element
         --i                                    decrement to previous element
         i == j // convertible to bool          equality comparison
         *i     // reference convertible to T&  element access (dereference)

See Component bslstl_bidirectionaliterator


Member Typedef Documentation

template<class T, class ITER_IMP, class TAG_TYPE = std::bidirectional_iterator_tag>
typedef UnCvqT bslstl::BidirectionalIterator< T, ITER_IMP, TAG_TYPE >::value_type
template<class T, class ITER_IMP, class TAG_TYPE = std::bidirectional_iterator_tag>
typedef std::ptrdiff_t bslstl::BidirectionalIterator< T, ITER_IMP, TAG_TYPE >::difference_type
template<class T, class ITER_IMP, class TAG_TYPE = std::bidirectional_iterator_tag>
typedef T* bslstl::BidirectionalIterator< T, ITER_IMP, TAG_TYPE >::pointer
template<class T, class ITER_IMP, class TAG_TYPE = std::bidirectional_iterator_tag>
typedef T& bslstl::BidirectionalIterator< T, ITER_IMP, TAG_TYPE >::reference
template<class T, class ITER_IMP, class TAG_TYPE = std::bidirectional_iterator_tag>
typedef std::bidirectional_iterator_tag bslstl::BidirectionalIterator< T, ITER_IMP, TAG_TYPE >::iterator_category

Constructor & Destructor Documentation

template<class T, class ITER_IMP, class TAG_TYPE = std::bidirectional_iterator_tag>
bslstl::BidirectionalIterator< T, ITER_IMP, TAG_TYPE >::BidirectionalIterator (  ) 

Construct the default value for this iterator type. All default- constructed BidirectionalIterator objects represent non-dereferenceable iterators into the same empty range. They do not have a singular value unless an object of the type specified by the template parameter ITER_IMP has a singular value after value-initialization.

template<class T, class ITER_IMP, class TAG_TYPE = std::bidirectional_iterator_tag>
bslstl::BidirectionalIterator< T, ITER_IMP, TAG_TYPE >::BidirectionalIterator ( const ITER_IMP &  implementation  ) 

IMPLICIT: Construct a bidirectional iterator having the specified implementation of the parameterized ITER_IMP type.

template<class T, class ITER_IMP, class TAG_TYPE = std::bidirectional_iterator_tag>
bslstl::BidirectionalIterator< T, ITER_IMP, TAG_TYPE >::BidirectionalIterator ( const BidirectionalIterator< T, ITER_IMP, TAG_TYPE > &  original  ) 

Construct a bidirectional iterator having the same value as the original iterator. Note that this method's definition is compiler generated.

template<class T, class ITER_IMP, class TAG_TYPE = std::bidirectional_iterator_tag>
bslstl::BidirectionalIterator< T, ITER_IMP, TAG_TYPE >::BidirectionalIterator ( const BidirectionalNonConstIterator other  ) 

Construct a bidirectional iterator from the specified other iterator of another (compatible) BidirectionalIterator type, e.g., a mutable iterator of the same type. Note that this constructor may be the copy constructor (inhibiting the implicit declaration of a copy constructor above), or may be an additional overload.

template<class T, class ITER_IMP, class TAG_TYPE = std::bidirectional_iterator_tag>
bslstl::BidirectionalIterator< T, ITER_IMP, TAG_TYPE >::~BidirectionalIterator (  ) 

Destroy this iterator. Note that this method's definition is compiler generated.


Member Function Documentation

template<class T, class ITER_IMP, class TAG_TYPE = std::bidirectional_iterator_tag>
BidirectionalIterator& bslstl::BidirectionalIterator< T, ITER_IMP, TAG_TYPE >::operator= ( const BidirectionalIterator< T, ITER_IMP, TAG_TYPE > &  rhs  ) 

Copy the value of the specified rhs to this iterator. Return a reference to this modifiable object. Note that this method's definition is compiler generated.

template<class T, class ITER_IMP, class TAG_TYPE = std::bidirectional_iterator_tag>
BidirectionalIterator& bslstl::BidirectionalIterator< T, ITER_IMP, TAG_TYPE >::operator= ( const BidirectionalNonConstIterator rhs  ) 

Copy the value of the specified rhs of another (compatible) BidirectionalIterator type, (e.g., a mutable iterator of the same type) to this iterator. Return a reference to this modifiable object. Note that this method may be the copy-assignment operator (inhibiting the implicit declaration of a copy-assignment operator above), or may be an additional overload.

template<class T, class ITER_IMP, class TAG_TYPE = std::bidirectional_iterator_tag>
BidirectionalIterator& bslstl::BidirectionalIterator< T, ITER_IMP, TAG_TYPE >::operator++ (  ) 

Increment to the next element. Return a reference to this modifiable iterator. The behavior is undefined if, on entry, this iterator has the past-the-end value for an iterator over the underlying sequence.

Reimplemented from bslstl::ForwardIterator< T, ITER_IMP, TAG_TYPE >.

Reimplemented in bslstl::RandomAccessIterator< T, ITER_IMP, TAG_TYPE >.

template<class T, class ITER_IMP, class TAG_TYPE = std::bidirectional_iterator_tag>
BidirectionalIterator& bslstl::BidirectionalIterator< T, ITER_IMP, TAG_TYPE >::operator-- (  ) 

Decrement to the previous element. Return a reference to this modifiable iterator. The behavior is undefined if, on entry, this iterator has the same value as an iterator the refers to the start of the underlying sequence.

Reimplemented in bslstl::RandomAccessIterator< T, ITER_IMP, TAG_TYPE >.

template<class T, class ITER_IMP, class TAG_TYPE = std::forward_iterator_tag>
ITER_IMP& bslstl::ForwardIterator< T, ITER_IMP, TAG_TYPE >::imp (  )  [inherited]

Return a modifiable reference to the implementation object.

template<class T, class ITER_IMP, class TAG_TYPE = std::forward_iterator_tag>
const ITER_IMP& bslstl::ForwardIterator< T, ITER_IMP, TAG_TYPE >::imp (  )  const [inherited]

Return a non-modifiable reference to the implementation object.

template<class T, class ITER_IMP, class TAG_TYPE = std::forward_iterator_tag>
T& bslstl::ForwardIterator< T, ITER_IMP, TAG_TYPE >::operator* (  )  const [inherited]

Return a reference to the current, modifiable element. The behavior is undefined if this iterator has the past-the-end value for an iterator over the underlying sequence.

template<class T, class ITER_IMP, class TAG_TYPE = std::forward_iterator_tag>
T* bslstl::ForwardIterator< T, ITER_IMP, TAG_TYPE >::operator-> (  )  const [inherited]

Return a pointer to the current, modifiable element. The behavior is undefined if this iterator has the past-the-end value for an iterator over the underlying sequence.


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