OFFIS DCMTK  Version 3.6.0
Public Member Functions | Private Member Functions | List of all members
OFStack< T > Class Template Reference

template stack class. More...

Inheritance diagram for OFStack< T >:
[legend]
Collaboration diagram for OFStack< T >:
[legend]

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.
 
- Private Member Functions inherited from OFStackBase
 OFStackBase ()
 default constructor
 
virtual ~OFStackBase ()
 destructor
 
OFBool base_empty () const
 checks if the stack is empty
 
size_t base_size () const
 returns size of stack
 
OFStackLinkBasebase_top ()
 returns element on top of stack.
 
void base_push (OFStackLinkBase *element)
 pushes element onto stack.
 
void base_pop ()
 removes top element from stack.
 

Additional Inherited Members

Detailed Description

template<class T>
class OFStack< T >

template stack class.

The interface is a subset of the STL stack class.

Definition at line 196 of file ofstack.h.

Member Function Documentation

template<class T>
int OFStack< T >::copy ( const OFStack< T > &  x)
inlineprivate

copy assignment of a stack.

Parameters
xstack to be copied
Returns
dummy value, required to keep Sun CC 2.0.1 happy

Definition at line 256 of file ofstack.h.

Referenced by OFStack< OFConfigFileCursor >::OFStack(), and OFStack< OFConfigFileCursor >::operator=().

template<class T>
OFBool OFStack< T >::empty ( void  ) const
inline

checks if the stack is empty.

Returns
OFTrue if stack is empty, OFFalse otherwise.

Definition at line 220 of file ofstack.h.

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.

Definition at line 248 of file ofstack.h.

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

Definition at line 240 of file ofstack.h.

template<class T>
size_t OFStack< T >::size ( ) const
inline

returns the number of elements on the stack

Returns
number of elements on stack

Definition at line 225 of file ofstack.h.

Referenced by OFStack< OFConfigFileCursor >::copy().

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

Definition at line 231 of file ofstack.h.


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


Generated on Thu Dec 20 2012 for OFFIS DCMTK Version 3.6.0 by Doxygen 1.8.2