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:
@ -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;
|
||||
};
|
||||
|
Reference in New Issue
Block a user