Created by the British Broadcasting Corporation.
#include <arrays.h>
typedef T* dirac::TwoDArray< T >::element_type [private] |
dirac::TwoDArray< T >::TwoDArray | ( | ) | [inline] |
Default constructor creates an empty array.
dirac::TwoDArray< T >::TwoDArray | ( | const int | height, | |
const int | width | |||
) | [inline] |
The constructor creates an array of given width height.
dirac::TwoDArray< T >::TwoDArray | ( | const int | height, | |
const int | width, | |||
T | val | |||
) | [inline] |
The constructor creates an array of given width and length height and initialises it to a value
References dirac::TwoDArray< T >::Init(), dirac::TwoDArray< T >::m_array_of_rows, dirac::TwoDArray< T >::m_length_x, and dirac::TwoDArray< T >::m_length_y.
virtual dirac::TwoDArray< T >::~TwoDArray | ( | ) | [inline, virtual] |
Destructor frees the data allocated in the constructor.
dirac::TwoDArray< T >::TwoDArray | ( | const TwoDArray< T > & | Cpy | ) | [inline] |
Copy constructor copies data and metadata.
References dirac::TwoDArray< T >::Init(), dirac::TwoDArray< T >::m_array_of_rows, dirac::TwoDArray< T >::m_first_x, dirac::TwoDArray< T >::m_first_y, dirac::TwoDArray< T >::m_last_x, dirac::TwoDArray< T >::m_last_y, dirac::TwoDArray< T >::m_length_x, and dirac::TwoDArray< T >::m_length_y.
TwoDArray< T > & dirac::TwoDArray< T >::operator= | ( | const TwoDArray< T > & | rhs | ) | [inline] |
Assignement = assigns both data and metadata.
References dirac::TwoDArray< T >::FreeData(), dirac::TwoDArray< T >::Init(), dirac::TwoDArray< T >::m_array_of_rows, dirac::TwoDArray< T >::m_first_x, dirac::TwoDArray< T >::m_first_y, dirac::TwoDArray< T >::m_last_x, dirac::TwoDArray< T >::m_last_y, dirac::TwoDArray< T >::m_length_x, and dirac::TwoDArray< T >::m_length_y.
bool dirac::TwoDArray< T >::CopyContents | ( | TwoDArray< T > & | out | ) | const [inline] |
Copy contents of array into output array retaining the dimensions of the output array. If output array is larger that array then pad with last true value. Return true is copy was successful
References dirac::TwoDArray< T >::m_array_of_rows, dirac::TwoDArray< T >::m_length_x, and dirac::TwoDArray< T >::m_length_y.
void dirac::TwoDArray< T >::Fill | ( | T | val | ) | [inline] |
Initialise the array with the val provided.
References dirac::TwoDArray< T >::m_array_of_rows, dirac::TwoDArray< T >::m_length_x, and dirac::TwoDArray< T >::m_length_y.
void dirac::TwoDArray< T >::Resize | ( | const int | height, | |
const int | width | |||
) | [inline] |
element_type& dirac::TwoDArray< T >::operator[] | ( | const int | pos | ) | [inline] |
Accesses the rows of the arrays, which are returned in the form of pointers to the row data NOT OneDArray objects.
const element_type& dirac::TwoDArray< T >::operator[] | ( | const int | pos | ) | const [inline] |
Accesses the rows of the arrays, which are returned in the form of pointers to the row data NOT OneDArray objects.
int dirac::TwoDArray< T >::LengthX | ( | ) | const [inline] |
Referenced by dirac::operator>>().
int dirac::TwoDArray< T >::LengthY | ( | ) | const [inline] |
Referenced by dirac::operator>>().
int dirac::TwoDArray< T >::FirstX | ( | ) | const [inline] |
int dirac::TwoDArray< T >::FirstY | ( | ) | const [inline] |
int dirac::TwoDArray< T >::LastX | ( | ) | const [inline] |
int dirac::TwoDArray< T >::LastY | ( | ) | const [inline] |
void dirac::TwoDArray< T >::Init | ( | const int | height, | |
const int | width | |||
) | [inline, private] |
References dirac::TwoDArray< T >::m_array_of_rows, dirac::TwoDArray< T >::m_first_x, dirac::TwoDArray< T >::m_first_y, dirac::TwoDArray< T >::m_last_x, dirac::TwoDArray< T >::m_last_y, dirac::TwoDArray< T >::m_length_x, and dirac::TwoDArray< T >::m_length_y.
Referenced by dirac::TwoDArray< T >::operator=(), dirac::TwoDArray< T >::Resize(), and dirac::TwoDArray< T >::TwoDArray().
void dirac::TwoDArray< T >::FreeData | ( | ) | [inline, private] |
int dirac::TwoDArray< T >::m_first_x [private] |
int dirac::TwoDArray< T >::m_first_y [private] |
int dirac::TwoDArray< T >::m_last_x [private] |
int dirac::TwoDArray< T >::m_last_y [private] |
int dirac::TwoDArray< T >::m_length_x [private] |
int dirac::TwoDArray< T >::m_length_y [private] |
element_type* dirac::TwoDArray< T >::m_array_of_rows [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.