Class used to update the search configuration, e.g. add defaults.
More...
#include <seqan3/search/detail/search_configurator.hpp>
|
template<typename configuration_t > |
static auto | add_default_hit_configuration (configuration_t const &cfg) |
| Add seqan3::search_cfg::hit_all to the configuration if no search strategy (hit configuration) was chosen.
|
|
template<typename configuration_t > |
static auto | add_default_output_configuration (configuration_t const &cfg) |
| Add seqan3::search_cfg::text_position to the configuration if seqan3::search_cfg::output was not set.
|
|
template<typename configuration_t > |
static auto | add_defaults (configuration_t const &cfg) |
| Adds default configurations if they were not set by the user.
|
|
template<typename query_t , typename configuration_t , typename index_t > |
static auto | configure_algorithm (configuration_t const &cfg, index_t const &index) |
| Chooses the appropriate search algorithm depending on the index.
|
|
template<typename algorithm_t , typename configuration_t , typename index_t > |
static algorithm_t | configure_hit_strategy (configuration_t const &, index_t const &) |
| Configures the algorithm with the correct hit strategy.
|
|
template<typename algorithm_t , typename configuration_t , typename index_t > |
static algorithm_t | select_and_return_algorithm (configuration_t const &config, index_t const &index) |
| Select and return the configured search algorithm.
|
|
Class used to update the search configuration, e.g. add defaults.
◆ add_default_hit_configuration()
template<typename configuration_t >
static auto seqan3::detail::search_configurator::add_default_hit_configuration |
( |
configuration_t const & |
cfg | ) |
|
|
inlinestatic |
Add seqan3::search_cfg::hit_all to the configuration if no search strategy (hit configuration) was chosen.
- Template Parameters
-
configuration_t | The type of the search configuration. |
- Parameters
-
[in] | cfg | The configuration to be modified if necessary. |
- Returns
- The configuration which is guaranteed to have a hit configuration element available.
If no hit configuration was set, it defaults to seqan3::search_cfg::hit_all.
◆ add_default_output_configuration()
template<typename configuration_t >
static auto seqan3::detail::search_configurator::add_default_output_configuration |
( |
configuration_t const & |
cfg | ) |
|
|
inlinestatic |
Add seqan3::search_cfg::text_position to the configuration if seqan3::search_cfg::output was not set.
- Template Parameters
-
configuration_t | The type of the search configuration. |
- Parameters
-
[in] | cfg | The configuration to be modified if necessary. |
- Returns
- The configuration which is guaranteed to have a seqan3::search_cfg::output available.
If seqan3::search_cfg::output was not set, it defaults to seqan3::search_cfg::text_position.
◆ add_defaults()
template<typename configuration_t >
static auto seqan3::detail::search_configurator::add_defaults |
( |
configuration_t const & |
cfg | ) |
|
|
inlinestatic |
Adds default configurations if they were not set by the user.
- Template Parameters
-
configuration_t | The type of the search configuration. |
- Parameters
-
[in] | cfg | The configuration to be modified. |
- Returns
- The modified configuration.
Modifies the configuration object by adding default configuration elements.
- See also
- seqan3::details::search_configurator::add_default_hit_configuration
-
seqan3::details::search_configurator::add_default_output_configuration
◆ configure_algorithm()
template<typename query_t , typename configuration_t , typename index_t >
static auto seqan3::detail::search_configurator::configure_algorithm |
( |
configuration_t const & |
cfg, |
|
|
index_t const & |
index |
|
) |
| |
|
inlinestatic |
◆ configure_hit_strategy()
template<typename algorithm_t , typename configuration_t , typename index_t >
algorithm_t seqan3::detail::search_configurator::configure_hit_strategy |
( |
configuration_t const & |
cfg, |
|
|
index_t const & |
index |
|
) |
| |
|
static |
Configures the algorithm with the correct hit strategy.
- Template Parameters
-
algorithm_t | The type erased algorithm used for the fixed return type. |
configuration_t | The type of the search configuration. |
index_t | The type of the index. |
- Returns
- The configured search algorithm.
If the algorithm was configured with the dynamic hit configuration element seqan3::search_cfg::hit, the configuration element is removed and replaced by the selected static hit configuration element. If the hit configuration element is already a static one nothing is changed in the configuration. After selecting the correct hit strategy the corresponding search algorithm is created with the new configuration and the given index.
- Exceptions
-
If no hit configuration was configured a static assert is emitted during compilation.
◆ select_and_return_algorithm()
template<typename algorithm_t , typename configuration_t , typename index_t >
static algorithm_t seqan3::detail::search_configurator::select_and_return_algorithm |
( |
configuration_t const & |
config, |
|
|
index_t const & |
index |
|
) |
| |
|
inlinestatic |
Select and return the configured search algorithm.
- Template Parameters
-
algorithm_t | The type erased algorithm used for the fixed return type. |
configuration_t | The type of the search configuration. |
index_t | The type of the index. |
- Parameters
-
[in] | config | The search configuration object that is passed to the algorithm. |
[in] | index | The index that is passed to the algorithm. |
The final step of the configuration pipeline. Here the final algorithm is created and returned as the type erased std::function object. This step must be called at the end.
The documentation for this class was generated from the following file: