Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

phListNode Class Reference
[ListsThread Safe]

#include <phList.h>

Inheritance diagram for phListNode:

phMutex phObject phObjectNode phTimeInterval List of all members.

Detailed Description

phListNode is used with the phList class and represents a simple node type that can be added or removed from the list. It doesn't hold any information and classes should be derived from it if a node type that holds information wishes to be implemented. The phObjectNode is one class that inherits from this class and implements new methods specific to the phObjectNode and phObjectList classes. The node inherits from phMutex so that it can be locked when list operations are being performed to make the implementation thread-safe. Whenever the node pointers are being adjusted using phListNode::setNext or phListNode::setPrevious the specific instance of phListNode will be locked so that no other thread can try adjusting the pointers at the same time. The object is also locked in phListNode::getNext and phListNode::getPrevious so no thread can change the pointers while another thread is trying to get access to them.

Add a phList / void pointer member variable to hold the list pointer that this node belongs to.

Definition at line 75 of file phList.h.

Public Member Functions

 phListNode ()
 ~phListNode ()
int setNext (phListNode *node)
int setPrevious (phListNode *node)
phListNodegetNext ()
phListNodegetPrevious ()

Protected Attributes


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

Copyright (C) 2002 - 2007 Philip D.S. Thoren ( )
University Of Massachusetts at Lowell
Robotics Lab Logo

Generated on Sat Jun 16 02:44:58 2007 for phission by  doxygen 1.4.4