#pragma once #include #include #include #include namespace lumacs { /// Configuration value type using ConfigValue = std::variant; /// Global configuration manager class Config { public: Config(); /// Set a configuration value void set(const std::string& key, const ConfigValue& value); /// Get a configuration value template T get(const std::string& key, const T& default_value = T{}) const { auto it = values_.find(key); if (it == values_.end()) { return default_value; } try { return std::get(it->second); } catch (const std::bad_variant_access&) { return default_value; } } /// Check if a key exists bool has(const std::string& key) const; /// Get all keys std::vector keys() const; private: std::unordered_map values_; void set_defaults(); }; } // namespace lumacs