Public Member Functions | |
| DcmStack () | |
| default constructor, creates empty stack | |
| DcmStack (const DcmStack &arg) | |
| copy constructor. | |
| ~DcmStack () | |
| destructor, not virtual. Do not derive from this class. | |
| DcmStack & | operator= (const DcmStack &arg) |
| copy assignment operator. | |
| OFBool | operator== (const DcmStack &arg) const |
| comparison operator, needed for MSVC5. | |
| OFBool | operator< (const DcmStack &arg) const |
| dummy comparison operator, needed for MSVC5. | |
| DcmObject * | push (DcmObject *obj) |
| push new pointer do DcmObject instance on stack | |
| DcmObject * | pop () |
| removes uppermost entry from stack and returns it. | |
| DcmObject * | top () const |
| returns uppermost entry of stack without removing it. | |
| DcmObject * | elem (const unsigned long number) const |
| returns n-th element from stack without removing it. | |
| OFBool | empty () const |
| checks if the stack is empty | |
| unsigned long | card () const |
| returns cardinality (number of entries) of the stack | |
| void | clear () |
| returns the stack to default-constructed state, i.e. | |
Private Attributes | |
| DcmStackNode * | topNode_ |
| pointer to the upmost stack entry, NULL if empty | |
| unsigned long | cardinality_ |
| current cardinality of the stack | |
The objects pointed to are never touched, e.g. deleted.
Definition at line 81 of file dcstack.h.
|
|
copy constructor. Only pointers to objects are copied, the DcmObject instances are not duplicated.
|
|
|
returns cardinality (number of entries) of the stack
|
|
|
returns the stack to default-constructed state, i.e. empty state. |
|
|
returns n-th element from stack without removing it.
|
|
|
checks if the stack is empty
|
|
|
dummy comparison operator, needed for MSVC5.
|
|
|
copy assignment operator. Only pointers to objects are copied, the DcmObject instances are not duplicated.
|
|
|
comparison operator, needed for MSVC5.
|
|
|
removes uppermost entry from stack and returns it.
|
|
|
push new pointer do DcmObject instance on stack
|
|
|
returns uppermost entry of stack without removing it.
|