- Timestamp:
- Aug 22, 2005, 12:42:28 PM (19 years ago)
- Location:
- trunk/src
- Files:
-
- 22 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/Makefile.am
r5075 r5100 151 151 lib/util/ini_parser.h \ 152 152 lib/util/substring.h \ 153 lib/util/array.h \ 153 154 lib/util/list.h \ 154 155 lib/util/color.h \ -
trunk/src/Makefile.in
r5075 r5100 409 409 lib/util/ini_parser.h \ 410 410 lib/util/substring.h \ 411 lib/util/array.h \ 411 412 lib/util/list.h \ 412 413 lib/util/color.h \ … … 440 441 esac; \ 441 442 done; \ 442 echo ' cd $(top_srcdir) && $(AUTOMAKE) -- foreignsrc/Makefile'; \443 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \ 443 444 cd $(top_srcdir) && \ 444 $(AUTOMAKE) -- foreignsrc/Makefile445 $(AUTOMAKE) --gnu src/Makefile 445 446 .PRECIOUS: Makefile 446 447 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status -
trunk/src/lib/Makefile.in
r4826 r5100 189 189 esac; \ 190 190 done; \ 191 echo ' cd $(top_srcdir) && $(AUTOMAKE) -- foreignsrc/lib/Makefile'; \191 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/Makefile'; \ 192 192 cd $(top_srcdir) && \ 193 $(AUTOMAKE) -- foreignsrc/lib/Makefile193 $(AUTOMAKE) --gnu src/lib/Makefile 194 194 .PRECIOUS: Makefile 195 195 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status -
trunk/src/lib/collision_detection/Makefile.in
r4826 r5100 224 224 esac; \ 225 225 done; \ 226 echo ' cd $(top_srcdir) && $(AUTOMAKE) -- foreignsrc/lib/collision_detection/Makefile'; \226 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/collision_detection/Makefile'; \ 227 227 cd $(top_srcdir) && \ 228 $(AUTOMAKE) -- foreignsrc/lib/collision_detection/Makefile228 $(AUTOMAKE) --gnu src/lib/collision_detection/Makefile 229 229 .PRECIOUS: Makefile 230 230 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status -
trunk/src/lib/event/Makefile.in
r4826 r5100 212 212 esac; \ 213 213 done; \ 214 echo ' cd $(top_srcdir) && $(AUTOMAKE) -- foreignsrc/lib/event/Makefile'; \214 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/event/Makefile'; \ 215 215 cd $(top_srcdir) && \ 216 $(AUTOMAKE) -- foreignsrc/lib/event/Makefile216 $(AUTOMAKE) --gnu src/lib/event/Makefile 217 217 .PRECIOUS: Makefile 218 218 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status -
trunk/src/lib/graphics/Makefile.in
r4826 r5100 179 179 esac; \ 180 180 done; \ 181 echo ' cd $(top_srcdir) && $(AUTOMAKE) -- foreignsrc/lib/graphics/Makefile'; \181 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/graphics/Makefile'; \ 182 182 cd $(top_srcdir) && \ 183 $(AUTOMAKE) -- foreignsrc/lib/graphics/Makefile183 $(AUTOMAKE) --gnu src/lib/graphics/Makefile 184 184 .PRECIOUS: Makefile 185 185 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status -
trunk/src/lib/graphics/importer/Makefile.am
r4579 r5100 20 20 material.h \ 21 21 texture.h \ 22 array.h \23 22 anorms.h \ 24 23 anormtab.h -
trunk/src/lib/graphics/importer/Makefile.in
r4826 r5100 201 201 material.h \ 202 202 texture.h \ 203 array.h \204 203 anorms.h \ 205 204 anormtab.h … … 218 217 esac; \ 219 218 done; \ 220 echo ' cd $(top_srcdir) && $(AUTOMAKE) -- foreignsrc/lib/graphics/importer/Makefile'; \219 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/graphics/importer/Makefile'; \ 221 220 cd $(top_srcdir) && \ 222 $(AUTOMAKE) -- foreignsrc/lib/graphics/importer/Makefile221 $(AUTOMAKE) --gnu src/lib/graphics/importer/Makefile 223 222 .PRECIOUS: Makefile 224 223 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status -
trunk/src/lib/graphics/spatial_separation/Makefile.in
r4826 r5100 205 205 esac; \ 206 206 done; \ 207 echo ' cd $(top_srcdir) && $(AUTOMAKE) -- foreignsrc/lib/graphics/spatial_separation/Makefile'; \207 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/graphics/spatial_separation/Makefile'; \ 208 208 cd $(top_srcdir) && \ 209 $(AUTOMAKE) -- foreignsrc/lib/graphics/spatial_separation/Makefile209 $(AUTOMAKE) --gnu src/lib/graphics/spatial_separation/Makefile 210 210 .PRECIOUS: Makefile 211 211 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status -
trunk/src/lib/gui/Makefile.in
r4826 r5100 241 241 esac; \ 242 242 done; \ 243 echo ' cd $(top_srcdir) && $(AUTOMAKE) -- foreignsrc/lib/gui/Makefile'; \243 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/gui/Makefile'; \ 244 244 cd $(top_srcdir) && \ 245 $(AUTOMAKE) -- foreignsrc/lib/gui/Makefile245 $(AUTOMAKE) --gnu src/lib/gui/Makefile 246 246 .PRECIOUS: Makefile 247 247 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status -
trunk/src/lib/particles/Makefile.in
r4826 r5100 209 209 esac; \ 210 210 done; \ 211 echo ' cd $(top_srcdir) && $(AUTOMAKE) -- foreignsrc/lib/particles/Makefile'; \211 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/particles/Makefile'; \ 212 212 cd $(top_srcdir) && \ 213 $(AUTOMAKE) -- foreignsrc/lib/particles/Makefile213 $(AUTOMAKE) --gnu src/lib/particles/Makefile 214 214 .PRECIOUS: Makefile 215 215 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status -
trunk/src/lib/physics/Makefile.in
r4826 r5100 218 218 esac; \ 219 219 done; \ 220 echo ' cd $(top_srcdir) && $(AUTOMAKE) -- foreignsrc/lib/physics/Makefile'; \220 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/physics/Makefile'; \ 221 221 cd $(top_srcdir) && \ 222 $(AUTOMAKE) -- foreignsrc/lib/physics/Makefile222 $(AUTOMAKE) --gnu src/lib/physics/Makefile 223 223 .PRECIOUS: Makefile 224 224 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status -
trunk/src/lib/sound/Makefile.in
r4826 r5100 201 201 esac; \ 202 202 done; \ 203 echo ' cd $(top_srcdir) && $(AUTOMAKE) -- foreignsrc/lib/sound/Makefile'; \203 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/sound/Makefile'; \ 204 204 cd $(top_srcdir) && \ 205 $(AUTOMAKE) -- foreignsrc/lib/sound/Makefile205 $(AUTOMAKE) --gnu src/lib/sound/Makefile 206 206 .PRECIOUS: Makefile 207 207 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status -
trunk/src/lib/tinyxml/Makefile.in
r4826 r5100 204 204 esac; \ 205 205 done; \ 206 echo ' cd $(top_srcdir) && $(AUTOMAKE) -- foreignsrc/lib/tinyxml/Makefile'; \206 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/tinyxml/Makefile'; \ 207 207 cd $(top_srcdir) && \ 208 $(AUTOMAKE) -- foreignsrc/lib/tinyxml/Makefile208 $(AUTOMAKE) --gnu src/lib/tinyxml/Makefile 209 209 .PRECIOUS: Makefile 210 210 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status -
trunk/src/lib/util/array.h
r5097 r5100 16 16 /*! 17 17 \file array.h 18 \brief Contains the Array Class that handles float arrays.18 \brief Contains the Array Class that handles arrays of classes. 19 19 this class creates a Array of a semi-Dynamic length. 20 20 beware, that after finalizing the array may not be resized again. … … 25 25 #include "debug.h" 26 26 27 //! Array Class that handles dynamic- floatarrays.27 //! Array Class that handles dynamic-type arrays. 28 28 template<class T> class Array 29 29 { … … 38 38 /** @returns The array */ 39 39 inline const T* getArray () const { return this->array; }; 40 inline const T getEntry(unsigned int number) const; 40 41 /** * @returns The Count of entries in the Array*/ 41 42 inline unsigned int getCount()const { return this->entryCount; }; … … 66 67 Array<T>::Array () 67 68 { 68 PRINTF( 4)("crating new Array\n");69 PRINTF(5)("crating new Array\n"); 69 70 this->firstEntry = new Entry; 70 71 this->firstEntry->next =NULL; … … 72 73 this->finalized = false; 73 74 this->entryCount = 0; //0 means one entry 75 } 76 77 template<class T> 78 const T Array<T>::getEntry(unsigned int number) const 79 { 80 if (this->finalized && number < this->entryCount) 81 return this->array[number]; 74 82 } 75 83 … … 81 89 Array<T>::~Array() 82 90 { 83 PRINTF( 4)("deleting array\n");91 PRINTF(5)("deleting array\n"); 84 92 Entry* walker = this->firstEntry; 85 93 Entry* previous; … … 91 99 } 92 100 if (finalized) 93 delete []this->array;101 delete[] this->array; 94 102 } 95 103 … … 101 109 void Array<T>::finalizeArray () 102 110 { 103 PRINTF(4)("Finalizing array. Length: %i\n", entryCount); 104 // if ((array = (GLfloat*)malloc( entryCount* sizeof(GLfloat))) == NULL) 105 if (!(this->array = new GLfloat [this->entryCount])) 106 PRINTF(0)("could not allocate %i data Blocks\n", this->entryCount); 111 PRINTF(5)("Finalizing array. Length: %i\n", entryCount); 112 if (!(this->array = new T [this->entryCount])) 113 PRINTF(1)("could not allocate %i data Blocks\n", this->entryCount); 107 114 Entry* walker = this->firstEntry; 108 115 for (int i=0; i<this->entryCount; i++) -
trunk/src/subprojects/Makefile.in
r4909 r5100 186 186 esac; \ 187 187 done; \ 188 echo ' cd $(top_srcdir) && $(AUTOMAKE) -- foreignsrc/subprojects/Makefile'; \188 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/subprojects/Makefile'; \ 189 189 cd $(top_srcdir) && \ 190 $(AUTOMAKE) -- foreignsrc/subprojects/Makefile190 $(AUTOMAKE) --gnu src/subprojects/Makefile 191 191 .PRECIOUS: Makefile 192 192 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status -
trunk/src/subprojects/collision_detection/Makefile.in
r5030 r5100 281 281 esac; \ 282 282 done; \ 283 echo ' cd $(top_srcdir) && $(AUTOMAKE) -- foreignsrc/subprojects/collision_detection/Makefile'; \283 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/subprojects/collision_detection/Makefile'; \ 284 284 cd $(top_srcdir) && \ 285 $(AUTOMAKE) -- foreignsrc/subprojects/collision_detection/Makefile285 $(AUTOMAKE) --gnu src/subprojects/collision_detection/Makefile 286 286 .PRECIOUS: Makefile 287 287 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status -
trunk/src/subprojects/importer/Makefile.in
r5031 r5100 250 250 esac; \ 251 251 done; \ 252 echo ' cd $(top_srcdir) && $(AUTOMAKE) -- foreignsrc/subprojects/importer/Makefile'; \252 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/subprojects/importer/Makefile'; \ 253 253 cd $(top_srcdir) && \ 254 $(AUTOMAKE) -- foreignsrc/subprojects/importer/Makefile254 $(AUTOMAKE) --gnu src/subprojects/importer/Makefile 255 255 .PRECIOUS: Makefile 256 256 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status -
trunk/src/subprojects/particles/Makefile.in
r5031 r5100 267 267 esac; \ 268 268 done; \ 269 echo ' cd $(top_srcdir) && $(AUTOMAKE) -- foreignsrc/subprojects/particles/Makefile'; \269 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/subprojects/particles/Makefile'; \ 270 270 cd $(top_srcdir) && \ 271 $(AUTOMAKE) -- foreignsrc/subprojects/particles/Makefile271 $(AUTOMAKE) --gnu src/subprojects/particles/Makefile 272 272 .PRECIOUS: Makefile 273 273 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status -
trunk/src/subprojects/testmain/Makefile.in
r4826 r5100 196 196 esac; \ 197 197 done; \ 198 echo ' cd $(top_srcdir) && $(AUTOMAKE) -- foreignsrc/subprojects/testmain/Makefile'; \198 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/subprojects/testmain/Makefile'; \ 199 199 cd $(top_srcdir) && \ 200 $(AUTOMAKE) -- foreignsrc/subprojects/testmain/Makefile200 $(AUTOMAKE) --gnu src/subprojects/testmain/Makefile 201 201 .PRECIOUS: Makefile 202 202 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status -
trunk/src/util/loading/load_param.cc
r5099 r5100 17 17 18 18 #include "list.h" 19 #include "array.h" 19 20 #include "base_object.h" 20 21 … … 354 355 /** 355 356 * prints out all loadable Classes, and their parameters 357 * @param fileName prints the output to a File 358 * @todo implement it 356 359 */ 357 360 void LoadClassDescription::printAll(const char* fileName) … … 380 383 } 381 384 382 385 /** 386 * searches for classes, which beginn with classNameBegin 387 * @param classNameBegin the beginning string of a Class 388 * @return a NEW char-array with ClassNames. The ARRAY should be deleted afterwards, 389 * !! The strings MUST NOT be deleted !! 390 */ 391 Array<char*>* LoadClassDescription::searchClassWithShort(const char* classNameBegin) 392 { 393 unsigned int searchLength = strlen(classNameBegin); 394 Array<char*>* retVal = new Array<char*>; 395 396 tIterator<LoadClassDescription>* iterator = LoadClassDescription::classList->getIterator(); 397 LoadClassDescription* enumClassDesc = iterator->nextElement(); 398 while (enumClassDesc) 399 { 400 if (strlen(enumClassDesc->className)>searchLength+1 && 401 !strncasecmp(enumClassDesc->className, classNameBegin, searchLength)) 402 { 403 retVal->addEntry(enumClassDesc->className); 404 } 405 enumClassDesc = iterator->nextElement(); 406 } 407 delete iterator; 408 409 retVal->finalizeArray(); 410 return retVal; 411 } 412 413 // const LoadParamDescription* LoadParamDescription::getClass(const char* className) 414 // { 415 // tIterator<LoadClassDescription>* iterator = LoadClassDescription::classList->getIterator(); 416 // LoadClassDescription* enumClassDesc = iterator->nextElement(); 417 // while (enumClassDesc) 418 // { 419 // if (!strcmp(enumClassDesc->className, classNameBegin, className)) 420 // { 421 // delete iterator; 422 // return enumClassDesc; 423 // } 424 // enumClassDesc = iterator->nextElement(); 425 // } 426 // delete iterator; 427 // 428 // return NULL; 429 // } 383 430 384 431 /** -
trunk/src/util/loading/load_param.h
r5099 r5100 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 … … 310 311 LoadParamDescription* addParam(const char* paramName); 311 312 312 313 313 static void printAll(const char* fileName = NULL); 314 static Array<char*>* searchClassWithShort(const char* classNameBegin); 315 // static const LoadParamDescription* getClass(const char* className); 314 316 315 317 private: -
trunk/src/util/shell.cc
r5099 r5100 20 20 #include "text_engine.h" 21 21 #include "list.h" 22 #include "array.h" 22 23 #include "graphics_engine.h" 23 24 #include "event_handler.h" 24 25 26 #include "load_param.h" 25 27 #include "debug.h" 26 28 #include <stdarg.h> … … 439 441 * autocompletes the Shell's inputLine 440 442 * @returns true, if a result was found, false otherwise 443 * 444 * @todo implement it!! 441 445 */ 442 446 bool Shell::autoComplete() 443 447 { 444 PRINTF(3)("AutoCompletion not implemented yet\n"); 448 //PRINTF(3)("AutoCompletion not implemented yet\n"); 449 450 char* completionLine = new char[strlen(inputLine)+1]; 451 strcpy(completionLine, this->inputLine); 452 453 char* commandBegin = strrchr(completionLine, ' '); 454 if (commandBegin == NULL) 455 commandBegin = completionLine; 456 else 457 { 458 if(commandBegin >= completionLine + strlen(completionLine)) 459 commandBegin = completionLine + strlen(completionLine); 460 else 461 commandBegin++; 462 } 463 464 printf("%s\n",commandBegin); 465 Array<char*>* classArray = LoadClassDescription::searchClassWithShort(commandBegin); 466 if (classArray->getCount() == 0) 467 { 468 delete[] completionLine; 469 delete classArray; 470 //PRINTF(0)("no completion found for %s\n", commandBegin); 471 return false; 472 } 473 474 for (unsigned int i = 0; i < classArray->getCount(); i++) 475 { 476 PRINTF(0)("%s\n", classArray->getEntry(i)); 477 } 478 if (classArray->getCount() == 1) 479 { 480 this->removeCharacters(strlen(commandBegin)); 481 this->addCharacters(classArray->getEntry(0)); 482 this->addCharacter(' '); 483 } 484 485 delete[] completionLine; 486 delete classArray; 445 487 } 446 488
Note: See TracChangeset
for help on using the changeset viewer.