#include <it_bus/array_t.h>
Inheritance diagram for IT_Bus::ArrayT< T >:
An array is the C++ representation used for the following XML schema:
<xsd:complexType name="MyArray"> <xsd:sequence> <xsd:element name="item" type="xsd:int" minOccurs="0" maxOccurs="unbounded"/> </xsd:sequence> </xsd:complexType>
An array supports the same operations as a vector and can be treated as such. It may also be implicitly cast to a vector. When created using the default constructor the array will have zero elements rather than MIN_OCCURS element.
Note that specifying a non-existent (index >= size()) element using the subscript operator has undefined behaviour.
Definition at line 35 of file array_t.h.
Public Member Functions | |
ArrayT () | |
Default constructor. | |
operator const IT_Vector () const | |
Cast operator to obtain array as a const vector. | |
operator IT_Vector () | |
Cast operator to obtain array as a vector. | |
IT_Vector< T >::ConstReference | operator[] (const size_t pos) const |
Returns a const reference to the specified element in the array. | |
IT_Vector< T >::Reference | operator[] (const size_t pos) |
Returns a reference to the specified element in the array. | |
IT_Vector< T >::Iterator | begin () |
Returns an iterator that references the beginning of the array. | |
IT_Vector< T >::ConstIterator | begin () const |
Returns a const iterator that references the beginning of the array. | |
IT_Vector< T >::Iterator | end () |
Returns an iterator that references a position past the end of the array. | |
IT_Vector< T >::ConstIterator | end () const |
Returns a const iterator that references a position past the end of the array. | |
IT_Vector< T >::ReverseIterator | rbegin () |
Returns a reverse iterator which points to the last element in the array. | |
IT_Vector< T >::ConstReverseIterator | rbegin () const |
Returns a const reverse iterator which points to the last element in the array. | |
IT_Vector< T >::ReverseIterator | rend () |
Returns a reverse iterator which points to just past the first element in the array. | |
IT_Vector< T >::ConstReverseIterator | rend () const |
Returns a const reverse iterator which points to just past the first element in the array. | |
IT_Vector< T >::SizeType | size () const |
Returns the number of items (elements) currently stored in the array. | |
IT_Vector< T >::SizeType | get_size () const |
Returns the number of items (elements) currently stored in the array. | |
void | set_size (typename IT_Vector< T >::SizeType sz) |
Sets the number of items (elements) currently stored in the array. | |
IT_Vector< T >::SizeType | capacity () const |
IT_Bool | empty () const |
Returns a true value if the number of elements is zero, false otherwise. | |
IT_Vector< T >::Reference | front () |
Returns a reference to the first element in the array. | |
IT_Vector< T >::ConstReference | front () const |
Returns a const reference to the first element in the array. | |
IT_Vector< T >::Reference | back () |
Returns a reference to the last element in the array. | |
IT_Vector< T >::ConstReference | back () const |
Returns a const reference to the last element in the array. | |
void | push_back (const T &item, IT_ExceptionHandler &=IT_EXCEPTION_HANDLER) |
Adds the item specified at the end of the array. | |
IT_Vector< T >::Iterator | insert (typename IT_Vector< T >::Iterator pos, const T &item, IT_ExceptionHandler &eh=IT_EXCEPTION_HANDLER) |
Inserts the item specified at the indicated position in the array. | |
void | insert (typename IT_Vector< T >::Iterator pos, typename IT_Vector< T >::SizeType n, const T &init_val=T(), IT_ExceptionHandler &eh=IT_EXCEPTION_HANDLER) |
Inserts the item specified (n) times at the indicated position in the array. | |
void | insert (typename IT_Vector< T >::Iterator pos, const T *first, const T *last, IT_ExceptionHandler &eh=IT_EXCEPTION_HANDLER) |
Inserts the items specified from a source C++ array at the indicated position in the array. | |
void | pop_back () |
Removes the last item in the array. | |
IT_Vector< T >::Iterator | erase (typename IT_Vector< T >::Iterator pos, IT_ExceptionHandler &eh=IT_EXCEPTION_HANDLER) |
Erases the item specified in the array. | |
IT_Vector< T >::Iterator | erase (typename IT_Vector< T >::Iterator first, typename IT_Vector< T >::Iterator last, IT_ExceptionHandler &eh=IT_EXCEPTION_HANDLER) |
Erases the items specified in the array. |
IT_Vector<T>::ConstReference IT_Bus::ArrayT< T >::back | ( | ) | const [inline] |
IT_Vector<T>::Reference IT_Bus::ArrayT< T >::back | ( | ) | [inline] |
IT_Vector<T>::ConstIterator IT_Bus::ArrayT< T >::begin | ( | ) | const [inline] |
IT_Vector<T>::Iterator IT_Bus::ArrayT< T >::begin | ( | ) | [inline] |
IT_Bool IT_Bus::ArrayT< T >::empty | ( | ) | const [inline] |
IT_Vector<T>::ConstIterator IT_Bus::ArrayT< T >::end | ( | ) | const [inline] |
IT_Vector<T>::Iterator IT_Bus::ArrayT< T >::end | ( | ) | [inline] |
IT_Vector<T>::Iterator IT_Bus::ArrayT< T >::erase | ( | typename IT_Vector< T >::Iterator | first, | |
typename IT_Vector< T >::Iterator | last, | |||
IT_ExceptionHandler & | eh = IT_EXCEPTION_HANDLER | |||
) | [inline] |
IT_Vector<T>::Iterator IT_Bus::ArrayT< T >::erase | ( | typename IT_Vector< T >::Iterator | pos, | |
IT_ExceptionHandler & | eh = IT_EXCEPTION_HANDLER | |||
) | [inline] |
IT_Vector<T>::ConstReference IT_Bus::ArrayT< T >::front | ( | ) | const [inline] |
IT_Vector<T>::Reference IT_Bus::ArrayT< T >::front | ( | ) | [inline] |
IT_Vector<T>::SizeType IT_Bus::ArrayT< T >::get_size | ( | ) | const [inline] |
void IT_Bus::ArrayT< T >::insert | ( | typename IT_Vector< T >::Iterator | pos, | |
const T * | first, | |||
const T * | last, | |||
IT_ExceptionHandler & | eh = IT_EXCEPTION_HANDLER | |||
) | [inline] |
Inserts the items specified from a source C++ array at the indicated position in the array.
pos | The position at which to insert the items. | |
first | The first item in the source C++ array to insert. | |
last | The last item in the source C++ array to insert. | |
eh | An optional exception handler to catch errors. |
void IT_Bus::ArrayT< T >::insert | ( | typename IT_Vector< T >::Iterator | pos, | |
typename IT_Vector< T >::SizeType | n, | |||
const T & | init_val = T() , |
|||
IT_ExceptionHandler & | eh = IT_EXCEPTION_HANDLER | |||
) | [inline] |
Inserts the item specified (n) times at the indicated position in the array.
pos | The position at which to insert the item. | |
n | The number of times to insert the array item. | |
init_val | The item to add to the end of the array. | |
eh | An optional exception handler to catch errors. |
IT_Vector<T>::Iterator IT_Bus::ArrayT< T >::insert | ( | typename IT_Vector< T >::Iterator | pos, | |
const T & | item, | |||
IT_ExceptionHandler & | eh = IT_EXCEPTION_HANDLER | |||
) | [inline] |
IT_Bus::ArrayT< T >::operator const IT_Vector | ( | ) | const [inline] |
IT_Bus::ArrayT< T >::operator IT_Vector | ( | ) | [inline] |
IT_Vector<T>::Reference IT_Bus::ArrayT< T >::operator[] | ( | const size_t | pos | ) | [inline] |
Returns a reference to the specified element in the array.
Note that specifying a non-existent (pos >= size()) element has undefined behaviour.
pos | The position of the element to get the reference for. Note the position of first element is 0. |
IT_Vector<T>::ConstReference IT_Bus::ArrayT< T >::operator[] | ( | const size_t | pos | ) | const [inline] |
Returns a const reference to the specified element in the array.
Note that specifying a non-existent (pos >= size()) element has undefined behaviour.
pos | The position of the element to get the reference for. Note the position of first element is 0. |
void IT_Bus::ArrayT< T >::push_back | ( | const T & | item, | |
IT_ExceptionHandler & | = IT_EXCEPTION_HANDLER | |||
) | [inline] |
IT_Vector<T>::ConstReverseIterator IT_Bus::ArrayT< T >::rbegin | ( | ) | const [inline] |
IT_Vector<T>::ReverseIterator IT_Bus::ArrayT< T >::rbegin | ( | ) | [inline] |
IT_Vector<T>::ConstReverseIterator IT_Bus::ArrayT< T >::rend | ( | ) | const [inline] |
IT_Vector<T>::ReverseIterator IT_Bus::ArrayT< T >::rend | ( | ) | [inline] |
void IT_Bus::ArrayT< T >::set_size | ( | typename IT_Vector< T >::SizeType | sz | ) | [inline] |
IT_Vector<T>::SizeType IT_Bus::ArrayT< T >::size | ( | ) | const [inline] |