SAbstractList Class Reference
[Utility Classes and Functions]

#include <support/List.h>

Inheritance diagram for SAbstractList:

SList List of all members.

Detailed Description

Generic type-independent implementation of a doubly-linked list.

An abstract base class for a doubly-linked list, using void pointers to data of a fixed size.

Note:
Not for public use; this is part of the SList implementation.
See also:
SList


Public Member Functions

_ListNodeAdd (const void *newItem)
 Adds newItem before the end of the list.
_ListNodeAddAt (const void *newItem, const AbstractIterator &i)
 Adds newItem before the list node referenced by the iterator.
AbstractIterator Begin (void) const
 Returns an iterator that references the first node.
size_t CountItems (void) const
SAbstractListDuplicate (const SAbstractList &o)
 Empties the list and replaces it with copied nodes from o .
AbstractIterator End (void) const
 Returns an iterator that references the sentinel node after the last node.
bool IsEmpty (void) const
size_t ItemSize (void) const
void MakeEmpty (void)
 Removes all list nodes; equivalent to calling Remove() until.
AbstractIterator Remove (AbstractIterator &i)
 Removes the node at i.
 SAbstractList (const SAbstractList &o)
 SAbstractList (const size_t itemSize)
_ListNodeSplice (SAbstractList &subList)
_ListNodeSpliceAt (SAbstractList &subList, const AbstractIterator &i)
virtual ~SAbstractList (void)

Protected Member Functions

virtual void PerformAssign (void *to, const void *from, size_t count) const =0
virtual void PerformConstruct (void *base, size_t count) const =0
virtual void PerformCopy (void *to, const void *from, size_t count) const =0
virtual void PerformDestroy (void *base, size_t count) const =0

Classes

struct  _ListNode
class  AbstractIterator
 A companion class to SAbstractList that provides iteration over list nodes. More...


Constructor & Destructor Documentation

SAbstractList const size_t  itemSize  ) 
 

SAbstractList const SAbstractList o  ) 
 

~SAbstractList void   )  [virtual]
 


Member Function Documentation

SAbstractList::_ListNode * Add const void *  newItem  ) 
 

Adds newItem before the end of the list.

SAbstractList::_ListNode * AddAt const void *  newItem,
const AbstractIterator i
 

Adds newItem before the list node referenced by the iterator.

SAbstractList::AbstractIterator Begin void   )  const
 

Returns an iterator that references the first node.

Reimplemented in SList.

size_t CountItems void   )  const
 

Returns:
Number of nodes in the list.

SAbstractList & Duplicate const SAbstractList o  ) 
 

Empties the list and replaces it with copied nodes from o .

SAbstractList::AbstractIterator End void   )  const
 

Returns an iterator that references the sentinel node after the last node.

Reimplemented in SList.

bool IsEmpty void   )  const
 

Returns:
true if list is empty.

size_t ItemSize void   )  const
 

Returns:
Size of the node data.

void MakeEmpty void   ) 
 

Removes all list nodes; equivalent to calling Remove() until.

 Begin() == End() 
.

Reimplemented in SList.

virtual void PerformAssign void *  to,
const void *  from,
size_t  count
const [protected, pure virtual]
 

Implemented in SList.

virtual void PerformConstruct void *  base,
size_t  count
const [protected, pure virtual]
 

Implemented in SList.

virtual void PerformCopy void *  to,
const void *  from,
size_t  count
const [protected, pure virtual]
 

Implemented in SList.

virtual void PerformDestroy void *  base,
size_t  count
const [protected, pure virtual]
 

Implemented in SList.

SAbstractList::AbstractIterator Remove AbstractIterator i  ) 
 

Removes the node at i.

SAbstractList::_ListNode * Splice SAbstractList subList  ) 
 

Note:
As a side effect, subList is emptied.

SAbstractList::_ListNode * SpliceAt SAbstractList subList,
const AbstractIterator i
 

Note:
As a side effect, subList is emptied.


The documentation for this class was generated from the following files: