SeqAn3 3.2.0
The Modern C++ library for sequence analysis.
gap.hpp
Go to the documentation of this file.
1// -----------------------------------------------------------------------------------------------------
2// Copyright (c) 2006-2022, Knut Reinert & Freie Universität Berlin
3// Copyright (c) 2016-2022, 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
20namespace seqan3
21{
22
38class gap : public alphabet_base<gap, 1, char>
39{
40private:
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
59public:
63 constexpr gap() noexcept : base_t{}
64 {}
65 constexpr gap(gap const &) = default;
66 constexpr gap(gap &&) = default;
67 constexpr gap & operator=(gap const &) = default;
68 constexpr gap & operator=(gap &&) = default;
69 ~gap() = default;
70
71 using base_t::base_t;
73};
74
75} // namespace seqan3
Provides seqan3::alphabet_base.
A CRTP-base that makes defining a custom alphabet easier.
Definition: alphabet_base.hpp:57
The alphabet of a gap character '-'.
Definition: gap.hpp:39
constexpr gap() noexcept
Defaulted.
Definition: gap.hpp:63
constexpr gap & operator=(gap &&)=default
Defaulted.
constexpr gap(gap const &)=default
Defaulted.
constexpr gap & operator=(gap const &)=default
Defaulted.
~gap()=default
Defaulted.
constexpr gap(gap &&)=default
Defaulted.
The main SeqAn3 namespace.
Definition: aligned_sequence_concept.hpp:29