I was reading about builder patters from the http://en.wikibooks.org/wiki/C%2B%2B_Programming/Code/Design_Patterns#Creational_Patterns link and the code below seems to use idea similar to pimpl idiom by having a pointer to pizzaBuilder in the Class Cook as the private member. Is there any overlap between pimp idioms and how it used in designer patterns?
class Cook
{
public:
void setPizzaBuilder(PizzaBuilder* pb)
{
m_pizzaBuilder = pb;
}
Pizza* getPizza()
{
return m_pizzaBuilder->getPizza();
}
void constructPizza()
{
m_pizzaBuilder->createNewPizzaProduct();
m_pizzaBuilder->buildDough();
m_pizzaBuilder->buildSauce();
m_pizzaBuilder->buildTopping();
}
private:
PizzaBuilder* m_pizzaBuilder;
};