DCMTK  Version 3.6.1 20120515
OFFIS DICOM Toolkit
Public Member Functions | Private Member Functions | Private Attributes
DcmList Class Reference

double-linked list class that maintains pointers to DcmObject instances. More...

List of all members.

Public Member Functions

 DcmList ()
 constructor
 ~DcmList ()
 destructor
DcmObjectappend (DcmObject *obj)
 insert object at end of list
DcmObjectprepend (DcmObject *obj)
 insert object at start of list
DcmObjectinsert (DcmObject *obj, E_ListPos pos=ELP_next)
 insert object relative to current position and indicator
DcmObjectremove ()
 remove current entry from list, return element
DcmObjectget (E_ListPos pos=ELP_atpos)
 get pointer to element in list at given position
DcmObjectseek (E_ListPos pos=ELP_next)
 seek within element in list to given position (i.e.
DcmObjectseek_to (unsigned long absolute_position)
 seek within element in list to given element index (i.e.
void deleteAllElements ()
 Remove and delete all elements from list.
unsigned long card () const
 return cardinality of list
OFBool empty (void) const
 return true if list is empty, false otherwise
OFBool valid (void) const
 return true if current node exists, false otherwise

Private Member Functions

DcmListoperator= (const DcmList &)
 private undefined copy constructor
 DcmList (const DcmList &newList)
 private undefined copy assignment operator

Private Attributes

DcmListNodefirstNode
 pointer to first node in list
DcmListNodelastNode
 pointer to last node in list
DcmListNodecurrentNode
 pointer to current node in list
unsigned long cardinality
 number of elements in list

Detailed Description

double-linked list class that maintains pointers to DcmObject instances.

The remove operation does not delete the object pointed to, however, the destructor will delete all elements pointed to


Member Function Documentation

insert object at end of list

Parameters:
objpointer to object
Returns:
pointer to object

Remove and delete all elements from list.

Thus, the elements' memory is also freed by this operation. The list is empty after calling this function.

DcmObject* DcmList::get ( E_ListPos  pos = ELP_atpos)

get pointer to element in list at given position

Parameters:
posposition indicator
Returns:
pointer to object
DcmObject* DcmList::insert ( DcmObject obj,
E_ListPos  pos = ELP_next 
)

insert object relative to current position and indicator

Parameters:
objpointer to object
posposition indicator
Returns:
pointer to object

insert object at start of list

Parameters:
objpointer to object
Returns:
pointer to object

remove current entry from list, return element

Returns:
pointer to removed element, which is not deleted
DcmObject* DcmList::seek ( E_ListPos  pos = ELP_next)

seek within element in list to given position (i.e.

set current element to given position)

Parameters:
posposition indicator
Returns:
pointer to new current object
DcmObject* DcmList::seek_to ( unsigned long  absolute_position)

seek within element in list to given element index (i.e.

set current element to given index)

Parameters:
absolute_positionposition index < card()
Returns:
pointer to new current object

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