79 virtual bool equal(
const T &op1,
const T &op2)
const
133 typename std::list<coDLListSafeIter<T> *>::iterator iter;
137 (*iter)->d_actElem =
NULL;
145 typename std::list<coDLListSafeIter<T> *>::iterator iter;
148 if ((*iter)->d_actElem == whichElem)
152 LOGWARNING(
"Adjusting iterators in list 0x%x!",
this);
200 virtual void clean();
290 virtual void clean();
299 nextElem = elem->
next;
316 LOGWARNING(
"coDLPtrList::remove(void) called in 0x%x ! This method is obsolete !!!",
this);
520 LOGWARNING(
"!!!! Accessing dummy-elem with: T &coDLListIter<T>::operator(); !!!!");
535 LOGWARNING(
"!!!! Accessing dummy-elem with: T &coDLListIter<T>::operator*(); !!!!");
550 LOGWARNING(
"!!!! Accessing dummy-elem with: T coDLListIter<T>::operator->(); !!!!");
582 virtual void remove()
630 class coDLListSafeIter :
public coDLListIter<T>
684 virtual void remove()
715 this->head = this->tail =
NULL;
723 while ((iter) && !((*iter) == searchItem))
735 while ((iter) && !comp.
equal((*iter), searchItem))
746 while ((iter) && (idx))
776 this->head = this->tail = curr =
NULL;
778 invalidateIterators();
793 delete this->head->item;
796 this->head = this->tail = cur =
NULL;
798 this->invalidateIterators();
809 newlink->
prev = this->tail;
810 this->tail = newlink;
812 (newlink->
prev)->next = newlink;
814 this->head = newlink;
827 newlink->
prev = this->tail;
828 this->tail = newlink;
830 (newlink->
prev)->next = newlink;
832 this->head = curr = newlink;
845 this->correctIteratorsFor(removeElem);
846 if (removeElem->
prev)
847 (removeElem->
prev)->next = removeElem->
next;
848 if (removeElem->
next)
849 (removeElem->
next)->prev = removeElem->
prev;
850 if (this->head == removeElem)
851 this->head = removeElem->
next;
852 if (this->tail == removeElem)
853 this->tail = removeElem->
prev;
867 this->correctIteratorsFor(removeElem);
869 delete removeElem->
item;
870 if (removeElem->
prev)
871 (removeElem->
prev)->next = removeElem->
next;
872 if (removeElem->
next)
873 (removeElem->
next)->prev = removeElem->
prev;
874 if (this->head == removeElem)
875 this->head = removeElem->
next;
876 if (this->tail == removeElem)
877 this->tail = removeElem->
prev;
890 while (link && n > 0)
898 return this->head->item;
908 while (link && n > 0)
916 return this->head->item;
926 while (link && n > 0)
934 return this->head->item;
973 for (
int i = 0; i < N; i++)
986 while (curr && !(curr->item == a))
988 return (curr !=
NULL);
1002 newlink->
next = d_actElem->next;
1003 newlink->
prev = d_actElem;
1004 d_actElem->next = newlink;
1006 d_myList->tail = newlink;
1008 newlink->
next->prev = newlink;
1009 d_myList->listItems++;
1012 d_myList->append(a);
1026 newlink->
next = d_actElem;
1027 newlink->
prev = d_actElem->prev;
1028 d_actElem->prev = newlink;
1030 d_myList->head = newlink;
1032 newlink->
prev->next = newlink;
1033 d_myList->listItems++;
1036 d_myList->append(a);
1041 #endif //YAC_LINK_LIST_H
void setLast()
set to last element
Definition: coDLList.h:566
coDLListIter< T > & insertBefore(const T &newElem)
add new element after my position
Definition: coDLList.h:1021
virtual void clean()
cleanup everything
Definition: coDLList.h:785
#define INLINE
Definition: coDLList.h:49
virtual ~coDLList(void)
destructor : virtual for all derived classes
Definition: coDLList.h:758
void addIter(coDLListSafeIter< T > *iter)
Definition: coDLList.h:117
GLboolean reset
Definition: khronos-glext.h:6369
coDLPtrList< T > & set(int)
move the current to the Nth item: obsolete, use iterators
Definition: coDLList.h:970
void operator++(int)
go to next element : iter++
Definition: coDLList.h:493
coDLPtrList(bool doDelete=true)
Definition: coDLList.h:264
virtual void remove(coDLListElem< T > *whichElem)
remove specific item from list : virtual for coDLPtrList
Definition: coDLList.h:841
coDLListIter< T > findElem(const T &)
get an Iterator placed to specific element
Definition: coDLList.h:720
coDLListIter< T > & insertAfter(const T &newElem)
add new element after my position
Definition: coDLList.h:997
coDLList< T > & append(const T &)
add new item to end of list
Definition: coDLList.h:805
int find(const T &)
Definition: coDLList.h:983
virtual bool equal(const T &op1, const T &op2) const
Definition: coDLList.h:79
coDLListElem< T > * next
Definition: coDLList.h:62
void operator=(const T &elem)
set to specific element
Definition: coDLList.h:594
coDLPtrList< T > & append(const T &a)
append an element
Definition: coDLList.h:823
void operator--(int)
go to previous element : iter–
Definition: coDLList.h:505
void removeIter(coDLListSafeIter< T > *iter)
Definition: coDLList.h:122
Definition: coDLList.h:46
Definition: coDLList.h:56
#define NULL
Definition: covise_list.h:22
void operator++()
go to next element : ++iter
Definition: coDLList.h:487
virtual ~coDLListIter()
Destructor.
Definition: coDLList.h:478
coDLListElem< T > * d_actElem
Definition: coDLList.h:412
coDLListElem< T > * prev
Definition: coDLList.h:62
virtual void advance()
Definition: coDLList.h:417
coDLListElem< T > * getHeadStruct()
get the head ot the chain: primarily used for defining own iterators
Definition: coDLList.h:222
coDLListIter< T > last()
get an Iterator placed on the last element
Definition: coDLList.h:707
GLdouble n
Definition: khronos-glext.h:8447
void invalidateIterators(void)
Definition: coDLList.h:129
coDLListElem< T > * head
Definition: coDLList.h:109
typedef void(APIENTRY *GLDEBUGPROCARB)(GLenum source
virtual void backstep()
Definition: coDLList.h:424
void setFirst()
set to first element
Definition: coDLList.h:556
virtual ~coDLListCompare()
Definition: coDLList.h:76
coDLListElem< T > * tail
Definition: coDLList.h:109
T item(int)
return the Nth item: prefer usage of [] or iterator
Definition: coDLList.h:923
virtual void clean()
cleanuop everything
Definition: coDLList.h:767
GLuint res
Definition: khronos-glext.h:10588
coDLList< T > * d_myList
Definition: coDLList.h:409
void correctIteratorsFor(coDLListElem< T > *whichElem)
Definition: coDLList.h:141
virtual ~coDLListSafeIter()
Destructor.
Definition: coDLList.h:678
coDLList< T > & next(void)
move the current to next item in list: obsolete, use iterators
Definition: coDLList.h:358
Definition: coDLList.h:43
int num(void) const
number of items in this list
Definition: coDLList.h:169
virtual void prevValid()
Definition: coDLList.h:434
Definition: coDLList.h:73
void operator=(int num)
set to element # if existent
Definition: coDLList.h:606
void setNullElem(const T &nullElem)
set the return value for 'current' in case of NO-return
Definition: coDLList.h:273
std::list< coDLListSafeIter< T > * > m_iterators
Definition: coDLList.h:115
virtual ~coDLPtrList()
destructor: delete elements if doDelete=true
Definition: coDLList.h:293
coDLList(void)
constructor: construct empty list
Definition: coDLList.h:713
coDLListElem< T > * curr
Definition: coDLList.h:255
int listItems
Definition: coDLList.h:112
GLuint GLuint num
Definition: khronos-glext.h:10593
GLsizei GLsizei GLenum GLenum const GLvoid * data
Definition: khronos-glext.h:6354
T & operator[](int)
return the Nth item
Definition: coDLList.h:905
GLboolean GLboolean GLboolean GLboolean a
Definition: khronos-glext.h:6895
T & operator*()
access object with (*iter)
Definition: coDLList.h:526
coDLListElem< T > * getTailStruct()
get the tail ot the chain: primarily used for defining own iterators
Definition: coDLList.h:228
void setNoDelete(bool doDelete=false)
Definition: coDLList.h:281
coDLListSafeIter< T > & operator=(const coDLListSafeIter< T > &old)
standard assignment operator
Definition: coDLList.h:649
T d_nullElem
Definition: coDLList.h:258
T current(void)
access 'current' item: obsolete, use iterators
Definition: coDLList.h:941
coDLListElem(const T &data)
Definition: coDLList.h:65
Definition: coDLList.h:101
coDLList< T > & reset(void)
reset current to the beginning of the list: obsolete, use iterators
Definition: coDLList.h:348
T operator->()
access object with iter->something: only if T is a pointer
Definition: coDLList.h:541
T item
Definition: coDLList.h:59
void remove()
remove current item from list: obsolete, use iterators
Definition: coDLList.h:314
void operator--()
go to previous element : –iter
Definition: coDLList.h:499
Definition: coDLList.h:249
#define LOGWARNING
Definition: coErr.h:138
bool d_doDelete
Definition: coDLList.h:252
T & operator()()
access object with iter(): if (iter)=false: whatever might be in
Definition: coDLList.h:511
coDLListIter< T > first()
get an Iterator placed on the first element
Definition: coDLList.h:701
coDLListIter< T > & operator=(const coDLListIter< T > &old)
standard assignment operator
Definition: coDLList.h:453
virtual void nextValid()
Definition: coDLList.h:431