diff options
author | David Wagner <david.wagner@intel.com> | 2014-12-19 11:15:02 +0100 |
---|---|---|
committer | David Wagner <david.wagner@intel.com> | 2015-01-22 11:53:52 +0100 |
commit | 29fa61fc5bc02f72f99e66ad50e4de8cb6b8490b (patch) | |
tree | 5786f9d76eae3a29eb7f22a0727921979e53c8bb /parameter/XmlDomainSerializingContext.h | |
parent | c39e7f4bbad04e92b53054b61b3f3deaa98ccd61 (diff) | |
download | external_parameter-framework-29fa61fc5bc02f72f99e66ad50e4de8cb6b8490b.zip external_parameter-framework-29fa61fc5bc02f72f99e66ad50e4de8cb6b8490b.tar.gz external_parameter-framework-29fa61fc5bc02f72f99e66ad50e4de8cb6b8490b.tar.bz2 |
Extract and specialize domain import- and export-specific contexts
Import and Export of ConfigurableDomains have different context needs: e.g. the
value representation is only used for export; auto-validation is only
meaningful for import whereas the "with settings" context is common to both.
We create two new classes, derived from XmlDomainSerializingContext and move
most of its content to each class it belongs to.
Change-Id: I56589cdb3a8ea417e11d2ed98ccd055d7cdead67
Signed-off-by: David Wagner <david.wagner@intel.com>
Diffstat (limited to 'parameter/XmlDomainSerializingContext.h')
-rw-r--r-- | parameter/XmlDomainSerializingContext.h | 36 |
1 files changed, 8 insertions, 28 deletions
diff --git a/parameter/XmlDomainSerializingContext.h b/parameter/XmlDomainSerializingContext.h index 88d2b5f..955d939 100644 --- a/parameter/XmlDomainSerializingContext.h +++ b/parameter/XmlDomainSerializingContext.h @@ -33,41 +33,21 @@ #include <string> -class CParameterBlackboard; -class CSelectionCriteriaDefinition; - class CXmlDomainSerializingContext : public CXmlElementSerializingContext { public: - CXmlDomainSerializingContext(std::string& strError, bool bWithSettings); + CXmlDomainSerializingContext(std::string& strError, bool bWithSettings): + base(strError), _bWithSettings(bWithSettings) {} // Settings to be serialized or not - bool withSettings() const; - - // Value interpretation as Real or Raw - void setValueSpaceRaw(bool bIsRaw); - bool valueSpaceIsRaw() const; - - // Output Raw Format for user get value interpretation - void setOutputRawFormat(bool bIsHex); - bool outputRawFormatIsHex(); + bool withSettings() const + { + return _bWithSettings; + } - // Criteria defintion - void setSelectionCriteriaDefinition(const CSelectionCriteriaDefinition* pSelectionCriteriaDefinition); - const CSelectionCriteriaDefinition* getSelectionCriteriaDefinition() const; - - // Auto validation of configurations - void setAutoValidationRequired(bool bAutoValidationRequired); - bool autoValidationRequired() const; private: + typedef CXmlElementSerializingContext base; + // Indicate wheter or not to import settings bool _bWithSettings; - // Value Space - bool _bValueSpaceIsRaw; - // Output Raw Format - bool _bOutputRawFormatIsHex; - // Criteria defintion - const CSelectionCriteriaDefinition* _pSelectionCriteriaDefinition; - // Auto validation of configurations - bool _bAutoValidationRequired; }; |