设计模式-结构-Facade(外观)模式
为各个子系统提供一个简明一致的界面,隐藏系统的饿复杂性,使子系统更加易用,是子系统一组接口的包装
class SubSystem1 { public: void Operation(){} }; class SubSystem2 { public: void Operation(){} }; class Facade { public: void OperationWarpper() { s1.Operation(); s2.Operation(); } private: SubSystem1 s1; SubSystem2 s2; }; int main(int argc, char *argv[]) { Facade *facade = new Facade; facade->OperationWarpper(); return 0; }