PScalarArray< T > Class Template Reference

#include <array.h>

Inheritance diagram for PScalarArray< T >:

PBaseArray< T > PAbstractArray PContainer PObject List of all members.

Public Member Functions

Construction
 PScalarArray (PINDEX initialSize=0)
 PScalarArray (T const *buffer, PINDEX length, PBoolean dynamic=PTrue)

Protected Member Functions

virtual void ReadElementFrom (istream &stream, PINDEX index)

Detailed Description

template<class T>
class PScalarArray< T >

This template class maps the PAbstractArray to a specific element type. The functions in this class primarily do all the appropriate casting of types.

Note that if templates are not used the PSCALAR_ARRAY macro will simulate the template instantiation.

The following classes are instantiated automatically for the basic scalar types:


Constructor & Destructor Documentation

template<class T>
PScalarArray< T >::PScalarArray ( PINDEX  initialSize = 0  )  [inline]

Construct a new dynamic array of elements of the specified type. The array is initialised to all zero bytes. Note that this may not be logically equivalent to the zero value for the type, though this would be very rare.

Parameters:
initialSize  Initial number of elements in the array.

template<class T>
PScalarArray< T >::PScalarArray ( T const *  buffer,
PINDEX  length,
PBoolean  dynamic = PTrue 
) [inline]

Construct a new dynamic array of elements of the specified type.

Parameters:
buffer  Pointer to an array of the elements of type T.
length  Number of elements pointed to by buffer.
dynamic  Buffer is copied and dynamically allocated.


Member Function Documentation

template<class T>
virtual void PScalarArray< T >::ReadElementFrom ( istream &  stream,
PINDEX  index 
) [inline, protected, virtual]

Reimplemented from PAbstractArray.


The documentation for this class was generated from the following file:
Generated on Thu May 27 01:36:49 2010 for PTLib by  doxygen 1.4.7