Changeset 1596 for code/branches/core3/src/core/Identifier.h
- Timestamp:
- Jun 12, 2008, 10:53:51 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core3/src/core/Identifier.h
r1592 r1596 61 61 62 62 #include "MetaObjectList.h" 63 #include " ObjectListBase.h"63 #include "Iterator.h" 64 64 #include "util/Debug.h" 65 65 #include "util/String.h" … … 112 112 void setName(const std::string& name); 113 113 114 v oid updateConfigValues() const;114 virtual void updateConfigValues(bool updateChildren = true) const = 0; 115 115 116 116 /** @brief Returns the parents of the class the Identifier belongs to. @return The list of all parents */ … … 301 301 static bool isFirstCall(); 302 302 void addObject(T* object); 303 304 void updateConfigValues(bool updateChildren = true) const; 303 305 304 306 XMLPortParamContainer* getXMLPortParamContainer(const std::string& paramname); … … 417 419 COUT(5) << "*** ClassIdentifier: Added object to " << this->getName() << "-list." << std::endl; 418 420 object->getMetaList().add(this->objects_, this->objects_->add(new ObjectListElement<T>(object))); 421 } 422 423 /** 424 @brief Updates the config-values of all existing objects of this class by calling their setConfigValues() function. 425 */ 426 template <class T> 427 void ClassIdentifier<T>::updateConfigValues(bool updateChildren) const 428 { 429 if (!this->hasConfigValues()) 430 return; 431 432 for (ObjectListIterator<T> it = ObjectList<T>::begin(); it; ++it) 433 it->setConfigValues(); 434 435 if (updateChildren) 436 for (std::set<const Identifier*>::const_iterator it = this->getChildrenBegin(); it != this->getChildrenEnd(); ++it) 437 (*it)->updateConfigValues(false); 419 438 } 420 439
Note: See TracChangeset
for help on using the changeset viewer.