From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=0.4 required=5.0 tests=BAYES_00,FORGED_MUA_MOZILLA autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,9081ae7069434ca5 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.213.68 with SMTP id nq4mr2070820pbc.2.1328815801200; Thu, 09 Feb 2012 11:30:01 -0800 (PST) Path: wr5ni5945pbc.0!nntp.google.com!news2.google.com!border1.nntp.dca.giganews.com!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newsgate.cuhk.edu.hk!news.netfront.net!not-for-mail From: Jeffrey Carter Newsgroups: comp.lang.ada Subject: Re: Publishing selected entries in a protected object? Date: Thu, 09 Feb 2012 12:29:59 -0700 Organization: Also freenews.netfront.net; news.tornevall.net Message-ID: References: <87wr7wkyp5.fsf@adaheads.sparre-andersen.dk> NNTP-Posting-Host: 97.226.52.145 Mime-Version: 1.0 X-Trace: adenine.netfront.net 1328815800 58758 97.226.52.145 (9 Feb 2012 19:30:00 GMT) X-Complaints-To: news@netfront.net NNTP-Posting-Date: Thu, 9 Feb 2012 19:30:00 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux i686; rv:9.0) Gecko/20111229 Thunderbird/9.0 In-Reply-To: <87wr7wkyp5.fsf@adaheads.sparre-andersen.dk> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Date: 2012-02-09T12:29:59-07:00 List-Id: On 02/09/2012 04:56 AM, 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. > > Since I want to be able to use the entry in a select statement, I can't > just encapsulate it in a procedure and make that available in the > package specification. > > And if I move the declaration of the protected object to the package > specification, but move the other entries to the private part of the > protected object, I can't access the other entries from the private part > of my package. package P is protected Public is entry E; end Public; end P; package body P is protected Hidden is entry E; entry Internal; private -- Hidden ... end Hidden; protected body Public is entry E when True is -- null; begin -- E requeue Hidden.E [with abort]; end E; end Public; ... end P; -- Jeff Carter "IMHO, Interfaces are worthless." Randy Brukardt 117 --- Posted via news://freenews.netfront.net/ - Complaints to news@netfront.net ---