ITimerMemberFn

The ITimerMemberFn template class is an ITimerFn-derived class for dispatching C++ member functions to an object when a timer expires. The template argument is as follows:

T
The class of the object against which the member functions are applied.

Use this class instead of ITimerMemberFn0 if you need the timer identifier (ID).

Objects of this class call C++ member functions when a timer expires. The template argument is the class of the object for which the functions are called. The constructor for such objects requires a reference to the object that the member functions are to be applied to and a pointer to the member functions.

The member functions return void and accept a timer identifier (ID) argument.


ITimerMemberFn - Member Functions and Data by Group

Constructors & Destructor

You can only construct and destruct objects of this class, although ITimer generally manages the destruction of these objects for you. You cannot copy or assign ITimerMemberFn objects because both the copy constructor and the assignment operator are private members.


[view class]
~ITimerMemberFn
public:
virtual ~ITimerMemberFn()

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
ITimerMemberFn
public:
ITimerMemberFn( T& object, void ( T::* memberFunction ) ( unsigned long ) )

Constructs objects of this class.

Use operator new to create objects of this class if you will be using them with ITimer, because ITimer reference counts these objects.

object
A reference to an object of the template argument class T.
memberFunction
A pointer to a member function of the template argument class. The member function should return a void parameter and accept an unsigned long formal parameter that represents the timer ID.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Timer Expiration

After you start a timer, it expires each time a specified time interval passes. Use these members to perform actions each time the timer expires.


[view class]
timerExpired
public:
virtual void timerExpired(unsigned long timerId)

Calls the pointed-to member function that was provided at construction each time the timer expires.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


ITimerMemberFn - Inherited Member Functions and Data

Inherited Public Functions

ITimerFn
IMRefCounted

Inherited Public Data

Inherited Protected Functions

IMRefCounted

Inherited Protected Data