SeqAn3  3.0.3
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 #ifdef SEQAN3_DEPRECATED_310
69 
75 #endif // SEQAN3_DEPRECATED_310
76 
81  static const mask unmasked;
82 
87  static const mask masked;
89 };
90 
91 #ifdef SEQAN3_DEPRECATED_310
92 mask constexpr mask::UNMASKED{mask{}.assign_rank(0)};
93 mask constexpr mask::MASKED{mask{}.assign_rank(1)};
94 #endif // SEQAN3_DEPRECATED_310
95 mask constexpr mask::unmasked{mask{}.assign_rank(0)};
96 mask constexpr mask::masked{mask{}.assign_rank(1)};
97 } // namespace seqan3
Provides seqan3::alphabet_base.
A CRTP-base that makes defining a custom alphabet easier.
Definition: alphabet_base.hpp:81
constexpr derived_type & assign_rank(rank_type const c) noexcept
Assign from a numeric value.
Definition: alphabet_base.hpp:264
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:74
static const mask UNMASKED
Member for unmasked.
Definition: mask.hpp:68
static const mask masked
Member for masked.
Definition: mask.hpp:87
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:81
The main SeqAn3 namespace.
Definition: aligned_sequence_concept.hpp:29
#define SEQAN3_DEPRECATED_310
Deprecation message for SeqAn 3.1.0 release.
Definition: platform.hpp:203