SeqAn3  3.0.2
The Modern C++ library for sequence analysis.
align_config_on_result.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 
15 #include <type_traits>
16 
17 
21 
22 namespace seqan3::align_cfg
23 {
24 
53 template <std::move_constructible callback_t>
54 class on_result : public seqan3::pipeable_config_element<on_result<callback_t>>
55 {
56 public:
58  seqan3::semiregular_box_t<callback_t> callback{}; // Allow lambdas with capture block which are not copy_assignable.
59 
63  constexpr on_result() = default;
64  constexpr on_result(on_result const &) = default;
65  constexpr on_result(on_result &&) = default;
66  constexpr on_result & operator=(on_result const &) = default;
67  constexpr on_result & operator=(on_result &&) = default;
68  ~on_result() = default;
69 
73  constexpr explicit on_result(callback_t callback) : callback{std::forward<callback_t>(callback)}
74  {}
76 
79  static constexpr seqan3::detail::align_config_id id{seqan3::detail::align_config_id::on_result};
80 };
81 
85 template <std::move_constructible callback_t>
89 } // namespace seqan3::align_cfg
seqan3::align_cfg::on_result::on_result
constexpr on_result()=default
Defaulted.
seqan3::align_cfg::on_result::operator=
constexpr on_result & operator=(on_result &&)=default
Defaulted.
pipeable_config_element.hpp
Provides seqan3::pipeable_config_element.
seqan3::align_cfg::on_result
on_result(callback_t &&) -> on_result< std::decay_t< callback_t >>
Deduces the callback type from a forwarding constructor argument.
seqan3::align_cfg::on_result::on_result
constexpr on_result(callback_t callback)
Constructs the configuration element with the given user callback.
Definition: align_config_on_result.hpp:73
seqan3::semiregular_box_t
::ranges::semiregular_box_t semiregular_box_t
Utility transformation trait to get a wrapper type that models std::semiregular. Imported from ranges...
Definition: semiregular_box.hpp:35
seqan3::align_cfg
A special sub namespace for the alignment configurations.
Definition: align_config_band.hpp:23
seqan3::align_cfg::on_result::on_result
constexpr on_result(on_result const &)=default
Defaulted.
seqan3::align_cfg::on_result
Configuration element to provide a user defined callback function for the alignment.
Definition: align_config_on_result.hpp:55
seqan3::align_cfg::on_result::on_result
constexpr on_result(on_result &&)=default
Defaulted.
seqan3::align_cfg::on_result::operator=
constexpr on_result & operator=(on_result const &)=default
Defaulted.
semiregular_box.hpp
Provides seqan3::semiregular_box.
seqan3::align_cfg::on_result::~on_result
~on_result()=default
Defaulted.
seqan3::align_cfg::on_result::callback
seqan3::semiregular_box_t< callback_t > callback
The stored callable which will be invoked with the alignment result.
Definition: align_config_on_result.hpp:58
detail.hpp
Provides some utility functions for the alignment configurations.