comp.lang.ada
 help / color / mirror / Atom feed
* Visibility of private packages??
@ 2002-07-30 21:23 Peter Coventry
  2002-07-31  9:13 ` John McCabe
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Peter Coventry @ 2002-07-30 21:23 UTC (permalink / raw)


I am trying to get my head around the visibility rules applicable to private
packages.

If I have the following package hierarchy:

           A
        /      \
     A.B1   A.B2
    /
 A.B1.C1

A.B1 contains the interface that I wish to export to clients (i.e a type
plus routines for client manipulation).
A.B1.C1 contains additional routines for the type not meant for client use.
A.B2 contains some inner workings, that need to use the additional routines
in A.B1.C1.

I want to make A.B1.C1 a private package to stop it from being misused by
clients, however the compiler disallows it, citing RM 10.1.2(8):

" If a with_clause of a given compilation_unit mentions a private child of
some library unit, then the given compilation_unit shall be either the
declaration of a private descendant of that library unit or the body or
subunit of a (public or private) descendant of that library unit."

Does this mean that if A.B1.C1 is private, it can only be withed by the
bodies of A.B1 and other descendants of A.B1, and specs of private packages
of descendants of A.B1?

If this is the case, how could I structure things to give the desired
effect?

Thanks.





^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2002-08-14 19:42 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-07-30 21:23 Visibility of private packages?? Peter Coventry
2002-07-31  9:13 ` John McCabe
2002-07-31 12:06   ` Dale Stanbrough
2002-07-31 13:30     ` Robert A Duff
2002-08-14  1:16       ` Randy Brukardt
2002-08-14  9:53         ` Dale Stanbrough
2002-08-14 17:03           ` Robert Dewar
2002-08-14 19:42           ` Randy Brukardt
2002-07-31 11:55 ` Jean-Pierre Rosen
2002-07-31 13:22 ` Mark Doherty
2002-07-31 17:43 ` Anh_Vo

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