template<class T> class PArray

This template class maps the PArrayObjects to a specific object type.

Inheritance:


Public Methods

[more] Construction
[more] Overrides from class PObject
[more] New functions for class


Inherited from PArrayObjects:

Public Methods

Overrides from class PContainer

Overrides from class PCollection


Inherited from PCollection:

Public Methods

Common functions for collections


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

Public Members

Comparison functions


Documentation

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

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

o Construction

o PArray( PINDEX initialSize = 0 )
Create a new array of objects. The array is initially set to the specified size with each entry having NULL as is pointer value.

Note that by default, objects placed into the list will be deleted when removed or when all references to the list are destroyed.

Parameters:
initialSize - Initial number of objects in the array.

o Overrides from class PObject

ovirtual PObject* Clone() const
Make a complete duplicate of the array. Note that all objects in the array are also cloned, so this will make a complete copy of the array.

o New functions for class

oT& operator[]( PINDEX index ) const
Retrieve a reference to the object in the array. If there was not an object at that ordinal position or the index was beyond the size of the array then the function asserts.

Parameters:
index - Index position in the collection of the object.
Returns:
reference to the object at index position.


Direct child classes:
PStringArray

Alphabetic index HTML hierarchy of classes or Java



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