SeqAn3  3.0.3
The Modern C++ library for sequence analysis.
gap.hpp
Go to the documentation of this file.
1 // -----------------------------------------------------------------------------------------------------
2 // Copyright (c) 2006-2021, Knut Reinert & Freie Universität Berlin
3 // Copyright (c) 2016-2021, Knut Reinert & MPI für molekulare Genetik
4 // This file may be used, modified and/or redistributed under the terms of the 3-clause BSD-License
5 // shipped with this file and also available at: https://github.com/seqan/seqan3/blob/master/LICENSE.md
6 // -----------------------------------------------------------------------------------------------------
7 
14 #pragma once
15 
16 #include <cassert>
17 
19 
20 namespace seqan3
21 {
22 
38 class gap : public alphabet_base<gap, 1, char>
39 {
40 private:
43 
45  friend base_t;
46 
48  static constexpr char_type rank_to_char(rank_type const)
49  {
50  return '-';
51  }
52 
54  static constexpr rank_type char_to_rank(char_type const)
55  {
56  return 0;
57  }
58 
59 public:
63  constexpr gap() noexcept : base_t{} {}
64  constexpr gap(gap const &) = default;
65  constexpr gap(gap &&) = default;
66  constexpr gap & operator=(gap const &) = default;
67  constexpr gap & operator=(gap &&) = default;
68  ~gap() = default;
69 
70  using base_t::base_t;
72 };
73 
74 }
Provides seqan3::alphabet_base.
A CRTP-base that makes defining a custom alphabet easier.
Definition: alphabet_base.hpp:81
The alphabet of a gap character '-'.
Definition: gap.hpp:39
constexpr gap & operator=(gap &&)=default
Defaulted.
constexpr gap() noexcept
Defaulted.
Definition: gap.hpp:63
constexpr gap & operator=(gap const &)=default
Defaulted.
constexpr gap(gap const &)=default
Defaulted.
~gap()=default
Defaulted.
constexpr gap(gap &&)=default
Defaulted.
The main SeqAn3 namespace.
Definition: aligned_sequence_concept.hpp:29