X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=src%2Fapi%2FSamReadGroupDictionary.cpp;h=af4e3413bc71adcff1b480f6834491bca40bb71b;hb=daf64972794dbbdae4bea6a0495578708c86363b;hp=69903ff8051f2f83da5c3a23d4e8725f2694939b;hpb=038f0e1dda24b2d6765cc8c878b7dbdc5f922ed6;p=bamtools.git diff --git a/src/api/SamReadGroupDictionary.cpp b/src/api/SamReadGroupDictionary.cpp index 69903ff..af4e341 100644 --- a/src/api/SamReadGroupDictionary.cpp +++ b/src/api/SamReadGroupDictionary.cpp @@ -3,7 +3,7 @@ // Marth Lab, Department of Biology, Boston College // All rights reserved. // --------------------------------------------------------------------------- -// Last modified: 18 April 2011 (DB) +// Last modified: 1 October 2011 (DB) // --------------------------------------------------------------------------- // Provides methods for operating on a collection of SamReadGroup entries. // *************************************************************************** @@ -65,6 +65,13 @@ void SamReadGroupDictionary::Add(const std::string& readGroupId) { Add( SamReadGroup(readGroupId) ); } +void SamReadGroupDictionary::Add(const SamReadGroupDictionary& readGroups) { + SamReadGroupConstIterator rgIter = readGroups.ConstBegin(); + SamReadGroupConstIterator rgEnd = readGroups.ConstEnd(); + for ( ; rgIter != rgEnd; ++rgIter ) + Add(*rgIter); +} + /*! \fn void SamReadGroupDictionary::Add(const std::vector& readGroups) \brief Adds multiple read groups to the dictionary.