-/*! \fn int SamReadGroupDictionary::IndexOf(const std::string& readGroupId) const
- \internal
- \return index of read group if found. Otherwise, returns vector::size() (invalid index).
-*/
-int SamReadGroupDictionary::IndexOf(const std::string& readGroupId) const {
- SamReadGroupConstIterator begin = ConstBegin();
- SamReadGroupConstIterator iter = begin;
- SamReadGroupConstIterator end = ConstEnd();
- for ( ; iter != end; ++iter ) {
- const SamReadGroup& current = (*iter);
- if ( current.ID == readGroupId )
- break;
- }
- return distance( begin, iter );
-}
-