aboutsummaryrefslogtreecommitdiffstats
path: root/xmlserializer
diff options
context:
space:
mode:
authorPatrick Benavoli <patrickx.benavoli@intel.com>2011-08-31 11:23:24 +0200
committerDavid Wagner <david.wagner@intel.com>2014-02-10 17:13:21 +0100
commit6ba361d96bc2581667b3400f87ff89fae6449e1f (patch)
treee72e959d7d4c3b0f0b6dc20ec4f07d957eae1a50 /xmlserializer
parent68a912857707864bbaaff9808717813105072a6e (diff)
downloadexternal_parameter-framework-6ba361d96bc2581667b3400f87ff89fae6449e1f.zip
external_parameter-framework-6ba361d96bc2581667b3400f87ff89fae6449e1f.tar.gz
external_parameter-framework-6ba361d96bc2581667b3400f87ff89fae6449e1f.tar.bz2
parameter-framework: improvements and corrections
BZ: 6721 - Bug correction concerning selection criteria display (inclusive type) - Adapted XML format to allow for only on parameter to be associated to a domain - Removed unused files in parameter project Change-Id: I9f42d08ff8cb60354714fe3d6b0f0b321ad0a7bf Orig-Change-Id: I837e553070f5acf2d275082c986ba29433493e31 Signed-off-by: Patrick Benavoli <patrickx.benavoli@intel.com> Reviewed-on: http://android.intel.com:8080/16878 Reviewed-by: Mahe, Erwan <erwan.mahe@intel.com> Tested-by: Barthes, FabienX <fabienx.barthes@intel.com> Reviewed-by: buildbot <buildbot@intel.com> Tested-by: buildbot <buildbot@intel.com>
Diffstat (limited to 'xmlserializer')
-rw-r--r--xmlserializer/XmlElement.cpp14
-rw-r--r--xmlserializer/XmlElement.h1
2 files changed, 15 insertions, 0 deletions
diff --git a/xmlserializer/XmlElement.cpp b/xmlserializer/XmlElement.cpp
index cea7a1d..11b9a94 100644
--- a/xmlserializer/XmlElement.cpp
+++ b/xmlserializer/XmlElement.cpp
@@ -166,6 +166,20 @@ bool CXmlElement::getChildElement(const string& strType, const string& strNameAt
return false;
}
+uint32_t CXmlElement::getNbChildElements() const
+{
+ CXmlElement childElement;
+ uint32_t uiNbChildren = 0;
+
+ CChildIterator childIterator(*this);
+
+ while (childIterator.next(childElement)) {
+
+ uiNbChildren++;
+ }
+ return uiNbChildren;
+}
+
bool CXmlElement::getParentElement(CXmlElement& parentElement) const
{
_xmlNode* pXmlNode = _pXmlElement->parent;
diff --git a/xmlserializer/XmlElement.h b/xmlserializer/XmlElement.h
index 797179f..1028d60 100644
--- a/xmlserializer/XmlElement.h
+++ b/xmlserializer/XmlElement.h
@@ -64,6 +64,7 @@ public:
// Navigation
bool getChildElement(const string& strType, CXmlElement& childElement) const;
bool getChildElement(const string& strType, const string& strNameAttribute, CXmlElement& childElement) const;
+ uint32_t getNbChildElements() const;
bool getParentElement(CXmlElement& parentElement) const;
// Setters