comp.lang.ada
 help / color / mirror / Atom feed
From: rtcoslet@rockwellcollins.com (R. Tim Coslet)
Subject: Re: How Can I Create A Class Dynamically
Date: 2 Oct 2001 16:13:32 -0700
Date: 2001-10-02T23:13:32+00:00	[thread overview]
Message-ID: <cf2a9c38.0110021513.4df0f30b@posting.google.com> (raw)
In-Reply-To: slrn9rgoo2.k8.lutz@taranis.iks-jena.de

lutz@iks-jena.de (Lutz Donnerhacke) wrote in message news:<slrn9rgoo2.k8.lutz@taranis.iks-jena.de>...
> * Anthony E. Glover wrote:
> >I have a class hierarchy defined and I would like to be able to read a
> >string and then dynamically creating a pointer to an object of the type
> >specified by the string. Similar I think to class loading and class
> >factories in Java. Can this be done in Ada95. If so, how. I have looked at
> >the Ada.Tags packages and this looks like it might be helpfull, but I'm not
> >quite sure how to make use of it. I would basically like to be able to avoid
> >having to specify a case statement or if block when initially creating my
> >objects.
> 
> IMHO this is not possible, due to missing typeness.

Have you looked at the package Ada.Streams.Stream_IO ?

This package was designed specifically to allow input/output of tagged
types (the file is NOT a text file however).

Even if Stream_IO isn't exactly what you are looking for you might
find some clues here as to how to do what you need.



  reply	other threads:[~2001-10-02 23:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-09-24 16:32 How Can I Create A Class Dynamically Anthony E. Glover
2001-09-24 16:48 ` Samuel Tardieu
2001-09-25 12:40   ` Anthony E. Glover
2001-10-01 12:35 ` Lutz Donnerhacke
2001-10-02 23:13   ` R. Tim Coslet [this message]
2001-10-04  8:55     ` Lutz Donnerhacke
2001-10-04 16:39       ` Pascal Obry
2001-10-04 17:06       ` R. Tim Coslet
replies disabled

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