fixed GH# 189: Poco::NumberParser::tryParse() documentation bug

This commit is contained in:
Guenter Obiltschnig 2013-05-24 20:21:54 +02:00
parent 6f48b4469e
commit ab85e7077f

View File

@ -66,6 +66,7 @@ public:
static bool tryParse(const std::string& s, int& value, char thousandSeparator = ','); static bool tryParse(const std::string& s, int& value, char thousandSeparator = ',');
/// Parses an integer value in decimal notation from the given string. /// Parses an integer value in decimal notation from the given string.
/// Returns true if a valid integer has been found, false otherwise. /// 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 = ','); static unsigned parseUnsigned(const std::string& s, char thousandSeparator = ',');
/// Parses an unsigned integer value in decimal notation from the given string. /// 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 = ','); static bool tryParseUnsigned(const std::string& s, unsigned& value, char thousandSeparator = ',');
/// Parses an unsigned integer value in decimal notation from the given string. /// Parses an unsigned integer value in decimal notation from the given string.
/// Returns true if a valid integer has been found, false otherwise. /// 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); static unsigned parseHex(const std::string& s);
/// Parses an integer value in hexadecimal notation from the given string. /// 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); static bool tryParseHex(const std::string& s, unsigned& value);
/// Parses an unsigned integer value in hexadecimal notation from the given string. /// Parses an unsigned integer value in hexadecimal notation from the given string.
/// Returns true if a valid integer has been found, false otherwise. /// 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); static unsigned parseOct(const std::string& s);
/// Parses an integer value in octal notation from the given string. /// 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); static bool tryParseOct(const std::string& s, unsigned& value);
/// Parses an unsigned integer value in octal notation from the given string. /// Parses an unsigned integer value in octal notation from the given string.
/// Returns true if a valid integer has been found, false otherwise. /// Returns true if a valid integer has been found, false otherwise.
/// If parsing was not successful, value is undefined.
#if defined(POCO_HAVE_INT64) #if defined(POCO_HAVE_INT64)
@ -102,6 +106,7 @@ public:
static bool tryParse64(const std::string& s, Int64& value, char thousandSeparator = ','); static bool tryParse64(const std::string& s, Int64& value, char thousandSeparator = ',');
/// Parses a 64-bit integer value in decimal notation from the given string. /// Parses a 64-bit integer value in decimal notation from the given string.
/// Returns true if a valid integer has been found, false otherwise. /// 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 = ','); static UInt64 parseUnsigned64(const std::string& s, char thousandSeparator = ',');
/// Parses an unsigned 64-bit integer value in decimal notation from the given string. /// 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 = ','); 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. /// 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. /// 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); static UInt64 parseHex64(const std::string& s);
/// Parses a 64 bit-integer value in hexadecimal notation from the given string. /// 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); static bool tryParseHex64(const std::string& s, UInt64& value);
/// Parses an unsigned 64-bit integer value in hexadecimal notation from the given string. /// 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. /// 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); static UInt64 parseOct64(const std::string& s);
/// Parses a 64 bit-integer value in octal notation from the given string. /// 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); static bool tryParseOct64(const std::string& s, UInt64& value);
/// Parses an unsigned 64-bit integer value in octal notation from the given string. /// 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. /// Returns true if a valid integer has been found, false otherwise.
/// If parsing was not successful, value is undefined.
#endif // defined(POCO_HAVE_INT64) #endif // defined(POCO_HAVE_INT64)
@ -140,6 +148,7 @@ public:
/// from the given string. /// from the given string.
/// Returns true if a valid floating point number has been found, /// Returns true if a valid floating point number has been found,
/// false otherwise. /// false otherwise.
/// If parsing was not successful, value is undefined.
static bool parseBool(const std::string& s); static bool parseBool(const std::string& s);
/// Parses a bool value in decimal or string notation /// Parses a bool value in decimal or string notation
@ -155,6 +164,7 @@ public:
/// String forms are NOT case sensitive. /// String forms are NOT case sensitive.
/// Returns true if a valid bool number has been found, /// Returns true if a valid bool number has been found,
/// false otherwise. /// false otherwise.
/// If parsing was not successful, value is undefined.
}; };