diff options
author | Sebastien Gonzalve <oznog@zarb.org> | 2014-02-20 22:28:03 +0100 |
---|---|---|
committer | David Wagner <david.wagner@intel.com> | 2014-09-11 14:25:02 +0200 |
commit | d9526499d6ab53b7d13d1434f748f6f2161c2e0a (patch) | |
tree | 8d2e2db275800821d4bf8873fc16b686bca60b2d /parameter/ParameterType.h | |
parent | ffbf43b383bb8693741430b02c24dbc9b127f7f7 (diff) | |
download | external_parameter-framework-d9526499d6ab53b7d13d1434f748f6f2161c2e0a.zip external_parameter-framework-d9526499d6ab53b7d13d1434f748f6f2161c2e0a.tar.gz external_parameter-framework-d9526499d6ab53b7d13d1434f748f6f2161c2e0a.tar.bz2 |
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.
Diffstat (limited to 'parameter/ParameterType.h')
-rwxr-xr-x | parameter/ParameterType.h | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/parameter/ParameterType.h b/parameter/ParameterType.h index 35cfad7..7d7caf7 100755 --- a/parameter/ParameterType.h +++ b/parameter/ParameterType.h @@ -34,28 +34,30 @@ #include "TypeElement.h" +#include <string> + class CParameterAccessContext; class CConfigurationAccessContext; class CParameterType : public CTypeElement { public: - CParameterType(const string& strName); + CParameterType(const std::string& strName); virtual ~CParameterType(); // Size uint32_t getSize() const; // Unit - string getUnit() const; + std::string getUnit() const; // From IXmlSink virtual bool fromXml(const CXmlElement& xmlElement, CXmlSerializingContext& serializingContext); /// Conversions // String - virtual bool toBlackboard(const string& strValue, uint32_t& uiValue, CParameterAccessContext& parameterAccessContext) const = 0; - virtual bool fromBlackboard(string& strValue, const uint32_t& uiValue, CParameterAccessContext& parameterAccessContext) const = 0; + virtual bool toBlackboard(const std::string& strValue, uint32_t& uiValue, CParameterAccessContext& parameterAccessContext) const = 0; + virtual bool fromBlackboard(std::string& strValue, const uint32_t& uiValue, CParameterAccessContext& parameterAccessContext) const = 0; // Boolean virtual bool toBlackboard(bool bUserValue, uint32_t& uiValue, CParameterAccessContext& parameterAccessContext) const; virtual bool fromBlackboard(bool& bUserValue, uint32_t uiValue, CParameterAccessContext& parameterAccessContext) const; @@ -74,7 +76,7 @@ public: virtual void handleValueSpaceAttribute(CXmlElement& xmlConfigurableElementSettingsElement, CConfigurationAccessContext& configurationAccessContext) const; // Element properties - virtual void showProperties(string& strResult) const; + virtual void showProperties(std::string& strResult) const; // Default value handling (simulation only) virtual uint32_t getDefaultValue() const; @@ -111,8 +113,8 @@ protected: type getMaxValue() const { return getSize() < sizeof(type) ? - (static_cast<type>(1) << (getSize() * numeric_limits<unsigned char>::digits - 1)) - 1 : - numeric_limits<type>::max(); + (static_cast<type>(1) << (getSize() * std::numeric_limits<unsigned char>::digits - 1)) - 1 : + std::numeric_limits<type>::max(); } private: @@ -127,5 +129,5 @@ private: // Size in bytes uint32_t _uiSize; // Unit - string _strUnit; + std::string _strUnit; }; |