comp.lang.ada
 help / color / mirror / Atom feed
* Runtime object type determination/ runtime generic instantiation
@ 1997-11-06  0:00 Anthony Jenkins
  1997-11-08  0:00 ` Jon S Anthony
  0 siblings, 1 reply; 3+ messages in thread
From: Anthony Jenkins @ 1997-11-06  0:00 UTC (permalink / raw)



I'm having to instantiate a generic package which can use any private
type (equality/assignment methods defined) for a type specified in a
file.  e.g. the string "character" would be read from a file and I'd
have to use my package instantiated for the type 'character'.

If runtime generic instantiation were possible I could avoid
instantiating the package for every single non-limited type there is,
and if runtime object type determination were possible I was thinking I
could determine how to handle the type in the package body at runtime
(since strings I believe are non-limited and differ substantially from
scalar non-limited types in their handling).

The package I have to create is one for (un)directed graphs, where the
vertices can represent numbers, characters or strings (I'm thinking more
generically than these 3 types so I can possibly use it later) where the
node value type is given in a file.  Am I looking at this wrong?  I'm
seeing a huge (well, 3-clause) CASE statement (after instantiating each
of 3 different graph packages) that calls whatever operations are
available from the package using that type.  Anyway, thanks in advance
for any pointers.


Anthony Jenkins
http://www.auburn.edu/~jenkian
abjenkins @ mindspring , com (Death to spammers)

-------------
"God is as real as I am," the old man replied.  My faith was
restored, for I knew Santa would never lie.




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

end of thread, other threads:[~1997-11-10  0:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-11-06  0:00 Runtime object type determination/ runtime generic instantiation Anthony Jenkins
1997-11-08  0:00 ` Jon S Anthony
1997-11-10  0:00   ` Anthony Jenkins

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