diff options
author | Kevin Rocard <kevinx.rocard@intel.com> | 2013-01-28 17:02:08 +0100 |
---|---|---|
committer | David Wagner <david.wagner@intel.com> | 2014-02-12 17:03:49 +0100 |
commit | 084cafba76fa5c987cdffeaaa7401202473554cb (patch) | |
tree | 0d389569389cfcd6b76aaa49fa65968578c7fdcf /parameter/InstanceConfigurableElement.cpp | |
parent | db43cf055f954efbaa50157637a034511eed2849 (diff) | |
download | external_parameter-framework-084cafba76fa5c987cdffeaaa7401202473554cb.zip external_parameter-framework-084cafba76fa5c987cdffeaaa7401202473554cb.tar.gz external_parameter-framework-084cafba76fa5c987cdffeaaa7401202473554cb.tar.bz2 |
PFW: Parameter bloc can handle any mapping depth
BZ: 85878
Needed for subsystem object definition enhancement.
In a PFW structure file, if a parameter bloc is defined in another
parameter bloc with context mapping only (no instanciable mapping),
the PFW will no longer stop diving on the first parameter bloc.
Change-Id: If4f704f01e20eb348d931c0baab1b85936fc75a4
Signed-off-by: Kevin Rocard <kevinx.rocard@intel.com>
Reviewed-on: http://android.intel.com:8080/88959
Reviewed-by: Dixon, CharlesX <charlesx.dixon@intel.com>
Tested-by: Dixon, CharlesX <charlesx.dixon@intel.com>
Reviewed-by: Boisnard, FredericX <fredericx.boisnard@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
Diffstat (limited to 'parameter/InstanceConfigurableElement.cpp')
-rw-r--r-- | parameter/InstanceConfigurableElement.cpp | 33 |
1 files changed, 14 insertions, 19 deletions
diff --git a/parameter/InstanceConfigurableElement.cpp b/parameter/InstanceConfigurableElement.cpp index 6795f8b..4a6cacc 100644 --- a/parameter/InstanceConfigurableElement.cpp +++ b/parameter/InstanceConfigurableElement.cpp @@ -58,34 +58,29 @@ bool CInstanceConfigurableElement::getMappingData(const string& strKey, const st bool CInstanceConfigurableElement::map(IMapper& mapper, string& strError) { bool bHasMappingData = getTypeElement()->hasMappingData(); + bool bKeepDiving = true; // Begin - if (bHasMappingData) { - - bool bKeepDiving; - - if (!mapper.mapBegin(this, bKeepDiving, strError)) { - - return false; - } - // Go on through children? - if (!bKeepDiving) { + if (bHasMappingData && !mapper.mapBegin(this, bKeepDiving, strError)) { - return true; - } + return false; } - // Map children - uint32_t uiNbChildren = getNbChildren(); - uint32_t uiChild; + // Go on through children? + if (bKeepDiving) { + + // Map children + uint32_t uiNbChildren = getNbChildren(); + uint32_t uiChild; - for (uiChild = 0; uiChild < uiNbChildren; uiChild++) { + for (uiChild = 0; uiChild < uiNbChildren; uiChild++) { - CInstanceConfigurableElement* pInstanceConfigurableChildElement = static_cast<CInstanceConfigurableElement*>(getChild(uiChild)); + CInstanceConfigurableElement* pInstanceConfigurableChildElement = static_cast<CInstanceConfigurableElement*>(getChild(uiChild)); - if (!pInstanceConfigurableChildElement->map(mapper, strError)) { + if (!pInstanceConfigurableChildElement->map(mapper, strError)) { - return false; + return false; + } } } |