2014年7月26日

设计模式之单例模式

摘要: 单例模式目的:Ensure a class only has one instance, and provide a global point of access toit.保证一个类仅有一个实例,并提供一个访问它的全局访问点。C++实现在类中,定义一个私有静态成员对象;将构造函数也定义为私有的,保... 阅读全文

posted @ 2014-07-26 22:53 鹰之翔 阅读(142) 评论(0) 推荐(0) 编辑

设计模式之原型模式

摘要: 原型模式目的:Specify the kinds of objects to create using a prototypical instance, and createnew objects by copying this prototype.用原型实例指定创建对象的种类,并且通过拷贝这些原型... 阅读全文

posted @ 2014-07-26 22:47 鹰之翔 阅读(154) 评论(0) 推荐(0) 编辑

设计模式之建造者模式

摘要: 建造者目的:Separate the construction of a complex object from its representation so thatthe same construction process can create different representations.... 阅读全文

posted @ 2014-07-26 22:40 鹰之翔 阅读(150) 评论(0) 推荐(0) 编辑

导航