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,a64004e5f547b1ed X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-06-18 06:41:18 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!newshunter!cosy.sbg.ac.at!fu-berlin.de!uni-berlin.de!pd9e1f61e.dip.t-dialin.NET!not-for-mail From: Immanuel Scholz Newsgroups: comp.lang.ada Subject: Re: more to ada paper critic Date: Tue, 18 Jun 2002 15:42:42 +0200 Message-ID: References: <4519e058.0206170923.5b278bfe@posting.google.com> <3D0E2559.1080909@mail.com> NNTP-Posting-Host: pd9e1f61e.dip.t-dialin.net (217.225.246.30) Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: fu-berlin.de 1024407677 8871284 217.225.246.30 (16 [100557]) User-Agent: KNode/0.6.1 Xref: archiver1.google.com comp.lang.ada:26234 Date: 2002-06-18T15:42:42+02:00 List-Id: Hyman Rosen wrote: > //-----widget.h------- > class WidgetImpl; // forward declare class > class Widget > { > auto_ptr pImpl; // OK for WidgetImpl to be incomplete type > public: > Widget(); > void method1(); > void method2(); > }; > //-----widget.cpp----- > class WidgetImpl > { > public: > void method1() { } > void method2() { } > }; > Widget::Widget() : pImpl(new WidgetImpl) { } > void Widget::method1() { pImpl->method1(); } > void Widget::method2() { pImpl->method2(); } Yes, but I would do it with references instead of pointer ;-) Immanuel Scholz