Quick Links:

bal | bbl | bdl | bsl

Public Types | Public Member Functions | Friends

bsltf::TestValuesArrayIterator< VALUE > Class Template Reference

#include <bsltf_testvaluesarray.h>

List of all members.

Public Types

typedef std::input_iterator_tag iterator_category
typedef VALUE value_type
typedef ptrdiff_t difference_type
typedef const VALUE * pointer
typedef const VALUE & reference

Public Member Functions

 TestValuesArrayIterator (const VALUE *object, const VALUE *end, bool *dereferenceable, bool *isValid)
 TestValuesArrayIterator (const TestValuesArrayIterator &original)
TestValuesArrayIteratoroperator= (const TestValuesArrayIterator &other)
TestValuesArrayIteratoroperator++ ()
TestValuesArray_PostIncrementPtr
< VALUE > 
operator++ (int)
const VALUE & operator* () const
const VALUE * operator-> () const

Friends

template<class OTHER_VALUE >
bool operator== (const TestValuesArrayIterator< OTHER_VALUE > &, const TestValuesArrayIterator< OTHER_VALUE > &)
template<class OTHER_VALUE >
bool operator!= (const TestValuesArrayIterator< OTHER_VALUE > &, const TestValuesArrayIterator< OTHER_VALUE > &)

Detailed Description

template<class VALUE>
class bsltf::TestValuesArrayIterator< VALUE >

This class provide a STL-conforming input iterator over values used for testing (see section [24.2.3 input.iterators] of the C++11 standard. A TestValuesArrayIterator provide access to elements of parameterized type VALUE. An iterator is considered dereferenceable all of the following are satisfied:

  1. The iterator refers to a valid element (not end).
  2. The iterator has not been dereferenced.
  3. The iterator is not a copy of another iterator of which operator++ have been invoked.

An iterator is comparable if the iterator is not a copy of another iterator of which operator++ have been invoked.

This class is not thread-safe: different iterator objects manipulate shared state without synchronization. This is rarely a concern for the test scenarios supported by this component.

See Component bsltf_testvaluesarray


Member Typedef Documentation

template<class VALUE>
typedef std::input_iterator_tag bsltf::TestValuesArrayIterator< VALUE >::iterator_category
template<class VALUE>
typedef VALUE bsltf::TestValuesArrayIterator< VALUE >::value_type
template<class VALUE>
typedef ptrdiff_t bsltf::TestValuesArrayIterator< VALUE >::difference_type
template<class VALUE>
typedef const VALUE* bsltf::TestValuesArrayIterator< VALUE >::pointer
template<class VALUE>
typedef const VALUE& bsltf::TestValuesArrayIterator< VALUE >::reference

Constructor & Destructor Documentation

template<class VALUE>
bsltf::TestValuesArrayIterator< VALUE >::TestValuesArrayIterator ( const VALUE *  object,
const VALUE *  end,
bool *  dereferenceable,
bool *  isValid 
)

Create an iterator referring to the specified object for a container with the specified end, with two arrays of boolean referred to by the specified dereferenceable and isValid to indicate whether this iterator and its subsequent values until end is allowed to be dereferenced and is not yet invalidated respectively.

template<class VALUE>
bsltf::TestValuesArrayIterator< VALUE >::TestValuesArrayIterator ( const TestValuesArrayIterator< VALUE > &  original  ) 

Create an iterator having the same value as the specified original object. The behavior is undefined unless original is valid.


Member Function Documentation

template<class VALUE>
TestValuesArrayIterator& bsltf::TestValuesArrayIterator< VALUE >::operator= ( const TestValuesArrayIterator< VALUE > &  other  ) 

Assign to this object the value of the specified other object. The behavior is undefined unless other is valid.

template<class VALUE>
TestValuesArrayIterator& bsltf::TestValuesArrayIterator< VALUE >::operator++ (  ) 

Move this iterator to the next element in the container. Any copies of this iterator are no longer dereferenceable or comparable. The behavior is undefined unless this iterator refers to a valid value in the container.

template<class VALUE>
TestValuesArray_PostIncrementPtr<VALUE> bsltf::TestValuesArrayIterator< VALUE >::operator++ ( int   ) 

Move this iterator to the next element in the container, and return an object that can be dereferenced to refer to the same object that this iterator initially points to. Any copies of this iterator are no longer dereferenceable or comparable. The behavior is undefined unless this iterator refers to a valid value in the container.

template<class VALUE>
const VALUE& bsltf::TestValuesArrayIterator< VALUE >::operator* (  )  const

Return the value referred to by this object. This object is no longer dereferenceable after a call to this function. The behavior is undefined unless this iterator is dereferenceable.

template<class VALUE>
const VALUE* bsltf::TestValuesArrayIterator< VALUE >::operator-> (  )  const

Return the address of the element (of the template parameter VALUE) at which this iterator is positioned. The behavior is undefined unless this iterator dereferenceable.


Friends And Related Function Documentation

template<class VALUE>
template<class OTHER_VALUE >
bool operator== ( const TestValuesArrayIterator< OTHER_VALUE > &  ,
const TestValuesArrayIterator< OTHER_VALUE > &   
) [friend]
template<class VALUE>
template<class OTHER_VALUE >
bool operator!= ( const TestValuesArrayIterator< OTHER_VALUE > &  ,
const TestValuesArrayIterator< OTHER_VALUE > &   
) [friend]

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