├── .clang-format ├── .gitattributes ├── .github └── workflows │ └── ccpp.yml ├── .gitignore ├── .travis.yml ├── CMakeLists.txt ├── LICENSE ├── README.md ├── Template ├── Behavior │ ├── CMakeLists.txt │ └── ObserverTemplate │ │ ├── CMakeLists.txt │ │ ├── Subject.hpp │ │ └── main.cpp ├── CMakeLists.txt ├── Create │ ├── CMakeLists.txt │ └── SingletonTemplate │ │ ├── CMakeLists.txt │ │ ├── SingleTon.hpp │ │ └── main.cpp └── Struct │ └── CMakeLists.txt ├── appveyor.yml ├── code ├── Behavior │ ├── CMakeLists.txt │ ├── Command │ │ ├── CMakeLists.txt │ │ ├── DrawCanvas.h │ │ ├── DrawCommand.h │ │ ├── Drawable.h │ │ ├── ICommand.h │ │ ├── MacroCommand.h │ │ ├── README.md │ │ └── main.cpp │ ├── Interpreter │ │ ├── Add.h │ │ ├── CMakeLists.txt │ │ ├── Constant.h │ │ ├── Context.h │ │ ├── Div.h │ │ ├── Expression.h │ │ ├── Mul.h │ │ ├── README.md │ │ ├── Sub.h │ │ ├── Variable.cpp │ │ ├── Variable.h │ │ └── main.cpp │ ├── Iterator │ │ ├── Aggregate.h │ │ ├── Book.h │ │ ├── BookSelf.cpp │ │ ├── BookSelf.h │ │ ├── BookSelfIterator.cpp │ │ ├── BookSelfIterator.h │ │ ├── CMakeLists.txt │ │ ├── Iterator.h │ │ ├── README.md │ │ └── main.cpp │ ├── Mediator │ │ ├── CColleague1.h │ │ ├── CColleague2.h │ │ ├── CMakeLists.txt │ │ ├── CMediator.h │ │ ├── IColleague.h │ │ ├── IMediator.h │ │ ├── README.md │ │ └── main.cpp │ ├── Memento │ │ ├── CMakeLists.txt │ │ ├── Gamer.h │ │ ├── Memento.h │ │ ├── README.md │ │ └── main.cpp │ ├── Observer │ │ ├── CMakeLists.txt │ │ ├── DigitObserver.h │ │ ├── GraphObserver.h │ │ ├── NumGen.h │ │ ├── NumGenObserver.h │ │ ├── README.md │ │ ├── RandomNumGen.h │ │ └── main.cpp │ ├── ResponsibilityChain │ │ ├── CMakeLists.txt │ │ ├── LimitSupport.h │ │ ├── NoSupport.h │ │ ├── OddSupport.h │ │ ├── README.md │ │ ├── SpecialSupport.h │ │ ├── Support.h │ │ ├── Trouble.h │ │ └── main.cpp │ ├── State │ │ ├── CMakeLists.txt │ │ ├── DayState.cpp │ │ ├── DayState.h │ │ ├── IContext.h │ │ ├── IState.h │ │ ├── NightState.cpp │ │ ├── NightState.h │ │ ├── README.md │ │ ├── SafeFrame.cpp │ │ ├── SafeFrame.h │ │ └── main.cpp │ ├── Strategy │ │ ├── CMakeLists.txt │ │ ├── Hand.h │ │ ├── IStrategy.h │ │ ├── Player.h │ │ ├── ProbStrategy.h │ │ ├── README.md │ │ ├── WinningStrategy.h │ │ └── main.cpp │ ├── TemplateMethod │ │ ├── CMakeLists.txt │ │ ├── CharDIsplay.h │ │ ├── IDisplay.h │ │ ├── README.md │ │ ├── StringDIsplay.h │ │ └── main.cpp │ └── Visitor │ │ ├── CMakeLists.txt │ │ ├── Directory.h │ │ ├── Element.h │ │ ├── Entry.h │ │ ├── File.h │ │ ├── ListVisitor.h │ │ ├── README.md │ │ ├── Visitor.h │ │ └── main.cpp ├── CMakeLists.txt ├── Create │ ├── AbstractFactory │ │ ├── CMakeLists.txt │ │ ├── IFactory.h │ │ ├── IItem.h │ │ ├── ILink.h │ │ ├── IPage.h │ │ ├── ITray.h │ │ ├── ListFactory.h │ │ ├── ListLink.h │ │ ├── ListPage.h │ │ ├── ListTray.h │ │ ├── README.md │ │ └── main.cpp │ ├── Builder │ │ ├── CMakeLists.txt │ │ ├── Director.h │ │ ├── IBuilder.h │ │ ├── README.md │ │ ├── TextBuilder.h │ │ └── main.cpp │ ├── CMakeLists.txt │ ├── FactoryMethod │ │ ├── CMakeLists.txt │ │ ├── IDCard.h │ │ ├── IDCardFactory.h │ │ ├── IFactory.h │ │ ├── IProduct.h │ │ ├── README.md │ │ └── main.cpp │ ├── Prototype │ │ ├── CMakeLists.txt │ │ ├── IProduct.h │ │ ├── MessageBox.h │ │ ├── ProductMgr.h │ │ ├── README.md │ │ └── main.cpp │ ├── Singleton │ │ ├── CMakeLists.txt │ │ ├── README.md │ │ ├── SingleTon.h │ │ └── main.cpp │ └── Singleton_Practise │ │ ├── CMakeLists.txt │ │ ├── README.md │ │ ├── ThreeTon.h │ │ └── main.cpp └── Struct │ ├── Adapter_01 │ ├── Banner.h │ ├── CMakeLists.txt │ ├── Painter.h │ ├── PainterBanner.h │ ├── README.md │ └── main.cpp │ ├── Adapter_02 │ ├── Banner.h │ ├── CMakeLists.txt │ ├── Painter.h │ ├── PainterBanner.h │ ├── README.md │ └── main.cpp │ ├── Bridge │ ├── CMakeLists.txt │ ├── CountDisplay.h │ ├── Display.h │ ├── IDisplayImpl.h │ ├── README.md │ ├── StringDisplayImpl.h │ └── main.cpp │ ├── CMakeLists.txt │ ├── Composite │ ├── CMakeLists.txt │ ├── Directory.h │ ├── Entry.h │ ├── File.h │ ├── README.md │ └── main.cpp │ ├── Decorator │ ├── Border.h │ ├── CMakeLists.txt │ ├── FullBorder.h │ ├── IDisplay.h │ ├── README.md │ ├── SideBorder.h │ ├── StringDisplay.h │ └── main.cpp │ ├── Facade │ ├── CMakeLists.txt │ ├── Database.h │ ├── HtmlWriter.h │ ├── PageMaker.h │ ├── README.md │ └── main.cpp │ ├── FlyWeight │ ├── BigChar.h │ ├── BigCharFactory.h │ ├── CMakeLists.txt │ ├── README.md │ └── main.cpp │ └── Proxy │ ├── CMakeLists.txt │ ├── Printable.h │ ├── Printer.h │ ├── PrinterProxy.h │ ├── README.md │ └── main.cpp ├── vs_15_2017_Win64.bat ├── vs_16_2019-clang.bat └── vs_16_2019.bat /.clang-format: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/.clang-format -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/.gitattributes -------------------------------------------------------------------------------- /.github/workflows/ccpp.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/.github/workflows/ccpp.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/.gitignore -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/.travis.yml -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/CMakeLists.txt -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/README.md -------------------------------------------------------------------------------- /Template/Behavior/CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/Template/Behavior/CMakeLists.txt -------------------------------------------------------------------------------- /Template/Behavior/ObserverTemplate/CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/Template/Behavior/ObserverTemplate/CMakeLists.txt -------------------------------------------------------------------------------- /Template/Behavior/ObserverTemplate/Subject.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/Template/Behavior/ObserverTemplate/Subject.hpp -------------------------------------------------------------------------------- /Template/Behavior/ObserverTemplate/main.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/Template/Behavior/ObserverTemplate/main.cpp -------------------------------------------------------------------------------- /Template/CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/Template/CMakeLists.txt -------------------------------------------------------------------------------- /Template/Create/CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/Template/Create/CMakeLists.txt -------------------------------------------------------------------------------- /Template/Create/SingletonTemplate/CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/Template/Create/SingletonTemplate/CMakeLists.txt -------------------------------------------------------------------------------- /Template/Create/SingletonTemplate/SingleTon.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/Template/Create/SingletonTemplate/SingleTon.hpp -------------------------------------------------------------------------------- /Template/Create/SingletonTemplate/main.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/Template/Create/SingletonTemplate/main.cpp -------------------------------------------------------------------------------- /Template/Struct/CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/Template/Struct/CMakeLists.txt -------------------------------------------------------------------------------- /appveyor.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/appveyor.yml -------------------------------------------------------------------------------- /code/Behavior/CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Behavior/CMakeLists.txt -------------------------------------------------------------------------------- /code/Behavior/Command/CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Behavior/Command/CMakeLists.txt -------------------------------------------------------------------------------- /code/Behavior/Command/DrawCanvas.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Behavior/Command/DrawCanvas.h -------------------------------------------------------------------------------- /code/Behavior/Command/DrawCommand.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Behavior/Command/DrawCommand.h -------------------------------------------------------------------------------- /code/Behavior/Command/Drawable.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Behavior/Command/Drawable.h -------------------------------------------------------------------------------- /code/Behavior/Command/ICommand.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Behavior/Command/ICommand.h -------------------------------------------------------------------------------- /code/Behavior/Command/MacroCommand.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Behavior/Command/MacroCommand.h -------------------------------------------------------------------------------- /code/Behavior/Command/README.md: -------------------------------------------------------------------------------- 1 | # 命令模式 2 | 3 | 用一个类表示“请进行这项工作”的命令 -------------------------------------------------------------------------------- /code/Behavior/Command/main.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Behavior/Command/main.cpp -------------------------------------------------------------------------------- /code/Behavior/Interpreter/Add.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Behavior/Interpreter/Add.h -------------------------------------------------------------------------------- /code/Behavior/Interpreter/CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Behavior/Interpreter/CMakeLists.txt -------------------------------------------------------------------------------- /code/Behavior/Interpreter/Constant.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Behavior/Interpreter/Constant.h -------------------------------------------------------------------------------- /code/Behavior/Interpreter/Context.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Behavior/Interpreter/Context.h -------------------------------------------------------------------------------- /code/Behavior/Interpreter/Div.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Behavior/Interpreter/Div.h -------------------------------------------------------------------------------- /code/Behavior/Interpreter/Expression.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Behavior/Interpreter/Expression.h -------------------------------------------------------------------------------- /code/Behavior/Interpreter/Mul.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Behavior/Interpreter/Mul.h -------------------------------------------------------------------------------- /code/Behavior/Interpreter/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Behavior/Interpreter/README.md -------------------------------------------------------------------------------- /code/Behavior/Interpreter/Sub.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Behavior/Interpreter/Sub.h -------------------------------------------------------------------------------- /code/Behavior/Interpreter/Variable.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Behavior/Interpreter/Variable.cpp -------------------------------------------------------------------------------- /code/Behavior/Interpreter/Variable.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Behavior/Interpreter/Variable.h -------------------------------------------------------------------------------- /code/Behavior/Interpreter/main.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Behavior/Interpreter/main.cpp -------------------------------------------------------------------------------- /code/Behavior/Iterator/Aggregate.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Behavior/Iterator/Aggregate.h -------------------------------------------------------------------------------- /code/Behavior/Iterator/Book.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Behavior/Iterator/Book.h -------------------------------------------------------------------------------- /code/Behavior/Iterator/BookSelf.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Behavior/Iterator/BookSelf.cpp -------------------------------------------------------------------------------- /code/Behavior/Iterator/BookSelf.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Behavior/Iterator/BookSelf.h -------------------------------------------------------------------------------- /code/Behavior/Iterator/BookSelfIterator.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Behavior/Iterator/BookSelfIterator.cpp -------------------------------------------------------------------------------- /code/Behavior/Iterator/BookSelfIterator.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Behavior/Iterator/BookSelfIterator.h -------------------------------------------------------------------------------- /code/Behavior/Iterator/CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Behavior/Iterator/CMakeLists.txt -------------------------------------------------------------------------------- /code/Behavior/Iterator/Iterator.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Behavior/Iterator/Iterator.h -------------------------------------------------------------------------------- /code/Behavior/Iterator/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Behavior/Iterator/README.md -------------------------------------------------------------------------------- /code/Behavior/Iterator/main.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Behavior/Iterator/main.cpp -------------------------------------------------------------------------------- /code/Behavior/Mediator/CColleague1.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Behavior/Mediator/CColleague1.h -------------------------------------------------------------------------------- /code/Behavior/Mediator/CColleague2.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Behavior/Mediator/CColleague2.h -------------------------------------------------------------------------------- /code/Behavior/Mediator/CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Behavior/Mediator/CMakeLists.txt -------------------------------------------------------------------------------- /code/Behavior/Mediator/CMediator.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Behavior/Mediator/CMediator.h -------------------------------------------------------------------------------- /code/Behavior/Mediator/IColleague.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Behavior/Mediator/IColleague.h -------------------------------------------------------------------------------- /code/Behavior/Mediator/IMediator.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Behavior/Mediator/IMediator.h -------------------------------------------------------------------------------- /code/Behavior/Mediator/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Behavior/Mediator/README.md -------------------------------------------------------------------------------- /code/Behavior/Mediator/main.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Behavior/Mediator/main.cpp -------------------------------------------------------------------------------- /code/Behavior/Memento/CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Behavior/Memento/CMakeLists.txt -------------------------------------------------------------------------------- /code/Behavior/Memento/Gamer.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Behavior/Memento/Gamer.h -------------------------------------------------------------------------------- /code/Behavior/Memento/Memento.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Behavior/Memento/Memento.h -------------------------------------------------------------------------------- /code/Behavior/Memento/README.md: -------------------------------------------------------------------------------- 1 | # 备忘录模式 2 | 3 | 记录对象状态 4 | 5 | Undo撤销 6 | Redo恢复 7 | History 历史 8 | Snapshot快照 -------------------------------------------------------------------------------- /code/Behavior/Memento/main.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Behavior/Memento/main.cpp -------------------------------------------------------------------------------- /code/Behavior/Observer/CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Behavior/Observer/CMakeLists.txt -------------------------------------------------------------------------------- /code/Behavior/Observer/DigitObserver.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Behavior/Observer/DigitObserver.h -------------------------------------------------------------------------------- /code/Behavior/Observer/GraphObserver.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Behavior/Observer/GraphObserver.h -------------------------------------------------------------------------------- /code/Behavior/Observer/NumGen.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Behavior/Observer/NumGen.h -------------------------------------------------------------------------------- /code/Behavior/Observer/NumGenObserver.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Behavior/Observer/NumGenObserver.h -------------------------------------------------------------------------------- /code/Behavior/Observer/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Behavior/Observer/README.md -------------------------------------------------------------------------------- /code/Behavior/Observer/RandomNumGen.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Behavior/Observer/RandomNumGen.h -------------------------------------------------------------------------------- /code/Behavior/Observer/main.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Behavior/Observer/main.cpp -------------------------------------------------------------------------------- /code/Behavior/ResponsibilityChain/CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Behavior/ResponsibilityChain/CMakeLists.txt -------------------------------------------------------------------------------- /code/Behavior/ResponsibilityChain/LimitSupport.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Behavior/ResponsibilityChain/LimitSupport.h -------------------------------------------------------------------------------- /code/Behavior/ResponsibilityChain/NoSupport.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Behavior/ResponsibilityChain/NoSupport.h -------------------------------------------------------------------------------- /code/Behavior/ResponsibilityChain/OddSupport.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Behavior/ResponsibilityChain/OddSupport.h -------------------------------------------------------------------------------- /code/Behavior/ResponsibilityChain/README.md: -------------------------------------------------------------------------------- 1 | # 责任链模式 2 | 3 | 甩锅 -------------------------------------------------------------------------------- /code/Behavior/ResponsibilityChain/SpecialSupport.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Behavior/ResponsibilityChain/SpecialSupport.h -------------------------------------------------------------------------------- /code/Behavior/ResponsibilityChain/Support.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Behavior/ResponsibilityChain/Support.h -------------------------------------------------------------------------------- /code/Behavior/ResponsibilityChain/Trouble.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Behavior/ResponsibilityChain/Trouble.h -------------------------------------------------------------------------------- /code/Behavior/ResponsibilityChain/main.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Behavior/ResponsibilityChain/main.cpp -------------------------------------------------------------------------------- /code/Behavior/State/CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Behavior/State/CMakeLists.txt -------------------------------------------------------------------------------- /code/Behavior/State/DayState.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Behavior/State/DayState.cpp -------------------------------------------------------------------------------- /code/Behavior/State/DayState.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Behavior/State/DayState.h -------------------------------------------------------------------------------- /code/Behavior/State/IContext.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Behavior/State/IContext.h -------------------------------------------------------------------------------- /code/Behavior/State/IState.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Behavior/State/IState.h -------------------------------------------------------------------------------- /code/Behavior/State/NightState.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Behavior/State/NightState.cpp -------------------------------------------------------------------------------- /code/Behavior/State/NightState.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Behavior/State/NightState.h -------------------------------------------------------------------------------- /code/Behavior/State/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Behavior/State/README.md -------------------------------------------------------------------------------- /code/Behavior/State/SafeFrame.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Behavior/State/SafeFrame.cpp -------------------------------------------------------------------------------- /code/Behavior/State/SafeFrame.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Behavior/State/SafeFrame.h -------------------------------------------------------------------------------- /code/Behavior/State/main.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Behavior/State/main.cpp -------------------------------------------------------------------------------- /code/Behavior/Strategy/CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Behavior/Strategy/CMakeLists.txt -------------------------------------------------------------------------------- /code/Behavior/Strategy/Hand.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Behavior/Strategy/Hand.h -------------------------------------------------------------------------------- /code/Behavior/Strategy/IStrategy.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Behavior/Strategy/IStrategy.h -------------------------------------------------------------------------------- /code/Behavior/Strategy/Player.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Behavior/Strategy/Player.h -------------------------------------------------------------------------------- /code/Behavior/Strategy/ProbStrategy.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Behavior/Strategy/ProbStrategy.h -------------------------------------------------------------------------------- /code/Behavior/Strategy/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Behavior/Strategy/README.md -------------------------------------------------------------------------------- /code/Behavior/Strategy/WinningStrategy.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Behavior/Strategy/WinningStrategy.h -------------------------------------------------------------------------------- /code/Behavior/Strategy/main.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Behavior/Strategy/main.cpp -------------------------------------------------------------------------------- /code/Behavior/TemplateMethod/CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Behavior/TemplateMethod/CMakeLists.txt -------------------------------------------------------------------------------- /code/Behavior/TemplateMethod/CharDIsplay.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Behavior/TemplateMethod/CharDIsplay.h -------------------------------------------------------------------------------- /code/Behavior/TemplateMethod/IDisplay.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Behavior/TemplateMethod/IDisplay.h -------------------------------------------------------------------------------- /code/Behavior/TemplateMethod/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Behavior/TemplateMethod/README.md -------------------------------------------------------------------------------- /code/Behavior/TemplateMethod/StringDIsplay.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Behavior/TemplateMethod/StringDIsplay.h -------------------------------------------------------------------------------- /code/Behavior/TemplateMethod/main.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Behavior/TemplateMethod/main.cpp -------------------------------------------------------------------------------- /code/Behavior/Visitor/CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Behavior/Visitor/CMakeLists.txt -------------------------------------------------------------------------------- /code/Behavior/Visitor/Directory.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Behavior/Visitor/Directory.h -------------------------------------------------------------------------------- /code/Behavior/Visitor/Element.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Behavior/Visitor/Element.h -------------------------------------------------------------------------------- /code/Behavior/Visitor/Entry.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Behavior/Visitor/Entry.h -------------------------------------------------------------------------------- /code/Behavior/Visitor/File.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Behavior/Visitor/File.h -------------------------------------------------------------------------------- /code/Behavior/Visitor/ListVisitor.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Behavior/Visitor/ListVisitor.h -------------------------------------------------------------------------------- /code/Behavior/Visitor/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Behavior/Visitor/README.md -------------------------------------------------------------------------------- /code/Behavior/Visitor/Visitor.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Behavior/Visitor/Visitor.h -------------------------------------------------------------------------------- /code/Behavior/Visitor/main.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Behavior/Visitor/main.cpp -------------------------------------------------------------------------------- /code/CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/CMakeLists.txt -------------------------------------------------------------------------------- /code/Create/AbstractFactory/CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Create/AbstractFactory/CMakeLists.txt -------------------------------------------------------------------------------- /code/Create/AbstractFactory/IFactory.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Create/AbstractFactory/IFactory.h -------------------------------------------------------------------------------- /code/Create/AbstractFactory/IItem.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Create/AbstractFactory/IItem.h -------------------------------------------------------------------------------- /code/Create/AbstractFactory/ILink.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Create/AbstractFactory/ILink.h -------------------------------------------------------------------------------- /code/Create/AbstractFactory/IPage.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Create/AbstractFactory/IPage.h -------------------------------------------------------------------------------- /code/Create/AbstractFactory/ITray.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Create/AbstractFactory/ITray.h -------------------------------------------------------------------------------- /code/Create/AbstractFactory/ListFactory.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Create/AbstractFactory/ListFactory.h -------------------------------------------------------------------------------- /code/Create/AbstractFactory/ListLink.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Create/AbstractFactory/ListLink.h -------------------------------------------------------------------------------- /code/Create/AbstractFactory/ListPage.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Create/AbstractFactory/ListPage.h -------------------------------------------------------------------------------- /code/Create/AbstractFactory/ListTray.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Create/AbstractFactory/ListTray.h -------------------------------------------------------------------------------- /code/Create/AbstractFactory/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Create/AbstractFactory/README.md -------------------------------------------------------------------------------- /code/Create/AbstractFactory/main.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Create/AbstractFactory/main.cpp -------------------------------------------------------------------------------- /code/Create/Builder/CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Create/Builder/CMakeLists.txt -------------------------------------------------------------------------------- /code/Create/Builder/Director.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Create/Builder/Director.h -------------------------------------------------------------------------------- /code/Create/Builder/IBuilder.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Create/Builder/IBuilder.h -------------------------------------------------------------------------------- /code/Create/Builder/README.md: -------------------------------------------------------------------------------- 1 | # 构建模式 2 | 3 | 用于组装具有复杂结构的实例。 4 | 5 | 组装的具体过程隐藏在Director中。 -------------------------------------------------------------------------------- /code/Create/Builder/TextBuilder.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Create/Builder/TextBuilder.h -------------------------------------------------------------------------------- /code/Create/Builder/main.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Create/Builder/main.cpp -------------------------------------------------------------------------------- /code/Create/CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Create/CMakeLists.txt -------------------------------------------------------------------------------- /code/Create/FactoryMethod/CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Create/FactoryMethod/CMakeLists.txt -------------------------------------------------------------------------------- /code/Create/FactoryMethod/IDCard.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Create/FactoryMethod/IDCard.h -------------------------------------------------------------------------------- /code/Create/FactoryMethod/IDCardFactory.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Create/FactoryMethod/IDCardFactory.h -------------------------------------------------------------------------------- /code/Create/FactoryMethod/IFactory.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Create/FactoryMethod/IFactory.h -------------------------------------------------------------------------------- /code/Create/FactoryMethod/IProduct.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Create/FactoryMethod/IProduct.h -------------------------------------------------------------------------------- /code/Create/FactoryMethod/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Create/FactoryMethod/README.md -------------------------------------------------------------------------------- /code/Create/FactoryMethod/main.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Create/FactoryMethod/main.cpp -------------------------------------------------------------------------------- /code/Create/Prototype/CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Create/Prototype/CMakeLists.txt -------------------------------------------------------------------------------- /code/Create/Prototype/IProduct.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Create/Prototype/IProduct.h -------------------------------------------------------------------------------- /code/Create/Prototype/MessageBox.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Create/Prototype/MessageBox.h -------------------------------------------------------------------------------- /code/Create/Prototype/ProductMgr.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Create/Prototype/ProductMgr.h -------------------------------------------------------------------------------- /code/Create/Prototype/README.md: -------------------------------------------------------------------------------- 1 | # 原型模式 2 | 3 | 通过复制,生成实例 4 | -------------------------------------------------------------------------------- /code/Create/Prototype/main.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Create/Prototype/main.cpp -------------------------------------------------------------------------------- /code/Create/Singleton/CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Create/Singleton/CMakeLists.txt -------------------------------------------------------------------------------- /code/Create/Singleton/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Create/Singleton/README.md -------------------------------------------------------------------------------- /code/Create/Singleton/SingleTon.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Create/Singleton/SingleTon.h -------------------------------------------------------------------------------- /code/Create/Singleton/main.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Create/Singleton/main.cpp -------------------------------------------------------------------------------- /code/Create/Singleton_Practise/CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Create/Singleton_Practise/CMakeLists.txt -------------------------------------------------------------------------------- /code/Create/Singleton_Practise/README.md: -------------------------------------------------------------------------------- 1 | # 单例模式 练习题 2 | 3 | 要求只能生成3个实例。通过GetInstance(int id)来获取对应的实例 4 | -------------------------------------------------------------------------------- /code/Create/Singleton_Practise/ThreeTon.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Create/Singleton_Practise/ThreeTon.h -------------------------------------------------------------------------------- /code/Create/Singleton_Practise/main.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Create/Singleton_Practise/main.cpp -------------------------------------------------------------------------------- /code/Struct/Adapter_01/Banner.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Struct/Adapter_01/Banner.h -------------------------------------------------------------------------------- /code/Struct/Adapter_01/CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Struct/Adapter_01/CMakeLists.txt -------------------------------------------------------------------------------- /code/Struct/Adapter_01/Painter.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Struct/Adapter_01/Painter.h -------------------------------------------------------------------------------- /code/Struct/Adapter_01/PainterBanner.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Struct/Adapter_01/PainterBanner.h -------------------------------------------------------------------------------- /code/Struct/Adapter_01/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Struct/Adapter_01/README.md -------------------------------------------------------------------------------- /code/Struct/Adapter_01/main.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Struct/Adapter_01/main.cpp -------------------------------------------------------------------------------- /code/Struct/Adapter_02/Banner.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Struct/Adapter_02/Banner.h -------------------------------------------------------------------------------- /code/Struct/Adapter_02/CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Struct/Adapter_02/CMakeLists.txt -------------------------------------------------------------------------------- /code/Struct/Adapter_02/Painter.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Struct/Adapter_02/Painter.h -------------------------------------------------------------------------------- /code/Struct/Adapter_02/PainterBanner.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Struct/Adapter_02/PainterBanner.h -------------------------------------------------------------------------------- /code/Struct/Adapter_02/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Struct/Adapter_02/README.md -------------------------------------------------------------------------------- /code/Struct/Adapter_02/main.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Struct/Adapter_02/main.cpp -------------------------------------------------------------------------------- /code/Struct/Bridge/CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Struct/Bridge/CMakeLists.txt -------------------------------------------------------------------------------- /code/Struct/Bridge/CountDisplay.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Struct/Bridge/CountDisplay.h -------------------------------------------------------------------------------- /code/Struct/Bridge/Display.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Struct/Bridge/Display.h -------------------------------------------------------------------------------- /code/Struct/Bridge/IDisplayImpl.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Struct/Bridge/IDisplayImpl.h -------------------------------------------------------------------------------- /code/Struct/Bridge/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Struct/Bridge/README.md -------------------------------------------------------------------------------- /code/Struct/Bridge/StringDisplayImpl.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Struct/Bridge/StringDisplayImpl.h -------------------------------------------------------------------------------- /code/Struct/Bridge/main.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Struct/Bridge/main.cpp -------------------------------------------------------------------------------- /code/Struct/CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Struct/CMakeLists.txt -------------------------------------------------------------------------------- /code/Struct/Composite/CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Struct/Composite/CMakeLists.txt -------------------------------------------------------------------------------- /code/Struct/Composite/Directory.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Struct/Composite/Directory.h -------------------------------------------------------------------------------- /code/Struct/Composite/Entry.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Struct/Composite/Entry.h -------------------------------------------------------------------------------- /code/Struct/Composite/File.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Struct/Composite/File.h -------------------------------------------------------------------------------- /code/Struct/Composite/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Struct/Composite/README.md -------------------------------------------------------------------------------- /code/Struct/Composite/main.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Struct/Composite/main.cpp -------------------------------------------------------------------------------- /code/Struct/Decorator/Border.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Struct/Decorator/Border.h -------------------------------------------------------------------------------- /code/Struct/Decorator/CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Struct/Decorator/CMakeLists.txt -------------------------------------------------------------------------------- /code/Struct/Decorator/FullBorder.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Struct/Decorator/FullBorder.h -------------------------------------------------------------------------------- /code/Struct/Decorator/IDisplay.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Struct/Decorator/IDisplay.h -------------------------------------------------------------------------------- /code/Struct/Decorator/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Struct/Decorator/README.md -------------------------------------------------------------------------------- /code/Struct/Decorator/SideBorder.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Struct/Decorator/SideBorder.h -------------------------------------------------------------------------------- /code/Struct/Decorator/StringDisplay.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Struct/Decorator/StringDisplay.h -------------------------------------------------------------------------------- /code/Struct/Decorator/main.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Struct/Decorator/main.cpp -------------------------------------------------------------------------------- /code/Struct/Facade/CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Struct/Facade/CMakeLists.txt -------------------------------------------------------------------------------- /code/Struct/Facade/Database.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Struct/Facade/Database.h -------------------------------------------------------------------------------- /code/Struct/Facade/HtmlWriter.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Struct/Facade/HtmlWriter.h -------------------------------------------------------------------------------- /code/Struct/Facade/PageMaker.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Struct/Facade/PageMaker.h -------------------------------------------------------------------------------- /code/Struct/Facade/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Struct/Facade/README.md -------------------------------------------------------------------------------- /code/Struct/Facade/main.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Struct/Facade/main.cpp -------------------------------------------------------------------------------- /code/Struct/FlyWeight/BigChar.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Struct/FlyWeight/BigChar.h -------------------------------------------------------------------------------- /code/Struct/FlyWeight/BigCharFactory.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Struct/FlyWeight/BigCharFactory.h -------------------------------------------------------------------------------- /code/Struct/FlyWeight/CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Struct/FlyWeight/CMakeLists.txt -------------------------------------------------------------------------------- /code/Struct/FlyWeight/README.md: -------------------------------------------------------------------------------- 1 | # 轻量模式 2 | 3 | 尽量共享实例避免new出实例 -------------------------------------------------------------------------------- /code/Struct/FlyWeight/main.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Struct/FlyWeight/main.cpp -------------------------------------------------------------------------------- /code/Struct/Proxy/CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Struct/Proxy/CMakeLists.txt -------------------------------------------------------------------------------- /code/Struct/Proxy/Printable.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Struct/Proxy/Printable.h -------------------------------------------------------------------------------- /code/Struct/Proxy/Printer.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Struct/Proxy/Printer.h -------------------------------------------------------------------------------- /code/Struct/Proxy/PrinterProxy.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Struct/Proxy/PrinterProxy.h -------------------------------------------------------------------------------- /code/Struct/Proxy/README.md: -------------------------------------------------------------------------------- 1 | # 代理模式 2 | 3 | 部分工作交给代理人 4 | -------------------------------------------------------------------------------- /code/Struct/Proxy/main.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/code/Struct/Proxy/main.cpp -------------------------------------------------------------------------------- /vs_15_2017_Win64.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/vs_15_2017_Win64.bat -------------------------------------------------------------------------------- /vs_16_2019-clang.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/vs_16_2019-clang.bat -------------------------------------------------------------------------------- /vs_16_2019.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredtao/DesignPattern/HEAD/vs_16_2019.bat --------------------------------------------------------------------------------