comp.lang.ada
 help / color / mirror / Atom feed
From: lutz@iks-jena.de (Lutz Donnerhacke)
Subject: Re: How Can I Create A Class Dynamically
Date: Thu, 4 Oct 2001 08:55:24 +0000 (UTC)
Date: 2001-10-04T08:55:24+00:00	[thread overview]
Message-ID: <slrn9ro8vr.4a.lutz@taranis.iks-jena.de> (raw)
In-Reply-To: cf2a9c38.0110021513.4df0f30b@posting.google.com

* R. Tim Coslet wrote:
>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).

I wonder if Stream_IO is able to read instances of derivated types unknown
at the compile time of the programm. I'd look at the Objective-* Code.



  reply	other threads:[~2001-10-04  8:55 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
2001-10-04  8:55     ` Lutz Donnerhacke [this message]
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