Dirac - A Video Codec

Created by the British Broadcasting Corporation.


Public Member Functions | Private Member Functions | Private Attributes
dirac::OneDArray Class Reference

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

#include <arrays.h>

Inheritance diagram for dirac::OneDArray:
Inheritance graph
[legend]

List of all members.

Public Member Functions

Private Member Functions

Private Attributes


Detailed Description

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

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.

Parameters:
ra range of indexing values.
dirac::OneDArray::~OneDArray ( ) [inline]

Destructor frees the data allocated in the constructors.

dirac::OneDArray::OneDArray ( const OneDArray< T > &  cpy)

Copy constructor copies both data and metadata.

References m_first, m_last, and m_ptr.


Member Function Documentation

int dirac::OneDArray::First ( ) const [inline]
void dirac::OneDArray::FreePtr ( ) [private]
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]
OneDArray< T > & dirac::OneDArray::operator= ( const OneDArray< T > &  rhs)

Assignment= assigns both data and metadata.

References m_first, m_last, m_length, and m_ptr.

T& dirac::OneDArray::operator[] ( const int  pos) [inline]
const T& dirac::OneDArray::operator[] ( const int  pos) const [inline]
void dirac::OneDArray::Resize ( int  l)

Member Data Documentation

int dirac::OneDArray::m_last [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.