From: Stephen Leake <stephen.a.leake.1@gsfc.nasa.gov>
Subject: Re: worth the hassle?
Date: 22 Jul 2002 14:06:31 -0400
Date: 2002-07-22T18:15:20+00:00 [thread overview]
Message-ID: <ud6tfljrs.fsf@gsfc.nasa.gov> (raw)
In-Reply-To: xHX_8.1635$tg4.100380@newsfep1-win.server.ntli.net
"chris.danx" <spamoff.danx@ntlworld.com> writes:
> hmm, problem...
> <snip code>
>
> Let's say we have 2 types (a_type & b_type) derived from a single type,
> base_type and we want to store objects of all three types in the *same
> list*. How do we code assign for this situation? What happens if the
> derved classes are not known before hand? Is it even possible to put the
> all the types in the same list?
Use a class-wide access type in the list:
type Element_Access is access all Element_Type'class;
To mangle someone else's quote: "there is almost no problem in
computer science that a layer of indirection won't solve".
--
-- Stephe
next prev parent reply other threads:[~2002-07-22 18:06 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-07-22 16:56 worth the hassle? chris.danx
2002-07-22 17:17 ` Wes Groleau
2002-07-22 17:45 ` chris.danx
2002-07-22 19:05 ` Wes Groleau
2002-07-22 17:56 ` chris.danx
2002-07-22 18:06 ` Stephen Leake [this message]
2002-07-22 21:06 ` chris.danx
2002-07-23 12:16 ` chris.danx
2002-07-23 12:36 ` chris.danx
2002-07-23 15:00 ` Stephen Leake
2002-07-23 15:15 ` chris.danx
2002-07-23 15:36 ` chris.danx
2002-07-23 16:19 ` Peter Hermann
2002-07-23 16:41 ` chris.danx
2002-07-23 17:35 ` Stephen Leake
2002-07-22 17:58 ` Stephen Leake
2002-07-22 18:15 ` Frank J. Lhota
2002-07-22 19:56 ` Stephen Leake
2002-07-23 5:56 ` Kevin Cline
2002-07-22 18:44 ` chris.danx
2002-07-23 5:39 ` Kevin Cline
2002-07-23 15:05 ` Stephen Leake
2002-07-23 18:34 ` Perhaps we keep lists elements private and adjust the elements to fit? Chad R. Meiners
2002-07-23 19:23 ` Stephen Leake
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox