設計模式-組合模式

適用情境:把操做簡單對象和複雜對象的接口統一,使得客戶端使用組合對象和簡單對象的方式一致.ios // component.h #ifndef COMPONENT_H #define COMPONENT_H #include <string> class Component { public: Component(std::string strName); virtual vo
相關文章
相關標籤/搜索