class PSortedStringList: public PSortedList

This is a sorted list collection class of PString objects.

Inheritance:


Public

[more] Construction
[more] Operations


Inherited from PSortedList:

Public

Overrides from class PObject

New functions for class


Inherited from PAbstractSortedList:

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 a sorted list 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 PAbstractSortedList and PSortedList classes and PDECLARE_SORTEDLIST macro for more information.

o Construction

o PSortedStringList( 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 PSortedStringList( const PStringArray & array )
Create a PSortedStringList from the array of strings.
Parameters:
array - Array of strings to convert to list

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

o Operations

oPINDEX AppendString( const PString & str )
Add a string to the list. This will place the string in the correct position in the sorted list.
Parameters:
str - String to append.

oPINDEX GetStringsIndex( const PString & str ) const
Get the index of the string with the specified value. A binary search of tree is performed to find the string value.
Parameters:
str - String value to search for.


This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java



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