The C++ framework for developing highly scalable, high performance servers on Windows platforms.

CNodeList Class Reference

Inheritance diagram for CNodeList:
Collaboration diagram for CNodeList:

List of all members.


Detailed Description

An invasive doubly linked list where classes that wish to be nodes in the list must derive from CNodeList::Node. The list allows nodes to remove themselves from the list as a constant time operation.


Public Member Functions

 CNodeList ()
 Construct an empty node list.
 CNodeList (const CNodeList &rhs)
CNodeListoperator= (const CNodeList &rhs)
void PushNode (Node *pNode)
 Push the given node onto the list.
NodePopNode ()
 Pop the head of the list and return it. Returns 0 if the list is empty.
NodeHead () const
 Return the head of the list. Returns 0 if the list is empty.
void InsertAfter (Node *pNode, Node *pNewNode)
 Insert pNewNode after pNode in the list. If pNode is 0 then this degenerates to a PushNode().
unsigned long Count () const
 Returns the number of nodes in the list.
bool IsEmpty () const
 Returns true if the list contains no nodes.

Friends

void Node::RemoveFromList ()

Classes

class  Node
 The node class that classes must derive from to be able to be stored in the list. More...


Constructor & Destructor Documentation

CNodeList (  ) 

Construct an empty node list.

CNodeList ( const CNodeList rhs  ) 


Member Function Documentation

CNodeList& operator= ( const CNodeList rhs  ) 

void PushNode ( Node pNode  ) 

Push the given node onto the list.

CNodeList::Node * PopNode (  ) 

Pop the head of the list and return it. Returns 0 if the list is empty.

Reimplemented in TNodeList.

CNodeList::Node * Head (  )  const

Return the head of the list. Returns 0 if the list is empty.

Reimplemented in TNodeList.

void InsertAfter ( Node pNode,
Node pNewNode 
)

Insert pNewNode after pNode in the list. If pNode is 0 then this degenerates to a PushNode().

unsigned long Count (  )  const

Returns the number of nodes in the list.

bool IsEmpty (  )  const

Returns true if the list contains no nodes.


Friends And Related Function Documentation

void Node::RemoveFromList (  )  [friend]


Generated on Sun Sep 12 19:08:43 2021 for The Server Framework - v7.4 by doxygen 1.5.3