From: jsa@alexandria (Jon S Anthony)
Subject: Re: Converting C++ class to Ada
Date: 1996/12/12
Date: 1996-12-12T00:00:00+00:00 [thread overview]
Message-ID: <JSA.96Dec12154929@alexandria> (raw)
In-Reply-To: 32AF3A52.1340@watson.ibm.com
In article <32AF3A52.1340@watson.ibm.com> "Norman H. Cohen" <ncohen@watson.ibm.com> writes:
> type Object_Type (<>) is limited private;
> type Reference_Type is access Object_Type;
> function New_Object (...) return Reference_Type;
>
> Outside of its defining package, Object_Type is indefinite, so an object
> of the type can only be created if an initial value is specified for it
> (in an object declaration or allocator), but Object_Type is also
> limited, so no initial value can be specified for an object of this
> type! In other words, an Object_Type object cannot be declared or
> allocated outside its defining package. The corresponding full type
> need not be either limited or indefinite, so inside the package body you
^^^^^^^^^^^^^^^^^^^^^^^^^^
> are free to allocate objects of the type and return the resulting access
> values to the caller. (Another example of this approach can be found on
> pages 489-490 of Ada as a Second Language.)
Note that this is _not_ true if the type is tagged...
/Jon
--
Jon Anthony
Organon Motives, Inc.
Belmont, MA 02178
617.484.3383
jsa@organon.com
next prev parent reply other threads:[~1996-12-12 0:00 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-12-10 0:00 Converting C++ class to Ada Ken Garlington
1996-12-11 0:00 ` Norman H. Cohen
1996-12-12 0:00 ` Jon S Anthony [this message]
1996-12-11 0:00 ` Jon S Anthony
1996-12-12 0:00 ` Ken Garlington
1996-12-18 0:00 ` Jon S Anthony
1996-12-18 0:00 ` Matthew Heaney
1996-12-19 0:00 ` Robert A Duff
1996-12-20 0:00 ` Stephen Leake
1996-12-20 0:00 ` Robert A Duff
1996-12-20 0:00 ` Jon S Anthony
1996-12-20 0:00 ` Mitch Gart
1996-12-20 0:00 ` Norman H. Cohen
1996-12-21 0:00 ` Jon S Anthony
1996-12-11 0:00 ` Larry Kilgallen
1996-12-11 0:00 ` Stephen Leake
1996-12-13 0:00 ` Stephen Leake
1996-12-12 0:00 ` Dale Stanbrough
1996-12-12 0:00 ` Constructors for Ada (was: Converting C++ class to Ada) Matthew Heaney
1996-12-13 0:00 ` Norman H. Cohen
1996-12-13 0:00 ` Matthew Heaney
1996-12-17 0:00 ` Robert I. Eachus
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox