PTLib Version 2.12.9

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Macros
lists.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Classes
struct | PListElement
struct | PListInfo
class | PAbstractList
| This class is a collection of objects which are descendents of the `PObject` class. More...
class | PList< T >
| This template class maps the PAbstractList to a specific object type. More...
class | PList< T >::iterator_base
class | PList< T >::iterator
class | PList< T >::const_iterator
class | PQueue< T >
| This template class maps the PAbstractList to a specific object type, and adds functionality that allows the list to be used as a first in first out queue. More...
class | PStack< T >
| This template class maps the PAbstractList to a specific object type, and adds functionality that allows the list to be used as a last in first out stack. More...
struct | PSortedListElement
struct | PSortedListInfo
class | PAbstractSortedList
| This class is a collection of objects which are descendents of the `PObject` class. More...
class | PSortedList< T >
| This template class maps the PAbstractSortedList to a specific object type. More...
class | PSortedList< T >::iterator
class | PSortedList< T >::const_iterator

## Macros
#define | PLIST(cls, T) typedef PList<T> cls
| Declare a list class. More...
#define | PDECLARE_LIST(cls, T)
| Begin declaration of list class. More...
#define | PQUEUE(cls, T) typedef PQueue<T> cls
| Declare a queue class. More...
#define | PDECLARE_QUEUE(cls, T)
| Begin declataion of a queue class. More...
#define | PSTACK(cls, T) typedef PStack<T> cls
| Declare a stack class. More...
#define | PDECLARE_STACK(cls, T)
| Begin declaration of a stack class. More...
#define | PSORTED_LIST(cls, T) typedef PSortedList<T> cls
| Declare a sorted list class. More...
#define | PDECLARE_SORTED_LIST(cls, T)
| Begin declaration of a sorted list class. More...

## Macro Definition Documentation

#define PDECLARE_LIST | ( |  | cls,
|  |  | T
| ) |  |

Value:
PLIST(cls##_PTemplate, T); \
PDECLARE_CLASS(cls, PList<T>) \
protected: \
cls(int dummy, const cls * c) \
: PList<T>(dummy, c) { } \
public: \
cls() \
: PList<T>() { } \
virtual PObject * Clone() const \
{ return PNEW cls(0, this); } \

Begin declaration of list class.

This macro is used to declare a descendent of PAbstractList class, customised for a particular object type T.

If the compilation is using templates then this macro produces a descendent of the `PList` 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 `PList` and `PAbstractList` classes for more information.

#define PDECLARE_QUEUE | ( |  | cls,
|  |  | T
| ) |  |

Value:
PQUEUE(cls##_PTemplate, T); \
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 declataion of a queue class.

This macro is used to declare a descendent of PAbstractList class, customised for a particular object type T, and adds functionality that allows the list to be used as a first in first out queue.

If the compilation is using templates then this macro produces a descendent of the `PQueue` 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 `PQueue` and `PAbstractList` classes for more information.

#define PDECLARE_SORTED_LIST | ( |  | cls,
|  |  | T
| ) |  |

Value:
PSORTED_LIST(cls##_PTemplate, T); \
PDECLARE_CLASS(cls, PSortedList<T>) \
protected: \
cls(int dummy, const cls * c) \
: PSortedList<T>(dummy, c) { } \
public: \
cls() \
: PSortedList<T>() { } \
virtual PObject * Clone() const \
{ return PNEW cls(0, this); } \

Begin declaration of a sorted list class.

This macro is used to declare a descendent of PAbstractSortedList class, customised for a particular object type T.

If the compilation is using templates then this macro produces a descendent of the `PSortedList` 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 `PSortedList` and `PAbstractSortedList` classes for more information.

#define PDECLARE_STACK | ( |  | cls,
|  |  | T
| ) |  |

Value:
PSTACK(cls##_PTemplate, T); \
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 a stack class.

This macro is used to declare a descendent of PAbstractList class, customised for a particular object type T, and adds functionality that allows the list to be used as a last in first out stack.

If the compilation is using templates then this macro produces a descendent of the `PStack` 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 `PStack` and `PAbstractList` classes for more information.

#define PLIST | ( |  | cls,
|  |  | T
| ) |  | typedef PList<T> cls

Declare a list class.

This macro is used to declare a descendent of PAbstractList 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 `PList` template class.

See the `PList` class and `PDECLARE_LIST` macro for more information.

#define PQUEUE | ( |  | cls,
|  |  | T
| ) |  | typedef PQueue<T> cls

Declare a queue class.

This macro is used to declare a descendent of PAbstractList class, customised for a particular object type T, and adds functionality that allows the list to be used as a first in first out queue. 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 `PQueue` template class.

See the `PList` class and `PDECLARE_QUEUE` macro for more information.

#define PSORTED_LIST | ( |  | cls,
|  |  | T
| ) |  | typedef PSortedList<T> cls

Declare a sorted list class.

This macro is used to declare a descendent of PAbstractSortedList 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 `PSortedList` template class.

See the `PSortedList` class and `PDECLARE_SORTED_LIST` macro for more information.

#define PSTACK | ( |  | cls,
|  |  | T
| ) |  | typedef PStack<T> cls

Declare a stack class.

This macro is used to declare a descendent of PAbstractList class, customised for a particular object type T, and adds functionality that allows the list to be used as a last in first out stack. 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 `PStack` template class.

See the `PStack` class and `PDECLARE_STACK` macro for more information.