swift
Loading...
Searching...
No Matches
scalarjournal.cpp
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
7
9
11{
13 {
14 dataLink->publish(m_mutator.data());
15 dataLink->subscribe(m_observer.data());
16 m_observer->setEventSubscription(CVariant::fromValue(CAnyMatch()));
17 m_mutator->postEvent(m_value);
18 }
19
20 CVariant CGenericScalarJournal::handleRequest(const CVariant &param)
21 {
22 Q_UNUSED(param)
23 return m_value;
24 }
25
26 void CGenericScalarJournal::handleEvent(const CVariant &param) { m_value = param; }
27} // namespace swift::misc::shared_state
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
Dummy value class that matches any event.
void initialize(IDataLink *)
Publish using the given transport mechanism.
Utilities for sharing state between multiple objects.
Definition application.h:48