Add IPC sync result for SerialPort::Write()
[platform/framework/native/appfw.git] / inc / FBaseShort.h
index 25f0fd4..d97191a 100644 (file)
@@ -18,9 +18,9 @@
  * @file               FBaseShort.h
  * @brief              This is the header file for the %Short class.
  *
- * This header file contains the declarations of the %Short class.
+ * @see                        Number()
  *
- * @see                        Number
+ * This header file contains the declarations of the %Short class.
  */
 #ifndef _FBASE_SHORT_H_
 #define _FBASE_SHORT_H_
@@ -82,7 +82,7 @@ public:
         *
         *      @since 2.0
         *
-        *      @param[in]      value   The @c short value
+        *      @param[in]      value   A @c short value
         */
        Short(short value = 0);
 
@@ -91,7 +91,7 @@ public:
         *
         *      @since 2.0
         *
-        *      @param[in]      value   An instance of %Short to copy
+        *      @param[in]      value   An instance of %Short
         */
        Short(const Short& value);
 
@@ -116,31 +116,31 @@ public:
         *
         *      @since 2.0
         *
-        *      @return The 32-bit @c signed @c integer value
+        *      @return A 32-bit @c signed @c integer value
         *      @param[in]      s1      The first @c short value to compare
         *      @param[in]      s2      The second @c short value to compare
         *
         *      @code
-        *      <  0  if s1 is less than s2
-        *      == 0  if s1 is equal to s2
-        *      >  0  if s1 is greater than s2
+        *      <  0  if @c s1 is less than @c s2
+        *      == 0  if @c s1 is equal to @c s2
+        *      >  0  if @c s1 is greater than @c s2
         *      @endcode
         */
        static int Compare(short s1, short s2);
 
        /**
-        *      Compares the value of the current instance of %Short
-        *      with the value of the specified instance of %Short.
+        *      Compares the value of the current instance of the %Short class
+        *      with the value of the specified instance of the %Short class.
         *
         *      @since 2.0
         *
-        *      @return         The @c signed 32-bit @c integer value
-        *      @param[in]      value An instance of %Short to compare
+        *      @return A @c signed 32-bit @c integer value
+        *      @param[in]      value An instance of the %Short class to compare
         *
         *      @code
-        *      <  0  if the value of the current instance is less than the specified instance
-        *      == 0  if the value of the current instance is equal to the specified instance
-        *      >  0  if the value of the current instance is greater than the specified instance
+        *      <  0  if the value of the current instance is less than that of the specified instance
+        *      == 0  if the value of the current instance is equal to that of the specified instance
+        *      >  0  if the value of the current instance is greater than that of the specified instance
         *      @endcode
         */
        int CompareTo(const Short& value) const;
@@ -152,7 +152,7 @@ public:
         *
         *      @return         @c true if the value of the specified instance of Object is equal to the value of the current instance of %Short, @n
         *                              else @c false
-        *      @param[in]      obj     An instance of Object to compare
+        *      @param[in]      obj An instance of Object to compare
         *      @remarks        The method returns @c false if the specified object is not of the
         *                              type @c short.
         *      @see            Tizen::Base::Object::Equals()
@@ -167,7 +167,7 @@ public:
         *
         *      @return         @c true if the value of the current instance is equal to the specified @c short value, @n
         *                              else @c false
-        *      @param[in]      value   The @c short value to compare
+        *      @param[in]      value   A @c short value to compare
         */
        bool Equals(short value) const;
 
@@ -176,21 +176,20 @@ public:
         *
         *      @since 2.0
         *
-        *      @return         The integer value that indicates the hash value of the current instance of %Short
-        *      @remarks        
-        *                              - Two equal instances must return the same hash value. @n
-        *                              For better performance, the used hash function must generate a random distribution for all the inputs. @n
-        *                              - The default implementation of this method returns the value of the current instance.
+        *      @return         An integer value indicating the hash value of the current instance of %Short
+        *      @remarks        Two equal instances must return the same hash value. For better performance,
+        *                              the used hash function must generate a random distribution for all inputs. @n
+        *                              The default implementation of this method returns the value of the current instance.
         */
        virtual int GetHashCode(void) const;
 
        /**
-       *  Gets the hash value of the specified @c short value.
+       *        Gets the hash value of the specified @c short value.
        *
-       *  @since 2.0
+       *        @since 2.0
        *
-       *  @return      The integer value that indicates the hash value of the specified @c short value
-       *  @param[in]   val   The @c short value used to get the hash value
+       *        @return        An integer value indicating the hash value of the specified @c short value
+       *        @param[in]   val   A @c short value to get the hash value
        */
        static int GetHashCode(short val);
 
@@ -199,12 +198,16 @@ public:
         *
         *      @since 2.0
         *
-        *      @return         An error code
-        *      @param[in]      s                               The numeric value
-        *      @param[out]     ret                             The result of the operation
+        *      @return                 An error code
+        *      @param[in]      s        A numeric value
+        *      @param[out]     ret     The result of the operation
         *      @exception      E_SUCCESS               The method is successful.
         *      @exception      E_NUM_FORMAT    The specified string does not contain a number that can be parsed.
-        *      @remarks        This method accepts decimal, hexadecimal, and octal numbers given by the
+        *      @exception      E_OUT_OF_RANGE  The decoded value is not between VALUE_MIN and VALUE_MAX range.
+        *
+        *      @remarks        
+        *                      - This method guarantees that the original value of out-parameter is not changed when the method returns error.
+        *                      - This method accepts decimal, hexadecimal, and octal numbers given by the
         *                              following grammar:
         *
         *      @code
@@ -221,138 +224,157 @@ public:
        static result Decode(const String& s, short& ret);
 
        /**
-        *      Parses the specified string that represents a numeric value and
+        *      Parses the specified string representing a numeric value and
         *      returns the value as @c signed @c short.
         *
         *      @since 2.0
         *
-        *      @return         An error code
-        *      @param[in]      s                               The string that represents the numeric value
+        *      @return                 An error code
+        *      @param[in]      s                               A string representing a numeric value
         *      @param[out]     ret                             The result of the operation
         *      @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_OUT_OF_RANGE  The parsed value is not between VALUE_MIN and VALUE_MAX range.
+        *
         *      @remarks
-        *                              - This method assumes that the string that represents the numeric value that uses a radix @c 10.
-        *                              - This method guarantees that the original value of the out-parameter is not changed when the method returns an error.
+        *                              - This method assumes that the string representing the numeric value uses a radix 10.
+        *                              - This method guarantees that the original value of out-parameter is not changed when the method returns error.
         */
        static result Parse(const String& s, short& ret);
 
        /**
-        *      Parses the specified string that represents a numeric value
+        *      Parses the specified string representing a numeric value
         *      using the specified radix and returns the value as @c signed @c short.
         *
         *      @since 2.0
         *
         *      @return         An error code
-        *      @param[in]      s                               The string that represents the numeric value
-        *      @param[in]      radix                   The radix of the string that represents the numeric value @n
-        *                                                              It must either be 2, 8, 10, or 16.
+        *      @param[in]      s               A string representing a numeric value
+        *      @param[in]      radix           The radix of the string representing a numeric value @n
+        *                                      Radix value range is from 2 to 36.
         *      @param[out]     ret                             The result of the operation
         *      @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_OUT_OF_RANGE The specified @c radix is invalid.
-        *      @remarks        This method guarantees that the original value of the out-parameter is not changed when the method returns an error.
+        *      @exception      E_OUT_OF_RANGE  The specified @c radix is invalid or
+        *                                      The parsed value is not between VALUE_MIN and VALUE_MAX range.
+        *
+        *      @remarks        This method guarantees that the original value of out-parameter is not changed when the method returns error.
         */
        static result Parse(const String& s, int radix, short& ret);
 
        /**
-        *      Gets the @c signed @c char equivalent of the current instance of %Short.
+        *      Gets the @c char equivalent of the current instance of the %Short class.
         *
         *      @since 2.0
+        *      @brief  <i> [Deprecated] </i>
+        *
+        *      @deprecated     This method has portability issue.
+        *                      Return value may not be @c signed @c char since char is treated as unsigned char in ARM architecture. @n
+        *                      Use ToInt8() method to get @c int8_t
         *
-        *      @return The @c signed @c char equivalent of the current instance
+        *      @return A @c char equivalent of the current instance
         */
        virtual char ToChar(void) const;
 
        /**
-        *      Gets the @c signed @c short equivalent of the current instance of %Short.
+        *      Gets the @c int8_t equivalent of the current instance of %Short.
         *
-        *      @since 2.0
+        *      @since 3.0
+        *
+        *      @return The @c int8_t equivalent of the current instance
         *
-        *      @return The @c signed @c short equivalent of the current instance
         */
-       virtual short ToShort(void) const;
+       virtual int8_t ToInt8(void) const;
 
        /**
-        *      Gets the @c signed @c int equivalent of the current instance of %Short.
+        *      Gets the @c signed @c short equivalent of the current instance of the %Short class.
         *
         *      @since 2.0
         *
-        *      @return The @c signed @c int equivalent of the current instance
+        *      @return A @c signed @c short equivalent of the current instance
         */
-       virtual int ToInt(void) const;
+       virtual short ToShort(void) const;
 
        /**
-        *      Gets the @c signed @c long equivalent of the current instance of %Short.
+        *      Gets the @c signed @c int equivalent of the current instance of the %Short class.
         *
         *      @since 2.0
         *
-        *      @return The @c signed @c long equivalent of the current instance
+        *      @return A @c signed @c int equivalent of the current instance
         */
-       virtual long ToLong(void) const;
+       virtual int ToInt(void) const;
 
        /**
-        *      Gets the @c signed @c long @c long equivalent of the current instance of %Short.
+        *      Gets the @c signed @c long equivalent of the current instance of the %Short class.
         *
         *      @since 2.0
         *
-        *      @return The @c signed @c long @c long equivalent of the current instance
+        *      @return A @c signed @c long equivalent of the current instance
         */
+       virtual long ToLong(void) const;
+
+       /**
+       *       Gets the @c signed @c long @c long equivalent of the current instance of the %Short class.
+       *
+       *       @since 2.0
+       *
+       *       @return A @c signed @c long @c long equivalent of the current instance
+       */
        virtual long long ToLongLong(void) const;
 
        /**
-        *      Gets the @c signed @c float equivalent of the current instance of %Short.
+        *      Gets the @c signed @c float equivalent of the current instance of the %Short class.
         *
         *      @since 2.0
         *
-        *      @return The @c signed @c float equivalent of the current instance
+        *      @return A @c signed @c float equivalent of the current instance
         */
        virtual float ToFloat(void) const;
 
        /**
-        *      Gets the @c signed @c double equivalent of the current instance of %Short.
+        *      Gets the @c signed @c double equivalent of the current instance of the %Short class.
         *
         *      @since 2.0
         *
-        *      @return The @c signed @c double equivalent of the current instance
+        *      @return A @c signed @c double equivalent of the current instance
         */
        virtual double ToDouble(void) const;
 
        /**
-        * Gets the string that represents the value of the current instance of %Short.
+        * Gets the string representing the value of the current instance of the %Short class.
         *
         *      @since 2.0
         *
-        *  @return             The string that represents the value of the current instance
+        *  @return             A string representing the value of the current instance
         */
        virtual String ToString(void) const;
 
        /**
-        *      Gets the string that represents the specified @c signed @c short value.
+        *      Gets the string representing the specified @c signed @c short value.
         *
         *      @since 2.0
         *
-        *      @return                 The string that contains the Unicode representation of the specified @c signed @c short value
-        *      @param[in]      value   The @c signed @c short value to convert
+        *      @return                 A string containing a Unicode representation of the specified @c signed @c short value
+        *      @param[in]      value   A @c signed @c short value to convert
         */
        static String ToString(short value);
 
        /**
-        *      The constant holding the maximum value a @c short can be equal to 2^15-1.
+        *      A constant holding the maximum value a @c short will be equal to 2^15-1.
         *
         *      @since 2.0
         */
-       static const short VALUE_MAX = (short) 0x7FFF;
+       static const short VALUE_MAX = static_cast< short >(0x7FFF);
 
        /**
-        *      The constant holding the minimum value a @c short can be equal to -2^15.
+        *      A constant holding the minimum value a @c short will be equal to -2^15.
         *
         *      @since 2.0
         */
-       static const short VALUE_MIN = (short) 0x8000;
+       static const short VALUE_MIN = static_cast< short >(0x8000);
 
        /**
-        * The @c short value of this instance.
+        * A @c short value of this instance.
         *
         * @since 2.0
         */