Add a _LocalizedNumParser class and 4 static functions
authordahyeong.kim <dahyeong.kim@samsung.com>
Tue, 28 May 2013 07:01:58 +0000 (16:01 +0900)
committerdahyeong.kim <dahyeong.kim@samsung.com>
Tue, 28 May 2013 08:02:33 +0000 (17:02 +0900)
Change-Id: I46e35281e3c5a1e45a1c1543005913ea8daa305f
Signed-off-by: dahyeong.kim <dahyeong.kim@samsung.com>
src/base/CMakeLists.txt
src/base/FBaseDouble.cpp
src/base/FBaseFloat.cpp
src/base/FBase_LocalizedNumParser.cpp [new file with mode: 0644]
src/base/inc/FBase_LocalizedNumParser.h [new file with mode: 0644]

index 73468d0..bc9159b 100755 (executable)
@@ -32,6 +32,7 @@ SET (${this_target}_SOURCE_FILES
        FBaseLongComparer.cpp
        FBaseLongLong.cpp
        FBaseLongLongComparer.cpp
+       FBase_LocalizedNumParser.cpp
        FBaseObject.cpp
        FBaseResult.cpp
        FBaseShort.cpp
index 792c84b..e5795d7 100644 (file)
@@ -17,7 +17,7 @@
 /**
  * @file               FBaseDouble.cpp
  * @brief              This is the implementation file for Double class.
- * @see                        Number
+ * @see                Number
  */
 
 #include <cfloat>
@@ -28,8 +28,8 @@
 #include <limits.h>
 #include <FBaseDouble.h>
 #include <FBaseResult.h>
-#include "FBase_NativeError.h"
 #include <FBaseSysLog.h>
+#include "FBase_LocalizedNumParser.h"
 
 
 namespace Tizen { namespace Base
@@ -112,7 +112,7 @@ Double::CompareTo(const Double& value) const
 bool
 Double::Equals(const Object& obj) const
 {
-       const Double* pOther = dynamic_cast <const Double*>(&obj);
+       const Double* pOther = dynamic_cast< const Double* >(&obj);
 
        if (pOther == null)
        {
@@ -132,8 +132,8 @@ Double::Equals(const Object& obj) const
 int
 Double::GetHashCode(void) const
 {
-       double* pTemp = const_cast<double*> (&value);
-       int* pValueLow = reinterpret_cast<int*> (pTemp);
+       double* pTemp = const_cast< double* >(&value);
+       int* pValueLow = reinterpret_cast< int* >(pTemp);
        int* pValueHigh = pValueLow + 1;
        return *pValueLow + *pValueHigh;
 }
@@ -141,7 +141,7 @@ Double::GetHashCode(void) const
 int
 Double::GetHashCode(double val)
 {
-       int* pValueLow = reinterpret_cast<int*> (&val);
+       int* pValueLow = reinterpret_cast< int* >(&val);
        int* pValueHigh = pValueLow + 1;
        return *pValueLow + *pValueHigh;
 }
@@ -149,13 +149,14 @@ Double::GetHashCode(double val)
 result
 Double::Parse(const String& s, double& ret)
 {
-       wchar_t* pEnd = null;
-       errno = 0;
-       double tmpRet = wcstod(s.GetPointer(), &pEnd);
-       SysTryReturnResult(NID_BASE, ((!(!Double::Compare(tmpRet, 0)  && errno == EINVAL)) && (pEnd[0] == 0)), E_NUM_FORMAT,
-               "Double parse failed with reason (%s). Scan stopped at (%ls)", __ConvertNativeErrorToMessage(errno), pEnd);
-       SysTryReturnResult(NID_BASE, !(errno != 0 && (!Double::Compare(tmpRet, HUGE_VAL)|| !Double::Compare(tmpRet, -HUGE_VAL))),
-               E_NUM_FORMAT, "Parsed value cannot fit into a Double.");
+       double tmpRet = _LocalizedNumParser::ToDouble(s, "");
+
+       if (IsNaN(tmpRet))
+       {
+               result r = GetLastResult();
+               SysLogException(NID_BASE, r, "[%s] Propagating.", GetErrorMessage(r));
+               return r;
+       }
 
        ret = tmpRet;
        return E_SUCCESS;
@@ -164,37 +165,37 @@ Double::Parse(const String& s, double& ret)
 char
 Double::ToChar(void) const
 {
-       return static_cast<char> (value);
+       return static_cast< char >(value);
 }
 
 short
 Double::ToShort(void) const
 {
-       return static_cast<short> (value);
+       return static_cast< short >(value);
 }
 
 int
 Double::ToInt(void) const
 {
-       return static_cast<int> (value);
+       return static_cast< int >(value);
 }
 
 long
 Double::ToLong(void) const
 {
-       return static_cast<long> (value);
+       return static_cast< long >(value);
 }
 
 long long
 Double::ToLongLong(void) const
 {
-       return static_cast<long long> (value);
+       return static_cast< long long >(value);
 }
 
 float
 Double::ToFloat(void) const
 {
-       return static_cast<float> (value);
+       return static_cast< float >(value);
 }
 
 double
@@ -206,29 +207,13 @@ Double::ToDouble(void) const
 String
 Double::ToString(void) const
 {
-       return(Double::ToString(value));
+       return Double::ToString(value);
 }
 
 String
 Double::ToString(double value)
 {
-       const static unsigned int MAX_DIG = 17 + 3;
-       const static unsigned int DOUBLE_LENGTH_MAX = __DBL_MAX_10_EXP + MAX_DIG;
-
-       if (Double::IsNaN(value))
-       {
-               return String(L"NaN");
-       }
-       else if (Double::IsInfinity(value))
-       {
-               return String(L"Infinity");
-       }
-       else
-       {
-               wchar_t sValue[DOUBLE_LENGTH_MAX + 1] = {0, };
-               swprintf(sValue, (sizeof(sValue) / sizeof(sValue[0])), L"%#lg", value);
-               return String(sValue);
-       }
+       return _LocalizedNumParser::ToString(value, "");
 }
 
 long long
@@ -250,31 +235,31 @@ Double::ToDoubleFromBits(long long value)
 bool
 Double::IsFinite(double d)
 {
-       return((isfinite(d) != 0) ? true : false);
+       return isfinite(d);
 }
 
 bool
 Double::IsInfinity(void) const
 {
-       return(Double::IsInfinity(value));
+       return Double::IsInfinity(value);
 }
 
 bool
 Double::IsInfinity(double value)
 {
-       return(!Double::IsFinite(value));
+       return !Double::IsFinite(value);
 }
 
 bool
 Double::IsNaN(void) const
 {
-       return(Double::IsNaN(value));
+       return Double::IsNaN(value);
 }
 
 bool
 Double::IsNaN(double value)
 {
-       return((isnan(value) != 0) ? true : false);
+       return isnan(value);
 }
 
 double
index 9e94674..2279176 100644 (file)
@@ -17,7 +17,7 @@
 /**
  * @file               FBaseFloat.cpp
  * @brief              This is the implementation file for Float class.
- * @see                        Number class
+ * @see                Number class
  */
 
 // Includes
@@ -30,6 +30,7 @@
 #include <FBaseFloat.h>
 #include <FBaseResult.h>
 #include <FBaseSysLog.h>
+#include "FBase_LocalizedNumParser.h"
 
 namespace Tizen { namespace Base
 {
@@ -107,7 +108,7 @@ Float::CompareTo(const Float& value) const
 bool
 Float::Equals(const Object& obj) const
 {
-       const Float* pOther = dynamic_cast <const Float*>(&obj);
+       const Float* pOther = dynamic_cast< const Float* >(&obj);
 
        if (pOther == null)
        {
@@ -127,31 +128,29 @@ Float::Equals(const Object& obj) const
 int
 Float::GetHashCode(void) const
 {
-       float* pTemp = const_cast<float*> (&value);
-       int* pValue = reinterpret_cast<int*> (pTemp);
+       float* pTemp = const_cast< float* >(&value);
+       int* pValue = reinterpret_cast< int* >(pTemp);
        return *pValue;
 }
 
 int
 Float::GetHashCode(float val)
 {
-       int* pValue = reinterpret_cast<int*> (&val);
+       int* pValue = reinterpret_cast< int* >(&val);
        return *pValue;
 }
 
 result
 Float::Parse(const String& s, float& ret)
 {
-       SysTryReturn(NID_BASE, s.GetLength() >= 1, E_NUM_FORMAT, E_NUM_FORMAT,
-               "[%s] The length of s MUST be greater than 0.", GetErrorMessage(E_NUM_FORMAT));
+       double tmpRet = _LocalizedNumParser::ToFloat(s, "");
 
-       errno = 0;
-       wchar_t* pEnd = null;
-       float tmpRet = wcstof(s.GetPointer(), &pEnd);
-       SysTryReturn(NID_BASE, (!Float::Compare(pEnd[0], 0)), E_NUM_FORMAT, E_NUM_FORMAT,
-               "[%s] Float parse failed. Scan stopped at (%ls).", GetErrorMessage(E_NUM_FORMAT), pEnd);
-       SysTryReturn(NID_BASE, !((!Float::Compare(tmpRet, HUGE_VAL) || !Float::Compare(tmpRet, -HUGE_VAL)) && (errno != 0)),
-               E_NUM_FORMAT, E_NUM_FORMAT, "[%s] Parsed value cannot fit into a Float.", GetErrorMessage(E_NUM_FORMAT));
+       if (IsNaN(tmpRet))
+       {
+               result r = GetLastResult();
+               SysLogException(NID_BASE, r, "[%s] Propagating.", GetErrorMessage(r));
+               return r;
+       }
 
        ret = tmpRet;
        return E_SUCCESS;
@@ -160,31 +159,31 @@ Float::Parse(const String& s, float& ret)
 char
 Float::ToChar(void) const
 {
-       return static_cast<char> (value);
+       return static_cast< char >(value);
 }
 
 short
 Float::ToShort(void) const
 {
-       return  static_cast<short> (value);
+       return static_cast< short >(value);
 }
 
 int
 Float::ToInt(void) const
 {
-       return static_cast<int> (value);
+       return static_cast< int >(value);
 }
 
 long
 Float::ToLong(void) const
 {
-       return static_cast<long> (value);
+       return static_cast< long >(value);
 }
 
 long long
 Float::ToLongLong(void) const
 {
-       return static_cast<long long> (value);
+       return static_cast< long long >(value);
 }
 
 float
@@ -196,36 +195,19 @@ Float::ToFloat(void) const
 double
 Float::ToDouble(void) const
 {
-       return static_cast<double> (value);
+       return static_cast< double >(value);
 }
 
 String
 Float::ToString(void) const
 {
-       return(Float::ToString(value));
+       return Float::ToString(value);
 }
 
 String
 Float::ToString(float value)
 {
-       const static unsigned int MAX_DIG = 7 + 3;
-       const static unsigned int FLOAT_LENGTH_MAX = __DBL_MAX_10_EXP + MAX_DIG;
-
-       if (Float::IsNaN(value))
-       {
-               return String(L"NaN");
-       }
-       else if (Float::IsInfinity(value))
-       {
-               return String(L"Infinity");
-       }
-       else
-       {
-               wchar_t sValue[FLOAT_LENGTH_MAX + 1] = {0, };
-               swprintf(sValue, (sizeof(sValue) / sizeof(sValue[0])), L"%g", value);
-
-               return String(sValue);
-       }
+       return _LocalizedNumParser::ToString(value, "");
 }
 
 int
@@ -247,31 +229,31 @@ Float::ToFloatFromBits(int value)
 bool
 Float::IsFinite(float value)
 {
-       return((isfinite(value) != 0) ? true : false);
+       return isfinite(value);
 }
 
 bool
 Float::IsInfinity(void) const
 {
-       return(Float::IsInfinity(value));
+       return Float::IsInfinity(value);
 }
 
 bool
 Float::IsInfinity(float value)
 {
-       return(!Float::IsFinite(value));
+       return !Float::IsFinite(value);
 }
 
 bool
 Float::IsNaN(void) const
 {
-       return(Float::IsNaN(value));
+       return Float::IsNaN(value);
 }
 
 bool
 Float::IsNaN(float value)
 {
-       return((isnan(value) != 0) ? true : false);
+       return isnan(value);
 }
 
 float
diff --git a/src/base/FBase_LocalizedNumParser.cpp b/src/base/FBase_LocalizedNumParser.cpp
new file mode 100644 (file)
index 0000000..bdcf7ec
--- /dev/null
@@ -0,0 +1,156 @@
+//
+// Copyright (c) 2013 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file               FBase_LocalizedNumParser.cpp
+ * @brief              This is the implementation file for _LocalizedNumParser class.
+ */
+
+#include <cerrno>
+#include <clocale>
+#include <cmath>
+#include <cwchar>
+#include <limits>
+#include <FBaseSysLog.h>
+#include "FBase_LocalizedNumParser.h"
+
+namespace Tizen { namespace Base
+{
+
+class _CLocaleWrapper
+{
+public:
+       _CLocaleWrapper(void)
+               : _locale(0)
+       {
+       }
+
+       ~_CLocaleWrapper(void)
+       {
+               if (_locale != null)
+               {
+                       freelocale(_locale);
+                       uselocale(LC_GLOBAL_LOCALE);
+               }
+       }
+
+       result
+       Construct(const char* pLocale)
+       {
+               _locale = newlocale(LC_ALL, pLocale, null);
+               SysTryReturnResult(NID_BASE, _locale != null, E_INVALID_ARG, "Creating a new locale object is failed. pLocale is invalid.");
+
+               uselocale(_locale);
+               return E_SUCCESS;
+       }
+
+private:
+       locale_t _locale;
+};
+
+double
+_LocalizedNumParser::ToDouble(const String& str, const char* pLocale)
+{
+       ClearLastResult();
+
+       _CLocaleWrapper clocale;
+       result r = clocale.Construct(pLocale);
+       SysTryReturn(NID_BASE, r == E_SUCCESS, std::numeric_limits< double >::quiet_NaN(), r, "[%s] Propagating.", GetErrorMessage(r));
+
+       wchar_t* pEnd = null;
+       errno = 0;
+
+       double ret = wcstod(str.GetPointer(), &pEnd);
+       SysTryReturn(NID_BASE, !(ret == 0 && errno == EINVAL) && (pEnd[0] == 0), std::numeric_limits< double >::quiet_NaN(),
+               E_NUM_FORMAT, "[%s] wcstod() failed. Scan stopped at (%ls)", GetErrorMessage(E_NUM_FORMAT), pEnd);
+       SysTryReturn(NID_BASE, errno == 0 && ret != HUGE_VAL && ret != -HUGE_VAL, std::numeric_limits< double >::quiet_NaN(),
+               E_NUM_FORMAT, "[%s] Parsed value cannot fit into a Double.", GetErrorMessage(E_NUM_FORMAT));
+
+       return ret;
+}
+
+float
+_LocalizedNumParser::ToFloat(const String& str, const char* pLocale)
+{
+       ClearLastResult();
+
+       _CLocaleWrapper clocale;
+       result r = clocale.Construct(pLocale);
+       SysTryReturn(NID_BASE, r == E_SUCCESS, std::numeric_limits< float >::quiet_NaN(), r, "[%s] Propagating.", GetErrorMessage(r));
+
+       wchar_t* pEnd = null;
+       errno = 0;
+
+       float ret = wcstof(str.GetPointer(), &pEnd);
+       SysTryReturn(NID_BASE, !(ret == 0 && errno == EINVAL) && pEnd[0] == 0, std::numeric_limits< float >::quiet_NaN(),
+               E_NUM_FORMAT, "[%s] wcstof() failed. Scan stopped at (%ls).", GetErrorMessage(E_NUM_FORMAT), pEnd);
+       SysTryReturn(NID_BASE, errno == 0 && ret != HUGE_VAL && ret != -HUGE_VAL, std::numeric_limits< float >::quiet_NaN(),
+               E_NUM_FORMAT, "[%s] Parsed value cannot fit into a Float.", GetErrorMessage(E_NUM_FORMAT));
+
+       return ret;
+}
+
+String
+_LocalizedNumParser::ToString(double value, const char* pLocale)
+{
+       ClearLastResult();
+
+       if (std::isnan(value))
+       {
+               return String(L"NaN");
+       }
+
+       if (std::isinf(value))
+       {
+               return String(L"Infinity");
+       }
+
+       _CLocaleWrapper clocale;
+       result r = clocale.Construct(pLocale);
+       SysTryReturn(NID_BASE, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r));
+
+       wchar_t sValue[DBL_MAX_LENGTH + 1] = {0, };
+       swprintf(sValue, sizeof(sValue) / sizeof(sValue[0]), L"%#lg", value);
+
+       return String(sValue);
+}
+
+String
+_LocalizedNumParser::ToString(float value, const char* pLocale)
+{
+       ClearLastResult();
+
+       if (std::isnan(value))
+       {
+               return String(L"NaN");
+       }
+
+       if (std::isinf(value))
+       {
+               return String(L"Infinity");
+       }
+
+       _CLocaleWrapper clocale;
+       result r = clocale.Construct(pLocale);
+       SysTryReturn(NID_BASE, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r));
+
+       wchar_t sValue[FLOAT_LENGTH_MAX + 1] = {0, };
+       swprintf(sValue, sizeof(sValue) / sizeof(sValue[0]), L"%g", value);
+
+       return String(sValue);
+}
+
+}}     // Tizen::Base
diff --git a/src/base/inc/FBase_LocalizedNumParser.h b/src/base/inc/FBase_LocalizedNumParser.h
new file mode 100644 (file)
index 0000000..3dd5654
--- /dev/null
@@ -0,0 +1,169 @@
+//
+// Copyright (c) 2013 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file       FBase_LocalizedNumParser.h
+ * @brief      This is the header file for the %_LocalizedNumParser class.
+ *
+ * This header file contains the declarations of the %_LocalizedNumParser class.
+ */
+
+#ifndef _FBASE_INTERNAL_LOCALIZED_NUM_PARSER_H_
+#define _FBASE_INTERNAL_LOCALIZED_NUM_PARSER_H_
+
+#include <FBaseString.h>
+
+namespace Tizen { namespace Base
+{
+
+class _OSP_EXPORT_ _LocalizedNumParser
+{
+public:
+       /**
+        * Locale specifiable version of Double::Parse(). @n
+        * This method is affected by the specified @c pLocale.
+        *
+        * @since 2.1
+        *
+        * @return              The converted numeric value
+        * @param[in]   str                     A unicode representation of @c signed @c double value
+        * @param[in]   pLocale         A specific locale identifier. @n
+        *                                              The @c pLocale can have below values.
+        *                                              - "" : the system default locale
+        *                                              - "C" or "POSIX" : the POSIX locale
+        *                                              - "language[_territory][.codeset]" : an implementation-provided locale, e.g. "en_US.utf8", "fr_FR.utf8", etc.
+        * @exception   E_SUCCESS               The method is successful.
+        * @exception   E_NUM_FORMAT    The specified string does not contain a number that can be parsed.
+        * @exception   E_INVALID_ARG   The specified locale identifier is invalid.
+        * @remarks
+        *                              - When an error is occurred, this method returns Not-a-Number(NaN).
+        *                              - The behavior of this method is dependent on the specified locale setting.
+        *                              - The specific error code can be accessed using the GetLastResult() method.
+        */
+       static double ToDouble(const String& str, const char* pLocale);
+
+       /**
+        * Locale specifiable version of Float::Parse(). @n
+        * This method is affected by the specified @c pLocale.
+        *
+        * @since 2.1
+        *
+        * @return              The converted numeric value
+        * @param[in]   str                     A unicode representation of @c signed @c float value
+        * @param[in]   pLocale         A specific locale identifier. @n
+        *                                              The @c pLocale can have below values.
+        *                                              - "" : the system default locale
+        *                                              - "C" or "POSIX" : the POSIX locale
+        *                                              - "language[_territory][.codeset]" : an implementation-provided locale, e.g. "en_US.utf8", "fr_FR.utf8", etc.
+        * @exception   E_SUCCESS               The method is successful.
+        * @exception   E_NUM_FORMAT    The specified string does not contain a number that can be parsed.
+        * @exception   E_INVALID_ARG   The specified locale identifier is invalid.
+        * @remarks
+        *                              - When an error is occurred, this method returns Not-a-Number(NaN).
+        *                              - The behavior of this method is dependent on the specified locale setting.
+        *                              - The specific error code can be accessed using the GetLastResult() method.
+        */
+       static float ToFloat(const String& str, const char* pLocale);
+
+       /**
+        * Locale specifiable version of Double::ToString(). @n
+        * This method is affected by the specified @c pLocale.
+        *
+        * @since 2.1
+        *
+        * @return              A string containing a Unicode representation of the specified @c double value
+        * @param[in]   value           A @c double value to convert
+        * @param[in]   pLocale         A specific locale identifier. @n
+        *                                              The @c pLocale can have below values.
+        *                                              - "" : the system default locale
+        *                                              - "C" or "POSIX" : the POSIX locale
+        *                                              - "language[_territory][.codeset]" : an implementation-provided locale, e.g. "en_US.utf8", "fr_FR.utf8", etc.
+        * @exception   E_SUCCESS               The method is successful.
+        * @exception   E_INVALID_ARG   The specified locale identifier is invalid.
+        * @remarks
+        *                              - If the input value is Not-a-Number(NaN), the result is the string "NaN".
+        *                              Furthermore, infinity produces the result "Infinity". @n
+        *                              6 digits are given for the precision of this method. Use String::Format() to set the specific precision.
+        *                              - The behavior of this method is dependent on the specified locale setting.
+        *                              - The specific error code can be accessed using the GetLastResult() method.
+        */
+       static String ToString(double value, const char* pLocale);
+
+       /**
+        * Locale specifiable version of Float::ToString(). @n
+        * This method is affected by the specified @c pLocale.
+        *
+        * @since 2.1
+        *
+        * @return              A string containing a Unicode representation of the specified @c float value
+        * @param[in]   value           A @c float value to convert
+        * @param[in]   pLocale         A specific locale identifier. @n
+        *                                              The @c pLocale can have below values.
+        *                                              - "" : the system default locale
+        *                                              - "C" or "POSIX" : the POSIX locale
+        *                                              - "language[_territory][.codeset]" : an implementation-provided locale, e.g. "en_US.utf8", "fr_FR.utf8", etc.
+        * @exception   E_SUCCESS               The method is successful.
+        * @exception   E_INVALID_ARG   The specified locale identifier is invalid.
+        * @remarks
+        *                              - If the input value is Not-a-Number(NaN), the result is the string "NaN".
+        *                              Furthermore, infinity produces the result "Infinity". @n
+        *                              6 digits are given for the precision of this method. Use String::Format() to set the specific precision.
+        *                              - The behavior of this method is dependent on the specified locale setting.
+        *                              - The specific error code can be accessed using the GetLastResult() method.
+        */
+       static String ToString(float value, const char* pLocale);
+
+private:
+       //
+       // This default constructor is intentionally declared as private because this class is not constructible.
+       //
+       // @since               2.1
+       //
+       _LocalizedNumParser(void);
+
+       //
+       // This destructor is intentionally declared as private because this class is not constructible.
+       //
+       // @since               2.1
+       //
+       ~_LocalizedNumParser(void);
+
+       //
+       // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
+       //
+       // @since               2.1
+       //
+       // @param[in]   rhs             A reference to the %_LocalizedNumParser instance
+       //
+       _LocalizedNumParser(const _LocalizedNumParser& rhs);
+
+       //
+       // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
+       //
+       // @since               2.1
+       //
+       // @return              A reference to the %_LocalizedNumParser instance
+       // @param[in]   rhs             A reference to the %_LocalizedNumParser instance
+       //
+       _LocalizedNumParser& operator =(const _LocalizedNumParser& rhs);
+
+       static const int FLOAT_LENGTH_MAX = 7 + 38 + 3; // significant decimal digits + exponent + extra characters
+       static const int DBL_MAX_LENGTH = 17 + 308 + 3; // significant decimal digits + exponent + extra characters
+};
+
+}}     // Tizen::Base
+
+#endif // _FBASE_INTERNAL_LOCALIZED_NUM_PARSER_H_
\ No newline at end of file