Xref: utzoo comp.lang.c++:5545 comp.object:423 Path: utzoo!utgpu!watmath!iuvax!mailrus!uunet!pantor!richard From: richard@pantor.UUCP (Richard Sargent) Newsgroups: comp.lang.c++,comp.object Subject: Re: Shippable C++ Objects (RFC) Message-ID: <31.UUL1.3#5109@pantor.UUCP> Date: 16 Nov 89 13:43:31 GMT References: Organization: Pansophic Systems Inc, Graphics Product Company Lines: 59 [edited quote follows] > From: cimshop!davidm@uunet.UU.NET (David S. Masterson) > Newsgroups: comp.lang.c++,comp.object > Subject: Shippable C++ Objects (RFC) > Message-ID: > Date: 15 Nov 89 18:10:37 GMT > > Request for Comments > (*please post*) > > Based on previous discussions within these groups and some work I am currently > doing, I'd like to get some comments (please post) on the following ideas for > the shipment of C++ objects between processes (and, by implication, the > persistence of the object). Hopefully, this will generate some interesting > discussions. Below I list some ideas/requirements for the shippability > between processes of general objects in C++: > ... > > 3. Assume each class of objects has methods for filling (or constructing) > itself from the shippable byte array representation made in (2). ... Here's the nub of the problem! The rest of the proprosal is quite straight forward. In fact, I believe that I read a paper on this in one of the OOPSLA or C++ Workshop proceedings. "The object can reconstruct itself from the byte stream" requires that the object already exist. It still seems to me that you *have* to have a case statement somewhere which knows about all (interesting) object classes. The cases create each new type of object, probably using a class constructor which has a ByteStreamRepresentation argument. The created object is then added into the receiving program's organization. How to do this from a general purpose class library without encoding knowledge of the application is another (lesser) problem. The real trick will be to eliminate the need for such a switch! If anyone figures this out for C++, I'm waiting with bated breath for the answer. ... > -- > =================================================================== > David Masterson Consilium, Inc. > uunet!cimshop!davidm Mt. View, CA 94043 > =================================================================== > "If someone thinks they know what I said, then I didn't say it!" I sure would like to see a viable general purpose solution to this problem in C++. I'm afraid that the solution will require a lot of the facilities from Smalltalk. Richard Sargent Internet: richard@pantor.UUCP Systems Analyst UUCP: uunet!pantor!richard