swift
Loading...
Searching...
No Matches
listjournal.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) 2020 swift Project Community / Contributors
2// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-swift-pilot-client-1
3
5
6#ifndef SWIFT_MISC_SHAREDSTATE_LISTJOURNAL_H
7#define SWIFT_MISC_SHAREDSTATE_LISTJOURNAL_H
8
9#include <QMutex>
10#include <QObject>
11
15#include "misc/variantlist.h"
16
18{
19 class IDataLink;
20
26 {
28
29 public:
31 void initialize(IDataLink *);
32
33 protected:
36
37 private:
38 CVariant handleRequest(const CVariant &filter);
39 void handleEvent(const CVariant &param);
40
41 QSharedPointer<CActiveMutator> m_mutator = CActiveMutator::create(this, &CGenericListJournal::handleRequest);
42 QSharedPointer<CPassiveObserver> m_observer = CPassiveObserver::create(this, &CGenericListJournal::handleEvent);
43 CVariantList m_value;
44 };
45
51 template <typename T>
58} // namespace swift::misc::shared_state
59
60#endif // SWIFT_MISC_SHAREDSTATE_LISTJOURNAL_H
Wrapper around QVariant which provides transparent access to CValueObject methods of the contained ob...
Definition variant.h:69
Value object encapsulating a list of variants.
Definition variantlist.h:29
static auto create(T *parent, F requestHandler)
Factory method.
void initialize(IDataLink *)
Publish using the given transport mechanism.
CGenericListJournal(QObject *parent)
Constructor.
Definition listjournal.h:35
CListJournal(QObject *parent)
Constructor.
Definition listjournal.h:56
static auto create(T *parent, F eventHandler)
Factory method.
Utilities for sharing state between multiple objects.
Definition application.h:48
QObject(QObject *parent)
Q_OBJECTQ_OBJECT
QObject * parent() const const
#define SWIFT_MISC_EXPORT
Export a class or function from the library.