logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

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

Constructors

typedefintT::IOReady(T)(intfd)typedefvoidT::IOTimer(T)(longsec,longusec)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.

Description

       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.

Macros

declareIOCallback(T)
              Declare an iocallback type for the given class type T.

       implementIOCallback(T)
              Emit code at this point to implement the iocallback's member functions.

       IOCallback(T)*instance=newIOCallback(T)(...)
              Define an instance of the iocallback type for the given class type T.

Name

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

See Also

Dispatcher(3I), IOHandler(3I)

InterViews                                      21 December 1990                                  IOCallback(3I)

Synopsis

#include<Dispatch/iocallback.h>

See Also