Changeset 4930 in orxonox.OLD for orxonox/trunk/src/util/object_manager.cc
- Timestamp:
- Jul 22, 2005, 2:11:21 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/util/object_manager.cc
r4836 r4930 19 19 #include "list.h" 20 20 21 #include "debug.h" 21 22 22 23 using namespace std; … … 106 107 PRINT(0)("=======================================================\n"); 107 108 } 109 110 /** 111 * constructor 112 113 set everything to zero and define factoryName 114 */ 115 FastObject::FastObject (const char* fastObjectName, ClassID classID) 116 { 117 this->setClassID(CL_FACTORY, "FastObject"); 118 this->setName(fastObjectName); 119 120 this->storedClassID = classID; 121 this->next = NULL; 122 123 FastObject::registerFastObject(this); 124 } 125 126 /** a reference to the First FastObject */ 127 FastObject* FastObject::first = NULL; 128 129 /** 130 * destructor 131 132 clear the Q 133 */ 134 FastObject::~FastObject () 135 { 136 // printf("%s\n", this->factoryName); 137 // FastObject* tmpDel = this->next; 138 // this->next = NULL; 139 if (this->next) 140 delete this->next; 141 } 142 143 /** 144 * add a FastObject to the FastObject Queue 145 * @param factory a FastObject to be registered 146 */ 147 void FastObject::registerFastObject( FastObject* factory) 148 { 149 PRINTF(4)("Registered FastObject for '%s'\n", factory->getName()); 150 151 if( FastObject::first == NULL) 152 FastObject::first = factory; 153 else 154 { 155 FastObject* tmpFac = FastObject::first; 156 while( tmpFac->next != NULL) 157 { 158 tmpFac = tmpFac->next; 159 } 160 tmpFac->setNext(factory); 161 } 162 }
Note: See TracChangeset
for help on using the changeset viewer.