Loading...
Searching...
No Matches
debug_stream_alphabet.hpp
Go to the documentation of this file.
// SPDX-FileCopyrightText: 2006-2025 Knut Reinert & Freie Universität Berlin
// SPDX-FileCopyrightText: 2016-2025 Knut Reinert & MPI für molekulare Genetik
// SPDX-License-Identifier: BSD-3-Clause
#pragma once
#include <seqan3/alphabet/concept.hpp>
#include <seqan3/core/debug_stream/debug_stream_type.hpp>
#include <seqan3/io/stream/concept.hpp>
namespace seqan3
{
template <alphabet alphabet_t>
struct alphabet_printer<alphabet_t>
{
template <typename stream_t>
constexpr void operator()(stream_t & stream, alphabet_t const letter) const noexcept
{
stream << to_char(letter);
}
};
// forward declare seqan3::mask
class mask;
template <std::same_as<mask> mask_t>
struct mask_printer<mask_t>
{
template <typename stream_t>
constexpr void operator()(stream_t & stream, mask_t const arg) const noexcept
{
// seqan3::mask is incomplete at this point, so we cannot use `arg == mask{}`
stream << (arg == mask_t{} ? "UNMASKED" : "MASKED");
}
};
} // namespace seqan3
concept.hpp
Core alphabet concept and free function/type trait wrappers.
debug_stream_type.hpp
Provides seqan3::debug_stream and related types.
seqan3::to_char
constexpr auto to_char
Return the char representation of an alphabet object.
Definition alphabet/concept.hpp:381
concept.hpp
Stream concepts.
seqan3
The main SeqAn3 namespace.
Definition aligned_sequence_concept.hpp:26
seqan3::alphabet_printer< alphabet_t >::operator()
constexpr void operator()(stream_t &stream, alphabet_t const letter) const noexcept
Print the alphabet to the stream.
Definition debug_stream_alphabet.hpp:35
seqan3::alphabet_printer
Definition default_printer.hpp:31
seqan3::mask_printer< mask_t >::operator()
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
seqan3::mask_printer
Definition default_printer.hpp:39
Hide me