Main Page | Class Hierarchy | Class List | Directories | File List | Class Members | File Members | Related Pages

List< Type > Class Template Reference

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

#include <GContainers.h>

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.
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]
 

Inserts a pointer.

Parameters:
p  The pointer to insert
Index  The index to insert at or -1 to insert at the end

Reimplemented in GCombo, and GCombo.

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


The documentation for this class was generated from the following file:
Generated on Wed Oct 26 14:47:04 2005 for Lgi by  doxygen 1.4.1