BufferNodeList Class Reference

Represents a list of buffer nodes. More...

#include <buffernodelist.h>

Collaboration diagram for BufferNodeList:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 BufferNodeList ()
 Constructor.
virtual ~BufferNodeList ()
void push_back (BufferNode *node)
 Appends another BufferNode to the list.
BufferNodeoperator[] (unsigned index)
 Retrieves the BufferNode at position index.
void print (OutputStream &dos)
 Prints the complete BufferNodeList.
BufferNodegetFront ()
 Retrieves the first element of the BufferNodeList.
bool isEmpty ()
 Checks for emptyness.
void removeElem (BufferNode *to_remove, BufferNode *prev)
 Removes a node from the BufferNodeList.

Private Attributes

BufferNodefront
 The front element of the list.
BufferNodeback
 The last element of the list.


Detailed Description

Represents a list of buffer nodes.

An (ordered) list of BufferNode elements. The BufferNode objects are linked via the BufferNode::r_sibling member variable.

Author:
Michael Schmidt

Gunnar Jehl

Version:
2.1
License:
Software License Agreement (BSD License)

Definition at line 53 of file buffernodelist.h.


Constructor & Destructor Documentation

BufferNodeList::BufferNodeList (  ) 

Constructor.

Constructor - creating object.

Definition at line 39 of file buffernodelist.cpp.

BufferNodeList::~BufferNodeList (  )  [virtual]

Destructor.

Definition at line 43 of file buffernodelist.cpp.

References front, and BufferNode::r_sibling.


Member Function Documentation

BufferNode * BufferNodeList::getFront (  )  [inline]

Retrieves the first element of the BufferNodeList.

May return NULL if the list is empty.

Return values:
BufferNode* Pointer to the first BufferNode in the list.

Definition at line 97 of file buffernodelist.h.

References front.

Referenced by BufferNode::clearSubtreeIfPossible(), BufferNode::getPCDataRepresentation(), and BufferNode::hasNoMarkedAndNoLockedDos().

bool BufferNodeList::isEmpty (  )  [inline]

Checks for emptyness.

Checks for emptyness, i.e. returns true if this is the empty list.

Return values:
bool Returns true if the BufferNodeList object is empty, false otherwise.

Definition at line 104 of file buffernodelist.h.

BufferNode * BufferNodeList::operator[] ( unsigned  index  ) 

Retrieves the BufferNode at position index.

The first node in the list has index zero. For efficiency reasons, this method does not check for out-of-bound violation, so the caller is responsible to make sure to access buffer nodes in the valid range.

Parameters:
[in] index The position of the BufferNode in the list.
Return values:
BufferNode* Pointer to the retrieved BufferNode.

Definition at line 63 of file buffernodelist.cpp.

References front, and BufferNode::r_sibling.

void BufferNodeList::print ( OutputStream dos  ) 

Prints the complete BufferNodeList.

This is a debug print method: the output comprises role information.

Parameters:
[in] dos Reference to the (debug) OutputStream.
Return values:
void 

Definition at line 73 of file buffernodelist.cpp.

References front, and BufferNode::r_sibling.

void BufferNodeList::push_back ( BufferNode node  ) 

Appends another BufferNode to the list.

The passed BufferNode is appended to the end of the list.

Parameters:
[in] node Pointer to the BufferNode to be appended to the list.
Return values:
void 

Definition at line 52 of file buffernodelist.cpp.

References back, front, and BufferNode::r_sibling.

Referenced by BufferNode::addChild().

void BufferNodeList::removeElem ( BufferNode to_remove,
BufferNode prev 
)

Removes a node from the BufferNodeList.

The node to_remove is removed from the list; node prev is required to adjust the linked list after node removal.

Parameters:
[in] to_remove The BufferNode object to be removed.
[in] prev The predecessor of the object to be removed. May be in case the first removed node is the first one in the list.
Return values:
void 

Definition at line 79 of file buffernodelist.cpp.

References back, front, and BufferNode::r_sibling.

Referenced by BufferNode::clearSubtreeIfPossible().


Member Data Documentation

The last element of the list.

May be NULL (if the list is empty).

Definition at line 130 of file buffernodelist.h.

Referenced by push_back(), and removeElem().

The front element of the list.

May be NULL (if the list is empty).

Definition at line 124 of file buffernodelist.h.

Referenced by getFront(), operator[](), print(), push_back(), removeElem(), and ~BufferNodeList().


Generated on Sun May 24 20:20:21 2009 for G(arbage) C(ollected) X(Query) Engine by  doxygen 1.5.9