Merge "Fix Exception issue on Add and remove event listener" into tizen_2.2
[platform/framework/native/appfw.git] / inc / FBaseDateTime.h
index d8254ec..8112db6 100644 (file)
@@ -1,5 +1,4 @@
 //
-// Open Service Platform
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Apache License, Version 2.0 (the License);
@@ -29,7 +28,6 @@
 #include <FBaseString.h>
 #include <FBaseDouble.h>
 
-
 namespace Tizen { namespace Base
 {
 /**
@@ -128,7 +126,7 @@ public:
         *
         *      @since 2.0
         *
-        *      @return                 An error code
+        *      @return         An error code
         *      @param[in]      year                            The year to set
         *      @param[in]      month                           The month to set
         *      @param[in]      day                                     The day to set
@@ -137,9 +135,9 @@ public:
         *      @param[in]      second                          The second to set
         *      @exception      E_SUCCESS                       The method is successful.
         *      @exception      E_OUT_OF_RANGE          The value of the argument is outside the valid range defined by the method. @n
-        *                                                                       Either the arguments are greater than the value returned by GetMaxValue() or
+        *                                                                      Either the arguments are greater than the value returned by GetMaxValue() or
         *                                                                      are less than the value returned by GetMinValue(), or
-        *                                                                       the arguments contain invalid values.
+        *                                                                      the arguments contain invalid values.
         *                                                                      For example, day is 31 when month is 2.
         */
        result SetValue(int year, int month, int day, int hour = 0, int minute = 0, int second = 0);
@@ -149,7 +147,7 @@ public:
         *
         *      @since 2.1
         *
-        *      @return                 An error code
+        *      @return         An error code
         *      @param[in]      year                            The year to set
         *      @param[in]      month                           The month to set
         *      @param[in]      day                                     The day to set
@@ -172,7 +170,7 @@ public:
         *
         *      @since  2.1
         *
-        *      @return                 An error code
+        *      @return         An error code
         *      @param[in]      ticks   The number of ticks
         *      @exception      E_SUCCESS                       The method is successful.
         *      @exception      E_OUT_OF_RANGE          The value of the argument is outside the valid range defined by the method.
@@ -188,8 +186,8 @@ public:
         *
         *      @since 2.0
         *
-        *      @return                 A reference to the current object
-        *      @param[in]      rhs             An instance of %DateTime
+        *      @return         A reference to the current object
+        *      @param[in]      rhs     An instance of %DateTime
         */
        DateTime& operator =(const DateTime& rhs);
 
@@ -198,9 +196,9 @@ public:
         *
         *      @since 2.0
         *
-        *      @return                 @c true if the current instance is equivalent to the specified instance, @n
-        *               else @c false
-        *      @param[in]      rhs             An instance of %DateTime
+        *      @return         @c true if the current instance is equivalent to the specified instance, @n
+        *                              else @c false
+        *      @param[in]      rhs     An instance of %DateTime
         */
        bool operator ==(const DateTime& rhs) const;
 
@@ -209,9 +207,9 @@ public:
         *
         *      @since 2.0
         *
-        *      @return                 @c true if the current instance is not equivalent to the specified instance, @n
-        *           else @c false
-        *      @param[in]      rhs             An instance of %DateTime
+        *      @return         @c true if the current instance is not equivalent to the specified instance, @n
+        *                              else @c false
+        *      @param[in]      rhs     An instance of %DateTime
         */
        bool operator !=(const DateTime& rhs) const;
 
@@ -220,9 +218,9 @@ public:
         *
         *      @since 2.0
         *
-        *      @return                 @c true if the value of the current instance is less than the value of the specified instance, @n
-        *                   else @c false
-        *      @param[in]      rhs             An instance of %DateTime
+        *      @return         @c true if the value of the current instance is less than the value of the specified instance, @n
+        *                              else @c false
+        *      @param[in]      rhs     An instance of %DateTime
         */
        bool operator <(const DateTime& rhs) const;
 
@@ -231,9 +229,9 @@ public:
         *
         *      @since 2.0
         *
-        *      @return                 @c true if the value of the current instance is greater than the value of the specified instance, @n
-        *                   else @c false
-        *      @param[in]      rhs             An instance of %DateTime
+        *      @return         @c true if the value of the current instance is greater than the value of the specified instance, @n
+        *                              else @c false
+        *      @param[in]      rhs     An instance of %DateTime
         */
        bool operator >(const DateTime& rhs) const;
 
@@ -242,9 +240,9 @@ public:
         *
         *      @since 2.0
         *
-        *      @return                 @c true if the value of the current instance is less than or equal to the value of the specified instance, @n
-        *                   else @c false
-        *      @param[in]      rhs             An instance of %DateTime
+        *      @return         @c true if the value of the current instance is less than or equal to the value of the specified instance, @n
+        *                              else @c false
+        *      @param[in]      rhs     An instance of %DateTime
         */
        bool operator <=(const DateTime& rhs) const;
 
@@ -253,8 +251,8 @@ public:
         *
         *      @since 2.0
         *
-        *      @return                 @c true if the value of the current instance is greater than or equal to the value of the specified instance, @n
-        *                   else @c false
+        *      @return         @c true if the value of the current instance is greater than or equal to the value of the specified instance, @n
+        *                              else @c false
         *      @param[in]      rhs     An instance of %DateTime
         */
        bool operator >=(const DateTime& rhs) const;
@@ -264,7 +262,7 @@ public:
         *
         *      @since 2.0
         *
-        *      @return An error code
+        *      @return         An error code
         *      @param[in]      t                                       The time span to add
         *      @exception      E_SUCCESS                       The method is successful.
         *      @exception      E_OUT_OF_RANGE          The value of the argument is outside the valid range defined by the method. @n
@@ -278,7 +276,7 @@ public:
         *
         *      @since 2.0
         *
-        *      @return An error code
+        *      @return         An error code
         *      @param[in]      days                            The number of days to add
         *      @exception      E_SUCCESS                       The method is successful.
         *      @exception      E_OUT_OF_RANGE          The value of the argument is outside the valid range defined by the method. @n
@@ -292,7 +290,7 @@ public:
         *
         *      @since 2.0
         *
-        *      @return An error code
+        *      @return         An error code
         *      @param[in]      hours                           The number of hours to add
         *      @exception      E_SUCCESS                       The method is successful.
         *      @exception      E_OUT_OF_RANGE          The value of the argument is outside the valid range defined by the method. @n
@@ -306,7 +304,7 @@ public:
         *
         *      @since 2.0
         *
-        *      @return An error code
+        *      @return         An error code
         *      @param[in]      minutes                         The number of minutes to add
         *      @exception      E_SUCCESS                       The method is successful.
         *      @exception      E_OUT_OF_RANGE          The value of the argument is outside the valid range defined by the method. @n
@@ -320,7 +318,7 @@ public:
         *
         *      @since 2.0
         *
-        *      @return An error code
+        *      @return         An error code
         *      @param[in]      months                          The number of months to add
         *      @exception      E_SUCCESS                       The method is successful.
         *      @exception      E_OUT_OF_RANGE          The value of the argument is outside the valid range defined by the method. @n
@@ -334,7 +332,7 @@ public:
         *
         *      @since 2.0
         *
-        *      @return An error code
+        *      @return         An error code
         *      @param[in]      seconds                         The number of seconds to add
         *      @exception      E_SUCCESS                       The method is successful.
         *      @exception      E_OUT_OF_RANGE          The value of the argument is outside the valid range defined by the method. @n
@@ -344,11 +342,11 @@ public:
        result AddSeconds(int seconds);
 
        /**
-        *      Adds the specified number of milliseconds to the instance of %DateTime.
+        *      Adds a specified number of milliseconds to the instance of %DateTime.
         *
         *      @since 2.1
         *
-        *      @return An error code
+        *      @return         An error code
         *      @param[in]      milliseconds            The number of milliseconds to add
         *      @exception      E_SUCCESS                       The method is successful.
         *      @exception      E_OUT_OF_RANGE          The value of the argument is outside the valid range defined by the method. @n
@@ -358,11 +356,11 @@ public:
        result AddMilliseconds(long long milliseconds);
 
        /**
-        *      Adds the specified number of ticks to the instance of %DateTime.
+        *      Adds a specified number of ticks to the instance of %DateTime.
         *
         *      @since 2.1
         *
-        *      @return An error code
+        *      @return         An error code
         *      @param[in]      ticks                           The number of ticks to add
         *      @exception      E_SUCCESS                       The method is successful.
         *      @exception      E_OUT_OF_RANGE          The value of the argument is outside the valid range defined by the method. @n
@@ -376,7 +374,7 @@ public:
         *
         *      @since 2.0
         *
-        *      @return An error code
+        *      @return         An error code
         *      @param[in]      years                           The number of years to add
         *      @exception      E_SUCCESS                       The method is successful.
         *      @exception      E_OUT_OF_RANGE          The value of the argument is outside the valid range defined by the method. @n
@@ -391,7 +389,7 @@ public:
         *
         *      @since 2.0
         *
-        *  @return                     A 32-bit @c signed integer value
+        *  @return             A 32-bit @c signed integer value
         *      @code
         *      <  0  if the value of @c dt1 is less than the value of @c dt2
         *      == 0  if the value of @c dt1 is equal to the value of @c dt2
@@ -407,13 +405,13 @@ public:
         *
         *      @since 2.0
         *
-        *  @return                     A 32-bit @c signed integer value
+        *  @return             A 32-bit @c signed integer value
         *      @code
         *      <  0  if the value of the current instance is less than value of the specified instance
         *      == 0  if the value of the current instance is equal to value of the specified instance
         *      >  0  if the value of the current instance is greater than value of the specified instance
         *      @endcode
-        *      @param[in]              value   An instance of %DateTime
+        *      @param[in]      value   An instance of %DateTime
         */
        int CompareTo(const DateTime& value) const;
 
@@ -423,9 +421,9 @@ public:
         *      @since 2.0
         *
         *      @return         @c true if the specified instance of Object is equivalent to the current instance of %DateTime, @n
-        *               else @c false
+        *                              else @c false
         *      @param[in]      obj The object to compare with the current instance of %DateTime
-        *      @see                    Tizen::Base::Object::GetHashCode()
+        *      @see            Tizen::Base::Object::GetHashCode()
         */
        virtual bool Equals(const Object& obj) const;
 
@@ -454,13 +452,13 @@ public:
         *
         *      @since 2.0
         *
-        *      @return                 An error code
+        *      @return         An error code
         *      @param[in]      year                            The year
         *      @param[in]      month                           The month
         *      @param[out]     days                            The number of days
         *      @exception      E_SUCCESS                       The method is successful.
         *      @exception      E_OUT_OF_RANGE          The value of the argument is outside the valid range defined by the method. @n
-        *                                                                       @c year must be a value between @c 1 and @c 9999 and @c month must be a value between @c 1 and @c 12.
+        *                                                                      @c year must be a value between @c 1 and @c 9999 and @c month must be a value between @c 1 and @c 12.
         */
        static result GetDaysInMonth(int year, int month, int& days);
 
@@ -469,7 +467,7 @@ public:
         *
         *      @since 2.0
         *
-        *      @return                 An error code
+        *      @return         An error code
         *      @param[in]      t                                       The time span to deduct
         *      @exception      E_SUCCESS                       The method is successful.
         *      @exception      E_OUT_OF_RANGE          The value of the argument is outside the valid range defined by the method. @n
@@ -501,10 +499,10 @@ public:
         * @exception   E_SUCCESS                               The method is successful.
         * @exception   E_INVALID_FORMAT                The specified string is in an invalid format.
         * @exception   E_OUT_OF_RANGE                  The specified string contains an invalid value. @n
-        *                                                                           1) The resulting value of %DateTime is greater than the value returned by GetMaxValue()
-        *                                                                          or is less than the value returned by GetMinValue(). @n
-        *                                                                           2) The specified string contains an invalid value.
-        *                                                                          For example, day is 31 when the month is 2.
+        *                                                                              1) The resulting value of %DateTime is greater than the value returned by GetMaxValue()
+        *                                                                              or is less than the value returned by GetMinValue(). @n
+        *                                                                              2) The specified string contains an invalid value.
+        *                                                                              For example, day is 31 when the month is 2.
         * @remarks
         *                              - The format of the string is "mm/dd/yyyy hh:mm:ss".
         *                              - This method guarantees that the original value of out-parameter is not changed when the method returns error.
@@ -516,7 +514,7 @@ public:
         *
         *      @since 2.0
         *
-        *      @return  An integer value indicating the year of the current instance of %DateTime
+        *      @return         An integer value indicating the year of the current instance of %DateTime
         */
        int GetYear(void) const;
 
@@ -627,7 +625,7 @@ public:
         *      @since 2.0
         *
         *      @return         @c true if the year represented by the current instance of %DateTime is a leap year, @n
-        *               else @c false
+        *                              else @c false
         */
        bool IsLeapYear(void) const;
 
@@ -637,7 +635,7 @@ public:
         *      @since 2.0
         *
         *      @return         @c true if the specified year is a leap year, @n
-        *               else @c false
+        *                              else @c false
         *      @param[in]      year    The year
         */
        static bool IsLeapYear(int year);
@@ -648,7 +646,6 @@ private:
        int CountLeapYear(int year) const
        {
                return static_cast< int >((year - 1) / 4 - (year - 1) / 100 + (year - 1) / 400);
-
        }
 
        int CountDays(int year) const
@@ -710,11 +707,8 @@ private:
        TmDateTime __dateTime;
 
        friend class _DateTimeImpl;
-       class _DateTimeImpl * __pDateTimeImpl;
+       class _DateTimeImpl* __pDateTimeImpl;
 
 }; // DateTime
-
 }}  // Tizen::Base
-
-#endif // _FBASE_DATE_TIME_H_
-
+#endif // _FBASE_DATE_TIME_H_
\ No newline at end of file