#pragma once #include #include "common.hpp" LEMONBUDDY_NS class xresource_manager { public: explicit xresource_manager(); string get_string(string name) const; float get_float(string name) const; int get_int(string name) const; protected: string load_value(string key, string res_type, size_t n) const; private: char* m_manager = nullptr; XrmDatabase m_db; }; namespace { /** * Configure injection module */ template di::injector configure_xresource_manager() { auto instance = factory::generic_singleton(); return di::make_injector(di::bind<>().to(instance)); } } LEMONBUDDY_NS_END