#include <array1d.h>

Public Member Functions | |
| Array1D (void) | |
| Array1D (unsigned int length) | |
| Array1D (const Array1D< T > &v) | |
| virtual | ~Array1D () |
| virtual unsigned int | size (void) const |
| virtual AbstractIterator< T > * | iteratorPtr (void) const |
| Array1D< T >::Iterator | iterator (void) const |
| virtual void | purge (void) |
| virtual bool | isEmpty (void) const |
| virtual const T & | operator[] (int index) const throw (OutOfRangeException<int>) |
| virtual T & | operator[] (int index) throw (OutOfRangeException<int>) |
| void | operator= (const Array1D< T > &v) |
| virtual T & | first (void) throw (EmptyCollectionException) |
| virtual const T & | first (void) const throw (EmptyCollectionException) |
| virtual T & | last (void) throw (EmptyCollectionException) |
| virtual const T & | last (void) const throw (EmptyCollectionException) |
Classes | |
| class | Iterator |
| seal::Array1D< T >::Array1D | ( | void | ) | [inline] |
Default Constructor. It initialises a vector of size zero. It is practically useless as one cannot resize the array after construction.
| seal::Array1D< T >::Array1D | ( | unsigned int | length | ) | [inline] |
This constructor initialises a vector with the specified size/length.
| length | An array of this size will be constructed. |
| seal::Array1D< T >::Array1D | ( | const Array1D< T > & | v | ) | [inline] |
Copy constructor. It is only a reference copier.
| seal::Array1D< T >::~Array1D | ( | ) | [inline, virtual] |
Destructor.
| virtual unsigned int seal::Array1D< T >::size | ( | void | ) | const [inline, virtual] |
Returns the siza/lengthe of the array.
Implements seal::Collection< T >.
| virtual AbstractIterator<T>* seal::Array1D< T >::iteratorPtr | ( | void | ) | const [inline, virtual] |
Returns a pointer to an iterator of the array. This iterator can be used to iterate over the array elements starting from the element with index 0 to the last element in the array. The client of this function should be responsible of deleting the returned iterator object using delete.
Implements seal::Collection< T >.
| Array1D<T>::Iterator seal::Array1D< T >::iterator | ( | void | ) | const [inline] |
Returns the iterator of the array object. This iterator can be used to iterator over the array elements starting from the element with index 0 to the last element in the array.
| virtual void seal::Array1D< T >::purge | ( | void | ) | [inline, virtual] |
Deletes all the elements of the array. The size of the array will be zero after a call to this function. Note however that one cannot resize the array again to a non-zero size!
Implements seal::Collection< T >.
| virtual bool seal::Array1D< T >::isEmpty | ( | void | ) | const [inline, virtual] |
Returns true if the array size is zero. Else, it returns false for arrays of a non-zero size.
Implements seal::Collection< T >.
| const T & seal::Array1D< T >::operator[] | ( | int | index | ) | const throw (OutOfRangeException<int>) [inline, virtual] |
Array indexing operator. Throws OutOfRangeException<int> if an element with an invalid index is requested
Implements seal::RandomAccess< T >.
| T & seal::Array1D< T >::operator[] | ( | int | index | ) | throw (OutOfRangeException<int>) [inline, virtual] |
Array indexing operator. Throws OutOfRangeException<int> if an element with an invalid index is requested
Implements seal::RandomAccess< T >.
| void seal::Array1D< T >::operator= | ( | const Array1D< T > & | v | ) | [inline] |
Assignment operator. It is only a reference copier. That is, after the assignment, the left array and the right array will share the same data.
| T & seal::Array1D< T >::first | ( | void | ) | throw (EmptyCollectionException) [inline, virtual] |
Returns a reference to the first element in the array. Throws an seal::EmptyCollectionException if the array is empty.
Implements seal::Collection< T >.
| const T & seal::Array1D< T >::first | ( | void | ) | const throw (EmptyCollectionException) [inline, virtual] |
Returns a constant reference to the first element in the array. Throws an seal::EmptyCollectionException if the array is empty.
Implements seal::Collection< T >.
| T & seal::Array1D< T >::last | ( | void | ) | throw (EmptyCollectionException) [inline, virtual] |
Returns a reference to the last element in the array. Throws an seal::EmptyCollectionException if the array is empty.
Implements seal::Collection< T >.
| const T & seal::Array1D< T >::last | ( | void | ) | const throw (EmptyCollectionException) [inline, virtual] |
Returns a constant reference to the last element in the array. Throws an seal::EmptyCollectionException if the array is empty.
Implements seal::Collection< T >.
1.5.5