Main Page | Modules | Alphabetical List | Class List | File List | Class Members | File Members

arr2b< T > Class Template Reference
[Array classes]

#include <arr.h>

List of all members.

Public Member Functions

 arr2b ()
 arr2b (long sz1, long sz2)
 arr2b (const arr2b &orig)
 ~arr2b ()
long size1 () const
long size2 () const
long size () const
void alloc (long sz1, long sz2)
void dealloc ()
void fill (const T &val)
arr2boperator= (const arr2b &orig)
T * operator[] (long n)
T * operator[] (int n)
const T * operator[] (long n) const
const T * operator[] (int n) const
 operator T ** ()


Detailed Description

template<typename T>
class arr2b< T >

Two-dimensional array type. An entry is located by double dereferencing, i.e. via an array of pointers. The indices start at zero.

Definition at line 298 of file arr.h.


Constructor & Destructor Documentation

template<typename T>
arr2b< T >::arr2b  )  [inline]
 

Creates a zero-sized array.

Definition at line 316 of file arr.h.

template<typename T>
arr2b< T >::arr2b long  sz1,
long  sz2
[inline]
 

Creates an array with the dimensions sz1 and sz2.

Definition at line 318 of file arr.h.

template<typename T>
arr2b< T >::arr2b const arr2b< T > &  orig  )  [inline]
 

Creates the array as a copy of orig.

Definition at line 322 of file arr.h.

template<typename T>
arr2b< T >::~arr2b  )  [inline]
 

Frees the memory associated with the array.

Definition at line 330 of file arr.h.


Member Function Documentation

template<typename T>
long arr2b< T >::size1  )  const [inline]
 

Returns the first array dimension.

Definition at line 333 of file arr.h.

template<typename T>
long arr2b< T >::size2  )  const [inline]
 

Returns the second array dimension.

Definition at line 335 of file arr.h.

template<typename T>
long arr2b< T >::size  )  const [inline]
 

Returns the total array size, i.e. the product of both dimensions.

Definition at line 337 of file arr.h.

template<typename T>
void arr2b< T >::alloc long  sz1,
long  sz2
[inline]
 

Allocates space for an array with sz1*sz2 elements. The content of the array is undefined on exit.

Definition at line 341 of file arr.h.

template<typename T>
void arr2b< T >::dealloc  )  [inline]
 

Deallocates the space and makes the array zero-sized.

Definition at line 350 of file arr.h.

template<typename T>
void arr2b< T >::fill const T &  val  )  [inline]
 

Sets all array elements to val.

Definition at line 353 of file arr.h.

template<typename T>
arr2b& arr2b< T >::operator= const arr2b< T > &  orig  )  [inline]
 

Changes the array to be a copy of orig.

Definition at line 357 of file arr.h.

template<typename T>
T* arr2b< T >::operator[] long  n  )  [inline]
 

Returns a pointer to the beginning of slice #n.

Definition at line 372 of file arr.h.

template<typename T>
T* arr2b< T >::operator[] int  n  )  [inline]
 

Returns a pointer to the beginning of slice #n.

Definition at line 374 of file arr.h.

template<typename T>
const T* arr2b< T >::operator[] long  n  )  const [inline]
 

Returns a constant pointer to the beginning of slice #n.

Definition at line 376 of file arr.h.

template<typename T>
const T* arr2b< T >::operator[] int  n  )  const [inline]
 

Returns a constant pointer to the beginning of slice #n.

Definition at line 378 of file arr.h.

template<typename T>
arr2b< T >::operator T **  )  [inline]
 

Returns a pointer to the beginning of the pointer array.

Definition at line 381 of file arr.h.


The documentation for this class was generated from the following file:
Generated on Fri Jul 8 09:37:14 2005 for LevelS C++ support library