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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,b3e32a261c552ef1 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2000-12-12 13:59:15 PST Path: supernews.google.com!sn-xit-02!supernews.com!216.227.56.88.MISMATCH!telocity-west!TELOCITY!cyclone.bc.net!arclight.uoregon.edu!hammer.uoregon.edu!skates!not-for-mail From: Stephen Leake Newsgroups: comp.lang.ada Subject: Re: Ada OOP question Date: 12 Dec 2000 16:57:58 -0500 Organization: NASA Goddard Space Flight Center Message-ID: References: <20001209101904.07653.00004016@ng-fy1.aol.com> NNTP-Posting-Host: anarres.gsfc.nasa.gov Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: skates.gsfc.nasa.gov 976658985 25978 128.183.220.71 (12 Dec 2000 22:09:45 GMT) X-Complaints-To: dscoggin@cne-odin.gsfc.nasa.gov NNTP-Posting-Date: 12 Dec 2000 22:09:45 GMT User-Agent: Gnus/5.0803 (Gnus v5.8.3) Emacs/20.6 Xref: supernews.google.com comp.lang.ada:3016 Date: 2000-12-12T22:09:45+00:00 List-Id: hdhil@aol.com (HDhil) writes: > Simple question re Ada OOP: Does Ada 95 allow > the specification of public components? One solution is: package My_Package is type My_Object_Private is private; type My_Object is record public_1 : foo; public_2 : bar; private_1 : My_Object_Private; end type; private type My_Object_Private is record private_stuff : foo_bar; end record; end My_Package; Clients of this package can copy private_1, but can't examine inside it. If copying is bad, use a limited private type. -- -- Stephe