6 #ifndef SWIFT_MISC_SHAREDSTATE_ACTIVEOBSERVER_H
7 #define SWIFT_MISC_SHAREDSTATE_ACTIVEOBSERVER_H
10 #include <QSharedPointer>
26 friend QSharedPointer<CActiveObserver>;
28 template <
typename T,
typename F>
34 template <
typename T,
typename F>
35 static auto create(T *parent, F eventHandler)
37 return QSharedPointer<CActiveObserver>::create(parent, eventHandler);
45 void requestAsync(
const CVariant ¶m, std::function<
void(
const CVariant &)> callback);
48 QWeakPointer<const CActiveObserver>
weakRef()
const
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...
Extends CPassiveObserver with the ability to send requests and receive replies.
QWeakPointer< const CActiveObserver > weakRef() const
Get a QWeakPointer pointing to this object.
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.
Endpoint which can subscribe to events emitted by CPassiveMutator.
QWeakPointer< const CPassiveObserver > weakRef() const
Get a QWeakPointer pointing to this object.
Utilities for sharing state between multiple objects.
#define SWIFT_MISC_EXPORT
Export a class or function from the library.