Changeset 4937 in orxonox.OLD for orxonox/trunk/src
- Timestamp:
- Jul 22, 2005, 7:37:05 PM (19 years ago)
- Location:
- orxonox/trunk/src/util
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/util/object_manager.cc
r4936 r4937 36 36 this->storedClassID = classID; 37 37 this->next = NULL; 38 39 this->deadList = NULL; 40 this->unusedContainers = NULL; 38 41 39 42 this->storedDeadObjects = 0; … … 139 142 140 143 144 void FastFactory::prepare(unsigned int count) 145 { 146 /* if (this->storedDeadObjects + this->storedLivingObjects >= count) 147 { 148 PRINTF(3)("not creating new Objects for class %s, because the requested count already exists\n", this->getClassName()); 149 }*/ 150 for (int i = this->storedDeadObjects; i < count; i++) 151 { 152 this->fabricate(); 153 } 154 } 155 156 141 157 BaseObject* FastFactory::resurect(ClassID classID) 142 158 { -
orxonox/trunk/src/util/object_manager.h
r4936 r4937 57 57 58 58 virtual void fabricate() = NULL; 59 void prepare(unsigned int count); 59 60 // retrival functions for fast Ineraction 60 61 //FastFactory* getFastFactory(ClassID classID); … … 103 104 static tFastFactory<T>* getFastFactory(ClassID classID, const char* fastFactoryName = NULL); 104 105 105 void prepare(unsigned int count);106 107 106 T* resurect(); 108 107 private: … … 123 122 : FastFactory(classID, fastFactoryName) 124 123 { 125 PRINTF(5)("Class: %s loadable as a FastFactory\n", this->getName());126 127 this->deadList = NULL;128 this->unusedContainers = NULL;129 124 } 130 125 … … 152 147 153 148 this->deadList = tmpFirstDead; 154 }155 156 template<class T>157 void tFastFactory<T>::prepare(unsigned int count)158 {159 /* if (this->storedDeadObjects + this->storedLivingObjects >= count)160 {161 PRINTF(3)("not creating new Objects for class %s, because the requested count already exists\n", this->getClassName());162 }*/163 for (int i = this->storedDeadObjects; i < count; i++)164 {165 this->fabricate();166 }167 149 } 168 150
Note: See TracChangeset
for help on using the changeset viewer.