pgList< T > Class Template Reference
[pgGen -- General purpose module]

A Sequence of elements stored in a linked list. More...

#include <pg_list.h>

List of all members.

Classes

class  Item
 An element of pgList. More...

Public Member Functions

 pgDefineException (ExceptionInvalidArgument)
 pgList ()
 Constructs a pgList with no item.
 ~pgList ()
 Destructs this pgList.
u32 getItemNum () const
 Returns the number of pgList::Items in this pgList.
bool hasItem () const
 Returns whether this pgList has any pgList::Item.
ItemgetFirstN () const
 Returns the first pgList::Item in this pgList.
ItemgetLastN () const
 Returns the last pgList::Item in this pgList.
void addFirst (Item *item)
 Adds the specified pgList::Item to this pgList as the first pgList::Item.
void addLast (Item *item)
 Adds the specified pgList::Item to this pgList as the last pgList::Item.
void clear ()
 Removes all pgList::Items from this pgList.


Detailed Description

template<class T>
class pgList< T >

A Sequence of elements stored in a linked list.

Template Parameters:
T The type which is stored in the pgList.

Member Function Documentation

template<class T>
void pgList< T >::addFirst ( Item item  )  [inline]

Adds the specified pgList::Item to this pgList as the first pgList::Item.

Parameters:
[in] item A pgList::Item.

template<class T>
void pgList< T >::addLast ( Item item  )  [inline]

Adds the specified pgList::Item to this pgList as the last pgList::Item.

Parameters:
[in] item A pgList::Item.

template<class T>
Item* pgList< T >::getFirstN (  )  const [inline]

Returns the first pgList::Item in this pgList.

If this pgList has no pgList::Item, returns NULL.

Returns:
The first pgList::Item in this pgList.

template<class T>
u32 pgList< T >::getItemNum (  )  const [inline]

Returns the number of pgList::Items in this pgList.

Returns:
The number of pgList::Items in this pgList.

template<class T>
Item* pgList< T >::getLastN (  )  const [inline]

Returns the last pgList::Item in this pgList.

If this list has no pgList::Item, returns NULL.

Returns:
The last pgList::Item in this pgList.

template<class T>
bool pgList< T >::hasItem (  )  const [inline]

Returns whether this pgList has any pgList::Item.

Returns:
Whether this pgList has any pgList::Item.


The documentation for this class was generated from the following file:

Generated on Sat Aug 15 11:24:38 2009 for Pogolyn by  doxygen 1.5.8