摘要: 工厂模式:只能生产一个产品(单一产品,具体什么工厂就生产什么产品) 下面例子中就是A工厂生产具体A产品,B工厂生产具体B产品!C++代码:#include using namespace std;// 工厂方法... 阅读全文
posted @ 2014-04-08 22:47 jadeshu 阅读(79) 评论(0) 推荐(0) 编辑
摘要: #include using namespace std;//具体产品类型typedef enum _ProductType{ ProductTypeA, ProductTypeB}ProductType;//... 阅读全文
posted @ 2014-04-08 19:59 jadeshu 阅读(63) 评论(0) 推荐(0) 编辑