From: Martin Krischik <martin@krischik.com>
Subject: Re: Private area and child packages
Date: Wed, 29 Dec 2004 20:05:09 +0100
Date: 2004-12-29T20:05:09+01:00 [thread overview]
Message-ID: <1371915.NSGHhXrrzR@linux1.krischik.com> (raw)
In-Reply-To: 1104293158.276241.42640@f14g2000cwb.googlegroups.com
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
next prev parent reply other threads:[~2004-12-29 19:05 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-29 4:05 Private area and child packages danmcleran
2004-12-29 4:47 ` tmoran
2004-12-29 15:10 ` danmcleran
2004-12-30 18:51 ` tmoran
2005-01-01 3:45 ` danmcleran
2004-12-29 4:49 ` Jeffrey Carter
2004-12-29 15:27 ` danmcleran
2004-12-29 16:53 ` Samuel Tardieu
2004-12-30 4:07 ` Jeffrey Carter
2004-12-30 15:31 ` danmcleran
2004-12-30 18:14 ` Jeffrey Carter
2004-12-31 17:55 ` danmcleran
[not found] ` <1104515735.052116.248180@c13g2000cwb.googlegroups.com>
2004-12-31 19:02 ` Jeffrey Carter
2004-12-29 19:05 ` Martin Krischik [this message]
2004-12-29 21:44 ` Stephen Leake
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox