├── docs └── _static │ ├── Silver │ ├── Iterator │ │ ├── index.rst │ │ ├── Iterator.jpg │ │ ├── DinerMergerI │ │ │ ├── SequenceDiagram1.jpg │ │ │ ├── Overview_of_DinerMergerI.jpg │ │ │ ├── Makefile │ │ │ ├── DinerMergerI.hpp │ │ │ ├── Menu.hpp │ │ │ └── Iterator.hpp │ │ └── DinerMerger │ │ │ ├── Makefile │ │ │ ├── DinerMerger.hpp │ │ │ ├── Object.hpp │ │ │ ├── DinerMerger.cpp │ │ │ ├── Menu.hpp │ │ │ └── Iterator.hpp │ ├── Composite │ │ ├── index.rst │ │ ├── Composite.jpg │ │ ├── Composite_with_Iterator.jpg │ │ ├── Menus │ │ │ ├── imgs │ │ │ │ ├── Overview_of_Menus.jpg │ │ │ │ └── SequenceDiagram1.jpg │ │ │ ├── lib │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── Waitress.cpp │ │ │ │ └── Utilities.cpp │ │ │ ├── include │ │ │ │ └── Utilities.hpp │ │ │ └── CMakeLists.txt │ │ └── MenusCustomIterator │ │ │ ├── imgs │ │ │ ├── SequenceDiagram1.jpg │ │ │ └── Overview_of_Menus_Custom_Iterator.jpg │ │ │ ├── include │ │ │ └── Utilities.hpp │ │ │ ├── lib │ │ │ ├── CMakeLists.txt │ │ │ └── Waitress.cpp │ │ │ └── CMakeLists.txt │ ├── Bridge │ │ ├── Bridge.jpg │ │ ├── Bridge_using_Template.jpg │ │ └── Remotes │ │ │ ├── lib │ │ │ ├── CMakeLists.txt │ │ │ ├── utils │ │ │ │ └── CMakeLists.txt │ │ │ └── remotes │ │ │ │ └── CMakeLists.txt │ │ │ ├── imgs │ │ │ ├── SequenceDiagram1.jpg │ │ │ └── Overview_of_Remotes.jpg │ │ │ ├── RemotesConfig.h.in │ │ │ └── include │ │ │ └── utils │ │ │ └── Utilities.hpp │ ├── Facade │ │ ├── Facade.jpg │ │ └── HomeTheater │ │ │ ├── imgs │ │ │ ├── SequenceDiagram1.jpg │ │ │ └── Overview_of_HomeTheater.jpg │ │ │ ├── lib │ │ │ ├── CMakeLists.txt │ │ │ └── Screen.cpp │ │ │ ├── driver │ │ │ └── CMakeLists.txt │ │ │ └── include │ │ │ └── Screen.hpp │ ├── State │ │ ├── State.jpg │ │ └── GumballStateWinner │ │ │ ├── imgs │ │ │ ├── SequenceDiagram1.jpg │ │ │ ├── StatechartDiagram1.jpg │ │ │ └── Overview_of_GumballStateWinner.jpg │ │ │ ├── lib │ │ │ └── State.cpp │ │ │ ├── include │ │ │ └── Utilities.hpp │ │ │ └── CMakeLists.txt │ ├── Builder │ │ ├── Builder.jpg │ │ ├── Planner │ │ │ ├── Overview_of_Planner.jpg │ │ │ ├── Makefile │ │ │ ├── Planner.cpp │ │ │ ├── Vacation.hpp │ │ │ └── output.txt │ │ └── README.rst │ ├── Visitor │ │ ├── Visitor.jpg │ │ └── Menus │ │ │ ├── imgs │ │ │ ├── SequenceDiagram1.jpg │ │ │ └── Overview_of_Menus.jpg │ │ │ ├── include │ │ │ └── Utilities.hpp │ │ │ ├── lib │ │ │ ├── Visitor.cpp │ │ │ └── Utilities.cpp │ │ │ └── CMakeLists.txt │ ├── Observer │ │ ├── Observer.jpg │ │ └── Content │ │ │ ├── imgs │ │ │ ├── SequenceDiagram1.jpg │ │ │ └── Overview_of_WeatherStation.jpg │ │ │ ├── lib │ │ │ ├── Subject.cpp │ │ │ ├── Observer.cpp │ │ │ ├── CMakeLists.txt │ │ │ ├── DisplayElement.cpp │ │ │ └── Utilities.cpp │ │ │ ├── include │ │ │ ├── Utilities.hpp │ │ │ └── DisplayElement.hpp │ │ │ └── CMakeLists.txt │ ├── Strategy │ │ ├── Strategy.jpg │ │ ├── Content │ │ │ ├── imgs │ │ │ │ ├── SequenceDiagram1.jpg │ │ │ │ └── Overview_of_MiniDuckSimulator.jpg │ │ │ ├── lib │ │ │ │ ├── FlyBehavior.cpp │ │ │ │ ├── QuackBehavior.cpp │ │ │ │ ├── Quack.cpp │ │ │ │ ├── Squeak.cpp │ │ │ │ ├── FakeQuack.cpp │ │ │ │ ├── FlyNoWay.cpp │ │ │ │ ├── MuteQuack.cpp │ │ │ │ ├── FlyWithWings.cpp │ │ │ │ ├── FlyRocketPowered.cpp │ │ │ │ └── Utilities.cpp │ │ │ ├── include │ │ │ │ ├── Utilities.hpp │ │ │ │ ├── Quack.hpp │ │ │ │ ├── Squeak.hpp │ │ │ │ ├── FakeQuack.hpp │ │ │ │ ├── FlyBehavior.hpp │ │ │ │ ├── MuteQuack.hpp │ │ │ │ ├── FlyNoWay.hpp │ │ │ │ ├── DecoyDuck.hpp │ │ │ │ ├── FlyWithWings.hpp │ │ │ │ ├── ModelDuck.hpp │ │ │ │ ├── QuackBehavior.hpp │ │ │ │ ├── RedHeadDuck.hpp │ │ │ │ ├── RubberDuck.hpp │ │ │ │ ├── MallardDuck.hpp │ │ │ │ └── FlyRocketPowered.hpp │ │ │ └── CMakeLists.txt │ │ └── LContent │ │ │ └── README │ ├── Decorator │ │ ├── Decorator.jpg │ │ └── Content │ │ │ ├── imgs │ │ │ ├── SequenceDiagram1.jpg │ │ │ └── Overview_of_Starbuzz.jpg │ │ │ ├── lib │ │ │ ├── CMakeLists.txt │ │ │ ├── Decaf.cpp │ │ │ ├── Espresso.cpp │ │ │ ├── DarkRoast.cpp │ │ │ ├── HouseBlend.cpp │ │ │ ├── CondimentDecorator.cpp │ │ │ └── Utilities.cpp │ │ │ ├── include │ │ │ ├── Utilities.hpp │ │ │ ├── Decaf.hpp │ │ │ ├── Espresso.hpp │ │ │ ├── DarkRoast.hpp │ │ │ └── HouseBlend.hpp │ │ │ └── CMakeLists.txt │ ├── Adapter │ │ ├── Class_Adapter.jpg │ │ ├── Object_Adapter.jpg │ │ └── Ducks │ │ │ ├── imgs │ │ │ ├── SequenceDiagram1.jpg │ │ │ └── Overview_of_Ducks.jpg │ │ │ ├── include │ │ │ └── Utilities.hpp │ │ │ ├── DucksConfig.h.in │ │ │ └── lib │ │ │ ├── Utilities.cpp │ │ │ ├── Duck.cpp │ │ │ ├── Turkey.cpp │ │ │ ├── CMakeLists.txt │ │ │ ├── MallardDuck.cpp │ │ │ └── WildTurkey.cpp │ ├── Command │ │ ├── Command_Pattern.jpg │ │ ├── Undo │ │ │ ├── imgs │ │ │ │ ├── Overview_of_Undo.jpg │ │ │ │ └── SequenceDiagram1.jpg │ │ │ ├── lib │ │ │ │ ├── Command.cpp │ │ │ │ ├── NoCommand.cpp │ │ │ │ ├── CMakeLists.txt │ │ │ │ └── Utilities.cpp │ │ │ ├── include │ │ │ │ └── Utilities.hpp │ │ │ └── CMakeLists.txt │ │ ├── Remote │ │ │ ├── imgs │ │ │ │ ├── Overview_of_Remote.jpg │ │ │ │ └── SequenceDiagram1.jpg │ │ │ ├── lib │ │ │ │ ├── NoCommand.cpp │ │ │ │ ├── Command.cpp │ │ │ │ └── Utilities.cpp │ │ │ ├── include │ │ │ │ └── Utilities.hpp │ │ │ └── CMakeLists.txt │ │ └── SimpleRemote │ │ │ ├── imgs │ │ │ ├── SequenceDiagram1.jpg │ │ │ └── Overview_of_SimpleRemote.jpg │ │ │ ├── lib │ │ │ ├── Command.cpp │ │ │ └── CMakeLists.txt │ │ │ ├── include │ │ │ └── Utilities.hpp │ │ │ └── CMakeLists.txt │ ├── Factory │ │ ├── AbstractFactory.jpg │ │ ├── FactoryMethod.jpg │ │ ├── OCP_in_FactoryMethod.jpg │ │ ├── Pizzaaf │ │ │ ├── imgs │ │ │ │ ├── SequenceDiagram1.jpg │ │ │ │ └── Overview_of_AbstractFactory.jpg │ │ │ ├── lib │ │ │ │ ├── Clams.cpp │ │ │ │ ├── Sauce.cpp │ │ │ │ ├── Cheese.cpp │ │ │ │ ├── Veggies.cpp │ │ │ │ ├── Dough.cpp │ │ │ │ ├── Pepperoni.cpp │ │ │ │ ├── Onion.cpp │ │ │ │ ├── Garlic.cpp │ │ │ │ ├── EggPlant.cpp │ │ │ │ ├── Spinach.cpp │ │ │ │ ├── Mushroom.cpp │ │ │ │ ├── RedPepper.cpp │ │ │ │ ├── BlackOlives.cpp │ │ │ │ ├── MarinaraSauce.cpp │ │ │ │ ├── ReggianoCheese.cpp │ │ │ │ ├── FreshClams.cpp │ │ │ │ ├── FrozenClams.cpp │ │ │ │ ├── ParmesanCheese.cpp │ │ │ │ ├── SlicedPepperoni.cpp │ │ │ │ ├── ThinCrustDough.cpp │ │ │ │ ├── ThickCrustDough.cpp │ │ │ │ ├── MozzarellaCheese.cpp │ │ │ │ ├── PizzaIngredientFactory.cpp │ │ │ │ ├── PlumTomatoSauce.cpp │ │ │ │ └── Utilities.cpp │ │ │ ├── include │ │ │ │ └── Utilities.hpp │ │ │ └── CMakeLists.txt │ │ ├── Pizzafm │ │ │ ├── imgs │ │ │ │ ├── SequenceDiagram1.jpg │ │ │ │ └── Overview_of_FactoryMethod.jpg │ │ │ ├── include │ │ │ │ └── Utilities.hpp │ │ │ ├── lib │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── NYStyleCheesePizza.cpp │ │ │ │ └── Utilities.cpp │ │ │ └── CMakeLists.txt │ │ └── Pizzas │ │ │ ├── imgs │ │ │ ├── SequenceDiagram1.jpg │ │ │ └── Overview_of_SimpleFactory.jpg │ │ │ ├── lib │ │ │ ├── CMakeLists.txt │ │ │ ├── ClamPizza.cpp │ │ │ └── Utilities.cpp │ │ │ ├── include │ │ │ └── Utilities.hpp │ │ │ └── CMakeLists.txt │ ├── Template │ │ ├── TemplateMethod.jpg │ │ └── Barista │ │ │ ├── imgs │ │ │ ├── SequenceDiagram1.jpg │ │ │ └── Overview_of_Barista.jpg │ │ │ ├── include │ │ │ └── Utilities.hpp │ │ │ ├── lib │ │ │ ├── Tea.cpp │ │ │ ├── CMakeLists.txt │ │ │ └── Utilities.cpp │ │ │ └── CMakeLists.txt │ ├── check11features │ │ ├── c++11-test-nullptr-N2431.cpp │ │ ├── c++11-test-nullptr-N2431_fail_compile.cpp │ │ ├── c++11-test-lambda-N2927.cpp │ │ ├── c++11-test-static_assert-N1720_fail_compile.cpp │ │ ├── c++11-test-static_assert-N1720.cpp │ │ ├── c++11-test-long_long-N1811.cpp │ │ ├── c++11-test-__func__-N2340.cpp │ │ ├── c++11-test-decltype-N2343.cpp │ │ ├── c++11-test-cstdint.cpp │ │ ├── c++11-test-auto-N2546.cpp │ │ ├── c++11-test-rvalue_references-N2118.cpp │ │ ├── c++11-test-sizeof_member-N2253.cpp │ │ ├── c++11-test-constexpr-N2235.cpp │ │ └── c++11-test-variadic_templates-N2555.cpp │ ├── Flyweight │ │ └── FowlWeight │ │ │ ├── FowlWeight.cpp │ │ │ ├── Overview_of_FowlWeight.jpg │ │ │ ├── Makefile │ │ │ ├── FowlWeight.hpp │ │ │ ├── Turkey.hpp │ │ │ └── Fowl.hpp │ ├── Interpreter │ │ ├── MiniDuckSimulator │ │ │ ├── readme.txt │ │ │ ├── FlyBehavior.hpp │ │ │ ├── QuackBehavior.hpp │ │ │ ├── Quack.hpp │ │ │ ├── Squeak.hpp │ │ │ ├── FakeQuack.hpp │ │ │ ├── MuteQuack.hpp │ │ │ ├── FlyNoWay.hpp │ │ │ ├── FlyWithWings.hpp │ │ │ ├── Iterator.hpp │ │ │ ├── Expression.hpp │ │ │ ├── FlyRocketPowered.hpp │ │ │ ├── EndCommand.hpp │ │ │ ├── DecoyDuck.hpp │ │ │ ├── ModelDuck.hpp │ │ │ ├── RubberDuck.hpp │ │ │ ├── MallardDuck.hpp │ │ │ ├── RedHeadDuck.hpp │ │ │ ├── Repetitive.hpp │ │ │ ├── NullCommand.hpp │ │ │ ├── FlyCommand.hpp │ │ │ ├── LeftCommand.hpp │ │ │ ├── SwimCommand.hpp │ │ │ ├── QuackCommand.hpp │ │ │ ├── RightCommand.hpp │ │ │ └── DisplayCommand.hpp │ │ └── README.rst │ ├── ChainOfResponsibility │ │ ├── Chain_Of_Responsibility.jpg │ │ └── GumballEMailHandler │ │ │ ├── imgs │ │ │ ├── SequenceDiagram1.jpg │ │ │ └── Overview_of_GumballEMailHandler.jpg │ │ │ ├── include │ │ │ ├── Utilities.hpp │ │ │ ├── LastHandler.hpp │ │ │ ├── SpamHandler.hpp │ │ │ ├── FanHandler.hpp │ │ │ ├── ComplaintHandler.hpp │ │ │ └── NewLocationHandler.hpp │ │ │ ├── lib │ │ │ └── LastHandler.cpp │ │ │ └── CMakeLists.txt │ ├── Singleton │ │ └── Chocolate │ │ │ ├── imgs │ │ │ └── Overview_of_Chocolate_Boiler.jpg │ │ │ ├── lib │ │ │ └── CMakeLists.txt │ │ │ └── CMakeLists.txt │ ├── Compound │ │ ├── Ducks │ │ │ └── DuckSimulator │ │ │ │ ├── DuckSimulator.hpp │ │ │ │ ├── Quackable.hpp │ │ │ │ ├── DuckCall.hpp │ │ │ │ ├── RubberDuck.hpp │ │ │ │ ├── MallardDuck.hpp │ │ │ │ ├── RedHeadDuck.hpp │ │ │ │ └── DuckSimulator.cpp │ │ ├── Adapter │ │ │ └── DuckSimulator │ │ │ │ ├── DuckSimulator.hpp │ │ │ │ ├── Goose.hpp │ │ │ │ ├── Quackable.hpp │ │ │ │ ├── DuckCall.hpp │ │ │ │ ├── RubberDuck.hpp │ │ │ │ ├── MallardDuck.hpp │ │ │ │ └── RedHeadDuck.hpp │ │ ├── Decorator │ │ │ └── DuckSimulator │ │ │ │ ├── DuckSimulator.hpp │ │ │ │ ├── Goose.hpp │ │ │ │ ├── Quackable.hpp │ │ │ │ ├── DuckCall.hpp │ │ │ │ ├── RubberDuck.hpp │ │ │ │ ├── MallardDuck.hpp │ │ │ │ └── RedHeadDuck.hpp │ │ ├── Factory │ │ │ └── DuckSimulator │ │ │ │ ├── DuckSimulator.hpp │ │ │ │ ├── Goose.hpp │ │ │ │ ├── Quackable.hpp │ │ │ │ ├── DuckCall.hpp │ │ │ │ ├── RubberDuck.hpp │ │ │ │ ├── MallardDuck.hpp │ │ │ │ ├── RedHeadDuck.hpp │ │ │ │ └── AbstractDuckFactory.hpp │ │ ├── Composite │ │ │ └── DuckSimulator │ │ │ │ ├── DuckSimulator.hpp │ │ │ │ ├── Goose.hpp │ │ │ │ ├── Quackable.hpp │ │ │ │ ├── DuckCall.hpp │ │ │ │ ├── RubberDuck.hpp │ │ │ │ ├── MallardDuck.hpp │ │ │ │ ├── RedHeadDuck.hpp │ │ │ │ └── AbstractDuckFactory.hpp │ │ └── Observer │ │ │ └── DuckSimulator │ │ │ ├── Goose.hpp │ │ │ ├── Observer.hpp │ │ │ ├── Quackable.hpp │ │ │ ├── QuackObservable.hpp │ │ │ ├── DuckSimulator.hpp │ │ │ ├── Quackologist.hpp │ │ │ └── AbstractDuckFactory.hpp │ ├── Mediator │ │ ├── AutoHouse │ │ │ ├── AutoHouse.hpp │ │ │ └── Readme.txt │ │ └── README.rst │ └── check11features_demo │ │ └── demo.cpp │ ├── thebookcover.jpg │ └── linktodoxygen.html ├── readme.txt └── .gitignore /docs/_static/Silver/Iterator/index.rst: -------------------------------------------------------------------------------- 1 | README.rst -------------------------------------------------------------------------------- /docs/_static/Silver/Composite/index.rst: -------------------------------------------------------------------------------- 1 | README.rst -------------------------------------------------------------------------------- /readme.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jumogehn/hfdpcpp_s/HEAD/readme.txt -------------------------------------------------------------------------------- /docs/_static/thebookcover.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jumogehn/hfdpcpp_s/HEAD/docs/_static/thebookcover.jpg -------------------------------------------------------------------------------- /docs/_static/Silver/Bridge/Bridge.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jumogehn/hfdpcpp_s/HEAD/docs/_static/Silver/Bridge/Bridge.jpg -------------------------------------------------------------------------------- /docs/_static/Silver/Facade/Facade.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jumogehn/hfdpcpp_s/HEAD/docs/_static/Silver/Facade/Facade.jpg -------------------------------------------------------------------------------- /docs/_static/Silver/State/State.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jumogehn/hfdpcpp_s/HEAD/docs/_static/Silver/State/State.jpg -------------------------------------------------------------------------------- /docs/_static/Silver/Builder/Builder.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jumogehn/hfdpcpp_s/HEAD/docs/_static/Silver/Builder/Builder.jpg -------------------------------------------------------------------------------- /docs/_static/Silver/Visitor/Visitor.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jumogehn/hfdpcpp_s/HEAD/docs/_static/Silver/Visitor/Visitor.jpg -------------------------------------------------------------------------------- /docs/_static/Silver/Iterator/Iterator.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jumogehn/hfdpcpp_s/HEAD/docs/_static/Silver/Iterator/Iterator.jpg -------------------------------------------------------------------------------- /docs/_static/Silver/Observer/Observer.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jumogehn/hfdpcpp_s/HEAD/docs/_static/Silver/Observer/Observer.jpg -------------------------------------------------------------------------------- /docs/_static/Silver/Strategy/Strategy.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jumogehn/hfdpcpp_s/HEAD/docs/_static/Silver/Strategy/Strategy.jpg -------------------------------------------------------------------------------- /docs/_static/Silver/Composite/Composite.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jumogehn/hfdpcpp_s/HEAD/docs/_static/Silver/Composite/Composite.jpg -------------------------------------------------------------------------------- /docs/_static/Silver/Decorator/Decorator.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jumogehn/hfdpcpp_s/HEAD/docs/_static/Silver/Decorator/Decorator.jpg -------------------------------------------------------------------------------- /docs/_static/Silver/Adapter/Class_Adapter.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jumogehn/hfdpcpp_s/HEAD/docs/_static/Silver/Adapter/Class_Adapter.jpg -------------------------------------------------------------------------------- /docs/_static/Silver/Adapter/Object_Adapter.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jumogehn/hfdpcpp_s/HEAD/docs/_static/Silver/Adapter/Object_Adapter.jpg -------------------------------------------------------------------------------- /docs/_static/Silver/Command/Command_Pattern.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jumogehn/hfdpcpp_s/HEAD/docs/_static/Silver/Command/Command_Pattern.jpg -------------------------------------------------------------------------------- /docs/_static/Silver/Factory/AbstractFactory.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jumogehn/hfdpcpp_s/HEAD/docs/_static/Silver/Factory/AbstractFactory.jpg -------------------------------------------------------------------------------- /docs/_static/Silver/Factory/FactoryMethod.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jumogehn/hfdpcpp_s/HEAD/docs/_static/Silver/Factory/FactoryMethod.jpg -------------------------------------------------------------------------------- /docs/_static/Silver/Template/TemplateMethod.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jumogehn/hfdpcpp_s/HEAD/docs/_static/Silver/Template/TemplateMethod.jpg -------------------------------------------------------------------------------- /docs/_static/Silver/check11features/c++11-test-nullptr-N2431.cpp: -------------------------------------------------------------------------------- 1 | int main() 2 | { 3 | int* test = nullptr; 4 | return test ? 1 : 0; 5 | } 6 | -------------------------------------------------------------------------------- /docs/_static/Silver/check11features/c++11-test-nullptr-N2431_fail_compile.cpp: -------------------------------------------------------------------------------- 1 | int main() 2 | { 3 | int i = nullptr; 4 | return 1; 5 | } 6 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | Silver.~ml 3 | cscope.files 4 | cscope.out 5 | tags 6 | CMakeCache.txt 7 | CMakeFiles/ 8 | cmake_install.cmake 9 | build/ 10 | -------------------------------------------------------------------------------- /docs/_static/linktodoxygen.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /docs/_static/Silver/Bridge/Bridge_using_Template.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jumogehn/hfdpcpp_s/HEAD/docs/_static/Silver/Bridge/Bridge_using_Template.jpg -------------------------------------------------------------------------------- /docs/_static/Silver/Factory/OCP_in_FactoryMethod.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jumogehn/hfdpcpp_s/HEAD/docs/_static/Silver/Factory/OCP_in_FactoryMethod.jpg -------------------------------------------------------------------------------- /docs/_static/Silver/check11features/c++11-test-lambda-N2927.cpp: -------------------------------------------------------------------------------- 1 | int main() 2 | { 3 | int ret = 0; 4 | return ([&ret]() -> int { return ret; })(); 5 | } 6 | -------------------------------------------------------------------------------- /docs/_static/Silver/Bridge/Remotes/lib/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | add_subdirectory(remotes) 3 | if (USE_UTILS) 4 | add_subdirectory(utils) 5 | endif (USE_UTILS) 6 | 7 | -------------------------------------------------------------------------------- /docs/_static/Silver/Composite/Composite_with_Iterator.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jumogehn/hfdpcpp_s/HEAD/docs/_static/Silver/Composite/Composite_with_Iterator.jpg -------------------------------------------------------------------------------- /docs/_static/Silver/Flyweight/FowlWeight/FowlWeight.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jumogehn/hfdpcpp_s/HEAD/docs/_static/Silver/Flyweight/FowlWeight/FowlWeight.cpp -------------------------------------------------------------------------------- /docs/_static/Silver/Adapter/Ducks/imgs/SequenceDiagram1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jumogehn/hfdpcpp_s/HEAD/docs/_static/Silver/Adapter/Ducks/imgs/SequenceDiagram1.jpg -------------------------------------------------------------------------------- /docs/_static/Silver/Builder/Planner/Overview_of_Planner.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jumogehn/hfdpcpp_s/HEAD/docs/_static/Silver/Builder/Planner/Overview_of_Planner.jpg -------------------------------------------------------------------------------- /docs/_static/Silver/Command/Undo/imgs/Overview_of_Undo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jumogehn/hfdpcpp_s/HEAD/docs/_static/Silver/Command/Undo/imgs/Overview_of_Undo.jpg -------------------------------------------------------------------------------- /docs/_static/Silver/Command/Undo/imgs/SequenceDiagram1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jumogehn/hfdpcpp_s/HEAD/docs/_static/Silver/Command/Undo/imgs/SequenceDiagram1.jpg -------------------------------------------------------------------------------- /docs/_static/Silver/Visitor/Menus/imgs/SequenceDiagram1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jumogehn/hfdpcpp_s/HEAD/docs/_static/Silver/Visitor/Menus/imgs/SequenceDiagram1.jpg -------------------------------------------------------------------------------- /docs/_static/Silver/Adapter/Ducks/imgs/Overview_of_Ducks.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jumogehn/hfdpcpp_s/HEAD/docs/_static/Silver/Adapter/Ducks/imgs/Overview_of_Ducks.jpg -------------------------------------------------------------------------------- /docs/_static/Silver/Bridge/Remotes/imgs/SequenceDiagram1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jumogehn/hfdpcpp_s/HEAD/docs/_static/Silver/Bridge/Remotes/imgs/SequenceDiagram1.jpg -------------------------------------------------------------------------------- /docs/_static/Silver/Command/Remote/imgs/Overview_of_Remote.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jumogehn/hfdpcpp_s/HEAD/docs/_static/Silver/Command/Remote/imgs/Overview_of_Remote.jpg -------------------------------------------------------------------------------- /docs/_static/Silver/Command/Remote/imgs/SequenceDiagram1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jumogehn/hfdpcpp_s/HEAD/docs/_static/Silver/Command/Remote/imgs/SequenceDiagram1.jpg -------------------------------------------------------------------------------- /docs/_static/Silver/Composite/Menus/imgs/Overview_of_Menus.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jumogehn/hfdpcpp_s/HEAD/docs/_static/Silver/Composite/Menus/imgs/Overview_of_Menus.jpg -------------------------------------------------------------------------------- /docs/_static/Silver/Composite/Menus/imgs/SequenceDiagram1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jumogehn/hfdpcpp_s/HEAD/docs/_static/Silver/Composite/Menus/imgs/SequenceDiagram1.jpg -------------------------------------------------------------------------------- /docs/_static/Silver/Factory/Pizzaaf/imgs/SequenceDiagram1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jumogehn/hfdpcpp_s/HEAD/docs/_static/Silver/Factory/Pizzaaf/imgs/SequenceDiagram1.jpg -------------------------------------------------------------------------------- /docs/_static/Silver/Factory/Pizzafm/imgs/SequenceDiagram1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jumogehn/hfdpcpp_s/HEAD/docs/_static/Silver/Factory/Pizzafm/imgs/SequenceDiagram1.jpg -------------------------------------------------------------------------------- /docs/_static/Silver/Factory/Pizzas/imgs/SequenceDiagram1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jumogehn/hfdpcpp_s/HEAD/docs/_static/Silver/Factory/Pizzas/imgs/SequenceDiagram1.jpg -------------------------------------------------------------------------------- /docs/_static/Silver/Interpreter/MiniDuckSimulator/readme.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jumogehn/hfdpcpp_s/HEAD/docs/_static/Silver/Interpreter/MiniDuckSimulator/readme.txt -------------------------------------------------------------------------------- /docs/_static/Silver/Iterator/DinerMergerI/SequenceDiagram1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jumogehn/hfdpcpp_s/HEAD/docs/_static/Silver/Iterator/DinerMergerI/SequenceDiagram1.jpg -------------------------------------------------------------------------------- /docs/_static/Silver/Observer/Content/imgs/SequenceDiagram1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jumogehn/hfdpcpp_s/HEAD/docs/_static/Silver/Observer/Content/imgs/SequenceDiagram1.jpg -------------------------------------------------------------------------------- /docs/_static/Silver/Strategy/Content/imgs/SequenceDiagram1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jumogehn/hfdpcpp_s/HEAD/docs/_static/Silver/Strategy/Content/imgs/SequenceDiagram1.jpg -------------------------------------------------------------------------------- /docs/_static/Silver/Template/Barista/imgs/SequenceDiagram1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jumogehn/hfdpcpp_s/HEAD/docs/_static/Silver/Template/Barista/imgs/SequenceDiagram1.jpg -------------------------------------------------------------------------------- /docs/_static/Silver/Visitor/Menus/imgs/Overview_of_Menus.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jumogehn/hfdpcpp_s/HEAD/docs/_static/Silver/Visitor/Menus/imgs/Overview_of_Menus.jpg -------------------------------------------------------------------------------- /docs/_static/Silver/check11features/c++11-test-static_assert-N1720_fail_compile.cpp: -------------------------------------------------------------------------------- 1 | int main() 2 | { 3 | static_assert(1 < 0, "this should fail"); 4 | return 0; 5 | } 6 | -------------------------------------------------------------------------------- /docs/_static/Silver/Bridge/Remotes/imgs/Overview_of_Remotes.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jumogehn/hfdpcpp_s/HEAD/docs/_static/Silver/Bridge/Remotes/imgs/Overview_of_Remotes.jpg -------------------------------------------------------------------------------- /docs/_static/Silver/Decorator/Content/imgs/SequenceDiagram1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jumogehn/hfdpcpp_s/HEAD/docs/_static/Silver/Decorator/Content/imgs/SequenceDiagram1.jpg -------------------------------------------------------------------------------- /docs/_static/Silver/Facade/HomeTheater/imgs/SequenceDiagram1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jumogehn/hfdpcpp_s/HEAD/docs/_static/Silver/Facade/HomeTheater/imgs/SequenceDiagram1.jpg -------------------------------------------------------------------------------- /docs/_static/Silver/Command/SimpleRemote/imgs/SequenceDiagram1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jumogehn/hfdpcpp_s/HEAD/docs/_static/Silver/Command/SimpleRemote/imgs/SequenceDiagram1.jpg -------------------------------------------------------------------------------- /docs/_static/Silver/Decorator/Content/imgs/Overview_of_Starbuzz.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jumogehn/hfdpcpp_s/HEAD/docs/_static/Silver/Decorator/Content/imgs/Overview_of_Starbuzz.jpg -------------------------------------------------------------------------------- /docs/_static/Silver/Flyweight/FowlWeight/Overview_of_FowlWeight.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jumogehn/hfdpcpp_s/HEAD/docs/_static/Silver/Flyweight/FowlWeight/Overview_of_FowlWeight.jpg -------------------------------------------------------------------------------- /docs/_static/Silver/Template/Barista/imgs/Overview_of_Barista.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jumogehn/hfdpcpp_s/HEAD/docs/_static/Silver/Template/Barista/imgs/Overview_of_Barista.jpg -------------------------------------------------------------------------------- /docs/_static/Silver/check11features/c++11-test-static_assert-N1720.cpp: -------------------------------------------------------------------------------- 1 | int main() 2 | { 3 | static_assert(0 < 1, "your ordering of integers is screwed"); 4 | return 0; 5 | } 6 | -------------------------------------------------------------------------------- /docs/_static/Silver/ChainOfResponsibility/Chain_Of_Responsibility.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jumogehn/hfdpcpp_s/HEAD/docs/_static/Silver/ChainOfResponsibility/Chain_Of_Responsibility.jpg -------------------------------------------------------------------------------- /docs/_static/Silver/Factory/Pizzas/imgs/Overview_of_SimpleFactory.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jumogehn/hfdpcpp_s/HEAD/docs/_static/Silver/Factory/Pizzas/imgs/Overview_of_SimpleFactory.jpg -------------------------------------------------------------------------------- /docs/_static/Silver/Adapter/Ducks/include/Utilities.hpp: -------------------------------------------------------------------------------- 1 | 2 | #ifndef __UTILITIES_H__ 3 | #define __UTILITIES_H__ 4 | 5 | extern void PrintMessage(const char * pMessage); 6 | 7 | #endif 8 | 9 | -------------------------------------------------------------------------------- /docs/_static/Silver/Facade/HomeTheater/imgs/Overview_of_HomeTheater.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jumogehn/hfdpcpp_s/HEAD/docs/_static/Silver/Facade/HomeTheater/imgs/Overview_of_HomeTheater.jpg -------------------------------------------------------------------------------- /docs/_static/Silver/Factory/Pizzaaf/imgs/Overview_of_AbstractFactory.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jumogehn/hfdpcpp_s/HEAD/docs/_static/Silver/Factory/Pizzaaf/imgs/Overview_of_AbstractFactory.jpg -------------------------------------------------------------------------------- /docs/_static/Silver/Factory/Pizzafm/imgs/Overview_of_FactoryMethod.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jumogehn/hfdpcpp_s/HEAD/docs/_static/Silver/Factory/Pizzafm/imgs/Overview_of_FactoryMethod.jpg -------------------------------------------------------------------------------- /docs/_static/Silver/Iterator/DinerMergerI/Overview_of_DinerMergerI.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jumogehn/hfdpcpp_s/HEAD/docs/_static/Silver/Iterator/DinerMergerI/Overview_of_DinerMergerI.jpg -------------------------------------------------------------------------------- /docs/_static/Silver/Observer/Content/imgs/Overview_of_WeatherStation.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jumogehn/hfdpcpp_s/HEAD/docs/_static/Silver/Observer/Content/imgs/Overview_of_WeatherStation.jpg -------------------------------------------------------------------------------- /docs/_static/Silver/State/GumballStateWinner/imgs/SequenceDiagram1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jumogehn/hfdpcpp_s/HEAD/docs/_static/Silver/State/GumballStateWinner/imgs/SequenceDiagram1.jpg -------------------------------------------------------------------------------- /docs/_static/Silver/State/GumballStateWinner/imgs/StatechartDiagram1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jumogehn/hfdpcpp_s/HEAD/docs/_static/Silver/State/GumballStateWinner/imgs/StatechartDiagram1.jpg -------------------------------------------------------------------------------- /docs/_static/Silver/Command/SimpleRemote/imgs/Overview_of_SimpleRemote.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jumogehn/hfdpcpp_s/HEAD/docs/_static/Silver/Command/SimpleRemote/imgs/Overview_of_SimpleRemote.jpg -------------------------------------------------------------------------------- /docs/_static/Silver/Composite/MenusCustomIterator/imgs/SequenceDiagram1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jumogehn/hfdpcpp_s/HEAD/docs/_static/Silver/Composite/MenusCustomIterator/imgs/SequenceDiagram1.jpg -------------------------------------------------------------------------------- /docs/_static/Silver/Singleton/Chocolate/imgs/Overview_of_Chocolate_Boiler.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jumogehn/hfdpcpp_s/HEAD/docs/_static/Silver/Singleton/Chocolate/imgs/Overview_of_Chocolate_Boiler.jpg -------------------------------------------------------------------------------- /docs/_static/Silver/Strategy/Content/imgs/Overview_of_MiniDuckSimulator.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jumogehn/hfdpcpp_s/HEAD/docs/_static/Silver/Strategy/Content/imgs/Overview_of_MiniDuckSimulator.jpg -------------------------------------------------------------------------------- /docs/_static/Silver/Adapter/Ducks/DucksConfig.h.in: -------------------------------------------------------------------------------- 1 | // the configured options and settings for Ducks 2 | #define Ducks_VERSION_MAJOR @Ducks_VERSION_MAJOR@ 3 | #define Ducks_VERSION_MINOR @Ducks_VERSION_MINOR@ 4 | -------------------------------------------------------------------------------- /docs/_static/Silver/check11features/c++11-test-long_long-N1811.cpp: -------------------------------------------------------------------------------- 1 | int main(void) 2 | { 3 | long long l; 4 | unsigned long long ul; 5 | 6 | return ((sizeof(l) >= 8) && (sizeof(ul) >= 8)) ? 0 : 1; 7 | } 8 | -------------------------------------------------------------------------------- /docs/_static/Silver/State/GumballStateWinner/imgs/Overview_of_GumballStateWinner.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jumogehn/hfdpcpp_s/HEAD/docs/_static/Silver/State/GumballStateWinner/imgs/Overview_of_GumballStateWinner.jpg -------------------------------------------------------------------------------- /docs/_static/Silver/ChainOfResponsibility/GumballEMailHandler/imgs/SequenceDiagram1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jumogehn/hfdpcpp_s/HEAD/docs/_static/Silver/ChainOfResponsibility/GumballEMailHandler/imgs/SequenceDiagram1.jpg -------------------------------------------------------------------------------- /docs/_static/Silver/check11features/c++11-test-__func__-N2340.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() 4 | { 5 | if (!__func__) { return 1; } 6 | if(std::strlen(__func__) <= 0) { return 1; } 7 | return 0; 8 | } 9 | -------------------------------------------------------------------------------- /docs/_static/Silver/Composite/MenusCustomIterator/imgs/Overview_of_Menus_Custom_Iterator.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jumogehn/hfdpcpp_s/HEAD/docs/_static/Silver/Composite/MenusCustomIterator/imgs/Overview_of_Menus_Custom_Iterator.jpg -------------------------------------------------------------------------------- /docs/_static/Silver/Adapter/Ducks/lib/Utilities.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | #include 4 | 5 | void PrintMessage(const char * pMessage) 6 | { 7 | assert(pMessage); 8 | std::cout << pMessage << std::endl; 9 | } 10 | 11 | -------------------------------------------------------------------------------- /docs/_static/Silver/ChainOfResponsibility/GumballEMailHandler/imgs/Overview_of_GumballEMailHandler.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jumogehn/hfdpcpp_s/HEAD/docs/_static/Silver/ChainOfResponsibility/GumballEMailHandler/imgs/Overview_of_GumballEMailHandler.jpg -------------------------------------------------------------------------------- /docs/_static/Silver/check11features/c++11-test-decltype-N2343.cpp: -------------------------------------------------------------------------------- 1 | 2 | bool check_size(int i) 3 | { 4 | return sizeof(int) == sizeof(decltype(i)); 5 | } 6 | 7 | int main() 8 | { 9 | bool ret = check_size(42); 10 | return ret ? 0 : 1; 11 | } 12 | -------------------------------------------------------------------------------- /docs/_static/Silver/Bridge/Remotes/RemotesConfig.h.in: -------------------------------------------------------------------------------- 1 | // the configured options and settings for Remotes 2 | #define Remotes_VERSION_MAJOR @Remotes_VERSION_MAJOR@ 3 | #define Remotes_VERSION_MINOR @Remotes_VERSION_MINOR@ 4 | 5 | #cmakedefine USE_UTILS 6 | -------------------------------------------------------------------------------- /docs/_static/Silver/check11features/c++11-test-cstdint.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | int main() 3 | { 4 | bool test = 5 | (sizeof(int8_t) == 1) && 6 | (sizeof(int16_t) == 2) && 7 | (sizeof(int32_t) == 4) && 8 | (sizeof(int64_t) == 8); 9 | return test ? 0 : 1; 10 | } 11 | -------------------------------------------------------------------------------- /docs/_static/Silver/check11features/c++11-test-auto-N2546.cpp: -------------------------------------------------------------------------------- 1 | 2 | int main() 3 | { 4 | auto i = 5; 5 | auto f = 3.14159f; 6 | auto d = 3.14159; 7 | bool ret = ( 8 | (sizeof(f) < sizeof(d)) && 9 | (sizeof(i) == sizeof(int)) 10 | ); 11 | return ret ? 0 : 1; 12 | } 13 | -------------------------------------------------------------------------------- /docs/_static/Silver/Builder/Planner/Makefile: -------------------------------------------------------------------------------- 1 | 2 | all: 3 | g++ Planner.cpp \ 4 | -DACE_HAS_WCHAR=1 \ 5 | -DACE_NTRACE=0 \ 6 | -I$(HLM_ROOT)/include \ 7 | -I$(ACE_ROOT) \ 8 | -L$(HLM_ROOT)/lib \ 9 | -L$(ACE_ROOT)/lib \ 10 | -lACE \ 11 | -lHLM 12 | 13 | clean: 14 | rm -f a.out 15 | 16 | -------------------------------------------------------------------------------- /docs/_static/Silver/Flyweight/FowlWeight/Makefile: -------------------------------------------------------------------------------- 1 | 2 | all: 3 | g++ FowlWeight.cpp \ 4 | -DACE_HAS_WCHAR=1 \ 5 | -DACE_NTRACE=0 \ 6 | -I$(HLM_ROOT)/include \ 7 | -I$(ACE_ROOT) \ 8 | -L$(HLM_ROOT)/lib \ 9 | -L$(ACE_ROOT)/lib \ 10 | -lACE \ 11 | -lHLM 12 | 13 | clean: 14 | rm -f a.out 15 | 16 | -------------------------------------------------------------------------------- /docs/_static/Silver/Iterator/DinerMerger/Makefile: -------------------------------------------------------------------------------- 1 | 2 | all: 3 | g++ DinerMerger.cpp \ 4 | -DACE_HAS_WCHAR=1 \ 5 | -DACE_NTRACE=0 \ 6 | -I$(HLM_ROOT)/include \ 7 | -I$(ACE_ROOT) \ 8 | -L$(HLM_ROOT)/lib \ 9 | -L$(ACE_ROOT)/lib \ 10 | -lACE \ 11 | -lHLM 12 | 13 | clean: 14 | rm -f a.out 15 | 16 | -------------------------------------------------------------------------------- /docs/_static/Silver/Iterator/DinerMergerI/Makefile: -------------------------------------------------------------------------------- 1 | 2 | all: 3 | g++ DinerMergerI.cpp \ 4 | -DACE_HAS_WCHAR=1 \ 5 | -DACE_NTRACE=0 \ 6 | -I$(HLM_ROOT)/include \ 7 | -I$(ACE_ROOT) \ 8 | -L$(HLM_ROOT)/lib \ 9 | -L$(ACE_ROOT)/lib \ 10 | -lACE \ 11 | -lHLM 12 | 13 | clean: 14 | rm -f a.out 15 | 16 | -------------------------------------------------------------------------------- /docs/_static/Silver/check11features/c++11-test-rvalue_references-N2118.cpp: -------------------------------------------------------------------------------- 1 | int foo(int& lvalue) 2 | { 3 | return 123; 4 | } 5 | 6 | int foo(int&& rvalue) 7 | { 8 | return 321; 9 | } 10 | 11 | int main() 12 | { 13 | int i = 42; 14 | return ((foo(i) == 123) && (foo(42) == 321)) ? 0 : 1; 15 | } 16 | -------------------------------------------------------------------------------- /docs/_static/Silver/check11features/c++11-test-sizeof_member-N2253.cpp: -------------------------------------------------------------------------------- 1 | struct foo { 2 | char bar; 3 | int baz; 4 | }; 5 | 6 | int main(void) 7 | { 8 | bool ret = ( 9 | (sizeof(foo::bar) == 1) && 10 | (sizeof(foo::baz) >= sizeof(foo::bar)) && 11 | (sizeof(foo) >= sizeof(foo::bar)+sizeof(foo::baz)) 12 | ); 13 | return ret ? 0 : 1; 14 | } 15 | -------------------------------------------------------------------------------- /docs/_static/Silver/Builder/Planner/Planner.cpp: -------------------------------------------------------------------------------- 1 | #include "Planner.hpp" 2 | 3 | using namespace HeadFirstDesignPatterns::Builder; 4 | 5 | int main( int argc, char* argv[] ) { 6 | 7 | Client client( new VacationBuilder() ); 8 | 9 | std::auto_ptr< Vacation > vacation( client.constructPlanner() ); 10 | vacation->printItinerary(); 11 | 12 | return 0; 13 | } 14 | 15 | -------------------------------------------------------------------------------- /docs/_static/Silver/Compound/Ducks/DuckSimulator/DuckSimulator.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _HFDP_CPP_COMPOUND_DUCKS_DUCK_SIMULATOR_HPP_ 2 | #define _HFDP_CPP_COMPOUND_DUCKS_DUCK_SIMULATOR_HPP_ 3 | 4 | #include "../../../Standard.h" 5 | 6 | #include "Quackable.hpp" 7 | #include "DuckCall.hpp" 8 | #include "MallardDuck.hpp" 9 | #include "RedheadDuck.hpp" 10 | #include "RubberDuck.hpp" 11 | 12 | #endif -------------------------------------------------------------------------------- /docs/_static/Silver/check11features/c++11-test-constexpr-N2235.cpp: -------------------------------------------------------------------------------- 1 | constexpr int square(int x) 2 | { 3 | return x*x; 4 | } 5 | 6 | constexpr int the_answer() 7 | { 8 | return 42; 9 | } 10 | 11 | int main() 12 | { 13 | int test_arr[square(3)]; 14 | bool ret = ( 15 | (square(the_answer()) == 1764) && 16 | (sizeof(test_arr)/sizeof(test_arr[0]) == 9) 17 | ); 18 | return ret ? 0 : 1; 19 | } 20 | -------------------------------------------------------------------------------- /docs/_static/Silver/Mediator/AutoHouse/AutoHouse.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _HFDP_CPP_MEDIATOR_AUTO_HOUSE_HPP_ 2 | #define _HFDP_CPP_MEDIATOR_AUTO_HOUSE_HPP_ 3 | 4 | #include "../../Standard.h" 5 | 6 | #include "Appliance.hpp" 7 | #include "Mediator.hpp" 8 | 9 | #include "Alarm.hpp" 10 | #include "Calendar.hpp" 11 | #include "CoffeePot.hpp" 12 | #include "Sprinkler.hpp" 13 | #include "Shower.hpp" 14 | #include "WeatherStation.hpp" 15 | 16 | #endif -------------------------------------------------------------------------------- /docs/_static/Silver/Mediator/README.rst: -------------------------------------------------------------------------------- 1 | 2 | **************** 3 | Mediator Pattern 4 | **************** 5 | 6 | AutoHouse 7 | ========= 8 | 9 | Class Diagram 10 | ------------- 11 | 12 | .. image:: AutoHouse/Overview_of_AutoHouse.jpg 13 | :scale: 50 % 14 | :alt: Class Diagram 15 | 16 | 17 | Sequence Diagram 18 | ---------------- 19 | 20 | .. image:: AutoHouse/SequenceDiagram1.jpg 21 | :scale: 50 % 22 | :alt: Sequence Diagram 23 | 24 | 25 | -------------------------------------------------------------------------------- /docs/_static/Silver/Compound/Adapter/DuckSimulator/DuckSimulator.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _HFDP_CPP_COMPOUND_ADAPTER_DUCK_SIMULATOR_HPP_ 2 | #define _HFDP_CPP_COMPOUND_ADAPTER_DUCK_SIMULATOR_HPP_ 3 | 4 | #include "../../../Standard.h" 5 | 6 | #include "Quackable.hpp" 7 | #include "DuckCall.hpp" 8 | #include "MallardDuck.hpp" 9 | #include "RedheadDuck.hpp" 10 | #include "RubberDuck.hpp" 11 | 12 | #include "Goose.hpp" 13 | #include "GooseAdapter.hpp" 14 | 15 | #endif -------------------------------------------------------------------------------- /docs/_static/Silver/Iterator/DinerMergerI/DinerMergerI.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _HFDP_CPP_ITERATOR_DINER_MERGER_I_HPP_ 2 | #define _HFDP_CPP_ITERATOR_DINER_MERGER_I_HPP_ 3 | 4 | #include "../../Standard.h" 5 | 6 | #include "MenuItem.hpp" 7 | #include "Iterator.hpp" 8 | #include "Menu.hpp" 9 | #include "DinerMenuIterator.hpp" 10 | #include "DinerMenu.hpp" 11 | #include "PancakeHouseMenuIterator.hpp" 12 | #include "PancakeHouseMenu.hpp" 13 | #include "Waitress.hpp" 14 | 15 | #endif -------------------------------------------------------------------------------- /docs/_static/Silver/check11features_demo/demo.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | 4 | int main() 5 | { 6 | std::cout << "Testing\n"; 7 | std::cout << "Has static_assert: " << 8 | #ifdef HAS_CXX11_STATIC_ASSERT 9 | "yes :)" 10 | #else 11 | "no" 12 | #endif 13 | << "\n"; 14 | std::cout << "Has variadic templates: " << 15 | #ifdef HAS_CXX11_VARIADIC_TEMPLATES 16 | "yes :)" 17 | #else 18 | "no" 19 | #endif 20 | << "\n"; 21 | return 0; 22 | } 23 | 24 | -------------------------------------------------------------------------------- /docs/_static/Silver/Iterator/DinerMerger/DinerMerger.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _HFDP_CPP_ITERATOR_DINER_MERGER_HPP_ 2 | #define _HFDP_CPP_ITERATOR_DINER_MERGER_HPP_ 3 | 4 | #include "../../Standard.h" 5 | 6 | #include "MenuItem.hpp" 7 | #include "Iterator.hpp" 8 | #include "Menu.hpp" 9 | 10 | #include "DinerMenuIterator.hpp" 11 | #include "DinerMenu.hpp" 12 | #include "PancakeHouseMenuIterator.hpp" 13 | #include "PancakeHouseMenu.hpp" 14 | 15 | #include "Waitress.hpp" 16 | 17 | #endif -------------------------------------------------------------------------------- /docs/_static/Silver/Compound/Decorator/DuckSimulator/DuckSimulator.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _HFDP_CPP_COMPOUND_DECORATOR_DUCK_SIMULATOR_HPP_ 2 | #define _HFDP_CPP_COMPOUND_DECORATOR_DUCK_SIMULATOR_HPP_ 3 | 4 | #include "../../../Standard.h" 5 | 6 | #include "Quackable.hpp" 7 | #include "QuackCounter.hpp" 8 | #include "DuckCall.hpp" 9 | #include "MallardDuck.hpp" 10 | #include "RedheadDuck.hpp" 11 | #include "RubberDuck.hpp" 12 | 13 | #include "Goose.hpp" 14 | #include "GooseAdapter.hpp" 15 | 16 | #endif -------------------------------------------------------------------------------- /docs/_static/Silver/Flyweight/FowlWeight/FowlWeight.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _HFDP_CPP_FLYWEIGHT_FOWLWEIGHT_HPP_ 2 | #define _HFDP_CPP_FLYWEIGHT_FOWLWEIGHT_HPP_ 3 | 4 | #include "../../Standard.h" 5 | 6 | #include "Fowl.hpp" 7 | #include "Bird.hpp" 8 | #include "ModelDuck.hpp" 9 | #include "MallardDuck.hpp" 10 | #include "RedHeadDuck.hpp" 11 | #include "RubberDuck.hpp" 12 | #include "Turkey.hpp" 13 | #include "WildTurkey.hpp" 14 | #include "TurkeyAdapter.hpp" 15 | #include "FowlFactory.hpp" 16 | 17 | #endif -------------------------------------------------------------------------------- /docs/_static/Silver/Interpreter/README.rst: -------------------------------------------------------------------------------- 1 | 2 | ******************* 3 | Interpreter Pattern 4 | ******************* 5 | 6 | MiniDuckSimulator 7 | ================= 8 | 9 | Class Diagram 10 | ------------- 11 | 12 | .. image:: MiniDuckSimulator/Overview_of_MiniDuckSimulator.jpg 13 | :scale: 50 % 14 | :alt: Class Diagram 15 | 16 | 17 | Sequence Diagram 18 | ---------------- 19 | 20 | .. image:: MiniDuckSimulator/SequenceDiagram1.jpg 21 | :scale: 50 % 22 | :alt: Sequence Diagram 23 | 24 | 25 | -------------------------------------------------------------------------------- /docs/_static/Silver/Compound/Adapter/DuckSimulator/Goose.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _HFDP_CPP_COMPOUND_ADAPTER_GOOSE_HPP_ 2 | #define _HFDP_CPP_COMPOUND_ADAPTER_GOOSE_HPP_ 3 | 4 | #include "DuckSimulator.hpp" 5 | 6 | namespace HeadFirstDesignPatterns { 7 | namespace Compound { 8 | namespace Adapter { 9 | 10 | class Goose { 11 | 12 | public: void honk() { 13 | std::cout << "Honk" << std::endl; 14 | } 15 | }; 16 | 17 | } // namespace Adapter 18 | } // namespace Compound 19 | } // namespace HeadFirstDesignPatterns 20 | 21 | #endif -------------------------------------------------------------------------------- /docs/_static/Silver/Singleton/Chocolate/lib/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | #http://www-flc.desy.de/ldcoptimization/documents/talks/CMake_Tutorial.pdf 3 | 4 | # CmakeLists.txt in lib dir 5 | INCLUDE_DIRECTORIES(${Chocolate_SOURCE_DIR}/include) 6 | 7 | # Adds a library called chocolate (libchocolate.a under Linux) from the source files under lib/ 8 | ADD_LIBRARY( chocolate ChocolateBoiler ) 9 | 10 | foreach(flag ${CXX11_FEATURE_LIST}) 11 | set_property(TARGET chocolate 12 | APPEND PROPERTY COMPILE_DEFINITIONS ${flag} 13 | ) 14 | endforeach() 15 | 16 | -------------------------------------------------------------------------------- /docs/_static/Silver/check11features/c++11-test-variadic_templates-N2555.cpp: -------------------------------------------------------------------------------- 1 | int Accumulate() 2 | { 3 | return 0; 4 | } 5 | 6 | template 7 | int Accumulate(T v, Ts... vs) 8 | { 9 | return v + Accumulate(vs...); 10 | } 11 | 12 | template 13 | int CountElements() 14 | { 15 | return sizeof...(Is); 16 | } 17 | 18 | int main() 19 | { 20 | int acc = Accumulate(1, 2, 3, 4, -5); 21 | int count = CountElements<1,2,3,4,5>(); 22 | return ((acc == 5) && (count == 5)) ? 0 : 1; 23 | } 24 | -------------------------------------------------------------------------------- /docs/_static/Silver/Compound/Ducks/DuckSimulator/Quackable.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _HFDP_CPP_COMPOUND_DUCKS_QUACKABLE_HPP_ 2 | #define _HFDP_CPP_COMPOUND_DUCKS_QUACKABLE_HPP_ 3 | 4 | #include "DuckSimulator.hpp" 5 | 6 | namespace HeadFirstDesignPatterns { 7 | namespace Compound { 8 | namespace Ducks { 9 | 10 | class Quackable { 11 | 12 | public: virtual ~Quackable() = 0 { 13 | } 14 | public: virtual void quack() const = 0; 15 | }; 16 | 17 | } // namespace Ducks 18 | } // namespace Compound 19 | } // namespace HeadFirstDesignPatterns 20 | 21 | #endif -------------------------------------------------------------------------------- /docs/_static/Silver/Compound/Ducks/DuckSimulator/DuckCall.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _HFDP_CPP_COMPOUND_DUCKS_DUCK_CALL_HPP_ 2 | #define _HFDP_CPP_COMPOUND_DUCKS_DUCK_CALL_HPP_ 3 | 4 | #include "DuckSimulator.hpp" 5 | 6 | namespace HeadFirstDesignPatterns { 7 | namespace Compound { 8 | namespace Ducks { 9 | 10 | class DuckCall : public Quackable { 11 | 12 | public: void quack() const { 13 | std::cout << "Kwak" << std::endl; 14 | } 15 | }; 16 | 17 | } // namespace Ducks 18 | } // namespace Compound 19 | } // namespace HeadFirstDesignPatterns 20 | 21 | #endif -------------------------------------------------------------------------------- /docs/_static/Silver/Compound/Adapter/DuckSimulator/Quackable.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _HFDP_CPP_COMPOUND_ADAPTER_QUACKABLE_HPP_ 2 | #define _HFDP_CPP_COMPOUND_ADAPTER_QUACKABLE_HPP_ 3 | 4 | #include "DuckSimulator.hpp" 5 | 6 | namespace HeadFirstDesignPatterns { 7 | namespace Compound { 8 | namespace Adapter { 9 | 10 | class Quackable { 11 | 12 | public: virtual ~Quackable() = 0 { 13 | } 14 | public: virtual void quack() const = 0; 15 | }; 16 | 17 | } // namespace Adapter 18 | } // namespace Compound 19 | } // namespace HeadFirstDesignPatterns 20 | 21 | #endif -------------------------------------------------------------------------------- /docs/_static/Silver/Compound/Adapter/DuckSimulator/DuckCall.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _HFDP_CPP_COMPOUND_ADAPTER_DUCK_CALL_HPP_ 2 | #define _HFDP_CPP_COMPOUND_ADAPTER_DUCK_CALL_HPP_ 3 | 4 | #include "DuckSimulator.hpp" 5 | 6 | namespace HeadFirstDesignPatterns { 7 | namespace Compound { 8 | namespace Adapter { 9 | 10 | class DuckCall : public Quackable { 11 | 12 | public: void quack() const { 13 | std::cout << "Kwak" << std::endl; 14 | } 15 | }; 16 | 17 | } // namespace Adapter 18 | } // namespace Compound 19 | } // namespace HeadFirstDesignPatterns 20 | 21 | #endif -------------------------------------------------------------------------------- /docs/_static/Silver/Compound/Ducks/DuckSimulator/RubberDuck.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _HFDP_CPP_COMPOUND_DUCKS_RUBBER_DUCK_HPP_ 2 | #define _HFDP_CPP_COMPOUND_DUCKS_RUBBER_DUCK_HPP_ 3 | 4 | #include "DuckSimulator.hpp" 5 | 6 | namespace HeadFirstDesignPatterns { 7 | namespace Compound { 8 | namespace Ducks { 9 | 10 | class RubberDuck : public Quackable { 11 | 12 | public: void quack() const { 13 | std::cout << "Squeak" << std::endl; 14 | } 15 | }; 16 | 17 | } // namespace Ducks 18 | } // namespace Compound 19 | } // namespace HeadFirstDesignPatterns 20 | 21 | #endif -------------------------------------------------------------------------------- /docs/_static/Silver/Compound/Factory/DuckSimulator/DuckSimulator.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _HFDP_CPP_COMPOUND_FACTORY_DUCK_SIMULATOR_HPP_ 2 | #define _HFDP_CPP_COMPOUND_FACTORY_DUCK_SIMULATOR_HPP_ 3 | 4 | #include "../../../Standard.h" 5 | 6 | #include "Quackable.hpp" 7 | #include "QuackCounter.hpp" 8 | #include "DuckCall.hpp" 9 | #include "MallardDuck.hpp" 10 | #include "RedheadDuck.hpp" 11 | #include "RubberDuck.hpp" 12 | #include "Goose.hpp" 13 | #include "GooseAdapter.hpp" 14 | 15 | #include "AbstractDuckFactory.hpp" 16 | #include "CountingDuckFactory.hpp" 17 | 18 | #endif -------------------------------------------------------------------------------- /docs/_static/Silver/Composite/Menus/lib/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | #http://www-flc.desy.de/ldcoptimization/documents/talks/CMake_Tutorial.pdf 3 | 4 | # CmakeLists.txt in lib dir 5 | INCLUDE_DIRECTORIES(${Menus_SOURCE_DIR}/include) 6 | 7 | # Adds a library called menus (libmenus.a under Linux) from the source files under lib/ 8 | ADD_LIBRARY( menus Menu MenuComponent MenuItem UnsupportedOperationException Utilities Waitress ) 9 | 10 | foreach(flag ${CXX11_FEATURE_LIST}) 11 | set_property(TARGET menus 12 | APPEND PROPERTY COMPILE_DEFINITIONS ${flag} 13 | ) 14 | endforeach() 15 | 16 | -------------------------------------------------------------------------------- /docs/_static/Silver/Compound/Ducks/DuckSimulator/MallardDuck.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _HFDP_CPP_COMPOUND_DUCKS_MALLARD_DUCK_HPP_ 2 | #define _HFDP_CPP_COMPOUND_DUCKS_MALLARD_DUCK_HPP_ 3 | 4 | #include "DuckSimulator.hpp" 5 | 6 | namespace HeadFirstDesignPatterns { 7 | namespace Compound { 8 | namespace Ducks { 9 | 10 | class MallardDuck : public Quackable { 11 | 12 | public: void quack() const { 13 | std::cout << "Quack" << std::endl; 14 | } 15 | }; 16 | 17 | } // namespace Ducks 18 | } // namespace Compound 19 | } // namespace HeadFirstDesignPatterns 20 | 21 | #endif -------------------------------------------------------------------------------- /docs/_static/Silver/Compound/Ducks/DuckSimulator/RedHeadDuck.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _HFDP_CPP_COMPOUND_DUCKS_REDHEAD_DUCK_HPP_ 2 | #define _HFDP_CPP_COMPOUND_DUCKS_REDHEAD_DUCK_HPP_ 3 | 4 | #include "DuckSimulator.hpp" 5 | 6 | namespace HeadFirstDesignPatterns { 7 | namespace Compound { 8 | namespace Ducks { 9 | 10 | class RedheadDuck : public Quackable { 11 | 12 | public: void quack() const { 13 | std::cout << "Quack" << std::endl; 14 | } 15 | }; 16 | 17 | } // namespace Ducks 18 | } // namespace Compound 19 | } // namespace HeadFirstDesignPatterns 20 | 21 | #endif -------------------------------------------------------------------------------- /docs/_static/Silver/Compound/Adapter/DuckSimulator/RubberDuck.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _HFDP_CPP_COMPOUND_ADAPTER_RUBBER_DUCK_HPP_ 2 | #define _HFDP_CPP_COMPOUND_ADAPTER_RUBBER_DUCK_HPP_ 3 | 4 | #include "DuckSimulator.hpp" 5 | 6 | namespace HeadFirstDesignPatterns { 7 | namespace Compound { 8 | namespace Adapter { 9 | 10 | class RubberDuck : public Quackable { 11 | 12 | public: void quack() const { 13 | std::cout << "Squeak" << std::endl; 14 | } 15 | }; 16 | 17 | } // namespace Adapter 18 | } // namespace Compound 19 | } // namespace HeadFirstDesignPatterns 20 | 21 | #endif -------------------------------------------------------------------------------- /docs/_static/Silver/Compound/Adapter/DuckSimulator/MallardDuck.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _HFDP_CPP_COMPOUND_ADAPTER_MALLARD_DUCK_HPP_ 2 | #define _HFDP_CPP_COMPOUND_ADAPTER_MALLARD_DUCK_HPP_ 3 | 4 | #include "DuckSimulator.hpp" 5 | 6 | namespace HeadFirstDesignPatterns { 7 | namespace Compound { 8 | namespace Adapter { 9 | 10 | class MallardDuck : public Quackable { 11 | 12 | public: void quack() const { 13 | std::cout << "Quack" << std::endl; 14 | } 15 | }; 16 | 17 | } // namespace Adapter 18 | } // namespace Compound 19 | } // namespace HeadFirstDesignPatterns 20 | 21 | #endif -------------------------------------------------------------------------------- /docs/_static/Silver/Compound/Adapter/DuckSimulator/RedHeadDuck.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _HFDP_CPP_COMPOUND_ADAPTER_REDHEAD_DUCK_HPP_ 2 | #define _HFDP_CPP_COMPOUND_ADAPTER_REDHEAD_DUCK_HPP_ 3 | 4 | #include "DuckSimulator.hpp" 5 | 6 | namespace HeadFirstDesignPatterns { 7 | namespace Compound { 8 | namespace Adapter { 9 | 10 | class RedheadDuck : public Quackable { 11 | 12 | public: void quack() const { 13 | std::cout << "Quack" << std::endl; 14 | } 15 | }; 16 | 17 | } // namespace Adapter 18 | } // namespace Compound 19 | } // namespace HeadFirstDesignPatterns 20 | 21 | #endif -------------------------------------------------------------------------------- /docs/_static/Silver/Iterator/DinerMerger/Object.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _HEAD_FIRST_DESIGN_PATTERNS_ITERATOR_DINER_MERGER_OBJECT_HPP_ 2 | #define _HEAD_FIRST_DESIGN_PATTERNS_ITERATOR_DINER_MERGER_OBJECT_HPP_ 3 | 4 | #include "Hum_Log_Manager.h" 5 | #include "Hum_Trace.h" 6 | 7 | namespace HeadFirstDesignPatterns { 8 | namespace Iterator { 9 | namespace DinerMerger { 10 | 11 | template 12 | class Object { 13 | }; 14 | 15 | } // namespace DinerMerger 16 | } // namespace Iterator 17 | } // namespace HeadFirstDesignPatterns 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /docs/_static/Silver/Factory/Pizzas/lib/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | #http://www-flc.desy.de/ldcoptimization/documents/talks/CMake_Tutorial.pdf 3 | 4 | # CmakeLists.txt in lib dir 5 | INCLUDE_DIRECTORIES(${Pizzas_SOURCE_DIR}/include) 6 | 7 | # Adds a library called pizzas (libpizzas.a under Linux) from the source files under lib/ 8 | ADD_LIBRARY( pizzas ClamPizza Pizza SimplePizzaFactory VeggiePizza CheesePizza PepperoniPizza PizzaStore Utilities ) 9 | 10 | foreach(flag ${CXX11_FEATURE_LIST}) 11 | set_property(TARGET pizzas 12 | APPEND PROPERTY COMPILE_DEFINITIONS ${flag} 13 | ) 14 | endforeach() 15 | 16 | -------------------------------------------------------------------------------- /docs/_static/Silver/Compound/Composite/DuckSimulator/DuckSimulator.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _HFDP_CPP_COMPOUND_COMPOSITE_DUCK_SIMULATOR_HPP_ 2 | #define _HFDP_CPP_COMPOUND_COMPOSITE_DUCK_SIMULATOR_HPP_ 3 | 4 | #include "../../../Standard.h" 5 | 6 | #include "Quackable.hpp" 7 | #include "QuackCounter.hpp" 8 | #include "DuckCall.hpp" 9 | #include "MallardDuck.hpp" 10 | #include "RedheadDuck.hpp" 11 | #include "RubberDuck.hpp" 12 | #include "Goose.hpp" 13 | #include "GooseAdapter.hpp" 14 | #include "Flock.hpp" 15 | 16 | #include "AbstractDuckFactory.hpp" 17 | #include "CountingDuckFactory.hpp" 18 | 19 | #endif -------------------------------------------------------------------------------- /docs/_static/Silver/Factory/Pizzaaf/lib/Clams.cpp: -------------------------------------------------------------------------------- 1 | //===--- Clams.cpp - --------------------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | #include "Clams.hpp" 14 | #include "Utilities.hpp" 15 | 16 | using namespace HFDP::Factory::Abstract; 17 | 18 | Clams::~Clams() 19 | { 20 | PrintMessage("Clams::~Clams"); 21 | } 22 | -------------------------------------------------------------------------------- /docs/_static/Silver/Factory/Pizzaaf/lib/Sauce.cpp: -------------------------------------------------------------------------------- 1 | //===--- Sauce.cpp - --------------------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | #include "Sauce.hpp" 14 | #include "Utilities.hpp" 15 | 16 | using namespace HFDP::Factory::Abstract; 17 | 18 | Sauce::~Sauce() 19 | { 20 | PrintMessage("Sauce::~Sauce"); 21 | } 22 | -------------------------------------------------------------------------------- /docs/_static/Silver/Compound/Factory/DuckSimulator/Goose.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _HFDP_CPP_COMPOUND_FACTORY_GOOSE_HPP_ 2 | #define _HFDP_CPP_COMPOUND_FACTORY_GOOSE_HPP_ 3 | 4 | #include "DuckSimulator.hpp" 5 | 6 | namespace HeadFirstDesignPatterns { 7 | namespace Compound { 8 | namespace Factory { 9 | 10 | class Goose { 11 | 12 | public: void honk() const { 13 | std::cout << "Honk" << std::endl; 14 | } 15 | public: std::string toString() const { 16 | return "Goose"; 17 | } 18 | }; 19 | 20 | } // namespace Factory 21 | } // namespace Compound 22 | } // namespace HeadFirstDesignPatterns 23 | 24 | #endif -------------------------------------------------------------------------------- /docs/_static/Silver/Compound/Observer/DuckSimulator/Goose.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _HFDP_CPP_COMPOUND_OBSERVER_GOOSE_HPP_ 2 | #define _HFDP_CPP_COMPOUND_OBSERVER_GOOSE_HPP_ 3 | 4 | #include "DuckSimulator.hpp" 5 | 6 | namespace HeadFirstDesignPatterns { 7 | namespace Compound { 8 | namespace Observer { 9 | 10 | class Goose { 11 | 12 | public: void honk() { 13 | std::cout << "Honk" << std::endl; 14 | } 15 | public: std::string toString() const { 16 | return "Goose"; 17 | } 18 | }; 19 | 20 | } // namespace Observer 21 | } // namespace Compound 22 | } // namespace HeadFirstDesignPatterns 23 | 24 | #endif -------------------------------------------------------------------------------- /docs/_static/Silver/Compound/Observer/DuckSimulator/Observer.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _HFDP_CPP_COMPOUND_OBSERVER_OBSERVER_HPP_ 2 | #define _HFDP_CPP_COMPOUND_OBSERVER_OBSERVER_HPP_ 3 | 4 | #include "DuckSimulator.hpp" 5 | 6 | namespace HeadFirstDesignPatterns { 7 | namespace Compound { 8 | namespace Observer { 9 | 10 | class QuackObservable; 11 | 12 | class Observer { 13 | public: virtual void update(QuackObservable* duck ) = 0; 14 | public: virtual ~Observer() = 0 { 15 | } 16 | }; 17 | 18 | } // namespace Observer 19 | } // namespace Compound 20 | } // namespace HeadFirstDesignPatterns 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /docs/_static/Silver/Factory/Pizzaaf/lib/Cheese.cpp: -------------------------------------------------------------------------------- 1 | //===--- Cheese.cpp - -------------------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | #include "Cheese.hpp" 14 | #include "Utilities.hpp" 15 | 16 | using namespace HFDP::Factory::Abstract; 17 | 18 | Cheese::~Cheese() 19 | { 20 | PrintMessage("Cheese::~Cheese"); 21 | } 22 | 23 | -------------------------------------------------------------------------------- /docs/_static/Silver/Factory/Pizzaaf/lib/Veggies.cpp: -------------------------------------------------------------------------------- 1 | //===--- Veggies.cpp - ------------------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | #include "Veggies.hpp" 14 | #include "Utilities.hpp" 15 | 16 | using namespace HFDP::Factory::Abstract; 17 | 18 | Veggies::~Veggies() 19 | { 20 | PrintMessage("Veggies::~Veggies"); 21 | } 22 | -------------------------------------------------------------------------------- /docs/_static/Silver/Adapter/Ducks/lib/Duck.cpp: -------------------------------------------------------------------------------- 1 | //===--- Duck.cpp - ---------------------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | #include "Duck.hpp" 14 | #include "Utilities.hpp" 15 | 16 | using namespace HFDP::Adapter::Ducks; 17 | 18 | Duck::~Duck() 19 | { 20 | PrintMessage("Duck::~Duck()"); 21 | } 22 | 23 | -------------------------------------------------------------------------------- /docs/_static/Silver/Command/Undo/lib/Command.cpp: -------------------------------------------------------------------------------- 1 | //===--- Command.cpp - ------------------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | 14 | #include "Command.hpp" 15 | #include "Utilities.hpp" 16 | 17 | using namespace HFDP::Command::Undo; 18 | 19 | Command::~Command() 20 | { 21 | PrintMessage("Command::~Command"); 22 | } 23 | 24 | -------------------------------------------------------------------------------- /docs/_static/Silver/Compound/Composite/DuckSimulator/Goose.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _HFDP_CPP_COMPOUND_COMPOSITE_GOOSE_HPP_ 2 | #define _HFDP_CPP_COMPOUND_COMPOSITE_GOOSE_HPP_ 3 | 4 | #include "DuckSimulator.hpp" 5 | 6 | namespace HeadFirstDesignPatterns { 7 | namespace Compound { 8 | namespace Composite { 9 | 10 | class Goose { 11 | 12 | public: void honk() { 13 | std::cout << "Honk" << std::endl; 14 | } 15 | public: std::string toString() const { 16 | return "Goose"; 17 | } 18 | }; 19 | 20 | } // namespace Composite 21 | } // namespace Compound 22 | } // namespace HeadFirstDesignPatterns 23 | 24 | #endif -------------------------------------------------------------------------------- /docs/_static/Silver/Compound/Decorator/DuckSimulator/Goose.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _HFDP_CPP_COMPOUND_DECORATOR_GOOSE_HPP_ 2 | #define _HFDP_CPP_COMPOUND_DECORATOR_GOOSE_HPP_ 3 | 4 | #include "DuckSimulator.hpp" 5 | 6 | namespace HeadFirstDesignPatterns { 7 | namespace Compound { 8 | namespace Decorator { 9 | 10 | class Goose { 11 | 12 | public: void honk() { 13 | std::cout << "Honk" << std::endl; 14 | } 15 | public: std::string toString() const { 16 | return "Goose"; 17 | } 18 | }; 19 | 20 | } // namespace Decorator 21 | } // namespace Compound 22 | } // namespace HeadFirstDesignPatterns 23 | 24 | #endif -------------------------------------------------------------------------------- /docs/_static/Silver/Compound/Factory/DuckSimulator/Quackable.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _HFDP_CPP_COMPOUND_FACTORY_QUACKABLE_HPP_ 2 | #define _HFDP_CPP_COMPOUND_FACTORY_QUACKABLE_HPP_ 3 | 4 | #include "DuckSimulator.hpp" 5 | 6 | namespace HeadFirstDesignPatterns { 7 | namespace Compound { 8 | namespace Factory { 9 | 10 | class Quackable { 11 | 12 | public: virtual ~Quackable() = 0 { 13 | } 14 | public: virtual void quack() const = 0; 15 | public: virtual std::string toString() const = 0; 16 | }; 17 | 18 | } // namespace Factory 19 | } // namespace Compound 20 | } // namespace HeadFirstDesignPatterns 21 | 22 | #endif -------------------------------------------------------------------------------- /docs/_static/Silver/Decorator/Content/lib/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | #http://www-flc.desy.de/ldcoptimization/documents/talks/CMake_Tutorial.pdf 3 | 4 | # CmakeLists.txt in lib dir 5 | INCLUDE_DIRECTORIES(${Decorator_SOURCE_DIR}/include) 6 | 7 | # Adds a library called decorator (libdecorator.a under Linux) from the source files under lib/ 8 | ADD_LIBRARY( decorator 9 | Beverage CondimentDecorator Decaf HouseBlend Mocha Utilities DarkRoast Espresso Milk Soy Whip) 10 | 11 | foreach(flag ${CXX11_FEATURE_LIST}) 12 | set_property(TARGET decorator 13 | APPEND PROPERTY COMPILE_DEFINITIONS ${flag} 14 | ) 15 | endforeach() 16 | 17 | -------------------------------------------------------------------------------- /docs/_static/Silver/Factory/Pizzaaf/lib/Dough.cpp: -------------------------------------------------------------------------------- 1 | //===--- Dough.cpp - --------------------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | #include "Dough.hpp" 14 | #include "Utilities.hpp" 15 | #include 16 | 17 | using namespace HFDP::Factory::Abstract; 18 | 19 | Dough::~Dough() 20 | { 21 | PrintMessage("Dough::~Dough"); 22 | } 23 | -------------------------------------------------------------------------------- /docs/_static/Silver/Factory/Pizzaaf/lib/Pepperoni.cpp: -------------------------------------------------------------------------------- 1 | //===--- Pepperoni.cpp - ----------------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | #include "Pepperoni.hpp" 14 | #include "Utilities.hpp" 15 | 16 | using namespace HFDP::Factory::Abstract; 17 | 18 | Pepperoni::~Pepperoni() 19 | { 20 | PrintMessage("Pepperoni::~Pepperoni"); 21 | } 22 | -------------------------------------------------------------------------------- /docs/_static/Silver/Command/SimpleRemote/lib/Command.cpp: -------------------------------------------------------------------------------- 1 | //===--- Command.cpp - ------------------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | #include "Command.hpp" 14 | #include "Utilities.hpp" 15 | 16 | using namespace HFDP::Command::SimpleRemote; 17 | 18 | Command::~Command() 19 | { 20 | PrintMessage("Command::~Command"); 21 | } 22 | 23 | -------------------------------------------------------------------------------- /docs/_static/Silver/Compound/Composite/DuckSimulator/Quackable.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _HFDP_CPP_COMPOUND_COMPOSITE_QUACKABLE_HPP_ 2 | #define _HFDP_CPP_COMPOUND_COMPOSITE_QUACKABLE_HPP_ 3 | 4 | #include "DuckSimulator.hpp" 5 | 6 | namespace HeadFirstDesignPatterns { 7 | namespace Compound { 8 | namespace Composite { 9 | 10 | class Quackable { 11 | 12 | public: virtual ~Quackable() = 0 { 13 | } 14 | public: virtual void quack() const = 0; 15 | public: virtual std::string toString() const = 0; 16 | }; 17 | 18 | } // namespace Composite 19 | } // namespace Compound 20 | } // namespace HeadFirstDesignPatterns 21 | 22 | #endif -------------------------------------------------------------------------------- /docs/_static/Silver/Compound/Decorator/DuckSimulator/Quackable.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _HFDP_CPP_COMPOUND_DECORATOR_QUACKABLE_HPP_ 2 | #define _HFDP_CPP_COMPOUND_DECORATOR_QUACKABLE_HPP_ 3 | 4 | #include "DuckSimulator.hpp" 5 | 6 | namespace HeadFirstDesignPatterns { 7 | namespace Compound { 8 | namespace Decorator { 9 | 10 | class Quackable { 11 | 12 | public: virtual ~Quackable() = 0 { 13 | } 14 | public: virtual void quack() const= 0; 15 | public: virtual std::string toString() const = 0; 16 | }; 17 | 18 | } // namespace Decorator 19 | } // namespace Compound 20 | } // namespace HeadFirstDesignPatterns 21 | 22 | #endif -------------------------------------------------------------------------------- /docs/_static/Silver/Facade/HomeTheater/lib/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | #http://www-flc.desy.de/ldcoptimization/documents/talks/CMake_Tutorial.pdf 3 | 4 | # CmakeLists.txt in hometheater dir 5 | INCLUDE_DIRECTORIES(${HomeTheater_SOURCE_DIR}/include) 6 | 7 | # Adds a library called hometheater (libhometheater.a under Linux) from the source files under lib/ 8 | ADD_LIBRARY( hometheater Amplifier CdPlayer DvdPlayer HomeTheaterFacade PopcornPopper Projector Screen TheaterLights Tuner) 9 | 10 | foreach(flag ${CXX11_FEATURE_LIST}) 11 | set_property(TARGET hometheater 12 | APPEND PROPERTY COMPILE_DEFINITIONS ${flag} 13 | ) 14 | endforeach() 15 | 16 | -------------------------------------------------------------------------------- /docs/_static/Silver/Observer/Content/lib/Subject.cpp: -------------------------------------------------------------------------------- 1 | //===--- Subject.hpp - ------------------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | 14 | #include "Subject.hpp" 15 | #include "Utilities.hpp" 16 | 17 | using namespace HFDP::Observer; 18 | 19 | Subject::~Subject() 20 | { 21 | PrintMessage("Subject::~Subject"); 22 | } 23 | -------------------------------------------------------------------------------- /docs/_static/Silver/Adapter/Ducks/lib/Turkey.cpp: -------------------------------------------------------------------------------- 1 | //===--- Turkey.cpp - -------------------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | 14 | #include "Turkey.hpp" 15 | #include "Utilities.hpp" 16 | 17 | using namespace HFDP::Adapter::Ducks; 18 | 19 | Turkey::~Turkey() 20 | { 21 | PrintMessage("Turkey::~Turkey"); 22 | } 23 | 24 | -------------------------------------------------------------------------------- /docs/_static/Silver/Command/Remote/lib/NoCommand.cpp: -------------------------------------------------------------------------------- 1 | //===--- NoCommand.cpp - ----------------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | #include "NoCommand.hpp" 14 | #include "Utilities.hpp" 15 | 16 | using namespace HFDP::Command::Remote; 17 | 18 | void NoCommand::execute() const 19 | { 20 | PrintMessage("NoCommand::execute"); 21 | } 22 | 23 | 24 | -------------------------------------------------------------------------------- /docs/_static/Silver/Observer/Content/lib/Observer.cpp: -------------------------------------------------------------------------------- 1 | //===--- Observer.hpp - -----------------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | 14 | #include "Observer.hpp" 15 | #include "Utilities.hpp" 16 | 17 | using namespace HFDP::Observer; 18 | 19 | Observer::~Observer() 20 | { 21 | PrintMessage("Observer::~Observer"); 22 | } 23 | -------------------------------------------------------------------------------- /docs/_static/Silver/Command/SimpleRemote/lib/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | #http://www-flc.desy.de/ldcoptimization/documents/talks/CMake_Tutorial.pdf 3 | 4 | # CmakeLists.txt in lib dir 5 | INCLUDE_DIRECTORIES(${SimpleRemote_SOURCE_DIR}/include) 6 | 7 | # Adds a library called simpleremote (libsimpleremote.a under Linux) from the source files under lib/ 8 | ADD_LIBRARY( simpleremote GarageDoor Light LightOnCommand Utilities Command GarageDoorOpenCommand LightOffCommand SimpleRemoteControl ) 9 | 10 | foreach(flag ${CXX11_FEATURE_LIST}) 11 | set_property(TARGET simpleremote 12 | APPEND PROPERTY COMPILE_DEFINITIONS ${flag} 13 | ) 14 | endforeach() 15 | 16 | -------------------------------------------------------------------------------- /docs/_static/Silver/Interpreter/MiniDuckSimulator/FlyBehavior.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _HFDP_CPP_INTERPRETER_FLY_BEHAVIOR_HPP_ 2 | #define _HFDP_CPP_INTERPRETER_FLY_BEHAVIOR_HPP_ 3 | 4 | #include "MiniDuckSimulator.hpp" 5 | 6 | namespace HeadFirstDesignPatterns { 7 | namespace Interpreter { 8 | namespace MiniDuckSimulator { 9 | 10 | class FlyBehavior { 11 | 12 | public: 13 | virtual ~FlyBehavior() 14 | {} 15 | virtual void fly () const = 0; 16 | }; 17 | 18 | } // namespace MiniDuckSimulator 19 | } // namespace Interpreter 20 | } // namespace HeadFirstDesignPatterns 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /docs/_static/Silver/Observer/Content/lib/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | #http://www-flc.desy.de/ldcoptimization/documents/talks/CMake_Tutorial.pdf 3 | 4 | # CmakeLists.txt in lib dir 5 | INCLUDE_DIRECTORIES(${Content_SOURCE_DIR}/include) 6 | 7 | # Adds a library called content (libcontent.a under Linux) from the source files under lib/ 8 | ADD_LIBRARY( content DisplayElement HeatIndexDisplay StatisticsDisplay Utilities 9 | CurrentConditionsDisplay ForecastDisplay Observer Subject WeatherData ) 10 | 11 | foreach(flag ${CXX11_FEATURE_LIST}) 12 | set_property(TARGET content 13 | APPEND PROPERTY COMPILE_DEFINITIONS ${flag} 14 | ) 15 | endforeach() 16 | 17 | -------------------------------------------------------------------------------- /docs/_static/Silver/Compound/Observer/DuckSimulator/Quackable.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _HFDP_CPP_COMPOUND_OBSERVER_QUACKABLE_HPP_ 2 | #define _HFDP_CPP_COMPOUND_OBSERVER_QUACKABLE_HPP_ 3 | 4 | #include "DuckSimulator.hpp" 5 | 6 | namespace HeadFirstDesignPatterns { 7 | namespace Compound { 8 | namespace Observer { 9 | 10 | class Quackable : public QuackObservable { 11 | 12 | public: virtual ~Quackable() = 0 { 13 | } 14 | public: virtual void quack() const= 0; 15 | public: virtual std::string toString() const = 0; 16 | }; 17 | 18 | } // namespace Observer 19 | } // namespace Compound 20 | } // namespace HeadFirstDesignPatterns 21 | 22 | #endif -------------------------------------------------------------------------------- /docs/_static/Silver/State/GumballStateWinner/lib/State.cpp: -------------------------------------------------------------------------------- 1 | //===--- State.hpp - --------------------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | #include "State.hpp" 14 | #include "Utilities.hpp" 15 | 16 | using namespace HFDP::State::GumballStateWinner; 17 | 18 | State::~State() 19 | { 20 | PrintMessage("State::~State"); 21 | } 22 | 23 | -------------------------------------------------------------------------------- /docs/_static/Silver/Command/Undo/include/Utilities.hpp: -------------------------------------------------------------------------------- 1 | //===--- Utilities.hpp - ----------------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | #ifndef __UTILITIES_H__ 14 | #define __UTILITIES_H__ 15 | 16 | extern void PrintMessage(const char * pMessage, bool newline = true); 17 | extern void PrintMessage(unsigned int num, bool newline = true); 18 | 19 | #endif 20 | 21 | -------------------------------------------------------------------------------- /docs/_static/Silver/Composite/Menus/include/Utilities.hpp: -------------------------------------------------------------------------------- 1 | //===--- Utilities.hpp - ----------------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | #ifndef __UTILITIES_H__ 14 | #define __UTILITIES_H__ 15 | 16 | extern void PrintMessage(const char * pMessage, bool newline = true); 17 | extern void PrintMessage(unsigned int num, bool newline = true); 18 | 19 | #endif 20 | 21 | -------------------------------------------------------------------------------- /docs/_static/Silver/Compound/Factory/DuckSimulator/DuckCall.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _HFDP_CPP_COMPOUND_FACTORY_DUCK_CALL_HPP_ 2 | #define _HFDP_CPP_COMPOUND_FACTORY_DUCK_CALL_HPP_ 3 | 4 | #include "DuckSimulator.hpp" 5 | 6 | namespace HeadFirstDesignPatterns { 7 | namespace Compound { 8 | namespace Factory { 9 | 10 | class DuckCall : public Quackable { 11 | 12 | public: void quack() const { 13 | std::cout << "Kwak" << std::endl; 14 | } 15 | public: std::string toString() const { 16 | return "Duck Call"; 17 | } 18 | }; 19 | 20 | } // namespace Factory 21 | } // namespace Compound 22 | } // namespace HeadFirstDesignPatterns 23 | 24 | #endif -------------------------------------------------------------------------------- /docs/_static/Silver/Factory/Pizzaaf/include/Utilities.hpp: -------------------------------------------------------------------------------- 1 | //===--- Utilities.hpp - ----------------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | #ifndef __UTILITIES_H__ 14 | #define __UTILITIES_H__ 15 | 16 | extern void PrintMessage(const char * pMessage, bool newline = true); 17 | extern void PrintMessage(unsigned int num, bool newline = true); 18 | 19 | #endif 20 | 21 | -------------------------------------------------------------------------------- /docs/_static/Silver/Factory/Pizzafm/include/Utilities.hpp: -------------------------------------------------------------------------------- 1 | //===--- Utilities.hpp - ----------------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | #ifndef __UTILITIES_H__ 14 | #define __UTILITIES_H__ 15 | 16 | extern void PrintMessage(const char * pMessage, bool newline = true); 17 | extern void PrintMessage(unsigned int num, bool newline = true); 18 | 19 | #endif 20 | 21 | -------------------------------------------------------------------------------- /docs/_static/Silver/Factory/Pizzas/include/Utilities.hpp: -------------------------------------------------------------------------------- 1 | //===--- Utilities.hpp - ----------------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | #ifndef __UTILITIES_H__ 14 | #define __UTILITIES_H__ 15 | 16 | extern void PrintMessage(const char * pMessage, bool newline = true); 17 | extern void PrintMessage(unsigned int num, bool newline = true); 18 | 19 | #endif 20 | 21 | -------------------------------------------------------------------------------- /docs/_static/Silver/Interpreter/MiniDuckSimulator/QuackBehavior.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _HFDP_CPP_INTERPRETER_QUACK_BEHAVIOR_HPP_ 2 | #define _HFDP_CPP_INTERPRETER_QUACK_BEHAVIOR_HPP_ 3 | 4 | #include "MiniDuckSimulator.hpp" 5 | 6 | namespace HeadFirstDesignPatterns { 7 | namespace Interpreter { 8 | namespace MiniDuckSimulator { 9 | 10 | class QuackBehavior { 11 | 12 | public: 13 | virtual ~QuackBehavior() 14 | {} 15 | virtual void quack() const = 0; 16 | }; 17 | 18 | } // namespace MiniDuckSimulator 19 | } // namespace Interpreter 20 | } // namespace HeadFirstDesignPatterns 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /docs/_static/Silver/Bridge/Remotes/lib/utils/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | #http://www-flc.desy.de/ldcoptimization/documents/talks/CMake_Tutorial.pdf 3 | 4 | # CmakeLists.txt in lib dir 5 | include_directories(${Remotes_SOURCE_DIR}/include/utils) 6 | 7 | # Adds a library called utils (libutils.a under Linux) from the source files under lib/ 8 | add_library( utils Utilities ) 9 | 10 | foreach(flag ${CXX11_FEATURE_LIST}) 11 | set_property(TARGET utils 12 | APPEND PROPERTY COMPILE_DEFINITIONS ${flag} 13 | ) 14 | endforeach() 15 | 16 | install (TARGETS utils DESTINATION bin) 17 | install (FILES ${Remotes_SOURCE_DIR}/include/utils/Utilities.hpp DESTINATION include) 18 | 19 | -------------------------------------------------------------------------------- /docs/_static/Silver/Command/Remote/include/Utilities.hpp: -------------------------------------------------------------------------------- 1 | //===--- Utilities.hpp - ----------------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | 14 | #ifndef __UTILITIES_H__ 15 | #define __UTILITIES_H__ 16 | 17 | extern void PrintMessage(const char * pMessage, bool newline = true); 18 | extern void PrintMessage(unsigned int num, bool newline = true); 19 | 20 | #endif 21 | 22 | -------------------------------------------------------------------------------- /docs/_static/Silver/Command/SimpleRemote/include/Utilities.hpp: -------------------------------------------------------------------------------- 1 | //===--- Utilities.hpp - ----------------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | #ifndef __UTILITIES_H__ 14 | #define __UTILITIES_H__ 15 | 16 | extern void PrintMessage(const char * pMessage, bool newline = true); 17 | extern void PrintMessage(unsigned int num, bool newline = true); 18 | 19 | #endif 20 | 21 | -------------------------------------------------------------------------------- /docs/_static/Silver/Decorator/Content/include/Utilities.hpp: -------------------------------------------------------------------------------- 1 | //===--- Utilities.hpp - ----------------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | #ifndef __UTILITIES_H__ 14 | #define __UTILITIES_H__ 15 | 16 | extern void PrintMessage(const char * pMessage, bool newline = true); 17 | extern void PrintMessage(unsigned int num, bool newline = true); 18 | 19 | #endif 20 | 21 | -------------------------------------------------------------------------------- /docs/_static/Silver/Interpreter/MiniDuckSimulator/Quack.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _HFDP_CPP_INTERPRETER_QUACK_HPP_ 2 | #define _HFDP_CPP_INTERPRETER_QUACK_HPP_ 3 | 4 | #include "MiniDuckSimulator.hpp" 5 | 6 | namespace HeadFirstDesignPatterns { 7 | namespace Interpreter { 8 | namespace MiniDuckSimulator { 9 | 10 | class Quack : public QuackBehavior { 11 | 12 | public: 13 | void quack () const 14 | { 15 | std::cout << "Quack" << std::endl; 16 | } 17 | }; 18 | 19 | } // namespace MiniDuckSimulator 20 | } // namespace Interpreter 21 | } // namespace HeadFirstDesignPatterns 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /docs/_static/Silver/Observer/Content/include/Utilities.hpp: -------------------------------------------------------------------------------- 1 | //===--- Utilities.hpp - ----------------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | #ifndef __UTILITIES_H__ 14 | #define __UTILITIES_H__ 15 | 16 | extern void PrintMessage(const char * pMessage, bool newline = true); 17 | extern void PrintMessage(unsigned int num, bool newline = true); 18 | 19 | #endif 20 | 21 | -------------------------------------------------------------------------------- /docs/_static/Silver/Strategy/Content/lib/FlyBehavior.cpp: -------------------------------------------------------------------------------- 1 | //===--- FlyBehavior.cpp - --------------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | #include "FlyBehavior.hpp" 14 | #include "Utilities.hpp" 15 | 16 | using namespace HFDP::Strategy; 17 | 18 | FlyBehavior::~FlyBehavior() 19 | { 20 | PrintMessage("FlyBehavior::~FlyBehavior"); 21 | } 22 | 23 | -------------------------------------------------------------------------------- /docs/_static/Silver/Visitor/Menus/include/Utilities.hpp: -------------------------------------------------------------------------------- 1 | //===--- Utilities.hpp - ----------------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | 14 | #ifndef __UTILITIES_H__ 15 | #define __UTILITIES_H__ 16 | 17 | extern void PrintMessage(const char * pMessage, bool newline = true); 18 | extern void PrintMessage(unsigned int num, bool newline = true); 19 | 20 | #endif 21 | 22 | -------------------------------------------------------------------------------- /docs/_static/Silver/Compound/Composite/DuckSimulator/DuckCall.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _HFDP_CPP_COMPOUND_COMPOSITE_DUCK_CALL_HPP_ 2 | #define _HFDP_CPP_COMPOUND_COMPOSITE_DUCK_CALL_HPP_ 3 | 4 | #include "DuckSimulator.hpp" 5 | 6 | namespace HeadFirstDesignPatterns { 7 | namespace Compound { 8 | namespace Composite { 9 | 10 | class DuckCall : public Quackable { 11 | 12 | public: void quack() const { 13 | std::cout << "Kwak" << std::endl; 14 | } 15 | public: std::string toString() const { 16 | return "Duck Call"; 17 | } 18 | }; 19 | 20 | } // namespace Composite 21 | } // namespace Compound 22 | } // namespace HeadFirstDesignPatterns 23 | 24 | #endif -------------------------------------------------------------------------------- /docs/_static/Silver/Compound/Decorator/DuckSimulator/DuckCall.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _HFDP_CPP_COMPOUND_DECORATOR_DUCK_CALL_HPP_ 2 | #define _HFDP_CPP_COMPOUND_DECORATOR_DUCK_CALL_HPP_ 3 | 4 | #include "DuckSimulator.hpp" 5 | 6 | namespace HeadFirstDesignPatterns { 7 | namespace Compound { 8 | namespace Decorator { 9 | 10 | class DuckCall : public Quackable { 11 | 12 | public: void quack() const { 13 | std::cout << "Kwak" << std::endl; 14 | } 15 | public: std::string toString() const { 16 | return "Duck Call"; 17 | } 18 | }; 19 | 20 | } // namespace Decorator 21 | } // namespace Compound 22 | } // namespace HeadFirstDesignPatterns 23 | 24 | #endif -------------------------------------------------------------------------------- /docs/_static/Silver/Compound/Factory/DuckSimulator/RubberDuck.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _HFDP_CPP_COMPOUND_FACTORY_RUBBER_DUCK_HPP_ 2 | #define _HFDP_CPP_COMPOUND_FACTORY_RUBBER_DUCK_HPP_ 3 | 4 | #include "DuckSimulator.hpp" 5 | 6 | namespace HeadFirstDesignPatterns { 7 | namespace Compound { 8 | namespace Factory { 9 | 10 | class RubberDuck : public Quackable { 11 | 12 | public: void quack() const { 13 | std::cout << "Squeak" << std::endl; 14 | } 15 | public: std::string toString() const { 16 | return "Rubber Duck"; 17 | } 18 | }; 19 | 20 | } // namespace Factory 21 | } // namespace Compound 22 | } // namespace HeadFirstDesignPatterns 23 | 24 | #endif -------------------------------------------------------------------------------- /docs/_static/Silver/Interpreter/MiniDuckSimulator/Squeak.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _HFDP_CPP_INTERPRETER_SQUEAK_HPP_ 2 | #define _HFDP_CPP_INTERPRETER_SQUEAK_HPP_ 3 | 4 | #include "MiniDuckSimulator.hpp" 5 | 6 | namespace HeadFirstDesignPatterns { 7 | namespace Interpreter { 8 | namespace MiniDuckSimulator { 9 | 10 | class Squeak : public QuackBehavior { 11 | 12 | public: 13 | void quack () const 14 | { 15 | std::cout << "Squeak" << std::endl; 16 | } 17 | }; 18 | 19 | } // namespace MiniDuckSimulator 20 | } // namespace Interpreter 21 | } // namespace HeadFirstDesignPatterns 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /docs/_static/Silver/Strategy/Content/include/Utilities.hpp: -------------------------------------------------------------------------------- 1 | //===--- Utilities.hpp - ----------------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | 14 | #ifndef __UTILITIES_H__ 15 | #define __UTILITIES_H__ 16 | 17 | extern void PrintMessage(const char * pMessage, bool newline = true); 18 | extern void PrintMessage(unsigned int num, bool newline = true); 19 | 20 | #endif 21 | 22 | -------------------------------------------------------------------------------- /docs/_static/Silver/Template/Barista/include/Utilities.hpp: -------------------------------------------------------------------------------- 1 | //===--- Utilities.hpp - ----------------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | 14 | #ifndef __UTILITIES_H__ 15 | #define __UTILITIES_H__ 16 | 17 | extern void PrintMessage(const char * pMessage, bool newline = true); 18 | extern void PrintMessage(unsigned int num, bool newline = true); 19 | 20 | #endif 21 | 22 | -------------------------------------------------------------------------------- /docs/_static/Silver/Bridge/Remotes/lib/remotes/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | #http://www-flc.desy.de/ldcoptimization/documents/talks/CMake_Tutorial.pdf 3 | 4 | # CmakeLists.txt in lib dir 5 | include_directories(${Remotes_SOURCE_DIR}/include/remotes) 6 | if (USE_UTILS) 7 | include_directories(${Remotes_SOURCE_DIR}/include/utils) 8 | endif (USE_UTILS) 9 | 10 | # Adds a library called remotes (libremotes.a under Linux) from the source files under lib/ 11 | add_library( remotes RCA RCAControl RemoteControl Sony SonyControl) 12 | 13 | foreach(flag ${CXX11_FEATURE_LIST}) 14 | set_property(TARGET remotes 15 | APPEND PROPERTY COMPILE_DEFINITIONS ${flag} 16 | ) 17 | endforeach() 18 | 19 | -------------------------------------------------------------------------------- /docs/_static/Silver/Composite/MenusCustomIterator/include/Utilities.hpp: -------------------------------------------------------------------------------- 1 | //===--- Utilities.hpp - ----------------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | #ifndef __UTILITIES_H__ 14 | #define __UTILITIES_H__ 15 | 16 | extern void PrintMessage(const char * pMessage, bool newline = true); 17 | extern void PrintMessage(unsigned int num, bool newline = true); 18 | 19 | #endif 20 | 21 | -------------------------------------------------------------------------------- /docs/_static/Silver/Compound/Factory/DuckSimulator/MallardDuck.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _HFDP_CPP_COMPOUND_FACTORY_MALLARD_DUCK_HPP_ 2 | #define _HFDP_CPP_COMPOUND_FACTORY_MALLARD_DUCK_HPP_ 3 | 4 | #include "DuckSimulator.hpp" 5 | 6 | namespace HeadFirstDesignPatterns { 7 | namespace Compound { 8 | namespace Factory { 9 | 10 | class MallardDuck : public Quackable { 11 | 12 | public: void quack() const { 13 | std::cout << "Quack" << std::endl; 14 | } 15 | public: std::string toString() const { 16 | return "Mallard Duck"; 17 | } 18 | }; 19 | 20 | } // namespace Factory 21 | } // namespace Compound 22 | } // namespace HeadFirstDesignPatterns 23 | 24 | #endif -------------------------------------------------------------------------------- /docs/_static/Silver/Compound/Factory/DuckSimulator/RedHeadDuck.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _HFDP_CPP_COMPOUND_FACTORY_REDHEAD_DUCK_HPP_ 2 | #define _HFDP_CPP_COMPOUND_FACTORY_REDHEAD_DUCK_HPP_ 3 | 4 | #include "DuckSimulator.hpp" 5 | 6 | namespace HeadFirstDesignPatterns { 7 | namespace Compound { 8 | namespace Factory { 9 | 10 | class RedheadDuck : public Quackable { 11 | 12 | public: void quack() const { 13 | std::cout << "Quack" << std::endl; 14 | } 15 | public: std::string toString() const { 16 | return "Redhead Duck"; 17 | } 18 | }; 19 | 20 | } // namespace Factory 21 | } // namespace Compound 22 | } // namespace HeadFirstDesignPatterns 23 | 24 | #endif -------------------------------------------------------------------------------- /docs/_static/Silver/Observer/Content/lib/DisplayElement.cpp: -------------------------------------------------------------------------------- 1 | //===--- DisplayElement.hpp - -----------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | #include "DisplayElement.hpp" 14 | #include "Utilities.hpp" 15 | 16 | using namespace HFDP::Observer; 17 | 18 | DisplayElement::~DisplayElement() 19 | { 20 | PrintMessage("DisplayElement::~DisplayElement"); 21 | } 22 | -------------------------------------------------------------------------------- /docs/_static/Silver/State/GumballStateWinner/include/Utilities.hpp: -------------------------------------------------------------------------------- 1 | //===--- Utilities.hpp - ----------------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | 14 | #ifndef __UTILITIES_H__ 15 | #define __UTILITIES_H__ 16 | 17 | extern void PrintMessage(const char * pMessage, bool newline = true); 18 | extern void PrintMessage(unsigned int num, bool newline = true); 19 | 20 | #endif 21 | 22 | -------------------------------------------------------------------------------- /docs/_static/Silver/Strategy/Content/lib/QuackBehavior.cpp: -------------------------------------------------------------------------------- 1 | //===--- QuackBehavior.cpp - ------------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | #include "QuackBehavior.hpp" 14 | #include "Utilities.hpp" 15 | 16 | using namespace HFDP::Strategy; 17 | 18 | QuackBehavior::~QuackBehavior() 19 | { 20 | PrintMessage("QuackBehavior::~QuackBehavior"); 21 | } 22 | 23 | -------------------------------------------------------------------------------- /docs/_static/Silver/Compound/Composite/DuckSimulator/RubberDuck.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _HFDP_CPP_COMPOUND_COMPOSITE_RUBBER_DUCK_HPP_ 2 | #define _HFDP_CPP_COMPOUND_COMPOSITE_RUBBER_DUCK_HPP_ 3 | 4 | #include "DuckSimulator.hpp" 5 | 6 | namespace HeadFirstDesignPatterns { 7 | namespace Compound { 8 | namespace Composite { 9 | 10 | class RubberDuck : public Quackable { 11 | 12 | public: void quack() const { 13 | std::cout << "Squeak" << std::endl; 14 | } 15 | public: std::string toString() const { 16 | return "Rubber Duck"; 17 | } 18 | }; 19 | 20 | } // namespace Composite 21 | } // namespace Compound 22 | } // namespace HeadFirstDesignPatterns 23 | 24 | #endif -------------------------------------------------------------------------------- /docs/_static/Silver/Compound/Decorator/DuckSimulator/RubberDuck.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _HFDP_CPP_COMPOUND_DECORATOR_RUBBER_DUCK_HPP_ 2 | #define _HFDP_CPP_COMPOUND_DECORATOR_RUBBER_DUCK_HPP_ 3 | 4 | #include "DuckSimulator.hpp" 5 | 6 | namespace HeadFirstDesignPatterns { 7 | namespace Compound { 8 | namespace Decorator { 9 | 10 | class RubberDuck : public Quackable { 11 | 12 | public: void quack() const { 13 | std::cout << "Squeak" << std::endl; 14 | } 15 | public: std::string toString() const { 16 | return "Rubber Duck"; 17 | } 18 | }; 19 | 20 | } // namespace Decorator 21 | } // namespace Compound 22 | } // namespace HeadFirstDesignPatterns 23 | 24 | #endif -------------------------------------------------------------------------------- /docs/_static/Silver/Factory/Pizzaaf/lib/Onion.cpp: -------------------------------------------------------------------------------- 1 | //===--- Onion.cpp - --------------------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | #include "Onion.hpp" 14 | #include "Utilities.hpp" 15 | #include 16 | 17 | using namespace HFDP::Factory::Abstract; 18 | 19 | std::string Onion::toString() const 20 | { 21 | PrintMessage("Onion::toString"); 22 | return ( "Onion" ); 23 | } 24 | -------------------------------------------------------------------------------- /docs/_static/Silver/Interpreter/MiniDuckSimulator/FakeQuack.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _HFDP_CPP_INTERPRETER_FAKE_QUACK_HPP_ 2 | #define _HFDP_CPP_INTERPRETER_FAKE_QUACK_HPP_ 3 | 4 | #include "MiniDuckSimulator.hpp" 5 | 6 | namespace HeadFirstDesignPatterns { 7 | namespace Interpreter { 8 | namespace MiniDuckSimulator { 9 | 10 | class FakeQuack : public QuackBehavior { 11 | 12 | public: 13 | void quack () const 14 | { 15 | std::cout << "Qwak" << std::endl; 16 | } 17 | }; 18 | 19 | } // namespace MiniDuckSimulator 20 | } // namespace Interpreter 21 | } // namespace HeadFirstDesignPatterns 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /docs/_static/Silver/Composite/MenusCustomIterator/lib/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | #http://www-flc.desy.de/ldcoptimization/documents/talks/CMake_Tutorial.pdf 3 | 4 | # CmakeLists.txt in lib dir 5 | INCLUDE_DIRECTORIES(${MenusCustomIterator_SOURCE_DIR}/include) 6 | 7 | # Adds a library called menuscustomiterator (libmenuscustomiterator.a under Linux) from the source files under lib/ 8 | ADD_LIBRARY( menuscustomiterator 9 | Menu MenuItem UnsupportedOperationException Waitress MenuComponent MenuIterator Utilities ) 10 | 11 | foreach(flag ${CXX11_FEATURE_LIST}) 12 | set_property(TARGET menuscustomiterator 13 | APPEND PROPERTY COMPILE_DEFINITIONS ${flag} 14 | ) 15 | endforeach() 16 | 17 | -------------------------------------------------------------------------------- /docs/_static/Silver/Compound/Composite/DuckSimulator/MallardDuck.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _HFDP_CPP_COMPOUND_COMPOSITE_MALLARD_DUCK_HPP_ 2 | #define _HFDP_CPP_COMPOUND_COMPOSITE_MALLARD_DUCK_HPP_ 3 | 4 | #include "DuckSimulator.hpp" 5 | 6 | namespace HeadFirstDesignPatterns { 7 | namespace Compound { 8 | namespace Composite { 9 | 10 | class MallardDuck : public Quackable { 11 | 12 | public: void quack() const { 13 | std::cout << "Quack" << std::endl; 14 | } 15 | public: std::string toString() const { 16 | return "Mallard Duck"; 17 | } 18 | }; 19 | 20 | } // namespace Composite 21 | } // namespace Compound 22 | } // namespace HeadFirstDesignPatterns 23 | 24 | #endif -------------------------------------------------------------------------------- /docs/_static/Silver/Compound/Composite/DuckSimulator/RedHeadDuck.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _HFDP_CPP_COMPOUND_COMPOSITE_REDHEAD_DUCK_HPP_ 2 | #define _HFDP_CPP_COMPOUND_COMPOSITE_REDHEAD_DUCK_HPP_ 3 | 4 | #include "DuckSimulator.hpp" 5 | 6 | namespace HeadFirstDesignPatterns { 7 | namespace Compound { 8 | namespace Composite { 9 | 10 | class RedheadDuck : public Quackable { 11 | 12 | public: void quack() const { 13 | std::cout << "Quack" << std::endl; 14 | } 15 | public: std::string toString() const { 16 | return "Redhead Duck"; 17 | } 18 | }; 19 | 20 | } // namespace Composite 21 | } // namespace Compound 22 | } // namespace HeadFirstDesignPatterns 23 | 24 | #endif -------------------------------------------------------------------------------- /docs/_static/Silver/Compound/Decorator/DuckSimulator/MallardDuck.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _HFDP_CPP_COMPOUND_DECORATOR_MALLARD_DUCK_HPP_ 2 | #define _HFDP_CPP_COMPOUND_DECORATOR_MALLARD_DUCK_HPP_ 3 | 4 | #include "DuckSimulator.hpp" 5 | 6 | namespace HeadFirstDesignPatterns { 7 | namespace Compound { 8 | namespace Decorator { 9 | 10 | class MallardDuck : public Quackable { 11 | 12 | public: void quack() const { 13 | std::cout << "Quack" << std::endl; 14 | } 15 | public: std::string toString() const { 16 | return "Mallard Duck"; 17 | } 18 | }; 19 | 20 | } // namespace Decorator 21 | } // namespace Compound 22 | } // namespace HeadFirstDesignPatterns 23 | 24 | #endif -------------------------------------------------------------------------------- /docs/_static/Silver/Compound/Decorator/DuckSimulator/RedHeadDuck.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _HFDP_CPP_COMPOUND_DECORATOR_REDHEAD_DUCK_HPP_ 2 | #define _HFDP_CPP_COMPOUND_DECORATOR_REDHEAD_DUCK_HPP_ 3 | 4 | #include "DuckSimulator.hpp" 5 | 6 | namespace HeadFirstDesignPatterns { 7 | namespace Compound { 8 | namespace Decorator { 9 | 10 | class RedheadDuck : public Quackable { 11 | 12 | public: void quack() const { 13 | std::cout << "Quack" << std::endl; 14 | } 15 | public: std::string toString() const { 16 | return "Redhead Duck"; 17 | } 18 | }; 19 | 20 | } // namespace Decorator 21 | } // namespace Compound 22 | } // namespace HeadFirstDesignPatterns 23 | 24 | #endif -------------------------------------------------------------------------------- /docs/_static/Silver/Factory/Pizzaaf/lib/Garlic.cpp: -------------------------------------------------------------------------------- 1 | //===--- Garlic.cpp - -------------------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | #include "Garlic.hpp" 14 | #include "Utilities.hpp" 15 | #include 16 | 17 | using namespace HFDP::Factory::Abstract; 18 | 19 | std::string Garlic::toString() const 20 | { 21 | PrintMessage("Garlic::toString"); 22 | return ( "Garlic" ); 23 | } 24 | -------------------------------------------------------------------------------- /docs/_static/Silver/Factory/Pizzaaf/lib/EggPlant.cpp: -------------------------------------------------------------------------------- 1 | //===--- EggPlant.cpp - -----------------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | #include "EggPlant.hpp" 14 | #include "Utilities.hpp" 15 | #include 16 | 17 | using namespace HFDP::Factory::Abstract; 18 | 19 | std::string Eggplant::toString() const 20 | { 21 | PrintMessage("Eggplant::toString"); 22 | return "Eggplant"; 23 | } 24 | -------------------------------------------------------------------------------- /docs/_static/Silver/Factory/Pizzaaf/lib/Spinach.cpp: -------------------------------------------------------------------------------- 1 | //===--- Spinach.cpp - ------------------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | #include "Spinach.hpp" 14 | #include "Utilities.hpp" 15 | #include 16 | 17 | using namespace HFDP::Factory::Abstract; 18 | 19 | std::string Spinach::toString() const 20 | { 21 | PrintMessage("Spinach::toString"); 22 | return ( "Spinach" ); 23 | } 24 | -------------------------------------------------------------------------------- /docs/_static/Silver/Interpreter/MiniDuckSimulator/MuteQuack.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _HFDP_CPP_INTERPRETER_MUTE_QUACK_HPP_ 2 | #define _HFDP_CPP_INTERPRETER_MUTE_QUACK_HPP_ 3 | 4 | #include "MiniDuckSimulator.hpp" 5 | 6 | namespace HeadFirstDesignPatterns { 7 | namespace Interpreter { 8 | namespace MiniDuckSimulator { 9 | 10 | class MuteQuack : public QuackBehavior { 11 | 12 | public: 13 | void quack () const 14 | { 15 | std::cout << "<< Silence >>" << std::endl; 16 | } 17 | }; 18 | 19 | } // namespace MiniDuckSimulator 20 | } // namespace Interpreter 21 | } // namespace HeadFirstDesignPatterns 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /docs/_static/Silver/ChainOfResponsibility/GumballEMailHandler/include/Utilities.hpp: -------------------------------------------------------------------------------- 1 | //===--- Utilities.hpp - ----------------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | 14 | #ifndef __UTILITIES_H__ 15 | #define __UTILITIES_H__ 16 | 17 | extern void PrintMessage(const char * pMessage, bool newline = true); 18 | extern void PrintMessage(unsigned int num, bool newline = true); 19 | 20 | #endif 21 | 22 | -------------------------------------------------------------------------------- /docs/_static/Silver/Factory/Pizzaaf/lib/Mushroom.cpp: -------------------------------------------------------------------------------- 1 | //===--- Mushroom.cpp - -----------------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | #include "Mushroom.hpp" 14 | #include "Utilities.hpp" 15 | #include 16 | 17 | using namespace HFDP::Factory::Abstract; 18 | 19 | std::string Mushroom::toString() const 20 | { 21 | PrintMessage("Mushroom::toString"); 22 | return ( "Mushrooms" ); 23 | } 24 | -------------------------------------------------------------------------------- /docs/_static/Silver/Interpreter/MiniDuckSimulator/FlyNoWay.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _HFDP_CPP_INTERPRETER_FLY_NO_WAY_WINGS_HPP_ 2 | #define _HFDP_CPP_INTERPRETER_FLY_NO_WAY_WINGS_HPP_ 3 | 4 | #include "MiniDuckSimulator.hpp" 5 | 6 | namespace HeadFirstDesignPatterns { 7 | namespace Interpreter { 8 | namespace MiniDuckSimulator { 9 | 10 | class FlyNoWay : public FlyBehavior { 11 | 12 | public: 13 | void fly () const 14 | { 15 | std::cout << "I can't fly" << std::endl; 16 | } 17 | }; 18 | 19 | } // namespace MiniDuckSimulator 20 | } // namespace Interpreter 21 | } // namespace HeadFirstDesignPatterns 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /docs/_static/Silver/Factory/Pizzaaf/lib/RedPepper.cpp: -------------------------------------------------------------------------------- 1 | //===--- RedPepper.cpp - ----------------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | #include "RedPepper.hpp" 14 | #include "Utilities.hpp" 15 | #include 16 | 17 | using namespace HFDP::Factory::Abstract; 18 | 19 | std::string RedPepper::toString() const 20 | { 21 | PrintMessage("RedPepper::toString"); 22 | return ( "Red Pepper" ); 23 | } 24 | -------------------------------------------------------------------------------- /docs/_static/Silver/Interpreter/MiniDuckSimulator/FlyWithWings.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _HFDP_CPP_INTERPRETER_FLY_WITH_WINGS_HPP_ 2 | #define _HFDP_CPP_INTERPRETER_FLY_WITH_WINGS_HPP_ 3 | 4 | #include "MiniDuckSimulator.hpp" 5 | 6 | namespace HeadFirstDesignPatterns { 7 | namespace Interpreter { 8 | namespace MiniDuckSimulator { 9 | 10 | class FlyWithWings : public FlyBehavior { 11 | 12 | public: 13 | void fly () const 14 | { 15 | std::cout << "I'm flying!!" << std::endl; 16 | } 17 | }; 18 | 19 | } // namespace MiniDuckSimulator 20 | } // namespace Interpreter 21 | } // namespace HeadFirstDesignPatterns 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /docs/_static/Silver/Interpreter/MiniDuckSimulator/Iterator.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _HFDP_CPP_INTERPRETER_MINI_DUCK_SIMULATOR_ITERATOR_HPP_ 2 | #define _HFDP_CPP_INTERPRETER_MINI_DUCK_SIMULATOR_ITERATOR_HPP_ 3 | 4 | #include "MiniDuckSimulator.hpp" 5 | 6 | namespace HeadFirstDesignPatterns { 7 | namespace Interpreter { 8 | namespace MiniDuckSimulator { 9 | 10 | template 11 | class Iterator { 12 | public: 13 | virtual ~Iterator() 14 | {} 15 | virtual T* next() = 0; 16 | }; 17 | 18 | } // namespace MiniDuckSimulator 19 | } // namespace Iterator 20 | } // namespace HeadFirstDesignPatterns 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /docs/_static/Silver/Iterator/DinerMerger/DinerMerger.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "Hum_Log_Manager.h" 3 | #include "Hum_Trace.h" 4 | 5 | #include "DinerMerger.hpp" 6 | 7 | using namespace HeadFirstDesignPatterns::Iterator::DinerMerger; 8 | 9 | int main( int argc, char* argv[] ) { 10 | 11 | HUM_LOG_MANAGER->redirectToFile(ACE_TEXT("trace.log")); 12 | 13 | HUM_TRACE(ACE_TEXT("main")); 14 | 15 | std::auto_ptr< PancakeHouseMenu > pancakeHouseMenu( new PancakeHouseMenu() ); 16 | std::auto_ptr< DinerMenu > dinerMenu( new DinerMenu() ); 17 | std::auto_ptr< Waitress > waitress( 18 | new Waitress(pancakeHouseMenu.get(), dinerMenu.get() ) ); 19 | 20 | waitress->printMenu(); 21 | 22 | return 0; 23 | } 24 | -------------------------------------------------------------------------------- /docs/_static/Silver/Strategy/Content/lib/Quack.cpp: -------------------------------------------------------------------------------- 1 | //===--- Quack.cpp - --------------------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | #include "Quack.hpp" 14 | #include "Utilities.hpp" 15 | #include 16 | 17 | using namespace HFDP::Strategy; 18 | 19 | void Quack::quack () const 20 | { 21 | PrintMessage("Quack::quack"); 22 | std::cout << "Quack" << std::endl; 23 | } 24 | 25 | -------------------------------------------------------------------------------- /docs/_static/Silver/Command/Remote/lib/Command.cpp: -------------------------------------------------------------------------------- 1 | //===--- Command.cpp - ------------------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | #include "Command.hpp" 14 | #include "Utilities.hpp" 15 | 16 | using namespace HFDP::Command::Remote; 17 | 18 | Command::Command() 19 | { 20 | PrintMessage("Command::Command"); 21 | } 22 | 23 | Command::~Command() 24 | { 25 | PrintMessage("Command::~Command"); 26 | } 27 | 28 | -------------------------------------------------------------------------------- /docs/_static/Silver/Factory/Pizzaaf/lib/BlackOlives.cpp: -------------------------------------------------------------------------------- 1 | //===--- BlackOlives.cpp - --------------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | #include "BlackOlives.hpp" 14 | #include "Utilities.hpp" 15 | #include 16 | 17 | using namespace HFDP::Factory::Abstract; 18 | 19 | std::string BlackOlives::toString() const 20 | { 21 | PrintMessage("BlackOlives::toString"); 22 | return ( "Black Olives" ); 23 | } 24 | -------------------------------------------------------------------------------- /docs/_static/Silver/Strategy/Content/lib/Squeak.cpp: -------------------------------------------------------------------------------- 1 | //===--- Squeak.cpp - -------------------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | #include "Squeak.hpp" 14 | #include "Utilities.hpp" 15 | #include 16 | 17 | using namespace HFDP::Strategy; 18 | 19 | void Squeak::quack () const 20 | { 21 | PrintMessage("Squeak::quack"); 22 | std::cout << "Squeak" << std::endl; 23 | } 24 | 25 | -------------------------------------------------------------------------------- /docs/_static/Silver/Compound/Observer/DuckSimulator/QuackObservable.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _HFDP_CPP_COMPOUND_OBSERVER_QUACK_OBSERVABLE_HPP_ 2 | #define _HFDP_CPP_COMPOUND_OBSERVER_QUACK_OBSERVABLE_HPP_ 3 | 4 | #include "DuckSimulator.hpp" 5 | 6 | namespace HeadFirstDesignPatterns { 7 | namespace Compound { 8 | namespace Observer { 9 | 10 | class Observer; 11 | 12 | class QuackObservable { 13 | 14 | public: virtual ~QuackObservable() = 0 { 15 | } 16 | public: virtual void registerObserver(Observer* observer) = 0; 17 | public: virtual void notifyObservers() const = 0; 18 | }; 19 | 20 | } // namespace Observer 21 | } // namespace Compound 22 | } // namespace HeadFirstDesignPatterns 23 | 24 | #endif -------------------------------------------------------------------------------- /docs/_static/Silver/Factory/Pizzaaf/lib/MarinaraSauce.cpp: -------------------------------------------------------------------------------- 1 | //===--- MarinaraSauce.cpp - ------------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | #include "MarinaraSauce.hpp" 14 | #include "Utilities.hpp" 15 | #include 16 | 17 | using namespace HFDP::Factory::Abstract; 18 | 19 | std::string MarinaraSauce::toString() const 20 | { 21 | PrintMessage("MarinaraSauce::toString"); 22 | return "Marinara Sauce"; 23 | } 24 | -------------------------------------------------------------------------------- /docs/_static/Silver/Factory/Pizzaaf/lib/ReggianoCheese.cpp: -------------------------------------------------------------------------------- 1 | //===--- ReggianoCheese.cpp - -----------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | #include "ReggianoCheese.hpp" 14 | #include "Utilities.hpp" 15 | #include 16 | 17 | using namespace HFDP::Factory::Abstract; 18 | 19 | std::string ReggianoCheese::toString() const 20 | { 21 | PrintMessage("ReggianoCheese::toString"); 22 | return "Reggiano Cheese"; 23 | } 24 | -------------------------------------------------------------------------------- /docs/_static/Silver/Strategy/Content/lib/FakeQuack.cpp: -------------------------------------------------------------------------------- 1 | //===--- FakeQuack.cpp - ----------------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | #include "FakeQuack.hpp" 14 | #include "Utilities.hpp" 15 | #include 16 | 17 | using namespace HFDP::Strategy; 18 | 19 | void FakeQuack::quack () const 20 | { 21 | PrintMessage("FakeQuack::quack"); 22 | std::cout << "Qwak" << std::endl; 23 | } 24 | 25 | -------------------------------------------------------------------------------- /docs/_static/Silver/Strategy/Content/lib/FlyNoWay.cpp: -------------------------------------------------------------------------------- 1 | //===--- FlyNoWay.cpp - -----------------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | #include "FlyNoWay.hpp" 14 | #include "Utilities.hpp" 15 | #include 16 | 17 | using namespace HFDP::Strategy; 18 | 19 | void FlyNoWay::fly () const 20 | { 21 | PrintMessage("FlyNoWay::fly"); 22 | std::cout << "I can't fly" << std::endl; 23 | } 24 | 25 | -------------------------------------------------------------------------------- /docs/_static/Silver/Factory/Pizzaaf/lib/FreshClams.cpp: -------------------------------------------------------------------------------- 1 | //===--- FreshClams.cpp - ---------------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | #include "FreshClams.hpp" 14 | #include "Utilities.hpp" 15 | #include 16 | 17 | using namespace HFDP::Factory::Abstract; 18 | 19 | std::string FreshClams::toString() const 20 | { 21 | PrintMessage("FreshClams::toString"); 22 | return "Fresh Clams from Long Island Sound"; 23 | } 24 | -------------------------------------------------------------------------------- /docs/_static/Silver/Factory/Pizzaaf/lib/FrozenClams.cpp: -------------------------------------------------------------------------------- 1 | //===--- FrozenClams.cpp - --------------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | #include "FrozenClams.hpp" 14 | #include "Utilities.hpp" 15 | #include 16 | 17 | using namespace HFDP::Factory::Abstract; 18 | 19 | std::string FrozenClams::toString() const 20 | { 21 | PrintMessage("FrozenClams::toString"); 22 | return "Frozen Clams from Chesapeake Bay"; 23 | } 24 | -------------------------------------------------------------------------------- /docs/_static/Silver/Factory/Pizzaaf/lib/ParmesanCheese.cpp: -------------------------------------------------------------------------------- 1 | //===--- ParmesanCheese.cpp - -----------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | #include "ParmesanCheese.hpp" 14 | #include "Utilities.hpp" 15 | #include 16 | 17 | using namespace HFDP::Factory::Abstract; 18 | 19 | std::string ParmesanCheese::toString() const 20 | { 21 | PrintMessage("ParmesanCheese::toString"); 22 | return "Shredded Parmesan"; 23 | } 24 | -------------------------------------------------------------------------------- /docs/_static/Silver/Factory/Pizzaaf/lib/SlicedPepperoni.cpp: -------------------------------------------------------------------------------- 1 | //===--- SlicedPepperoni.cpp - ----------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | #include "SlicedPepperoni.hpp" 14 | #include "Utilities.hpp" 15 | #include 16 | 17 | using namespace HFDP::Factory::Abstract; 18 | 19 | std::string SlicedPepperoni::toString() const 20 | { 21 | PrintMessage("SlicedPepperoni::toString"); 22 | return "Sliced Pepperoni"; 23 | } 24 | -------------------------------------------------------------------------------- /docs/_static/Silver/Factory/Pizzaaf/lib/ThinCrustDough.cpp: -------------------------------------------------------------------------------- 1 | //===--- ThinCrustDough.cpp - -----------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | #include "ThinCrustDough.hpp" 14 | #include "Utilities.hpp" 15 | #include 16 | 17 | using namespace HFDP::Factory::Abstract; 18 | 19 | std::string ThinCrustDough::toString() const 20 | { 21 | PrintMessage("ThinCrustDough::toString"); 22 | return "Thin Crust Dough"; 23 | } 24 | -------------------------------------------------------------------------------- /docs/_static/Silver/Interpreter/MiniDuckSimulator/Expression.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _HFDP_CPP_INTERPRETER_MINI_DUCK_SIMULATOR_EXPRESSION_HPP_ 2 | #define _HFDP_CPP_INTERPRETER_MINI_DUCK_SIMULATOR_EXPRESSION_HPP_ 3 | 4 | #include "MiniDuckSimulator.hpp" 5 | 6 | namespace HeadFirstDesignPatterns { 7 | namespace Interpreter { 8 | namespace MiniDuckSimulator { 9 | 10 | class Visitor; 11 | 12 | class Expression { 13 | public: 14 | virtual ~Expression() 15 | {} 16 | virtual void accept( Visitor* visitor) = 0; 17 | }; 18 | 19 | } // namespace MiniDuckSimulator 20 | } // namespace Interpreter 21 | } // namespace HeadFirstDesignPatterns 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /docs/_static/Silver/Iterator/DinerMerger/Menu.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _HFDP_CPP_ITERATOR_DINER_MERGER_MENU_HPP_ 2 | #define _HFDP_CPP_ITERATOR_DINER_MERGER_MENU_HPP_ 3 | 4 | #include "Hum_Log_Manager.h" 5 | #include "Hum_Trace.h" 6 | 7 | namespace HeadFirstDesignPatterns { 8 | namespace Iterator { 9 | namespace DinerMerger { 10 | 11 | class Menu { 12 | 13 | public: 14 | virtual ~Menu() 15 | { 16 | HUM_TRACE(ACE_TEXT("Menu::~Menu")); 17 | } 18 | virtual Iterator* createIterator() const = 0; 19 | }; 20 | 21 | } // namespace DinerMerger 22 | } // namespace Iterator 23 | } // namespace HeadFirstDesignPatterns 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /docs/_static/Silver/Iterator/DinerMergerI/Menu.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _HFDP_CPP_ITERATOR_DINER_MERGER_I_MENU_HPP_ 2 | #define _HFDP_CPP_ITERATOR_DINER_MERGER_I_MENU_HPP_ 3 | 4 | #include "Hum_Log_Manager.h" 5 | #include "Hum_Trace.h" 6 | 7 | namespace HeadFirstDesignPatterns { 8 | namespace Iterator { 9 | namespace DinerMergerI { 10 | 11 | class Menu { 12 | public: 13 | virtual Iterator* createIterator() const = 0; 14 | virtual ~Menu() 15 | { 16 | HUM_TRACE(ACE_TEXT("Menu::~Menu")); 17 | } 18 | }; 19 | 20 | } // namespace DinerMergerI 21 | } // namespace Iterator 22 | } // namespace HeadFirstDesignPatterns 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /docs/_static/Silver/Visitor/Menus/lib/Visitor.cpp: -------------------------------------------------------------------------------- 1 | //===--- Visitor.cpp - ------------------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | #include "Visitor.hpp" 14 | #include "Utilities.hpp" 15 | 16 | using namespace HFDP::Visitor::Menus; 17 | 18 | Visitor::Visitor() 19 | { 20 | PrintMessage("Visitor::Visitor"); 21 | } 22 | 23 | Visitor::~Visitor() 24 | { 25 | PrintMessage("Visitor::~Visitor"); 26 | } 27 | -------------------------------------------------------------------------------- /docs/_static/Silver/Command/Undo/lib/NoCommand.cpp: -------------------------------------------------------------------------------- 1 | //===--- NoCommand.cpp - ----------------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | 14 | #include "NoCommand.hpp" 15 | #include "Utilities.hpp" 16 | 17 | using namespace HFDP::Command::Undo; 18 | 19 | void NoCommand::execute() const 20 | { 21 | PrintMessage("NoCommand::execute"); 22 | } 23 | void NoCommand::undo() const 24 | { 25 | PrintMessage("NoCommand::undo"); 26 | } 27 | 28 | -------------------------------------------------------------------------------- /docs/_static/Silver/Factory/Pizzaaf/lib/ThickCrustDough.cpp: -------------------------------------------------------------------------------- 1 | //===--- ThickCrustDough.cpp - ----------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | #include "ThickCrustDough.hpp" 14 | #include "Utilities.hpp" 15 | #include 16 | 17 | using namespace HFDP::Factory::Abstract; 18 | 19 | std::string ThickCrustDough::toString() const 20 | { 21 | PrintMessage("ThickCrustDough::toString"); 22 | return "Thick Crust Dough"; 23 | } 24 | -------------------------------------------------------------------------------- /docs/_static/Silver/Interpreter/MiniDuckSimulator/FlyRocketPowered.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _HFDP_CPP_INTERPRETER_FLY_ROCKET_POWERED_HPP_ 2 | #define _HFDP_CPP_INTERPRETER_FLY_ROCKET_POWERED_HPP_ 3 | 4 | #include "MiniDuckSimulator.hpp" 5 | 6 | namespace HeadFirstDesignPatterns { 7 | namespace Interpreter { 8 | namespace MiniDuckSimulator { 9 | 10 | class FlyRocketPowered : public FlyBehavior { 11 | 12 | public: 13 | void fly () const 14 | { 15 | std::cout << "I'm flying with a rocket" << std::endl; 16 | } 17 | }; 18 | 19 | } // namespace MiniDuckSimulator 20 | } // namespace Interpreter 21 | } // namespace HeadFirstDesignPatterns 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /docs/_static/Silver/Strategy/Content/lib/MuteQuack.cpp: -------------------------------------------------------------------------------- 1 | //===--- MuteQuack.cpp - ----------------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | #include "MuteQuack.hpp" 14 | #include "Utilities.hpp" 15 | #include 16 | 17 | using namespace HFDP::Strategy; 18 | 19 | void MuteQuack::quack () const 20 | { 21 | PrintMessage("MuteQuack::quack"); 22 | std::cout << "<< Silence >>" << std::endl; 23 | } 24 | 25 | -------------------------------------------------------------------------------- /docs/_static/Silver/ChainOfResponsibility/GumballEMailHandler/include/LastHandler.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _HFDP_CPP_CHAIN_OF_RESPONSIBILITY_DEFAULT_HANDLER_HPP_ 2 | #define _HFDP_CPP_CHAIN_OF_RESPONSIBILITY_DEFAULT_HANDLER_HPP_ 3 | 4 | #include "Handler.hpp" 5 | 6 | namespace HFDP { 7 | namespace ChainOfResponsibility { 8 | namespace GumballEMailHandler { 9 | 10 | class LastHandler : public Handler { 11 | 12 | public: 13 | explicit LastHandler( const Handler* successor = 0 ); 14 | void handleRequest( std::string request ) const; 15 | void print() const; 16 | }; 17 | 18 | } // namespace GumballEMailHandler 19 | } // namespace ChainOfResponsibility 20 | } // namespace HFDP 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /docs/_static/Silver/Factory/Pizzaaf/lib/MozzarellaCheese.cpp: -------------------------------------------------------------------------------- 1 | //===--- MozzarellaCheese.cpp - ---------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | #include "MozzarellaCheese.hpp" 14 | #include "Utilities.hpp" 15 | #include 16 | 17 | using namespace HFDP::Factory::Abstract; 18 | 19 | std::string MozzarellaCheese::toString() const 20 | { 21 | PrintMessage("MozzarellaCheese::toString"); 22 | return "Shredded Mozzarella"; 23 | } 24 | -------------------------------------------------------------------------------- /docs/_static/Silver/Factory/Pizzaaf/lib/PizzaIngredientFactory.cpp: -------------------------------------------------------------------------------- 1 | //===--- PizzaIngredientFactory.cpp - ---------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | #include "PizzaIngredientFactory.hpp" 14 | #include "Utilities.hpp" 15 | 16 | using namespace HFDP::Factory::Abstract; 17 | 18 | PizzaIngredientFactory::~PizzaIngredientFactory() 19 | { 20 | PrintMessage("PizzaIngredientFactory" 21 | "::~PizzaIngredientFactory"); 22 | } 23 | -------------------------------------------------------------------------------- /docs/_static/Silver/Factory/Pizzaaf/lib/PlumTomatoSauce.cpp: -------------------------------------------------------------------------------- 1 | //===--- PlumTomatoSauce.cpp - ----------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | #include "PlumTomatoSauce.hpp" 14 | #include "Utilities.hpp" 15 | #include 16 | 17 | using namespace HFDP::Factory::Abstract; 18 | 19 | std::string PlumTomatoSauce::toString() const 20 | { 21 | PrintMessage("PlumTomatoSauce::toString"); 22 | return "Tomato sauce with plum tomatoes"; 23 | } 24 | -------------------------------------------------------------------------------- /docs/_static/Silver/Strategy/Content/lib/FlyWithWings.cpp: -------------------------------------------------------------------------------- 1 | //===--- FlyWithWings.cpp - -------------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | #include "FlyWithWings.hpp" 14 | #include "Utilities.hpp" 15 | #include 16 | 17 | using namespace HFDP::Strategy; 18 | 19 | void FlyWithWings::fly () const 20 | { 21 | PrintMessage("FlyWithWings::fly"); 22 | std::cout << "I'm flying!!" << std::endl; 23 | } 24 | 25 | -------------------------------------------------------------------------------- /docs/_static/Silver/Compound/Observer/DuckSimulator/DuckSimulator.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _HFDP_CPP_COMPOUND_OBSERVER_DUCK_SIMULATOR_HPP_ 2 | #define _HFDP_CPP_COMPOUND_OBSERVER_DUCK_SIMULATOR_HPP_ 3 | 4 | #include "../../../Standard.h" 5 | 6 | #include "QuackObservable.hpp" 7 | #include "Observer.hpp" 8 | #include "Quackable.hpp" 9 | #include "Observable.hpp" 10 | 11 | #include "QuackCounter.hpp" 12 | #include "MallardDuck.hpp" 13 | #include "RedheadDuck.hpp" 14 | #include "RubberDuck.hpp" 15 | #include "DuckCall.hpp" 16 | #include "Goose.hpp" 17 | #include "GooseAdapter.hpp" 18 | #include "Flock.hpp" 19 | #include "Quackologist.hpp" 20 | 21 | #include "AbstractDuckFactory.hpp" 22 | #include "CountingDuckFactory.hpp" 23 | 24 | #endif -------------------------------------------------------------------------------- /docs/_static/Silver/Command/Undo/lib/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | #http://www-flc.desy.de/ldcoptimization/documents/talks/CMake_Tutorial.pdf 3 | 4 | # CmakeLists.txt in lib dir 5 | INCLUDE_DIRECTORIES(${Undo_SOURCE_DIR}/include) 6 | 7 | # Adds a library called undo (libundo.a under Linux) from the source files under lib/ 8 | ADD_LIBRARY( undo 9 | CeilingFanMediumCommand DimmerLightOnCommand NoCommand 10 | CeilingFan CeilingFanOffCommand Light RemoteControlWithUndo 11 | CeilingFanHighCommand Command LightOffCommand Utilities 12 | CeilingFanLowCommand DimmerLightOffCommand LightOnCommand ) 13 | 14 | foreach(flag ${CXX11_FEATURE_LIST}) 15 | set_property(TARGET undo 16 | APPEND PROPERTY COMPILE_DEFINITIONS ${flag} 17 | ) 18 | endforeach() 19 | 20 | -------------------------------------------------------------------------------- /docs/_static/Silver/Flyweight/FowlWeight/Turkey.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _HFDP_CPP_FLYWEIGHT_FOWLWEIGHT_TURKEY_HPP_ 2 | #define _HFDP_CPP_FLYWEIGHT_FOWLWEIGHT_TURKEY_HPP_ 3 | 4 | #include "FowlWeight.hpp" 5 | 6 | namespace HeadFirstDesignPatterns { 7 | namespace FlyWeight { 8 | namespace FowlWeight { 9 | 10 | // Abstract Flyweight 11 | 12 | class Turkey { 13 | 14 | public: 15 | virtual ~Turkey() 16 | {} 17 | virtual void gobble() const = 0; 18 | virtual void walk() const = 0; 19 | virtual std::string toString() const = 0; 20 | }; 21 | 22 | } // namespace FowlWeight 23 | } // namespace FlyWeight 24 | } // namespace HeadFirstDesignPatterns 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /docs/_static/Silver/Facade/HomeTheater/driver/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | #http://www-flc.desy.de/ldcoptimization/documents/talks/CMake_Tutorial.pdf 3 | 4 | # Make sure the compiler can find include files from our library hometheater. 5 | INCLUDE_DIRECTORIES(${HomeTheater_SOURCE_DIR}/include) 6 | 7 | # Add binary called "testhometheater" that is built from the source file "HomeTheater.cpp". 8 | # The extension is automatically found. 9 | ADD_EXECUTABLE(testhometheater HomeTheater) 10 | 11 | foreach(flag ${CXX11_FEATURE_LIST}) 12 | set_property(TARGET testhometheater 13 | APPEND PROPERTY COMPILE_DEFINITIONS ${flag} 14 | ) 15 | endforeach() 16 | 17 | # Link the executable to the library hometheater. 18 | TARGET_LINK_LIBRARIES(testhometheater hometheater) 19 | 20 | -------------------------------------------------------------------------------- /docs/_static/Silver/Interpreter/MiniDuckSimulator/EndCommand.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _HEAD_FIRST_DESIGN_PATTERNS_INTERPRETER_MINI_DUCK_SIMULATOR_END_COMMAND_HPP_ 2 | #define _HEAD_FIRST_DESIGN_PATTERNS_INTERPRETER_MINI_DUCK_SIMULATOR_END_COMMAND_HPP_ 3 | 4 | #include "MiniDuckSimulator.hpp" 5 | 6 | namespace HeadFirstDesignPatterns { 7 | namespace Interpreter { 8 | namespace MiniDuckSimulator { 9 | 10 | class EndCommand : public Expression { 11 | 12 | public: 13 | virtual bool interpret( Context& context ) 14 | { 15 | return true; 16 | } 17 | }; 18 | 19 | } // namespace MiniDuckSimulator 20 | } // namespace Interpreter 21 | } // namespace HeadFirstDesignPatterns 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /docs/_static/Silver/ChainOfResponsibility/GumballEMailHandler/lib/LastHandler.cpp: -------------------------------------------------------------------------------- 1 | #include "Handler.hpp" 2 | #include "LastHandler.hpp" 3 | #include "Utilities.hpp" 4 | #include 5 | 6 | 7 | using namespace HFDP::ChainOfResponsibility::GumballEMailHandler; 8 | 9 | LastHandler::LastHandler( const Handler* successor ) : 10 | Handler( successor ) 11 | { 12 | PrintMessage("LastHandler::LastHandler"); 13 | } 14 | void LastHandler::handleRequest( std::string request ) const 15 | { 16 | PrintMessage("LastHandler::handleRequest"); 17 | Handler::canHandleRequest( request ); 18 | } 19 | void LastHandler::print() const 20 | { 21 | PrintMessage("LastHandler::print"); 22 | PrintMessage("Unclassified, send to AI team:"); 23 | Handler::print(); 24 | } 25 | -------------------------------------------------------------------------------- /docs/_static/Silver/Factory/Pizzafm/lib/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | #http://www-flc.desy.de/ldcoptimization/documents/talks/CMake_Tutorial.pdf 3 | 4 | # CmakeLists.txt in lib dir 5 | INCLUDE_DIRECTORIES(${Pizzafm_SOURCE_DIR}/include) 6 | 7 | # Adds a library called pizzafm (libpizzafm.a under Linux) from the source files under lib/ 8 | ADD_LIBRARY( pizzafm 9 | ChicagoStyleClamPizza NYPizzaStore NYStylePepperoniPizza PizzaStore 10 | ChicagoPizzaStore ChicagoStylePepperoniPizza NYStyleCheesePizza NYStyleVeggiePizza 11 | ChicagoStyleCheesePizza ChicagoStyleVeggiePizza NYStyleClamPizza Pizza Utilities ) 12 | 13 | foreach(flag ${CXX11_FEATURE_LIST}) 14 | set_property(TARGET pizzafm 15 | APPEND PROPERTY COMPILE_DEFINITIONS ${flag} 16 | ) 17 | endforeach() 18 | 19 | -------------------------------------------------------------------------------- /docs/_static/Silver/Strategy/Content/lib/FlyRocketPowered.cpp: -------------------------------------------------------------------------------- 1 | //===--- FlyRocketPowered.cpp - ---------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | #include "FlyRocketPowered.hpp" 14 | #include "Utilities.hpp" 15 | #include 16 | 17 | using namespace HFDP::Strategy; 18 | 19 | void FlyRocketPowered::fly () const 20 | { 21 | PrintMessage("FlyRocketPowered::fly"); 22 | std::cout << "I'm flying with a rocket" << std::endl; 23 | } 24 | 25 | -------------------------------------------------------------------------------- /docs/_static/Silver/Interpreter/MiniDuckSimulator/DecoyDuck.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _HFDP_CPP_INTERPRETER_DECOY_DUCK_HPP_ 2 | #define _HFDP_CPP_INTERPRETER_DECOY_DUCK_HPP_ 3 | 4 | #include "MiniDuckSimulator.hpp" 5 | 6 | namespace HeadFirstDesignPatterns { 7 | namespace Interpreter { 8 | namespace MiniDuckSimulator { 9 | 10 | class DecoyDuck : public Duck { 11 | 12 | public: 13 | DecoyDuck() : Duck( new FlyNoWay(), new MuteQuack() ) 14 | {} 15 | void display() const 16 | { 17 | std::cout << "I'm a duck Decoy" << std::endl; 18 | } 19 | }; 20 | 21 | } // namespace MiniDuckSimulator 22 | } // namespace Interpreter 23 | } // namespace HeadFirstDesignPatterns 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /docs/_static/Silver/Interpreter/MiniDuckSimulator/ModelDuck.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _HFDP_CPP_INTERPRETER_MODEL_DUCK_HPP_ 2 | #define _HFDP_CPP_INTERPRETER_MODEL_DUCK_HPP_ 3 | 4 | #include "MiniDuckSimulator.hpp" 5 | 6 | namespace HeadFirstDesignPatterns { 7 | namespace Interpreter { 8 | namespace MiniDuckSimulator { 9 | 10 | class ModelDuck : public Duck { 11 | 12 | public: 13 | ModelDuck() : Duck( new FlyNoWay(), new FakeQuack() ) 14 | {} 15 | void display() const 16 | { 17 | std::cout << "I'm a model duck" << std::endl; 18 | } 19 | }; 20 | 21 | } // namespace MiniDuckSimulator 22 | } // namespace Interpreter 23 | } // namespace HeadFirstDesignPatterns 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /docs/_static/Silver/Decorator/Content/lib/Decaf.cpp: -------------------------------------------------------------------------------- 1 | //===--- Decaf.hpp - --------------------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | #include "Decaf.hpp" 14 | #include "Utilities.hpp" 15 | 16 | using namespace HFDP::Decorator; 17 | 18 | Decaf::Decaf() 19 | { 20 | PrintMessage("Decaf::Decaf"); 21 | _description = "Decaf Coffee"; 22 | } 23 | 24 | double Decaf::cost() const 25 | { 26 | PrintMessage("Decaf::cost"); 27 | return 1.05; 28 | } 29 | -------------------------------------------------------------------------------- /docs/_static/Silver/Interpreter/MiniDuckSimulator/RubberDuck.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _HFDP_CPP_INTERPRETER_RUBBER_DUCK_HPP_ 2 | #define _HFDP_CPP_INTERPRETER_RUBBER_DUCK_HPP_ 3 | 4 | #include "MiniDuckSimulator.hpp" 5 | 6 | namespace HeadFirstDesignPatterns { 7 | namespace Interpreter { 8 | namespace MiniDuckSimulator { 9 | 10 | class RubberDuck : public Duck { 11 | 12 | public: 13 | RubberDuck() : Duck( new FlyNoWay(), new Squeak() ) 14 | {} 15 | 16 | void display() const 17 | { 18 | std::cout << "I'm a rubber duck" << std::endl; 19 | } 20 | }; 21 | 22 | } // namespace MiniDuckSimulator 23 | } // namespace Interpreter 24 | } // namespace HeadFirstDesignPatterns 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /docs/_static/Silver/Strategy/LContent/README: -------------------------------------------------------------------------------- 1 | 2 | To test do the following 3 | 4 | lua miniducksimulator.lua 5 | 6 | tested under: 7 | 8 | Lua 5.1.5 Copyright (C) 1994-2012 Lua.org, PUC-Rio 9 | 10 | I only translated C++ Strategy pattern implementation into Lua. 11 | 12 | And GoF patterns are not recommended in lua. One of the reason 13 | stems from it's nature - a dynamic language not static like C++ 14 | There are talks related with this. 15 | 16 | http://lua-users.org/lists/lua-l/2014-02/msg00399.html 17 | http://lua-users.org/lists/lua-l/2014-02/msg00398.html 18 | 19 | I hope my work be a starting point to study lua version of GoF 20 | pattern which should be very much different than original GoF's 21 | 22 | License I prefer is AFL 3.0 23 | 24 | Jeonghum 25 | 26 | -------------------------------------------------------------------------------- /docs/_static/Silver/Interpreter/MiniDuckSimulator/MallardDuck.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _HFDP_CPP_INTERPRETER_MALLARD_DUCK_HPP_ 2 | #define _HFDP_CPP_INTERPRETER_MALLARD_DUCK_HPP_ 3 | 4 | #include "MiniDuckSimulator.hpp" 5 | 6 | namespace HeadFirstDesignPatterns { 7 | namespace Interpreter { 8 | namespace MiniDuckSimulator { 9 | 10 | class MallardDuck : public Duck { 11 | 12 | public: 13 | MallardDuck() : Duck( new FlyWithWings(), new Quack() ) 14 | {} 15 | void display() const 16 | { 17 | std::cout << "I'm a real Mallard duck" << std::endl; 18 | } 19 | }; 20 | 21 | } // namespace MiniDuckSimulator 22 | } // namespace Interpreter 23 | } // namespace HeadFirstDesignPatterns 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /docs/_static/Silver/Interpreter/MiniDuckSimulator/RedHeadDuck.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _HFDP_CPP_INTERPRETER_REDHEAD_DUCK_HPP_ 2 | #define _HFDP_CPP_INTERPRETER_REDHEAD_DUCK_HPP_ 3 | 4 | #include "MiniDuckSimulator.hpp" 5 | 6 | namespace HeadFirstDesignPatterns { 7 | namespace Interpreter { 8 | namespace MiniDuckSimulator { 9 | 10 | class RedHeadDuck : public Duck { 11 | 12 | public: 13 | RedHeadDuck() : Duck( new FlyWithWings(), new Quack() ) 14 | {} 15 | void display() const 16 | { 17 | std::cout << "I'm a real Red Headed duck" << std::endl; 18 | } 19 | }; 20 | 21 | } // namespace MiniDuckSimulator 22 | } // namespace Interpreter 23 | } // namespace HeadFirstDesignPatterns 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /docs/_static/Silver/ChainOfResponsibility/GumballEMailHandler/include/SpamHandler.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _HFDP_CPP_CHAIN_OF_RESPONSIBILITY_SPAM_HANDLER_HPP_ 2 | #define _HFDP_CPP_CHAIN_OF_RESPONSIBILITY_SPAM_HANDLER_HPP_ 3 | 4 | #include "Handler.hpp" 5 | 6 | namespace HFDP { 7 | namespace ChainOfResponsibility { 8 | namespace GumballEMailHandler { 9 | 10 | class SpamHandler : public Handler { 11 | public: 12 | explicit SpamHandler( const Handler* successor = 0 ); 13 | void handleRequest( std::string request ) const; 14 | bool canHandleRequest( const std::string& request ) const; 15 | void print() const; 16 | }; 17 | 18 | } // namespace GumballEMailHandler 19 | } // namespace ChainOfResponsibility 20 | } // namespace HFDP 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /docs/_static/Silver/Decorator/Content/lib/Espresso.cpp: -------------------------------------------------------------------------------- 1 | //===--- Espresso.hpp - -----------------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | #include "Espresso.hpp" 14 | #include "Utilities.hpp" 15 | 16 | using namespace HFDP::Decorator; 17 | 18 | Espresso::Espresso() 19 | { 20 | PrintMessage("Espresso::Espresso"); 21 | _description = "Espresso"; 22 | } 23 | 24 | double Espresso::cost() const 25 | { 26 | PrintMessage("Espresso::cost"); 27 | return 1.99; 28 | } 29 | -------------------------------------------------------------------------------- /docs/_static/Silver/ChainOfResponsibility/GumballEMailHandler/include/FanHandler.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _HFDP_CPP_CHAIN_OF_RESPONSIBILITY_FAN_HANDLER_HPP_ 2 | #define _HFDP_CPP_CHAIN_OF_RESPONSIBILITY_FAN_HANDLER_HPP_ 3 | 4 | #include "Handler.hpp" 5 | 6 | namespace HFDP { 7 | namespace ChainOfResponsibility { 8 | namespace GumballEMailHandler { 9 | 10 | class FanHandler : public Handler { 11 | 12 | public: 13 | explicit FanHandler( const Handler* successor = 0 ); 14 | void handleRequest( std::string request ) const; 15 | bool canHandleRequest( const std::string& request ) const; 16 | void print() const; 17 | }; 18 | 19 | } // namespace GumballEMailHandler 20 | } // namespace ChainOfResponsibility 21 | } // namespace HFDP 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /docs/_static/Silver/Compound/Observer/DuckSimulator/Quackologist.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _HFDP_CPP_COMPOUND_OBSERVER_QUACKOLOGIST_HPP_ 2 | #define _HFDP_CPP_COMPOUND_OBSERVER_QUACKOLOGIST_HPP_ 3 | 4 | #include "DuckSimulator.hpp" 5 | 6 | namespace HeadFirstDesignPatterns { 7 | namespace Compound { 8 | namespace Observer { 9 | 10 | class Quackologist : public Observer { 11 | 12 | public: void update( QuackObservable* duck ) { assert( duck ); 13 | std::cout << "Quackologist: " << dynamic_cast< Quackable* >( duck )->toString() << " just quacked." << std::endl; 14 | } 15 | public: std::string toString() const { 16 | return "Quackologist"; 17 | } 18 | }; 19 | 20 | } // namespace Observer 21 | } // namespace Compound 22 | } // namespace HeadFirstDesignPatterns 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /docs/_static/Silver/Facade/HomeTheater/lib/Screen.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "Screen.hpp" 3 | 4 | #include 5 | #include 6 | 7 | using namespace HeadFirstDesignPatterns::Facade::HomeTheater; 8 | 9 | Screen::Screen( std::string description ) : 10 | _description( description ) 11 | { 12 | std::cout << "Screen::Screen" << std::endl; 13 | } 14 | void Screen::up() 15 | { 16 | std::cout << "Screen::up" << std::endl; 17 | std::cout << _description.c_str() << " going up" << std::endl; 18 | } 19 | void Screen::down() 20 | { 21 | std::cout << "Screen::down" << std::endl; 22 | std::cout << _description.c_str() << " going down" << std::endl; 23 | } 24 | std::string Screen::toString() 25 | { 26 | std::cout << "Screen::toString" << std::endl; 27 | return _description; 28 | } 29 | 30 | 31 | -------------------------------------------------------------------------------- /docs/_static/Silver/Compound/Ducks/DuckSimulator/DuckSimulator.cpp: -------------------------------------------------------------------------------- 1 | #include "DuckSimulator.hpp" 2 | 3 | using namespace HeadFirstDesignPatterns::Compound::Ducks; 4 | 5 | void simulate( const Quackable* duck ) { assert( duck ); 6 | duck->quack(); 7 | } 8 | 9 | int main(int argc, char* argv[]) { 10 | 11 | std::auto_ptr< Quackable > mallardDuck( new MallardDuck() ); 12 | std::auto_ptr< Quackable > redheadDuck( new RedheadDuck() ); 13 | std::auto_ptr< Quackable > duckCall( new DuckCall() ); 14 | std::auto_ptr< Quackable > rubberDuck( new RubberDuck() ); 15 | 16 | std::cout << std::endl << "Duck Simulator" << std::endl; 17 | 18 | simulate( mallardDuck.get() ); 19 | simulate( redheadDuck.get() ); 20 | simulate( duckCall.get() ); 21 | simulate( rubberDuck.get() ); 22 | 23 | return 0; 24 | } -------------------------------------------------------------------------------- /docs/_static/Silver/Decorator/Content/lib/DarkRoast.cpp: -------------------------------------------------------------------------------- 1 | //===--- DarkRoast.hpp - ----------------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | #include "DarkRoast.hpp" 14 | #include "Utilities.hpp" 15 | 16 | using namespace HFDP::Decorator; 17 | 18 | DarkRoast::DarkRoast() 19 | { 20 | PrintMessage("DarkRoast::DarkRoast"); 21 | _description = "Dark Roast Coffee"; 22 | } 23 | 24 | double DarkRoast::cost() const 25 | { 26 | PrintMessage("DarkRoast::cost"); 27 | return 0.99; 28 | } 29 | -------------------------------------------------------------------------------- /docs/_static/Silver/Interpreter/MiniDuckSimulator/Repetitive.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _HEAD_FIRST_DESIGN_PATTERNS_INTERPRETER_MINI_DUCK_SIMULATOR_REPETITIVE_HPP_ 2 | #define _HEAD_FIRST_DESIGN_PATTERNS_INTERPRETER_MINI_DUCK_SIMULATOR_REPETITIVE_HPP_ 3 | 4 | #include "MiniDuckSimulator.hpp" 5 | 6 | namespace HeadFirstDesignPatterns { 7 | namespace Interpreter { 8 | namespace MiniDuckSimulator { 9 | 10 | class Repetitive : public Expression { 11 | 12 | protected: 13 | std::auto_ptr< Variable > _variable; 14 | 15 | public: 16 | Repetitive(); 17 | virtual bool interpret( Context& context ) = 0; 18 | }; 19 | 20 | } // namespace MiniDuckSimulator 21 | } // namespace Interpreter 22 | } // namespace HeadFirstDesignPatterns 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /docs/_static/Silver/Facade/HomeTheater/include/Screen.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _HFDP_CPP_FACADE_HOME_THEATER_SCREEN_HPP_ 2 | #define _HFDP_CPP_FACADE_HOME_THEATER_SCREEN_HPP_ 3 | 4 | #include 5 | 6 | namespace HeadFirstDesignPatterns { 7 | namespace Facade { 8 | namespace HomeTheater { 9 | 10 | class Screen { 11 | 12 | std::string _description; 13 | 14 | Screen( const Screen& ); // Disable copy constructor 15 | void operator=( const Screen& ); // Disable assignment operator 16 | 17 | public: 18 | Screen( std::string description ); 19 | void up(); 20 | void down(); 21 | std::string toString(); 22 | }; 23 | 24 | } // namespace HomeTheater 25 | } // namespace Facade 26 | } // namespace HeadFirstDesignPatterns 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /docs/_static/Silver/Interpreter/MiniDuckSimulator/NullCommand.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _HEAD_FIRST_DESIGN_PATTERNS_INTERPRETER_MINI_DUCK_SIMULATOR_NULL_COMMAND_HPP_ 2 | #define _HEAD_FIRST_DESIGN_PATTERNS_INTERPRETER_MINI_DUCK_SIMULATOR_NULL_COMMAND_HPP_ 3 | 4 | #include "MiniDuckSimulator.hpp" 5 | 6 | namespace HeadFirstDesignPatterns { 7 | namespace Interpreter { 8 | namespace MiniDuckSimulator { 9 | 10 | class NullCommand : public Expression { 11 | 12 | std::string _value; 13 | 14 | public: 15 | bool accept( Visitor* visitor ) 16 | { 17 | return visitor->interpret( this ); 18 | } 19 | }; 20 | 21 | } // namespace MiniDuckSimulator 22 | } // namespace Interpreter 23 | } // namespace HeadFirstDesignPatterns 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /docs/_static/Silver/Builder/Planner/Vacation.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _HFDP_CPP_BUILDER_VACATION_HPP_ 2 | #define _HFDP_CPP_BUILDER_VACATION_HPP_ 3 | 4 | #include "Planner.hpp" 5 | 6 | namespace HeadFirstDesignPatterns { 7 | namespace Builder { 8 | 9 | class Vacation { 10 | 11 | const Event& _allEvents; 12 | 13 | Vacation( const Vacation& ); // Disable copy constructor 14 | void operator=( const Vacation& ); // Disable assignment operator 15 | 16 | public: 17 | Vacation( const Event& allEvents ) : 18 | _allEvents( allEvents ) 19 | {} 20 | void printItinerary() const 21 | { 22 | std::cout << std::endl; 23 | _allEvents.print(); 24 | } 25 | }; 26 | 27 | } // namespace Builder 28 | } // namespace HeadFirstDesignPatterns 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /docs/_static/Silver/Decorator/Content/lib/HouseBlend.cpp: -------------------------------------------------------------------------------- 1 | //===--- HouseBlend.hpp - ---------------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | #include "HouseBlend.hpp" 14 | #include "Utilities.hpp" 15 | 16 | using namespace HFDP::Decorator; 17 | 18 | HouseBlend::HouseBlend() 19 | { 20 | PrintMessage("HouseBlend::HouseBlend"); 21 | _description = "House Blend Coffee"; 22 | } 23 | 24 | double HouseBlend::cost() const 25 | { 26 | PrintMessage("HouseBlend::cost"); 27 | return 0.89; 28 | } 29 | -------------------------------------------------------------------------------- /docs/_static/Silver/Iterator/DinerMerger/Iterator.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _HFDP_CPP_ITERATOR_DINER_MERGER_ITERATOR_HPP_ 2 | #define _HFDP_CPP_ITERATOR_DINER_MERGER_ITERATOR_HPP_ 3 | 4 | #include "Hum_Log_Manager.h" 5 | #include "Hum_Trace.h" 6 | 7 | namespace HeadFirstDesignPatterns { 8 | namespace Iterator { 9 | namespace DinerMerger { 10 | 11 | template 12 | class Iterator { 13 | 14 | public: 15 | virtual ~Iterator() 16 | { 17 | HUM_TRACE(ACE_TEXT("Iterator::~Iterator")); 18 | } 19 | virtual bool hasNext() const = 0; 20 | virtual T* next() const = 0; 21 | }; 22 | 23 | } // namespace DinerMerger 24 | } // namespace Iterator 25 | } // namespace HeadFirstDesignPatterns 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /docs/_static/Silver/Iterator/DinerMergerI/Iterator.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _HFDP_CPP_ITERATOR_DINER_MERGER_I_ITERATOR_HPP_ 2 | #define _HFDP_CPP_ITERATOR_DINER_MERGER_I_ITERATOR_HPP_ 3 | 4 | #include "Hum_Log_Manager.h" 5 | #include "Hum_Trace.h" 6 | 7 | namespace HeadFirstDesignPatterns { 8 | namespace Iterator { 9 | namespace DinerMergerI { 10 | 11 | template 12 | class Iterator { 13 | public: 14 | virtual bool hasNext() const = 0; 15 | virtual T* next() const = 0; 16 | virtual ~Iterator() 17 | { 18 | HUM_TRACE(ACE_TEXT("Iterator::~Iterator")); 19 | } 20 | }; 21 | 22 | } // namespace DinerMergerI 23 | } // namespace Iterator 24 | } // namespace HeadFirstDesignPatterns 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /docs/_static/Silver/Adapter/Ducks/lib/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | #http://www-flc.desy.de/ldcoptimization/documents/talks/CMake_Tutorial.pdf 3 | 4 | # CmakeLists.txt in ducks dir 5 | INCLUDE_DIRECTORIES(${Ducks_SOURCE_DIR}/include) 6 | 7 | # Adds a library called ducks (libducks.a under Linux) from the source files under lib/ 8 | ADD_LIBRARY( ducks Duck DuckAdapter MallardDuck Turkey TurkeyAdapter WildTurkey Utilities) 9 | 10 | foreach(flag ${CXX11_FEATURE_LIST}) 11 | set_property(TARGET ducks 12 | APPEND PROPERTY COMPILE_DEFINITIONS ${flag} 13 | ) 14 | endforeach() 15 | 16 | #ADD_LIBRARY( duck Duck ) 17 | #ADD_LIBRARY( duckadapter DuckAdapter ) 18 | #ADD_LIBRARY( mallardduck MallardDuck ) 19 | #ADD_LIBRARY( turkey Turkey ) 20 | #ADD_LIBRARY( turkeyadapter TurkeyAdapter ) 21 | #ADD_LIBRARY( wildturkey WildTurkey ) 22 | 23 | -------------------------------------------------------------------------------- /docs/_static/Silver/Adapter/Ducks/lib/MallardDuck.cpp: -------------------------------------------------------------------------------- 1 | //===--- MallardDuck.cpp - --------------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | #include "MallardDuck.hpp" 14 | #include "Utilities.hpp" 15 | 16 | using namespace HFDP::Adapter::Ducks; 17 | 18 | void MallardDuck::fly() const 19 | { 20 | PrintMessage("MallardDuck::fly"); 21 | PrintMessage("I'm flying"); 22 | } 23 | 24 | void MallardDuck::quack() const 25 | { 26 | PrintMessage("MallardDuck::quack"); 27 | PrintMessage("Quack"); 28 | } 29 | 30 | -------------------------------------------------------------------------------- /docs/_static/Silver/ChainOfResponsibility/GumballEMailHandler/include/ComplaintHandler.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _HFDP_CPP_CHAIN_OF_RESPONSIBILITY_COMPLAINT_HANDLER_HPP_ 2 | #define _HFDP_CPP_CHAIN_OF_RESPONSIBILITY_COMPLAINT_HANDLER_HPP_ 3 | 4 | #include "Handler.hpp" 5 | 6 | namespace HFDP { 7 | namespace ChainOfResponsibility { 8 | namespace GumballEMailHandler { 9 | 10 | class ComplaintHandler : public Handler { 11 | 12 | public: 13 | explicit ComplaintHandler( const Handler* successor = 0 ); 14 | void handleRequest( std::string request ) const; 15 | bool canHandleRequest( const std::string& request ) const; 16 | void print() const; 17 | }; 18 | 19 | } // namespace GumballEMailHandler 20 | } // namespace ChainOfResponsibility 21 | } // namespace HFDP 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /docs/_static/Silver/Compound/Factory/DuckSimulator/AbstractDuckFactory.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _HFDP_CPP_COMPOUND_FACTORY_ABSTRACT_DUCK_FACTORY_HPP_ 2 | #define _HFDP_CPP_COMPOUND_FACTORY_ABSTRACT_DUCK_FACTORY_HPP_ 3 | 4 | #include "DuckSimulator.hpp" 5 | 6 | namespace HeadFirstDesignPatterns { 7 | namespace Compound { 8 | namespace Factory { 9 | 10 | class AbstractDuckFactory { 11 | 12 | public: virtual ~AbstractDuckFactory() = 0 { 13 | } 14 | public: virtual Quackable* createMallardDuck() const = 0; 15 | public: virtual Quackable* createRedheadDuck() const = 0; 16 | public: virtual Quackable* createDuckCall() const = 0; 17 | public: virtual Quackable* createRubberDuck() const = 0; 18 | }; 19 | 20 | } // namespace Factory 21 | } // namespace Compound 22 | } // namespace HeadFirstDesignPatterns 23 | 24 | #endif -------------------------------------------------------------------------------- /docs/_static/Silver/Interpreter/MiniDuckSimulator/FlyCommand.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _HFDP_CPP_INTERPRETER_MINI_DUCK_SIMULATOR_FLY_COMMAND_HPP_ 2 | #define _HFDP_CPP_INTERPRETER_MINI_DUCK_SIMULATOR_FLY_COMMAND_HPP_ 3 | 4 | #include "MiniDuckSimulator.hpp" 5 | 6 | namespace HeadFirstDesignPatterns { 7 | namespace Interpreter { 8 | namespace MiniDuckSimulator { 9 | 10 | class FlyCommand : public Expression { 11 | ~FlyCommand() 12 | {} // disable inheritance 13 | 14 | public: 15 | void accept( Visitor* visitor ) 16 | { 17 | assert( visitor ); 18 | visitor->interpret( this ); 19 | } 20 | }; 21 | 22 | } // namespace MiniDuckSimulator 23 | } // namespace Interpreter 24 | } // namespace HeadFirstDesignPatterns 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /docs/_static/Silver/Interpreter/MiniDuckSimulator/LeftCommand.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _HFDP_CPP_INTERPRETER_MINI_DUCK_SIMULATOR_LEFT_COMMAND_HPP_ 2 | #define _HFDP_CPP_INTERPRETER_MINI_DUCK_SIMULATOR_LEFT_COMMAND_HPP_ 3 | 4 | #include "MiniDuckSimulator.hpp" 5 | 6 | namespace HeadFirstDesignPatterns { 7 | namespace Interpreter { 8 | namespace MiniDuckSimulator { 9 | 10 | class LeftCommand : public Expression { 11 | ~LeftCommand() 12 | {} // disable inheritance 13 | public: 14 | void accept( Visitor* visitor ) 15 | { 16 | assert( visitor ); 17 | visitor->interpret( this ); 18 | } 19 | }; 20 | 21 | } // namespace MiniDuckSimulator 22 | } // namespace Interpreter 23 | } // namespace HeadFirstDesignPatterns 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /docs/_static/Silver/Bridge/Remotes/include/utils/Utilities.hpp: -------------------------------------------------------------------------------- 1 | //===--- Utilities.hpp - ----------------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | //http://chadaustin.me/cppinterface.html 14 | 15 | #ifndef __UTILITIES_H__ 16 | #define __UTILITIES_H__ 17 | 18 | #ifdef WIN32 19 | #define CALL __stdcall 20 | #else 21 | #define CALL 22 | #endif 23 | 24 | extern "C" void CALL PrintMessage(const char * pMessage, bool newline = true); 25 | extern "C" void CALL PrintNumber(unsigned int num, bool newline = true); 26 | 27 | #endif 28 | 29 | -------------------------------------------------------------------------------- /docs/_static/Silver/Compound/Observer/DuckSimulator/AbstractDuckFactory.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _HFDP_CPP_COMPOUND_OBSERVER_ABSTRACT_DUCK_FACTORY_HPP_ 2 | #define _HFDP_CPP_COMPOUND_OBSERVER_ABSTRACT_DUCK_FACTORY_HPP_ 3 | 4 | #include "DuckSimulator.hpp" 5 | 6 | namespace HeadFirstDesignPatterns { 7 | namespace Compound { 8 | namespace Observer { 9 | 10 | class AbstractDuckFactory { 11 | 12 | public: virtual ~AbstractDuckFactory() = 0 { 13 | } 14 | public: virtual Quackable* createMallardDuck() const = 0; 15 | public: virtual Quackable* createRedheadDuck() const = 0; 16 | public: virtual Quackable* createDuckCall() const = 0; 17 | public: virtual Quackable* createRubberDuck() const = 0; 18 | }; 19 | 20 | } // namespace Observer 21 | } // namespace Compound 22 | } // namespace HeadFirstDesignPatterns 23 | 24 | #endif -------------------------------------------------------------------------------- /docs/_static/Silver/Decorator/Content/lib/CondimentDecorator.cpp: -------------------------------------------------------------------------------- 1 | //===--- CondimentDecorator.hpp - -------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | 14 | #include "CondimentDecorator.hpp" 15 | #include "Utilities.hpp" 16 | 17 | using namespace HFDP::Decorator; 18 | 19 | CondimentDecorator::CondimentDecorator() 20 | { 21 | PrintMessage("CondimentDecorator::CondimentDecorator"); 22 | } 23 | CondimentDecorator::~CondimentDecorator() 24 | { 25 | PrintMessage("CondimentDecorator::~CondimentDecorator"); 26 | } 27 | -------------------------------------------------------------------------------- /docs/_static/Silver/Interpreter/MiniDuckSimulator/SwimCommand.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _HFDP_CPP_INTERPRETER_MINI_DUCK_SIMULATOR_SWIM_COMMAND_HPP_ 2 | #define _HFDP_CPP_INTERPRETER_MINI_DUCK_SIMULATOR_SWIM_COMMAND_HPP_ 3 | 4 | #include "MiniDuckSimulator.hpp" 5 | 6 | namespace HeadFirstDesignPatterns { 7 | namespace Interpreter { 8 | namespace MiniDuckSimulator { 9 | 10 | class SwimCommand : public Expression { 11 | ~SwimCommand() 12 | {}// disable inheritance 13 | 14 | public: 15 | void accept( Visitor* visitor ) 16 | { 17 | assert( visitor ); 18 | visitor->interpret( this ); 19 | } 20 | }; 21 | 22 | } // namespace MiniDuckSimulator 23 | } // namespace Interpreter 24 | } // namespace HeadFirstDesignPatterns 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /docs/_static/Silver/Interpreter/MiniDuckSimulator/QuackCommand.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _HFDP_CPP_INTERPRETER_MINI_DUCK_SIMULATOR_QUACK_COMMAND_HPP_ 2 | #define _HFDP_CPP_INTERPRETER_MINI_DUCK_SIMULATOR_QUACK_COMMAND_HPP_ 3 | 4 | #include "MiniDuckSimulator.hpp" 5 | 6 | namespace HeadFirstDesignPatterns { 7 | namespace Interpreter { 8 | namespace MiniDuckSimulator { 9 | 10 | class QuackCommand : public Expression { 11 | ~QuackCommand() 12 | {} // disable inheritance 13 | 14 | public: 15 | void accept( Visitor* visitor ) 16 | { 17 | assert( visitor ); 18 | visitor->interpret( this ); 19 | } 20 | }; 21 | 22 | } // namespace MiniDuckSimulator 23 | } // namespace Interpreter 24 | } // namespace HeadFirstDesignPatterns 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /docs/_static/Silver/Interpreter/MiniDuckSimulator/RightCommand.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _HFDP_CPP_INTERPRETER_MINI_DUCK_SIMULATOR_RIGHT_COMMAND_HPP_ 2 | #define _HFDP_CPP_INTERPRETER_MINI_DUCK_SIMULATOR_RIGHT_COMMAND_HPP_ 3 | 4 | #include "MiniDuckSimulator.hpp" 5 | 6 | namespace HeadFirstDesignPatterns { 7 | namespace Interpreter { 8 | namespace MiniDuckSimulator { 9 | 10 | class RightCommand : public Expression { 11 | ~RightCommand() 12 | {}// disable inheritance 13 | 14 | public: 15 | void accept( Visitor* visitor ) 16 | { 17 | assert( visitor ); 18 | visitor->interpret( this ); 19 | } 20 | }; 21 | 22 | } // namespace MiniDuckSimulator 23 | } // namespace Interpreter 24 | } // namespace HeadFirstDesignPatterns 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /docs/_static/Silver/ChainOfResponsibility/GumballEMailHandler/include/NewLocationHandler.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _HFDP_CPP_CHAIN_OF_RESPONSIBILITY_NEW_LOCATION_HANDLER_HPP_ 2 | #define _HFDP_CPP_CHAIN_OF_RESPONSIBILITY_NEW_LOCATION_HANDLER_HPP_ 3 | 4 | #include "Handler.hpp" 5 | 6 | namespace HFDP { 7 | namespace ChainOfResponsibility { 8 | namespace GumballEMailHandler { 9 | 10 | class NewLocationHandler : public Handler { 11 | 12 | public: 13 | explicit NewLocationHandler( const Handler* successor = 0 ); 14 | void handleRequest( std::string request ) const; 15 | bool canHandleRequest( const std::string& request ) const; 16 | void print() const; 17 | }; 18 | 19 | } // namespace GumballEMailHandler 20 | } // namespace ChainOfResponsibility 21 | } // namespace HFDP 22 | 23 | #endif 24 | 25 | -------------------------------------------------------------------------------- /docs/_static/Silver/Interpreter/MiniDuckSimulator/DisplayCommand.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _HFDP_CPP_INTERPRETER_MINI_DUCK_SIMULATOR_DISPLAY_COMMAND_HPP_ 2 | #define _HFDP_CPP_INTERPRETER_MINI_DUCK_SIMULATOR_DISPLAY_COMMAND_HPP_ 3 | 4 | #include "MiniDuckSimulator.hpp" 5 | 6 | namespace HeadFirstDesignPatterns { 7 | namespace Interpreter { 8 | namespace MiniDuckSimulator { 9 | 10 | class DisplayCommand : public Expression { 11 | ~DisplayCommand() 12 | {} // disable inheritance 13 | public: 14 | void accept( Visitor* visitor ) 15 | { 16 | assert( visitor ); 17 | visitor->interpret( this ); 18 | } 19 | }; 20 | 21 | } // namespace MiniDuckSimulator 22 | } // namespace Interpreter 23 | } // namespace HeadFirstDesignPatterns 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /docs/_static/Silver/Strategy/Content/include/Quack.hpp: -------------------------------------------------------------------------------- 1 | //===--- Quack.hpp - --------------------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | 14 | #ifndef _HFDP_CPP_STRATEGY_QUACK_HPP_ 15 | #define _HFDP_CPP_STRATEGY_QUACK_HPP_ 16 | 17 | #include "QuackBehavior.hpp" 18 | 19 | namespace HFDP { 20 | namespace Strategy { 21 | 22 | class Quack : public QuackBehavior { 23 | 24 | public: 25 | void quack () const; 26 | }; 27 | 28 | } // namespace Strategy 29 | } // namespace HFDP 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /docs/_static/Silver/Compound/Composite/DuckSimulator/AbstractDuckFactory.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _HFDP_CPP_COMPOUND_COMPOSITE_ABSTRACT_DUCK_FACTORY_HPP_ 2 | #define _HFDP_CPP_COMPOUND_COMPOSITE_ABSTRACT_DUCK_FACTORY_HPP_ 3 | 4 | #include "DuckSimulator.hpp" 5 | 6 | namespace HeadFirstDesignPatterns { 7 | namespace Compound { 8 | namespace Composite { 9 | 10 | class AbstractDuckFactory { 11 | 12 | public: virtual ~AbstractDuckFactory() = 0 { 13 | } 14 | public: virtual Quackable* createMallardDuck() const = 0; 15 | public: virtual Quackable* createRedheadDuck() const = 0; 16 | public: virtual Quackable* createDuckCall() const = 0; 17 | public: virtual Quackable* createRubberDuck() const = 0; 18 | }; 19 | 20 | 21 | } // namespace Composite 22 | } // namespace Compound 23 | } // namespace HeadFirstDesignPatterns 24 | 25 | #endif -------------------------------------------------------------------------------- /docs/_static/Silver/Strategy/Content/include/Squeak.hpp: -------------------------------------------------------------------------------- 1 | //===--- Squeak.hpp - -------------------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | 14 | #ifndef _HFDP_CPP_STRATEGY_SQUEAK_HPP_ 15 | #define _HFDP_CPP_STRATEGY_SQUEAK_HPP_ 16 | 17 | #include "QuackBehavior.hpp" 18 | 19 | namespace HFDP { 20 | namespace Strategy { 21 | 22 | class Squeak : public QuackBehavior { 23 | 24 | public: 25 | void quack () const; 26 | }; 27 | 28 | } // namespace Strategy 29 | } // namespace HFDP 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /docs/_static/Silver/Adapter/Ducks/lib/WildTurkey.cpp: -------------------------------------------------------------------------------- 1 | //===--- WildTurkey.cpp - ---------------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | #include "WildTurkey.hpp" 14 | #include "Utilities.hpp" 15 | 16 | using namespace HFDP::Adapter::Ducks; 17 | 18 | void WildTurkey::fly() const 19 | { 20 | PrintMessage("WildTurkey::fly"); 21 | PrintMessage("I'm flying a short distance"); 22 | } 23 | 24 | void WildTurkey::gobble() const 25 | { 26 | PrintMessage("WildTurkey::gobble"); 27 | PrintMessage("Gobble gobble"); 28 | } 29 | 30 | -------------------------------------------------------------------------------- /docs/_static/Silver/Command/Remote/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | #http://www-flc.desy.de/ldcoptimization/documents/talks/CMake_Tutorial.pdf 3 | #http://pageant.ghulbus.eu/?p=664 4 | 5 | project (Remote) 6 | 7 | cmake_minimum_required(VERSION 2.8.6) 8 | 9 | set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}") 10 | include(../../check11features/CheckCXX11Features.cmake) 11 | 12 | # GCC specifics 13 | if(CMAKE_COMPILER_IS_GNUCXX) 14 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wall -std=c++0x") 15 | set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 -ggdb") 16 | endif() 17 | # Visual Studio specifics 18 | if(MSVC) 19 | # Warning Level 4 for Debug builds 20 | list(APPEND CMAKE_CXX_FLAGS_DEBUG " /W4") 21 | list(REMOVE_DUPLICATES CMAKE_CXX_FLAGS_DEBUG) 22 | endif() 23 | 24 | ADD_SUBDIRECTORY(driver) 25 | ADD_SUBDIRECTORY(lib) 26 | -------------------------------------------------------------------------------- /docs/_static/Silver/Command/Undo/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | #http://www-flc.desy.de/ldcoptimization/documents/talks/CMake_Tutorial.pdf 3 | #http://pageant.ghulbus.eu/?p=664 4 | 5 | project (Undo) 6 | 7 | cmake_minimum_required(VERSION 2.8.6) 8 | 9 | set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}") 10 | include(../../check11features/CheckCXX11Features.cmake) 11 | 12 | # GCC specifics 13 | if(CMAKE_COMPILER_IS_GNUCXX) 14 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wall -std=c++0x") 15 | set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 -ggdb") 16 | endif() 17 | # Visual Studio specifics 18 | if(MSVC) 19 | # Warning Level 4 for Debug builds 20 | list(APPEND CMAKE_CXX_FLAGS_DEBUG " /W4") 21 | list(REMOVE_DUPLICATES CMAKE_CXX_FLAGS_DEBUG) 22 | endif() 23 | 24 | ADD_SUBDIRECTORY(driver) 25 | ADD_SUBDIRECTORY(lib) 26 | -------------------------------------------------------------------------------- /docs/_static/Silver/Composite/Menus/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | #http://www-flc.desy.de/ldcoptimization/documents/talks/CMake_Tutorial.pdf 3 | #http://pageant.ghulbus.eu/?p=664 4 | 5 | project (Menus) 6 | 7 | cmake_minimum_required(VERSION 2.8.6) 8 | 9 | set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}") 10 | include(../../check11features/CheckCXX11Features.cmake) 11 | 12 | # GCC specifics 13 | if(CMAKE_COMPILER_IS_GNUCXX) 14 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wall -std=c++0x") 15 | set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 -ggdb") 16 | endif() 17 | # Visual Studio specifics 18 | if(MSVC) 19 | # Warning Level 4 for Debug builds 20 | list(APPEND CMAKE_CXX_FLAGS_DEBUG " /W4") 21 | list(REMOVE_DUPLICATES CMAKE_CXX_FLAGS_DEBUG) 22 | endif() 23 | 24 | ADD_SUBDIRECTORY(driver) 25 | ADD_SUBDIRECTORY(lib) 26 | -------------------------------------------------------------------------------- /docs/_static/Silver/Factory/Pizzas/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | #http://www-flc.desy.de/ldcoptimization/documents/talks/CMake_Tutorial.pdf 3 | #http://pageant.ghulbus.eu/?p=664 4 | 5 | project (Pizzas) 6 | 7 | cmake_minimum_required(VERSION 2.8.6) 8 | 9 | set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}") 10 | include(../../check11features/CheckCXX11Features.cmake) 11 | 12 | # GCC specifics 13 | if(CMAKE_COMPILER_IS_GNUCXX) 14 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wall -std=c++0x") 15 | set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 -ggdb") 16 | endif() 17 | # Visual Studio specifics 18 | if(MSVC) 19 | # Warning Level 4 for Debug builds 20 | list(APPEND CMAKE_CXX_FLAGS_DEBUG " /W4") 21 | list(REMOVE_DUPLICATES CMAKE_CXX_FLAGS_DEBUG) 22 | endif() 23 | 24 | ADD_SUBDIRECTORY(driver) 25 | ADD_SUBDIRECTORY(lib) 26 | -------------------------------------------------------------------------------- /docs/_static/Silver/Mediator/AutoHouse/Readme.txt: -------------------------------------------------------------------------------- 1 | The 'Mediator' pattern is discussed on page 622 in 'Head First Design Patterns'. 2 | 3 | As always, my intent is to implement the example as described in the book; however, 4 | I did have a couple of embellishments: WeatherStation and automation of the example. 5 | 6 | The WeatherStation tells auto-house if it is raining and automation of the example 7 | is driving by two (optional) parameters: 'interval' and 'iterations' specifying 8 | the length of a virtual day and the number of days to simulate respectively. The 9 | default is a simulated (yet accelerated) 24 hour day where 1 hour equals one second 10 | and runs for a simulated week where 1 iteration = 1 day. 11 | 12 | You can override these values with command-line parameters. As always, (constructive) 13 | feedback is welcomed. 14 | -------------------------------------------------------------------------------- /docs/_static/Silver/Template/Barista/lib/Tea.cpp: -------------------------------------------------------------------------------- 1 | //===--- Tea.cpp - ----------------------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | #include "Tea.hpp" 14 | #include "Utilities.hpp" 15 | #include 16 | 17 | using namespace HFDP::Template::Barista; 18 | 19 | void Tea::brew() const 20 | { 21 | PrintMessage("Tea::brew"); 22 | std::cout << "Steeping the tea" << std::endl; 23 | } 24 | void Tea::addCondiments() const 25 | { 26 | PrintMessage("Tea::addCondiments"); 27 | std::cout << "Adding Lemon" << std::endl; 28 | } 29 | -------------------------------------------------------------------------------- /docs/_static/Silver/Visitor/Menus/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | #http://www-flc.desy.de/ldcoptimization/documents/talks/CMake_Tutorial.pdf 3 | #http://pageant.ghulbus.eu/?p=664 4 | 5 | project (Menus) 6 | 7 | cmake_minimum_required(VERSION 2.8.6) 8 | 9 | set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}") 10 | include(../../check11features/CheckCXX11Features.cmake) 11 | 12 | # GCC specifics 13 | if(CMAKE_COMPILER_IS_GNUCXX) 14 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wall -std=c++0x") 15 | set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 -ggdb") 16 | endif() 17 | # Visual Studio specifics 18 | if(MSVC) 19 | # Warning Level 4 for Debug builds 20 | list(APPEND CMAKE_CXX_FLAGS_DEBUG " /W4") 21 | list(REMOVE_DUPLICATES CMAKE_CXX_FLAGS_DEBUG) 22 | endif() 23 | 24 | ADD_SUBDIRECTORY(driver) 25 | ADD_SUBDIRECTORY(lib) 26 | -------------------------------------------------------------------------------- /docs/_static/Silver/Builder/Planner/output.txt: -------------------------------------------------------------------------------- 1 | 2 | Welcome to Patternsland Vacation Planner! 3 | 4 | Enter vacation date (YYYY MM DD) where... 5 | YYYY=2006, 2007, etc..., MM=1-12, DD=1-31, separated by spaces 6 | YYYY MM DD 7 | 2013 5 3 8 | hotel? (0=No, 1=Grand Facadion, 2=Nostalgic Momento) 9 | 1 10 | Park tickets? (0=No, 1=Yes) 11 | 0 12 | Dinner Reservations? (0=No, 1=Pancake House, 2=Objectville Diner) 13 | 1 14 | Special Events? (0=No, 1=Choc-O-Holic factory tour, 2=Pizza factory tour) 15 | 1 16 | Would you like to plan another day? (0=No, 1=Yes) 17 | 0 18 | 19 | Vacation Itinerary, All events 20 | 2013-5-3 : Day, 1 21 | Hotel , Grand Facadion- $399 22 | Reservation, Dinner 23 | Pancake House , - $0 24 | Reservation, Special event 25 | Tickets , Choc-O-Holic factory tour- $45 26 | 27 | Goodbye and have a dreamy vacation! 28 | 29 | -------------------------------------------------------------------------------- /docs/_static/Silver/Decorator/Content/include/Decaf.hpp: -------------------------------------------------------------------------------- 1 | //===--- Decaf.hpp - --------------------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | 14 | #ifndef _HFDP_CPP_DECORATOR_DECAF_HPP_ 15 | #define _HFDP_CPP_DECORATOR_DECAF_HPP_ 16 | 17 | #include "Beverage.hpp" 18 | 19 | namespace HFDP { 20 | namespace Decorator { 21 | 22 | class Decaf : public Beverage { 23 | 24 | public: 25 | Decaf(); 26 | double cost() const; 27 | }; 28 | 29 | } // namespace Observer 30 | } // namespace HFDP 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /docs/_static/Silver/Factory/Pizzaaf/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | #http://www-flc.desy.de/ldcoptimization/documents/talks/CMake_Tutorial.pdf 3 | #http://pageant.ghulbus.eu/?p=664 4 | 5 | project (Pizzaaf) 6 | 7 | cmake_minimum_required(VERSION 2.8.6) 8 | 9 | set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}") 10 | include(../../check11features/CheckCXX11Features.cmake) 11 | 12 | # GCC specifics 13 | if(CMAKE_COMPILER_IS_GNUCXX) 14 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wall -std=c++0x") 15 | set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 -ggdb") 16 | endif() 17 | # Visual Studio specifics 18 | if(MSVC) 19 | # Warning Level 4 for Debug builds 20 | list(APPEND CMAKE_CXX_FLAGS_DEBUG " /W4") 21 | list(REMOVE_DUPLICATES CMAKE_CXX_FLAGS_DEBUG) 22 | endif() 23 | 24 | ADD_SUBDIRECTORY(driver) 25 | ADD_SUBDIRECTORY(lib) 26 | -------------------------------------------------------------------------------- /docs/_static/Silver/Factory/Pizzafm/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | #http://www-flc.desy.de/ldcoptimization/documents/talks/CMake_Tutorial.pdf 3 | #http://pageant.ghulbus.eu/?p=664 4 | 5 | project (Pizzafm) 6 | 7 | cmake_minimum_required(VERSION 2.8.6) 8 | 9 | set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}") 10 | include(../../check11features/CheckCXX11Features.cmake) 11 | 12 | # GCC specifics 13 | if(CMAKE_COMPILER_IS_GNUCXX) 14 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wall -std=c++0x") 15 | set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 -ggdb") 16 | endif() 17 | # Visual Studio specifics 18 | if(MSVC) 19 | # Warning Level 4 for Debug builds 20 | list(APPEND CMAKE_CXX_FLAGS_DEBUG " /W4") 21 | list(REMOVE_DUPLICATES CMAKE_CXX_FLAGS_DEBUG) 22 | endif() 23 | 24 | ADD_SUBDIRECTORY(driver) 25 | ADD_SUBDIRECTORY(lib) 26 | -------------------------------------------------------------------------------- /docs/_static/Silver/Observer/Content/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | #http://www-flc.desy.de/ldcoptimization/documents/talks/CMake_Tutorial.pdf 3 | #http://pageant.ghulbus.eu/?p=664 4 | 5 | project (Content) 6 | 7 | cmake_minimum_required(VERSION 2.8.6) 8 | 9 | set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}") 10 | include(../../check11features/CheckCXX11Features.cmake) 11 | 12 | # GCC specifics 13 | if(CMAKE_COMPILER_IS_GNUCXX) 14 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wall -std=c++0x") 15 | set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 -ggdb") 16 | endif() 17 | # Visual Studio specifics 18 | if(MSVC) 19 | # Warning Level 4 for Debug builds 20 | list(APPEND CMAKE_CXX_FLAGS_DEBUG " /W4") 21 | list(REMOVE_DUPLICATES CMAKE_CXX_FLAGS_DEBUG) 22 | endif() 23 | 24 | ADD_SUBDIRECTORY(driver) 25 | ADD_SUBDIRECTORY(lib) 26 | -------------------------------------------------------------------------------- /docs/_static/Silver/Strategy/Content/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | #http://www-flc.desy.de/ldcoptimization/documents/talks/CMake_Tutorial.pdf 3 | #http://pageant.ghulbus.eu/?p=664 4 | 5 | project (Content) 6 | 7 | cmake_minimum_required(VERSION 2.8.6) 8 | 9 | set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}") 10 | include(../../check11features/CheckCXX11Features.cmake) 11 | 12 | # GCC specifics 13 | if(CMAKE_COMPILER_IS_GNUCXX) 14 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wall -std=c++0x") 15 | set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 -ggdb") 16 | endif() 17 | # Visual Studio specifics 18 | if(MSVC) 19 | # Warning Level 4 for Debug builds 20 | list(APPEND CMAKE_CXX_FLAGS_DEBUG " /W4") 21 | list(REMOVE_DUPLICATES CMAKE_CXX_FLAGS_DEBUG) 22 | endif() 23 | 24 | ADD_SUBDIRECTORY(driver) 25 | ADD_SUBDIRECTORY(lib) 26 | -------------------------------------------------------------------------------- /docs/_static/Silver/Strategy/Content/include/FakeQuack.hpp: -------------------------------------------------------------------------------- 1 | //===--- FakeQuack.hpp - ----------------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | 14 | #ifndef _HFDP_CPP_STRATEGY_FAKE_QUACK_HPP_ 15 | #define _HFDP_CPP_STRATEGY_FAKE_QUACK_HPP_ 16 | 17 | #include "QuackBehavior.hpp" 18 | 19 | namespace HFDP { 20 | namespace Strategy { 21 | 22 | class FakeQuack : public QuackBehavior { 23 | 24 | public: 25 | void quack () const; 26 | }; 27 | 28 | } // namespace Strategy 29 | } // namespace HFDP 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /docs/_static/Silver/Strategy/Content/include/FlyBehavior.hpp: -------------------------------------------------------------------------------- 1 | //===--- FlyBehavior.hpp - --------------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | 14 | #ifndef _HFDP_CPP_STRATEGY_FLY_BEHAVIOR_HPP_ 15 | #define _HFDP_CPP_STRATEGY_FLY_BEHAVIOR_HPP_ 16 | 17 | 18 | namespace HFDP { 19 | namespace Strategy { 20 | 21 | class FlyBehavior { 22 | 23 | public: 24 | virtual ~FlyBehavior(); 25 | virtual void fly () const = 0; 26 | }; 27 | 28 | } // namespace Strategy 29 | } // namespace HFDP 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /docs/_static/Silver/Strategy/Content/include/MuteQuack.hpp: -------------------------------------------------------------------------------- 1 | //===--- MuteQuack.hpp - ----------------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | 14 | #ifndef _HFDP_CPP_STRATEGY_MUTE_QUACK_HPP_ 15 | #define _HFDP_CPP_STRATEGY_MUTE_QUACK_HPP_ 16 | 17 | #include "QuackBehavior.hpp" 18 | 19 | namespace HFDP { 20 | namespace Strategy { 21 | 22 | class MuteQuack : public QuackBehavior { 23 | 24 | public: 25 | void quack () const; 26 | }; 27 | 28 | } // namespace Strategy 29 | } // namespace HFDP 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /docs/_static/Silver/Template/Barista/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | #http://www-flc.desy.de/ldcoptimization/documents/talks/CMake_Tutorial.pdf 3 | #http://pageant.ghulbus.eu/?p=664 4 | 5 | project (Barista) 6 | 7 | cmake_minimum_required(VERSION 2.8.6) 8 | 9 | set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}") 10 | include(../../check11features/CheckCXX11Features.cmake) 11 | 12 | # GCC specifics 13 | if(CMAKE_COMPILER_IS_GNUCXX) 14 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wall -std=c++0x") 15 | set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 -ggdb") 16 | endif() 17 | # Visual Studio specifics 18 | if(MSVC) 19 | # Warning Level 4 for Debug builds 20 | list(APPEND CMAKE_CXX_FLAGS_DEBUG " /W4") 21 | list(REMOVE_DUPLICATES CMAKE_CXX_FLAGS_DEBUG) 22 | endif() 23 | 24 | ADD_SUBDIRECTORY(driver) 25 | ADD_SUBDIRECTORY(lib) 26 | -------------------------------------------------------------------------------- /docs/_static/Silver/Decorator/Content/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | #http://www-flc.desy.de/ldcoptimization/documents/talks/CMake_Tutorial.pdf 3 | #http://pageant.ghulbus.eu/?p=664 4 | 5 | project (Decorator) 6 | 7 | cmake_minimum_required(VERSION 2.8.6) 8 | 9 | set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}") 10 | include(../../check11features/CheckCXX11Features.cmake) 11 | 12 | # GCC specifics 13 | if(CMAKE_COMPILER_IS_GNUCXX) 14 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wall -std=c++0x") 15 | set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 -ggdb") 16 | endif() 17 | # Visual Studio specifics 18 | if(MSVC) 19 | # Warning Level 4 for Debug builds 20 | list(APPEND CMAKE_CXX_FLAGS_DEBUG " /W4") 21 | list(REMOVE_DUPLICATES CMAKE_CXX_FLAGS_DEBUG) 22 | endif() 23 | 24 | ADD_SUBDIRECTORY(driver) 25 | ADD_SUBDIRECTORY(lib) 26 | -------------------------------------------------------------------------------- /docs/_static/Silver/Singleton/Chocolate/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | #http://www-flc.desy.de/ldcoptimization/documents/talks/CMake_Tutorial.pdf 3 | #http://pageant.ghulbus.eu/?p=664 4 | 5 | project (Chocolate) 6 | 7 | cmake_minimum_required(VERSION 2.8.6) 8 | 9 | set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}") 10 | include(../../check11features/CheckCXX11Features.cmake) 11 | 12 | # GCC specifics 13 | if(CMAKE_COMPILER_IS_GNUCXX) 14 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wall -std=c++0x") 15 | set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 -ggdb") 16 | endif() 17 | # Visual Studio specifics 18 | if(MSVC) 19 | # Warning Level 4 for Debug builds 20 | list(APPEND CMAKE_CXX_FLAGS_DEBUG " /W4") 21 | list(REMOVE_DUPLICATES CMAKE_CXX_FLAGS_DEBUG) 22 | endif() 23 | 24 | ADD_SUBDIRECTORY(driver) 25 | ADD_SUBDIRECTORY(lib) 26 | -------------------------------------------------------------------------------- /docs/_static/Silver/Strategy/Content/include/FlyNoWay.hpp: -------------------------------------------------------------------------------- 1 | //===--- FlyNoWay.hpp - -----------------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | 14 | #ifndef _HFDP_CPP_STRATEGY_FLY_NO_WAY_WINGS_HPP_ 15 | #define _HFDP_CPP_STRATEGY_FLY_NO_WAY_WINGS_HPP_ 16 | 17 | #include "FlyBehavior.hpp" 18 | 19 | namespace HFDP { 20 | namespace Strategy { 21 | 22 | class FlyNoWay : public FlyBehavior { 23 | 24 | public: 25 | void fly () const; 26 | }; 27 | 28 | } // namespace Strategy 29 | } // namespace HFDP 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /docs/_static/Silver/Builder/README.rst: -------------------------------------------------------------------------------- 1 | 2 | *************** 3 | Builder Pattern 4 | *************** 5 | 6 | Planner 7 | ======= 8 | 9 | Class Diagram 10 | ------------- 11 | 12 | .. image:: Planner/Overview_of_Planner.jpg 13 | :scale: 50 % 14 | :alt: Class Diagram 15 | 16 | 17 | Sequence Diagram 18 | ---------------- 19 | 20 | .. image:: Planner/SequenceDiagram1.jpg 21 | :scale: 50 % 22 | :alt: Sequence Diagram 23 | 24 | +------------------------------------------------------------------------------+ 25 | |패턴 D. 빌더 | 26 | +==============================================================================+ 27 | +------------------------------------------------------------------------------+ 28 | 29 | 30 | .. image:: Builder.jpg 31 | :scale: 50 % 32 | :alt: Class Diagram 33 | 34 | 35 | -------------------------------------------------------------------------------- /docs/_static/Silver/Command/SimpleRemote/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | #http://www-flc.desy.de/ldcoptimization/documents/talks/CMake_Tutorial.pdf 3 | #http://pageant.ghulbus.eu/?p=664 4 | 5 | project (SimpleRemote) 6 | 7 | cmake_minimum_required(VERSION 2.8.6) 8 | 9 | set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}") 10 | include(../../check11features/CheckCXX11Features.cmake) 11 | 12 | # GCC specifics 13 | if(CMAKE_COMPILER_IS_GNUCXX) 14 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wall -std=c++0x") 15 | set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 -ggdb") 16 | endif() 17 | # Visual Studio specifics 18 | if(MSVC) 19 | # Warning Level 4 for Debug builds 20 | list(APPEND CMAKE_CXX_FLAGS_DEBUG " /W4") 21 | list(REMOVE_DUPLICATES CMAKE_CXX_FLAGS_DEBUG) 22 | endif() 23 | 24 | ADD_SUBDIRECTORY(driver) 25 | ADD_SUBDIRECTORY(lib) 26 | -------------------------------------------------------------------------------- /docs/_static/Silver/Factory/Pizzas/lib/ClamPizza.cpp: -------------------------------------------------------------------------------- 1 | //===--- ClamPizza.cpp - ----------------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | 14 | #include "ClamPizza.hpp" 15 | #include "Utilities.hpp" 16 | 17 | using namespace HeadFirstDesignPatterns::Factory::Simple; 18 | 19 | ClamPizza::ClamPizza() 20 | { 21 | PrintMessage("ClamPizza::ClamPizza"); 22 | _name = "Clam Pizza"; 23 | _dough = "Thin Crust"; 24 | _sauce = "White garlic Sauce"; 25 | _toppings.push_back( "Grated parmesan cheese" ); 26 | _toppings.push_back( "Clams" ); 27 | } 28 | -------------------------------------------------------------------------------- /docs/_static/Silver/Flyweight/FowlWeight/Fowl.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _HFDP_CPP_FLYWEIGHT_FOWLWEIGHT_FOWL_HPP_ 2 | #define _HFDP_CPP_FLYWEIGHT_FOWLWEIGHT_FOWL_HPP_ 3 | 4 | #include "FowlWeight.hpp" 5 | 6 | namespace HeadFirstDesignPatterns { 7 | namespace FlyWeight { 8 | namespace FowlWeight { 9 | 10 | // Flyweight 11 | 12 | class Fowl { 13 | 14 | protected: 15 | Fowl() 16 | {} 17 | public: 18 | enum type{mallard, redhead, rubber, model, turkey, last}; 19 | 20 | virtual ~Fowl() 21 | {} 22 | virtual void quack() const = 0; 23 | virtual void swim() const = 0; 24 | virtual std::string toString() const = 0; 25 | }; 26 | 27 | } // namespace FowlWeight 28 | } // namespace FlyWeight 29 | } // namespace HeadFirstDesignPatterns 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /docs/_static/Silver/Strategy/Content/include/DecoyDuck.hpp: -------------------------------------------------------------------------------- 1 | //===--- DecoyDuck.hpp - ----------------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | 14 | #ifndef _HFDP_CPP_STRATEGY_DECOY_DUCK_HPP_ 15 | #define _HFDP_CPP_STRATEGY_DECOY_DUCK_HPP_ 16 | 17 | #include "Duck.hpp" 18 | 19 | namespace HFDP { 20 | namespace Strategy { 21 | 22 | class DecoyDuck : public Duck { 23 | 24 | public: 25 | DecoyDuck(); 26 | void display() const; 27 | }; 28 | 29 | } // namespace Strategy 30 | } // namespace HFDP 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /docs/_static/Silver/Strategy/Content/include/FlyWithWings.hpp: -------------------------------------------------------------------------------- 1 | //===--- FlyWithWings.hpp - -------------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | 14 | #ifndef _HFDP_CPP_STRATEGY_FLY_WITH_WINGS_HPP_ 15 | #define _HFDP_CPP_STRATEGY_FLY_WITH_WINGS_HPP_ 16 | 17 | #include "FlyBehavior.hpp" 18 | 19 | namespace HFDP { 20 | namespace Strategy { 21 | 22 | class FlyWithWings : public FlyBehavior { 23 | 24 | public: 25 | void fly () const; 26 | }; 27 | 28 | } // namespace Strategy 29 | } // namespace HFDP 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /docs/_static/Silver/Strategy/Content/include/ModelDuck.hpp: -------------------------------------------------------------------------------- 1 | //===--- ModelDuck.hpp - ----------------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | 14 | #ifndef _HFDP_CPP_STRATEGY_MODEL_DUCK_HPP_ 15 | #define _HFDP_CPP_STRATEGY_MODEL_DUCK_HPP_ 16 | 17 | #include "Duck.hpp" 18 | 19 | namespace HFDP { 20 | namespace Strategy { 21 | 22 | class ModelDuck : public Duck { 23 | 24 | public: 25 | ModelDuck(); 26 | void display() const; 27 | }; 28 | 29 | } // namespace Strategy 30 | } // namespace HFDP 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /docs/_static/Silver/Strategy/Content/include/QuackBehavior.hpp: -------------------------------------------------------------------------------- 1 | //===--- QuackBehavior.hpp - ------------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | 14 | #ifndef _HFDP_CPP_STRATEGY_QUACK_BEHAVIOR_HPP_ 15 | #define _HFDP_CPP_STRATEGY_QUACK_BEHAVIOR_HPP_ 16 | 17 | 18 | namespace HFDP { 19 | namespace Strategy { 20 | 21 | class QuackBehavior { 22 | 23 | public: 24 | virtual ~QuackBehavior(); 25 | virtual void quack() const = 0; 26 | }; 27 | 28 | } // namespace Strategy 29 | } // namespace HFDP 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /docs/_static/Silver/Strategy/Content/include/RedHeadDuck.hpp: -------------------------------------------------------------------------------- 1 | //===--- RedHeadDuck.hpp - --------------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | 14 | #ifndef _HFDP_CPP_STRATEGY_REDHEAD_DUCK_HPP_ 15 | #define _HFDP_CPP_STRATEGY_REDHEAD_DUCK_HPP_ 16 | 17 | #include "Duck.hpp" 18 | 19 | namespace HFDP { 20 | namespace Strategy { 21 | 22 | class RedHead : public Duck { 23 | 24 | public: 25 | RedHead(); 26 | void display() const; 27 | }; 28 | 29 | } // namespace Strategy 30 | } // namespace HFDP 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /docs/_static/Silver/Template/Barista/lib/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | #http://www-flc.desy.de/ldcoptimization/documents/talks/CMake_Tutorial.pdf 3 | 4 | # CmakeLists.txt in lib dir 5 | INCLUDE_DIRECTORIES(${Barista_SOURCE_DIR}/include) 6 | 7 | # Adds a library called barista (libbarista.a under Linux) from the source files under lib/ 8 | ADD_LIBRARY( barista 9 | CaffeineBeverageWithHook CoffeeWithHook TeaWithHook 10 | CaffeineBeverage Coffee Tea Utilities ) 11 | 12 | foreach(flag ${CXX11_FEATURE_LIST}) 13 | set_property(TARGET barista 14 | APPEND PROPERTY COMPILE_DEFINITIONS ${flag} 15 | ) 16 | endforeach() 17 | 18 | #ADD_LIBRARY( duck Duck ) 19 | #ADD_LIBRARY( duckadapter DuckAdapter ) 20 | #ADD_LIBRARY( mallardduck MallardDuck ) 21 | #ADD_LIBRARY( turkey Turkey ) 22 | #ADD_LIBRARY( turkeyadapter TurkeyAdapter ) 23 | #ADD_LIBRARY( wildturkey WildTurkey ) 24 | 25 | -------------------------------------------------------------------------------- /docs/_static/Silver/Composite/Menus/lib/Waitress.cpp: -------------------------------------------------------------------------------- 1 | //===--- Waitress.cpp - -----------------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | 14 | #include "Waitress.hpp" 15 | #include "Utilities.hpp" 16 | #include 17 | 18 | using namespace HFDP::Composite::Menus; 19 | 20 | Waitress::Waitress( const MenuComponent* allMenus ) : 21 | _allMenus( allMenus ) 22 | { 23 | assert( allMenus ); 24 | PrintMessage("Waitress::Waitress"); 25 | } 26 | void Waitress::printMenu() const 27 | { 28 | PrintMessage("Waitress::printMenu"); 29 | _allMenus->print(); 30 | } 31 | 32 | 33 | -------------------------------------------------------------------------------- /docs/_static/Silver/Decorator/Content/include/Espresso.hpp: -------------------------------------------------------------------------------- 1 | //===--- Espresso.hpp - -----------------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | 14 | #ifndef _HFDP_CPP_DECORATOR_ESPRESSO_HPP_ 15 | #define _HFDP_CPP_DECORATOR_ESPRESSO_HPP_ 16 | 17 | #include "Beverage.hpp" 18 | 19 | namespace HFDP { 20 | namespace Decorator { 21 | 22 | class Espresso : public Beverage { 23 | 24 | public: 25 | Espresso(); 26 | double cost() const; 27 | }; 28 | 29 | } // namespace Observer 30 | } // namespace HFDP 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /docs/_static/Silver/Strategy/Content/include/RubberDuck.hpp: -------------------------------------------------------------------------------- 1 | //===--- RubberDuck.hpp - ---------------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | 14 | #ifndef _HFDP_CPP_STRATEGY_RUBBER_DUCK_HPP_ 15 | #define _HFDP_CPP_STRATEGY_RUBBER_DUCK_HPP_ 16 | 17 | #include "Duck.hpp" 18 | 19 | namespace HFDP { 20 | namespace Strategy { 21 | 22 | class RubberDuck : public Duck { 23 | 24 | public: 25 | RubberDuck(); 26 | void display() const; 27 | }; 28 | 29 | } // namespace Strategy 30 | } // namespace HFDP 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /docs/_static/Silver/Decorator/Content/include/DarkRoast.hpp: -------------------------------------------------------------------------------- 1 | //===--- DarkRoast.hpp - ----------------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | 14 | #ifndef _HFDP_CPP_DECORATOR_DARK_ROAST_HPP_ 15 | #define _HFDP_CPP_DECORATOR_DARK_ROAST_HPP_ 16 | 17 | #include "Beverage.hpp" 18 | 19 | namespace HFDP { 20 | namespace Decorator { 21 | 22 | class DarkRoast : public Beverage { 23 | 24 | public: 25 | DarkRoast(); 26 | double cost() const; 27 | }; 28 | 29 | } // namespace Observer 30 | } // namespace HFDP 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /docs/_static/Silver/State/GumballStateWinner/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | #http://www-flc.desy.de/ldcoptimization/documents/talks/CMake_Tutorial.pdf 3 | #http://pageant.ghulbus.eu/?p=664 4 | 5 | project (GumballStateWinner) 6 | 7 | cmake_minimum_required(VERSION 2.8.6) 8 | 9 | set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}") 10 | include(../../check11features/CheckCXX11Features.cmake) 11 | 12 | # GCC specifics 13 | if(CMAKE_COMPILER_IS_GNUCXX) 14 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wall -std=c++0x") 15 | set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 -ggdb") 16 | endif() 17 | # Visual Studio specifics 18 | if(MSVC) 19 | # Warning Level 4 for Debug builds 20 | list(APPEND CMAKE_CXX_FLAGS_DEBUG " /W4") 21 | list(REMOVE_DUPLICATES CMAKE_CXX_FLAGS_DEBUG) 22 | endif() 23 | 24 | ADD_SUBDIRECTORY(driver) 25 | ADD_SUBDIRECTORY(lib) 26 | -------------------------------------------------------------------------------- /docs/_static/Silver/Strategy/Content/include/MallardDuck.hpp: -------------------------------------------------------------------------------- 1 | //===--- MallardDuck.hpp - --------------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | 14 | #ifndef _HFDP_CPP_STRATEGY_MALLARD_DUCK_HPP_ 15 | #define _HFDP_CPP_STRATEGY_MALLARD_DUCK_HPP_ 16 | 17 | #include "Duck.hpp" 18 | 19 | namespace HFDP { 20 | namespace Strategy { 21 | 22 | class MallardDuck : public Duck { 23 | 24 | public: 25 | MallardDuck(); 26 | void display() const; 27 | }; 28 | 29 | } // namespace Strategy 30 | } // namespace HFDP 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /docs/_static/Silver/Command/Remote/lib/Utilities.cpp: -------------------------------------------------------------------------------- 1 | //===--- Utilities.cpp - ----------------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | 14 | #include 15 | #include 16 | 17 | void PrintMessage(const char * pMessage, bool newline = true) 18 | { 19 | assert(pMessage); 20 | if (newline) 21 | std::cout << pMessage << std::endl; 22 | else 23 | std::cout << pMessage; 24 | } 25 | 26 | void PrintMessage(unsigned int num, bool newline = true) 27 | { 28 | if (newline) 29 | std::cout << num << std::endl; 30 | else 31 | std::cout << num; 32 | } 33 | 34 | -------------------------------------------------------------------------------- /docs/_static/Silver/Command/Undo/lib/Utilities.cpp: -------------------------------------------------------------------------------- 1 | //===--- Utilities.cpp - ----------------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | 14 | #include 15 | #include 16 | 17 | void PrintMessage(const char * pMessage, bool newline = true) 18 | { 19 | assert(pMessage); 20 | if (newline) 21 | std::cout << pMessage << std::endl; 22 | else 23 | std::cout << pMessage; 24 | } 25 | 26 | void PrintMessage(unsigned int num, bool newline = true) 27 | { 28 | if (newline) 29 | std::cout << num << std::endl; 30 | else 31 | std::cout << num; 32 | } 33 | 34 | -------------------------------------------------------------------------------- /docs/_static/Silver/Composite/MenusCustomIterator/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | #http://www-flc.desy.de/ldcoptimization/documents/talks/CMake_Tutorial.pdf 3 | #http://pageant.ghulbus.eu/?p=664 4 | 5 | project (MenusCustomIterator) 6 | 7 | cmake_minimum_required(VERSION 2.8.6) 8 | 9 | set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}") 10 | include(../../check11features/CheckCXX11Features.cmake) 11 | 12 | # GCC specifics 13 | if(CMAKE_COMPILER_IS_GNUCXX) 14 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wall -std=c++0x") 15 | set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 -ggdb") 16 | endif() 17 | # Visual Studio specifics 18 | if(MSVC) 19 | # Warning Level 4 for Debug builds 20 | list(APPEND CMAKE_CXX_FLAGS_DEBUG " /W4") 21 | list(REMOVE_DUPLICATES CMAKE_CXX_FLAGS_DEBUG) 22 | endif() 23 | 24 | ADD_SUBDIRECTORY(driver) 25 | ADD_SUBDIRECTORY(lib) 26 | -------------------------------------------------------------------------------- /docs/_static/Silver/Composite/MenusCustomIterator/lib/Waitress.cpp: -------------------------------------------------------------------------------- 1 | //===--- Waitress.cpp - -----------------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | 14 | #include "Waitress.hpp" 15 | #include "Utilities.hpp" 16 | #include 17 | 18 | using namespace HFDP::Composite::Menus; 19 | 20 | Waitress::Waitress( const MenuComponent* allMenus ) : 21 | _allMenus( allMenus ) 22 | { 23 | assert( allMenus ); 24 | PrintMessage("Waitress::Waitress"); 25 | } 26 | 27 | void Waitress::printMenu() const 28 | { 29 | PrintMessage("Waitress::printMenu"); 30 | _allMenus->print(); 31 | } 32 | -------------------------------------------------------------------------------- /docs/_static/Silver/Decorator/Content/include/HouseBlend.hpp: -------------------------------------------------------------------------------- 1 | //===--- HouseBlend.hpp - ---------------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | 14 | #ifndef _HFDP_CPP_DECORATOR_HOUSE_BLEND_HPP_ 15 | #define _HFDP_CPP_DECORATOR_HOUSE_BLEND_HPP_ 16 | 17 | #include "Beverage.hpp" 18 | 19 | namespace HFDP { 20 | namespace Decorator { 21 | 22 | class HouseBlend : public Beverage { 23 | 24 | public: 25 | HouseBlend(); 26 | double cost() const; 27 | }; 28 | 29 | } // namespace Observer 30 | } // namespace HFDP 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /docs/_static/Silver/Factory/Pizzafm/lib/NYStyleCheesePizza.cpp: -------------------------------------------------------------------------------- 1 | //===--- NYStyleCheesePizza.cpp - -------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | #include "NYStyleCheesePizza.hpp" 14 | #include "Utilities.hpp" 15 | 16 | using namespace HFDP::Factory::Method; 17 | 18 | NYStyleCheesePizza::NYStyleCheesePizza() 19 | { 20 | PrintMessage("NYStyleCheesePizza::NYStyleCheesePizza"); 21 | _name = "NY Style Sauce and Cheese Pizza"; 22 | _dough = "Thin Crust Dough"; 23 | _sauce = "Marinara Sauce"; 24 | _toppings.push_back( "Grated Reggiano Cheese" ); 25 | } 26 | -------------------------------------------------------------------------------- /docs/_static/Silver/Factory/Pizzas/lib/Utilities.cpp: -------------------------------------------------------------------------------- 1 | //===--- Utilities.cpp - ----------------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | 14 | #include 15 | #include 16 | 17 | void PrintMessage(const char * pMessage, bool newline = true) 18 | { 19 | assert(pMessage); 20 | if (newline) 21 | std::cout << pMessage << std::endl; 22 | else 23 | std::cout << pMessage; 24 | } 25 | 26 | void PrintMessage(unsigned int num, bool newline = true) 27 | { 28 | if (newline) 29 | std::cout << num << std::endl; 30 | else 31 | std::cout << num; 32 | } 33 | 34 | -------------------------------------------------------------------------------- /docs/_static/Silver/Strategy/Content/include/FlyRocketPowered.hpp: -------------------------------------------------------------------------------- 1 | //===--- FlyRocketPowered.hpp - ---------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | 14 | #ifndef _HFDP_CPP_STRATEGY_FLY_ROCKET_POWERED_HPP_ 15 | #define _HFDP_CPP_STRATEGY_FLY_ROCKET_POWERED_HPP_ 16 | 17 | #include "FlyBehavior.hpp" 18 | 19 | namespace HFDP { 20 | namespace Strategy { 21 | 22 | class FlyRocketPowered : public FlyBehavior { 23 | 24 | public: 25 | void fly () const; 26 | }; 27 | 28 | } // namespace Strategy 29 | } // namespace HFDP 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /docs/_static/Silver/Visitor/Menus/lib/Utilities.cpp: -------------------------------------------------------------------------------- 1 | //===--- Utilities.cpp - ----------------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | 14 | #include 15 | #include 16 | 17 | void PrintMessage(const char * pMessage, bool newline = true) 18 | { 19 | assert(pMessage); 20 | if (newline) 21 | std::cout << pMessage << std::endl; 22 | else 23 | std::cout << pMessage; 24 | } 25 | 26 | void PrintMessage(unsigned int num, bool newline = true) 27 | { 28 | if (newline) 29 | std::cout << num << std::endl; 30 | else 31 | std::cout << num; 32 | } 33 | 34 | -------------------------------------------------------------------------------- /docs/_static/Silver/Composite/Menus/lib/Utilities.cpp: -------------------------------------------------------------------------------- 1 | //===--- Utilities.cpp - ----------------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | 14 | #include 15 | #include 16 | 17 | void PrintMessage(const char * pMessage, bool newline = true) 18 | { 19 | assert(pMessage); 20 | if (newline) 21 | std::cout << pMessage << std::endl; 22 | else 23 | std::cout << pMessage; 24 | } 25 | 26 | void PrintMessage(unsigned int num, bool newline = true) 27 | { 28 | if (newline) 29 | std::cout << num << std::endl; 30 | else 31 | std::cout << num; 32 | } 33 | 34 | -------------------------------------------------------------------------------- /docs/_static/Silver/Decorator/Content/lib/Utilities.cpp: -------------------------------------------------------------------------------- 1 | //===--- Utilities.cpp - ----------------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | 14 | #include 15 | #include 16 | 17 | void PrintMessage(const char * pMessage, bool newline = true) 18 | { 19 | assert(pMessage); 20 | if (newline) 21 | std::cout << pMessage << std::endl; 22 | else 23 | std::cout << pMessage; 24 | } 25 | 26 | void PrintMessage(unsigned int num, bool newline = true) 27 | { 28 | if (newline) 29 | std::cout << num << std::endl; 30 | else 31 | std::cout << num; 32 | } 33 | 34 | -------------------------------------------------------------------------------- /docs/_static/Silver/Factory/Pizzaaf/lib/Utilities.cpp: -------------------------------------------------------------------------------- 1 | //===--- Utilities.cpp - ----------------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | 14 | #include 15 | #include 16 | 17 | void PrintMessage(const char * pMessage, bool newline = true) 18 | { 19 | assert(pMessage); 20 | if (newline) 21 | std::cout << pMessage << std::endl; 22 | else 23 | std::cout << pMessage; 24 | } 25 | 26 | void PrintMessage(unsigned int num, bool newline = true) 27 | { 28 | if (newline) 29 | std::cout << num << std::endl; 30 | else 31 | std::cout << num; 32 | } 33 | 34 | -------------------------------------------------------------------------------- /docs/_static/Silver/Factory/Pizzafm/lib/Utilities.cpp: -------------------------------------------------------------------------------- 1 | //===--- Utilities.cpp - ----------------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | 14 | #include 15 | #include 16 | 17 | void PrintMessage(const char * pMessage, bool newline = true) 18 | { 19 | assert(pMessage); 20 | if (newline) 21 | std::cout << pMessage << std::endl; 22 | else 23 | std::cout << pMessage; 24 | } 25 | 26 | void PrintMessage(unsigned int num, bool newline = true) 27 | { 28 | if (newline) 29 | std::cout << num << std::endl; 30 | else 31 | std::cout << num; 32 | } 33 | 34 | -------------------------------------------------------------------------------- /docs/_static/Silver/Observer/Content/include/DisplayElement.hpp: -------------------------------------------------------------------------------- 1 | //===--- DisplayElement.hpp - -----------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | 14 | #ifndef _HFDP_CPP_OBSERVER_DISPLAY_ELEMENT_HPP_ 15 | #define _HFDP_CPP_OBSERVER_DISPLAY_ELEMENT_HPP_ 16 | 17 | 18 | namespace HFDP { 19 | namespace Observer { 20 | 21 | class DisplayElement { 22 | public: 23 | virtual void display() const = 0; 24 | protected: 25 | virtual ~DisplayElement(); 26 | }; 27 | 28 | } // namespace Observer 29 | } // namespace HFDP 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /docs/_static/Silver/Observer/Content/lib/Utilities.cpp: -------------------------------------------------------------------------------- 1 | //===--- Utilities.cpp - ----------------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | 14 | #include 15 | #include 16 | 17 | void PrintMessage(const char * pMessage, bool newline = true) 18 | { 19 | assert(pMessage); 20 | if (newline) 21 | std::cout << pMessage << std::endl; 22 | else 23 | std::cout << pMessage; 24 | } 25 | 26 | void PrintMessage(unsigned int num, bool newline = true) 27 | { 28 | if (newline) 29 | std::cout << num << std::endl; 30 | else 31 | std::cout << num; 32 | } 33 | 34 | -------------------------------------------------------------------------------- /docs/_static/Silver/Strategy/Content/lib/Utilities.cpp: -------------------------------------------------------------------------------- 1 | //===--- Utilities.cpp - ----------------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | 14 | #include 15 | #include 16 | 17 | void PrintMessage(const char * pMessage, bool newline = true) 18 | { 19 | assert(pMessage); 20 | if (newline) 21 | std::cout << pMessage << std::endl; 22 | else 23 | std::cout << pMessage; 24 | } 25 | 26 | void PrintMessage(unsigned int num, bool newline = true) 27 | { 28 | if (newline) 29 | std::cout << num << std::endl; 30 | else 31 | std::cout << num; 32 | } 33 | 34 | -------------------------------------------------------------------------------- /docs/_static/Silver/Template/Barista/lib/Utilities.cpp: -------------------------------------------------------------------------------- 1 | //===--- Utilities.cpp - ----------------------------------------*- C++ -*-===// 2 | // 3 | // Head First Design Patterns 4 | // 5 | // 6 | //===----------------------------------------------------------------------===// 7 | /// 8 | /// \file 9 | /// \brief 10 | /// 11 | //===----------------------------------------------------------------------===// 12 | 13 | 14 | #include 15 | #include 16 | 17 | void PrintMessage(const char * pMessage, bool newline = true) 18 | { 19 | assert(pMessage); 20 | if (newline) 21 | std::cout << pMessage << std::endl; 22 | else 23 | std::cout << pMessage; 24 | } 25 | 26 | void PrintMessage(unsigned int num, bool newline = true) 27 | { 28 | if (newline) 29 | std::cout << num << std::endl; 30 | else 31 | std::cout << num; 32 | } 33 | 34 | -------------------------------------------------------------------------------- /docs/_static/Silver/ChainOfResponsibility/GumballEMailHandler/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | #http://www-flc.desy.de/ldcoptimization/documents/talks/CMake_Tutorial.pdf 3 | #http://pageant.ghulbus.eu/?p=664 4 | 5 | project (GumballEMailHandler) 6 | 7 | cmake_minimum_required(VERSION 2.8.6) 8 | 9 | set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}") 10 | include(../../check11features/CheckCXX11Features.cmake) 11 | 12 | # GCC specifics 13 | if(CMAKE_COMPILER_IS_GNUCXX) 14 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wall -std=c++0x") 15 | set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 -ggdb") 16 | endif() 17 | # Visual Studio specifics 18 | if(MSVC) 19 | # Warning Level 4 for Debug builds 20 | list(APPEND CMAKE_CXX_FLAGS_DEBUG " /W4") 21 | list(REMOVE_DUPLICATES CMAKE_CXX_FLAGS_DEBUG) 22 | endif() 23 | 24 | ADD_SUBDIRECTORY(driver) 25 | ADD_SUBDIRECTORY(lib) 26 | --------------------------------------------------------------------------------