Andrei2000年前写的这本书, 读来依然让人潸然泪下, 本书探讨的组件对Modern c++来讲非常之重要.
整篇的设计技巧也是围绕着type, 而不是常规编程的value, type编程即泛型.
整体读下来, 包括RTFS, 感觉Andrei是在做竞赛题目, 而且每道题目还尽量拿满分.
作者多次提到C++ report, C++ user journal等, 曾经的权威技术杂志, 包括自己的专栏, 的确是老一批的C++骨灰级人物.
好吧, 言归正传, 无论山有多高, 总有人可以攀爬越过, 而站在巨人的肩膀上, 我们更应坚定信念, 不撞南墙不回头!
阅读本书之前, 肯定需要先阅读GoF的Design Patterns. 其次是有一定的泛型编程经验. 借鉴并学习作者的policy based泛型组件设计技巧.
Below为阅读过程所写test case的README, 基本紧跟每一章节.
本文仅仅为一个开头, 后续再补充; 希望结合boost等优秀C++库, 来对Modern C++ Design, 及OOD Patterns有一个新的理解, 并完善此文系列.
// test case details as below:
//
{test1}: policy based template, incomplement instantiation,
partial class specialization, member function specialization.
{test2}: partial class specialization, type based compile time selection.
compile time convertibility and inheritance.
{test3}: typelist, typetraits, recursive template parameter types,
compile time programming, virtual table layout.
{test4}: small object allocation, policy based.
SmallObject->SmallObjectBase->Singleton(SmallObjAllocator)->FixedAllocators->Vector.
{test5}: generalized functor, copy and move(c++0x). move need class supports ctor(&&) and operator=(&&) syntax.
{test6}: singleton implementation.
{test7}: smart pointers.
{test8}: object factory, abstract factory.
{test9}: visitor pattern, visitable classes and visitor classes,
jump from visitable hierarchy to visitor hierarchy, and then visit visitable object, done.
{testA}: multimethod, call overload methods with multiple objects(derived class object) as arguments.
{testB}: multithread.
阅读(1056) | 评论(0) | 转发(0) |