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=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,1cab630edaf05f3d X-Google-Attributes: gid103376,public From: Mark Lundquist Subject: Re: entry references Date: 1999/09/14 Message-ID: <37DEAD47.B46E5457@rational.com>#1/1 X-Deja-AN: 525128245 Content-Transfer-Encoding: 7bit References: <37DE6FC9.51FD00CE@york.ac.uk> Organization: Rational Software Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 1999-09-14T00:00:00+00:00 List-Id: Ian Thomson wrote: > Does anyone know how I can reference a protected entry? > > I am trying to write a generic package that will operate > as an indirection to protected entries- and I can find no > way of referncing the entry. > > I tried renaming the entry as a procedure, then passing > this as a generic parameter, but you then get procedure- > like blocking, which defeats the object. > I'm not sure what you mean by "procedure-like blocking". What is true is that when you rename the entry you lose its "entry-ness", so for instance you cannot call it in places where an entry call is required, like an asynchronous select, conditional entry call, etc. > You also cannot declare access to subprogram types for > entries. > Right, because they are not subprograms. > any ideas? thanks, > It sounds like you are wishing there were such a thing as a "generic formal entry" parameter. Is that the idea? Without knowing exactly what you're up to, it's hard to say (for instance, what kind of genericity are you trying to achieve?) One suggestion is that your protected type can have a discriminant, and that discriminant can be an access discriminant, and in particular it can be a classwide access discriminant. This allows your protected type in effect to serve as the root of a type hierarchy, even though protected types themselves can't be extended. If this ends up solving your problem, it may turn out that your package doesn't even have to be generic after all -- as I said before, it's hard to know without more detail... -- Mark Lundquist Senior Software Engineer Rational Software Development Solutions Business Unit UNIX Suites Group Aloha, OR, USA