comp.lang.ada
 help / color / mirror / Atom feed
From: Florian Weimer <someone@deneb.cygnus.argh.org>
Subject: Re: Objects properties -  Ada design issues question
Date: 2000/02/08
Date: 2000-02-08T20:55:30+00:00	[thread overview]
Message-ID: <87u2jjjtx9.fsf@deneb.cygnus.argh.org> (raw)
In-Reply-To: s9mdep9idh30@corp.supernews.com

"Vladimir Olensky" <vladimir_olensky@yahoo.com> writes:

> 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.

I'm sorry, but I'm still not convinced.  This explanation suggests
that you are aiming at Java interfaces or Objective C protocols.
Certainly a nice feature, but not related to properties.

> 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.

Which derived type?  Derived from the record type, or derived from
the type of the components?  Could you show some Ada code which shows
the problem?

> This problem arises when we try to implement "Black Box" design
> model where each "Black Box" may have completely different set of
> properties but provide some common sort of functionality.

Why can't you use factory methods which create appropriate interface
classes?  This seems to achieve pretty much the same thing, and it can
be expressed directly in Ada.




      parent reply	other threads:[~2000-02-08  0:00 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-02-04  0:00 Objects properties - Ada design issues question Vladimir Olensky
2000-02-04  0:00 ` Matthew Heaney
2000-02-04  0:00 ` Vladimir Olensky
2000-02-04  0:00 ` Florian Weimer
2000-02-04  0:00   ` Samuel T. Harris
2000-02-04  0:00   ` Vladimir Olensky
2000-02-04  0:00   ` Vladimir Olensky
2000-02-06  0:00     ` Andy
2000-02-07  0:00       ` Vladimir Olensky
2000-02-10  0:00         ` Andy
2000-02-08  0:00     ` Florian Weimer [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox