Created by the British Broadcasting Corporation.
A template class for one-dimensional arrays. More...
#include <arrays.h>
A template class for one-D arrays. Can be used wherever built-in arrays are used, and eliminates the need for explicit memory (de-)allocation. Also supports arrays not based at zero.
dirac::OneDArray< T >::OneDArray | ( | ) |
Default constructor produces an empty array.
dirac::OneDArray< T >::OneDArray | ( | const int | len | ) |
Length constructor produces a zero-based array.
dirac::OneDArray< T >::OneDArray | ( | const Range & | r | ) |
Range constructor produces an array with values indexed within the range parameters.
r | a range of indexing values. |
dirac::OneDArray< T >::~OneDArray | ( | ) | [inline] |
Destructor frees the data allocated in the constructors.
dirac::OneDArray< T >::OneDArray | ( | const OneDArray< T > & | cpy | ) |
Copy constructor copies both data and metadata.
References dirac::OneDArray< T >::m_first, dirac::OneDArray< T >::m_last, and dirac::OneDArray< T >::m_ptr.
int dirac::OneDArray< T >::First | ( | ) | const [inline] |
void dirac::OneDArray< T >::FreePtr | ( | ) | [private] |
Referenced by dirac::OneDArray< ImageCoords >::~OneDArray().
void dirac::OneDArray< T >::Init | ( | const Range & | r | ) | [private] |
References dirac::Range::First(), and dirac::Range::Last().
void dirac::OneDArray< T >::Init | ( | const int | len | ) | [private] |
int dirac::OneDArray< T >::Last | ( | ) | const [inline] |
int dirac::OneDArray< T >::Length | ( | ) | const [inline] |
OneDArray< T > & dirac::OneDArray< T >::operator= | ( | const OneDArray< T > & | rhs | ) |
Assignment= assigns both data and metadata.
References dirac::OneDArray< T >::m_first, dirac::OneDArray< T >::m_last, dirac::OneDArray< T >::m_length, and dirac::OneDArray< T >::m_ptr.
const T& dirac::OneDArray< T >::operator[] | ( | const int | pos | ) | const [inline] |
T& dirac::OneDArray< T >::operator[] | ( | const int | pos | ) | [inline] |
void dirac::OneDArray< T >::Resize | ( | int | l | ) |
int dirac::OneDArray< T >::m_first [private] |
int dirac::OneDArray< T >::m_last [private] |
int dirac::OneDArray< T >::m_length [private] |
Referenced by dirac::OneDArray< ImageCoords >::Length(), and dirac::OneDArray< T >::operator=().
T* dirac::OneDArray< T >::m_ptr [private] |
© 2004 British Broadcasting Corporation.
Dirac code licensed under the Mozilla Public License (MPL) Version 1.1.
HTML documentation generated by Dimitri van Heesch's
excellent Doxygen tool.