DCMTK  Version 3.6.1 20120515
OFFIS DICOM Toolkit
Public Member Functions | Private Member Functions
OFStack< T > Class Template Reference

template stack class. More...

+ Inheritance diagram for OFStack< T >:

List of all members.

Public Member Functions

 OFStack ()
 Default constructor.
 OFStack (const OFStack< T > &x)
 copy constructor
OFStack< T > & operator= (const OFStack< T > &x)
 Assignment operator.
OFBool empty () const
 checks if the stack is empty.
size_t size () const
 returns the number of elements on the stack
T & top ()
 returns a reference to the top element on the stack.
void push (const T &x)
 inserts a new element on top of the stack.
void pop ()
 removes the top element from the stack.

Private Member Functions

int copy (const OFStack< T > &x)
 copy assignment of a stack.

Detailed Description

template<class T>
class OFStack< T >

template stack class.

The interface is a subset of the STL stack class.


Member Function Documentation

template<class T>
int OFStack< T >::copy ( const OFStack< T > &  x) [inline, private]

copy assignment of a stack.

Parameters:
xstack to be copied
Returns:
dummy value, required to keep Sun CC 2.0.1 happy
template<class T>
OFBool OFStack< T >::empty ( ) const [inline]

checks if the stack is empty.

Returns:
OFTrue if stack is empty, OFFalse otherwise.
template<class T>
void OFStack< T >::pop ( ) [inline]

removes the top element from the stack.

This method may not be called if the stack is empty.

template<class T>
void OFStack< T >::push ( const T &  x) [inline]

inserts a new element on top of the stack.

The value of the new element is copy constructed from the given argument.

Parameters:
xvalue to be pushed (copied) onto the stack
template<class T>
size_t OFStack< T >::size ( ) const [inline]

returns the number of elements on the stack

Returns:
number of elements on stack
template<class T>
T& OFStack< T >::top ( ) [inline]

returns a reference to the top element on the stack.

This method may not be called if the stack is empty.

Returns:
reference to top element

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


Generated on Tue May 15 2012 for DCMTK Version 3.6.1 20120515 by Doxygen 1.7.5.1-20111027