[PFW] Add getFormattedMapping for InstanceConfigurableElements
BZ: 99822
The mapping data need to be printed, however helper methods are
missing to achieve this easily.
This patch aims to add a new method "getFormattedMapping()" for
CMappingData, allowing to format the mapping data as a string.
Change-Id: Ia030c6b88905fcb7591ad45339712051eb88d1c1
Signed-off-by: Frederic Boisnard <fredericx.boisnard@intel.com>
Reviewed-on: http://android.intel.com:8080/109301
Reviewed-by: Benavoli, Patrick <patrick.benavoli@intel.com>
Reviewed-by: De Chivre, Renaud <renaud.de.chivre@intel.com>
Reviewed-by: Rocard, KevinX <kevinx.rocard@intel.com>
Reviewed-by: Denneulin, Guillaume <guillaume.denneulin@intel.com>
Tested-by: Barthes, FabienX <fabienx.barthes@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
diff --git a/parameter/ComponentInstance.cpp b/parameter/ComponentInstance.cpp
index 83e7448..4ffdab9 100644
--- a/parameter/ComponentInstance.cpp
+++ b/parameter/ComponentInstance.cpp
@@ -56,6 +56,18 @@
return base::hasMappingData() || (_pComponentType && _pComponentType->hasMappingData());
}
+string CComponentInstance::getFormattedMapping() const
+{
+ // Try myself first then associated component type
+ string strValue = base::getFormattedMapping();
+ if (_pComponentType) {
+
+ strValue += _pComponentType->getFormattedMapping();
+ }
+
+ return strValue;
+}
+
bool CComponentInstance::fromXml(const CXmlElement& xmlElement, CXmlSerializingContext& serializingContext)
{
// Context