//
-// Open Service Platform
// Copyright (c) 2012 Samsung Electronics Co., Ltd.
//
// Licensed under the Apache License, Version 2.0 (the License);
* @file FBaseLong.h
* @brief This is the header file for the %Long class.
*
- * @see Number()
- *
* This header file contains the declarations of the %Long class.
+ *
+ * @see Number
*/
#ifndef _FBASE_LONG_H_
#define _FBASE_LONG_H_
#include <FBaseNumber.h>
-
namespace Tizen { namespace Base
{
/**
*
* @since 2.0
*
- * The %Long class represents an integer value ranging from -2147483648 to 2147483647
- * , that is, -(2^31) to +((2^31)-1). The class is useful when passing a 32-bit @c signed
+ * The %Long class represents an integer value ranging from @c -2147483648 to @c 2147483647,
+ * that is, -(2^31) to +((2^31)-1). The class is useful when passing a 32-bit @c signed
* integral value to a method that accepts only an instance of Object. Furthermore,
* this class provides methods for converting %Long (and @c long) to String, and %String
* to %Long (and @c long).
*
* @since 2.0
*
- * @param[in] value A @c long value
+ * @param[in] value The @c long value
*/
Long(long value = 0);
*
* @since 2.0
*
- * @param[in] value An instance of %Long
+ * @param[in] value An instance of %Long to copy
*/
Long(const Long& value);
*
* @since 2.0
*
- * @param[in] rhs An instance of %Long
+ * @param[in] rhs An instance of %Long to copy
*/
Long& operator =(const Long& rhs);
*
* @since 2.0
*
- * @return A 32-bit @c signed integer value
+ * @return The 32-bit @c signed integer value
* @code
* < 0 if the value of @c l1 is less than the value of @c l2
* == 0 if the value of @c l1 is equal to the value of @c l2
*
* @since 2.0
*
- * @return A 32-bit @c signed integer value
+ * @return The 32-bit @c signed integer value
*
* @code
* < 0 if the value of the current instance is less than the value of the specified instance
* == 0 if the value of the current instance is equal to the value of the specified instance
* > 0 if the value of the current instance is greater than the value of the specified instance
* @endcode
- * @param[in] value An instance of the %Long class to compare
+ * @param[in] value An instance of %Long to compare
*/
int CompareTo(const Long& value) const;
/**
- * Checks whether the value of the specified instance of %Object is equal to the value of the current instance of %Long.
+ * Checks whether the value of the specified instance of Object is equal to the value of the current instance of %Long.
*
* @since 2.0
*
- * @return @c true if the value of the specified instance of %Object is equal to the value of the current instance of %Long, @n
+ * @return @c true if the value of the specified instance of Object is equal to the value of the current instance of %Long, @n
* else @c false
- * @param[in] obj An instance of %Object to compare
+ * @param[in] obj An instance of Object to compare
* @see Object::Equals()
*/
virtual bool Equals(const Object& obj) const;
*
* @since 2.0
*
- * @return An integer value indicating the hash value of the current instance of %Long
- * @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.
+ * @return The integer value that indicates the hash value of the current instance of %Long
+ * @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.
*/
virtual int GetHashCode(void) const;
/**
- * Gets the hash value of the specified @c long value.
- *
- * @since 2.0
- *
- * @return An integer value indicating the hash value of the specified @c long value
- * @param[in] val A @c long value to get the hash value
- */
+ * Gets the hash value of the specified @c long value.
+ *
+ * @since 2.0
+ *
+ * @return The integer value that indicates the hash value of the specified @c long value
+ * @param[in] val The @c long value used to get the hash value
+ */
static int GetHashCode(long val);
/**
- * Decodes a string into a @c signed @c long.
+ * Decodes a string into a @c signed @c long value.
*
* @since 2.0
*
* @return An error code
- * @param[in] s A string representing a numeric value
+ * @param[in] s The string that represents the 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.
static result Decode(const String& s, long& ret);
/**
- * Parses the @c signed @c long equivalent of the specified string representing a numeric value.
+ * Parses the @c signed @c long equivalent of the specified string that represents a numeric value.
*
* @since 2.0
*
* @return An error code
- * @param[in] s A string representing a numeric value
+ * @param[in] s The string that represents the 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 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.
+ * - This method assumes that the string that represents the numeric value 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.
*/
static result Parse(const String& s, long& ret);
/**
- * Parses the @c signed @c long equivalent of the specified string representing a numeric value using the specified radix.
+ * Parses the @c signed @c long equivalent of the specified string that represents a numeric value using the specified radix.
*
* @since 2.0
*
* @return An error code
- * @param[in] s A string representing a numeric value
- * @param[in] radix The radix of the string representing a numeric value @n
- * It must be either 2, 8, 10, or 16.
+ * @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 be either 2, 8, 10, or 16.
* @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 out-parameter is not changed when the method returns error.
+ * @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.
*/
static result Parse(const String& s, int radix, long& ret);
/**
- * Gets the @c signed @c char equivalent of the current instance of the %Long class.
+ * Gets the @c signed @c char equivalent of the current instance of %Long.
*
* @since 2.0
*
virtual char ToChar(void) const;
/**
- * Gets the @c signed @c short equivalent of the current instance of the %Long class.
+ * Gets the @c signed @c short equivalent of the current instance of %Long.
*
* @since 2.0
*
virtual short ToShort(void) const;
/**
- * Gets the @c signed @c int equivalent of the current instance of the %Long class.
+ * Gets the @c signed @c int equivalent of the current instance of %Long.
*
* @since 2.0
*
virtual int ToInt(void) const;
/**
- * Gets the @c signed @c long equivalent of the current instance of the %Long class.
+ * Gets the @c signed @c long equivalent of the current instance of %Long.
*
* @since 2.0
*
virtual long ToLong(void) const;
/**
- * Gets the @c signed @c long @c long equivalent of the current instance of the %Long class.
+ * Gets the @c signed @c long @c long equivalent of the current instance of %Long.
*
* @since 2.0
*
virtual long long ToLongLong(void) const;
/**
- * Gets the @c signed @c float equivalent of the current instance of the %Long class.
+ * Gets the @c signed @c float equivalent of the current instance of %Long.
*
* @since 2.0
*
virtual float ToFloat(void) const;
/**
- * Gets the @c signed @c double equivalent of the current instance of the %Long class.
+ * Gets the @c signed @c double equivalent of the current instance of %Long.
*
* @since 2.0
*
virtual double ToDouble(void) const;
/**
- * Gets the string representing the value of the current instance of the %Long class.
+ * Gets the string that represents the value of the current instance of %Long.
*
* @since 2.0
*
- * @return The string representing the value of the current instance
+ * @return The string that represents the value of the current instance
*/
virtual String ToString(void) const;
/**
- * Gets the string representing the specified @c signed @c long value.
+ * Gets the string that represents the specified @c signed @c long value.
*
* @since 2.0
*
- * @return The string containing a Unicode representation of the specified @c signed @c long value
- * @param[in] value A @c signed @c long value to convert
+ * @return The string that contains the Unicode representation of the specified @c signed @c long value
+ * @param[in] value The @c signed @c long value to convert
*/
static String ToString(long value);
/**
- * A constant holding the maximum value a @c short can have; 2^31-1.
+ * The constant holding the maximum value a @c short value can have; 2^31-1.
*
* @since 2.0
*/
static const long VALUE_MAX = (long) 0x7FFFFFFF;
/**
- * A constant holding the minimum value a @c short can have; -2^31.
+ * The constant holding the minimum value a @c short value can have; -2^31.
*
* @since 2.0
*/
static const long VALUE_MIN = (long) 0x80000000;
/**
- * A @c long value of this instance.
+ * The @c long value of this instance.
*
* @since 2.0
*/
private:
friend class _LongImpl;
- class _LongImpl * __pLongImpl;
+ class _LongImpl* __pLongImpl;
}; // Long