comp.lang.ada
 help / color / mirror / Atom feed
From: "David C. Hoos, Sr." <david.c.hoos.sr@ada95.com>
Subject: Re: Dynamic Dispatch Example
Date: 1999/06/03
Date: 1999-06-03T00:00:00+00:00	[thread overview]
Message-ID: <EPZhbpar#GA.272@newstoo.hiwaay.net> (raw)
In-Reply-To: Pine.OSF.4.10.9906031352450.27920-100000@student.uq.edu.au


Cameron McAllister <s369539@student.uq.edu.au> wrote in message
news:Pine.OSF.4.10.9906031352450.27920-100000@student.uq.edu.au...
> Anyone have an Ada example of dynamic dispatching.
>
> i.e. one function that is different for a type and all its subtypes
>
> getting REally wierd errors, just need to check the dynamic dispatch.
>
look at the small demo application at
ftp://ada95.com/pub/pet_store.tgz
or  ftp://ada95.com/pub/pet_store.tar.gz

The two files are identical (hard-linked) because Windows isn't
friendly to the .tar.gz extension, and Netscape on UNIX isn't
friendly to .tgz extension.

The type hierarchy has an abstract type at the root of the class,
then another abstract derived type, and then concrete (i.e., non-
abstract) derived types.

There is an example of an abstract function which must be
overridden for each concrete derived type, and an example of a
classwide function which is the same for all types derived from
the root type.

I hope this example helps.








  reply	other threads:[~1999-06-03  0:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-06-03  0:00 Dynamic Dispatch Example Cameron McAllister
1999-06-03  0:00 ` David C. Hoos, Sr. [this message]
     [not found]   ` <375988c5.24607669@news.geccs.gecm.com>
1999-06-03  0:00     ` David C. Hoos, Sr.
1999-06-03  0:00   ` Ehud Lamm
1999-06-06  0:00     ` David Botton
replies disabled

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