]> git.donarmstrong.com Git - bamtools.git/blobdiff - src/api/SamSequenceDictionary.cpp
merge conflict
[bamtools.git] / src / api / SamSequenceDictionary.cpp
index 10d0437a1fdb3073d75ef23c0929c2e796c365a8..34cf3284dbbca650e3597de8eb41c2d3f853090c 100644 (file)
@@ -2,7 +2,7 @@
 // SamSequenceDictionary.cpp (c) 2010 Derek Barnett
 // Marth Lab, Department of Biology, Boston College
 // ---------------------------------------------------------------------------
-// Last modified: 18 April 2011 (DB)
+// Last modified: 1 October 2011 (DB)
 // ---------------------------------------------------------------------------
 // Provides methods for operating on a collection of SamSequence entries.
 // *************************************************************************
@@ -64,6 +64,13 @@ void SamSequenceDictionary::Add(const std::string& name, const int& length) {
     Add( SamSequence(name, length) );
 }
 
+void SamSequenceDictionary::Add(const SamSequenceDictionary& sequences) {
+    SamSequenceConstIterator seqIter = sequences.ConstBegin();
+    SamSequenceConstIterator seqEnd  = sequences.ConstEnd();
+    for ( ; seqIter != seqEnd; ++seqIter )
+        Add(*seqIter);
+}
+
 /*! \fn void SamSequenceDictionary::Add(const std::vector<SamSequence>& sequences)
     \brief Adds multiple sequences to the dictionary.