GenericListener class for observing specific messages. This class template implements an listener for a specific message type.
More...
#include <ikarus/utils/listener/genericlistener.hh>
|
using | Token = std::shared_ptr< void > |
|
template<typename M>
class Ikarus::GenericListener< M >
- Template Parameters
-
M | The type of messages to be listend to. |
◆ Token
◆ GenericListener()
template<typename M >
template<typename F >
Initializes the listener with a specific message and a function to be executed upon listening.
- Template Parameters
-
F | Type of the function to be executed. |
- Parameters
-
message | The message to be listend to. |
f | The function to be executed with the current step. |
◆ subscribe() [1/2]
auto Ikarus::Listener::subscribe |
( |
Broadcaster & |
broadcaster, |
|
|
F && |
f |
|
) |
| |
|
inlineinherited |
This function deducts the types of the arguments itself and then forwards it. If there are problems with type deduction use the function below and specify the types of the arguments manually.
- Template Parameters
-
Broadcaster | the type of the Broadcaster (for example a NonlinearSolver or ControlRoutine), can either be a pointer or value. |
F | the type of the function |
- Parameters
-
broadcaster | the broadcaster |
f | the function |
◆ subscribe() [2/2]
template<typename
Broadcaster , typename Signature , typename F >
requires (not Concepts::PointerOrSmartPointer<
Broadcaster>)
auto Ikarus::Listener::subscribe |
( |
Broadcaster & |
broadcaster, |
|
|
F && |
f |
|
) |
| |
|
inlineinherited |
- Template Parameters
-
Broadcaster | the type of the Broadcaster (for example a NonlinearSolver or ControlRoutine), can either be a pointer or value. |
Signature | the exact signature of the function F |
F | the type of the function |
- Parameters
-
broadcaster | the broadcaster |
f | the function |
◆ subscribeTo()
template<typename M >
template<typename BC >
◆ unSubscribe()
void Ikarus::Listener::unSubscribe |
( |
Token && |
ts | ) |
|
|
inlineinherited |
◆ unSubscribeAll()
void Ikarus::Listener::unSubscribeAll |
( |
| ) |
|
|
inlineinherited |
◆ unSubscribeLast()
void Ikarus::Listener::unSubscribeLast |
( |
| ) |
|
|
inlineinherited |
◆ updateImpl()
The documentation for this class was generated from the following file: