swift
Signals | Public Member Functions | Static Public Member Functions | List of all members
swift::misc::shared_state::CActiveObserver Class Referencefinal

Extends CPassiveObserver with the ability to send requests and receive replies. More...

Inheritance diagram for swift::misc::shared_state::CActiveObserver:
[legend]

Signals

void requestPosted (const swift::misc::CVariant &param, swift::misc::CPromise< swift::misc::CVariant > o_reply)
 Emitted by request and requestAsync.
 
- Signals inherited from swift::misc::shared_state::CPassiveObserver
void eventSubscriptionChanged (const swift::misc::CVariant &param)
 Emitted by setEventSubscription.
 

Public Member Functions

CVariant request (const CVariant &param)
 Send a request and receive a synchronous reply.
 
void requestAsync (const CVariant &param, std::function< void(const CVariant &)> callback)
 Send a request and receive an asynchronous reply. The callback will not be called if the reply is received after the observer has been destroyed.
 
QWeakPointer< const CActiveObserverweakRef () const
 Get a QWeakPointer pointing to this object.
 
- Public Member Functions inherited from swift::misc::shared_state::CPassiveObserver
void setEventSubscription (const CVariant &param)
 Set the object that determines which events are subscribed to.
 
CVariant eventSubscription () const
 Get the object that determines which events are subscribed to.
 
void handleEvent (const CVariant &param) const
 Called when a subscribed event is emitted.
 
QWeakPointer< const CPassiveObserverweakRef () const
 Get a QWeakPointer pointing to this object.
 

Static Public Member Functions

template<typename T , typename F >
static auto create (T *parent, F eventHandler)
 Factory method.
 
- Static Public Member Functions inherited from swift::misc::shared_state::CPassiveObserver
template<typename T , typename F >
static auto create (T *parent, F eventHandler)
 Factory method.
 

Detailed Description

Extends CPassiveObserver with the ability to send requests and receive replies.

Definition at line 23 of file activeobserver.h.


The documentation for this class was generated from the following files: