From: AdaMagica <christ-usch.grein@t-online.de>
Subject: Re: Publishing selected entries in a protected object?
Date: Thu, 9 Feb 2012 10:24:35 -0800 (PST)
Date: 2012-02-09T10:24:35-08:00 [thread overview]
Message-ID: <a29baef4-05e1-41da-a23a-e0428cb37310@dp8g2000vbb.googlegroups.com> (raw)
In-Reply-To: 4f33d158$0$7625$9b4e6d93@newsspool1.arcor-online.net
On 9 Feb., 14:59, Georg Bauhaus <rm.dash-bauh...@futureapps.de> wrote:
> On 09.02.12 12:56, Jacob Sparre Andersen wrote:
>
> > I have a package containing a protected object, and I would like to
> > publish _one_ of this object's entries in the specification of the
> > package.
>
> Using synchronized interfaces should work?
>
> package Semi is
>
> type Half is synchronized interface;
>
> procedure Grab (PO : in out Half) is abstract
with Synchronization => By_entry; -- Ada 2012 9.5(10/3)
>
> function MakePO return Half'Class;
>
> private
>
> protected type Full is new Half with
> overriding
> entry Grab;
>
> entry Foo;
> end Full;
>
> end Semi;
>
> ...
>
> function MakePO return Half'Class is
> begin
> return Result : Full;
> end MakePO;
next prev parent reply other threads:[~2012-02-09 18:24 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-09 11:56 Publishing selected entries in a protected object? Jacob Sparre Andersen
2012-02-09 13:42 ` Dmitry A. Kazakov
2012-02-09 13:59 ` Georg Bauhaus
2012-02-09 18:24 ` AdaMagica [this message]
2012-02-10 1:29 ` Randy Brukardt
2012-02-09 19:29 ` Jeffrey Carter
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox