diff options
author | Patrick Benavoli <patrick.benavoli@intel.com> | 2014-07-08 14:09:09 +0200 |
---|---|---|
committer | Philippe Afonso <philippex.afonso@intel.com> | 2015-02-18 11:13:26 +0100 |
commit | 0548523ab6bbca766dcce4be97a0c50efd529d90 (patch) | |
tree | 4df756d6875dc1a0afc7835c3a16fb69b451c1da /xmlserializer | |
parent | 79694d5d0a632ed4ca04ea42f19fb09c3fba0cdb (diff) | |
download | external_parameter-framework-0548523ab6bbca766dcce4be97a0c50efd529d90.zip external_parameter-framework-0548523ab6bbca766dcce4be97a0c50efd529d90.tar.gz external_parameter-framework-0548523ab6bbca766dcce4be97a0c50efd529d90.tar.bz2 |
Adding XML format to Criteria export tuning I/F
BZ: 209937
The "listCriteria" command returns the list of criteria in a human readable
way. However, external tools that require to know this list of criteria have
trouble parsing this output. An XML output would solve the issue.
Changed "listCriteria" command to accept "XML" as first and only argument.
In the end, listCriteria command accepts the 3 following forms:
- listCriteria => will list the criteria states and type content in a human
readable format
- listCriteria csv|CSV => will list the criteria states and type content in a
CSV format
- listCriteria xml|XML => will list the criteria states and type content in an
XML format
Removed python binding accordingly.
Change-Id: Ib060ec0a5d1ff87ba6c25caf4e0d5839a7927715
Signed-off-by: Patrick Benavoli <patrick.benavoli@intel.com>
Signed-off-by: Sebastien Gonzalve <sebastien.gonzalve@intel.com>
Diffstat (limited to 'xmlserializer')
-rw-r--r-- | xmlserializer/XmlElement.cpp | 7 | ||||
-rw-r--r-- | xmlserializer/XmlElement.h | 8 |
2 files changed, 15 insertions, 0 deletions
diff --git a/xmlserializer/XmlElement.cpp b/xmlserializer/XmlElement.cpp index 106bfdc..d45f360 100644 --- a/xmlserializer/XmlElement.cpp +++ b/xmlserializer/XmlElement.cpp @@ -221,6 +221,13 @@ void CXmlElement::setAttributeInteger(const string& strAttributeName, uint32_t u setAttributeString(strAttributeName, strStream.str()); } +void CXmlElement::setAttributeSignedInteger(const string& strAttributeName, int32_t iValue) +{ + ostringstream strStream; + strStream << iValue; + setAttributeString(strAttributeName, strStream.str()); +} + void CXmlElement::setNameAttribute(const string& strValue) { setAttributeString("Name", strValue); diff --git a/xmlserializer/XmlElement.h b/xmlserializer/XmlElement.h index 9c5ca0e..7c1d518 100644 --- a/xmlserializer/XmlElement.h +++ b/xmlserializer/XmlElement.h @@ -71,6 +71,14 @@ public: void setTextContent(const std::string& strContent); void setComment(const std::string& strComment); void setAttributeInteger(const std::string& strAttributeName, uint32_t uiValue); + /** + * Set attribute with signed integer + * + * @param[in] strAttributeName The attribute name + * @param[in] iValue The attribute value + * + */ + void setAttributeSignedInteger(const std::string& strAttributeName, int32_t iValue); // Child creation void createChild(CXmlElement& childElement, const std::string& strType); |