摘要: //方式一 //Reciever.h #pragma once class Reciever{ public: Reciever(); ~Reciever(); void Action(); protected: private: }; //Reciever.cpp #include"Recieve 阅读全文
posted @ 2019-12-23 17:49 fourmii 阅读(203) 评论(0) 推荐(0) 编辑
摘要: 以下代码来源: 设计模式精解-GoF 23种设计模式解析附C++实现源码 //Mediator.h #pragma once class Colleage; class Mediator { public: virtual ~Mediator(); virtual void DoActionFrom 阅读全文
posted @ 2019-12-23 16:52 fourmii 阅读(248) 评论(0) 推荐(0) 编辑
摘要: 以下代码来源: 设计模式精解-GoF 23种设计模式解析附C++实现源码 //Memento.h #pragma once #include<string> class Memento; class Originator{ public: typedef std::string State; Ori 阅读全文
posted @ 2019-12-23 14:42 fourmii 阅读(233) 评论(0) 推荐(0) 编辑
摘要: 以下代码来源: 设计模式精解-GoF 23种设计模式解析附C++实现源码 //Subject.h #pragma once #include<list> #include<string> typedef std::string State; class Observer; class Subject 阅读全文
posted @ 2019-12-23 10:50 fourmii 阅读(392) 评论(0) 推荐(0) 编辑