Collection of elements to configure an algorithm. More...
#include <seqan3/core/algorithm/configuration.hpp>
Public Member Functions | |
T | swap (T... args) |
Constructor, destructor and assignment | |
constexpr | configuration ()=default |
Defaulted. | |
constexpr | configuration (configuration const &)=default |
Defaulted. | |
constexpr | configuration (configuration &&)=default |
Defaulted. | |
constexpr configuration & | operator= (configuration const &)=default |
Defaulted. | |
constexpr configuration & | operator= (configuration &&)=default |
Defaulted. | |
~configuration ()=default | |
Defaulted. | |
template<typename derived_t , typename value_t > | |
constexpr | configuration (pipeable_config_element< derived_t, value_t > &&elem) |
Constructs a configuration from a single configuration element. More... | |
template<typename derived_t , typename value_t > | |
constexpr | configuration (pipeable_config_element< derived_t, value_t > const &elem) |
Constructs a configuration from a single configuration element. More... | |
Capacity | |
constexpr size_t | size () const noexcept |
Returns the number of contained config elements. | |
Friends | |
template<detail::config_element_specialisation ... _configs_t> | |
class | configuration |
Friend declaration for other instances of the configuration. | |
Pipe operator | |
template<typename lhs_derived_t , typename lhs_value_t , typename rhs_derived_t , typename rhs_value_t > | |
constexpr friend auto | operator| (pipeable_config_element< lhs_derived_t, lhs_value_t > &&lhs, pipeable_config_element< rhs_derived_t, rhs_value_t > &&rhs) |
Combines two seqan3::pipeable_config_element objects to a seqan3::configuration. More... | |
template<typename lhs_derived_t , typename lhs_value_t , typename rhs_derived_t , typename rhs_value_t > | |
constexpr friend auto | operator| (pipeable_config_element< lhs_derived_t, lhs_value_t > &&lhs, pipeable_config_element< rhs_derived_t, rhs_value_t > const &rhs) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename lhs_derived_t , typename lhs_value_t , typename rhs_derived_t , typename rhs_value_t > | |
constexpr friend auto | operator| (pipeable_config_element< lhs_derived_t, lhs_value_t > const &lhs, pipeable_config_element< rhs_derived_t, rhs_value_t > &&rhs) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename lhs_derived_t , typename lhs_value_t , typename rhs_derived_t , typename rhs_value_t > | |
constexpr friend auto | operator| (pipeable_config_element< lhs_derived_t, lhs_value_t > const &lhs, pipeable_config_element< rhs_derived_t, rhs_value_t > const &rhs) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename rhs_derived_t , typename rhs_value_t > | |
constexpr friend auto | operator| (configuration &&lhs, pipeable_config_element< rhs_derived_t, rhs_value_t > &&rhs) |
Combines a seqan3::configuration with a seqan3::pipeable_config_element. More... | |
template<typename rhs_derived_t , typename rhs_value_t > | |
constexpr friend auto | operator| (configuration const &lhs, pipeable_config_element< rhs_derived_t, rhs_value_t > &&rhs) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename rhs_derived_t , typename rhs_value_t > | |
constexpr friend auto | operator| (configuration &&lhs, pipeable_config_element< rhs_derived_t, rhs_value_t > const &rhs) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename rhs_derived_t , typename rhs_value_t > | |
constexpr friend auto | operator| (configuration const &lhs, pipeable_config_element< rhs_derived_t, rhs_value_t > const &rhs) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename lhs_derived_t , typename lhs_value_t > | |
constexpr friend auto | operator| (pipeable_config_element< lhs_derived_t, lhs_value_t > &&lhs, configuration &&rhs) |
Combines a seqan3::pipeable_config_element with a seqan3::configuration. More... | |
template<typename lhs_derived_t , typename lhs_value_t > | |
constexpr friend auto | operator| (pipeable_config_element< lhs_derived_t, lhs_value_t > &&lhs, configuration const &rhs) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename lhs_derived_t , typename lhs_value_t > | |
constexpr friend auto | operator| (pipeable_config_element< lhs_derived_t, lhs_value_t > const &lhs, configuration &&rhs) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename lhs_derived_t , typename lhs_value_t > | |
constexpr friend auto | operator| (pipeable_config_element< lhs_derived_t, lhs_value_t > const &lhs, configuration const &rhs) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename ... rhs_configs_t> | |
constexpr friend auto | operator| (configuration &&lhs, configuration< rhs_configs_t... > &&rhs) |
Combines two seqan3::configuration objects. More... | |
template<typename ... rhs_configs_t> | |
constexpr friend auto | operator| (configuration const &lhs, configuration< rhs_configs_t... > &&rhs) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename ... rhs_configs_t> | |
constexpr friend auto | operator| (configuration &&lhs, configuration< rhs_configs_t... > const &rhs) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename ... rhs_configs_t> | |
constexpr friend auto | operator| (configuration const &lhs, configuration< rhs_configs_t... > const &rhs) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
Related Functions | |
(Note that these are not member functions.) | |
Type deduction guides | |
template<typename derived_t , typename value_t > | |
configuration (pipeable_config_element< derived_t, value_t > &&) -> configuration< std::remove_cvref_t< derived_t >> | |
Deduces the correct configuration element type from the passed seqan3::pipeable_config_element. | |
template<typename derived_t , typename value_t > | |
configuration (pipeable_config_element< derived_t, value_t > const &) -> configuration< std::remove_cvref_t< derived_t >> | |
Deduces the correct configuration element type from the passed seqan3::pipeable_config_element. | |
Tuple interface | |
template<template< typename ... > class query_t, typename ... configs_t> | |
constexpr auto & | get (configuration< configs_t... > &config) noexcept |
Returns the stored element. More... | |
Observers | |
template<typename alternative_t > | |
constexpr decltype(auto) | get_or (alternative_t &&alternative) &noexcept |
Returns the stored configuration element if present otherwise the given alternative. More... | |
template<typename alternative_t > | |
constexpr decltype(auto) | get_or (alternative_t &&alternative) const &noexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename alternative_t > | |
constexpr decltype(auto) | get_or (alternative_t &&alternative) &&noexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename alternative_t > | |
constexpr decltype(auto) | get_or (alternative_t &&alternative) const &&noexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename query_t > | |
static constexpr bool | exists () noexcept |
Checks if the given type exists in the tuple. | |
template<template< typename ... > typename query_t> | |
static constexpr bool | exists () noexcept |
Checks if the given type exists in the tuple. | |
Modifiers | |
Note that modifications return new configurations and do not modify | |
template<typename query_t > | |
constexpr auto | remove () const |
Remove a config element from the configuration. More... | |
template<template< typename ... > typename query_t> | |
constexpr auto | remove () const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
Collection of elements to configure an algorithm.
configs_t | Template parameter pack containing all configuration elements; Must model seqan3::detail::config_element_specialisation |
This class provides a unified interface to create and query such configurations for a specific algorithm. It extends the standard tuple interface with some useful functions to modify and query the user configurations.
|
inlineconstexpr |
Constructs a configuration from a single configuration element.
elem | The element to store. |
|
inlineconstexpr |
Constructs a configuration from a single configuration element.
elem | The element to store. |
|
inlineconstexprnoexcept |
Returns the stored configuration element if present otherwise the given alternative.
alternative_t | The type of the configuration element that is queried. |
[in] | alternative | The alternative whose type is used to check for an existing configuration element. |
Uses the type alternative_t
of the given alternative to check if such an configuration element was already stored inside of the configuration. If no suitable candidate can be found the passed value alternative
will be returned. If alternative_t
is a class template, then any specialisation of this alternative type will be searched and returned if present.
alternative_t
or the alternative if not present.no-throw guarantee.
Constant time.
|
inlineconstexpr |
Remove a config element from the configuration.
query_t | The config element type to remove from the configuration. |
query_t
.
|
friend |
Combines two seqan3::configuration objects.
rhs_configs_t | A template parameter pack for the second seqan3::configuration operand. |
[in] | lhs | The left hand operand. |
[in] | rhs | The right hand operand. |
lhs
and rhs
.
|
friend |
Combines a seqan3::configuration with a seqan3::pipeable_config_element.
rhs_derived_t | The derived type of the right hand side operand. |
rhs_value_t | The value type of the right hand side operand. |
[in] | lhs | The left hand operand. |
[in] | rhs | The right hand operand. |
rhs
to the passed lhs
object.
|
friend |
Combines a seqan3::pipeable_config_element with a seqan3::configuration.
lhs_derived_t | The derived type of the left hand side operand. |
lhs_value_t | The value type of the left hand side operand. |
[in] | lhs | The left hand operand. |
[in] | rhs | The right hand operand. |
lhs
to the passed rhs
object.
|
friend |
Combines two seqan3::pipeable_config_element objects to a seqan3::configuration.
lhs_derived_t | The derived type of the left hand side operand. |
lhs_value_t | The value type of the left hand side operand. |
rhs_derived_t | The derived type of the right hand side operand. |
rhs_value_t | The value type of the right hand side operand. |
[in] | lhs | The left hand operand. |
[in] | rhs | The right hand operand. |
lhs
and rhs
.