Loading...
Searching...
No Matches
hit.hpp
Go to the documentation of this file.
// SPDX-FileCopyrightText: 2006-2025 Knut Reinert & Freie Universität Berlin
// SPDX-FileCopyrightText: 2016-2025 Knut Reinert & MPI für molekulare Genetik
// SPDX-License-Identifier: BSD-3-Clause
#pragma once
#include <variant>
#include <seqan3/core/configuration/pipeable_config_element.hpp>
#include <seqan3/core/detail/empty_type.hpp>
#include <seqan3/search/configuration/detail.hpp>
#include <seqan3/utility/type_pack/traits.hpp>
namespace seqan3::search_cfg
{
class hit_all : private pipeable_config_element
{
public:
constexpr hit_all() = default;
constexpr hit_all(hit_all const &) = default;
constexpr hit_all(hit_all &&) = default;
constexpr hit_all & operator=(hit_all const &) = default;
constexpr hit_all & operator=(hit_all &&) = default;
~hit_all() = default;
static constexpr detail::search_config_id id{detail::search_config_id::hit};
};
class hit_all_best : private pipeable_config_element
{
public:
constexpr hit_all_best() = default;
constexpr hit_all_best(hit_all_best const &) = default;
constexpr hit_all_best(hit_all_best &&) = default;
constexpr hit_all_best & operator=(hit_all_best const &) = default;
constexpr hit_all_best & operator=(hit_all_best &&) = default;
~hit_all_best() = default;
static constexpr seqan3::detail::search_config_id id{seqan3::detail::search_config_id::hit};
};
class hit_single_best : private pipeable_config_element
{
public:
constexpr hit_single_best() = default;
constexpr hit_single_best(hit_single_best const &) = default;
constexpr hit_single_best(hit_single_best &&) = default;
constexpr hit_single_best & operator=(hit_single_best const &) = default;
constexpr hit_single_best & operator=(hit_single_best &&) = default;
~hit_single_best() = default;
static constexpr seqan3::detail::search_config_id id{seqan3::detail::search_config_id::hit};
};
class hit_strata : private pipeable_config_element
{
public:
uint8_t stratum{};
constexpr hit_strata() = default;
constexpr hit_strata(hit_strata const &) = default;
constexpr hit_strata(hit_strata &&) = default;
constexpr hit_strata & operator=(hit_strata const &) = default;
constexpr hit_strata & operator=(hit_strata &&) = default;
~hit_strata() = default;
hit_strata(uint32_t stratum) : stratum{static_cast<uint8_t>(stratum)}
{}
static constexpr detail::search_config_id id{detail::search_config_id::hit};
};
class hit : private pipeable_config_element
{
public:
using hit_variant_type = std::variant<detail::empty_type, hit_all, hit_all_best, hit_single_best, hit_strata>;
hit() = default;
hit(hit const &) = default;
hit(hit &&) = default;
hit & operator=(hit const &) = default;
hit & operator=(hit &&) = default;
~hit() = default;
template <typename hit_config_t>
requires pack_traits::contains<hit_config_t, hit_all, hit_all_best, hit_single_best, hit_strata>
explicit hit(hit_config_t hit_config) noexcept : hit_variant{std::move(hit_config)}
{}
template <typename hit_config_t>
requires pack_traits::contains<hit_config_t, hit_all, hit_all_best, hit_single_best, hit_strata>
hit & operator=(hit_config_t hit_config) noexcept
{
hit_variant = std::move(hit_config);
return *this;
}
hit_variant_type hit_variant{};
static constexpr detail::search_config_id id{detail::search_config_id::hit};
};
} // namespace seqan3::search_cfg
seqan3::search_cfg::hit_all_best::hit_all_best
constexpr hit_all_best(hit_all_best const &)=default
Defaulted.
seqan3::search_cfg::hit_all_best::hit_all_best
constexpr hit_all_best(hit_all_best &&)=default
Defaulted.
seqan3::search_cfg::hit_all_best::hit_all_best
constexpr hit_all_best()=default
Defaulted.
seqan3::search_cfg::hit_all_best::~hit_all_best
~hit_all_best()=default
Defaulted.
seqan3::search_cfg::hit_all_best::operator=
constexpr hit_all_best & operator=(hit_all_best const &)=default
Defaulted.
seqan3::search_cfg::hit_all_best::operator=
constexpr hit_all_best & operator=(hit_all_best &&)=default
Defaulted.
seqan3::search_cfg::hit_all::operator=
constexpr hit_all & operator=(hit_all const &)=default
Defaulted.
seqan3::search_cfg::hit_all::operator=
constexpr hit_all & operator=(hit_all &&)=default
Defaulted.
seqan3::search_cfg::hit_all::hit_all
constexpr hit_all()=default
Defaulted.
seqan3::search_cfg::hit_all::hit_all
constexpr hit_all(hit_all &&)=default
Defaulted.
seqan3::search_cfg::hit_all::hit_all
constexpr hit_all(hit_all const &)=default
Defaulted.
seqan3::search_cfg::hit_all::~hit_all
~hit_all()=default
Defaulted.
seqan3::search_cfg::hit_single_best::operator=
constexpr hit_single_best & operator=(hit_single_best const &)=default
Defaulted.
seqan3::search_cfg::hit_single_best::~hit_single_best
~hit_single_best()=default
Defaulted.
seqan3::search_cfg::hit_single_best::hit_single_best
constexpr hit_single_best()=default
Defaulted.
seqan3::search_cfg::hit_single_best::hit_single_best
constexpr hit_single_best(hit_single_best &&)=default
Defaulted.
seqan3::search_cfg::hit_single_best::hit_single_best
constexpr hit_single_best(hit_single_best const &)=default
Defaulted.
seqan3::search_cfg::hit_single_best::operator=
constexpr hit_single_best & operator=(hit_single_best &&)=default
Defaulted.
seqan3::search_cfg::hit_strata::hit_strata
constexpr hit_strata(hit_strata const &)=default
Defaulted.
seqan3::search_cfg::hit_strata::hit_strata
constexpr hit_strata(hit_strata &&)=default
Defaulted.
seqan3::search_cfg::hit_strata::operator=
constexpr hit_strata & operator=(hit_strata &&)=default
Defaulted.
seqan3::search_cfg::hit_strata::operator=
constexpr hit_strata & operator=(hit_strata const &)=default
Defaulted.
seqan3::search_cfg::hit_strata::stratum
uint8_t stratum
The stratum value [default: 0].
Definition hit.hpp:110
seqan3::search_cfg::hit_strata::hit_strata
constexpr hit_strata()=default
Defaulted.
seqan3::search_cfg::hit_strata::~hit_strata
~hit_strata()=default
Defaulted.
seqan3::search_cfg::hit_strata::hit_strata
hit_strata(uint32_t stratum)
Initialises the strata config.
Definition hit.hpp:125
seqan3::search_cfg::hit::operator=
hit & operator=(hit &&)=default
Defaulted.
seqan3::search_cfg::hit::hit
hit(hit &&)=default
Defaulted.
seqan3::search_cfg::hit::hit
hit(hit_config_t hit_config) noexcept
Sets the given configuration element to the dynamic hit configuration element.
Definition hit.hpp:171
seqan3::search_cfg::hit::hit_variant
hit_variant_type hit_variant
A std::variant over the valid hit configuration elements.
Definition hit.hpp:185
seqan3::search_cfg::hit::hit_variant_type
std::variant< detail::empty_type, hit_all, hit_all_best, hit_single_best, hit_strata > hit_variant_type
The type of the std::variant holding the hit configuration element alternatives.
Definition hit.hpp:147
seqan3::search_cfg::hit::~hit
~hit()=default
Defaulted.
seqan3::search_cfg::hit::hit
hit(hit const &)=default
Defaulted.
seqan3::search_cfg::hit::operator=
hit & operator=(hit const &)=default
Defaulted.
seqan3::search_cfg::hit::hit
hit()=default
Defaulted.
seqan3::search_cfg::hit::operator=
hit & operator=(hit_config_t hit_config) noexcept
Sets the given configuration element to the dynamic hit configuration element.
Definition hit.hpp:177
empty_type.hpp
Provides seqan3::detail::empty_type.
seqan3::pack_traits::contains
constexpr bool contains
Whether a type occurs in a pack or not.
Definition type_pack/traits.hpp:220
seqan3::search_cfg
A special sub namespace for the search configurations.
pipeable_config_element.hpp
Provides seqan3::pipeable_config_element.
detail.hpp
Provides compatibility matrix for search configurations.
seqan3::pipeable_config_element
Adds pipe interface to configuration elements.
Definition pipeable_config_element.hpp:29
traits.hpp
Provides various traits for template packs.
variant
Hide me