Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Inheritance in Pimpl idiom

Reply
Thread Tools

Inheritance in Pimpl idiom

 
 
George2 George2 is offline
Senior Member
Join Date: Feb 2008
Posts: 108
 
      03-18-2008
Hello everyone,


Why it is useless for any inheritance in Pimpl idiom? Here is the source, but no detailed reasons are provided.

http://www.gotw.ca/gotw/024.htm

--------------------
- make XImpl entirely the class that X would have been, and write X as only the public interface made up entirely of simple forwarding functions (a handle/body variant).

This is useful in a few restricted cases, and has the benefit of avoiding a back pointer since all services are available in the pimpl class. The chief drawback is that it normally makes the visible class useless for any inheritance, as either a base or a derived class.
--------------------


thanks in advance,
George
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
pimpl idiom and singletons Noah Roberts C++ 4 05-25-2007 06:00 PM
friendship and pImpl idiom jimmy C++ 3 02-09-2006 03:21 AM
Pimpl idiom and member function templates Peteris Krumins C++ 2 08-31-2005 04:58 PM
Is the Bridge Pattern the same as Herb Sutter's Pimpl Idiom? Debajit Adhikary C++ 2 07-15-2004 01:25 PM
Pimpl Idiom Icosahedron C++ 7 11-22-2003 11:34 PM



Advertisments