17 void add_object_to_database(
const std::shared_ptr<database_object>&
object);
18 void remove_object_from_database(sbk_id objectID);
20 [[nodiscard]] std::weak_ptr<database_object> try_find(sbk_id objectID)
const;
21 [[nodiscard]] std::weak_ptr<database_object> try_find(std::string_view name)
const;
23 [[nodiscard]] std::vector<std::weak_ptr<database_object>> get_all()
const;
25 void clear_database()
noexcept;
28 static sbk_id create_new_id();
29 static std::string create_new_name(
const rttr::type& type);
31 void update_id(sbk_id oldID, sbk_id newID);
32 void update_name(std::string_view oldName, std::string_view newName);
33 void on_object_destroyed(
object*
object);
35 std::unordered_map<sbk_id, std::weak_ptr<database_object>> m_idToPointerMap;
36 std::unordered_map<std::string, sbk_id> m_nameToIdMap;