swift
Loading...
Searching...
No Matches
listmutator.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) 2017 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_LISTMUTATOR_H
7#define SWIFT_MISC_SHAREDSTATE_LISTMUTATOR_H
8
9#include <QMutex>
10#include <QObject>
11
14#include "misc/variantlist.h"
15
17{
18 class IDataLink;
19
25 {
27
28 public:
30 void initialize(IDataLink *);
31
32 protected:
35
37 void addElement(const CVariant &value);
38
39 private:
41 };
42
48 template <typename T>
50 {
51 protected:
54
55 public:
57 void addElement(const typename T::value_type &value)
58 {
60 }
61 };
62} // namespace swift::misc::shared_state
63
64#endif // SWIFT_MISC_SHAREDSTATE_LISTMUTATOR_H
Wrapper around QVariant which provides transparent access to CValueObject methods of the contained ob...
Definition variant.h:69
static CVariant fromValue(T &&value)
Construct a variant from a value.
Definition variant.h:139
CGenericListMutator(QObject *parent)
Constructor.
Definition listmutator.h:34
void addElement(const CVariant &value)
Add list element as variant.
void initialize(IDataLink *)
Publish using the given transport mechanism.
CListMutator(QObject *parent)
Constructor.
Definition listmutator.h:53
void addElement(const typename T::value_type &value)
Add list element.
Definition listmutator.h:57
static auto create(QObject *parent)
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.