SeqAn3 3.4.0-rc.3
The Modern C++ library for sequence analysis.
Loading...
Searching...
No Matches
seqan3::input_range_printer< rng_t > Struct Template Reference

A printer for arbitrary input ranges. More...

#include <seqan3/core/debug_stream/range.hpp>

Public Member Functions

template<typename stream_t , typename arg_t >
constexpr void operator() (stream_t &stream, arg_t &&arg) const
 Prints the elements of a sequence to an output stream.
 

Detailed Description

template<typename rng_t>
requires std::ranges::input_range<rng_t> && nonrecursive_range<rng_t>
struct seqan3::input_range_printer< rng_t >

A printer for arbitrary input ranges.

All input ranges can be printed to the seqan3::debug_stream element-wise (if their elements are printable). If the element type models seqan3::alphabet (and is not an unsigned integer), the range is printed just as if it were a string, i.e. std::vector<dna4>{'C'_dna4, 'G'_dna4, 'A'_dna4} is printed as "CGA".

In all other cases the elements are comma separated and the range is enclosed in brackets, i.e. std::vector<int>{3, 1, 33, 7} is printed as "[3,1,33,7]".

This printer excludes recursive ranges, such as entities from the std::filesystem library.

Template Parameters
rng_tType of the range to be printed; must model std::ranges::input_range and be non-recursive.

Member Function Documentation

◆ operator()()

template<typename rng_t >
constexpr void seqan3::input_range_printer< rng_t >::operator() ( stream_t stream,
arg_t &&  arg 
) const
inlineconstexpr

Prints the elements of a sequence to an output stream.

Template Parameters
stream_tThe type of the stream.
arg_tThe type of the argument.
Parameters
[in,out]streamThe output stream to print to.
[in]argThe range to be printed.

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