摘要: ``` #ifndef __test__Singleton__ #define __test__Singleton__ #include class Singleton{ public: static Singleton* getInstance(); private: Singleton(); static Singleton* instance; }; #endif ``... 阅读全文
posted @ 2015-11-14 16:41 yufenghou 阅读(79) 评论(0) 推荐(0)
摘要: 策略模式:它定义了算法家族,分别封装起来,让他们之间可以互相替换,此模式让算法变化,不会影响到使用算法的客户。 阅读全文
posted @ 2015-11-14 11:18 yufenghou 阅读(132) 评论(0) 推荐(0)
摘要: 工厂模式 阅读全文
posted @ 2015-11-14 09:52 yufenghou 阅读(138) 评论(0) 推荐(0)