GList Class Reference

[libgfc Index] [libgfc Hierarchy] [Headers]


A template double-linked list More...

#include <src/glist.h>

Template Form: template < class T > GList

Inherits: dlist_base

Public Members


Detailed Description

A template double-linked list.

DESCRIPTION

A template class for doubly linked list.

The object to be put into the list is actualy copied

and stored in it... so this is a content-based list

instead of a pointer list !!!

When use an instant class such as DList, make

sure that the parameter type 'et' has the operator '=='

defined on it ( used in DList::lookup(et&) ).

Usage1:: (using the two const methods first() and next())

int cursor;

T* el = list.first(&cursor);

while(el) {

process(*el);

el = list.next(&cursor);

};

Usage2:: (using methods beginScan() and scan(); they are not const

but doesn't need the explictly declared 'cursor')

T* el = list.beginScan();

while(el) {

process(*el);

el = list.scan();

};



Documentation generated by lqian@lqian-sun on Wed Jul 14 09:36:10 EDT 1999
Kdoc