11 #include <unordered_set> 17 std::vector<uint64_t> _objects;
18 void operator=(
const std::shared_ptr<Object> &o);
19 bool contains(
const std::shared_ptr<Object> &o)
const;
20 std::vector<std::shared_ptr<Object>>
21 resolve(
const std::shared_ptr<Object> &root)
const;
23 void add(
const std::shared_ptr<Object> &
object);
24 void toggle(
const std::shared_ptr<Object> &
object);
25 void erase(
const std::shared_ptr<Object> &
object);
32 STRUCT_FIELD(_objects);
37 std::unordered_set<std::shared_ptr<Object>> object_ptr_test;
40 std::shared_ptr<BagPlayer> player;
41 std::shared_ptr<History<std::shared_ptr<Workspace>>> history;
43 PROPERTY(std::shared_ptr<Document>, document, std::make_shared<Document>());
44 std::shared_ptr<const Snapshot<std::shared_ptr<Document>>> saved_document;
49 std::vector<std::string> listTopics(
const std::string &type_name);
50 std::vector<std::string>
51 listTopics(
const std::initializer_list<std::string> &type_names);
56 static std::shared_ptr<GlobalEvents> instance();
69 static std::shared_ptr<Workspace> &workspace_instance();
70 static std::recursive_mutex &mutex_instance();
71 std::lock_guard<std::recursive_mutex> lock{mutex_instance()};
78 inline std::shared_ptr<Workspace> &ws() {
return workspace_instance(); }
79 inline const std::shared_ptr<Workspace> &ws()
const {
80 return workspace_instance();
82 inline std::shared_ptr<Workspace> &operator()() {
83 return workspace_instance();
85 inline const std::shared_ptr<Workspace> &operator()()
const {
86 return workspace_instance();
88 inline Workspace &operator*() {
return *ws(); }
89 inline const Workspace &operator*()
const {
return *ws(); }
90 inline Workspace *operator->() {
return ws().get(); }
91 inline const Workspace *operator->()
const {
return ws().get(); }
96 std::shared_ptr<const Object> object;
97 bool aggregate =
false;
101 const std::shared_ptr<const Object> &
object =
nullptr,
102 bool aggregate =
false);