OFList< T > Class Template Reference

double linked list template class. More...

List of all members.

Public Member Functions

OFIterator< T > insert (OFIterator< T > position, const T &x)
 inserts an element into the list before the given position.
 OFList ()
 default constructor
 OFList (const OFList< T > &oldList)
 copy constructor
OFIterator< T > begin () const
 returns an iterator referencing the first element in the list.
OFIterator< T > end () const
 returns an iterator which points to the past-to-end element of the list.
OFBool empty () const
 returns true if list is empty.
size_t size () const
 returns number of elements in the list.
T & front ()
 returns a reference to the first element in the list.
T & back ()
 returns a reference to the last element in the list.
void push_front (const T &x)
 inserts before the first element of the list.
void pop_front ()
 removes the first element of the list.
void push_back (const T &x)
 inserts after the last element of the list.
void pop_back ()
 removes the last element of the list.
void insert (OFIterator< T > position, size_t n, const T &x)
 inserts n elements with value x into the list, before the given position.
OFIterator< T > erase (OFIterator< T > position)
 removes the element at the given position from the list.
OFIterator< T > erase (OFIterator< T > position, OFIterator< T > last)
 removes all elements in the range [position,last) from the list.
void clear ()
 removes all elements from the list.
void splice (OFIterator< T > position, OFList< T > &x)
 moves the contents of list x into the current list before the given position.
void splice (OFIterator< T > position, OFList< T > &x, OFIterator< T > i)
 inserts one element from list x into the current list and removes it from x
void splice (OFIterator< T > position, OFList< T > &x, OFIterator< T > first, OFIterator< T > last)
 inserts elements in the range [first, last) before position and removes the elements from x
void remove (const T &value)
 removes all elements from the list referred by an iterator i where *i == value

Private Member Functions

void copy (const OFList< T > &oldList)
 inserts a copy of the given list into the current list.
void recalcListSize ()
 counts the elements in the list and adjusts the listSize member variable.
OFList< T > & operator= (const OFList< T > &arg)
 private undefined copy assignment operator


Detailed Description

template<class T>
class OFList< T >

double linked list template class.

The interface is a subset of the STL list class.

Definition at line 284 of file oflist.h.


Member Function Documentation

template<class T>
T& OFList< T >::back  )  [inline]
 

returns a reference to the last element in the list.

May only be called if list is non-empty.

Returns:
last element in list, by reference
Definition at line 364 of file oflist.h.

template<class T>
OFIterator<T> OFList< T >::begin  )  const [inline]
 

returns an iterator referencing the first element in the list.

If the list is empty, then begin() == end().

Returns:
iterator to first element of list, by value.
Definition at line 336 of file oflist.h.

Referenced by DcmQuantHistogramItemList::add(), DVStudyCache::clear(), DVSeriesCache::clear(), DVInstanceCache::clear(), OFList< DcmKeyValuePair< DcmPresentationContextList * > * >::copy(), OFList< DcmKeyValuePair< DcmPresentationContextList * > * >::front(), DVStudyCache::gotoFirst(), DVSeriesCache::gotoFirst(), DVInstanceCache::gotoFirst(), DVStudyCache::gotoItem(), DVSeriesCache::gotoItem(), DVInstanceCache::gotoItem(), DVStudyCache::isElem(), DVSeriesCache::isElem(), DVInstanceCache::isElem(), DcmSimpleMap< DcmExtendedNegotiationList * >::lookup(), DcmQuantHistogramItemList::lookup(), DcmSimpleMap< DcmExtendedNegotiationList * >::OFListIterator(), OFList< DcmKeyValuePair< DcmPresentationContextList * > * >::pop_front(), OFList< DcmKeyValuePair< DcmPresentationContextList * > * >::push_front(), OFList< DcmKeyValuePair< DcmPresentationContextList * > * >::remove(), DcmDataDictionary::repeatingBegin(), DVStudyCache::updateStatus(), DVSeriesCache::updateStatus(), DVInstanceCache::updateStatus(), DcmRLEEncoder::write(), DcmRLEEncoder::~DcmRLEEncoder(), and DcmSimpleMap< DcmExtendedNegotiationList * >::~DcmSimpleMap().

template<class T>
void OFList< T >::clear  )  [inline]
 

removes all elements from the list.

All iterators pointing to elements in the list become invalid.

Reimplemented in DcmDictEntryList, and DcmPrivateTagCache.

Definition at line 424 of file oflist.h.

Referenced by DVStudyCache::clear(), DVSeriesCache::clear(), and DVInstanceCache::clear().

template<class T>
void OFList< T >::copy const OFList< T > &  oldList  )  [inline, private]
 

inserts a copy of the given list into the current list.

Parameters:
oldList list to be copied
Definition at line 302 of file oflist.h.

Referenced by OFList< DcmKeyValuePair< DcmPresentationContextList * > * >::OFList().

template<class T>
OFBool OFList< T >::empty  )  const [inline]
 

returns true if list is empty.

Returns:
OFTrue if list is empty, OFFalse otherwise.
Definition at line 347 of file oflist.h.

Referenced by DVStudyCache::empty(), DVSeriesCache::empty(), and DVInstanceCache::empty().

template<class T>
OFIterator<T> OFList< T >::end  )  const [inline]
 

returns an iterator which points to the past-to-end element of the list.

Returns:
iterator to past-to-end, by value.
Definition at line 342 of file oflist.h.

Referenced by DVStudyCache::addItem(), DVSeriesCache::addItem(), DVInstanceCache::addItem(), OFList< DcmKeyValuePair< DcmPresentationContextList * > * >::back(), DVStudyCache::clear(), DVSeriesCache::clear(), DVInstanceCache::clear(), OFList< DcmKeyValuePair< DcmPresentationContextList * > * >::copy(), DVInstanceCache::DVInstanceCache(), DVSeriesCache::DVSeriesCache(), DVStudyCache::DVStudyCache(), DVStudyCache::getItem(), DVSeriesCache::getItem(), DVInstanceCache::getItem(), DVStudyCache::gotoFirst(), DVSeriesCache::gotoFirst(), DVInstanceCache::gotoFirst(), DVStudyCache::gotoItem(), DVSeriesCache::gotoItem(), DVInstanceCache::gotoItem(), DVStudyCache::gotoNext(), DVSeriesCache::gotoNext(), DVInstanceCache::gotoNext(), DVStudyCache::isElem(), DVSeriesCache::isElem(), DVInstanceCache::isElem(), DcmSimpleMap< DcmExtendedNegotiationList * >::lookup(), DcmSimpleMap< DcmExtendedNegotiationList * >::OFListIterator(), OFList< DcmKeyValuePair< DcmPresentationContextList * > * >::pop_back(), OFList< DcmKeyValuePair< DcmPresentationContextList * > * >::push_back(), OFList< DcmKeyValuePair< DcmPresentationContextList * > * >::remove(), DcmDataDictionary::repeatingEnd(), DVSeriesCache::reset(), DVInstanceCache::reset(), DVStudyCache::updateStatus(), DVSeriesCache::updateStatus(), DVInstanceCache::updateStatus(), DcmRLEEncoder::write(), DcmRLEEncoder::~DcmRLEEncoder(), and DcmSimpleMap< DcmExtendedNegotiationList * >::~DcmSimpleMap().

template<class T>
OFIterator<T> OFList< T >::erase OFIterator< T >  position,
OFIterator< T >  last
[inline]
 

removes all elements in the range [position,last) from the list.

All iterators pointing to the removed elements become invalid.

Parameters:
position iterator to the first element to be deleted
last iterator pointing to the element after the last element to be removed
Returns:
iterator pointing to the element after the last removed element
Definition at line 415 of file oflist.h.

template<class T>
OFIterator<T> OFList< T >::erase OFIterator< T >  position  )  [inline]
 

removes the element at the given position from the list.

All iterators pointing to the removed element become invalid.

Returns:
iterator pointing to the element after the removed one
Definition at line 404 of file oflist.h.

Referenced by DVStudyCache::clear(), DVSeriesCache::clear(), DVInstanceCache::clear(), OFList< DcmKeyValuePair< DcmPresentationContextList * > * >::erase(), OFList< DcmKeyValuePair< DcmPresentationContextList * > * >::pop_back(), OFList< DcmKeyValuePair< DcmPresentationContextList * > * >::pop_front(), OFList< DcmKeyValuePair< DcmPresentationContextList * > * >::remove(), DcmRLEEncoder::~DcmRLEEncoder(), and DcmSimpleMap< DcmExtendedNegotiationList * >::~DcmSimpleMap().

template<class T>
T& OFList< T >::front  )  [inline]
 

returns a reference to the first element in the list.

May only be called if list is non-empty.

Returns:
first element in list, by reference
Definition at line 358 of file oflist.h.

template<class T>
void OFList< T >::insert OFIterator< T >  position,
size_t  n,
const T &  x
[inline]
 

inserts n elements with value x into the list, before the given position.

Parameters:
position iterator to position before which the elements are inserted
n number of entries to be created
x value from which the new list entries are copy-constructed
Definition at line 395 of file oflist.h.

template<class T>
OFIterator<T> OFList< T >::insert OFIterator< T >  position,
const T &  x
[inline]
 

inserts an element into the list before the given position.

Parameters:
position iterator to position before which the element is inserted
x value from which the new list entry is copy-constructed
Returns:
iterator pointing to the new element in the list
Definition at line 292 of file oflist.h.

Referenced by OFList< DcmKeyValuePair< DcmPresentationContextList * > * >::copy(), OFList< DcmKeyValuePair< DcmPresentationContextList * > * >::push_back(), and OFList< DcmKeyValuePair< DcmPresentationContextList * > * >::push_front().

template<class T>
void OFList< T >::pop_back  )  [inline]
 

removes the last element of the list.

May only be called if list is non-empty. All iterators pointing to the removed element become invalid. Definition at line 388 of file oflist.h.

template<class T>
void OFList< T >::pop_front  )  [inline]
 

removes the first element of the list.

May only be called if list is non-empty. All iterators pointing to the removed element become invalid. Definition at line 376 of file oflist.h.

template<class T>
void OFList< T >::push_back const T &  x  )  [inline]
 

inserts after the last element of the list.

Parameters:
x value from which the new list entry is copy constructed
Definition at line 381 of file oflist.h.

Referenced by DcmSimpleMap< DcmExtendedNegotiationList * >::add(), DVStudyCache::addItem(), DVSeriesCache::addItem(), DVInstanceCache::addItem(), DVPSStoredPrint_PList::insert(), DVPSPresentationLUT_PList::insert(), and DcmRLEEncoder::move().

template<class T>
void OFList< T >::push_front const T &  x  )  [inline]
 

inserts before the first element of the list.

Parameters:
x value from which the new list entry is copy constructed
Definition at line 369 of file oflist.h.

Referenced by DcmQuantHistogramItemList::add(), and DcmQuantHistogramItemList::push_front().

template<class T>
void OFList< T >::remove const T &  value  )  [inline]
 

removes all elements from the list referred by an iterator i where *i == value

Parameters:
value value to be compared with list contents
Definition at line 466 of file oflist.h.

template<class T>
size_t OFList< T >::size  )  const [inline]
 

returns number of elements in the list.

Returns:
number of elements
Definition at line 352 of file oflist.h.

Referenced by OFCommandLine::getArgCount(), DVStudyCache::getCount(), DVSeriesCache::getCount(), DVInstanceCache::getCount(), OFCommandLine::getParamCount(), DcmDataDictionary::numberOfRepeatingTagEntries(), DVPSVOIWindow_PList::size(), DVPSVOILUT_PList::size(), DVPSTextObject_PList::size(), DVPSSoftcopyVOI_PList::size(), DVPSStoredPrint_PList::size(), DVPSReferencedImage_PList::size(), DVPSPresentationLUT_PList::size(), DVPSOverlay_PList::size(), DVPSImageBoxContent_PList::size(), DVPSGraphicObject_PList::size(), DVPSGraphicLayer_PList::size(), DVPSDisplayedArea_PList::size(), DVPSCurve_PList::size(), DVPSAnnotationContent_PList::size(), DcmQuantHistogramItemList::size(), DcmRLEEncoder::size(), and DcmRLEEncoder::write().

template<class T>
void OFList< T >::splice OFIterator< T >  position,
OFList< T > &  x,
OFIterator< T >  first,
OFIterator< T >  last
[inline]
 

inserts elements in the range [first, last) before position and removes the elements from x

Parameters:
position iterator to position before which the elements are inserted
x list from which the elements are taken
first iterator to first element in list x to be moved
last iterator to element after last element in list x to be moved
Definition at line 455 of file oflist.h.

template<class T>
void OFList< T >::splice OFIterator< T >  position,
OFList< T > &  x,
OFIterator< T >  i
[inline]
 

inserts one element from list x into the current list and removes it from x

Parameters:
position iterator to position before which the element is inserted
x list from which the element is taken
i iterator to element in list x which is to be moved
Definition at line 441 of file oflist.h.

template<class T>
void OFList< T >::splice OFIterator< T >  position,
OFList< T > &  x
[inline]
 

moves the contents of list x into the current list before the given position.

Parameters:
position iterator to position before which the elements are inserted
x list from which the elements are taken, becomes empty
Definition at line 431 of file oflist.h.

Referenced by OFList< DcmKeyValuePair< DcmPresentationContextList * > * >::splice().


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


Generated on 4 Nov 2004 for OFFIS DCMTK Version 3.5.3 by Doxygen 1.3.8