Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
Essential Tools Module Reference Guide

RWGSlist(type)

Module:  Essential Tools Module   Group:  Generic


Does not inherit

Local Index

Members

Synopsis

#include <rw/gslist.h>
declare(RWGSlist, type)
RWGSlist(type) a ;

Description

Class RWGSlist(type) represents a group of ordered elements of type type, not accessible by an external key. Duplicates are allowed. This class is implemented as a singly-linked list. Objects of type RWGSlist(type) are declared with macros defined in the standard C++ header file <generic.h>.


NOTE -- RWGSlist is deprecated. Please use RWTValSlist or RWTPtrSlist.

In order to find a particular item within the collection, a user-provided global "tester" function is required to test for a "match," definable in any consistent way. This function should have prototype:

The argument c is a candidate within the collection to be tested for a match. The argument d is for your convenience and will be passed to yourTesterFunction(). The function should return TRUE if a "match" is found between c and d.

In order to simplify the documentation below, an imaginary typedef:

has been used for this tester function.

Persistence

None

Public Constructors

RWGSlist(type)();
RWGSlist(type)(type* a);
RWGSlist(type)(const RWGSlist(type)& a);

Assignment Operator

void
operator=(const RWGSlist(type)&);

Public Member Functions

type*
append(type* a);
void
apply(void (*ap)(type*, void*), void* );
type*&
at(size_t i);
const type*
at(size_t i) const;
void
clear();
RWBoolean
contains(yourTester t, const void* d) const;
RWBoolean
containsReference(const type* e) const;
size_t
entries() const;
type*
find(yourTester t, const void* d) const;
type*
findReference(const type* e) const;
type*
first() const;
type*
get();
type*
insert(type* e);
void
insertAt(size_t indx, type* e);
RWBoolean
isEmpty() const;
type*
last() const;
size_t
occurrencesOf(yourTester t, const void* d) const;
size_t
occurrencesOfReference(const type* e) const;
type*
prepend(const type* a);
type*
remove(yourTester t, const void* d);
type*
removeReference(const type* e);


Previous fileTop of DocumentContentsIndex pageNext file

©2004 Copyright Quovadx, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Quovadx, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.