From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: * X-Spam-Status: No, score=1.6 required=5.0 tests=BAYES_05,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,248f80acc3d5ccb3 X-Google-Attributes: gid103376,public From: Andy Subject: Re: Objects properties - Ada design issues question Date: 2000/02/06 Message-ID: <389CEEF8.69E7@nospam.com.tj>#1/1 X-Deja-AN: 582127439 Cache-Post-Path: news.ozonline.com.au!unknown@melb-pool-170.ozonline.com.au Content-Transfer-Encoding: 7bit References: <877lgklryd.fsf@deneb.cygnus.argh.org> Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@connect.com.au X-Trace: perki.connect.com.au 949805260 26417 203.4.248.42 (6 Feb 2000 02:47:40 GMT) Organization: Australia On Line Pty Ltd Mime-Version: 1.0 Reply-To: andy@nospam.com.tj NNTP-Posting-Date: 6 Feb 2000 02:47:40 GMT Newsgroups: comp.lang.ada Date: 2000-02-06T02:47:40+00:00 List-Id: Vladimir Olensky wrote: > > Problem arises ( as I described in previous message) when we want > to define common interface to the set of objects ("Black Boxes") derived > from some root class and we do not know in advance properties for > particular derived object that should be revealed to the client. In > addition that properties could be very different for different derived > classes. > > Problem with standard Get and Set approach is that you need to extend > interface for each derived type and this breaks our intention to have > common interface with some limited set of operations to each "Black Box" > component. > > So it would be nice to have common interface to different properties > (that are not known in advance) of different kind of objects. > So here use of ":=" as a standard Get Set operator for any property > is very useful. We just define in the private part of the implementation > what this operator does for each particular property without disturbing > public interface. > But the fact that you would like declare these as properties in a child class changes the 'common interface'. If a child class has a new property (as can be done in Delphi) or defines additional Get/Set operations as is done in Ada 95 - what's the difference. You cannot access these via the common interface defined for the root class. Or am I missing something? As do your orginal question. One models Delphi properties with Get and Set operations. Although syntacically different, they provide essentially the same operation. ___________________________________________ Andy Starritt ___________________________________________