summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore3
-rw-r--r--parameter/InstanceConfigurableElement.cpp9
-rw-r--r--parameter/Mapper.h2
-rw-r--r--parameter/Subsystem.cpp33
-rw-r--r--parameter/Subsystem.h2
-rw-r--r--xmlparser-test/Android.mk2
-rw-r--r--xmlserializer/Android.mk3
7 files changed, 34 insertions, 20 deletions
diff --git a/.gitignore b/.gitignore
index a3f55cc..b8a77d7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
*.win
-*.layout \ No newline at end of file
+*.layout
+*.user
diff --git a/parameter/InstanceConfigurableElement.cpp b/parameter/InstanceConfigurableElement.cpp
index f35be87..6d6526e 100644
--- a/parameter/InstanceConfigurableElement.cpp
+++ b/parameter/InstanceConfigurableElement.cpp
@@ -68,10 +68,17 @@ bool CInstanceConfigurableElement::map(IMapper& mapper, string& strError)
// Begin
if (bHasMappingData) {
- if (!mapper.mapBegin(this, strError)) {
+ bool bKeepDiving;
+
+ if (!mapper.mapBegin(this, bKeepDiving, strError)) {
return false;
}
+ // Go on through children?
+ if (!bKeepDiving) {
+
+ return true;
+ }
}
// Map children
diff --git a/parameter/Mapper.h b/parameter/Mapper.h
index 4f32ca8..ab5f488 100644
--- a/parameter/Mapper.h
+++ b/parameter/Mapper.h
@@ -39,6 +39,6 @@ class CInstanceConfigurableElement;
class IMapper
{
public:
- virtual bool mapBegin(CInstanceConfigurableElement* pInstanceConfigurableElement, string& strError) = 0;
+ virtual bool mapBegin(CInstanceConfigurableElement* pInstanceConfigurableElement, bool& bKeepDiving, string& strError) = 0;
virtual void mapEnd() = 0;
};
diff --git a/parameter/Subsystem.cpp b/parameter/Subsystem.cpp
index 7fb4bed..e17a80d 100644
--- a/parameter/Subsystem.cpp
+++ b/parameter/Subsystem.cpp
@@ -249,7 +249,7 @@ bool CSubsystem::handleSubsystemObjectCreation(CInstanceConfigurableElement* pIn
if (pInstanceConfigurableElement->getMappingData(strKey, pStrValue)) {
- // First check context consistensy (required ancestors must have been set prior to object creation)
+ // First check context consistency (required ancestors must have been set prior to object creation)
uint32_t uiAncestorKey;
uint32_t uiAncestorMask = pSubsystemObjectCreator->getAncestorMask();
@@ -271,7 +271,7 @@ bool CSubsystem::handleSubsystemObjectCreation(CInstanceConfigurableElement* pIn
// Then check configurable element size is correct
if (pInstanceConfigurableElement->getFootPrint() > pSubsystemObjectCreator->getMaxConfigurableElementSize()) {
- string strSizeError = "Size should not exceed " + pInstanceConfigurableElement->getFootprintAsString();
+ string strSizeError = "Size should not exceed " + pSubsystemObjectCreator->getMaxConfigurableElementSize();
getMappingError(strError, strKey, strSizeError, pInstanceConfigurableElement);
@@ -293,11 +293,11 @@ bool CSubsystem::handleSubsystemObjectCreation(CInstanceConfigurableElement* pIn
// Generic error handling from derived subsystem classes
void CSubsystem::getMappingError(string& strError, const string& strKey, const string& strMessage, const CInstanceConfigurableElement* pInstanceConfigurableElement)
{
- strError = getName() + " " + getKind() + " mapping:\n" + strKey + " error : \"" + strMessage + "\" for element " + pInstanceConfigurableElement->getPath();
+ strError = getName() + " " + getKind() + " mapping:\n" + strKey + " error: \"" + strMessage + "\" for element " + pInstanceConfigurableElement->getPath();
}
// From IMapper
-bool CSubsystem::mapBegin(CInstanceConfigurableElement* pInstanceConfigurableElement, string& strError)
+bool CSubsystem::mapBegin(CInstanceConfigurableElement* pInstanceConfigurableElement, bool& bKeepDiving, string& strError)
{
// Get current context
CMappingContext context = _contextStack.top();
@@ -310,27 +310,34 @@ bool CSubsystem::mapBegin(CInstanceConfigurableElement* pInstanceConfigurableEle
return false;
}
- break;
+
+ // Push context
+ _contextStack.push(context);
+
+ // Keep diving
+ bKeepDiving = true;
+
+ return true;
+
case CInstanceConfigurableElement::EParameterBlock:
case CInstanceConfigurableElement::EBitParameterBlock:
case CInstanceConfigurableElement::EParameter:
case CInstanceConfigurableElement::EStringParameter:
- {
+
if (!handleSubsystemObjectCreation(pInstanceConfigurableElement, context, strError)) {
return false;
}
- break;
- }
+
+ // Done
+ bKeepDiving = false;
+
+ return true;
+
default:
assert(0);
return false;
}
-
- // Push context
- _contextStack.push(context);
-
- return true;
}
void CSubsystem::mapEnd()
diff --git a/parameter/Subsystem.h b/parameter/Subsystem.h
index f0ddc57..12f6ed0 100644
--- a/parameter/Subsystem.h
+++ b/parameter/Subsystem.h
@@ -84,7 +84,7 @@ private:
void getMappingError(string& strError, const string& strKey, const string& strMessage, const CInstanceConfigurableElement* pInstanceConfigurableElement);
// From IMapper
- virtual bool mapBegin(CInstanceConfigurableElement* pInstanceConfigurableElement, string& strError);
+ virtual bool mapBegin(CInstanceConfigurableElement* pInstanceConfigurableElement, bool& bKeepDiving, string& strError);
virtual void mapEnd();
// Mapping generic context handling
diff --git a/xmlparser-test/Android.mk b/xmlparser-test/Android.mk
index ea1172d..ccb867d 100644
--- a/xmlparser-test/Android.mk
+++ b/xmlparser-test/Android.mk
@@ -18,7 +18,7 @@ TARGET_ERROR_FLAGS += -Wno-non-virtual-dtor
LOCAL_C_INCLUDES += \
external/stlport/stlport/ \
external/libxml2/include/ \
- external/webkit/WebCore/icu/ \
+ external/webkit/Source/WebCore/icu/ \
bionic/libstdc++ \
bionic/
diff --git a/xmlserializer/Android.mk b/xmlserializer/Android.mk
index e45f1b1..7aa4e74 100644
--- a/xmlserializer/Android.mk
+++ b/xmlserializer/Android.mk
@@ -22,9 +22,8 @@ LOCAL_C_INCLUDES +=
LOCAL_C_INCLUDES += \
external/stlport/stlport/ \
external/libxml2/include/ \
- external/webkit/WebCore/icu/ \
+ external/webkit/Source/WebCore/icu/ \
bionic/libstdc++ \
- external/icu4c/common \
bionic/
LOCAL_C_INCLUDES +=