6#ifndef SWIFT_MISC_SHAREDSTATE_ACTIVEOBSERVER_H
7#define SWIFT_MISC_SHAREDSTATE_ACTIVEOBSERVER_H
10#include <QSharedPointer>
28 template <
typename T,
typename F>
29 CActiveObserver(T *
parent, F eventHandler) : CPassiveObserver(
parent, eventHandler)
34 template <
typename T,
typename F>
45 void requestAsync(
const CVariant ¶m, std::function<
void(
const CVariant &)> callback);
A promise-based interface to QFuture, similar to std::promise for std::future.
Wrapper around QVariant which provides transparent access to CValueObject methods of the contained ob...
static auto create(T *parent, F eventHandler)
Factory method.
void requestPosted(const swift::misc::CVariant ¶m, swift::misc::CPromise< swift::misc::CVariant > o_reply)
Emitted by request and requestAsync.
QWeakPointer< const CActiveObserver > weakRef() const
Get a QWeakPointer pointing to this object.
QWeakPointer< const CPassiveObserver > weakRef() const
Get a QWeakPointer pointing to this object.
Utilities for sharing state between multiple objects.
QObject * parent() const const
QSharedPointer< T > create(Args &&... args)
#define SWIFT_MISC_EXPORT
Export a class or function from the library.