Changeset 3238 in orxonox.OLD for orxonox/branches/nico/src/list.h
- Timestamp:
- Dec 20, 2004, 2:42:54 AM (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/nico/src/list.h
r2822 r3238 1 1 2 #ifndef LIST_H3 #define LIST_H2 #ifndef _LIST_H 3 #define _LIST_H 4 4 5 5 #include "stdincl.h" … … 22 22 void add(WorldEntity* entity); 23 23 void remove(WorldEntity* entity); 24 void clear();24 void destroy(); 25 25 WorldEntity* firstElement(); 26 26 bool isEmpty(); … … 80 80 void add(WorldEntity* entity); 81 81 void remove(WorldEntity* entity); 82 void clear();82 void destroy(); 83 83 T* firstElement(); 84 84 bool isEmpty(); … … 106 106 void tList<T>::add(WorldEntity* entity) 107 107 { 108 printf("tList<T>::add() \n");109 108 listElement* el = new listElement; 110 109 el->prev = this->last; … … 128 127 { 129 128 if( this->currentEl->curr == entity) 130 { 131 printf("tList<T>::remove() - object found\n"); 132 129 { 133 130 if( this->currentEl->prev == NULL ) this->first = this->currentEl->next; 134 131 else this->currentEl->prev->next = this->currentEl->next; … … 148 145 149 146 template<class T> 150 void tList<T>::clear() 151 { 152 printf("tList<T>::clear() - clearing all world objects, releasing mem\n"); 147 void tList<T>::destroy() 148 { 153 149 this->currentEl = this->first; 154 150 while(this->currentEl != NULL) … … 209 205 {} 210 206 211 #endif 207 #endif /* _LIST_H */
Note: See TracChangeset
for help on using the changeset viewer.