]> git.donarmstrong.com Git - bamtools.git/blobdiff - src/api/SamReadGroupDictionary.h
Changed platform check to use standard cmake variable (issue #66)
[bamtools.git] / src / api / SamReadGroupDictionary.h
index 75df1991efd0657007b42f86172095b518851729..a4aeda95154d1f3c99372bf4a145ed15f3013892 100644 (file)
@@ -1,9 +1,8 @@
 // ***************************************************************************
 // SamReadGroupDictionary.h (c) 2010 Derek Barnett
 // Marth Lab, Department of Biology, Boston College
-// All rights reserved.
 // ---------------------------------------------------------------------------
-// Last modified: 4 March 2011 (DB)
+// Last modified: 16 October 2011 (DB)
 // ---------------------------------------------------------------------------
 // Provides methods for operating on a collection of SamReadGroup entries.
 // ***************************************************************************
@@ -11,8 +10,9 @@
 #ifndef SAM_READGROUP_DICTIONARY_H
 #define SAM_READGROUP_DICTIONARY_H
 
-#include <api/api_global.h>
-#include <api/SamReadGroup.h>
+#include "api/api_global.h"
+#include "api/SamReadGroup.h"
+#include <map>
 #include <string>
 #include <vector>
 
@@ -37,6 +37,7 @@ class API_EXPORT SamReadGroupDictionary {
         void Add(const std::string& readGroupId);
 
         // adds multiple read groups
+        void Add(const SamReadGroupDictionary& readGroups);
         void Add(const std::vector<SamReadGroup>& readGroups);
         void Add(const std::vector<std::string>& readGroupIds);
 
@@ -73,15 +74,12 @@ class API_EXPORT SamReadGroupDictionary {
         SamReadGroupConstIterator End(void) const;          // returns const_iterator to end()
         SamReadGroupConstIterator ConstEnd(void) const;     // returns const_iterator to end()
 
-    // internal methods
-    private:
-        int IndexOf(const SamReadGroup& readGroup) const;
-
     // data members
     private:
         SamReadGroupContainer m_data;
+        std::map<std::string, size_t> m_lookupData;
 };
 
 } // namespace BamTools
 
-#endif // SAM_READGROUP_DICTIONARY 
+#endif // SAM_READGROUP_DICTIONARY_H