
design pattern
yuyunliuhen
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Factory Method
class Product{};//-----------------------------------------------------------------------------//first implementationtypedef int ProductId;const int MINE = 1;const int YOURS = 2;const int THEIRS = 3;class MyProduct : public Product{原创 2010-07-22 10:44:00 · 451 阅读 · 0 评论 -
Strategy
typedef float Coord;Coord coords[] = { 1,2,3 };int b[] = { 1,2,2 };#if 0class Compositor {public: void Compose(){}};class Compo原创 2011-09-01 18:44:08 · 865 阅读 · 1 评论 -
State
class TCPOctetStream;class TCPState;class TCPConnection {public: TCPConnection(); /* */ void ActiveOpen(); void PassiveOpen(); vo原创 2011-09-07 16:27:28 · 704 阅读 · 0 评论 -
template method
// imple1 use inherit// class forward declareclass record;class primary_key;class genereate_table_algoritem1{public: genereate_table_algoritem1(const std::string& __table) { } virtual原创 2012-06-10 12:02:52 · 886 阅读 · 0 评论