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