comp.lang.ada
 help / color / mirror / Atom feed
* Dynamic Dispatch Example
@ 1999-06-03  0:00 Cameron McAllister
  1999-06-03  0:00 ` David C. Hoos, Sr.
  0 siblings, 1 reply; 5+ messages in thread
From: Cameron McAllister @ 1999-06-03  0:00 UTC (permalink / raw)


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.

ta

cameron mcallister

#####################################################################

		     MMMMMMMMMMMMMMM, Ham.

#####################################################################





^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Dynamic Dispatch Example
  1999-06-03  0:00 Dynamic Dispatch Example Cameron McAllister
@ 1999-06-03  0:00 ` David C. Hoos, Sr.
  1999-06-03  0:00   ` Ehud Lamm
       [not found]   ` <375988c5.24607669@news.geccs.gecm.com>
  0 siblings, 2 replies; 5+ messages in thread
From: David C. Hoos, Sr. @ 1999-06-03  0:00 UTC (permalink / raw)



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.








^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Dynamic Dispatch Example
  1999-06-03  0:00 ` David C. Hoos, Sr.
@ 1999-06-03  0:00   ` Ehud Lamm
  1999-06-06  0:00     ` David Botton
       [not found]   ` <375988c5.24607669@news.geccs.gecm.com>
  1 sibling, 1 reply; 5+ messages in thread
From: Ehud Lamm @ 1999-06-03  0:00 UTC (permalink / raw)


My home page a has an example of a simple polymorphic linked list which
shows the use of dispatching among other Ada OO features. 
The example is also in the Ada Source Code Treasury (aka AdaPower).
I also suggest checking out the ada Rational (section II chapter 4) for
many useful examples.

Ehud Lamm     mslamm@pluto.mscc.huji.ac.il
http://www2.cybercities.com/e/ehud     <= Misc. Me
http://www2.cybercities.com/e/ehud/ada <= Misc. Ada stuff





^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Dynamic Dispatch Example
       [not found]   ` <375988c5.24607669@news.geccs.gecm.com>
@ 1999-06-03  0:00     ` David C. Hoos, Sr.
  0 siblings, 0 replies; 5+ messages in thread
From: David C. Hoos, Sr. @ 1999-06-03  0:00 UTC (permalink / raw)



Brian Orpin wrote in message <375988c5.24607669@news.geccs.gecm.com>...
<snip>
>As an aside if you ever have a problem with this in Windows then rename
>the file from xxxx_tar.gz (the name given on download) to xxxxx.tar.gz
>after download and Winzip will open the file fine.

The reason I hard link to both file extensions is because when your browser
is set up to automatically invoke WinZip (i.e., before you get a chance to
rename)
WinZip gets confused.  Then one has to go chasing for the cached file and
rename it.  Otherwise you have to give up the convenience of having the
browser automatically invoke WinZip.

My modus operandi just makes life easier for the downloader, at minimal disk
space cost to the website, or FTP site.









^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Dynamic Dispatch Example
  1999-06-03  0:00   ` Ehud Lamm
@ 1999-06-06  0:00     ` David Botton
  0 siblings, 0 replies; 5+ messages in thread
From: David Botton @ 1999-06-06  0:00 UTC (permalink / raw)


The example is at:

Ada Algorithm Related Examples
http://www.adapower.com/alg

David Botton


Ehud Lamm wrote:
> 
> My home page a has an example of a simple polymorphic linked list which
> shows the use of dispatching among other Ada OO features.
> The example is also in the Ada Source Code Treasury (aka AdaPower).
> I also suggest checking out the ada Rational (section II chapter 4) for
> many useful examples.
> 
> Ehud Lamm     mslamm@pluto.mscc.huji.ac.il
> http://www2.cybercities.com/e/ehud     <= Misc. Me
> http://www2.cybercities.com/e/ehud/ada <= Misc. Ada stuff




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~1999-06-06  0:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-06-03  0:00 Dynamic Dispatch Example Cameron McAllister
1999-06-03  0:00 ` David C. Hoos, Sr.
1999-06-03  0:00   ` Ehud Lamm
1999-06-06  0:00     ` David Botton
     [not found]   ` <375988c5.24607669@news.geccs.gecm.com>
1999-06-03  0:00     ` David C. Hoos, Sr.

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