Solved

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

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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
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 difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
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.

757 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

20 Experts available now in Live!

Get 1:1 Help Now