DOKK / manpages / debian 10 / ivtools-dev / IOCallback.3i.en
IOCallback(3I) InterViews Reference Manual IOCallback(3I)

IOCallback - generic callback class for readers, writers, or I/O exception handlers

#include <Dispatch/iocallback.h>

For convenience, the macros defined in iocallback.h allow the user to define an iohandler which does nothing more than call an arbitrary object's member function. The actual code to read data from a file descriptor, write data to a file descriptor, handle an I/O exception on a file descriptor, or handle a timer's expiration can reside in any arbitrary class rather than in the iohandler.

Declare an iocallback type for the given class type T.
Emit code at this point to implement the iocallback's member functions.
Define an instance of the iocallback type for the given class type T.

Construct an instance of the iocallback type that will call the given member functions of the given class type T's instance. Note that you do not have to use the IOReady(T) or IOTimer(T) macros; rather, you only have to pass the address of a T member function, such as &T::inputReady.

Dispatcher(3I), IOHandler(3I)

21 December 1990 InterViews