Dirac - A Video Codec

Created by the British Broadcasting Corporation.


dirac::OneDArray< T > Class Template Reference

A template class for one-dimensional arrays. More...

#include <arrays.h>

Inheritance diagram for dirac::OneDArray< T >:

Inheritance graph
[legend]
Collaboration diagram for dirac::OneDArray< T >:

Collaboration graph
[legend]
List of all members.

Public Member Functions

Private Member Functions

Private Attributes


Detailed Description

template<class T>
class dirac::OneDArray< T >

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.


Constructor & Destructor Documentation

template<class T>
dirac::OneDArray< T >::OneDArray  ) 
 

Default constructor produces an empty array.

template<class T>
dirac::OneDArray< T >::OneDArray const int  len  ) 
 

Length constructor produces a zero-based array.

template<class T>
dirac::OneDArray< T >::OneDArray const Range r  ) 
 

Range constructor produces an array with values indexed within the range parameters.

Parameters:
r a range of indexing values.

template<class T>
dirac::OneDArray< T >::~OneDArray  )  [inline]
 

Destructor frees the data allocated in the constructors.

template<class T>
dirac::OneDArray< T >::OneDArray const OneDArray< T > &  cpy  ) 
 

Copy constructor copies both data and metadata.


Member Function Documentation

template<class T>
int dirac::OneDArray< T >::First  )  const [inline]
 

template<class T>
void dirac::OneDArray< T >::FreePtr  )  [private]
 

template<class T>
void dirac::OneDArray< T >::Init const Range r  )  [private]
 

template<class T>
void dirac::OneDArray< T >::Init const int  len  )  [private]
 

template<class T>
int dirac::OneDArray< T >::Last  )  const [inline]
 

template<class T>
int dirac::OneDArray< T >::Length  )  const [inline]
 

template<class T>
OneDArray< T > & dirac::OneDArray< T >::operator= const OneDArray< T > &  rhs  ) 
 

Assignment= assigns both data and metadata.

template<class T>
const T& dirac::OneDArray< T >::operator[] const int  pos  )  const [inline]
 

template<class T>
T& dirac::OneDArray< T >::operator[] const int  pos  )  [inline]
 

template<class T>
void dirac::OneDArray< T >::Resize int  l  ) 
 


Member Data Documentation

template<class T>
int dirac::OneDArray< T >::m_first [private]
 

template<class T>
int dirac::OneDArray< T >::m_last [private]
 

template<class T>
int dirac::OneDArray< T >::m_length [private]
 

template<class T>
T* dirac::OneDArray< T >::m_ptr [private]
 


The documentation for this class was generated from the following file:

© 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.