AUI Framework  develop
Cross-platform base for C++ UI apps
Loading...
Searching...
No Matches
ASignal< Args > Class Template Referencefinal

Classes

struct  call_wrapper
 

Public Types

using func_t = std::function<void(Args...)>
 
using emits_args_t = std::tuple<Args...>
 

Public Member Functions

template<typename Projection>
auto projected (Projection &&projection) const
 
call_wrapper operator() (Args... args)
 
 ASignal (ASignal &&) noexcept=default
 
 ASignal (const ASignal &)=delete
 
 operator bool () const
 
void clearAllConnections () const noexcept override
 
void clearAllConnectionsWith (aui::no_escape< AObjectBase > object) const noexcept override
 
bool hasConnectionsWith (aui::no_escape< AObjectBase > object) const noexcept override
 
- Public Member Functions inherited from AAbstractSignal
bool isDestroyed () const noexcept
 

Additional Inherited Members

- Protected Member Functions inherited from AAbstractSignal
void linkSlot (AObjectBase *object) noexcept
 
void unlinkSlot (AObjectBase *object) noexcept
 
- Static Protected Member Functions inherited from AAbstractSignal
static bool & isDisconnected ()
 
static _weak< AObjectweakPtrFromObject (AObject *object)
 

Member Function Documentation

◆ clearAllConnections()

template<typename... Args>
void ASignal< Args >::clearAllConnections ( ) const
inlineoverridevirtualnoexcept

Implements AAbstractSignal.

◆ clearAllConnectionsWith()

template<typename... Args>
void ASignal< Args >::clearAllConnectionsWith ( aui::no_escape< AObjectBase > object) const
inlineoverridevirtualnoexcept

Implements AAbstractSignal.

◆ hasConnectionsWith()

template<typename... Args>
bool ASignal< Args >::hasConnectionsWith ( aui::no_escape< AObjectBase > object) const
inlinenodiscardoverridevirtualnoexcept

Implements AAbstractSignal.

◆ operator bool()

template<typename... Args>
ASignal< Args >::operator bool ( ) const
inline

Check whether signal contains any connected slots or not. It's very useful then signal argument values calculation is expensive and you do not want to calculate them if no signals connected to the slot.

Returns
true, if slot contains any connected slots, false otherwise.

The documentation for this class was generated from the following file:
Inheritance diagram for ASignal< Args >:
Collaboration diagram for ASignal< Args >: