Add IPC sync result for SerialPort::Write()
[platform/framework/native/appfw.git] / inc / FBaseFloat.h
index b10d4e0..82b7abb 100644 (file)
@@ -27,6 +27,7 @@
 
 #include <FBaseNumber.h>
 
+
 namespace Tizen { namespace Base
 {
 /**
@@ -200,7 +201,7 @@ public:
        static result Parse(const String& s, float& ret);
 
        /**
-        *      Gets the @c signed @c char equivalent of the current instance of the %Float class.
+        *      Gets the @c signed @c char equivalent of the current %Float instance.
         *
         *      @since          2.0
         *
@@ -209,7 +210,7 @@ public:
        virtual char ToChar(void) const;
 
        /**
-        *      Gets the @c signed @c short equivalent of the current instance of the %Float class.
+        *      Gets the @c signed @c short equivalent of the current %Float instance.
         *
         *      @since          2.0
         *
@@ -218,7 +219,7 @@ public:
        virtual short ToShort(void) const;
 
        /**
-        *      Gets the @c signed @c int equivalent of the current instance of the %Float class.
+        *      Gets the @c signed @c int equivalent of the current %Float instance.
         *
         *      @since          2.0
         *
@@ -227,7 +228,7 @@ public:
        virtual int ToInt(void) const;
 
        /**
-        *      Gets the @c signed @c long equivalent of the current instance of the %Float class.
+        *      Gets the @c signed @c long equivalent of the current %Float instance.
         *
         *      @since          2.0
         *
@@ -236,7 +237,7 @@ public:
        virtual long ToLong(void) const;
 
        /**
-        * Gets the @c signed @c long @c long equivalent of the current instance of the %Float class.
+        * Gets the @c signed @c long @c long equivalent of the current %Float instance.
         *
         * @since               2.0
         *
@@ -245,7 +246,7 @@ public:
        virtual long long ToLongLong(void) const;
 
        /**
-        *      Gets the @c signed @c float equivalent of the current instance of the %Float class.
+        *      Gets the @c signed @c float equivalent of the current %Float instance.
         *
         *      @since          2.0
         *
@@ -254,7 +255,7 @@ public:
        virtual float ToFloat(void) const;
 
        /**
-        *      Gets the @c signed @c double equivalent of the current instance of the %Float class.
+        *      Gets the @c signed @c double equivalent of the current %Float instance.
         *
         *      @since          2.0
         *
@@ -263,20 +264,45 @@ public:
        virtual double ToDouble(void) const;
 
        /**
-        * Gets the string representing the value of the current instance of %Float.
+        * Gets the string representing the value of the current %Float instance.
         *
         * @since                       2.0
         *
-        * @return              A string containing a Unicode representation of the value of the current instance
+        * @return              A string containing a Unicode representation of the value of the current instance value
         * @remarks
         *                              - If the 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.
+        *                              6 digits are given for the precision of this method. Use Float::ToString(int precision) to set the specific precision.
         *                              - The behavior of this method is dependent on the system default locale setting.
         */
        virtual String ToString(void) const;
 
        /**
+        * Gets the string representing the value of the current %Float instance.
+        *
+        * @since 3.0
+        *
+        * @param[in]   precision       Number of digits after a decimal separator
+        * @return              A string containing a Unicode representation of the value of the current instance value
+        * @remarks
+        *                              - If the value of the current instance is Not-a-Number (NaN), the result is the string "NaN". Furthermore, infinity
+        *                              produces the result "Infinity". @n
+        *                              - The behavior of this method is dependent on the system default locale setting.
+         *
+        * @code
+        *
+        *      Float flt(3.1416);
+        *      String str1 = flt.ToString(3);
+        *      // str1 contains "3.142"
+        *
+        *      String str2 = flt.ToString(2);
+        *      // str2 contains "3.14"
+        *
+        * @endcode
+        */
+       virtual String ToString(int precision) const;
+
+       /**
         *      Gets the string representing the specified @c float value.
         *
         *      @since          2.0
@@ -286,12 +312,38 @@ public:
         *  @remarks
         *                              - If the 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.
+        *                              6 digits are given for the precision of this method. Use Float::ToString(float value, int precision) to set the specific precision.
         *                              - The behavior of this method is dependent on the system default locale setting.
         */
        static String ToString(float value);
 
        /**
+        * Gets the string representing the specified @c float value.
+        *
+        * @since               3.0
+        *
+        * @return              A string containing a Unicode representation of the specified @c float value
+        * @param[in]   value   A @c float value to convert
+        * @param[in]   precision       Number of digits after a decimal separator
+        * @remarks
+        *                              - If the value is Not-a-Number (NaN), the result is the string "NaN". Furthermore, infinity
+        *                              produces the result "Infinity". @n
+        *                              - The behavior of this method is dependent on the system default locale setting.
+        *
+        * @code
+        *
+        *      String str1 = Float::ToString(3.1416f, 3);
+        *      // str1 contains "3.142"
+        *
+        *      String str2 = Float::ToString(3.1416f, 2);
+        *      // str2 contains "3.14"
+        *
+        * @endcode
+        */
+       static String ToString(float value, int precision);
+
+
+       /**
         *      Gets the IEEE 754 floating-point "single format" bit layout representation of the specified @c float value.
         *
         *      @since          2.0