# t00022 - Template method pattern
## Config
```yaml
compilation_database_dir: ..
output_directory: puml
diagrams:
  t00022_class:
    type: class
    glob:
      - ../../tests/t00022/t00022.cc
    using_namespace:
      - clanguml::t00022
    include:
      namespaces:
        - clanguml::t00022

```
## Source code
File t00022.cc
```cpp
#include <memory>

namespace clanguml {
namespace t00022 {

class A {
public:
    void template_method()
    {
        method1();
        method2();
    }

protected:
    virtual void method1() = 0;
    virtual void method2() = 0;
};

class A1 : public A {
protected:
    void method1() override { }
    void method2() override { }
};

class A2 : public A {
protected:
    void method1() override { }
    void method2() override { }
};
}
}

```
## Generated UML diagrams
![t00022_class](./t00022_class.svg "Template method pattern")
