Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5111 in orxonox.OLD for trunk/src/util/loading


Ignore:
Timestamp:
Aug 23, 2005, 11:13:56 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: reverted the last steps, because they created a huge pack of seg-faults

Location:
trunk/src/util/loading
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/util/loading/load_param.cc

    r5110 r5111  
    1717
    1818#include "list.h"
     19#include "array.h"
    1920#include "base_object.h"
    2021
     
    295296
    296297  tIterator<LoadParamDescription>* iterator = this->paramList->getIterator();
    297   LoadParamDescription* enumParamDesc = iterator->firstElement();
     298  LoadParamDescription* enumParamDesc = iterator->nextElement();
    298299  while (enumParamDesc)
    299300    {
     
    314315{
    315316  tIterator<LoadClassDescription>* iterator = LoadClassDescription::classList->getIterator();
    316   LoadClassDescription* enumClassDesc = iterator->firstElement();
     317  LoadClassDescription* enumClassDesc = iterator->nextElement();
    317318  while (enumClassDesc)
    318319    {
     
    336337{
    337338  tIterator<LoadParamDescription>* iterator = this->paramList->getIterator();
    338   LoadParamDescription* enumParamDesc = iterator->firstElement();
     339  LoadParamDescription* enumParamDesc = iterator->nextElement();
    339340  while (enumParamDesc)
    340341    {
     
    362363  PRINT(3)(" Listing all the Loadable Options (loaded since Game started).\n\n");
    363364  tIterator<LoadClassDescription>* classIT = LoadClassDescription::classList->getIterator();
    364   LoadClassDescription* enumClassDesc = classIT->firstElement();
     365  LoadClassDescription* enumClassDesc = classIT->nextElement();
    365366  while (enumClassDesc)
    366367    {
    367368      PRINT(3)("<%s>\n", enumClassDesc->className);
    368369      tIterator<LoadParamDescription>* paramIT = enumClassDesc->paramList->getIterator();
    369       LoadParamDescription* enumParamDesc = paramIT->firstElement();
     370      LoadParamDescription* enumParamDesc = paramIT->nextElement();
    370371      while (enumParamDesc)
    371372        {
     
    385386 * searches for classes, which beginn with classNameBegin
    386387 * @param classNameBegin the beginning string of a Class
    387  * @return a NEW char-array with ClassNames. The LIST should be deleted afterwards,
     388 * @return a NEW char-array with ClassNames. The ARRAY should be deleted afterwards,
    388389 * !! The strings MUST NOT be deleted !!
    389390 */
    390 tList<const char>* LoadClassDescription::searchClassWithShort(const char* classNameBegin)
     391Array<char*>* LoadClassDescription::searchClassWithShort(const char* classNameBegin)
    391392{
    392393  unsigned int searchLength = strlen(classNameBegin);
    393   tList<const char>* retVal = new tList<const char>;
     394  Array<char*>* retVal = new Array<char*>;
    394395
    395396  tIterator<LoadClassDescription>* iterator = LoadClassDescription::classList->getIterator();
    396   LoadClassDescription* enumClassDesc = iterator->firstElement();
     397  LoadClassDescription* enumClassDesc = iterator->nextElement();
    397398  while (enumClassDesc)
    398399  {
     
    400401        !strncasecmp(enumClassDesc->className, classNameBegin, searchLength))
    401402    {
    402       retVal->add(enumClassDesc->className);
     403      retVal->addEntry(enumClassDesc->className);
    403404    }
    404405    enumClassDesc = iterator->nextElement();
     
    406407  delete iterator;
    407408
     409  retVal->finalizeArray();
    408410  return retVal;
    409411}
     
    412414// {
    413415//   tIterator<LoadClassDescription>* iterator = LoadClassDescription::classList->getIterator();
    414 //   LoadClassDescription* enumClassDesc = iterator->firstElement();
     416//   LoadClassDescription* enumClassDesc = iterator->nextElement();
    415417//   while (enumClassDesc)
    416418//   {
  • trunk/src/util/loading/load_param.h

    r5102 r5111  
    3131// Forward Declaration //
    3232template<class T> class tList;
     33template<class T> class Array;
    3334
    3435//! macro that makes it even more easy to load a Parameter
     
    311312
    312313  static void printAll(const char* fileName = NULL);
    313   static tList<const char>* searchClassWithShort(const char* classNameBegin);
     314  static Array<char*>* searchClassWithShort(const char* classNameBegin);
    314315//  static const LoadParamDescription* getClass(const char* className);
    315316
Note: See TracChangeset for help on using the changeset viewer.