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>
diff --git a/parameter/Element.cpp b/parameter/Element.cpp
index 8cc6783..7b892b0 100644
--- a/parameter/Element.cpp
+++ b/parameter/Element.cpp
@@ -300,6 +300,7 @@
}
}
+// Hierarchy
void CElement::addChild(CElement* pChild)
{
_childArray.push_back(pChild);
@@ -366,11 +367,17 @@
string CElement::listQualifiedPaths(bool bDive, uint32_t uiLevel) const
{
- string strResult = getQualifiedPath() + "\n";
+ uint32_t uiNbChildren = getNbChildren();
+ string strResult;
+
+ // Dive Will cause only leaf nodes to be printed
+ if (!bDive || !uiNbChildren) {
+
+ strResult = getQualifiedPath() + "\n";
+ }
if (bDive || !uiLevel) {
// Get list of children paths
- uint32_t uiNbChildren = getNbChildren();
uint32_t uiChild;
for (uiChild = 0; uiChild < uiNbChildren; uiChild++) {
@@ -385,8 +392,6 @@
void CElement::listChildrenPaths(string& strChildList) const
{
- strChildList = "\n";
-
// Get list of children paths
uint32_t uiNbChildren = getNbChildren();
uint32_t uiChild;
@@ -647,3 +652,16 @@
return uiChecksum;
}
+// Utility to underline
+void CElement::appendTitle(string& strTo, const string& strTitle)
+{
+ strTo += "\n" + strTitle + "\n";
+
+ uint32_t uiLength = strTitle.size();
+
+ while (uiLength--) {
+
+ strTo += "─";
+ }
+ strTo += "\n";
+}