class PStringArray: public PArray

This is an array collection class of PString objects.

Inheritance:


Public

[more] Construction
[more] New functions for class


Inherited from PArray:

Public

Overrides from class PObject


Inherited from PArrayObjects:

Public

Overrides from class PContainer

Overrides from class PCollection


Inherited from PCollection:

Public

Common functions for collections


Inherited from PContainer:

Public

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

Run Time Type functions

Comparison functions

I/O functions

Miscellaneous functions


Documentation

This is an array collection class of PString objects. It has all the usual functions for a collection, with the object types set to PString pointers.

In addition some addition functions are added that take a const PString reference instead of a pointer as most standard collection functions do. This is more convenient for when string expressions are used as parameters to function in the collection.

See the PAbstractArray and PArray classes and PDECLARE_ARRAY macro for more information.

o Construction

o PStringArray( PINDEX count, char const * const * strarr, BOOL caseless = FALSE )
Create a PStringArray from the array of C strings.
Parameters:
count - Count of strings in array
strarr - Array of C strings
caseless - New strings are to be PCaselessStrings

o PStringArray( const PStringList & list )
Create a PStringArray from the list of strings.
Parameters:
list - List of strings to convert to array.

o PStringArray( const PSortedStringList & list )
Create a PStringArray from the sorted list strings.
Parameters:
list - List of strings to convert to array.

o New functions for class

oPINDEX GetStringsIndex( const PString & str ) const
As for GetValuesIndex() but takes a PString argument so that literals will be automatically converted.

Returns:
Index of string in array or P_MAX_INDEX if not found.
Parameters:
str - String to search for index of

oPString& operator[]( PINDEX index )
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 will create a new one.

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


This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java



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