SeqAn3  3.0.1
The Modern C++ library for sequence analysis.
search_traits.hpp
Go to the documentation of this file.
1 // -----------------------------------------------------------------------------------------------------
2 // Copyright (c) 2006-2020, Knut Reinert & Freie Universität Berlin
3 // Copyright (c) 2016-2020, Knut Reinert & MPI für molekulare Genetik
4 // This file may be used, modified and/or redistributed under the terms of the 3-clause BSD-License
5 // shipped with this file and also available at: https://github.com/seqan/seqan3/blob/master/LICENSE.md
6 // -----------------------------------------------------------------------------------------------------
7 
13 #pragma once
14 
17 
18 namespace seqan3::detail
19 {
20 
27 template <typename search_configuration_t>
29  requires is_type_specialisation_of_v<remove_cvref_t<search_configuration_t>, configuration>
31 struct search_traits
32 {
34  static constexpr bool search_with_max_error = search_configuration_t::template exists<search_cfg::max_error>();
36  static constexpr bool search_with_max_error_rate =
37  search_configuration_t::template exists<search_cfg::max_error_rate>();
39  static constexpr bool has_error_configuration = search_with_max_error | search_with_max_error_rate;
40 
42  static constexpr bool search_all_hits =
43  search_configuration_t::template exists<search_cfg::mode<detail::search_mode_all>>();
45  static constexpr bool search_best_hits =
46  search_configuration_t::template exists<search_cfg::mode<detail::search_mode_best>>();
48  static constexpr bool search_all_best_hits =
49  search_configuration_t::template exists<search_cfg::mode<detail::search_mode_all_best>>();
51  static constexpr bool search_strata_hits =
52  search_configuration_t::template exists<search_cfg::mode<search_cfg::strata>>();
54  static constexpr bool has_mode_configuration = search_all_hits |
55  search_best_hits |
56  search_all_best_hits |
57  search_strata_hits;
58 
60  static constexpr bool search_return_index_cursor =
61  search_configuration_t::template exists<search_cfg::output<detail::search_output_index_cursor>>();
63  static constexpr bool search_return_text_position =
64  search_configuration_t::template exists<search_cfg::output<detail::search_output_text_position>>();
66  static constexpr bool has_output_configuration = search_return_index_cursor | search_return_text_position;
67 };
68 
69 } // namespace seqan3::detail
basic.hpp
Provides various type traits on generic types.
all.hpp
Meta-header for the search configuration module .