ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
|
RAII handle for a callback. More...
#include <MpiCallbacks.hpp>
Public Member Functions | |
template<typename F , class = std::enable_if_t<std::is_same_v< typename detail::functor_types<F>::argument_types, std::tuple<Args...>>>> | |
CallbackHandle (std::shared_ptr< MpiCallbacks > cb, F &&f) | |
CallbackHandle (CallbackHandle const &)=delete | |
CallbackHandle (CallbackHandle &&rhs) noexcept=default | |
CallbackHandle & | operator= (CallbackHandle const &)=delete |
CallbackHandle & | operator= (CallbackHandle &&rhs) noexcept=default |
template<class... ArgRef> | |
auto | operator() (ArgRef &&...args) const -> std::enable_if_t< std::is_void_v< decltype(std::declval< void(*)(Args...)>()(std::forward< ArgRef >(args)...))> > |
Call the callback managed by this handle. | |
~CallbackHandle () | |
int | id () const |
RAII handle for a callback.
This is what the client gets for registering a dynamic (= not function pointer) callback. It manages the lifetime of the callback handle needed to call it. The handle has a type derived from the signature of the callback, which makes it possible to do static type checking on the arguments.
Definition at line 199 of file MpiCallbacks.hpp.
|
inline |
Definition at line 204 of file MpiCallbacks.hpp.
|
delete |
|
defaultnoexcept |
|
inline |
Definition at line 235 of file MpiCallbacks.hpp.
|
inline |
Definition at line 240 of file MpiCallbacks.hpp.
|
inline |
Call the callback managed by this handle.
The arguments are passed to the remote callees, it must be possible to call the function with the provided arguments, otherwise this will not compile.
Definition at line 225 of file MpiCallbacks.hpp.
|
defaultnoexcept |
|
delete |