@@ -22,12 +22,12 @@ #ifdef OF_HAVE_BLOCKS typedef void (^of_timer_block_t)(OFTimer*); #endif -/** - * \brief A class for creating and firing timers. +/*! + * @brief A class for creating and firing timers. */ @interface OFTimer: OFObject { OFDate *fireDate; double interval; @@ -44,195 +44,195 @@ #ifdef OF_HAVE_PROPERTIES @property (readonly, retain) OFDate *fireDate; #endif -/** - * \brief Creates and schedules a new timer with the specified time interval. +/*! + * @brief Creates and schedules a new timer with the specified time interval. * - * \param interval The time interval after which the timer should be executed + * @param interval The time interval after which the timer should be executed * when fired - * \param target The target on which to call the selector - * \param selector The selector to call on the target - * \param repeats Whether the timer repeats after it has been executed - * \return A new, autoreleased timer + * @param target The target on which to call the selector + * @param selector The selector to call on the target + * @param repeats Whether the timer repeats after it has been executed + * @return A new, autoreleased timer */ + (instancetype)scheduledTimerWithTimeInterval: (double)interval target: (id)target selector: (SEL)selector repeats: (BOOL)repeats; -/** - * \brief Creates and schedules a new timer with the specified time interval. +/*! + * @brief Creates and schedules a new timer with the specified time interval. * - * \param interval The time interval after which the timer should be executed + * @param interval The time interval after which the timer should be executed * when fired - * \param target The target on which to call the selector - * \param selector The selector to call on the target - * \param object An object to pass when calling the selector on the target - * \param repeats Whether the timer repeats after it has been executed - * \return A new, autoreleased timer + * @param target The target on which to call the selector + * @param selector The selector to call on the target + * @param object An object to pass when calling the selector on the target + * @param repeats Whether the timer repeats after it has been executed + * @return A new, autoreleased timer */ + (instancetype)scheduledTimerWithTimeInterval: (double)interval target: (id)target selector: (SEL)selector object: (id)object repeats: (BOOL)repeats; -/** - * \brief Creates and schedules a new timer with the specified time interval. - * - * \param interval The time interval after which the timer should be executed - * when fired - * \param target The target on which to call the selector - * \param selector The selector to call on the target - * \param object1 The first object to pass when calling the selector on the - * target - * \param object2 The second object to pass when calling the selector on the - * target - * \param repeats Whether the timer repeats after it has been executed - * \return A new, autoreleased timer +/*! + * @brief Creates and schedules a new timer with the specified time interval. + * + * @param interval The time interval after which the timer should be executed + * when fired + * @param target The target on which to call the selector + * @param selector The selector to call on the target + * @param object1 The first object to pass when calling the selector on the + * target + * @param object2 The second object to pass when calling the selector on the + * target + * @param repeats Whether the timer repeats after it has been executed + * @return A new, autoreleased timer */ + (instancetype)scheduledTimerWithTimeInterval: (double)interval target: (id)target selector: (SEL)selector object: (id)object1 object: (id)object2 repeats: (BOOL)repeats; #ifdef OF_HAVE_BLOCKS -/** - * \brief Creates and schedules a new timer with the specified time interval. +/*! + * @brief Creates and schedules a new timer with the specified time interval. * - * \param interval The time interval after which the timer should be executed + * @param interval The time interval after which the timer should be executed * when fired - * \param repeats Whether the timer repeats after it has been executed - * \param block The block to invoke when the timer fires - * \return A new, autoreleased timer + * @param repeats Whether the timer repeats after it has been executed + * @param block The block to invoke when the timer fires + * @return A new, autoreleased timer */ + (instancetype)scheduledTimerWithTimeInterval: (double)interval repeats: (BOOL)repeats block: (of_timer_block_t)block; #endif -/** - * \brief Creates a new timer with the specified time interval. +/*! + * @brief Creates a new timer with the specified time interval. * - * \param interval The time interval after which the timer should be executed + * @param interval The time interval after which the timer should be executed * when fired - * \param target The target on which to call the selector - * \param selector The selector to call on the target - * \param repeats Whether the timer repeats after it has been executed - * \return A new, autoreleased timer + * @param target The target on which to call the selector + * @param selector The selector to call on the target + * @param repeats Whether the timer repeats after it has been executed + * @return A new, autoreleased timer */ + (instancetype)timerWithTimeInterval: (double)interval target: (id)target selector: (SEL)selector repeats: (BOOL)repeats; -/** - * \brief Creates a new timer with the specified time interval. +/*! + * @brief Creates a new timer with the specified time interval. * - * \param interval The time interval after which the timer should be executed + * @param interval The time interval after which the timer should be executed * when fired - * \param target The target on which to call the selector - * \param selector The selector to call on the target - * \param object An object to pass when calling the selector on the target - * \param repeats Whether the timer repeats after it has been executed - * \return A new, autoreleased timer + * @param target The target on which to call the selector + * @param selector The selector to call on the target + * @param object An object to pass when calling the selector on the target + * @param repeats Whether the timer repeats after it has been executed + * @return A new, autoreleased timer */ + (instancetype)timerWithTimeInterval: (double)interval target: (id)target selector: (SEL)selector object: (id)object repeats: (BOOL)repeats; -/** - * \brief Creates a new timer with the specified time interval. +/*! + * @brief Creates a new timer with the specified time interval. * - * \param interval The time interval after which the timer should be executed + * @param interval The time interval after which the timer should be executed * when fired - * \param target The target on which to call the selector - * \param selector The selector to call on the target - * \param object1 The first object to pass when calling the selector on the - * target - * \param object2 The second object to pass when calling the selector on the - * target - * \param repeats Whether the timer repeats after it has been executed - * \return A new, autoreleased timer + * @param target The target on which to call the selector + * @param selector The selector to call on the target + * @param object1 The first object to pass when calling the selector on the + * target + * @param object2 The second object to pass when calling the selector on the + * target + * @param repeats Whether the timer repeats after it has been executed + * @return A new, autoreleased timer */ + (instancetype)timerWithTimeInterval: (double)interval target: (id)target selector: (SEL)selector object: (id)object1 object: (id)object2 repeats: (BOOL)repeats; #ifdef OF_HAVE_BLOCKS -/** - * \brief Creates a new timer with the specified time interval. +/*! + * @brief Creates a new timer with the specified time interval. * - * \param interval The time interval after which the timer should be executed + * @param interval The time interval after which the timer should be executed * when fired - * \param repeats Whether the timer repeats after it has been executed - * \param block The block to invoke when the timer fires - * \return A new, autoreleased timer + * @param repeats Whether the timer repeats after it has been executed + * @param block The block to invoke when the timer fires + * @return A new, autoreleased timer */ + (instancetype)timerWithTimeInterval: (double)interval repeats: (BOOL)repeats block: (of_timer_block_t)block; #endif -/** - * \brief Initializes an already allocated timer with the specified time +/*! + * @brief Initializes an already allocated timer with the specified time * interval. * - * \param fireDate The date at which the timer should fire - * \param interval The time interval after which to repeat the timer, if it is + * @param fireDate The date at which the timer should fire + * @param interval The time interval after which to repeat the timer, if it is * a repeating timer - * \param target The target on which to call the selector - * \param selector The selector to call on the target - * \param repeats Whether the timer repeats after it has been executed - * \return An initialized timer + * @param target The target on which to call the selector + * @param selector The selector to call on the target + * @param repeats Whether the timer repeats after it has been executed + * @return An initialized timer */ - initWithFireDate: (OFDate*)fireDate interval: (double)interval target: (id)target selector: (SEL)selector repeats: (BOOL)repeats; -/** - * \brief Initializes an already allocated timer with the specified time +/*! + * @brief Initializes an already allocated timer with the specified time * interval. * - * \param fireDate The date at which the timer should fire - * \param interval The time interval after which to repeat the timer, if it is + * @param fireDate The date at which the timer should fire + * @param interval The time interval after which to repeat the timer, if it is * a repeating timer - * \param target The target on which to call the selector - * \param selector The selector to call on the target - * \param object An object to pass when calling the selector on the target - * \param repeats Whether the timer repeats after it has been executed - * \return An initialized timer + * @param target The target on which to call the selector + * @param selector The selector to call on the target + * @param object An object to pass when calling the selector on the target + * @param repeats Whether the timer repeats after it has been executed + * @return An initialized timer */ - initWithFireDate: (OFDate*)fireDate interval: (double)interval target: (id)target selector: (SEL)selector object: (id)object1 repeats: (BOOL)repeats; -/** - * \brief Initializes an already allocated timer with the specified time +/*! + * @brief Initializes an already allocated timer with the specified time * interval. * - * \param fireDate The date at which the timer should fire - * \param interval The time interval after which to repeat the timer, if it is + * @param fireDate The date at which the timer should fire + * @param interval The time interval after which to repeat the timer, if it is * a repeating timer - * \param target The target on which to call the selector - * \param selector The selector to call on the target - * \param repeats Whether the timer repeats after it has been executed - * \return An initialized timer + * @param target The target on which to call the selector + * @param selector The selector to call on the target + * @param repeats Whether the timer repeats after it has been executed + * @return An initialized timer */ - initWithFireDate: (OFDate*)fireDate interval: (double)interval target: (id)target selector: (SEL)selector @@ -239,61 +239,61 @@ object: (id)object1 object: (id)object2 repeats: (BOOL)repeats; #ifdef OF_HAVE_BLOCKS -/** - * \brief Initializes an already allocated timer with the specified time +/*! + * @brief Initializes an already allocated timer with the specified time * interval. * - * \param fireDate The date at which the timer should fire - * \param interval The time interval after which to repeat the timer, if it is + * @param fireDate The date at which the timer should fire + * @param interval The time interval after which to repeat the timer, if it is * a repeating timer - * \param repeats Whether the timer repeats after it has been executed - * \param block The block to invoke when the timer fires - * \return An initialized timer + * @param repeats Whether the timer repeats after it has been executed + * @param block The block to invoke when the timer fires + * @return An initialized timer */ - initWithFireDate: (OFDate*)fireDate interval: (double)interval repeats: (BOOL)repeats block: (of_timer_block_t)block; #endif -/** - * \brief Fires the timer, meaning it will execute the specified selector on the +/*! + * @brief Fires the timer, meaning it will execute the specified selector on the * target. */ - (void)fire; -/** - * \brief Returns the next date at which the timer will fire. +/*! + * @brief Returns the next date at which the timer will fire. * - * \return The next date at which the timer will fire + * @return The next date at which the timer will fire */ - (OFDate*)fireDate; -/** - * \brief Invalidates the timer, preventing it from firing. +/*! + * @brief Invalidates the timer, preventing it from firing. */ - (void)invalidate; -/** - * \brief Returns whether the timer is valid. +/*! + * @brief Returns whether the timer is valid. * - * \return Whether the timer is valid + * @return Whether the timer is valid */ - (BOOL)isValid; -/** - * \brief Returns the time interval in which the timer will repeat, if it is a +/*! + * @brief Returns the time interval in which the timer will repeat, if it is a * repeating timer. * - * \return The time interval in which the timer will repeat, if it is a + * @return The time interval in which the timer will repeat, if it is a * repeating timer */ - (double)timeInterval; -/** - * \brief Waits until the timer fired. +/*! + * @brief Waits until the timer fired. */ - (void)waitUntilDone; @end