From d9526499d6ab53b7d13d1434f748f6f2161c2e0a Mon Sep 17 00:00:00 2001 From: Sebastien Gonzalve Date: Thu, 20 Feb 2014 22:28:03 +0100 Subject: Remove using std::XXX from headers This is a bad practice to have using in headers because it pollutes the namespace of any user of that header. --- xmlserializer/XmlElement.h | 42 ++++++++++++++++++++---------------------- 1 file changed, 20 insertions(+), 22 deletions(-) (limited to 'xmlserializer/XmlElement.h') diff --git a/xmlserializer/XmlElement.h b/xmlserializer/XmlElement.h index aff9e4c..9c5ca0e 100644 --- a/xmlserializer/XmlElement.h +++ b/xmlserializer/XmlElement.h @@ -32,8 +32,6 @@ #include #include -using namespace std; - struct _xmlNode; struct _xmlDoc; @@ -48,34 +46,34 @@ public: void setXmlElement(_xmlNode* pXmlElement); // Getters - string getType() const; - string getPath() const; - string getNameAttribute() const; - bool hasAttribute(const string& strAttributeName) const; - bool getAttributeBoolean(const string& strAttributeName, const string& strTrueValue) const; - bool getAttributeBoolean(const string& strAttributeName) const; - string getAttributeString(const string& strAttributeName) const; - uint32_t getAttributeInteger(const string& strAttributeName) const; - int32_t getAttributeSignedInteger(const string& strAttributeName) const; - double getAttributeDouble(const string& strAttributeName) const; - string getTextContent() const; + std::string getType() const; + std::string getPath() const; + std::string getNameAttribute() const; + bool hasAttribute(const std::string& strAttributeName) const; + bool getAttributeBoolean(const std::string& strAttributeName, const std::string& strTrueValue) const; + bool getAttributeBoolean(const std::string& strAttributeName) const; + std::string getAttributeString(const std::string& strAttributeName) const; + uint32_t getAttributeInteger(const std::string& strAttributeName) const; + int32_t getAttributeSignedInteger(const std::string& strAttributeName) const; + double getAttributeDouble(const std::string& strAttributeName) const; + std::string getTextContent() const; // Navigation - bool getChildElement(const string& strType, CXmlElement& childElement) const; - bool getChildElement(const string& strType, const string& strNameAttribute, CXmlElement& childElement) const; + bool getChildElement(const std::string& strType, CXmlElement& childElement) const; + bool getChildElement(const std::string& strType, const std::string& strNameAttribute, CXmlElement& childElement) const; uint32_t getNbChildElements() const; bool getParentElement(CXmlElement& parentElement) const; // Setters - void setAttributeBoolean(const string& strAttributeName, bool bValue); - void setAttributeString(const string& strAttributeName, const string& strValue); - void setNameAttribute(const string& strValue); - void setTextContent(const string& strContent); - void setComment(const string& strComment); - void setAttributeInteger(const string& strAttributeName, uint32_t uiValue); + void setAttributeBoolean(const std::string& strAttributeName, bool bValue); + void setAttributeString(const std::string& strAttributeName, const std::string& strValue); + void setNameAttribute(const std::string& strValue); + void setTextContent(const std::string& strContent); + void setComment(const std::string& strComment); + void setAttributeInteger(const std::string& strAttributeName, uint32_t uiValue); // Child creation - void createChild(CXmlElement& childElement, const string& strType); + void createChild(CXmlElement& childElement, const std::string& strType); public: // Child iteration -- cgit v1.1