31 std::shared_ptr<Vruta::TaskScheduler> scheduler,
32 std::shared_ptr<Vruta::EventManager> event_manager);
49 [[nodiscard]] std::shared_ptr<Fabric> create_fabric(
float cell_size = 1.0F);
56 [[nodiscard]] std::shared_ptr<Fabric> create_fabric(std::string
name,
float cell_size = 1.0F);
61 void remove_fabric(
const std::shared_ptr<Fabric>& fabric);
66 void remove_fabric(std::string_view
name);
72 [[nodiscard]] std::shared_ptr<Fabric> get_fabric(std::string_view
name)
const;
77 [[nodiscard]]
const std::vector<std::shared_ptr<Fabric>>& all_fabrics()
const;
82 [[nodiscard]]
const std::unordered_map<std::string, std::shared_ptr<Expanse>>&
101 [[nodiscard]] std::shared_ptr<Expanse> create_expanse(
111 [[nodiscard]] std::shared_ptr<Expanse> create_expanse(
119 [[nodiscard]] std::shared_ptr<Expanse> create_expanse(
131 template <
typename T,
typename... Args>
134 static_assert(std::is_base_of_v<Expanse, T>,
"T must derive from Expanse");
135 return std::dynamic_pointer_cast<T>(
136 claim(std::move(
name), std::make_shared<T>(std::forward<Args>(args)...)));
143 [[nodiscard]] std::shared_ptr<Expanse> get_expanse(std::string_view
name)
const;
151 void remove_expanse(std::string_view
name);
163 std::shared_ptr<Expanse> claim(std::string
name, std::shared_ptr<Expanse> expanse);
170 std::unordered_map<std::string, std::shared_ptr<Expanse>>
m_expanses;
172 uint32_t m_next_id { 1 };