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::OneDArray | ( | ) |
Default constructor produces an empty array.
dirac::OneDArray::OneDArray | ( | const int | len | ) |
Length constructor produces a zero-based array.
dirac::OneDArray::OneDArray | ( | const Range & | r | ) |
Range constructor produces an array with values indexed within the range parameters.
r | a range of indexing values. |
dirac::OneDArray::~OneDArray | ( | ) | [inline] |
Destructor frees the data allocated in the constructors.
dirac::OneDArray::OneDArray | ( | const OneDArray< T > & | cpy | ) |
int dirac::OneDArray::First | ( | ) | const [inline] |
void dirac::OneDArray::FreePtr | ( | ) | [private] |
Referenced by dirac::OneDArray< ImageCoords >::~OneDArray().
void dirac::OneDArray::Init | ( | const int | len | ) | [private] |
void dirac::OneDArray::Init | ( | const Range & | r | ) | [private] |
int dirac::OneDArray::Last | ( | ) | const [inline] |
int dirac::OneDArray::Length | ( | ) | const [inline] |
T& dirac::OneDArray::operator[] | ( | const int | pos | ) | [inline] |
const T& dirac::OneDArray::operator[] | ( | const int | pos | ) | const [inline] |
void dirac::OneDArray::Resize | ( | int | l | ) |
int dirac::OneDArray::m_first [private] |
int dirac::OneDArray::m_last [private] |
Referenced by dirac::OneDArray< ImageCoords >::Last(), OneDArray(), and operator=().
int dirac::OneDArray::m_length [private] |
Referenced by dirac::OneDArray< ImageCoords >::Length(), and operator=().
T* dirac::OneDArray::m_ptr [private] |
Referenced by dirac::OneDArray< ImageCoords >::operator[](), OneDArray(), and operator=().
© 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.