AUI Framework  master
Cross-platform module-based framework for developing C++20 desktop applications
AObject Class Reference

A base object class. More...

Detailed Description

A base object class.

AObject is required to use signal-slot system.

AObject keeps reference to itself via std::enable_shared_from_this. It can be accessed with sharedPtr() and weakPtr() functions.

Examples
/github/workspace/aui.core/src/AUI/Common/AObject.h, and /github/workspace/aui.views/src/AUI/View/AView.h.

Public Member Functions

_< AObjectsharedPtr ()
 
_weak< AObjectweakPtr ()
 
void clearSignals () noexcept
 
template<AAnySignal Signal, ACompatibleSlotFor< Signal > Function>
void connect (Signal &signal, Function &&function)
 
void setSignalsEnabled (bool enabled)
 
bool isSignalsEnabled () const noexcept
 
template<ASignalInvokable T>
void operator^ (T &&t)
 
_< AAbstractThreadgetThread () const
 
bool isSlotsCallsOnlyOnMyThread () const noexcept
 
void setSlotsCallsOnlyOnMyThread (bool slotsCallsOnlyOnMyThread)
 
- Public Member Functions inherited from aui::noncopyable
 noncopyable (const noncopyable &)=delete
 
noncopyableoperator= (const noncopyable &)=delete
 

Static Public Member Functions

static void disconnect ()
 
template<AAnySignal Signal, aui::derived_from< AObject > Object, ACompatibleSlotFor< Signal > Function>
static void connect (Signal &signal, Object *object, Function &&function)
 
template<AAnySignal Signal, aui::derived_from< AObject > Object, ACompatibleSlotFor< Signal > Function>
static void connect (Signal &signal, Object &object, Function &&function)
 
template<AAnySignal Signal, aui::derived_from< AObject > Object, ACompatibleSlotFor< Signal > Function>
static void connect (Signal &signal, _< Object > object, Function &&function)
 
static void moveToThread (aui::no_escape< AObject > object, _< AAbstractThread > thread)
 

Protected Member Functions

void setThread (_< AAbstractThread > thread)
 Set thread of the object.
 

Friends

class AAbstractSignal
 

#include <AUI/Common/AObject.h>


The documentation for this class was generated from the following files:
Inheritance diagram for AObject:
Collaboration diagram for AObject: