#ifndef CFG_HH #define CFG_HH #include #include #include #include namespace cfg { class Config { public: virtual ~Config() = default; [[nodiscard]] virtual std::optional get(std::string_view name) const = 0; [[nodiscard]] bool has(std::string_view name) const; [[nodiscard]] std::optional get_int64(std::string_view name) const; [[nodiscard]] std::optional get_uint64(std::string_view name) const; [[nodiscard]] std::optional get_bool(std::string_view name) const; [[nodiscard]] static std::unique_ptr load(std::string_view name, std::vector& errors); protected: Config() = default; Config(Config const&) = delete; Config& operator=(Config const&) = delete; }; } // namespace cfg #endif // CFG_HH