diff options
| author | François Gaffie <francois.gaffie@intel.com> | 2016-02-17 10:58:44 +0100 |
|---|---|---|
| committer | Eric Laurent <elaurent@google.com> | 2016-03-04 17:42:09 -0800 |
| commit | 9368eea42a1afb01dd44110582f997115b50e742 (patch) | |
| tree | 5efc2015ec5d52fc32453ad5a1a82a3f4a6b4919 /parameter/InstanceConfigurableElement.cpp | |
| parent | 0efdadfc1eacc7271c8f854a8a610fdc2cc66102 (diff) | |
| download | platform_external_parameter-framework-9368eea42a1afb01dd44110582f997115b50e742.tar.gz platform_external_parameter-framework-9368eea42a1afb01dd44110582f997115b50e742.tar.bz2 platform_external_parameter-framework-9368eea42a1afb01dd44110582f997115b50e742.zip | |
parameter-framework: Drop of github upstream version v3.2.4
Main features are:
-Networking code may now be opted-out
(for android build: no socket opened for user build)
-Get rid of python prebuild for XML generation
Bug: 22887211
Change-Id: Ieee49b439f694f14ce48c23127d34622691397ef
Signed-off-by: François Gaffie <francois.gaffie@intel.com>
Signed-off-by: David Wagner <david.wagner@intel.com>
Diffstat (limited to 'parameter/InstanceConfigurableElement.cpp')
| -rw-r--r-- | parameter/InstanceConfigurableElement.cpp | 63 |
1 files changed, 31 insertions, 32 deletions
diff --git a/parameter/InstanceConfigurableElement.cpp b/parameter/InstanceConfigurableElement.cpp index b59cffd..f9afa20 100644 --- a/parameter/InstanceConfigurableElement.cpp +++ b/parameter/InstanceConfigurableElement.cpp @@ -35,9 +35,11 @@ #include "ParameterAccessContext.h" #include <assert.h> -#define base CConfigurableElementWithMapping +#define base CConfigurableElement -CInstanceConfigurableElement::CInstanceConfigurableElement(const std::string& strName, const CTypeElement* pTypeElement) : base(strName), _pTypeElement(pTypeElement), _pSyncer(NULL) +CInstanceConfigurableElement::CInstanceConfigurableElement(const std::string &strName, + const CTypeElement *pTypeElement) + : base(strName), _pTypeElement(pTypeElement) { } @@ -47,14 +49,21 @@ std::string CInstanceConfigurableElement::getKind() const return _pTypeElement->getKind(); } +std::string CInstanceConfigurableElement::getXmlElementName() const +{ + // Delegate + return _pTypeElement->getXmlElementName(); +} + // Type element -const CTypeElement* CInstanceConfigurableElement::getTypeElement() const +const CTypeElement *CInstanceConfigurableElement::getTypeElement() const { return _pTypeElement; } // Mapping -bool CInstanceConfigurableElement::getMappingData(const std::string& strKey, const std::string*& pStrValue) const +bool CInstanceConfigurableElement::getMappingData(const std::string &strKey, + const std::string *&pStrValue) const { // Delegate return getTypeElement()->getMappingData(strKey, pStrValue); @@ -67,7 +76,7 @@ std::string CInstanceConfigurableElement::getFormattedMapping() const return getTypeElement()->getFormattedMapping(); } -bool CInstanceConfigurableElement::map(IMapper& mapper, std::string& strError) +bool CInstanceConfigurableElement::map(IMapper &mapper, std::string &strError) { bool bHasMappingData = getTypeElement()->hasMappingData(); bool bKeepDiving = true; @@ -87,8 +96,8 @@ bool CInstanceConfigurableElement::map(IMapper& mapper, std::string& strError) 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)) { @@ -105,21 +114,8 @@ bool CInstanceConfigurableElement::map(IMapper& mapper, std::string& strError) return true; } -void CInstanceConfigurableElement::getListOfElementsWithMapping( - std::list<const CConfigurableElement*>& configurableElementPath) const -{ - const CTypeElement* pTypeElement = getTypeElement(); - - if (pTypeElement && pTypeElement->hasMappingData()) { - - configurableElementPath.push_back(this); - } - - base::getListOfElementsWithMapping(configurableElementPath); -} - // Element properties -void CInstanceConfigurableElement::showProperties(std::string& strResult) const +void CInstanceConfigurableElement::showProperties(std::string &strResult) const { base::showProperties(strResult); @@ -134,13 +130,13 @@ bool CInstanceConfigurableElement::isScalar() const } // Array Length -uint32_t CInstanceConfigurableElement::getArrayLength() const +size_t CInstanceConfigurableElement::getArrayLength() const { return _pTypeElement->getArrayLength(); } // Sync to HW -void CInstanceConfigurableElement::setSyncer(ISyncer* pSyncer) +void CInstanceConfigurableElement::setSyncer(ISyncer *pSyncer) { assert(!_pSyncer); @@ -153,7 +149,7 @@ void CInstanceConfigurableElement::unsetSyncer() } // Syncer -ISyncer* CInstanceConfigurableElement::getSyncer() const +ISyncer *CInstanceConfigurableElement::getSyncer() const { if (_pSyncer) { @@ -164,7 +160,7 @@ ISyncer* CInstanceConfigurableElement::getSyncer() const } // Syncer set (descendant) -void CInstanceConfigurableElement::fillSyncerSetFromDescendant(CSyncerSet& syncerSet) const +void CInstanceConfigurableElement::fillSyncerSetFromDescendant(CSyncerSet &syncerSet) const { if (_pSyncer) { @@ -175,7 +171,7 @@ void CInstanceConfigurableElement::fillSyncerSetFromDescendant(CSyncerSet& synce } } -bool CInstanceConfigurableElement::sync(CParameterAccessContext& parameterAccessContext) const +bool CInstanceConfigurableElement::sync(CParameterAccessContext ¶meterAccessContext) const { if (!parameterAccessContext.getAutoSync()) { @@ -183,11 +179,12 @@ bool CInstanceConfigurableElement::sync(CParameterAccessContext& parameterAccess // This is not an error, but the expected behavior so return true anyway. return true; } - ISyncer* pSyncer = getSyncer(); + ISyncer *pSyncer = getSyncer(); if (!pSyncer) { - parameterAccessContext.setError("Unable to synchronize modification. No Syncer object associated to configurable element:"); + parameterAccessContext.setError("Unable to synchronize modification. No Syncer object " + "associated to configurable element:"); return false; } @@ -203,9 +200,10 @@ bool CInstanceConfigurableElement::sync(CParameterAccessContext& parameterAccess } // Check parameter access path well formed for leaf elements -bool CInstanceConfigurableElement::checkPathExhausted(CPathNavigator& pathNavigator, CErrorContext& errorContext) +bool CInstanceConfigurableElement::checkPathExhausted(CPathNavigator &pathNavigator, + utility::ErrorContext &errorContext) { - std::string* pStrChildName = pathNavigator.next(); + std::string *pStrChildName = pathNavigator.next(); if (pStrChildName) { @@ -217,9 +215,10 @@ bool CInstanceConfigurableElement::checkPathExhausted(CPathNavigator& pathNaviga return true; } -void CInstanceConfigurableElement::toXml(CXmlElement &xmlElement, CXmlSerializingContext &serializingContext) const +void CInstanceConfigurableElement::structureToXml(CXmlElement &xmlElement, + CXmlSerializingContext &serializingContext) const { - base::toXml(xmlElement, serializingContext); + base::structureToXml(xmlElement, serializingContext); // Since Description belongs to the Type of Element, delegate it to the type element. getTypeElement()->setXmlDescriptionAttribute(xmlElement); } |
