comp.lang.ada
 help / color / mirror / Atom feed
From: Maciej Sobczak <see.my.homepage@gmail.com>
Subject: Re: Package Hierarchy and Private functions
Date: Wed, 18 Mar 2009 05:42:11 -0700 (PDT)
Date: 2009-03-18T05:42:11-07:00	[thread overview]
Message-ID: <f640b0d7-dd52-4244-8585-7c2b0c5dc5dc@z1g2000yqn.googlegroups.com> (raw)
In-Reply-To: a24dfb20-e831-4d0a-8db9-2a890e89285b@p11g2000yqe.googlegroups.com

On 18 Mar, 13:22, "RasikaSriniva...@gmail.com"
<RasikaSriniva...@gmail.com> wrote:

> Supposing we have 2 packages like :
>
> package P is
>   type Pvt_T is private ;
> private
>   type Pvt_T is ... ;
>   procedure Pvt_Proc(p : in out Pvt_T) ;
> end P ;
>
> ---------------------
>
> package P.C is
> ....
> end P.C ;
>
> ------------------
>
> Is there a way for P.C to access Pvt_Proc

Yes. Just do it.

> I guess this may be analogous to protected in C++?

Ada's private *is* analogous to protected in C++.

> Does P.C has a special relationship to P?

Yes, it can see its private (which means protected) parts.

--
Maciej Sobczak * www.msobczak.com * www.inspirel.com

Database Access Library for Ada: www.inspirel.com/soci-ada



  reply	other threads:[~2009-03-18 12:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-18 12:22 Package Hierarchy and Private functions RasikaSrinivasan
2009-03-18 12:42 ` Maciej Sobczak [this message]
2009-03-18 12:56   ` Srini -
2009-03-18 14:19 ` Robert A Duff
replies disabled

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