|IOCallback(3I)||InterViews Reference Manual||IOCallback(3I)|
IOCallback - generic callback class for readers, writers, or I/O exception handlers
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.
- typedef int T::IOReady(T)(int fd)
- typedef void T::IOTimer(T)(long sec, long usec)
- IOCallback(T)(T*, IOReady(T)* in, IOReady(T)* out = nil, IOReady(T)* ex = nil)
- IOCallback(T)(T*, IOTimer(T)*, IOReady(T)* in = nil, IOReady(T)* out = nil, IOReady(T)* ex = nil)
- 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.
|21 December 1990||InterViews|