![]() |
aGrUM 3.0.0
a C++ library for (probabilistic) graphical models
|
Concrete connector binding a target object and its member function. More...
#include <signaler.h>
Public Types | |
| using | ActionType = void (TargetClass::*)(const void*, Args...) |
| Type alias for the member function pointer. | |
Public Member Functions | |
| Connector () | |
| Default constructor. | |
| Connector (TargetClass *target, ActionType action) | |
| Construct with target and action. | |
| Connector (const Connector &src) | |
| Copy constructor. | |
| ~Connector () override | |
| Destructor. | |
| Listener * | target () const override |
| void | notify (const void *src, Args... args) override |
| Notify the target with the given source and arguments. | |
| IConnector< Args... > * | clone () const override |
| Create a deep copy of this connector. | |
| IConnector< Args... > * | duplicate (Listener *newTarget) const override |
| Create a duplicate connector pointing to a new target. | |
Private Attributes | |
| TargetClass * | _target_ |
| ActionType | _action_ |
Concrete connector binding a target object and its member function.
| TargetClass | The class of the listener object. |
| Args | The types of arguments passed to the callback. |
Definition at line 120 of file signaler.h.
| using gum::__sig__::Connector< TargetClass, Args >::ActionType = void (TargetClass::*)(const void*, Args...) |
Type alias for the member function pointer.
Definition at line 123 of file signaler.h.
|
inline |
Default constructor.
Definition at line 126 of file signaler.h.
References Connector(), _action_, and _target_.
Referenced by Connector(), Connector(), Connector(), ~Connector(), clone(), and duplicate().
| gum::__sig__::Connector< TargetClass, Args >::Connector | ( | TargetClass * | target, |
| ActionType | action ) |
Construct with target and action.
Definition at line 53 of file signaler_tpl.h.
References Connector(), _action_, _target_, and target().
| gum::__sig__::Connector< TargetClass, Args >::Connector | ( | const Connector< TargetClass, Args > & | src | ) |
Copy constructor.
Definition at line 59 of file signaler_tpl.h.
References Connector(), _action_, and _target_.
|
inlineoverride |
Destructor.
Definition at line 135 of file signaler.h.
References Connector().
|
overridevirtual |
Create a deep copy of this connector.
Implements gum::__sig__::IConnector< Args... >.
Definition at line 75 of file signaler_tpl.h.
References Connector().
|
nodiscardoverridevirtual |
Create a duplicate connector pointing to a new target.
Implements gum::__sig__::IConnector< Args... >.
Definition at line 80 of file signaler_tpl.h.
References Connector(), and _action_.
|
overridevirtual |
Notify the target with the given source and arguments.
Implements gum::__sig__::IConnector< Args... >.
Definition at line 70 of file signaler_tpl.h.
|
overridevirtual |
Implements gum::__sig__::IConnector< Args... >.
Definition at line 65 of file signaler_tpl.h.
References _target_.
Referenced by Connector().
|
private |
Definition at line 151 of file signaler.h.
Referenced by Connector(), Connector(), Connector(), duplicate(), and notify().
|
private |
Definition at line 150 of file signaler.h.
Referenced by Connector(), Connector(), Connector(), notify(), and target().