MXS-2556 Make config::Configuration aware of its object

The name of the object (i.e. the section name from the configuration
file), is now stored in the configuration object for that object.

That way, more contextual and hence morfe user friendly errors and
warnings can be generated.
This commit is contained in:
Johan Wikman
2019-06-11 11:05:15 +03:00
parent df5377f135
commit 04fdaf1fdb
11 changed files with 37 additions and 20 deletions

View File

@ -815,9 +815,15 @@ public:
/**
* Constructor
*
* @param name The object (i.e. section name) of this configuration.
* @param pSpecification The specification this instance is a configuration of.
*/
Configuration(const Specification* pSpecification);
Configuration(const std::string& name, const Specification* pSpecification);
/**
* @return The The object (i.e. section name) of this configuration.
*/
const std::string& name() const;
/**
* @return The specification of this configuration.
@ -880,6 +886,7 @@ private:
void remove(Type* pValue);
private:
std::string m_name;
const Specification& m_specification;
ValuesByName m_values;
};