From ab85e7077f2ccad8f9b716e01ad78b2ef5ef50d0 Mon Sep 17 00:00:00 2001 From: Guenter Obiltschnig Date: Fri, 24 May 2013 20:21:54 +0200 Subject: [PATCH] fixed GH# 189: Poco::NumberParser::tryParse() documentation bug --- Foundation/include/Poco/NumberParser.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Foundation/include/Poco/NumberParser.h b/Foundation/include/Poco/NumberParser.h index 0bac5e24e..f003a50c2 100644 --- a/Foundation/include/Poco/NumberParser.h +++ b/Foundation/include/Poco/NumberParser.h @@ -66,6 +66,7 @@ public: static bool tryParse(const std::string& s, int& value, char thousandSeparator = ','); /// Parses an integer value in decimal notation from the given string. /// Returns true if a valid integer has been found, false otherwise. + /// If parsing was not successful, value is undefined. static unsigned parseUnsigned(const std::string& s, char thousandSeparator = ','); /// Parses an unsigned integer value in decimal notation from the given string. @@ -74,6 +75,7 @@ public: static bool tryParseUnsigned(const std::string& s, unsigned& value, char thousandSeparator = ','); /// Parses an unsigned integer value in decimal notation from the given string. /// Returns true if a valid integer has been found, false otherwise. + /// If parsing was not successful, value is undefined. static unsigned parseHex(const std::string& s); /// Parses an integer value in hexadecimal notation from the given string. @@ -83,6 +85,7 @@ public: static bool tryParseHex(const std::string& s, unsigned& value); /// Parses an unsigned integer value in hexadecimal notation from the given string. /// Returns true if a valid integer has been found, false otherwise. + /// If parsing was not successful, value is undefined. static unsigned parseOct(const std::string& s); /// Parses an integer value in octal notation from the given string. @@ -92,6 +95,7 @@ public: static bool tryParseOct(const std::string& s, unsigned& value); /// Parses an unsigned integer value in octal notation from the given string. /// Returns true if a valid integer has been found, false otherwise. + /// If parsing was not successful, value is undefined. #if defined(POCO_HAVE_INT64) @@ -102,6 +106,7 @@ public: static bool tryParse64(const std::string& s, Int64& value, char thousandSeparator = ','); /// Parses a 64-bit integer value in decimal notation from the given string. /// Returns true if a valid integer has been found, false otherwise. + /// If parsing was not successful, value is undefined. static UInt64 parseUnsigned64(const std::string& s, char thousandSeparator = ','); /// Parses an unsigned 64-bit integer value in decimal notation from the given string. @@ -110,6 +115,7 @@ public: static bool tryParseUnsigned64(const std::string& s, UInt64& value, char thousandSeparator = ','); /// Parses an unsigned 64-bit integer value in decimal notation from the given string. /// Returns true if a valid integer has been found, false otherwise. + /// If parsing was not successful, value is undefined. static UInt64 parseHex64(const std::string& s); /// Parses a 64 bit-integer value in hexadecimal notation from the given string. @@ -118,6 +124,7 @@ public: static bool tryParseHex64(const std::string& s, UInt64& value); /// Parses an unsigned 64-bit integer value in hexadecimal notation from the given string. /// Returns true if a valid integer has been found, false otherwise. + /// If parsing was not successful, value is undefined. static UInt64 parseOct64(const std::string& s); /// Parses a 64 bit-integer value in octal notation from the given string. @@ -126,6 +133,7 @@ public: static bool tryParseOct64(const std::string& s, UInt64& value); /// Parses an unsigned 64-bit integer value in octal notation from the given string. /// Returns true if a valid integer has been found, false otherwise. + /// If parsing was not successful, value is undefined. #endif // defined(POCO_HAVE_INT64) @@ -140,6 +148,7 @@ public: /// from the given string. /// Returns true if a valid floating point number has been found, /// false otherwise. + /// If parsing was not successful, value is undefined. static bool parseBool(const std::string& s); /// Parses a bool value in decimal or string notation @@ -155,6 +164,7 @@ public: /// String forms are NOT case sensitive. /// Returns true if a valid bool number has been found, /// false otherwise. + /// If parsing was not successful, value is undefined. };