template class Poco::TimerCallback

Overview

This template class implements an adapter that sits between a Timer and an object’s method invoked by the timer. More…

#include <Timer.h>

template <class C>
class TimerCallback: public Poco::AbstractTimerCallback
{
public:
    // typedefs

    typedef void(C::* Callback)(Timer &);

    // construction

    TimerCallback(
        C& object,
        Callback method
        );

    TimerCallback(const TimerCallback& callback);

    // methods

    TimerCallback&
    operator=(const TimerCallback& callback);

    virtual
    void
    invoke(Timer& timer) const;

    virtual
    AbstractTimerCallback*
    clone() const;
};

Inherited Members

public:
    // methods

    AbstractTimerCallback&
    operator=(const AbstractTimerCallback& callback);

    virtual
    void
    invoke(Timer& timer) const = 0;

    virtual
    AbstractTimerCallback*
    clone() const = 0;

Detailed Documentation

This template class implements an adapter that sits between a Timer and an object’s method invoked by the timer.

It is quite similar in concept to the RunnableAdapter, but provides some Timer specific additional methods. See the Timer class for information on how to use this template class.