Changeset 677 for code/branches/FICN/src/orxonox/core
- Timestamp:
- Dec 23, 2007, 7:19:07 PM (17 years ago)
- Location:
- code/branches/FICN/src/orxonox/core
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/FICN/src/orxonox/core/ClassFactory.h
r673 r677 67 67 bool ClassFactory<T>::create(const std::string& name) 68 68 { 69 COUT(4) << "*** Create entry for " << name << " in Factory. \n";69 COUT(4) << "*** Create entry for " << name << " in Factory." << std::endl; 70 70 ClassIdentifier<T>::getIdentifier()->addFactory(new ClassFactory<T>); 71 71 Factory::add(name, ClassIdentifier<T>::getIdentifier()); -
code/branches/FICN/src/orxonox/core/ConfigValueContainer.cc
r670 r677 57 57 if (!string2Number(this->value_.value_int_, valueString, defvalue)) // Try to convert the string to a value 58 58 this->setConfigFileEntyToDefault(); // The conversion failed 59 60 std::cout << "CVC: int: " << this->value_.value_int_ << std::endl;61 59 } 62 60 … … 80 78 if (!string2Number(this->value_.value_uint_, valueString, defvalue)) // Try to convert the string to a value 81 79 this->setConfigFileEntyToDefault(); // The conversion failed 82 83 std::cout << "CVC: uint: " << this->value_.value_uint_ << std::endl;84 80 } 85 81 -
code/branches/FICN/src/orxonox/core/CoreIncludes.h
r676 r677 95 95 */ 96 96 #define RegisterObject(ClassName) \ 97 COUT(4) << "*** Register Object: " << #ClassName << "\n"; \97 COUT(4) << "*** Register Object: " << #ClassName << std::endl; \ 98 98 InternRegisterObject(ClassName, false) 99 99 … … 103 103 */ 104 104 #define RegisterRootObject(ClassName) \ 105 COUT(4) << "*** Register Root-Object: " << #ClassName << "\n"; \105 COUT(4) << "*** Register Root-Object: " << #ClassName << std::endl; \ 106 106 InternRegisterRootObject(ClassName) 107 107 -
code/branches/FICN/src/orxonox/core/Factory.cc
r670 r677 84 84 void Factory::createClassHierarchy() 85 85 { 86 COUT(3) << "*** Factory -> Create class-hierarchy \n";86 COUT(3) << "*** Factory -> Create class-hierarchy" << std::endl; 87 87 std::map<std::string, Identifier*>::iterator it; 88 88 it = getFactoryPointer()->identifierStringMap_.begin(); … … 95 95 } 96 96 (*getFactoryPointer()->identifierStringMap_.begin()).second->stopCreatingHierarchy(); 97 COUT(3) << "*** Factory -> Finished class-hierarchy creation \n";97 COUT(3) << "*** Factory -> Finished class-hierarchy creation" << std::endl; 98 98 } 99 99 -
code/branches/FICN/src/orxonox/core/Identifier.cc
r670 r677 68 68 void Identifier::initialize(const IdentifierList* parents) 69 69 { 70 COUT(4) << "*** Initialize " << this->name_ << "-Singleton. \n";70 COUT(4) << "*** Initialize " << this->name_ << "-Singleton." << std::endl; 71 71 this->bCreatedOneObject_ = true; 72 72 … … 97 97 { 98 98 // Abstract classes don't have a factory and therefore can't create new objects 99 COUT(1) << "Error: Cannot create an object of type '" << this->name_ << "'. Class is abstract. \n";100 COUT(1) << "Aborting..." ;99 COUT(1) << "Error: Cannot create an object of type '" << this->name_ << "'. Class is abstract." << std::endl; 100 COUT(1) << "Aborting..." << std::endl; 101 101 abort(); 102 102 return NULL; -
code/branches/FICN/src/orxonox/core/Identifier.h
r673 r677 117 117 { 118 118 hierarchyCreatingCounter_s++; 119 COUT(4) << "*** Increased Hierarchy-Creating-Counter to " << hierarchyCreatingCounter_s << "\n";119 COUT(4) << "*** Increased Hierarchy-Creating-Counter to " << hierarchyCreatingCounter_s << std::endl; 120 120 } 121 121 … … 126 126 { 127 127 hierarchyCreatingCounter_s--; 128 COUT(4) << "*** Decreased Hierarchy-Creating-Counter to " << hierarchyCreatingCounter_s << "\n";128 COUT(4) << "*** Decreased Hierarchy-Creating-Counter to " << hierarchyCreatingCounter_s << std::endl; 129 129 } 130 130 … … 201 201 ClassIdentifier<T>* ClassIdentifier<T>::registerClass(const IdentifierList* parents, const std::string& name, bool bRootClass) 202 202 { 203 COUT(4) << "*** Register Class in " << name << "-Singleton. \n";203 COUT(4) << "*** Register Class in " << name << "-Singleton." << std::endl; 204 204 205 205 // It's a singleton, so maybe we have to create it first 206 206 if (!pointer_s) 207 207 { 208 COUT(4) << "*** Register Class in " << name << "-Singleton -> Create Singleton. \n";208 COUT(4) << "*** Register Class in " << name << "-Singleton -> Create Singleton." << std::endl; 209 209 pointer_s = new ClassIdentifier(); 210 210 } … … 214 214 { 215 215 // If no: We have to store the informations and initialize the Identifier 216 217 COUT(4) << "*** Register Class in " << name << "-Singleton -> Initialize Singleton.\n"; 216 COUT(4) << "*** Register Class in " << name << "-Singleton -> Initialize Singleton." << std::endl; 218 217 pointer_s->name_ = name; 219 // Factory::add(name, pointer_s); // Add the Identifier to the Factory220 221 218 if (bRootClass) 222 219 pointer_s->initialize(NULL); // If a class is derived from two interfaces, the second interface might think it's derived from the first because of the order of constructor-calls. Thats why we set parents to zero in that case. … … 236 233 if (!pointer_s) 237 234 { 238 COUT(4) << "*** Create Singleton. \n";235 COUT(4) << "*** Create Singleton." << std::endl; 239 236 pointer_s = new ClassIdentifier(); 240 237 } … … 250 247 void ClassIdentifier<T>::addObject(T* object) 251 248 { 252 COUT(4) << "*** Added object to " << ClassIdentifier<T>::getIdentifier()->getName() << "-list. \n";249 COUT(4) << "*** Added object to " << ClassIdentifier<T>::getIdentifier()->getName() << "-list." << std::endl; 253 250 object->getMetaList().add(ClassIdentifier<T>::getIdentifier()->objects_, ClassIdentifier<T>::getIdentifier()->objects_->add(object)); 254 251 } … … 285 282 if (!identifier->isA(ClassIdentifier<T>::getIdentifier())) 286 283 { 287 COUT(1) << "Error: Class " << identifier->getName() << " is not a " << ClassIdentifier<T>::getIdentifier()->getName() << "! \n";288 COUT(1) << "Error: SubclassIdentifier<" << ClassIdentifier<T>::getIdentifier()->getName() << "> = Class(" << identifier->getName() << ") is forbidden. \n";289 COUT(1) << "Aborting... \n";284 COUT(1) << "Error: Class " << identifier->getName() << " is not a " << ClassIdentifier<T>::getIdentifier()->getName() << "!" << std::endl; 285 COUT(1) << "Error: SubclassIdentifier<" << ClassIdentifier<T>::getIdentifier()->getName() << "> = Class(" << identifier->getName() << ") is forbidden." << std::endl; 286 COUT(1) << "Aborting..." << std::endl; 290 287 abort(); 291 288 } … … 331 328 if (this->identifier_) 332 329 { 333 COUT(1) << "Error: Class " << this->identifier_->getName() << " is not a " << ClassIdentifier<T>::getIdentifier()->getName() << "! \n";334 COUT(1) << "Error: Couldn't fabricate a new Object. \n";335 COUT(1) << "Aborting... \n";330 COUT(1) << "Error: Class " << this->identifier_->getName() << " is not a " << ClassIdentifier<T>::getIdentifier()->getName() << "!" << std::endl; 331 COUT(1) << "Error: Couldn't fabricate a new Object." << std::endl; 332 COUT(1) << "Aborting..." << std::endl; 336 333 } 337 334 else 338 335 { 339 COUT(1) << "Error: Couldn't fabricate a new Object - Identifier is undefined. \n";340 COUT(1) << "Aborting... \n";336 COUT(1) << "Error: Couldn't fabricate a new Object - Identifier is undefined." << std::endl; 337 COUT(1) << "Aborting..." << std::endl; 341 338 } 342 339 -
code/branches/FICN/src/orxonox/core/Iterator.h
r673 r677 151 151 // Comparing with anything except zero makes no sense 152 152 if (compare != 0) 153 COUT(2) << "Warning: Comparing the " << ClassIdentifier<T>::getIdentifier()->getName() << "-List-Iterator with " << compare << " has no effect. Only comparison with 0 works. \n";153 COUT(2) << "Warning: Comparing the " << ClassIdentifier<T>::getIdentifier()->getName() << "-List-Iterator with " << compare << " has no effect. Only comparison with 0 works." << std::endl; 154 154 155 155 return (this->element_ != 0); -
code/branches/FICN/src/orxonox/core/MetaObjectList.h
r673 r677 70 70 71 71 72 COUT(4) << "*** Removing Object from " << ClassIdentifier<T>::getIdentifier()->getName() << "-list. \n";72 COUT(4) << "*** Removing Object from " << ClassIdentifier<T>::getIdentifier()->getName() << "-list." << std::endl; 73 73 delete this->element_; 74 74 }
Note: See TracChangeset
for help on using the changeset viewer.