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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,93d7def3eeefbc26 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!proxad.net!news.cs.univ-paris8.fr!news.zanker.org!newsfeed00.sul.t-online.de!newsmm00.sul.t-online.de!t-online.de!news.t-online.com!not-for-mail From: Martin Krischik Newsgroups: comp.lang.ada Subject: Re: Private area and child packages Date: Wed, 29 Dec 2004 20:05:09 +0100 Organization: None Message-ID: <1371915.NSGHhXrrzR@linux1.krischik.com> References: <1104293158.276241.42640@f14g2000cwb.googlegroups.com> Reply-To: martin@krischik.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: news.t-online.com 1104347406 02 14040 9-asrBm12qDlZ5P 041229 19:10:06 X-Complaints-To: usenet-abuse@t-online.de X-ID: GDRE6mZGZeA7LbKkE1eSqjnk9F-HQPhgvFZgiWS1rdQXG8l3Wdr3wC User-Agent: KNode/0.8.0 Xref: g2news1.google.com comp.lang.ada:7306 Date: 2004-12-29T20:05:09+01:00 List-Id: danmcleran@hotmail.com wrote: > Is there any way to do this? In C++, there is something called the > PIMPL idiom, where you hide implementation detail by holding a pointer > to an incomplete class, like this: > //SecretClass.h > > class Implementation;//Class not yet fully defined > > class SecretClass > { > public: > //publicly visible stuff > private: > Implementation* pImplementation; using: Implementation& pImplementation; will prevent the generation of a faulty operator = () ;-). You then use: pImplementation = *new Implementation; delete &pImplementation ; Looky wacky but is perfectly legal. > }; You do it the same way in Ada as in C. Use: type Implementation_Type; type Implementation is access Implementation_Type; With Regards Martin -- mailto://krischik@users.sourceforge.net http://www.ada.krischik.com