SeqAn3  3.2.0-rc.1
The Modern C++ library for sequence analysis.
mask.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 
13 #pragma once
14 
15 #include <cassert>
16 
18 
19 namespace seqan3
20 {
37 class mask : public alphabet_base<mask, 2, void>
38 {
39 private:
42 
44  friend base_t;
45 
46 public:
50  constexpr mask() = default;
51  constexpr mask(mask const &) = default;
52  constexpr mask(mask &&) = default;
53  constexpr mask & operator=(mask const &) = default;
54  constexpr mask & operator=(mask &&) = default;
55  ~mask() = default;
56 
58 
64 
68  static const mask unmasked;
69 
74  static const mask masked;
76 };
77 
78 constexpr mask mask::unmasked{mask{}.assign_rank(0)};
79 constexpr mask mask::masked{mask{}.assign_rank(1)};
80 } // 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:187
Implementation of a masked alphabet to be used for tuple composites.
Definition: mask.hpp:38
static const mask masked
Member for masked.
Definition: mask.hpp:74
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:68
The main SeqAn3 namespace.
Definition: aligned_sequence_concept.hpp:29