SeqAn3 3.4.0-rc.1
The Modern C++ library for sequence analysis.
|
Configuration element to provide a user defined callback function for the search. More...
#include <seqan3/search/configuration/on_result.hpp>
Public Member Functions | |
Constructors, destructor and assignment | |
constexpr | on_result ()=default |
Defaulted. | |
constexpr | on_result (on_result const &)=default |
Defaulted. | |
constexpr | on_result (on_result &&)=default |
Defaulted. | |
constexpr on_result & | operator= (on_result const &)=default |
Defaulted. | |
constexpr on_result & | operator= (on_result &&)=default |
Defaulted. | |
~on_result ()=default | |
Defaulted. | |
constexpr | on_result (callback_t &&callback) |
Constructs the configuration element with the given user callback. | |
Public Attributes | |
seqan3::detail::copyable_wrapper_t< callback_t > | callback |
The stored callable which will be invoked with the search result. | |
Configuration element to provide a user defined callback function for the search.
callback_t | The type of the callback; must model std::invocable with the generated seqan3::search_result and std::copy_constructible. |
Allows the user to specify a callback that should be called for every computed search result. The callback must take exactly one argument for the search result and return void
. If the user callback is specified, the call to the search algorithm seqan3::search will return nothing, i.e. it does not return a seqan3::algorithm_result_generator_range any more. Note that within a parallel configuration, the order of the generated search results and therefore the call to the user callback is non-deterministic. However, the continuation interface with the user callback can be more efficient in a concurrent environment.
The following code snippet demonstrates the basic usage:
|
inlineexplicitconstexpr |
Constructs the configuration element with the given user callback.
[in] | callback | The callback to invoke with a computed seqan3::search_result. |