Changeset 4933 in orxonox.OLD for orxonox/trunk/src/util/object_manager.cc
- Timestamp:
- Jul 22, 2005, 6:20:42 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/util/object_manager.cc
r4932 r4933 29 29 * constructor, sets everything to zero and define factoryName 30 30 */ 31 FastFactory::FastFactory ( const char* fastFactoryName, ClassID classID)31 FastFactory::FastFactory (ClassID classID, const char* fastFactoryName) 32 32 { 33 33 this->setClassID(CL_FAST_FACTORY, "FastFactory"); … … 36 36 this->storedClassID = classID; 37 37 this->next = NULL; 38 39 this->storedDeadObjects = 0; 38 40 39 41 FastFactory::registerFastFactory(this); … … 56 58 } 57 59 58 /** 59 * add a FastFactory to the FastFactory Queue 60 * @param factory a FastFactory to be registered 61 */ 62 void FastFactory::registerFastFactory( FastFactory* factory) 60 void FastFactory::registerFastFactory(FastFactory* fastFactory) 63 61 { 64 PRINTF( 3)("Registered FastFactory for '%s'\n", factory->getName());62 PRINTF(4)("Registered FastFactory for '%s'\n", fastFactory->getName()); 65 63 66 64 if( FastFactory::first == NULL) 67 FastFactory::first = fa ctory;65 FastFactory::first = fastFactory; 68 66 else 69 67 { 70 68 FastFactory* tmpFac = FastFactory::first; 71 69 while( tmpFac->next != NULL) 72 {73 70 tmpFac = tmpFac->next; 74 } 75 tmpFac->setNext(factory); 71 tmpFac->setNext(fastFactory); 76 72 } 77 73 } 78 74 79 75 76 /** 77 * searches for a FastFactory 78 * @param factoryName the Name of the Factory to search for (not used) 79 * @param classID the ClassID of the FastFactory to search for 80 * @returns true if found, false otherwise. 81 */ 82 FastFactory* FastFactory::searchFastFactory(ClassID classID, const char* fastFactoryName) 83 { 84 if (FastFactory::first == NULL) 85 return NULL; 86 else 87 { 88 FastFactory* tmpFac = FastFactory::first; 89 while (tmpFac != NULL) 90 { 91 if (tmpFac->storedClassID == classID) 92 return tmpFac; 93 tmpFac = tmpFac->next; 94 } 95 } 96 return NULL; 97 } 80 98 81 99
Note: See TracChangeset
for help on using the changeset viewer.