摘要: 第一章:Policy-Based Class DesignPolicy Class (Template)下面的这些Creater叫做“policy class (template)”。它们类似于设计模式里的strategy。它们是语法导向(syntax oriented),而不是标记导向(signature oriented)。换句话说,这些Creater定义的是”怎样的语法构造符合其所规范的class”,而不是“必须实例化那些函数”。template <class T>struct OpNewCreator{ static T* Create() { return ... 阅读全文
posted @ 2011-12-28 12:16 大兵八世 阅读(851) 评论(0) 推荐(0)