Changeset 5879 for code/branches/core5/src/libraries/core/Identifier.cc
- Timestamp:
- Oct 5, 2009, 5:02:25 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core5/src/libraries/core/Identifier.cc
r5821 r5879 87 87 delete (it->second); 88 88 for (std::map<std::string, XMLPortObjectContainer*>::iterator it = this->xmlportObjectContainers_.begin(); it != this->xmlportObjectContainers_.end(); ++it) 89 delete (it->second);90 for (std::map<std::string, XMLPortObjectContainer*>::iterator it = this->xmlportEventContainers_.begin(); it != this->xmlportEventContainers_.end(); ++it)91 89 delete (it->second); 92 90 } … … 565 563 566 564 /** 567 @brief Returns a XMLPortEventContainer that attaches an event to this class.568 @param sectionname The name of the section that contains the event569 @return The container570 */571 XMLPortObjectContainer* Identifier::getXMLPortEventContainer(const std::string& eventname)572 {573 std::map<std::string, XMLPortObjectContainer*>::const_iterator it = this->xmlportEventContainers_.find(eventname);574 if (it != this->xmlportEventContainers_.end())575 return it->second;576 else577 return 0;578 }579 580 /**581 @brief Adds a new XMLPortEventContainer that attaches an event to this class.582 @param sectionname The name of the section that contains the event583 @param container The container584 */585 void Identifier::addXMLPortEventContainer(const std::string& eventname, XMLPortObjectContainer* container)586 {587 std::map<std::string, XMLPortObjectContainer*>::const_iterator it = this->xmlportEventContainers_.find(eventname);588 if (it != this->xmlportEventContainers_.end())589 {590 COUT(2) << "Warning: Overwriting XMLPortEventContainer in class " << this->getName() << "." << std::endl;591 delete (it->second);592 }593 594 this->xmlportEventContainers_[eventname] = container;595 }596 597 /**598 565 @brief Lists the names of all Identifiers in a std::set<const Identifier*>. 599 566 @param out The outstream
Note: See TracChangeset
for help on using the changeset viewer.