From 34f0461a68b3a55399b69f7f7392c64a3ff3735a Mon Sep 17 00:00:00 2001 From: tqcq <99722391+tqcq@users.noreply.github.com> Date: Wed, 14 Aug 2024 21:40:13 +0800 Subject: [PATCH] feat udpate config to configuration --- CMakeLists.txt | 6 +- .../config/{config.cc => configuration.cc} | 33 ++--- .../base/config/{config.h => configuration.h} | 20 +-- ...le_config.cc => ini_file_configuration.cc} | 28 ++-- ...file_config.h => ini_file_configuration.h} | 10 +- ...test.cc => ini_file_configuration_test.cc} | 11 +- tile/base/config/layered_config.cc | 129 ----------------- tile/base/config/layered_config.h | 57 -------- tile/base/config/layered_configuration.cc | 133 ++++++++++++++++++ tile/base/config/layered_configuration.h | 57 ++++++++ tile/base/configuration.h | 11 ++ tile/tile.h | 6 +- 12 files changed, 258 insertions(+), 243 deletions(-) rename tile/base/config/{config.cc => configuration.cc} (75%) rename tile/base/config/{config.h => configuration.h} (89%) rename tile/base/config/{ini_file_config.cc => ini_file_configuration.cc} (77%) rename tile/base/config/{ini_file_config.h => ini_file_configuration.h} (81%) rename tile/base/config/{ini_file_config_test.cc => ini_file_configuration_test.cc} (72%) delete mode 100644 tile/base/config/layered_config.cc delete mode 100644 tile/base/config/layered_config.h create mode 100644 tile/base/config/layered_configuration.cc create mode 100644 tile/base/config/layered_configuration.h create mode 100644 tile/base/configuration.h diff --git a/CMakeLists.txt b/CMakeLists.txt index 7631cc6..bbf65c9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -207,9 +207,9 @@ set(TILE_SRCS "tile/rpc/protocol/http/buffer_io.cc" "tile/rpc/protocol/message.cc" # "tile/rpc/server.cc" - "tile/base/config/config.cc" - "tile/base/config/ini_file_config.cc" - "tile/base/config/layered_config.cc" + "tile/base/config/configuration.cc" + "tile/base/config/ini_file_configuration.cc" + "tile/base/config/layered_configuration.cc" ) if((NOT TILE_HAVE_GETIFADDRS) OR (NOT TILE_HAVE_FREEIFADDRS)) diff --git a/tile/base/config/config.cc b/tile/base/config/configuration.cc similarity index 75% rename from tile/base/config/config.cc rename to tile/base/config/configuration.cc index e56cf21..482a93b 100644 --- a/tile/base/config/config.cc +++ b/tile/base/config/configuration.cc @@ -1,26 +1,26 @@ -#include "tile/base/config/config.h" +#include "tile/base/config/configuration.h" #include "tile/base/thread/unique_lock.h" namespace tile { namespace util { -bool Config::Has(const Slice &key) const { +bool Configuration::Has(const Slice &key) const { UniqueLock lock(mutex_); std::string value; return GetRaw(key, &value); } -void Config::Remove(const Slice &key) {} +void Configuration::Remove(const Slice &key) {} -void Config::EnableEvents(bool enable) { events_enabled_ = enable; } -bool Config::EventsEnabled() const { return events_enabled_; } +void Configuration::EnableEvents(bool enable) { events_enabled_ = enable; } +bool Configuration::EventsEnabled() const { return events_enabled_; } -Config::Keys Config::keys(const Slice &root) const { +Configuration::Keys Configuration::keys(const Slice &root) const { UniqueLock lock(mutex_); return Enumerate(root); } #define TILE_DEFINE_CONFIG_GETTER(type, name) \ - std::optional Config::Get##name(const Slice &key) const { \ + std::optional Configuration::Get##name(const Slice &key) const { \ std::string value; \ if (GetRaw(key, &value)) { \ auto opt = TryParseTraits::TryParse(value); \ @@ -33,7 +33,7 @@ Config::Keys Config::keys(const Slice &root) const { return std::nullopt; \ } \ } \ - type Config::Get##name(const Slice &key, type default_value) const { \ + type Configuration::Get##name(const Slice &key, type default_value) const { \ auto opt = Get##name(key); \ if (opt.has_value()) { \ return *opt; \ @@ -43,11 +43,11 @@ Config::Keys Config::keys(const Slice &root) const { } #define TILE_DEFINE_CONFIG_SETTER(type, name) \ - void Config::Set##name(const Slice &key, type value) { \ + void Configuration::Set##name(const Slice &key, type value) { \ SetRawWithEvent(key, Format("{}", value)); \ } -std::optional Config::GetString(const Slice &key) const { +std::optional Configuration::GetString(const Slice &key) const { std::string value; UniqueLock lock(mutex_); if (GetRaw(key, &value)) { @@ -57,16 +57,16 @@ std::optional Config::GetString(const Slice &key) const { } } -std::string Config::GetString(const Slice &key, - std::string default_value) const { +std::string Configuration::GetString(const Slice &key, + std::string default_value) const { auto opt = GetString(key); return opt.has_value() ? *opt : default_value; } -void Config::SetString(const Slice &key, const std::string &value) { +void Configuration::SetString(const Slice &key, const std::string &value) { SetRawWithEvent(key, value); } -void Config::SetBool(const Slice &key, bool value) { +void Configuration::SetBool(const Slice &key, bool value) { SetRawWithEvent(key, value ? "true" : "false"); } @@ -91,7 +91,8 @@ TILE_DEFINE_CONFIG_SETTER(uint32_t, UInt32) TILE_DEFINE_CONFIG_SETTER(uint64_t, UInt64) TILE_DEFINE_CONFIG_SETTER(double, Double) -void Config::SetRawWithEvent(const Slice &key, const std::string &value) { +void Configuration::SetRawWithEvent(const Slice &key, + const std::string &value) { if (events_enabled_) { OnChanging(key, value); } @@ -106,7 +107,7 @@ void Config::SetRawWithEvent(const Slice &key, const std::string &value) { } } -Config::~Config() {} +Configuration::~Configuration() {} } // namespace util diff --git a/tile/base/config/config.h b/tile/base/config/configuration.h similarity index 89% rename from tile/base/config/config.h rename to tile/base/config/configuration.h index 32e3204..2365340 100644 --- a/tile/base/config/config.h +++ b/tile/base/config/configuration.h @@ -1,5 +1,5 @@ -#ifndef TILE_BASE_CONFIG_CONFIG_H -#define TILE_BASE_CONFIG_CONFIG_H +#ifndef TILE_BASE_CONFIG_CONFIGURATION_H +#define TILE_BASE_CONFIG_CONFIGURATION_H #pragma once #include "tile/base/optional.h" @@ -12,10 +12,10 @@ namespace tile { namespace util { -class Config : public RefCounted { +class Configuration : public RefCounted { public: using Keys = std::vector; - using Ptr = RefPtr; + using Ptr = RefPtr; // events // Key, Value @@ -98,13 +98,13 @@ protected: protected: class ScopedLock { public: - explicit ScopedLock(const Config &config) : config_(config) { + explicit ScopedLock(const Configuration &config) : config_(config) { config_.mutex_.Lock(); } ~ScopedLock() { config_.mutex_.Unlock(); } private: - const Config &config_; + const Configuration &config_; }; virtual bool GetRaw(const Slice &key, std::string *value) const = 0; @@ -112,10 +112,10 @@ protected: virtual void RemoveRaw(const Slice &key) = 0; virtual Keys Enumerate(const Slice &range) const = 0; void SetRawWithEvent(const Slice &key, const std::string &value); - virtual ~Config(); + virtual ~Configuration(); - friend class std::default_delete; - friend class LayeredConfig; + friend class std::default_delete; + friend class LayeredConfiguration; private: mutable Mutex mutex_; @@ -124,4 +124,4 @@ private: } // namespace util } // namespace tile -#endif // TILE_BASE_CONFIG_CONFIG_H +#endif // TILE_BASE_CONFIG_CONFIGURATION_H diff --git a/tile/base/config/ini_file_config.cc b/tile/base/config/ini_file_configuration.cc similarity index 77% rename from tile/base/config/ini_file_config.cc rename to tile/base/config/ini_file_configuration.cc index c3838c5..cb2c9bc 100644 --- a/tile/base/config/ini_file_config.cc +++ b/tile/base/config/ini_file_configuration.cc @@ -1,16 +1,16 @@ -#include "tile/base/config/ini_file_config.h" +#include "tile/base/config/ini_file_configuration.h" #include "tile/base/thread/scoped_lock.h" namespace tile { namespace util { -IniFileConfig::IniFileConfig() {} +IniFileConfiguration::IniFileConfiguration() {} // IniFileConfig::IniFileConfig(std::istream &istr) { load(istr); } // IniFileConfig::IniFileConfig(const std::string &path) { load(path); } -IniFileConfig::~IniFileConfig() {} +IniFileConfiguration::~IniFileConfiguration() {} -bool IniFileConfig::load(std::istream &istr) { - Config::ScopedLock lock(*this); +bool IniFileConfiguration::load(std::istream &istr) { + Configuration::ScopedLock lock(*this); map_.clear(); section_key_.clear(); while (!istr.eof()) { @@ -18,7 +18,7 @@ bool IniFileConfig::load(std::istream &istr) { } return true; } -bool IniFileConfig::load(const std::string &path) { +bool IniFileConfiguration::load(const std::string &path) { std::ifstream istr(path); if (istr.good()) { return load(istr); @@ -26,7 +26,7 @@ bool IniFileConfig::load(const std::string &path) { return false; } } -bool IniFileConfig::GetRaw(const Slice &key, std::string *value) const { +bool IniFileConfiguration::GetRaw(const Slice &key, std::string *value) const { auto iter = map_.find(key.ToString()); if (iter != map_.end()) { *value = iter->second; @@ -35,12 +35,12 @@ bool IniFileConfig::GetRaw(const Slice &key, std::string *value) const { return false; } } -bool IniFileConfig::SetRaw(const Slice &key, const Slice &value) { +bool IniFileConfiguration::SetRaw(const Slice &key, const Slice &value) { map_[key] = value; return true; } -void IniFileConfig::RemoveRaw(const Slice &key) { +void IniFileConfiguration::RemoveRaw(const Slice &key) { std::string prefix = key; if (!prefix.empty()) { prefix.push_back('.'); @@ -57,8 +57,8 @@ void IniFileConfig::RemoveRaw(const Slice &key) { } } -Config::Keys IniFileConfig::Enumerate(const Slice &key) const { - Config::Keys range; +Configuration::Keys IniFileConfiguration::Enumerate(const Slice &key) const { + Configuration::Keys range; std::set keys; std::string prefix = key.ToString(); if (prefix.empty()) { @@ -86,7 +86,7 @@ Config::Keys IniFileConfig::Enumerate(const Slice &key) const { return range; } -void IniFileConfig::ParseLine(std::istream &istr) { +void IniFileConfiguration::ParseLine(std::istream &istr) { static const int eof = std::char_traits::eof(); auto ReadLine = [&](std::string *line) { line->clear(); @@ -135,8 +135,8 @@ void IniFileConfig::ParseLine(std::istream &istr) { } } } -bool IniFileConfig::ICompare::operator()(const std::string &s1, - const std::string &s2) const { +bool IniFileConfiguration::ICompare::operator()(const std::string &s1, + const std::string &s2) const { auto len = std::min(s1.size(), s2.size()); return strncmp(s1.c_str(), s2.c_str(), len) < 0; } diff --git a/tile/base/config/ini_file_config.h b/tile/base/config/ini_file_configuration.h similarity index 81% rename from tile/base/config/ini_file_config.h rename to tile/base/config/ini_file_configuration.h index fe3e1a9..f9a1b08 100644 --- a/tile/base/config/ini_file_config.h +++ b/tile/base/config/ini_file_configuration.h @@ -3,17 +3,17 @@ #pragma once -#include "tile/base/config/config.h" +#include "tile/base/config/configuration.h" #include namespace tile { namespace util { -class IniFileConfig : public Config { +class IniFileConfiguration : public Configuration { public: - using Ptr = RefPtr; + using Ptr = RefPtr; - IniFileConfig(); - ~IniFileConfig() override; + IniFileConfiguration(); + ~IniFileConfiguration() override; // IniFileConfig(std::istream &istr); // IniFileConfig(const std::string &path); bool load(std::istream &istr); diff --git a/tile/base/config/ini_file_config_test.cc b/tile/base/config/ini_file_configuration_test.cc similarity index 72% rename from tile/base/config/ini_file_config_test.cc rename to tile/base/config/ini_file_configuration_test.cc index e110933..ffd1de2 100644 --- a/tile/base/config/ini_file_config_test.cc +++ b/tile/base/config/ini_file_configuration_test.cc @@ -1,4 +1,4 @@ -#include "tile/base/config/ini_file_config.h" +#include "tile/base/config/ini_file_configuration.h" #include "gtest/gtest.h" const char *kIniFileConfig = R"( @@ -18,16 +18,17 @@ a=4 namespace tile { namespace util { -static_assert(!detail::HasClassofImpl::value, ""); +static_assert( + !detail::HasClassofImpl::value, ""); TEST(IniFileConfig, LoadFromIStream) { std::stringstream ss(kIniFileConfig); - Config::Ptr config = MakeRefCounted(); + Configuration::Ptr config = MakeRefCounted(); ASSERT_FALSE(config->Has("a")); ASSERT_FALSE(config->Has("sec1.a")); ASSERT_FALSE(config->Has("sec3.a")); - if (config.Is()) { - IniFileConfig::Ptr ini = config.As(); + if (config.Is()) { + IniFileConfiguration::Ptr ini = config.As(); ASSERT_TRUE(ini->load(ss)); } ASSERT_TRUE(config->Has("a")); diff --git a/tile/base/config/layered_config.cc b/tile/base/config/layered_config.cc deleted file mode 100644 index 3b90173..0000000 --- a/tile/base/config/layered_config.cc +++ /dev/null @@ -1,129 +0,0 @@ -#include "tile/base/config/layered_config.h" - -namespace tile { -namespace util { - -LayeredConfig::LayeredConfig() {} -LayeredConfig::~LayeredConfig() {} - -void LayeredConfig::Add(Config::Ptr cfg) { Add(cfg, highest(), false); } - -void LayeredConfig::Add(Config::Ptr cfg, int priority) { - Add(cfg, priority, false); -} - -void LayeredConfig::Add(Config::Ptr cfg, const std::string &label) { - Add(cfg, label, highest(), false); -} - -void LayeredConfig::Add(Config::Ptr cfg, const std::string &label, - int priority) { - Add(cfg, label, priority, false); -} - -void LayeredConfig::Add(Config::Ptr cfg, const std::string &label, - bool writeable) { - Add(cfg, label, highest(), writeable); -} - -void LayeredConfig::Add(Config::Ptr cfg, const std::string &label, int priority, - bool writeable) { - Config::ScopedLock lock(*this); - ConfigItem item; - item.cfg = cfg; - item.priority = priority; - item.writeable = writeable; - item.label = label; - auto it = configs_.begin(); - while (it != configs_.end() && it->priority < priority) { - ++it; - } - configs_.insert(it, item); -} - -void LayeredConfig::Add(Config::Ptr cfg, int priority, bool writeable) { - Add(cfg, std::string(), priority, writeable); -} -void LayeredConfig::AddWriteable(Config::Ptr cfg, int priority) { - Add(cfg, priority, true); -} - -Config::Ptr LayeredConfig::Find(const Slice &label) const { - Config::ScopedLock lock(*this); - - for (const auto &conf : configs_) { - if (conf.label == label) { - return conf.cfg; - } - } - return 0; -} - -void LayeredConfig::RemoveConfig(Config::Ptr cfg) { - Config::ScopedLock lock(*this); - for (auto it = configs_.begin(); it != configs_.end();) { - if (it->cfg == cfg) { - it = configs_.erase(it); - } else { - ++it; - } - } -} - -bool LayeredConfig::GetRaw(const Slice &key, std::string *value) const { - for (const auto &conf : configs_) { - if (conf.cfg->GetRaw(key, value)) { - return true; - } - } - return false; -} - -bool LayeredConfig::SetRaw(const Slice &key, const Slice &value) { - for (const auto &conf : configs_) { - if (conf.writeable && conf.cfg->SetRaw(key, value)) { - return true; - } - } - return false; -} - -Config::Keys LayeredConfig::Enumerate(const Slice &key) const { - Config::Keys keys; - std::set key_set; - for (const auto &conf : configs_) { - auto conf_keys = conf.cfg->Enumerate(key); - for (const auto &k : conf_keys) { - if (key_set.insert(k).second) { - keys.push_back(k); - } - } - } - return keys; -} - -void LayeredConfig::RemoveRaw(const std::string &key) { - for (auto &conf : configs_) { - if (conf.writeable) { - conf.cfg->RemoveRaw(key); - } - } -} - -int LayeredConfig::lowest() const { - if (configs_.empty()) { - return 0; - } else { - return configs_.front().priority - 1; - } -} -int LayeredConfig::highest() const { - if (configs_.empty()) { - return 0; - } else { - return configs_.back().priority + 1; - } -} - -} // namespace util -} // namespace tile diff --git a/tile/base/config/layered_config.h b/tile/base/config/layered_config.h deleted file mode 100644 index e481515..0000000 --- a/tile/base/config/layered_config.h +++ /dev/null @@ -1,57 +0,0 @@ -#ifndef TILE_BASE_CONFIG_LAYERED_CONFIG_H -#define TILE_BASE_CONFIG_LAYERED_CONFIG_H - -#pragma once - -#include "tile/base/config/config.h" -#include - -namespace tile { -namespace util { -class LayeredConfig : public Config { -public: - using Ptr = RefPtr; - LayeredConfig(); - LayeredConfig(const LayeredConfig &) = delete; - LayeredConfig &operator=(const LayeredConfig &) = delete; - - void Add(Config::Ptr cfg); - void Add(Config::Ptr cfg, int priority); - void Add(Config::Ptr cfg, const std::string &label); - void Add(Config::Ptr cfg, const std::string &label, int priority); - void Add(Config::Ptr cfg, const std::string &label, bool writeable); - void Add(Config::Ptr cfg, const std::string &label, int priority, - bool writeable); - void Add(Config::Ptr cfg, int priority, bool writeable); - void AddWriteable(Config::Ptr cfg, int priority); - Config::Ptr Find(const Slice &label) const; - void RemoveConfig(Config::Ptr cfg); - -protected: - struct ConfigItem { - Config::Ptr cfg; - // ... > -2 > -1 > 0 > 1 > 2 > 3 > 4 ... - int priority; - // can remove or set new? - bool writeable; - std::string label; - }; - - bool GetRaw(const Slice &key, std::string *value) const override; - bool SetRaw(const Slice &key, const Slice &value) override; - Config::Keys Enumerate(const Slice &key) const override; - void RemoveRaw(const std::string &key); - - int lowest() const; - int highest() const; - - ~LayeredConfig(); - -private: - using ConfigList = std::list; - ConfigList configs_; -}; -} // namespace util -} // namespace tile - -#endif // TILE_BASE_CONFIG_LAYERED_CONFIG_H diff --git a/tile/base/config/layered_configuration.cc b/tile/base/config/layered_configuration.cc new file mode 100644 index 0000000..80910ed --- /dev/null +++ b/tile/base/config/layered_configuration.cc @@ -0,0 +1,133 @@ +#include "tile/base/config/layered_configuration.h" + +namespace tile { +namespace util { + +LayeredConfiguration::LayeredConfiguration() {} +LayeredConfiguration::~LayeredConfiguration() {} + +void LayeredConfiguration::Add(Configuration::Ptr cfg) { + Add(cfg, highest(), false); +} + +void LayeredConfiguration::Add(Configuration::Ptr cfg, int priority) { + Add(cfg, priority, false); +} + +void LayeredConfiguration::Add(Configuration::Ptr cfg, + const std::string &label) { + Add(cfg, label, highest(), false); +} + +void LayeredConfiguration::Add(Configuration::Ptr cfg, const std::string &label, + int priority) { + Add(cfg, label, priority, false); +} + +void LayeredConfiguration::Add(Configuration::Ptr cfg, const std::string &label, + bool writeable) { + Add(cfg, label, highest(), writeable); +} + +void LayeredConfiguration::Add(Configuration::Ptr cfg, const std::string &label, + int priority, bool writeable) { + Configuration::ScopedLock lock(*this); + ConfigItem item; + item.cfg = cfg; + item.priority = priority; + item.writeable = writeable; + item.label = label; + auto it = configs_.begin(); + while (it != configs_.end() && it->priority < priority) { + ++it; + } + configs_.insert(it, item); +} + +void LayeredConfiguration::Add(Configuration::Ptr cfg, int priority, + bool writeable) { + Add(cfg, std::string(), priority, writeable); +} +void LayeredConfiguration::AddWriteable(Configuration::Ptr cfg, int priority) { + Add(cfg, priority, true); +} + +Configuration::Ptr LayeredConfiguration::Find(const Slice &label) const { + Configuration::ScopedLock lock(*this); + + for (const auto &conf : configs_) { + if (conf.label == label) { + return conf.cfg; + } + } + return 0; +} + +void LayeredConfiguration::RemoveConfig(Configuration::Ptr cfg) { + Configuration::ScopedLock lock(*this); + for (auto it = configs_.begin(); it != configs_.end();) { + if (it->cfg == cfg) { + it = configs_.erase(it); + } else { + ++it; + } + } +} + +bool LayeredConfiguration::GetRaw(const Slice &key, std::string *value) const { + for (const auto &conf : configs_) { + if (conf.cfg->GetRaw(key, value)) { + return true; + } + } + return false; +} + +bool LayeredConfiguration::SetRaw(const Slice &key, const Slice &value) { + for (const auto &conf : configs_) { + if (conf.writeable && conf.cfg->SetRaw(key, value)) { + return true; + } + } + return false; +} + +Configuration::Keys LayeredConfiguration::Enumerate(const Slice &key) const { + Configuration::Keys keys; + std::set key_set; + for (const auto &conf : configs_) { + auto conf_keys = conf.cfg->Enumerate(key); + for (const auto &k : conf_keys) { + if (key_set.insert(k).second) { + keys.push_back(k); + } + } + } + return keys; +} + +void LayeredConfiguration::RemoveRaw(const std::string &key) { + for (auto &conf : configs_) { + if (conf.writeable) { + conf.cfg->RemoveRaw(key); + } + } +} + +int LayeredConfiguration::lowest() const { + if (configs_.empty()) { + return 0; + } else { + return configs_.front().priority - 1; + } +} +int LayeredConfiguration::highest() const { + if (configs_.empty()) { + return 0; + } else { + return configs_.back().priority + 1; + } +} + +} // namespace util +} // namespace tile diff --git a/tile/base/config/layered_configuration.h b/tile/base/config/layered_configuration.h new file mode 100644 index 0000000..db498ff --- /dev/null +++ b/tile/base/config/layered_configuration.h @@ -0,0 +1,57 @@ +#ifndef TILE_BASE_CONFIG_LAYERED_CONFIGURATION_H +#define TILE_BASE_CONFIG_LAYERED_CONFIGURATION_H + +#pragma once + +#include "tile/base/config/configuration.h" +#include + +namespace tile { +namespace util { +class LayeredConfiguration : public Configuration { +public: + using Ptr = RefPtr; + LayeredConfiguration(); + LayeredConfiguration(const LayeredConfiguration &) = delete; + LayeredConfiguration &operator=(const LayeredConfiguration &) = delete; + + void Add(Configuration::Ptr cfg); + void Add(Configuration::Ptr cfg, int priority); + void Add(Configuration::Ptr cfg, const std::string &label); + void Add(Configuration::Ptr cfg, const std::string &label, int priority); + void Add(Configuration::Ptr cfg, const std::string &label, bool writeable); + void Add(Configuration::Ptr cfg, const std::string &label, int priority, + bool writeable); + void Add(Configuration::Ptr cfg, int priority, bool writeable); + void AddWriteable(Configuration::Ptr cfg, int priority); + Configuration::Ptr Find(const Slice &label) const; + void RemoveConfig(Configuration::Ptr cfg); + +protected: + struct ConfigItem { + Configuration::Ptr cfg; + // ... > -2 > -1 > 0 > 1 > 2 > 3 > 4 ... + int priority; + // can remove or set new? + bool writeable; + std::string label; + }; + + bool GetRaw(const Slice &key, std::string *value) const override; + bool SetRaw(const Slice &key, const Slice &value) override; + Configuration::Keys Enumerate(const Slice &key) const override; + void RemoveRaw(const std::string &key); + + int lowest() const; + int highest() const; + + ~LayeredConfiguration(); + +private: + using ConfigList = std::list; + ConfigList configs_; +}; +} // namespace util +} // namespace tile + +#endif // TILE_BASE_CONFIG_LAYERED_CONFIGURATION_H diff --git a/tile/base/configuration.h b/tile/base/configuration.h new file mode 100644 index 0000000..0a980a9 --- /dev/null +++ b/tile/base/configuration.h @@ -0,0 +1,11 @@ +#ifndef TILE_BASE_CONFIGURATION_H +#define TILE_BASE_CONFIGURATION_H + +#pragma once + +#include "tile/base/config/configurable.h" +#include "tile/base/config/configuration.h" +#include "tile/base/config/ini_file_configuration.h" +#include "tile/base/config/layered_configuration.h" + +#endif // TILE_BASE_CONFIGURATION_H diff --git a/tile/tile.h b/tile/tile.h index 45a6cfd..288a809 100644 --- a/tile/tile.h +++ b/tile/tile.h @@ -9,7 +9,6 @@ #include "tile/base/casting.h" #include "tile/base/chrono.h" #include "tile/base/compression.h" -#include "tile/base/config/ini_file_config.h" #include "tile/base/data.h" #include "tile/base/deferred.h" #include "tile/base/demangle.h" @@ -40,13 +39,12 @@ #include "tile/base/write_mostly.h" // util -#include "tile/util/config.h" -#include "tile/util/ini_file_config.h" +#include "tile/base/configuration.h" // init module #include "tile/init/override_flag.h" -#include "sigslot/signal.h" +#include "sigslot/sigslot.h" // Tile Init #include "mustache.hpp"