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/ConfigurableDomain.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/ConfigurableDomain.h')
-rw-r--r-- | parameter/ConfigurableDomain.h | 38 |
1 files changed, 35 insertions, 3 deletions
diff --git a/parameter/ConfigurableDomain.h b/parameter/ConfigurableDomain.h index a7cbf73..084c187 100644 --- a/parameter/ConfigurableDomain.h +++ b/parameter/ConfigurableDomain.h @@ -30,6 +30,8 @@ #pragma once #include "BinarySerializableElement.h" +#include "XmlSerializingContext.h" +#include "XmlDomainImportContext.h" #include "SyncerSet.h" #include <list> #include <set> @@ -154,9 +156,39 @@ private: void doRemoveConfigurableElement(CConfigurableElement* pConfigurableElement, bool bRecomputeSyncSet); // XML parsing - bool parseDomainConfigurations(const CXmlElement& xmlElement, CXmlSerializingContext& serializingContext); - bool parseConfigurableElements(const CXmlElement& xmlElement, CXmlSerializingContext& serializingContext); - bool parseSettings(const CXmlElement& xmlElement, CXmlSerializingContext& serializingContext); + /** + * Deserialize domain configurations from an Xml document and add them to + * the domain. + * + * @param[in] xmlElement the XML element to be parsed + * @param[in] serializingContext context for the deserialization + * + * @return false if an error occurs, true otherwise. + */ + bool parseDomainConfigurations(const CXmlElement& xmlElement, + CXmlDomainImportContext& serializingContext); + /** + * Deserialize domain elements from an Xml document and add them to + * the domain. + * + * @param[in] xmlElement the XML element to be parsed + * @param[in] serializingContext context for the deserialization + * + * @return false if an error occurs, true otherwise. + */ + bool parseConfigurableElements(const CXmlElement& xmlElement, + CXmlDomainImportContext& serializingContext); + /** + * Deserialize settings from an Xml document and add them to + * the domain. + * + * @param[in] xmlElement the XML element to be parsed + * @param[in] xmlDomainImportContext context for the deserialization + * + * @return false if an error occurs, true otherwise. + */ + bool parseSettings(const CXmlElement& xmlElement, + CXmlDomainImportContext& serializingContext); // XML composing void composeDomainConfigurations(CXmlElement& xmlElement, CXmlSerializingContext& serializingContext) const; |