comp.lang.ada
 help / color / mirror / Atom feed
From: je@bton.ac.uk (John English)
Subject: Re: Dispatching In Generics
Date: 1997/06/09
Date: 1997-06-09T00:00:00+00:00	[thread overview]
Message-ID: <5ngq7h$mfm@saturn.brighton.ac.uk> (raw)
In-Reply-To: 3396EB36.3D14@boeing.com


Kevin Ingalls (kevin.l.ingalls@boeing.com) wrote:
: First, I can't find the Ada FAQ, so perhaps the answer to my question is
: there. If you know where it is I would appreciate the address.

http://www.adahome.com (where else!)

: Second, here is my coding question: How do I code a generic so that it
: can take the base type of a hierarchy and perform dispatching on objects
: of that type?

with Xpackage;
generic
   type T is abstract new Xpackage.X with private;
   ...
package gPackage is ...

So in gPackage, you can assume that T is descended from X and use X's
primitives.

Hope this helps.

---------------------------------------------------------------
 John English              | mailto:je@brighton.ac.uk
 Senior Lecturer           | http://www.comp.it.bton.ac.uk/je
 Dept. of Computing        | fax: (+44) 1273 642405
 University of Brighton    |
---------------------------------------------------------------




  parent reply	other threads:[~1997-06-09  0:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-06-05  0:00 Dispatching In Generics Kevin Ingalls
1997-06-07  0:00 ` Tom Moran
1997-06-09  0:00 ` Robert A Duff
1997-06-09  0:00 ` John English [this message]
  -- strict thread matches above, loose matches on Subject: below --
1997-09-11  0:00 Dispatching in Generics Kevin Ingalls
1997-09-12  0:00 ` Robert A Duff
replies disabled

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