1 // File Description 2 /// \file TagCollection.h 3 /// \brief Defines the TagCollection class. 4 // 5 // Author: Derek Barnett 6 7 #ifndef TAGCOLLECTION_H 8 #define TAGCOLLECTION_H 9 10 #include <map> 11 #include <string> 12 #include "pbbam/Config.h" 13 #include "pbbam/Tag.h" 14 15 namespace PacBio { 16 namespace BAM { 17 18 /// \brief The TagCollection class represents a collection (or "dictionary") of 19 /// tags. 20 /// 21 /// Tags are mapped to their tag name, a 2-character string. 22 /// 23 class PBBAM_EXPORT TagCollection : public std::map<std::string, Tag> 24 { 25 public: 26 /// \returns true if the collection contains a tag with \p name Contains(const std::string & name)27 inline bool Contains(const std::string& name) const { return count(name) != 0; } 28 }; 29 30 } // namespace BAM 31 } // namespace PacBio 32 33 #endif // TAGCOLLECTION_H 34