Changeset 1683 for code/branches/core3
- Timestamp:
- Aug 30, 2008, 1:16:14 AM (16 years ago)
- Location:
- code/branches/core3/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core3/src/core/Factory.cc
r1676 r1683 98 98 } 99 99 (*getFactoryPointer()->identifierStringMap_.begin()).second->stopCreatingHierarchy(); 100 /*101 for (it = Identifier::getIdentifierMapIntern().begin(); it != Identifier::getIdentifierMapIntern().end(); ++it)102 (*it).second->createSuperFunctionCaller();103 */104 100 COUT(3) << "*** Factory: Finished class-hierarchy creation" << std::endl; 105 101 } -
code/branches/core3/src/core/Identifier.h
r1682 r1683 315 315 316 316 void updateConfigValues(bool updateChildren = true) const; 317 /* 318 XMLPortParamContainer* getXMLPortParamContainer(const std::string& paramname); 319 void addXMLPortParamContainer(const std::string& paramname, XMLPortParamContainer* container); 320 321 XMLPortObjectContainer* getXMLPortObjectContainer(const std::string& sectionname); 322 void addXMLPortObjectContainer(const std::string& sectionname, XMLPortObjectContainer* container); 323 */ 317 324 318 private: 325 319 ClassIdentifier(const ClassIdentifier<T>& identifier) {} // don't copy … … 333 327 #define SUPER_INTRUSIVE_DESTRUCTOR 334 328 #include "Super.h" 335 /* 336 for (std::map<std::string, XMLPortParamContainer*>::iterator it = this->xmlportParamContainers_.begin(); it != this->xmlportParamContainers_.end(); ++it) 337 delete (it->second); 338 for (std::map<std::string, XMLPortObjectContainer*>::iterator it = this->xmlportObjectContainers_.begin(); it != this->xmlportObjectContainers_.end(); ++it) 339 delete (it->second); 340 */ 341 } 342 /* 343 std::map<std::string, XMLPortClassParamContainer<class O>*> xmlportParamContainers_; //!< All loadable parameters 344 std::map<std::string, XMLPortClassObjectContainer<T, class O>*> xmlportObjectContainers_; //!< All attachable objects 345 */ 329 } 330 346 331 static ClassIdentifier<T> *classIdentifier_s; 347 332 }; … … 463 448 (*it)->updateConfigValues(false); 464 449 } 465 466 /**467 @brief Returns a XMLPortParamContainer that loads a parameter of this class.468 @param paramname The name of the parameter469 @return The container470 *//*471 template <class T>472 XMLPortParamContainer* ClassIdentifier<T>::getXMLPortParamContainer(const std::string& paramname)473 {474 typename std::map<std::string, XMLPortClassParamContainer<class O>*>::const_iterator it = xmlportParamContainers_.find(paramname);475 if (it != xmlportParamContainers_.end())476 return (XMLPortParamContainer*)((*it).second);477 else478 return 0;479 }*/480 481 /**482 @brief Adds a new XMLPortParamContainer that loads a parameter of this class.483 @param paramname The name of the parameter484 @param container The container485 *//*486 template <class T>487 void ClassIdentifier<T>::addXMLPortParamContainer(const std::string& paramname, XMLPortParamContainer* container)488 {489 this->xmlportParamContainers_[paramname] = (XMLPortClassParamContainer<class O>*)container;490 }*/491 492 /**493 @brief Returns a XMLPortObjectContainer that attaches an object to this class.494 @param sectionname The name of the section that contains the attachable objects495 @return The container496 *//*497 template <class T>498 XMLPortObjectContainer* ClassIdentifier<T>::getXMLPortObjectContainer(const std::string& sectionname)499 {500 typename std::map<std::string, XMLPortClassObjectContainer<T, class O>*>::const_iterator it = xmlportObjectContainers_.find(sectionname);501 if (it != xmlportObjectContainers_.end())502 return (XMLPortObjectContainer*)((*it).second);503 else504 return 0;505 }*/506 507 /**508 @brief Adds a new XMLPortObjectContainer that attaches an object to this class.509 @param sectionname The name of the section that contains the attachable objects510 @param container The container511 *//*512 template <class T>513 void ClassIdentifier<T>::addXMLPortObjectContainer(const std::string& sectionname, XMLPortObjectContainer* container)514 {515 this->xmlportObjectContainers_[sectionname] = (XMLPortClassObjectContainer<T, class O>*)container;516 }*/517 450 518 451 -
code/branches/core3/src/core/Super.h
r1682 r1683 107 107 } 108 108 109 110 109 //////////////////////////// 111 110 // Function-specific code // -
code/branches/core3/src/orxonox/objects/Projectile.h
r1682 r1683 97 97 ClassIdentifier<T>* identifier = ClassIdentifier<T>::getIdentifier(); 98 98 99 /*100 SuperFunctionCaller_testfunction* superFunctionCaller = 0;101 // Search for an existing caller within all direct children102 for (std::set<const Identifier*>::iterator it = identifier->getDirectChildrenIntern().begin(); it != identifier->getDirectChildrenIntern().end(); ++it)103 if (((ClassIdentifier<T>*)(*it))->superFunctionCaller_testfunction_)104 superFunctionCaller = ((ClassIdentifier<T>*)(*it))->superFunctionCaller_testfunction_;105 // Check if we've found an existing caller - if not, create a new one106 if (!superFunctionCaller)107 superFunctionCaller = new SuperFunctionClassCaller_testfunction<T>;108 */109 99 // Iterate through all children and assign the caller 110 100 for (std::set<const Identifier*>::iterator it = identifier->getDirectChildrenIntern().begin(); it != identifier->getDirectChildrenIntern().end(); ++it) … … 113 103 { 114 104 std::cout << "adding functionpointer to " << ((ClassIdentifier<T>*)(*it))->getName() << std::endl; 115 // ((ClassIdentifier<T>*)(*it))->superFunctionCaller_testfunction_ = superFunctionCaller;116 105 ((ClassIdentifier<T>*)(*it))->superFunctionCaller_testfunction_ = new SuperFunctionClassCaller_testfunction<T>; 117 106 }
Note: See TracChangeset
for help on using the changeset viewer.