summaryrefslogtreecommitdiffstats
path: root/include/astra/XMLNode.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/astra/XMLNode.h')
-rw-r--r--include/astra/XMLNode.h56
1 files changed, 27 insertions, 29 deletions
diff --git a/include/astra/XMLNode.h b/include/astra/XMLNode.h
index 5e1908a..de5a052 100644
--- a/include/astra/XMLNode.h
+++ b/include/astra/XMLNode.h
@@ -43,8 +43,6 @@ namespace rapidxml {
#include "Globals.h"
#include "Utilities.h"
-using namespace std;
-
namespace astra {
/**
@@ -73,14 +71,14 @@ public:
* @param _sName tagname of the requested child node
* @return first child node with the correct tagname, null pointer if it doesn't exist
*/
- XMLNode getSingleNode(string _sName) const;
+ XMLNode getSingleNode(std::string _sName) const;
/** Get all child XML nodes that have the tagname name
*
* @param _sName tagname of the requested child nodes
* @return list with all child nodes with the correct tagname
*/
- std::list<XMLNode> getNodes(string _sName) const;
+ std::list<XMLNode> getNodes(std::string _sName) const;
/** Get all child XML nodes
*
@@ -98,7 +96,7 @@ public:
*
* @return node content
*/
- string getContent() const;
+ std::string getContent() const;
/** Get the content of the XML node as an integer
*
@@ -122,15 +120,15 @@ public:
*
* @return node content
*/
- vector<string> getContentArray() const;
+ std::vector<std::string> getContentArray() const;
/** Get the content of the XML node as a stl container of float32 data.
* NB: A 2D matrix is returned as a linear list
*
* @return node content
*/
- vector<float32> getContentNumericalArray() const;
- vector<double> getContentNumericalArrayDouble() const;
+ std::vector<float32> getContentNumericalArray() const;
+ std::vector<double> getContentNumericalArrayDouble() const;
@@ -139,7 +137,7 @@ public:
* @param _sName of the attribute.
* @return attribute value, empty string if it doesn't exist.
*/
- bool hasAttribute(string _sName) const;
+ bool hasAttribute(std::string _sName) const;
/** Get the value of an attribute.
*
@@ -147,7 +145,7 @@ public:
* @param _sDefaultValue value to return if the attribute isn't found
* @return attribute value, _sDefaultValue if it doesn't exist.
*/
- string getAttribute(string _sName, string _sDefaultValue = "") const;
+ std::string getAttribute(std::string _sName, std::string _sDefaultValue = "") const;
/** Get the value of a numerical attribute.
*
@@ -155,9 +153,9 @@ public:
* @param _fDefaultValue value to return if the attribute isn't found
* @return attribute value, _fDefaultValue if it doesn't exist.
*/
- float32 getAttributeNumerical(string _sName, float32 _fDefaultValue = 0) const;
- double getAttributeNumericalDouble(string _sName, double _fDefaultValue = 0) const;
- int getAttributeInt(string _sName, int _fDefaultValue = 0) const;
+ float32 getAttributeNumerical(std::string _sName, float32 _fDefaultValue = 0) const;
+ double getAttributeNumericalDouble(std::string _sName, double _fDefaultValue = 0) const;
+ int getAttributeInt(std::string _sName, int _fDefaultValue = 0) const;
/** Get the value of a boolean attribute.
*
@@ -165,7 +163,7 @@ public:
* @param _bDefaultValue value to return if the attribute isn't found
* @return attribute value, _bDefaultValue if it doesn't exist.
*/
- bool getAttributeBool(string _sName, bool _bDefaultValue = false) const;
+ bool getAttributeBool(std::string _sName, bool _bDefaultValue = false) const;
@@ -175,7 +173,7 @@ public:
* @param _sKey option key
* @return true if option does exist
*/
- bool hasOption(string _sKey) const;
+ bool hasOption(std::string _sKey) const;
/** Get the value of an option within this XML Node
*
@@ -183,7 +181,7 @@ public:
* @param _sDefaultValue value to return if key isn't found
* @return option value, _sDefaultValue if the option doesn't exist
*/
- string getOption(string _sKey, string _sDefaultValue = "") const;
+ std::string getOption(std::string _sKey, std::string _sDefaultValue = "") const;
/** Get the value of an option within this XML Node
*
@@ -191,8 +189,8 @@ public:
* @param _fDefaultValue value to return if key isn't found
* @return option value, _fDefaultValue if the option doesn't exist
*/
- float32 getOptionNumerical(string _sKey, float32 _fDefaultValue = 0) const;
- int getOptionInt(string _sKey, int _fDefaultValue = 0) const;
+ float32 getOptionNumerical(std::string _sKey, float32 _fDefaultValue = 0) const;
+ int getOptionInt(std::string _sKey, int _fDefaultValue = 0) const;
/** Get the value of an option within this XML Node
*
@@ -200,14 +198,14 @@ public:
* @param _bDefaultValue value to return if key isn't found
* @return option value, _bDefaultValue if the option doesn't exist
*/
- bool getOptionBool(string _sKey, bool _bDefaultValue = false) const;
+ bool getOptionBool(std::string _sKey, bool _bDefaultValue = false) const;
/** Get the value of an option within this XML Node
*
* @param _sKey option key
* @return numerical array
*/
- vector<float32> getOptionNumericalArray(string _sKey) const;
+ std::vector<float32> getOptionNumericalArray(std::string _sKey) const;
@@ -218,7 +216,7 @@ public:
* @param _sNodeName the name of the new childnode
* @return new child node
*/
- XMLNode addChildNode(string _sNodeName);
+ XMLNode addChildNode(std::string _sNodeName);
/** Create a new XML node as a child to this one, also add some content:
* &lt;...&gt;&lt;_sNodeName&gt;_sValue&lt;/_sNodeName>&lt;/...&gt;
@@ -227,7 +225,7 @@ public:
* @param _sValue some node content
* @return new child node
*/
- XMLNode addChildNode(string _sNodeName, string _sValue);
+ XMLNode addChildNode(std::string _sNodeName, std::string _sValue);
/** Create a new XML node as a child to this one, also add some numerical content:
* &lt;...&gt;&lt;_sNodeName&gt;_sValue&lt;/_sNodeName>&lt;/...&gt;
@@ -236,7 +234,7 @@ public:
* @param _fValue some node content
* @return new child node
*/
- XMLNode addChildNode(string _sNodeName, float32 _fValue);
+ XMLNode addChildNode(std::string _sNodeName, float32 _fValue);
/** Create a new XML node as a child to this one, also add a list of numerical content:
* &lt;...&gt;&lt;_sNodeName&gt;_sValue&lt;/_sNodeName>&lt;/...&gt;
@@ -246,13 +244,13 @@ public:
* @param _iSize number of elements in _pfList
* @return new child node
*/
- XMLNode addChildNode(string _sNodeName, float32* _pfList, int _iSize);
+ XMLNode addChildNode(std::string _sNodeName, float32* _pfList, int _iSize);
/** Add some text to the node: &lt;...&gt;_sText&lt;/...&gt;
*
* @param _sText text to insert
*/
- void setContent(string _sText);
+ void setContent(std::string _sText);
/** Add a number to the node: &lt;...&gt;_sText&lt;/...&gt;
*
@@ -297,28 +295,28 @@ public:
* @param _sName name of the attribute
* @param _sValue value of the attribute
*/
- void addAttribute(string _sName, string _sValue);
+ void addAttribute(std::string _sName, std::string _sValue);
/** Add an attribute with numerical data to this node: &lt;... _sName="_fValue"&gt;
*
* @param _sName name of the attribute
* @param _sValue value of the attribute
*/
- void addAttribute(string _sName, float32 _fValue);
+ void addAttribute(std::string _sName, float32 _fValue);
/** Add an option node as a child: &lt;Option key="&lt;_sKey&gt;" value="&lt;_sValue&gt;"/>
*
* @param _sKey option key
* @param _sValue option value
*/
- void addOption(string _sKey, string _sValue);
+ void addOption(std::string _sKey, std::string _sValue);
/** Add an option node as a child: &lt;Option key="&lt;_sKey&gt;" value="&lt;_sValue&gt;"/>
*
* @param _sKey option key
* @param _sValue option value
*/
- void addOption(string _sKey, float32 _fValue);
+ void addOption(std::string _sKey, float32 _fValue);
/** Print to String