SeqAn3 3.4.0-rc.4
The Modern C++ library for sequence analysis.
Loading...
Searching...
No Matches
seqan3::trace_directions_printer< detail::trace_directions > Struct Reference

Prints trace_directions as ascii or as utf8 to output stream. More...

#include <seqan3/alignment/matrix/detail/trace_directions.hpp>

Public Member Functions

template<typename stream_t >
requires detail::is_type_specialisation_of_v<stream_t, debug_stream_type>
constexpr void operator() (stream_t &stream, detail::trace_directions const trace) const
 Prints the trace directions into the given stream.
 
template<typename stream_t >
constexpr void operator() (stream_t &stream, detail::trace_directions const trace) const
 Prints the trace directions into the given stream.
 

Private Member Functions

template<typename stream_t >
constexpr void print_impl (stream_t &stream, fmtflags2 const flag, detail::trace_directions const trace) const
 Prints the trace directions.
 

Static Private Attributes

static constexpr std::array< std::string_view, 32 > csv
 The ascii representation of the trace directions.
 
static constexpr std::array< std::string_view, 32 > unicode
 The unicode representation of the trace directions.
 

Detailed Description

Prints trace_directions as ascii or as utf8 to output stream.

The following table shows the printed symbol of a particular seqan3::detail::trace_directions:

trace direction utf8 ascii
seqan3::detail::trace_directions::none N
seqan3::detail::trace_directions::diagonal D
seqan3::detail::trace_directions::up_open U
seqan3::detail::trace_directions::up u
seqan3::detail::trace_directions::left_open L
seqan3::detail::trace_directions::left l

Member Function Documentation

◆ operator()() [1/2]

template<typename stream_t >
requires detail::is_type_specialisation_of_v<stream_t, debug_stream_type>
constexpr void seqan3::trace_directions_printer< detail::trace_directions >::operator() ( stream_t &  stream,
detail::trace_directions const  trace 
) const
inlineconstexpr

Prints the trace directions into the given stream.

This overload is only available if the stream has a member function flags2 that returns a fmtflags2. Using the flags2() member function allows to print the trace with unicode characters if seqan3::fmtflags2::utf8 is set to the seqan3::debug_stream.

Template Parameters
stream_tThe type of the stream.
Parameters
streamThe stream to print to.
traceThe trace directions to print.

◆ operator()() [2/2]

template<typename stream_t >
constexpr void seqan3::trace_directions_printer< detail::trace_directions >::operator() ( stream_t &  stream,
detail::trace_directions const  trace 
) const
inlineconstexpr

Prints the trace directions into the given stream.

This overload is only available if the stream has no member function flags2. In this case it will use ascii characters to print the trace.

Template Parameters
stream_tThe type of the stream.
Parameters
streamThe stream to print to.
traceThe trace directions to print.

◆ print_impl()

template<typename stream_t >
constexpr void seqan3::trace_directions_printer< detail::trace_directions >::print_impl ( stream_t &  stream,
fmtflags2 const  flag,
detail::trace_directions const  trace 
) const
inlineconstexprprivate

Prints the trace directions.

Template Parameters
stream_tThe type of the stream.
Parameters
streamThe stream to print to.
flagThe flags of the stream.
traceThe trace directions to print.

Member Data Documentation

◆ csv

Initial value:
{
"N", "D", "U", "DU", "u", "Du", "Uu", "DUu", "L", "DL", "UL", "DUL", "uL", "DuL", "UuL", "DUuL",
"l", "Dl", "Ul", "DUl", "ul", "Dul", "Uul", "DUul", "Ll", "DLl", "ULl", "DULl", "uLl", "DuLl", "UuLl", "DUuLl"}

The ascii representation of the trace directions.

◆ unicode

constexpr std::array<std::string_view, 32> seqan3::trace_directions_printer< detail::trace_directions >::unicode
staticconstexprprivate
Initial value:
{
"↺", "↖", "↑", "↖↑", "⇡", "↖⇡", "↑⇡", "↖↑⇡", "←", "↖←", "↑←", "↖↑←", "⇡←", "↖⇡←", "↑⇡←", "↖↑⇡←",
"⇠", "↖⇠", "↑⇠", "↖↑⇠", "⇡⇠", "↖⇡⇠", "↑⇡⇠", "↖↑⇡⇠", "←⇠", "↖←⇠", "↑←⇠", "↖↑←⇠", "⇡←⇠", "↖⇡←⇠", "↑⇡←⇠", "↖↑⇡←⇠"}

The unicode representation of the trace directions.


The documentation for this struct was generated from the following file:
Hide me