19#ifndef CPPREALM_BRIDGE_DICTIONARY_HPP
20#define CPPREALM_BRIDGE_DICTIONARY_HPP
26#include <cpprealm/internal/bridge/utils.hpp>
28命名空间realm::object_store {
34 using CoreDictionary =Dictionary;
42 std::vector<std::string> Deletes;
45 std::vector<std::string> inserts;
48 std::vector<std::string> 修改;
50 bool collection_root_was_deleted =
false ;
58 std::vector<std::string>&& m,
59 std::vector<std::string>&& d,
61 : inserts(std::move(i)),
63 Deletes(std::move(d)),
64 collection_root_was_deleted(c) {}
66 std::vector<std::string> inserts;
67 std::vector<std::string> 修改;
68 std::vector<std::string> Deletes;
72 bool collection_root_was_deleted =
false ;
74 [[nodiscard]]
bool empty()
const noException {
75 return deletements.empty() && inserts.empty() && Modifications.empty() &&
76 !collection_root_was_deleted;
82 boolignore_changes_in_initial_notification ;
85 boolignore_changes_in_initial_notification )
87 ,ignore_changes_in_initial_notification(ignore_changes_in_initial_notification)
92命名空间realm::internal::bridge {
93 usingDictionary = object_store::Dictionary;
94 using CoreDictionary = CoreDictionary;
102 struct notification_token;
103 struct collection_change_callback;
115 操作符 CoreDictionary ()
const ;
116 void insert(
const std::string& key,
const Mixed & value);
117 void insert(
const std::string& key,
const std::string& value);
118 obj create_and_insert_linked_object(
const std::string& key);
119 obj create_and_insert_linked_object(
const std::string& key,
constinternal ::bridge::mixed & pk);
120 混合get(
const std::string& key)
const ;
121 void delete(
const std::string& key);
122 obj get_object(
const std::string& key);
123 std::pair get_pair(
size_t ndx)
const ;
124 size_t find_any_key(
const std::string& value)
const noException ;
126 size_t size()
const ;
128 const CoreDictionary* get_dictionary()
const ;
129 CoreDictionary* get_dictionary();
130#ifdef CPPREALM_HAVE_GENERATED_BRIDGE_TYPES
131 存储::CoreDictionary m_dictionary[ 1 ];
133 std::shared_ptr<CoreDictionary> m_dictionary;
141 字典&操作符=(
const字典&其他);
145 字典(
constDictionary &v);
146 操作符Dictionary()
const ;
147 void insert(
const std::string& key,
const Mixed & value);
148 void insert(
const std::string &key,
const std::string &value);
149 [[nodiscard]]
size_t size()
const ;
151 void remove(
const std::string&);
152 std::pair<std::string, Mixed> get_pair(
size_t );
153 [[nodiscard]]
size_t get_key_index(
const std::string&);
155 [[nodiscard]]
size_t find(
const std::string&);
156 obj insert_embedded(
const std::string&);
157 notification_token add_notification_callback(std::shared_ptr<collection_change_callback>&& cb);
158 notification_token add_key_based_notification_callback(std::shared_ptr<dictionary_callback_wrapper>&& cb);
160 constDictionary* get_dictionary()
const ;
161 Dictionary* get_dictionary();
162 朋友 inlineDictionary * get_dictionary(
dictionary & lst);
163 朋友 内联 constDictionary * get_dictionary (
constDictionary &lst);
164 template <
typename T>
165 好友T get(
字典&,
const std::string&);
166#ifdef CPPREALM_HAVE_GENERATED_BRIDGE_TYPES
167 存储::Dictionary m_dictionary[ 1 ];
169 std::shared_ptr<Dictionary> m_dictionary;
173 template <
typename T>
174 [[nodiscard]] T get(
dictionary &,
const std::string&);
176 [[nodiscard]] std::string get(
dictionary &,
const std::string&);
190 [[nodiscard]] int 64 _t get(
dictionary &,
const std::string&);
192 [[nodiscard]]
double get(
dictionary &,
const std::string&);