🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.object.corba
Article #21

Re: extensible structs/interoperability

#21
From: Philip Lijnzaad
Date: Wed, 28 Jun 2000 00:00
49 lines
2819 bytes
On 28 Jun 2000 07:17:18 GMT, 
"Martin" == Martin v Loewis <loewis@cs.tu-berlin.de> writes:

Martin> In article <8jc0ms$nqt$1@slb6.atl.mindspring.net>,
Martin> Paula DiTallo <ditallop@sprynet.com> wrote:
>> Any suggestions that you have will be very well received!;-}

Martin> I believe there are about three ways to define "variable" data, like
Martin> hashtables, in IDL:
Martin> 1. Use sequences:
Martin>    struct item{
Martin>       string key, value; // value may need to be of type any
Martin>    };
Martin>    typedef sequence<item> hash;

Martin> 2. Use an interface:
Martin>    interface Hash{
Martin>      string get(in string key);
Martin>      void set(in string key,string value);
Martin>    };

Martin> 3. Use a value type:

Martin>    valuetype item{
Martin>      public string key;
Martin>      public ValueBase value; 
                    ( ^ why not 'any' ?)
Martin>    };

this is essentially the same as your struct  ...

Martin>    valuetype hash{
Martin>      private sequence<item> items;
Martin>      public ValueBase get(in string key);
Martin>      public void set(in string key, in ValueBase value);
Martin>    };

... and this is essentially the same as your interface, with the added
inconvenience that the client will have to implement get and set, and that
transmitting all the items maybe impossible due to bandwidth  ... 

                                                                      Philip
-- 
Ban GM foods! Long live the Mesolithicum, pesticides and starvation
-----------------------------------------------------------------------------
Philip Lijnzaad, lijnzaad@ebi.ac.uk \ European Bioinformatics Institute,rm A2-24
+44 (0)1223 49 4639                 / Wellcome Trust Genome Campus, Hinxton
+44 (0)1223 49 4468 (fax)           \ Cambridgeshire CB10 1SD,  GREAT BRITAIN
PGP fingerprint: E1 03 BF 80 94 61 B6 FC  50 3D 1F 64 40 75 FB 53
Technical Details
Message-ID: <u71z1icf9a.fsf@o2-3.ebi.ac.uk>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <8jc0ms$nqt$1@slb6.atl.mindspring.net> <8jc8pu$6d6$1@news.cs.tu-berlin.de>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 108bbb,222a36e4c2f8e995
X-Google-Attributes: gid108bbb,public
X-Google-Thread: f753e,222a36e4c2f8e995
X-Google-Attributes: gidf753e,public
X-Google-Thread: 10b07f,222a36e4c2f8e995
X-Google-Attributes: gid10b07f,public
From: Philip Lijnzaad <lijnzaad@ebi.ac.uk>
Subject: Re: extensible structs/interoperability
Date: 2000/06/28
Message-ID: <u71z1icf9a.fsf@o2-3.ebi.ac.uk>
X-Deja-AN: 639918100
References: <8jc0ms$nqt$1@slb6.atl.mindspring.net> <8jc8pu$6d6$1@news.cs.tu-berlin.de>
X-Complaints-To: news@net.bio.net
X-Trace: niobium.hgmp.mrc.ac.uk 962185416 23297 193.62.196.201 (28 Jun 2000 09:43:36 GMT)
Organization: EMBL Outstation Hinxton - European Bioinformatics Institute, UK
NNTP-Posting-Date: 28 Jun 2000 09:43:36 GMT
Newsgroups: comp.object.corba,comp.lang.java.corba,borland.public.jbuilder.corba-rmi