read_info.h
Go to the documentation of this file.
1 
8 #pragma once
9 
10 #include <algorithm>
13 
14 namespace illumina { namespace interop { namespace model { namespace run
15 {
16 
20  class read_info : public cycle_range
21  {
22  public:
24  typedef size_t number_t;
25  public:
33  read_info(const number_t number = 0,
34  const cycle_t first_cycle = 0,
35  const cycle_t last_cycle = 0,
36  const bool is_index = false,
37  const bool is_reverse_complement = false) : cycle_range(first_cycle, last_cycle), m_number(number),
38  m_is_index(is_index),
39  m_is_reverse_complement(is_reverse_complement)
40  {
41  }
42 
43  public:
56  number_t number() const
57  {
58  return m_number;
59  }
60 
65  bool is_index() const
66  {
67  return m_is_index;
68  }
69 
74  bool is_reverse_complement() const
75  {
76  return m_is_reverse_complement;
77  }
83  {
84  return (m_last_cycle >= m_first_cycle) ? m_last_cycle - m_first_cycle + 1 : 0;
85  }
86 
94  {
96  }
99  private:
100  size_t m_number;
101  bool m_is_index;
102  bool m_is_reverse_complement;
103 
104  friend class info;
105 
106  template<class MetricType, int Version>
107  friend
108  struct io::generic_layout;
109  };
110 
111 }}}}
112 
bool is_index() const
Definition: read_info.h:65
Definition: enum_description.h:15
cycle_t total_cycles() const
Definition: read_info.h:82
Definition: cycle_range.h:20
size_t cycle_t
Definition: cycle_range.h:24
bool is_reverse_complement() const
Definition: read_info.h:74
Definition: generic_layout.h:24
number_t number() const
Definition: read_info.h:56
read_info(const number_t number=0, const cycle_t first_cycle=0, const cycle_t last_cycle=0, const bool is_index=false, const bool is_reverse_complement=false)
Definition: read_info.h:33
cycle_t last_cycle() const
Definition: cycle_range.h:60
size_t number_t
Definition: read_info.h:24
cycle_t m_first_cycle
Definition: cycle_range.h:133
cycle_t m_last_cycle
Definition: cycle_range.h:135
cycle_t first_cycle() const
Definition: cycle_range.h:50
cycle_t useable_cycles() const
Definition: read_info.h:93