Realm C++ SDK版本 v 2.2.0

notifications.hpp

1
2//
3// 版权所有 2022 Realm Inc.
4//
5// 根据 Apache 许可证 2.0 版(“许可证”)获得许可;
6// 除非符合合规,否则不得使用此文件。
7// 您可以在以下网址获取许可证副本:
8//
9// http://www.apache.org/licenses/LICENSE-2.0
10//
11// 除非适用法律要求或书面同意,否则软件
12// 根据许可证分发是按“原样”分发的,
13// 不提供任何类型的Express或暗示的保证或条件。
14// 请参阅管理权限的特定语言的许可证和
15// 许可证下的限制。
16//
18
19#ifndefnotifications_hpp
20#definenotifications_hpp
21
22#include <cpprealm/thread_safe_reference.hpp>
23#include <cpprealm/internal/bridge/dictionary.hpp>
24#include <cpprealm/internal/bridge/list.hpp>
25#include <cpprealm/internal/bridge/set.hpp>
26
27#include <any>
28#include <future>
29#include <utility>
30
31命名空间域 {
32template < typename T>
33struct ObjectChange
34
39 notification_token ( const notification_token &nt) noException = delete ;
40 notification_token &operator=( const notification_token &) = delete ;
41 notification_token ( notification_token && other) noException {
42 m_token = std::move(other.m_token);
43 m_dictionary = std::move(other.m_dictionary);
44 m_list = std::move(other.m_list);
45 m_set = std::move(other.m_set);
46 m_results = std::move(other.m_results);
47 m_realm = std::move(other.m_realm);
48 };
49 notification_token &operator=( notification_token && other) {
50 m_token = std::move(other.m_token);
51 m_dictionary = std::move(other.m_dictionary);
52 m_list = std::move(other.m_list);
53 m_set = std::move(other.m_set);
54 m_results = std::move(other.m_results);
55 m_realm = std::move(other.m_realm);
56 return * this ;
57 };
58 notification_token () = 默认 ;
59 ~notification_token () = default ;
60
62 : m_token(std::move(token)) {}
63 void unregister() {
64 m_token.unregister();
65 }
66
68 std::shared_ptr<internal::bridge::dictionary> m_dictionary;
69 std::shared_ptr<internal::bridge::list> m_list;
70std::shared_ptr<internal::bridge::set> m_set;
71 std::shared_ptr<internal::bridge::results> m_results;
72 Internal::bridge:: Realm m_realm;
73 };
74
75// MARK: PropertyChange
79template < typename T>
84 std::string name
85
97 std::Optional< typename decltype (T:: 模式)::variant_t> old_value
98
103 std::Optional< typename decltype (T::schema)::variant_t> new_value
104 };
105
106 } // 命名空间 Realm
107
108#endif /*notifications_hpp*/
定义: notifications.hpp:33
定义: notifications.hpp: 80
std::Optional< typename decltype(T::schema)::variant_t > old_value
定义: notifications.hpp: 97
std::Optional< typename decltype(T::schema)::variant_t > new_value
定义: notifications.hpp: 103
std::string name
定义: notifications.hpp: 84
定义: realm.hpp: 67
定义: notifications.hpp:38