diff --git a/src/libCom/cxxTemplates/tsDLListDeprecated.h b/src/libCom/cxxTemplates/tsDLListDeprecated.h deleted file mode 100644 index 6093181ee..000000000 --- a/src/libCom/cxxTemplates/tsDLListDeprecated.h +++ /dev/null @@ -1,376 +0,0 @@ -/*************************************************************************\ -* Copyright (c) 2002 The University of Chicago, as Operator of Argonne -* National Laboratory. -* Copyright (c) 2002 The Regents of the University of California, as -* Operator of Los Alamos National Laboratory. -* EPICS BASE Versions 3.13.7 -* and higher are distributed subject to a Software License Agreement found -* in file LICENSE that is included with this distribution. -\*************************************************************************/ - -// -// tsDLIter -// -// doubly linked list iterator -// -// Notes: -// 1) -// This iterator does not allow for removal -// of an item in order to avoid problems -// resulting when we remove an item (and -// then dont know whether to make pCurrent -// point at the item before or after the -// item removed -// -template -class tsDLIter { -public: - tsDLIter (tsDLList & listIn); - void reset (); - void reset (tsDLList &listIn); - void operator = (tsDLList &listIn); - T * next (); - T * prev (); - T * first(); - T * last(); - T * operator () (); - -protected: - T *pCurrent; - tsDLList *pList; - - T * current (); // certain compilers require this -}; - -// -// class tsDLFwdIter -// -// Notes: -// 1) No direct access to pCurrent is provided since -// this might allow for confusion when an item -// is removed (and pCurrent ends up pointing at -// an item that has been seen before) -// -// 2) This iterator only moves forward in order to -// avoid problems resulting when we remove an -// item (and then dont know whether to make -// pCurrent point at the item before or after -// the item removed -// -template -class tsDLFwdIter: private tsDLIter { -public: - tsDLFwdIter (tsDLList &listIn); - void reset (); - void reset (tsDLList &listIn); - void operator = (tsDLList &listIn); - T * operator () (); - T * next (); - T * first(); - - // - // remove () - // (and move current to be the item - // pointed to by pPrev - the item seen - // by the iterator before the current one - - // this guarantee that the list will be - // accessed sequentially even if an item - // is removed) - // - void remove (); -protected: - T *current (); -}; - -// -// tsDLBwdIter -// -// Notes: -// 1) No direct access to pCurrent is provided since -// this might allow for confusion when an item -// is removed (and pCurrent ends up pointing at -// an item that has been seen before) -// -// 2) This iterator only moves backward in order to -// avoid problems resulting when we remove an -// item (and then dont know whether to make -// pCurrent point at the item before or after -// the item removed -// -template -class tsDLBwdIter : private tsDLIter { -public: - tsDLBwdIter (tsDLList &listIn); - void reset (); - void reset (tsDLList &listIn); - void operator = (tsDLList &listIn); - T * operator () () { return this->tsDLIter::prev(); } - T * prev (); - T * last(); - // - // remove () - // remove current item - // (and move current to be the item - // pointed to by pNext - the item seen - // by the iterator before the current one - - // this guarantee that the list will be - // accessed sequentially even if an item - // is removed) - // - void remove (); -protected: - T * current (); -}; - -// -// tsDLFwdIter::remove () -// (and move current to be the item -// pointed to by pPrev - the item seen -// by the iterator before the current one - -// this guarantee that the list will be -// accessed sequentially even if an item -// is removed) -// -template -void tsDLFwdIter::remove () -{ - T *pCur = this->pCurrent; - - if (pCur) { - tsDLNode *pCurNode = pCur; - - // - // Move this->pCurrent to the previous item - // - this->pCurrent = pCurNode->pPrev; - - // - // delete current item - // - this->pList->remove(*pCur); - } -} - -// -// tsDLFwdIter::next () -// -template -inline T * tsDLFwdIter::next () -{ - tsDLIter &iterBase = *this; - return iterBase.next(); -} - -// -// tsDLFwdIter::operator () () -// -template -inline T * tsDLFwdIter::operator () () -{ - return this->next(); -} - -////////////////////////////////////////// -// tsDLIter member functions -////////////////////////////////////////// - -template -inline tsDLIter::tsDLIter (tsDLList & listIn) : - pCurrent(0), pList(&listIn) {} - -template -inline void tsDLIter::reset () -{ - this->pCurrent = 0; -} - -template -inline void tsDLIter::reset (tsDLList &listIn) -{ - this->reset(); - this->pList = &listIn; -} - -template -inline void tsDLIter::operator = (tsDLList &listIn) -{ - this->reset(listIn); -} - -template -inline T * tsDLIter::first() -{ - this->pCurrent = this->pList->pFirst; - return this->pCurrent; -} - -template -inline T * tsDLIter::last() -{ - this->pCurrent = this->pList->pLast; - return this->pCurrent; -} - -// -// tsDLIter::next () -// -template -inline T * tsDLIter::next () -{ - T *pCur = this->pCurrent; - if (pCur==0) { - pCur = this->pList->pFirst; - } - else { - tsDLNode *pCurNode = pCur; - pCur = pCurNode->pNext; - } - this->pCurrent = pCur; - return pCur; -} - -// -// tsDLIter::prev () -// -template -inline T * tsDLIter::prev () -{ - T *pCur = this->pCurrent; - if (pCur==0) { - pCur = this->pList->pLast; - } - else { - tsDLNode *pCurNode = pCur; - pCur = pCurNode->pPrev; - } - this->pCurrent = pCur; - return pCur; -} - -// -// tsDLIter::operator () () -// -template -inline T * tsDLIter::operator () () -{ - return this->next(); -} - -// -// tsDLIter::current() -// -template -inline T * tsDLIter::current() -{ - return this->pCurrent; -} - -/////////////////////////////////////////// -// tsDLBwdIter member functions -/////////////////////////////////////////// - -template -inline tsDLBwdIter::tsDLBwdIter(tsDLList &listIn) : - tsDLIter(listIn) {} - -template -inline void tsDLBwdIter::reset () -{ - this->tsDLIter::reset(); -} - -template -inline void tsDLBwdIter::reset (tsDLList &listIn) -{ - this->tsDLIter::reset(listIn); -} - -template -inline void tsDLBwdIter::operator = (tsDLList &listIn) -{ - this->tsDLIter::reset(listIn); -} - -template -inline T * tsDLBwdIter::last() -{ - return this->tsDLIter::last(); -} - -// -// tsDLBwdIter::remove () -// -// remove current item -// (and move current to be the item -// pointed to by pNext - the item seen -// by the iterator before the current one - -// this guarantee that the list will be -// accessed sequentially even if an item -// is removed) -// -template -void tsDLBwdIter::remove () -{ - T *pCur = this->pCurrent; - - if (pCur) { - tsDLNode *pCurNode = pCur; - - // - // strip const (we didnt declare the - // list const in the constructor) - // - tsDLList * pMutableList = - (tsDLList *) this->pList; - - // - // Move this->pCurrent to the item after the - // item being deleted - // - this->pCurrent = pCurNode->pNext; - - // - // delete current item - // - pMutableList->remove(*pCur); - } -} - -////////////////////////////////////////// -// tsDLFwdIter member functions -////////////////////////////////////////// - -template -inline tsDLFwdIter::tsDLFwdIter (tsDLList &listIn) : - tsDLIter(listIn) {} - -template -inline void tsDLFwdIter::reset () -{ - this->tsDLIter::reset(); -} - -template -inline void tsDLFwdIter::reset (tsDLList &listIn) -{ - this->tsDLIter::reset(listIn); -} - -template -inline void tsDLFwdIter::operator = (tsDLList &listIn) -{ - this->tsDLIter::reset(listIn); -} - -template -inline T * tsDLFwdIter::first() -{ - tsDLIter &iterBase = *this; - return iterBase.first(); -} - -template -inline T * tsDLFwdIter::current() -{ - return this->tsDLIter::current (); -}