AUI Framework
master
Cross-platform base for C++ UI apps
|
Base class for signal. More...
#include <AUI/Common/AAbstractSignal.h>
Classes# | |
struct | AutoDestroyedConnection |
Connection owner which destroys the connection in destructor. More... | |
struct | Connection |
Connection handle. More... | |
Public Member Functions# | |
virtual void | clearAllOutgoingConnections () const noexcept=0 |
Destroys all connections of this signal, if any. | |
virtual void | clearAllOutgoingConnectionsWith (aui::no_escape< AObjectBase > receiver) const noexcept=0 |
Destroys all connections with passed receiver, if any. | |
virtual bool | hasOutgoingConnectionsWith (aui::no_escape< AObjectBase > receiver) const noexcept=0 |
virtual _< Connection > | addGenericObserver (AObjectBase *receiver, std::function< void()> observer)=0 |
Creates generic connection (without arguments). | |
Static Protected Member Functions# | |
static _weak< AObject > | weakPtrFromObject (AObject *object) |
static void | addIngoingConnectionIn (aui::no_escape< AObjectBase > object, _< Connection > connection) |
Adds a connection to the specified object. | |
static void | removeIngoingConnectionIn (aui::no_escape< AObjectBase > object, Connection &connection, std::unique_lock< ASpinlockMutex > &lock) |
Removes a connection from the specified object. | |
Since ASignal is a template class, AAbstractSignal provides unified access to template inseparable fields of ASignal.
|
pure virtual |
receiver | receiver object. |
observer | function to be called when signal is fired. |
|
pure virtualnoexcept |
|
pure virtualnoexcept |
receiver | object to clear connections with. |
Implemented in ASignal< Args >, ASignal< Args... >, ASignal< Args... >, ASignal< std::decay_t< Getter > >, ASignal< T > &, ASignal< T > &, ASignal< T >, ASignal<> &, ASignal<> &, and ASignal<>.
|
pure virtualnoexcept |
receiver | receiver objects to check connections with. |
Implemented in ASignal< Args >, ASignal< Args... >, ASignal< Args... >, ASignal< std::decay_t< Getter > >, ASignal< T > &, ASignal< T > &, ASignal< T >, ASignal<> &, ASignal<> &, and ASignal<>.