00001 // Abstract Builder 00002 class PizzaBuilder 00003 { 00004 protected: 00005 std::auto_ptr<Pizza> pizza; 00006 public: 00007 PizzaBuilder() {} 00008 virtual ~PizzaBuilder() {} 00009 std::auto_ptr<Pizza> GetPizza() { return pizza; } 00010 00011 void createNewPizzaProduct() { pizza.reset (new Pizza); } 00012 00013 virtual void buildDough()=0; 00014 virtual void buildSauce()=0; 00015 virtual void buildTopping()=0; 00016 00017 }; 00018