BDE 4.14.0 Production release
Loading...
Searching...
No Matches
bsltf::TestValuesArray< VALUE, ALLOCATOR, CONVERTER > Class Template Reference

#include <bsltf_testvaluesarray.h>

Public Types

typedef TestValuesArrayIterator< VALUE > iterator
 Iterator for this container.
 

Public Member Functions

 TestValuesArray ()
 
 TestValuesArray (ALLOCATOR basicAllocator)
 
 TestValuesArray (const char *spec)
 
 TestValuesArray (const char *spec, ALLOCATOR basicAllocator)
 
 ~TestValuesArray ()
 Destroy this container and all contained elements.
 
iterator begin ()
 
iterator end ()
 
iterator index (size_t position)
 
void resetIterators ()
 Make all iterators dereferenceable and comparable again.
 
const VALUE * data () const
 
const VALUE & operator[] (size_t index) const
 
size_t size () const
 Return number of elements in this container.
 

Detailed Description

template<class VALUE, class ALLOCATOR = bsl::allocator<VALUE>, class CONVERTER = TestValuesArray_DefaultConverter<VALUE, ALLOCATOR>>
class bsltf::TestValuesArray< VALUE, ALLOCATOR, CONVERTER >

This class provides a container to store values of the (template parameter) type VALUE, and also provides the iterators to access the values. The iterators are designed to conform to a standard input iterator, and report any misuse of the iterator.

Member Typedef Documentation

◆ iterator

template<class VALUE , class ALLOCATOR = bsl::allocator<VALUE>, class CONVERTER = TestValuesArray_DefaultConverter<VALUE, ALLOCATOR>>
typedef TestValuesArrayIterator<VALUE> bsltf::TestValuesArray< VALUE, ALLOCATOR, CONVERTER >::iterator

Constructor & Destructor Documentation

◆ TestValuesArray() [1/4]

template<class VALUE , class ALLOCATOR , class CONVERTER >
bsltf::TestValuesArray< VALUE, ALLOCATOR, CONVERTER >::TestValuesArray ( )
explicit

◆ TestValuesArray() [2/4]

template<class VALUE , class ALLOCATOR , class CONVERTER >
bsltf::TestValuesArray< VALUE, ALLOCATOR, CONVERTER >::TestValuesArray ( ALLOCATOR  basicAllocator)
explicit

◆ TestValuesArray() [3/4]

template<class VALUE , class ALLOCATOR , class CONVERTER >
bsltf::TestValuesArray< VALUE, ALLOCATOR, CONVERTER >::TestValuesArray ( const char spec)
inlineexplicit

◆ TestValuesArray() [4/4]

template<class VALUE , class ALLOCATOR , class CONVERTER >
bsltf::TestValuesArray< VALUE, ALLOCATOR, CONVERTER >::TestValuesArray ( const char spec,
ALLOCATOR  basicAllocator 
)
inlineexplicit

Create a TestValuesArray object. Optionally, specify spec to indicate the values this object should contain, where the values are created by invoking the bsltf::TemplateTestFacility::create method on each character of spec. If no spec is supplied, the object will contain 52 distinct values of the (template parameter) type VALUE. Optionally, specify basicAllocator used to supply memory. If no allocator is supplied, a bslma::MallocFree allocator is used to supply memory.

◆ ~TestValuesArray()

template<class VALUE , class ALLOCATOR , class CONVERTER >
bsltf::TestValuesArray< VALUE, ALLOCATOR, CONVERTER >::~TestValuesArray ( )

Member Function Documentation

◆ begin()

template<class VALUE , class ALLOCATOR , class CONVERTER >
TestValuesArray< VALUE, ALLOCATOR, CONVERTER >::iterator bsltf::TestValuesArray< VALUE, ALLOCATOR, CONVERTER >::begin ( )
inline

Return an iterator providing non-modifiable access to the first VALUE object in the sequence of VALUE objects maintained by this container, or the end iterator if this container is empty.

◆ data()

template<class VALUE , class ALLOCATOR , class CONVERTER >
const VALUE * bsltf::TestValuesArray< VALUE, ALLOCATOR, CONVERTER >::data ( ) const
inline

Return the address of the non-modifiable first element in this container.

◆ end()

template<class VALUE , class ALLOCATOR , class CONVERTER >
TestValuesArray< VALUE, ALLOCATOR, CONVERTER >::iterator bsltf::TestValuesArray< VALUE, ALLOCATOR, CONVERTER >::end ( )
inline

Return an iterator providing access to the past-the-end position in the sequence of VALUE objects maintained by this container.

◆ index()

template<class VALUE , class ALLOCATOR , class CONVERTER >
TestValuesArray< VALUE, ALLOCATOR, CONVERTER >::iterator bsltf::TestValuesArray< VALUE, ALLOCATOR, CONVERTER >::index ( size_t  position)
inline

Return an iterator to the element at the specified position. The behavior is undefined unless position <= size().

◆ operator[]()

template<class VALUE , class ALLOCATOR , class CONVERTER >
const VALUE & bsltf::TestValuesArray< VALUE, ALLOCATOR, CONVERTER >::operator[] ( size_t  index) const
inline

Return a reference providing non-modifiable access to the element at the specified index. The behavior is undefined unless 0 < size() && index < size().

◆ resetIterators()

template<class VALUE , class ALLOCATOR , class CONVERTER >
void bsltf::TestValuesArray< VALUE, ALLOCATOR, CONVERTER >::resetIterators ( )

◆ size()

template<class VALUE , class ALLOCATOR , class CONVERTER >
size_t bsltf::TestValuesArray< VALUE, ALLOCATOR, CONVERTER >::size ( ) const
inline

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