List< Type > Class Template Reference

Template for using DLinkList with a type safe API. More...

#include <GContainers.h>

Inherits DLinkList.

List of all members.

Public Member Functions

virtual bool Delete ()
 Deletes the current item.
virtual bool Delete (int i)
 Deletes the item at position 'i'.
virtual bool Delete (Type *p)
 Deletes the pointer 'p'.
virtual bool Insert (Type *p, int Index=-1)
 Inserts a pointer.
bool Add (Type *p)
 Adds an item on the end of the list.
Type * First ()
 Return the first pointer.
Type * Last ()
 Return the last pointer.
Type * Next ()
 Return the pointer after the current one.
Type * Prev ()
 Return the pointer before the current one.
Type * Current ()
 Return the current pointer.
Type * operator[] (int Index)
 Return the pointer at an index.
int IndexOf (Type *p)
 Return the index of a pointer or -1 if it's not in the list.
bool HasItem (Type *p)
 Return the TRUE if the pointer is in the list.
Type * ItemAt (int i)
 Return the pointer at index 'i'.
void Sort (int(*Compare)(Type *a, Type *b, int data), int Data)
 Sorts the list.
void DeleteObjects ()
 Delete all pointers in the list as dynamically allocated objects.
void DeleteArrays ()
 Delete all pointers in the list as dynamically allocated arrays.
Listoperator= (List< Type > &lst)
 Assign the contents of another list to this one.


Detailed Description

template<class Type>
class List< Type >

Template for using DLinkList with a type safe API.

Member Function Documentation

template<class Type >
virtual bool List< Type >::Insert ( Type *  p,
int  Index = -1 
) [inline, virtual]

template<class Type >
List& List< Type >::operator= ( List< Type > &  lst  )  [inline]

Assign the contents of another list to this one.

Parameters:
lst  The source list.

template<class Type >
void List< Type >::Sort ( int(*)(Type *a, Type *b, int data)  Compare,
int  Data 
) [inline]

Sorts the list.

Parameters:
Compare  The callback function used to compare 2 pointers
Data  User data that is passed into the callback

Referenced by GFontSystem::EnumerateFonts(), and List< Mapping >::Sort().


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

Generated on Wed Dec 1 15:41:05 2010 for Lgi by  doxygen 1.5.7.1