Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!elsie!nih-csl!keith From: keith@nih-csl.UUCP (keith gorlen) Newsgroups: comp.lang.c++ Subject: Re: Virtual Functions in IPC environment Message-ID: <265@nih-csl.UUCP> Date: Wed, 2-Sep-87 18:07:26 EDT Article-I.D.: nih-csl.265 Posted: Wed Sep 2 18:07:26 1987 Date-Received: Sat, 5-Sep-87 08:29:13 EDT References: <1120@lznv.ATT.COM> Organization: NIH-CSL, Bethesda, MD Lines: 45 Summary: OOPS library storeOn()/readFrom() can be used to pass objects across process boundaries, but it may be too expensive for your application. In article <1120@lznv.ATT.COM->, mark@lznv.ATT.COM (MARK SMITH) writes: -> -> I am building a message-based system consisting of client/server processes -> which I would like to implement using C++. As such, for a given message -> I would like to define the base class -> -> class MsgHdr { IPC private data items; public: IPC access functions(); }; -> -> and a set of derived classes -> -> class DerivedN: public MsgHdr { -> private data for DerivedN; -> public: -> virtual void Operate(); // server: do DerivedN-specific fct -> }; -> -> However, I encounter two difficulties: -> -> (1) Although the intention is clearly to allow Operate() only to be -> usable by the server, I can't find a way to disallow a client process from -> linking with Operate. Since I am memory-conscious (I'm using swapping UNIX), An easy way around this is to define a dummy version of Operate that just issues an error message and link this with clients instead of the real Operate. -> (2) Similarly, the client can't send a DerivedN and expect Operate to work, -> since the server gets a DerivedN Operate linked in the address space -> of the client. Memory fault core dumped. My Object-Oriented Program Support (OOPS) class library implements a general mechanism similar to Smalltalk's storeOn/readFrom that permits OOPS objects to be moved across process boundaries To get a copy of the "guru-only" version of OOPS, just send me a letter on your company or university letterhead requesting the "Object-Oriented Program Support (OOPS) class library for C++" and a reel of 1/2" mag tape (a small reel will suffice). I'll return the tape with a copy of OOPS recorded on it in tar format at 1600 bpi, and I'll include a copy of the (incomplete) OOPS reference manual. Please include your uucp address in the letter. -- Keith Gorlen phone: (301) 496-5363 Building 12A, Room 2017 uucp: seismo!elsie!nih-csl!keith National Institutes of Health Bethesda, MD 20892