template<class T> class PScalarArray

This template class maps the PAbstractArray to a specific element type.

Inheritance:


Public Methods

[more] Construction


Inherited from PBaseArray:

Public Methods

Overrides from class PObject

Overrides from class PContainer

New functions for class


Inherited from PAbstractArray:

Protected Fields

oPINDEX elementSize
ochar* theArray
oBOOL allocatedDynamically


Inherited from PContainer:

Public Methods

Common functions for containers

Protected Methods

ovirtual void DestroyContents()
ovirtual void AssignContents(const PContainer & c)
ovoid CopyContents(const PContainer & c)
ovoid CloneContents(const PContainer* src)
ovoid Destruct()


Inherited from PObject:

Public Methods

Run Time Type functions

I/O functions

Miscellaneous functions

Public Members

Comparison functions


Documentation

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:

o Construction

o PScalarArray( PINDEX initialSize = 0 )
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.

o PScalarArray( T const* buffer, PINDEX length, BOOL dynamic = TRUE )
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.


This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.