Path: utzoo!attcan!uunet!mailrus!tut.cis.ohio-state.edu!ucbvax!hplabs!hp-ses!david From: david@hp-ses.SDE.HP.COM (David McFadzean) Newsgroups: comp.object Subject: Re: Shippable C++ Objects (RFC) Message-ID: <8410001@hp-ses.SDE.HP.COM> Date: 23 Nov 89 23:58:51 GMT References: Organization: HP SW Engineering Systems - Palo Alto, CA Lines: 23 kipp@warp.sgi.com (Kipp Hickman) writes: > To eliminate the ``switch'' implied by the object reconstruction mechanism, > all you need is a dictionary. The key is the tag which identifies the object > in its byte stream form (a string works nicely). The value is a pointer to > a function to perform the reconstruction. This solution does indeed eliminate the switch, but it doesn't eliminate the problem: how does the receiving process know what to put in the dictionary? The dictionary has to be initialized with all interesting classes (and their corresponding keys) before any objects can be reconstructed. If a new class is added to the common library, the code for the receiving process has to be updated to add the new class to the dictionary. (not much different than adding a new case to a switch statement) Is there any way for the sending process to tell the receiving one which classes of instances are coming down the wire? David McFadzean HP Calgary Product Development Centre