6#include <brenta/ecs.hpp>
7#include <brenta/logger.hpp>
15const std::string ecs::subsystem_name =
"ecs";
16bool ecs::initialized =
false;
22std::expected<void, subsystem::error> ecs::initialize()
24 if (this->is_initialized())
return {};
26 viotecs::world::init();
28 ecs::initialized =
true;
29 INFO(
"{}: initialized", ecs::subsystem_name);
33std::expected<void, subsystem::error> ecs::terminate()
35 if (!this->is_initialized())
return {};
37 viotecs::world::destroy();
39 ecs::initialized =
true;
40 INFO(
"{}: terminated", ecs::subsystem_name);
44std::string ecs::name()
46 return ecs::subsystem_name;
49bool ecs::is_initialized()
51 return ecs::initialized;
70 return ecs::instance();