Node Class Reference

#include <Node.h>

Collaboration diagram for Node:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 Node (int value=0)
 Node (Node const &other)
 ~Node ()
void insert (Node *newNode)
void remove_next ()
bool remove (Node *other)
int distance (Node const *other) const
size_t size () const

Public Attributes

Nodepnext
int data

Friends

void print_list (Node const &head)


Detailed Description

Definition at line 6 of file Node.h.


Constructor & Destructor Documentation

Node::Node ( int  value = 0  ) 

Definition at line 10 of file Node.cpp.

Node::Node ( Node const &  other  ) 

Definition at line 16 of file Node.cpp.

Node::~Node (  ) 

Definition at line 22 of file Node.cpp.


Member Function Documentation

int Node::distance ( Node const *  other  )  const

Definition at line 61 of file Node.cpp.

References pnext.

Referenced by size().

Here is the caller graph for this function:

void Node::insert ( Node newNode  ) 

Definition at line 27 of file Node.cpp.

References pnext.

Referenced by Stack::push().

Here is the caller graph for this function:

bool Node::remove ( Node other  ) 

Definition at line 44 of file Node.cpp.

References pnext.

void Node::remove_next (  ) 

Definition at line 34 of file Node.cpp.

References pnext.

Referenced by Stack::pop().

Here is the caller graph for this function:

size_t Node::size (  )  const

Definition at line 76 of file Node.cpp.

References distance().

Referenced by Stack::empty(), print_list(), and Stack::size().

Here is the call graph for this function:

Here is the caller graph for this function:


Friends And Related Function Documentation

void print_list ( Node const &  head  )  [friend]

Definition at line 82 of file Node.cpp.


Member Data Documentation

Definition at line 11 of file Node.h.

Referenced by print_list(), and Stack::top().


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

Generated on Thu Apr 23 21:01:43 2009 for Adapter Design Pattern by  doxygen 1.5.8