-
Notifications
You must be signed in to change notification settings - Fork 31
feat: add base config implementation #92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…lowing design ideas from Velox.
What about renaming the title to |
test/config_test.cc
Outdated
|
||
enum class TestEnum { VALUE1, VALUE2, VALUE3 }; | ||
|
||
std::string enumToString(const TestEnum& val) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
std::string enumToString(const TestEnum& val) { | |
std::string EnumToString(const TestEnum& val) { |
nit
test/config_test.cc
Outdated
} | ||
} | ||
|
||
TestEnum stringToEnum(const std::string& val) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TestEnum stringToEnum(const std::string& val) { | |
TestEnum StringToEnum(const std::string& val) { |
nit
test/config_test.cc
Outdated
template <typename T> | ||
using Entry = const ConfigBase<TestConfig>::Entry<T>; | ||
|
||
inline static const Entry<std::string> STRING_CONFIG{"string_config", "default_value"}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: maybe we should follow the k-prefix pattern for static const variables.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good @yingcai-cy Thanks for working on this. Thanks @wgtmac, @lidavidm and @zhjwpku for the review 🙌
introduce a new config class to manage configurable options following design ideas from Velox