Loading...
Searching...
No Matches
seqan3::input_range_printer< rng_t > Struct Template Reference
Core » Debug Stream

A printer for arbitrary input ranges. More...

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

Inheritance diagram for seqan3::input_range_printer< rng_t >:
[legend]

## 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_t | Type of the range to be printed; must model std::ranges::input_range and be non-recursive.

## Member Function Documentation

## operator()()

template<typename rng_t>
template<typename stream_t, typename arg_t>

void seqan3::input_range_printer< rng_t >::operator() | ( | stream_t & | stream,
|  | arg_t && | arg ) const

inline constexpr

Prints the elements of a sequence to an output stream.

Template Parameters

  stream_t | The type of the stream.
  arg_t | The type of the argument.

Parameters

  [in,out] | stream | The output stream to print to.
  [in] | arg | The range to be printed.

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

- range.hpp

Hide me