Changeset 4939 in orxonox.OLD for orxonox/trunk/src/util
- Timestamp:
- Jul 23, 2005, 12:15:03 AM (19 years ago)
- Location:
- orxonox/trunk/src/util
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/util/object_manager.cc
r4938 r4939 211 211 * kills Object object, meaning, that it will be stored in the deadList of the FastFactory, and waiting for resurrection 212 212 * @param object the Object to kill. 213 * 214 * synony that would be really grate would be abolish, but this is more like exterminate than pause-mode. 213 215 */ 214 216 void FastFactory::kill(BaseObject* object) … … 231 233 232 234 233 void FastFactory::kill(BaseObject* object, ClassID classID) 234 { 235 236 235 void FastFactory::kill(BaseObject* object, bool searchForFastFactory) 236 { 237 if (likely(searchForFastFactory == true)) 238 { 239 FastFactory* tmpFac = FastFactory::first; 240 while (tmpFac != NULL) 241 { 242 if (object->isA(tmpFac->storedClassID)) 243 { 244 tmpFac->kill(object); 245 return; 246 } 247 tmpFac = tmpFac->next; 248 } 249 250 } 237 251 } 238 252 -
orxonox/trunk/src/util/object_manager.h
r4938 r4939 60 60 static BaseObject* resurrect(ClassID classID); 61 61 void kill(BaseObject* object); 62 static void kill(BaseObject* object, ClassID classID);62 static void kill(BaseObject* object, bool searchForFastFactory); 63 63 64 64 void prepare(unsigned int count); … … 80 80 FastFactory* getNext() const { return this->next; }; 81 81 82 // virtual BaseObject* fabricate(ClassID classID) = NULL; 82 /** generates a new Object of the Class T */ 83 83 virtual void fabricate() = NULL; 84 84 static FastFactory* searchFastFactory(ClassID classID, const char* fastFactoryName = NULL); … … 119 119 * @param fastFactoryName the name of the FastFactory 120 120 * @param fastFactory the ID of the class 121 * @todo (can this be written in another form??) 121 122 */ 122 123 template<class T> … … 126 127 } 127 128 129 /** 130 * creates (if not existent) a Factory of Class T, and assigns some values to it 131 * @param classID the ClassID to assign to this class 132 * @param fastFactoryName the name to assign 133 * @returns The FastFactory if existent a new Factory if not. 134 */ 128 135 template<class T> 129 136 tFastFactory<T>* tFastFactory<T>::getFastFactory(ClassID classID, const char* fastFactoryName) … … 140 147 141 148 149 /** 150 * fabricates an Object of Class T, that corresponds to classID. 151 */ 142 152 template<class T> 143 153 void tFastFactory<T>::fabricate()
Note: See TracChangeset
for help on using the changeset viewer.