PList< T > Class Template Reference

#include <lists.h>

Inheritance diagram for PList< T >:

PAbstractList PCollection PContainer PObject PStringList List of all members.

Iterators

typedef T value_type
iterator begin ()
iterator end ()
iterator rbegin ()
iterator rend ()
const_iterator begin () const
const_iterator end () const
const_iterator rbegin () const
const_iterator rend () const
T & front () const
T & back () const
void erase (const iterator &it)
void erase (const const_iterator &it)

Public Member Functions

Overrides from class PObject
virtual PObjectClone () const
New functions for class
T & operator[] (PINDEX index) const

Protected Member Functions

 PList (int dummy, const PList *c)

Classes

class  const_iterator
class  iterator
class  iterator_base

Detailed Description

template<class T>
class PList< T >

This template class maps the PAbstractList to a specific object type. The functions in this class primarily do all the appropriate casting of types.

Note that if templates are not used the PDECLARE_LIST# macro will simulate the template instantiation.


Member Typedef Documentation

template<class T>
typedef T PList< T >::value_type


Constructor & Destructor Documentation

template<class T>
PList< T >::PList (  )  [inline]

Create a new, empty, list.

Note that by default, objects placed into the list will be deleted when removed or when all references to the list are destroyed.

template<class T>
PList< T >::PList ( int  dummy,
const PList< T > *  c 
) [inline, protected]

template<class T>
PList< T >::PList (  )  [inline]

Create a new, empty, list.

Note that by default, objects placed into the list will be deleted when removed or when all references to the list are destroyed.


Member Function Documentation

template<class T>
virtual PObject* PList< T >::Clone (  )  const [inline, virtual]

Make a complete duplicate of the list. Note that all objects in the array are also cloned, so this will make a complete copy of the list.

Reimplemented from PObject.

template<class T>
iterator PList< T >::begin (  )  [inline]

template<class T>
iterator PList< T >::end (  )  [inline]

template<class T>
iterator PList< T >::rbegin (  )  [inline]

template<class T>
iterator PList< T >::rend (  )  [inline]

template<class T>
const_iterator PList< T >::begin (  )  const [inline]

template<class T>
const_iterator PList< T >::end (  )  const [inline]

template<class T>
const_iterator PList< T >::rbegin (  )  const [inline]

template<class T>
const_iterator PList< T >::rend (  )  const [inline]

template<class T>
T& PList< T >::front (  )  const [inline]

template<class T>
T& PList< T >::back (  )  const [inline]

template<class T>
void PList< T >::erase ( const iterator it  )  [inline]

template<class T>
void PList< T >::erase ( const const_iterator it  )  [inline]

template<class T>
T& PList< T >::operator[] ( PINDEX  index  )  const [inline]

Retrieve a reference to the object in the list. If there was not an object at that ordinal position or the index was beyond the size of the array then the function asserts.

The object accessed in this way is remembered by the class and further access will be fast. Access to elements one either side of that saved element, and the head and tail of the list, will always be fast.

Returns:
reference to the object at index# position.


The documentation for this class was generated from the following file:
Generated on Mon Sep 15 01:21:37 2008 for PTLib by  doxygen 1.5.1