KDBindings API Documentation  1.0.95
property_updater.h
Go to the documentation of this file.
1 /*
2  This file is part of KDBindings.
3 
4  SPDX-FileCopyrightText: 2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
5  Author: Sean Harmer <sean.harmer@kdab.com>
6 
7  SPDX-License-Identifier: MIT
8 
9  Contact KDAB at <info@kdab.com> for commercial licensing options.
10 */
11 
12 #pragma once
13 
14 #include <functional>
15 
16 namespace KDBindings {
17 
30 template<typename T>
32 {
33 public:
35  PropertyUpdater() = default;
36 
38  virtual ~PropertyUpdater() = default;
39 
41  PropertyUpdater(PropertyUpdater const &other) = default;
43  PropertyUpdater &operator=(PropertyUpdater const &other) = default;
44 
46  PropertyUpdater(PropertyUpdater &&other) = default;
49 
56  virtual void setUpdateFunction(std::function<void(T &&)> const &updateFunction) = 0;
57 
63  virtual T get() const = 0;
64 };
65 
66 } // namespace KDBindings
A PropertyUpdater defines the interface used to update a Property, e.g. from a binding expression.
PropertyUpdater(PropertyUpdater &&other)=default
virtual void setUpdateFunction(std::function< void(T &&)> const &updateFunction)=0
virtual ~PropertyUpdater()=default
PropertyUpdater(PropertyUpdater const &other)=default
virtual T get() const =0
PropertyUpdater & operator=(PropertyUpdater &&other)=default
PropertyUpdater & operator=(PropertyUpdater const &other)=default
The main namespace of the KDBindings library.
Definition: binding.h:21

© Klarälvdalens Datakonsult AB (KDAB)
"The Qt, C++ and OpenGL Experts"
https://www.kdab.com/
KDBindings
Reactive programming & data binding in C++
https://github.com/KDAB/KDBindings/
Generated by doxygen 1.9.1