Changeset 4950 in orxonox.OLD for orxonox/trunk/src/util
- Timestamp:
- Jul 24, 2005, 12:36:58 PM (19 years ago)
- Location:
- orxonox/trunk/src/util
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/util/fast_factory.cc
r4941 r4950 18 18 #include "compiler.h" 19 19 #include "debug.h" 20 #include "string.h" 20 21 21 22 using namespace std; … … 83 84 /** 84 85 * searches for a FastFactory 85 * @param factoryName the Name of the Factory to search for (not used)86 86 * @param classID the ClassID of the FastFactory to search for 87 87 * @returns true if found, false otherwise. 88 88 */ 89 FastFactory* FastFactory::searchFastFactory(ClassID classID , const char* fastFactoryName)89 FastFactory* FastFactory::searchFastFactory(ClassID classID) 90 90 { 91 91 if (FastFactory::first == NULL) … … 97 97 { 98 98 if (tmpFac->storedClassID == classID) 99 return tmpFac; 100 tmpFac = tmpFac->next; 101 } 102 } 103 return NULL; 104 } 105 106 /** 107 * searches for a FastFactory 108 * @param classID the ClassID of the FastFactory to search for 109 * @returns true if found, false otherwise. 110 */ 111 FastFactory* FastFactory::searchFastFactory(const char* fastFactoryName) 112 { 113 if (FastFactory::first == NULL) 114 return NULL; 115 else 116 { 117 FastFactory* tmpFac = FastFactory::first; 118 while (tmpFac != NULL) 119 { 120 if (strcmp(tmpFac->getName(), fastFactoryName)) 99 121 return tmpFac; 100 122 tmpFac = tmpFac->next; -
orxonox/trunk/src/util/fast_factory.h
r4947 r4950 66 66 inline static FastFactory* getFirst() { return FastFactory::first; }; 67 67 68 static FastFactory* searchFastFactory(ClassID classID, const char* fastFactoryName = NULL); 68 static FastFactory* searchFastFactory(ClassID classID); 69 static FastFactory* searchFastFactory(const char* fastFactoryName); 70 71 ClassID getStoredID() const { return this->storedClassID; }; 69 72 70 73 protected: … … 135 138 tFastFactory<T>* tmpFac = NULL; 136 139 if (FastFactory::getFirst() != NULL) 137 tmpFac = static_cast<tFastFactory<T>*>(FastFactory::getFirst()->searchFastFactory(classID , fastFactoryName));140 tmpFac = static_cast<tFastFactory<T>*>(FastFactory::getFirst()->searchFastFactory(classID)); 138 141 139 142 if (tmpFac != NULL)
Note: See TracChangeset
for help on using the changeset viewer.