Tools.h++ Class Reference

Table Of Contents
Click on the banner to return to the Class Reference home page.
©Copyright 1996 Rogue Wave Software
RWTIsvSlist<T>
Synopsis
Descripton
Example
Public Constructors
Public Member Functions
Synopsis
#include <rw/tislist.h>
RWTIsvSlist<T> list;
Descripton
Class RWTIsvSlist<T> is a class that implements intrusive singly-linked lists.
An intrusive list is one where the member of the list must inherit from a common base class, in
this case RWIsvSlink. The advantage of such a list is that memory and space requirements are
kept to a minimum. The disadvantage is that the inheritance hierarchy is inflexible, making it
slightly more difficult to use with an existing class. Class RWTValSlist<T> is offered as an
alternative, non-intrusive, linked list.
See Stroustrup (1991; Section 8.3.1) for more information about intrusive lists.
Note that when you insert an item into an intrusive list, the actual item (not a copy) is
inserted. Because each item carries only one link field, the same item cannot be inserted
into more than one list, nor can it be inserted into the same list more than once.
Example
#include <rw/tislist.h>
#include <rw/rstream.h>
#include <string.h>