dict.h File Reference

#include <ptlib/array.h>

Go to the source code of this file.

Classes

class  POrdinalKey
struct  PHashTableElement
class  PHashTable
class  PAbstractSet
class  PSet< T >
class  PAbstractDictionary
class  PDictionary< K, D >
class  POrdinalDictionary< K >

Defines

#define PSET(cls, T)   typedef PSet<T> cls
#define PDECLARE_SET(cls, T, initDelObj)
#define PDICTIONARY(cls, K, D)   typedef PDictionary<K, D> cls
#define PDECLARE_DICTIONARY(cls, K, D)
#define PORDINAL_DICTIONARY(cls, K)   typedef POrdinalDictionary<K> cls
#define PDECLARE_ORDINAL_DICTIONARY(cls, K)

Functions

 PSET (POrdinalSet, POrdinalKey)


Define Documentation

#define PDECLARE_DICTIONARY ( cls,
K,
 ) 

Value:

PDICTIONARY(cls##_PTemplate, K, D); \
  PDECLARE_CLASS(cls, cls##_PTemplate) \
  protected: \
    cls(int dummy, const cls * c) \
      : cls##_PTemplate(dummy, c) { } \
  public: \
    cls() \
      : cls##_PTemplate() { } \
    virtual PObject * Clone() const \
      { return PNEW cls(0, this); } \
Begin declaration of dictionary class. This macro is used to declare a descendent of PAbstractDictionary class, customised for a particular key type { K} and data object type { D}.

If the compilation is using templates then this macro produces a descendent of the PDictionary# template class. If templates are not being used then the macro defines a set of inline functions to do all casting of types. The resultant classes have an identical set of functions in either case.

See the PDictionary# and PAbstractDictionary# classes for more information.

#define PDECLARE_ORDINAL_DICTIONARY ( cls,
 ) 

Value:

PORDINAL_DICTIONARY(cls##_PTemplate, K); \
  PDECLARE_CLASS(cls, POrdinalDictionary<K>) \
  protected: \
    cls(int dummy, const cls * c) \
      : cls##_PTemplate(dummy, c) { } \
  public: \
    cls() \
      : cls##_PTemplate() { } \
    virtual PObject * Clone() const \
      { return PNEW cls(0, this); } \
Begin declaration of an ordinal dictionary class. This macro is used to declare a descendent of PAbstractList class, customised for a particular key type { K} and data object type of POrdinalKey#.

If the compilation is using templates then this macro produces a descendent of the POrdinalDictionary# template class. If templates are not being used then the macro defines a set of inline functions to do all casting of types. The resultant classes have an identical set of functions in either case.

See the POrdinalDictionary# and PAbstractDictionary# classes for more information.

#define PDECLARE_SET ( cls,
T,
initDelObj   ) 

Value:

PSET(cls##_PTemplate, T); \
  PDECLARE_CLASS(cls, cls##_PTemplate) \
  protected: \
    cls(int dummy, const cls * c) \
      : cls##_PTemplate(dummy, c) { } \
  public: \
    cls(PBoolean initialDeleteObjects = initDelObj) \
      : cls##_PTemplate(initialDeleteObjects) { } \
    virtual PObject * Clone() const \
      { return PNEW cls(0, this); } \
Begin declaration of a set class. This macro is used to declare a descendent of PAbstractSet class, customised for a particular object type { T}.

If the compilation is using templates then this macro produces a descendent of the PSet# template class. If templates are not being used then the macro defines a set of inline functions to do all casting of types. The resultant classes have an identical set of functions in either case.

See the PSet# and PAbstractSet# classes for more information.

#define PDICTIONARY ( cls,
K,
 )     typedef PDictionary<K, D> cls

Declare a dictionary class. This macro is used to declare a descendent of PAbstractDictionary class, customised for a particular key type { K} and data object type { D}. This macro closes the class declaration off so no additional members can be added.

If the compilation is using templates then this macro produces a typedef of the PDictionary# template class.

See the PDictionary# class and PDECLARE_DICTIONARY# macro for more information.

#define PORDINAL_DICTIONARY ( cls,
 )     typedef POrdinalDictionary<K> cls

Declare an ordinal dictionary class. This macro is used to declare a descendent of PAbstractDictionary class, customised for a particular key type { K} and data object type of POrdinalKey#. This macro closes the class declaration off so no additional members can be added.

If the compilation is using templates then this macro produces a typedef of the POrdinalDictionary# template class.

See the POrdinalDictionary# class and PDECLARE_ORDINAL_DICTIONARY# macro for more information.

#define PSET ( cls,
 )     typedef PSet<T> cls

Declare set class. This macro is used to declare a descendent of PAbstractSet class, customised for a particular object type { T}. This macro closes the class declaration off so no additional members can be added.

If the compilation is using templates then this macro produces a typedef of the PSet# template class.

See the PSet# class and PDECLARE_SET# macro for more information.


Function Documentation

PSET ( POrdinalSet  ,
POrdinalKey   
)


Generated on Mon Feb 23 01:57:55 2009 for PTLib by  doxygen 1.5.1