* @file FBaseNumber.h
* @brief This is the header file for the %Number class.
*
- * This header file contains the declarations and definitions of the %Number class.
- *
+ * This header file contains the declarations and definitions of the %Number class. @n
+ * This class is the abstract base class of all wrapped numeric types.
*/
#ifndef _FBASE_NUMBER_H_
#define _FBASE_NUMBER_H_
virtual ~Number(void) { };
/**
- * Gets the @c signed @c char equivalent of the current instance of %Number.
+ * Gets the @c char equivalent of the current instance of the %Number 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 The @c char equivalent of the current instance
*/
virtual char ToChar(void) const = 0;
/**
- * Gets the @c signed @c short equivalent of the current instance of %Number.
+ * Gets the @c signed @c short equivalent of the current instance of the %Number class.
*
* @since 2.0
*
virtual short ToShort(void) const = 0;
/**
- * Gets the @c signed @c int equivalent of the current instance of %Number.
+ * Gets the @c signed @c int equivalent of the current instance of the %Number class.
*
* @since 2.0
*
virtual int ToInt(void) const = 0;
/**
- * Gets the @c signed @c long equivalent of the current instance of %Number.
+ * Gets the @c signed @c long equivalent of the current instance of the %Number class.
*
* @since 2.0
*
virtual long ToLong(void) const = 0;
/**
- * Gets the @c signed @c long @c long equivalent of the current instance of %Number.
+ * Gets the @c signed @c long @c long equivalent of the current instance of the %Number class.
*
* @since 2.0
*
virtual long long ToLongLong(void) const = 0;
/**
- * Gets the @c signed @c float equivalent of the current instance of %Number.
+ * Gets the @c signed @c float equivalent of the current instance of the %Number class.
*
* @since 2.0
*
virtual float ToFloat(void) const = 0;
/**
- * Gets the @c signed @c double equivalent of the current instance of %Number.
+ * Gets the @c signed @c double equivalent of the current instance of the %Number class.
*
* @since 2.0
*
virtual double ToDouble(void) const = 0;
/**
- * Gets the string that represents the value of the current instance of %Number.
+ * Gets the string representing the value of the current instance of the %Number class.
*
* @since 2.0
*
- * @return The string that represents the value of the current instance
+ * @return The string representing the value of the current instance
*/
virtual String ToString(void) const = 0;
+ /**
+ * Gets the @c int8_t equivalent of the current instance of the %Number class.
+ *
+ * @since 3.0
+ *
+ * @return The @c int8_t equivalent of the current instance
+ */
+ virtual int8_t ToInt8(void) const
+ {
+ return 0;
+ }
+
protected:
//
// This method is for internal use only. Using this method can cause behavioral, security-related,
//
virtual void Number_Reserved1(void) { }
- //
- // This method is for internal use only. Using this method can cause behavioral, security-related,
- // and consistency-related issues in the application.
- // This method is reserved and may change its name at any time without prior notice.
- //
- // @since 2.0
- //
- virtual void Number_Reserved2(void) { }
-
}; // Number
}} // Tizen::Base