lists.h File Reference

Go to the source code of this file.

Classes

struct  PListElement
struct  PListInfo
class  PAbstractList
class  PList< T >
class  PList< T >::iterator_base
class  PList< T >::iterator
class  PList< T >::const_iterator
class  PQueue< T >
class  PStack< T >
struct  PSortedListElement
struct  PSortedListInfo
class  PAbstractSortedList
class  PSortedList< T >

Defines

#define PLIST(cls, T)   typedef PList<T> cls
#define PDECLARE_LIST(cls, T)
#define PQUEUE(cls, T)   typedef PQueue<T> cls
#define PDECLARE_QUEUE(cls, T)
#define PSTACK(cls, T)   typedef PStack<T> cls
#define PDECLARE_STACK(cls, T)
#define PSORTED_LIST(cls, T)   typedef PSortedList<T> cls
#define PDECLARE_SORTED_LIST(cls, T)


Define Documentation

#define PDECLARE_LIST ( cls,
 ) 

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

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

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

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


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