newspeoplefor developersdocumentationdownloads

nNode Class Reference
[Data Types]

#include <nnode.h>

Inheritance diagram for nNode:

FileEntry MapQuadElement nBitStream nDI8Device nHashNode nInputDevice nInputEvent nIpcMiniServer nMsgNode nNpkFileWrapper nObjectNode< TYPE > nOctElement nQuadTree::Element nRef< TYPE > nRoot nSignalBinding nSignalServer::nPostedSignal nStrNode List of all members.

Detailed Description

Implement a node in a doubly linked list.

(C) 2002 RadonLabs GmbH

Definition at line 16 of file nnode.h.


Public Member Functions

 nNode ()
 the default constructor
 nNode (void *ptr)
 constructor providing user data pointer
 ~nNode ()
 the destructor
nNodeGetSucc () const
 get the next node in the list
nNodeGetPred () const
 get the previous node in the list
void InsertBefore (nNode *succ)
 insert this node before 'succ' node into list
void InsertAfter (nNode *pred)
 insert this node after 'pred' node into list
void Remove ()
 remove node from list
void SetPtr (void *p)
 set user data pointer
void * GetPtr () const
 get user data pointer
bool IsLinked () const
 check if node is currently linked into a list

Friends

class nList

Constructor & Destructor Documentation

nNode::nNode  )  [inline]
 

the default constructor

Definition at line 53 of file nnode.h.

nNode::nNode void *  ptr  )  [inline]
 

constructor providing user data pointer

Definition at line 65 of file nnode.h.

nNode::~nNode void   )  [inline]
 

the destructor

The destructor will throw an assertion if the node is still linked into a list!

Definition at line 79 of file nnode.h.


Member Function Documentation

nNode * nNode::GetSucc void   )  const [inline]
 

get the next node in the list

Get the node after this node in the list, return 0 if there is no next node.

Returns:
the next node or 0

Reimplemented in nRoot, nSignalBinding, nHashNode, nObjectNode< TYPE >, and nStrNode.

Definition at line 93 of file nnode.h.

nNode * nNode::GetPred void   )  const [inline]
 

get the previous node in the list

Get the node before this node in the list, return 0 if there is no previous node.

Returns:
the previous node or 0

Reimplemented in nRoot, nSignalBinding, nHashNode, nObjectNode< TYPE >, and nStrNode.

Definition at line 111 of file nnode.h.

void nNode::InsertBefore nNode succ  )  [inline]
 

insert this node before 'succ' node into list

Parameters:
succ node in front of which this node should be inserted

Definition at line 126 of file nnode.h.

void nNode::InsertAfter nNode pred  )  [inline]
 

insert this node after 'pred' node into list

Parameters:
pred the node after which this node should be inserted

Definition at line 142 of file nnode.h.

void nNode::Remove  )  [inline]
 

remove node from list

Reimplemented in nRoot, and nHashNode.

Definition at line 157 of file nnode.h.

void nNode::SetPtr void *  p  )  [inline]
 

set user data pointer

Parameters:
p the new user data pointer

Definition at line 172 of file nnode.h.

void * nNode::GetPtr  )  const [inline]
 

get user data pointer

Returns:
the user data pointer

Definition at line 183 of file nnode.h.

bool nNode::IsLinked void   )  const [inline]
 

check if node is currently linked into a list

Returns:
true if node is currently linked into a list

Definition at line 194 of file nnode.h.


Friends And Related Function Documentation

friend class nList [friend]
 

Definition at line 43 of file nnode.h.


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

Copyright © 1999-2005 by the contributing authors. Ideas, requests, problems: Send feedback.