#include <array.h>
Inheritance diagram for PScalarArray< T >:
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) |
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:
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.
initialSize | Initial number of elements in the array. |
PScalarArray< T >::PScalarArray | ( | T const * | buffer, | |
PINDEX | length, | |||
PBoolean | dynamic = PTrue | |||
) | [inline] |
Construct a new dynamic array of elements of the specified type.
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. |
virtual void PScalarArray< T >::ReadElementFrom | ( | istream & | stream, | |
PINDEX | index | |||
) | [inline, protected, virtual] |
Reimplemented from PAbstractArray.