Tools.h++ Manual

104011 Tandem Computers Incorporated 22-13
22
RWTIsvSlist<T>
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.
Caution – 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. For this reason, the copy constructor and assignment
operator for
RWIsvSlink
have been made private.
!