From ff25edeabbedee5cd4ec0e171d3f57b5f6d6e41f Mon Sep 17 00:00:00 2001 From: Jakub Vojvoda Date: Tue, 13 Sep 2016 22:43:57 +0200 Subject: [PATCH] init Adapter --- adapter/Adapter.cpp | 17 +++++++++++++++++ adapter/README.md | 11 +++++++++++ 2 files changed, 28 insertions(+) create mode 100644 adapter/Adapter.cpp create mode 100644 adapter/README.md diff --git a/adapter/Adapter.cpp b/adapter/Adapter.cpp new file mode 100644 index 0000000..1874a53 --- /dev/null +++ b/adapter/Adapter.cpp @@ -0,0 +1,17 @@ +/* + * C++ Design Patterns: Adapter + * Author: Jakub Vojvoda [github.com/JakubVojvoda] + * 2016 + * + * Source code is licensed under MIT licence + * (for more details see LICENCE) + * + */ + +#include + +int main() +{ + + return 0; +} \ No newline at end of file diff --git a/adapter/README.md b/adapter/README.md new file mode 100644 index 0000000..339e0f0 --- /dev/null +++ b/adapter/README.md @@ -0,0 +1,11 @@ +## Adapter + +Convert the interface of a class into another interface clients expect. +Adapter lets classes work together that couldn't otherwise because of +incompatible interfaces. + +### When to use + +* you want to use an existing class, and its interface does not match the one you need +* you want to create a reusable class that cooperates with classes that don't necessarily have compatible interfaces +