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

The printer_order is a variadic template that defines the order of the printers. More...

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

+ Inheritance diagram for seqan3::printer_order< printer_templates_t >:

Protected Types

template<typename stream_t , typename arg_t , size_t i = find_index<stream_t, arg_t, printer_templates_t<arg_t>...>()>
using printer_for_t = std::tuple_element_t< i, std::tuple< printer_templates_t< arg_t >..., no_printer_found > >
 The type of the printer that can print the argument to the stream.
 

Static Protected Member Functions

template<typename stream_t , typename arg_t , typename... printers_t>
static constexpr size_t find_index ()
 Find the index of the first printer that can print the argument.
 

Detailed Description

template<template< typename > typename... printer_templates_t>
struct seqan3::printer_order< printer_templates_t >

The printer_order is a variadic template that defines the order of the printers.

The printer_order is a variadic template that defines the order of the printers. It is used to find the first valid printer among all given printers that can print the argument to the given stream. The printer_order is used by the seqan3::default_printer.

Template Parameters
printer_templates_tThe printer class templates that are used to print the arguments.

Member Typedef Documentation

◆ printer_for_t

template<template< typename > typename... printer_templates_t>
template<typename stream_t , typename arg_t , size_t i = find_index<stream_t, arg_t, printer_templates_t<arg_t>...>()>
using seqan3::printer_order< printer_templates_t >::printer_for_t = std::tuple_element_t<i, std::tuple<printer_templates_t<arg_t>..., no_printer_found> >
protected

The type of the printer that can print the argument to the stream.

In case no valid printer is found for the argument and stream type the seqan3::no_printer_found is used.

Template Parameters
stream_tThe type of the stream.
arg_tThe type of the argument.
iThe index of the printer that can print the argument (default initialised to the index of the printer in the list that can print the argument to the stream).

Member Function Documentation

◆ find_index()

template<template< typename > typename... printer_templates_t>
template<typename stream_t , typename arg_t , typename... printers_t>
static constexpr size_t seqan3::printer_order< printer_templates_t >::find_index ( )
inlinestaticconstexprprotected

Find the index of the first printer that can print the argument.

Template Parameters
stream_tThe type of the stream.
arg_tThe type of the argument.
printers_tThe printer class templates that are used to print the arguments.
Returns
The index of the printer that can print the argument or n, where n is equal to the number of printers, if no printer was found.

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