AUI Framework  master
Cross-platform module-based framework for developing C++20 desktop applications
ASignal< Args > Class Template Referencefinal

Classes

struct  call_wrapper
 

Public Types

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

Public Member Functions

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

Friends

class AObject
 
template<typename T >
class AWatchable
 

Additional Inherited Members

- Protected Member Functions inherited from AAbstractSignal
void linkSlot (AObject *object) noexcept
 
void unlinkSlot (AObject *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 ( )
inlineoverridevirtualnoexcept

Implements AAbstractSignal.

◆ clearAllConnectionsWith()

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

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 >: