34 #include "dcmtk/config/osconfig.h"
35 #include "dcmtk/ofstd/oftypes.h"
36 #include "dcmtk/ofstd/ofcast.h"
38 #if defined(HAVE_STL) || defined(HAVE_STL_STACK)
44 #define OFStack std::stack
47 #define INCLUDE_CASSERT
48 #define INCLUDE_CSTDDEF
49 #include "dcmtk/ofstd/ofstdinc.h"
51 #ifndef HAVE_CLASS_TEMPLATE
52 #error Your C++ compiler cannot handle class templates:
268 oldPtr = oldPtr->
next;
269 newPtr = newPtr->
next;
size_t stackSize
size of stack
OFStack(const OFStack< T > &x)
copy constructor
OFStackBase()
default constructor
void base_push(OFStackLinkBase *element)
pushes element onto stack.
OFStackLinkBase * base_top()
returns element on top of stack.
virtual ~OFStackLinkBase()
destructor
int copy(const OFStack< T > &x)
copy assignment of a stack.
OFStackLinkBase()
default constructor
OFStackLinkBase & operator=(const OFStackLinkBase &)
private undefined copy assignment operator
OFStack< T > & operator=(const OFStack< T > &x)
Assignment operator.
virtual ~OFStackLink()
destructor
OFBool base_empty() const
checks if the stack is empty
T & top()
returns a reference to the top element on the stack.
non-template single linked list class, used to store elements of a stack.
OFStack()
Default constructor.
OFStackLink(const T &i)
constructor
OFStackLink< T > & operator=(const OFStackLink< T > &)
private undefined copy assignment operator
template class used to store stack entries.
non-template base class for OFStack.
size_t base_size() const
returns size of stack
void push(const T &x)
inserts a new element on top of the stack.
OFStackLinkBase * next
pointer to next entry in list
OFStackLinkBase * head
pointer to top element of stack
virtual ~OFStackBase()
destructor
size_t size() const
returns the number of elements on the stack
void base_pop()
removes top element from stack.
OFStackBase & operator=(const OFStackBase &)
private undefined copy assignment operator
OFBool empty() const
checks if the stack is empty.
void pop()
removes the top element from the stack.