Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!bcm!rice!uw-beaver!cornell!rcbc From: rcbc@cs.cornell.edu (Robert Cooper) Newsgroups: comp.sys.isis Subject: Re: isis and C++ Message-ID: <51494@cornell.UUCP> Date: 1 Feb 91 20:45:08 GMT References: <1991Feb1.151157.17332@noose.ecn.purdue.edu> Sender: nobody@cornell.UUCP Reply-To: rcbc@cs.cornell.edu (Robert Cooper) Organization: Cornell University Computer Science Department Lines: 32 In-reply-to: rembold@rainbow.ecn.purdue.edu (Bernhard F Rembold) In article <1991Feb1.151157.17332@noose.ecn.purdue.edu>, rembold@rainbow (Bernhard F Rembold) writes: > >I am trying to use ISIS with C++ and have gotten somewhat confused with >the use of basic functions such as 'isis_entry', 'isis_task' etc. Going >through the declarations in the 'isis.h' file has given me some insight >but has not helped me set up a working client-server model. >I would be grateful if someone could post or e-mail me a set of simple >example programs (i.e. client & server) in C++ similar to the timeclock >example described in the ISIS reference manual. > >Thanks in advance, > Bernhard > The main hassle using Isis from C++ is the issue of callback functions. It is difficult to pass a C++ member-function as a callback to many Isis routines that want callbacks, such as isis_entry, t_fork, pg_monitor etc., because its difficult to pass in the object to which the member-function belongs as the "hidden" argument to the member-function. The general way to get around this problem is to write regular C wrapper functions that call the appropriate C++ member functions. This loses some of the generality of C++, but it works. If I get time I'll post an example tiny program to illustrate this, or one of the C++ Isis users out there might want to give an example. "Eventually" we will do a better C++ interface on top of the C Isis interface. -- Robert Cooper