|
DocWire SDK
DocWire SDK: Award-winning modern data processing in C++20. SourceForge Community Choice & Microsoft support. AI-driven processing. Supports nearly 100 data formats, including email boxes and OCR. Boost efficiency in text extraction, web data extraction, data mining, document analysis. Offline processing possible for security and confidentiality
|
Binds a function to a function, enabling the creation of a function call chain. More...
#include <chaining.h>
Public Types | |
| using | invocation_args_t = decltype(std::tuple_cat(std::declval< tuple_utils::remove_last_t< invocation_traits::args_t< F1 > >>(), std::declval< tuple_utils::remove_first_t< invocation_traits::args_t< F2 > >>())) |
| The type of the arguments of this functor. | |
Public Member Functions | |
| template<typename... Args> | |
| auto | operator() (Args &&... args) const |
| Calls the first function with second function as a callback. Divides and forwards arguments accordingly. More... | |
Public Attributes | |
| ref_or_owned< F1 > | function1 |
| First bound function. | |
| ref_or_owned< F2 > | function2 |
| Second bound function. | |
Binds a function to a function, enabling the creation of a function call chain.
This class template takes two type parameters: F1 and F2 (the function types). It provides an operator() that allows the first function to be called with specified arguments and the second function as a callback.
Provided arguments are divided and forwarded to the first function and the second function according to their their arity.
| F1 | The type of the first function to be bound. |
| F2 | The type of the second function to be bound. |
Definition at line 116 of file chaining.h.
|
inline |
Calls the first function with second function as a callback. Divides and forwards arguments accordingly.
| Args | The types of the arguments. |
| args | The arguments. |
Definition at line 138 of file chaining.h.