comp.lang.ada
 help / color / mirror / Atom feed
From: "jimmaureenrogers@worldnet.att.net" <jimmaureenrogers@worldnet.att.net>
Subject: Re: Protected types and visibility of their internals
Date: Wed, 9 Jul 2008 16:22:29 -0700 (PDT)
Date: 2008-07-09T16:22:29-07:00	[thread overview]
Message-ID: <a42f0b7a-2a5e-4b25-8b48-9a096bdad81b@c58g2000hsc.googlegroups.com> (raw)
In-Reply-To: b1f2203b-ed02-4031-bcba-40c0e1b1be07@j22g2000hsf.googlegroups.com

The way that works, even if it is not quite what is desired, is:

package Stuff is
   type Some_Type is private;
   protected type Foo is
      procedure Register;
   private
      Item : Some_Type;
   end Foo;
private
   type Some_Type is new Integer;
end Stuff;

In this case only protected type Foo uses Some_Type. The composition
of
Some_Type is completely private to the enclosing package.

Jim Rogers



      parent reply	other threads:[~2008-07-09 23:22 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-08  9:57 Protected types and visibility of their internals Maciej Sobczak
2008-07-08 12:52 ` Georg Bauhaus
2008-07-08 16:13 ` Robert A Duff
2008-07-09  7:53   ` christoph.grein
2008-07-08 21:03 ` Randy Brukardt
2008-07-10 21:49   ` Maciej Sobczak
2008-07-09  5:04 ` christoph.grein
2008-07-09 13:44   ` Maciej Sobczak
2008-07-09 15:12   ` Adam Beneschan
2008-07-09 22:19 ` Stephen Leake
2008-07-09 22:38   ` Adam Beneschan
2008-07-10  0:18     ` Randy Brukardt
2008-07-10  0:18     ` Randy Brukardt
2008-07-09 23:22 ` jimmaureenrogers [this message]
replies disabled

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