当你试图解决一个你不理解的问题时,复杂化就产成了。 复合和委托的区别,前者是类的成员对象,后者是类的成员指针,指向外部对象。 内容 创建型模式 Singleton模式 Builder模式 Prototype模式 Factory Method模式 Abstract Factory模式 动作型模式 Iterator模式 Template Method模式 Mediator模式 Observer模式 Visitor模式 Chain-of-Responsibility模式 State模式 Memento模式 Command模式 Interpreter模式 结构型模式 Facade模式 Adapter模式 Bridge模式 Composite模式 Decorator模式 Flyweight模式 Proxy模式 Strategy模式