PTLib  Version 2.18.8
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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,
 
)
Value:
PLIST(cls##_PTemplate, 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); } \
#define PLIST(cls, T)
Declare a list class.
Definition: lists.h:454
#define PDECLARE_CLASS(cls, par)
Declare a class with PWLib class information.
Definition: object.h:2192
This template class maps the PAbstractList to a specific object type.
Definition: lists.h:322
Ultimate parent class for all objects in the class library.
Definition: object.h:2204
#define PNEW
Macro for overriding system default new operator.
Definition: object.h:1896

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,
 
)
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); } \
#define PQUEUE(cls, T)
Declare a queue class.
Definition: lists.h:554
#define PDECLARE_CLASS(cls, par)
Declare a class with PWLib class information.
Definition: object.h:2192
Ultimate parent class for all objects in the class library.
Definition: object.h:2204
#define PNEW
Macro for overriding system default new operator.
Definition: object.h:1896

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,
 
)
Value:
PSORTED_LIST(cls##_PTemplate, 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); } \
#define PDECLARE_CLASS(cls, par)
Declare a class with PWLib class information.
Definition: object.h:2192
This template class maps the PAbstractSortedList to a specific object type.
Definition: lists.h:964
#define PSORTED_LIST(cls, T)
Declare a sorted list class.
Definition: lists.h:1116
Ultimate parent class for all objects in the class library.
Definition: object.h:2204
#define PNEW
Macro for overriding system default new operator.
Definition: object.h:1896

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,
 
)
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); } \
#define PSTACK(cls, T)
Declare a stack class.
Definition: lists.h:670
#define PDECLARE_CLASS(cls, par)
Declare a class with PWLib class information.
Definition: object.h:2192
Ultimate parent class for all objects in the class library.
Definition: object.h:2204
#define PNEW
Macro for overriding system default new operator.
Definition: object.h:1896

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,
 
)    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,
 
)    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,
 
)    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,
 
)    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.