Git Product home page Git Product logo

design_pattern's Introduction

经典设计模式

部分项目对于类的定义不规范

  1. 类的定义与实现应该分开放在头文件和cpp文件中,这里为了将程序结构更加清晰的展现出来,才将声明和实现都放在同一个地方
  2. 基类的析构函数应该加上virsual声明,特别是抽象类
  3. 抽象类可以没有默认构造函数
  4. 抽象类型不可以作为参数(形参、函数返回值),但是抽象类型指针可以作为参数

目前完成内容

  • 观察者模式
  • 装饰者模式
  • 工厂模式
  • 单例模式
  • 命令模式
  • 对象适配器
  • 策略模式
  • 模板方法模式
  • 迭代器模式与组合模式
  • 状态模式
  • 代理模式
  • 复合模式
  • MVC
    • 其实等价于现在的MVVM

参考资料

《HeadFirst设计模式》,Eric Freeman;ElElisabeth Freeman 《Game Programming Patterns》

design_pattern's People

Contributors

roudersky avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.