Gamgee
You miserable little maggot. I'll stove your head in!
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
sam_tag.h
Go to the documentation of this file.
1 #ifndef gamgee__sam_tag__guard
2 #define gamgee__sam_tag__guard
3 
4 #include <string>
5 
6 namespace gamgee {
7 
11 template<class TAG_TYPE>
12 class SamTag {
13  public:
14  explicit SamTag(const std::string& name, const TAG_TYPE& value, const bool missing = false) :
15  m_name { name },
16  m_value { value },
17  m_missing { missing }
18  {}
19 
20  explicit SamTag(const std::string& name, TAG_TYPE&& value, const bool missing = false) :
21  m_name { name },
22  m_value { std::move(value) },
23  m_missing { missing }
24  {}
25 
26  SamTag(const SamTag& other) = default;
27  SamTag(SamTag&& other) = default;
28  SamTag& operator=(const SamTag& other) = default;
29  SamTag& operator=(SamTag&& other) = default;
30  ~SamTag() = default;
31 
32  std::string name() const { return m_name; }
33  TAG_TYPE value() const { return m_value; }
34  bool missing() const { return m_missing; }
35 
36  private:
37  std::string m_name;
38  TAG_TYPE m_value;
39  bool m_missing;
40 };
41 
42 }
43 
44 #endif // gamgee__sam_tag__guard
bool missing() const
Definition: sam_tag.h:34
TAG_TYPE value() const
Definition: sam_tag.h:33
~SamTag()=default
SamTag & operator=(const SamTag &other)=default
Definition: exceptions.h:9
class to represent a Sam TAG:TYPE:VALUE entry
Definition: sam_tag.h:12
std::string name() const
Definition: sam_tag.h:32
SamTag(const std::string &name, TAG_TYPE &&value, const bool missing=false)
Definition: sam_tag.h:20
SamTag(const std::string &name, const TAG_TYPE &value, const bool missing=false)
Definition: sam_tag.h:14