Stack Class Reference

#include <Stack.h>

Collaboration diagram for Stack:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 Stack ()
 ~Stack ()
void push (int value)
void pop ()
int & top ()
int top () const
size_t size () const
bool empty () const

Private Attributes

Node head

Friends

void print_stack (Stack const &st)


Detailed Description

Definition at line 6 of file Stack.h.


Constructor & Destructor Documentation

Stack::Stack (  ) 

Definition at line 8 of file Stack.cpp.

Stack::~Stack (  ) 

Definition at line 13 of file Stack.cpp.

References head, and Node::pnext.


Member Function Documentation

bool Stack::empty (  )  const

Definition at line 59 of file Stack.cpp.

References head, and Node::size().

Referenced by pop(), and print_stack().

Here is the call graph for this function:

Here is the caller graph for this function:

void Stack::pop (  ) 

Definition at line 31 of file Stack.cpp.

References empty(), head, Node::pnext, and Node::remove_next().

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

void Stack::push ( int  value  ) 

Definition at line 25 of file Stack.cpp.

References head, and Node::insert().

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

size_t Stack::size (  )  const

Definition at line 52 of file Stack.cpp.

References head, and Node::size().

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

int Stack::top (  )  const

Definition at line 46 of file Stack.cpp.

References Node::data, head, and Node::pnext.

int & Stack::top (  ) 

Definition at line 40 of file Stack.cpp.

References Node::data, head, and Node::pnext.

Referenced by main().

Here is the caller graph for this function:


Friends And Related Function Documentation

void print_stack ( Stack const &  st  )  [friend]

Definition at line 65 of file Stack.cpp.


Member Data Documentation

Node Stack::head [private]

Definition at line 8 of file Stack.h.

Referenced by empty(), pop(), print_stack(), push(), size(), top(), and ~Stack().


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