feat(config): Inheritance
Add support for basic inheritance. The parser will look for `inherit = base/section` and copy all undefined values from the base section. Ref #84
This commit is contained in:
parent
4f76d917f8
commit
0c6937edae
2 changed files with 44 additions and 0 deletions
include/components
|
@ -24,9 +24,12 @@ DEFINE_ERROR(key_error);
|
|||
|
||||
class config {
|
||||
public:
|
||||
static constexpr const char* KEY_INHERIT{"inherit"};
|
||||
|
||||
explicit config(const logger& logger, const xresource_manager& xrm) : m_logger(logger), m_xrm(xrm) {}
|
||||
|
||||
void load(string file, string barname);
|
||||
void copy_inherited();
|
||||
string filepath() const;
|
||||
string bar_section() const;
|
||||
vector<string> defined_bars() const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue