SeqAn3 3.4.0-rc.1
The Modern C++ library for sequence analysis.
Loading...
Searching...
No Matches
debug_stream_alphabet.hpp
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2006-2024 Knut Reinert & Freie Universität Berlin
2// SPDX-FileCopyrightText: 2016-2024 Knut Reinert & MPI für molekulare Genetik
3// SPDX-License-Identifier: BSD-3-Clause
4
10#pragma once
11
15
16namespace seqan3
17{
18
26template <alphabet alphabet_t>
27struct alphabet_printer<alphabet_t>
28{
34 template <typename stream_t>
35 constexpr void operator()(stream_t & stream, alphabet_t const letter) const noexcept
36 {
37 stream << to_char(letter);
38 }
39};
40
41// forward declare seqan3::mask
42class mask;
43
51template <std::same_as<mask> mask_t>
52struct mask_printer<mask_t>
53{
59 template <typename stream_t>
60 constexpr void operator()(stream_t & stream, mask_t const arg) const noexcept
61 {
62 // seqan3::mask is incomplete at this point, so we cannot use `arg == mask{}`
63 stream << (arg == mask_t{} ? "UNMASKED" : "MASKED");
64 }
65};
66
67} // namespace seqan3
Core alphabet concept and free function/type trait wrappers.
Provides seqan3::debug_stream and related types.
constexpr auto to_char
Return the char representation of an alphabet object.
Definition alphabet/concept.hpp:381
Stream concepts.
The main SeqAn3 namespace.
Definition aligned_sequence_concept.hpp:26
constexpr void operator()(stream_t &stream, alphabet_t const letter) const noexcept
Print the alphabet to the stream.
Definition debug_stream_alphabet.hpp:35
Definition default_printer.hpp:31
constexpr void operator()(stream_t &stream, mask_t const arg) const noexcept
Print the mask alphabet to the stream.
Definition debug_stream_alphabet.hpp:60
Definition default_printer.hpp:39
Hide me