X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=adaptors%2Fpublic-api%2Fadaptor-framework%2Ftimer.h;h=cbf4a01bab779e001e2a887a32e3eab0a21be532;hb=refs%2Fchanges%2F25%2F110425%2F2;hp=8affd3e4e10fd1134b607ae914eca1e9fef608b7;hpb=f082b3d33300c78142eef8609f30debce30667aa;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git diff --git a/adaptors/public-api/adaptor-framework/timer.h b/adaptors/public-api/adaptor-framework/timer.h index 8affd3e..cbf4a01 100644 --- a/adaptors/public-api/adaptor-framework/timer.h +++ b/adaptors/public-api/adaptor-framework/timer.h @@ -2,7 +2,7 @@ #define __DALI_TIMER_H__ /* - * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * Copyright (c) 2015 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,10 +21,14 @@ // EXTERNAL INCLUDES #include -#include +#include namespace Dali { +/** + * @addtogroup dali_adaptor_framework + * @{ + */ namespace Internal DALI_INTERNAL { @@ -45,12 +49,13 @@ class Timer; * * This class is a handle class so it can be stack allocated and used * as a member. + * @SINCE_1_0.0 */ class DALI_IMPORT_API Timer : public BaseHandle { public: // Signal typedefs - typedef SignalV2< bool () > TimerSignalV2; ///< Timer finished signal callback type + typedef Signal< bool () > TimerSignalType; ///< Timer finished signal callback type @SINCE_1_0.0 public: // API @@ -58,12 +63,14 @@ public: // API * @brief Constructor, creates an uninitialized timer. * * Call New to fully construct a timer. + * @SINCE_1_0.0 */ Timer(); /** * @brief Create an tick Timer that emits periodic signal. * + * @SINCE_1_0.0 * @param[in] milliSec Interval in milliseconds. * @return a new timer */ @@ -72,6 +79,7 @@ public: // API /** * @brief Copy constructor. * + * @SINCE_1_0.0 * @param[in] timer The handle to copy. The copied handle will point at the same implementation */ Timer( const Timer& timer ); @@ -79,6 +87,7 @@ public: // API /** * @brief Assignment operator. * + * @SINCE_1_0.0 * @param[in] timer The handle to copy. This handle will point at the same implementation * as the copied handle. * @return Reference to this timer handle @@ -86,28 +95,20 @@ public: // API Timer& operator=( const Timer& timer ); /** - * @brief This method is defined to allow assignment of the NULL value, - * and will throw an exception if passed any other value. - * - * Assigning to NULL is an alias for Reset(). - * @param [in] rhs A NULL pointer - * @return A reference to this handle - */ - Timer& operator=(BaseHandle::NullType* rhs); - - /** * @brief Destructor * * This is non-virtual since derived Handle types must not contain data or virtual methods. + * @SINCE_1_0.0 */ ~Timer(); /** - * @brief Downcast an Object handle to Timer handle. + * @brief Downcast a handle to Timer handle. * * If handle points to a Timer object the downcast produces a valid * handle. If not the returned handle is left uninitialized. * + * @SINCE_1_0.0 * @param[in] handle to An object * @return handle to a Timer object or an uninitialized handle */ @@ -117,11 +118,13 @@ public: // API * @brief Start timer. * * In case a Timer is already running it's time is reset and timer is restarted. + * @SINCE_1_0.0 */ void Start(); /** * @brief Stop timer. + * @SINCE_1_0.0 */ void Stop(); @@ -129,18 +132,22 @@ public: // API * @brief Sets a new interval on the timer and starts the timer. * * Cancels the previous timer. - * @param milliSec Interval in milliseconds. + * @SINCE_1_0.0 + * @param[in] milliSec Interval in milliseconds. */ void SetInterval( unsigned int milliSec ); /** * @brief Get the interval of timer. - * @returns Interval in milliseconds. + * + * @return Interval in milliseconds. + * @SINCE_1_0.0 */ unsigned int GetInterval() const; /** * @brief Tells whether timer is running. + * @SINCE_1_0.0 * @return Whether Timer is started or not. */ bool IsRunning() const; @@ -151,16 +158,20 @@ public: // Signals * @brief Signal emitted after specified time interval. * * The return of the callback decides whether signal emission stops or continues. - * If the callback function returns false emission will stop, if true it will continue + * If the callback function returns false, emission will stop and if true, it will continue. * This return value is ignored for one-shot events, which will always stop after the first execution. - * @returns The signal to Connect() with. + * @return The signal to Connect() with. + * @SINCE_1_0.0 */ - TimerSignalV2& TickSignal(); + TimerSignalType& TickSignal(); public: // Not intended for application developers explicit DALI_INTERNAL Timer(Internal::Adaptor::Timer* timer); }; +/** + * @} + */ } // namespace Dali #endif // __DALI_TIMER_H__