void UniqueIdInterface::setUniqueId(const String & rhs) { clearUniqueId(); String::size_type last_underscore = rhs.rfind('_'); String s = rhs.substr(last_underscore + 1); for (String::const_iterator s_i = s.begin(); s_i < s.end(); ++s_i) { int i = (*s_i - '0'); if (i < 0 || i > 9) { clearUniqueId(); return; } unique_id_ = 10 * unique_id_ + i; } }
void FeatureMap::clear(bool clear_meta_data) { Base::clear(); if (clear_meta_data) { clearRanges(); this->DocumentIdentifier::operator=(DocumentIdentifier()); // no "clear" method clearUniqueId(); protein_identifications_.clear(); unassigned_peptide_identifications_.clear(); data_processing_.clear(); } }
void ConsensusMap::clear(bool clear_meta_data) { Base::clear(); if (clear_meta_data) { clearMetaInfo(); clearRanges(); // no "clear" method for DocumentIdentifier available this->DocumentIdentifier::operator=(DocumentIdentifier()); clearUniqueId(); file_description_.clear(); experiment_type_.clear(); protein_identifications_.clear(); unassigned_peptide_identifications_.clear(); data_processing_.clear(); } }