Changeset 2636 in orxonox.OLD for orxonox/trunk/src/list.h
- Timestamp:
- Oct 25, 2004, 12:48:39 AM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/list.h
r2077 r2636 1 /* 2 orxonox - the future of 3D-vertical-scrollers 3 4 Copyright (C) 2004 orx 5 6 This program is free software; you can redistribute it and/or modify 7 it under the terms of the GNU General Public License as published by 8 the Free Software Foundation; either version 2, or (at your option) 9 any later version. 10 11 ### File Specific: 12 main-programmer: Christian Meyer 13 14 ADDONS/FIXES: 15 16 Patrick Boenzli : Implemented getSize() function 17 */ 18 19 1 20 /*! 2 21 \file list.h … … 21 40 List<T>* prev; 22 41 bool bReference; 42 int size; 23 43 24 44 public: … … 35 55 void set_prev (List<T>* ptr); 36 56 int remove (T* obj, FINDMODE mode); 57 int getSize(); 37 58 }; 38 59 … … 52 73 prev = p; 53 74 bReference = bRef; 75 if(obj != NULL) 76 ++size; 54 77 } 55 78 … … 127 150 break; 128 151 } 152 ++size; 129 153 return 0; 130 154 } … … 224 248 } 225 249 } 250 --size; 226 251 return 0; 227 252 } … … 262 287 263 288 289 /** 290 \brief Returns the current size of the List 291 \return Size of List 292 */ 293 template<class T> 294 int List<T>::getSize() 295 { 296 return this->size; 297 } 264 298 265 299 #endif
Note: See TracChangeset
for help on using the changeset viewer.