//---------------------------------------------------------------------------- void mergeProperties(ctkProperties& destination, const ctkProperties& source) { for (ctkProperties::const_iterator iter = source.begin(); iter != source.end(); ++iter) { if (!destination.contains(iter.key())) { destination.insert(iter.key(), iter.value()); } } }
ctkDictionary::ctkDictionary(const ctkProperties& properties) { ctkProperties::ConstIterator end = properties.end(); for (ctkProperties::ConstIterator it = properties.begin(); it != end; ++it) { if (this->contains(it.key())) { QString msg("ctkProperties object contains case variants of the key: "); msg += it.key(); throw std::invalid_argument(qPrintable(msg)); } this->insert(it.key(), it.value()); } }