Changeset 1787
- Timestamp:
- Sep 15, 2008, 11:19:54 AM (16 years ago)
- Location:
- code/trunk/src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/core/CoreIncludes.h
r1755 r1787 97 97 @param ClassName The name of the class 98 98 */ 99 #define Class(ClassName) \99 #define GetClassIdentifier(ClassName) \ 100 100 ClassIdentifier<ClassName>::getIdentifier() 101 101 -
code/trunk/src/core/XMLPort.cc
r1505 r1787 40 40 bool XMLPortObjectContainer::identifierIsIncludedInLoaderMask(const Identifier* identifier) 41 41 { 42 return ((!this->bApplyLoaderMask_) || identifier->isA( Class(Namespace)) || Loader::currentMask_s.isIncluded(identifier));42 return ((!this->bApplyLoaderMask_) || identifier->isA(GetClassIdentifier(Namespace)) || Loader::currentMask_s.isIncluded(identifier)); 43 43 } 44 44 } -
code/trunk/src/core/XMLPort.h
r1755 r1787 301 301 if (identifier) 302 302 { 303 if (identifier->isA( Class(O)))303 if (identifier->isA(GetClassIdentifier(O))) 304 304 { 305 305 if (this->identifierIsIncludedInLoaderMask(identifier)) … … 333 333 else 334 334 { 335 COUT(2) << ((BaseObject*)object)->getLoaderIndentation() << "Warning: '" << child->Value() << "' is not a '" << Class(O)->getName() << "'." << std::endl;335 COUT(2) << ((BaseObject*)object)->getLoaderIndentation() << "Warning: '" << child->Value() << "' is not a '" << GetClassIdentifier(O)->getName() << "'." << std::endl; 336 336 } 337 337 } … … 346 346 { 347 347 COUT(1) << std::endl; 348 COUT(1) << "An error occurred in XMLPort.h while loading a '" << Class(O)->getName() << "' in '" << this->sectionname_ << "' of '" << this->identifier_->getName() << "' (objectname: " << ((BaseObject*)object)->getName() << ") in " << object->getLevelfile() << ":" << std::endl;348 COUT(1) << "An error occurred in XMLPort.h while loading a '" << GetClassIdentifier(O)->getName() << "' in '" << this->sectionname_ << "' of '" << this->identifier_->getName() << "' (objectname: " << ((BaseObject*)object)->getName() << ") in " << object->getLevelfile() << ":" << std::endl; 349 349 COUT(1) << ex.what() << std::endl; 350 350 } -
code/trunk/src/orxonox/objects/Model.cc
r1769 r1787 85 85 COUT(4) << "Loader (Model.cc): Created model" << std::endl; 86 86 } 87 if(this->isExactlyA( Class(Model)))87 if(this->isExactlyA(GetClassIdentifier(Model))) 88 88 setObjectFrequency(300); //sync all 10 seconds (this only applies to asteroids and other isExactlyA(Model) 89 89 return true; -
code/trunk/src/orxonox/objects/Projectile.cc
r1747 r1787 101 101 { 102 102 // hit 103 if (it->isA( Class(SpaceShipAI)))103 if (it->isA(GetClassIdentifier(SpaceShipAI))) 104 104 ((SpaceShipAI*)(*it))->damage(this->damage_); 105 105 ParticleSpawner* explosion = new ParticleSpawner(this->explosionTemplateName_, LODParticle::low, 2.0); -
code/trunk/src/orxonox/objects/SpaceShip.cc
r1783 r1787 77 77 ObjectList<SpaceShip>::iterator it; 78 78 for(it = ObjectList<SpaceShip>::begin(); it; ++it){ 79 assert(it->isA( Class(SpaceShip)));79 assert(it->isA(GetClassIdentifier(SpaceShip))); 80 80 if( (it)->myShip_ || (network::Host::running() && network::Host::getShipID()==(it)->objectID) ){ 81 81 // COUT(1) << "^^^^^^^^^^ myShip_:" << *it << " classname: " << (*it)->getIdentifier()->getName() << " objectid: " << (*it)->objectID << std::endl; … … 273 273 // END CREATING ADDITIONAL EFFECTS 274 274 275 if (this->isExactlyA( Class(SpaceShip)))275 if (this->isExactlyA(GetClassIdentifier(SpaceShip))) 276 276 { 277 277 // START of testing crosshair … … 376 376 COUT(4) << "requesting focus for camera" << std::endl; 377 377 //CameraHandler::getInstance()->requestFocus(cam_); 378 if(this->isExactlyA( Class(SpaceShip))){378 if(this->isExactlyA(GetClassIdentifier(SpaceShip))){ 379 379 getFocus(); 380 380 COUT(4) << "getting focus for obj id: " << objectID << std::endl; … … 421 421 myShip_=true; //TODO: this is a hack 422 422 SpaceShip::create(); 423 /*if (this->isExactlyA( Class(SpaceShip)))423 /*if (this->isExactlyA(GetClassIdentifier(SpaceShip))) 424 424 getFocus();*/ 425 425 }
Note: See TracChangeset
for help on using the changeset viewer.