From: Andrew Shvets <andrew.shvets@gmail.com>
Subject: Re: Instantiating package problems
Date: Sun, 10 Jan 2016 13:58:39 -0800 (PST)
Date: 2016-01-10T13:58:39-08:00 [thread overview]
Message-ID: <a403e023-860e-493c-9e23-7fcd1eaea2cc@googlegroups.com> (raw)
In-Reply-To: <n6ujhk$otp$1@dont-email.me>
On Sunday, January 10, 2016 at 4:50:15 PM UTC-5, Georg Bauhaus wrote:
> On 10.01.16 20:43, Andrew Shvets wrote:
> >
> > When you instantiate a record (which is described in the private portion of a package), does that mean that the insides (the different types, lists, arrays, etc.) that compose it are not visible to others except through setter and getter methods?
> >
>
> when a type is declared as a private type in some page P,
>
> package P is
>
> type T ... is ... private;
>
> then, outside the package, only public operations are visible,
> basically anything that follows the declaration until another
> "private" introduces the private part of P. Hence, no data
> components of any object of type P.T declared outside.
>
> Suppose
>
> package P is
> type T is private;
> procedure op1 (Object : in out T);
> private
> type T is record
> c1 : T1 := Foo(N);
> c2 : T2;
> end record;
> end P;
>
> then I think it is fair to say this C++ type is an analogue,
> perhaps declared in a file "p.hpp", or in namespace P:
>
> struct T {
> private:
> T1 c1;
> T2 c2;
> public:
> T() : c1(foo(n))
> {
> }
> void op1(void);
> };
Thanks for your reply. I understand now.
next prev parent reply other threads:[~2016-01-10 21:58 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-03 18:40 Instantiating package problems Andrew Shvets
2016-01-03 20:27 ` Georg Bauhaus
2016-01-03 21:21 ` Andrew Shvets
2016-01-03 21:04 ` Jeffrey R. Carter
2016-01-03 21:27 ` Andrew Shvets
2016-01-03 22:39 ` Jeffrey R. Carter
2016-01-03 22:08 ` Bob Duff
2016-01-04 0:07 ` Andrew Shvets
2016-01-04 0:30 ` Andrew Shvets
2016-01-04 13:43 ` G.B.
2016-01-04 14:23 ` Brian Drummond
2016-01-04 20:49 ` Anh Vo
2016-01-04 21:10 ` Dmitry A. Kazakov
2016-01-04 22:39 ` Anh Vo
2016-01-05 1:42 ` Anh Vo
2016-01-05 7:35 ` Dmitry A. Kazakov
2016-01-06 2:46 ` Andrew Shvets
2016-01-06 8:53 ` Dmitry A. Kazakov
2016-01-06 3:30 ` Andrew Shvets
2016-01-06 4:51 ` Anh Vo
2016-01-06 4:54 ` Anh Vo
2016-01-06 5:00 ` Andrew Shvets
2016-01-06 5:07 ` Anh Vo
2016-01-07 4:41 ` Andrew Shvets
2016-01-07 5:41 ` Anh Vo
2016-01-09 20:14 ` Andrew Shvets
2016-01-10 19:43 ` Andrew Shvets
2016-01-10 21:38 ` Jeffrey R. Carter
2016-01-10 21:50 ` Georg Bauhaus
2016-01-10 21:58 ` Andrew Shvets [this message]
2016-01-06 13:07 ` G.B.
2016-01-07 4:42 ` Andrew Shvets
2016-01-06 14:25 ` Bob Duff
2016-01-06 23:48 ` Anh Vo
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox