PTLib  Version 2.10.4
PStringToOrdinal Class Reference

This is a dictionary collection class of ordinals keyed by PString objects. More...

#include <pstring.h>

Inheritance diagram for PStringToOrdinal:
POrdinalDictionary< K > PAbstractDictionary PHashTable PCollection PContainer PObject

List of all members.

Classes

struct  Initialiser
 Structure for static array initialiser for class. More...

Public Member Functions

Construction
 PStringToOrdinal (PINDEX count, const Initialiser *init, PBoolean caseless=false)
 Initialise the string dictionary of ordinals from the static array.
Overrides from class PObject
virtual void ReadFrom (istream &strm)
 Input the contents of the object from the stream.

Detailed Description

This is a dictionary collection class of ordinals keyed by PString objects.

It has all the usual functions for a collection, with the object types set to POrdinalKey pointers.

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

See the PAbstractDicionary and POrdinalDictionary classes for more information.


Constructor & Destructor Documentation

PStringToOrdinal::PStringToOrdinal ( PINDEX  count,
const Initialiser init,
PBoolean  caseless = false 
)

Initialise the string dictionary of ordinals from the static array.

Parameters:
countCount of strings in initialiser array
initArray of Initialiser structures
caselessNew keys are to be PCaselessStrings

Member Function Documentation

virtual void PStringToOrdinal::ReadFrom ( istream &  strm) [virtual]

Input the contents of the object from the stream.

This is primarily used by the standard operator>> function.

The default behaviour reads '\n' separated strings until !strm.good().

Reimplemented from PObject.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines