SYNOPSIS

#include <object.h>

Public Types

enum InsertMode { modeAtFirst, modeAtLast, modeBefore, modeAfter }

Requested in overloaded insert() method to indicate how to insert data into list.

Public Member Functions

virtual LinkedDouble * getFirst (void)

Get first linked object in list. virtual LinkedDouble * getLast (void)

Gets the last object in the list. virtual LinkedDouble * getInsert (void)

Virtual to get the insert point to use when adding new members. LinkedDouble * getNext (void)

Get next object, for convenience. LinkedDouble * getPrev (void)

Get prev object in the list. virtual void insert (LinkedDouble &obj, InsertMode position=modeAtLast)

Insert object into chain at given position, as indicated by InsertMode; If no position is given, it defaults to modeAtLast, inserting element at list's end. virtual void detach (void)

Remove object from chain. LinkedDouble & operator+= (LinkedDouble &obj)

LinkedDouble & operator-- ()

Protected Member Functions

LinkedDouble ()

virtual ~LinkedDouble ()

virtual void enterLock (void)

virtual void leaveLock (void)

virtual LinkedDouble * firstObject ()

virtual LinkedDouble * lastObject ()

Protected Attributes

LinkedDouble * nextObject

LinkedDouble * prevObject

Detailed Description

Self managed double linked list object chain.

This is used for accumulating lists by using as a base class for a derived subclass.

Author:

David Sugar [email protected] Accumulating double linked list.

Member Enumeration Documentation

enum \fBost::LinkedDouble::InsertMode\fP

Requested in overloaded insert() method to indicate how to insert data into list.

Enumerator

modeAtFirst

insert at first position in list pointed by current object

modeAtLast

insert at last position in list pointed by current object

modeBefore

insert in list before current object

modeAfter

insert in list after current object

Constructor & Destructor Documentation

ost::LinkedDouble::LinkedDouble ()\fC [inline]\fP, \fC [protected]\fP

virtual ost::LinkedDouble::~LinkedDouble ()\fC [protected]\fP, \fC [virtual]\fP

Member Function Documentation

virtual void ost::LinkedDouble::detach (void)\fC [virtual]\fP

Remove object from chain.

virtual void ost::LinkedDouble::enterLock (void)\fC [protected]\fP, \fC [virtual]\fP

virtual \fBLinkedDouble\fP* ost::LinkedDouble::firstObject ()\fC [protected]\fP, \fC [virtual]\fP

virtual \fBLinkedDouble\fP* ost::LinkedDouble::getFirst (void)\fC [virtual]\fP

Get first linked object in list. This may be dynamically recast, and may refer to a master static bookmark pointer in a derived class. Otherwise it follows list to front.

Returns:

pointer to first object in list.

virtual \fBLinkedDouble\fP* ost::LinkedDouble::getInsert (void)\fC [virtual]\fP

Virtual to get the insert point to use when adding new members. This may be current, or always head or always tail. As a virtual, this allows derived class to establish 'policy'.

Returns:

pointer to insertion point in list.

virtual \fBLinkedDouble\fP* ost::LinkedDouble::getLast (void)\fC [virtual]\fP

Gets the last object in the list. This normally follows the links to the end. This is a virtual because derived class may include a static member bookmark for the current end.

Returns:

pointer to last object in list.

\fBLinkedDouble\fP* ost::LinkedDouble::getNext (void)\fC [inline]\fP

Get next object, for convenience. Derived class may use this with a dynamic cast.

Returns:

next object in list.

\fBLinkedDouble\fP* ost::LinkedDouble::getPrev (void)\fC [inline]\fP

Get prev object in the list.

Returns:

pointer to previous object.

virtual void ost::LinkedDouble::insert (\fBLinkedDouble\fP &obj, \fBInsertMode\fPposition = \fC\fBmodeAtLast\fP\fP)\fC [virtual]\fP

Insert object into chain at given position, as indicated by InsertMode; If no position is given, it defaults to modeAtLast, inserting element at list's end.

Parameters:

object being inserted.

position where object is inserted.

virtual \fBLinkedDouble\fP* ost::LinkedDouble::lastObject ()\fC [protected]\fP, \fC [virtual]\fP

virtual void ost::LinkedDouble::leaveLock (void)\fC [protected]\fP, \fC [virtual]\fP

\fBLinkedDouble\fP& ost::LinkedDouble::operator+= (\fBLinkedDouble\fP &obj)

\fBLinkedDouble\fP& ost::LinkedDouble::operator-- ()

Member Data Documentation

\fBLinkedDouble\fP* ost::LinkedDouble::nextObject\fC [protected]\fP

\fBLinkedDouble\fP * ost::LinkedDouble::prevObject\fC [protected]\fP

Author

Generated automatically by Doxygen for GNU CommonC++ from the source code.