gml_TList Class Template Reference

#include <gml_List.h>

Collaboration diagram for gml_TList:

Collaboration graph
[legend]
List of all members.

Detailed Description

template<class T>
class gml_TList< T >

A list of gml_TListElem elements.


Public Member Functions

gml_TError Init ()
 Initializes the list to an empty state.
void Dispose ()
 Disposes the list resources, which includes disposing and deleting all the list elements.
void Reset ()
 Resets the list to an empty state. Does not affect the list elements that where in the list before the call.
gml_TListElemHead ()
 Returns the first element in the list.
gml_TListElemTail ()
 Returns the last element in the list.
void AppendElem (gml_TListElem *elem)
 Inserts elem at the end of the list. elem should not be NULL.
void InsertElem (gml_TListElem *elem)
 Inserts elem at the beginning of the list. elem should not be NULL.
void RemoveElem (gml_TListElem *elem)
 Removes elem from the list. elem should not be NULL.
gml_TBoolean IsElemMember (gml_TListElem *elem)
 Checks if the element elem is a member of the list. Returns gml_cTrue if elem is in the list, gml_cFalse otherwise. elem should not be NULL.
void InsertListAfterElem (gml_TList *list, gml_TListElem *elem)
 Inserts the elements of list after elem. If elem is NULL, insert list elements at the beginning of this list. Does nothing if elem is not an element of the list. Doesn't allocate any element, just change list elements to belong to this list. Finally, list is reset (to an empty list).
gml_TError AppendValue (void *value, gml_TListElem **newElem=(gml_TListElem **) NULL)
 Allocates a new element and append it to the list. Set the value of the element to value. If newElem is not NULL, it will receive the address of the newly allocated element.
gml_TError InsertValue (void *value, gml_TListElem **newElem=(gml_TListElem **) NULL)
 Allocates a new element and insert it at the beginning of the list. Set the value of the element to value. If newElem is not NULL, it will receive the address of the newly allocated element.
gml_TListElemValueElem (void *value)
 Returns a pointer to the first element in the list which value is value, or NULL if no element have such a value.
gml_TError AppendValueAfterElem (void *value, gml_TListElem *elem, gml_TListElem **newElem=(gml_TListElem **) NULL)
 Allocates a new element and insert it in the list just after elem. If elem is NULL, insert the new element at the head of the list. Set the value of the element to value. If newElem is not NULL, it will receive the address of the newly allocated element.
void RemoveValue (void *value)
 Finds the first element in the list that has the value value, removes it from the list and free it. Do nothing if no element of the list have value value.
gml_TBoolean IsValueMember (void *value)
 Returns "gml_cTrue" if at least one element in list has the value value.
gml_TBoolean IsEquivalentValueMember (void *value, gml_TListSortFunc *func=&gml_ListSortStringFunc)
 Returns "gml_cTrue" if at least one element in list has a value that is equivalent to value. The equivalence function must be provided in func. By default, func is the C-string equivalent functions (2 values are equivalent if they point to C-strings that have the same characters).
gml_TError Sort (gml_TListSortFunc *func=&gml_ListSortStringFunc)
 Sorts the list according to the func comparison function.

Static Protected Member Functions

static void ClassInit ()

Protected Attributes

gml_TListElemfHead
 the first element in this list
gml_TListElemfTail
 the last element in this list
Elem * fHead
 the first element in this list
Elem * fTail
 the last element in this list
Elem * fNull

Static Protected Attributes

static gml_TBoolean fClassInited = gml_cFalse

Classes

class  Elem

The documentation for this class was generated from the following files:
Generated on Tue Jun 12 14:03:28 2007 for gml by Doxygen 1.5.2.