From: tmoran@acm.org
Subject: Re: Translating C++ class types into Ada tagged types?
Date: Tue, 10 Jul 2007 01:27:00 -0500
Date: 2007-07-10T01:27:00-05:00 [thread overview]
Message-ID: <YYydnZywPr0puw7bnZ2dnUVZ_t6qnZ2d@comcast.com> (raw)
In-Reply-To: 1184038007.190905.237050@x35g2000prf.googlegroups.com
You can force the user to give an initial age by
package Animals is
type Cat(Initial_Age : Positive) is tagged private;
...
type Cat(Initial_Age : Positive) is tagged record
Age : Positive := Initial_Age;
end record;
...
Frisky : Animals.Cat(Initial_Age => 0);
If you want the initialization to be significantly more complicated
than that, you can make type Cat controlled, with Initialize and
Finalize procedures.
next prev parent reply other threads:[~2007-07-10 6:27 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-10 1:39 Translating C++ class types into Ada tagged types? markus034
2007-07-10 2:12 ` jimmaureenrogers
2007-07-10 3:26 ` markus034
2007-07-10 6:27 ` tmoran [this message]
2007-07-18 10:27 ` Gerd
2007-07-18 11:58 ` Georg Bauhaus
2007-07-10 8:07 ` Georg Bauhaus
2007-07-16 5:47 ` markus034
2007-07-16 7:30 ` Georg Bauhaus
2007-07-16 17:35 ` markus034
2007-07-10 9:19 ` Patrick
2007-07-11 20:09 ` markus034
2007-07-11 23:15 ` Jeffrey Creem
2007-07-12 5:46 ` vgodunko
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox