Solved

What is the difference between a Bridge pattern and a Pimpl?

Posted on 2004-10-05
3
749 Views
Last Modified: 2008-03-17
I'm reading Design Pattern, and it's description of a Bridge pattern sounds a lot like a Pimpl.

What is the difference between a Bridge pattern and a Pimpl?

Please give example, because that's the best way I can understand it.
0
Comment
Question by:TomoMaili
  • 3
3 Comments
 
LVL 30

Expert Comment

by:Axter
ID: 12231596
The pimpl idiom is useful for reducing physical compile time dependencies. In larger projects, reducing compile times can be very important.
The purpose of Bridge is to allow a Class to be extended in two independent ways.
0
 
LVL 30

Accepted Solution

by:
Axter earned 500 total points
ID: 12231618
With Herb Sutter's Pimpl Idiom the outside class is not an "Abstraction" and
the inside class can only be of one specific type. With (Design Patterns) Bridge
pattern, the outside class is a true abstraction that can be implemented
in any of several different ways, while the inner class is *also* an
abstraction that can be implemented in any of several different ways.
0
 
LVL 30

Expert Comment

by:Axter
ID: 12231909
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Retrieve PID of MicrosoftEdge.exe with GetForegroundWindow() 6 122
how to convert c++ code to Android App 3 83
Least Squares Curve Fitting 4 61
What is sub-make ? 2 39
C++ Properties One feature missing from standard C++ that you will find in many other Object Oriented Programming languages is something called a Property (http://www.experts-exchange.com/Programming/Languages/CPP/A_3912-Object-Properties-in-C.ht…
Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now