SeqAn3  3.1.0-rc.1
The Modern C++ library for sequence analysis.
mask.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 
13 #pragma once
14 
15 #include <cassert>
17 
18 namespace seqan3
19 {
36 class mask : public alphabet_base<mask, 2, void>
37 {
38 private:
41 
43  friend base_t;
44 
45 public:
49  constexpr mask() = default;
50  constexpr mask(mask const &) = default;
51  constexpr mask(mask &&) = default;
52  constexpr mask & operator=(mask const &) = default;
53  constexpr mask & operator=(mask &&) = default;
54  ~mask() = default;
55 
57 
63 
67  static const mask unmasked;
68 
73  static const mask masked;
75 };
76 
77 mask constexpr mask::unmasked{mask{}.assign_rank(0)};
78 mask constexpr mask::masked{mask{}.assign_rank(1)};
79 } // namespace seqan3
Provides seqan3::alphabet_base.
A CRTP-base that makes defining a custom alphabet easier.
Definition: alphabet_base.hpp:57
constexpr derived_type & assign_rank(rank_type const c) noexcept
Assign from a numeric value.
Definition: alphabet_base.hpp:191
Implementation of a masked alphabet to be used for tuple composites.
Definition: mask.hpp:37
static const mask masked
Member for masked.
Definition: mask.hpp:73
constexpr mask(mask &&)=default
Defaulted.
constexpr mask & operator=(mask &&)=default
Defaulted.
constexpr mask(mask const &)=default
Defaulted.
constexpr mask & operator=(mask const &)=default
Defaulted.
constexpr mask()=default
Defaulted.
~mask()=default
Defaulted.
static const mask unmasked
Member for unmasked.
Definition: mask.hpp:67
The main SeqAn3 namespace.
Definition: aligned_sequence_concept.hpp:29