Solved

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

Posted on 2004-10-05
3
754 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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
TTimer no longer functioning 7 91
how to understand recursion 12 226
designing in object programming 12 80
Android development question 2 38
IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

832 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