Changeset 5111 in orxonox.OLD for trunk/src/util/loading
- Timestamp:
- Aug 23, 2005, 11:13:56 PM (19 years ago)
- Location:
- trunk/src/util/loading
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/util/loading/load_param.cc
r5110 r5111 17 17 18 18 #include "list.h" 19 #include "array.h" 19 20 #include "base_object.h" 20 21 … … 295 296 296 297 tIterator<LoadParamDescription>* iterator = this->paramList->getIterator(); 297 LoadParamDescription* enumParamDesc = iterator-> firstElement();298 LoadParamDescription* enumParamDesc = iterator->nextElement(); 298 299 while (enumParamDesc) 299 300 { … … 314 315 { 315 316 tIterator<LoadClassDescription>* iterator = LoadClassDescription::classList->getIterator(); 316 LoadClassDescription* enumClassDesc = iterator-> firstElement();317 LoadClassDescription* enumClassDesc = iterator->nextElement(); 317 318 while (enumClassDesc) 318 319 { … … 336 337 { 337 338 tIterator<LoadParamDescription>* iterator = this->paramList->getIterator(); 338 LoadParamDescription* enumParamDesc = iterator-> firstElement();339 LoadParamDescription* enumParamDesc = iterator->nextElement(); 339 340 while (enumParamDesc) 340 341 { … … 362 363 PRINT(3)(" Listing all the Loadable Options (loaded since Game started).\n\n"); 363 364 tIterator<LoadClassDescription>* classIT = LoadClassDescription::classList->getIterator(); 364 LoadClassDescription* enumClassDesc = classIT-> firstElement();365 LoadClassDescription* enumClassDesc = classIT->nextElement(); 365 366 while (enumClassDesc) 366 367 { 367 368 PRINT(3)("<%s>\n", enumClassDesc->className); 368 369 tIterator<LoadParamDescription>* paramIT = enumClassDesc->paramList->getIterator(); 369 LoadParamDescription* enumParamDesc = paramIT-> firstElement();370 LoadParamDescription* enumParamDesc = paramIT->nextElement(); 370 371 while (enumParamDesc) 371 372 { … … 385 386 * searches for classes, which beginn with classNameBegin 386 387 * @param classNameBegin the beginning string of a Class 387 * @return a NEW char-array with ClassNames. The LISTshould be deleted afterwards,388 * @return a NEW char-array with ClassNames. The ARRAY should be deleted afterwards, 388 389 * !! The strings MUST NOT be deleted !! 389 390 */ 390 tList<const char>* LoadClassDescription::searchClassWithShort(const char* classNameBegin)391 Array<char*>* LoadClassDescription::searchClassWithShort(const char* classNameBegin) 391 392 { 392 393 unsigned int searchLength = strlen(classNameBegin); 393 tList<const char>* retVal = new tList<const char>;394 Array<char*>* retVal = new Array<char*>; 394 395 395 396 tIterator<LoadClassDescription>* iterator = LoadClassDescription::classList->getIterator(); 396 LoadClassDescription* enumClassDesc = iterator-> firstElement();397 LoadClassDescription* enumClassDesc = iterator->nextElement(); 397 398 while (enumClassDesc) 398 399 { … … 400 401 !strncasecmp(enumClassDesc->className, classNameBegin, searchLength)) 401 402 { 402 retVal->add (enumClassDesc->className);403 retVal->addEntry(enumClassDesc->className); 403 404 } 404 405 enumClassDesc = iterator->nextElement(); … … 406 407 delete iterator; 407 408 409 retVal->finalizeArray(); 408 410 return retVal; 409 411 } … … 412 414 // { 413 415 // tIterator<LoadClassDescription>* iterator = LoadClassDescription::classList->getIterator(); 414 // LoadClassDescription* enumClassDesc = iterator-> firstElement();416 // LoadClassDescription* enumClassDesc = iterator->nextElement(); 415 417 // while (enumClassDesc) 416 418 // { -
trunk/src/util/loading/load_param.h
r5102 r5111 31 31 // Forward Declaration // 32 32 template<class T> class tList; 33 template<class T> class Array; 33 34 34 35 //! macro that makes it even more easy to load a Parameter … … 311 312 312 313 static void printAll(const char* fileName = NULL); 313 static tList<const char>* searchClassWithShort(const char* classNameBegin);314 static Array<char*>* searchClassWithShort(const char* classNameBegin); 314 315 // static const LoadParamDescription* getClass(const char* className); 315 316
Note: See TracChangeset
for help on using the changeset viewer.