# t00042 - Specialization class template diagram filter test
## Config
```yaml
compilation_database_dir: ..
output_directory: puml
diagrams:
  t00042_class:
    type: class
    generate_packages: false
    glob:
      - ../../tests/t00042/t00042.cc
    using_namespace:
      - clanguml::t00042
    include:
      specializations:
        - clanguml::t00042::A<T>
        - clanguml::t00042::B<T,K>
      relationships:
        - instantiation
    exclude:
      specializations:
        - clanguml::t00042::C<T>
      namespaces:
        - std
```
## Source code
File t00042.cc
```cpp
#include <string>

namespace clanguml::t00042 {

template <typename T> struct A {
    T a;
};

template <> struct A<void> {
    void *a;
};

template <typename T, typename K> struct B {
    T b;
    K bb;
};

template <typename T> struct C {
    T c;
};

struct R {
    A<double> a_double;
    A<std::string> a_string;

    B<int, float> b_int_float;

    C<int> c_int;
};

} // namespace clanguml::t00042

```
## Generated UML diagrams
![t00042_class](./t00042_class.svg "Specialization class template diagram filter test")
## Generated JSON models
```json
{
  "diagram_type": "class",
  "elements": [
    {
      "bases": [],
      "display_name": "clanguml::t00042::A<T>",
      "id": "462160951579835462",
      "is_abstract": false,
      "is_nested": false,
      "is_struct": true,
      "is_template": true,
      "is_union": false,
      "members": [
        {
          "access": "public",
          "is_static": false,
          "name": "a",
          "source_location": {
            "file": "../../tests/t00042/t00042.cc",
            "line": 6
          },
          "type": "T"
        }
      ],
      "methods": [],
      "name": "A",
      "namespace": "clanguml::t00042",
      "source_location": {
        "file": "../../tests/t00042/t00042.cc",
        "line": 5
      },
      "template_parameters": [
        {
          "is_variadic": false,
          "kind": "template_type",
          "name": "T",
          "template_parameters": []
        }
      ],
      "type": "class"
    },
    {
      "bases": [],
      "display_name": "clanguml::t00042::A<void>",
      "id": "1422802342059669545",
      "is_abstract": false,
      "is_nested": false,
      "is_struct": true,
      "is_template": true,
      "is_union": false,
      "members": [
        {
          "access": "public",
          "is_static": false,
          "name": "a",
          "source_location": {
            "file": "../../tests/t00042/t00042.cc",
            "line": 10
          },
          "type": "void *"
        }
      ],
      "methods": [],
      "name": "A",
      "namespace": "clanguml::t00042",
      "source_location": {
        "file": "../../tests/t00042/t00042.cc",
        "line": 9
      },
      "template_parameters": [
        {
          "is_variadic": false,
          "kind": "argument",
          "template_parameters": [],
          "type": "void"
        }
      ],
      "type": "class"
    },
    {
      "bases": [],
      "display_name": "clanguml::t00042::B<T,K>",
      "id": "1414456934388678010",
      "is_abstract": false,
      "is_nested": false,
      "is_struct": true,
      "is_template": true,
      "is_union": false,
      "members": [
        {
          "access": "public",
          "is_static": false,
          "name": "b",
          "source_location": {
            "file": "../../tests/t00042/t00042.cc",
            "line": 14
          },
          "type": "T"
        },
        {
          "access": "public",
          "is_static": false,
          "name": "bb",
          "source_location": {
            "file": "../../tests/t00042/t00042.cc",
            "line": 15
          },
          "type": "K"
        }
      ],
      "methods": [],
      "name": "B",
      "namespace": "clanguml::t00042",
      "source_location": {
        "file": "../../tests/t00042/t00042.cc",
        "line": 13
      },
      "template_parameters": [
        {
          "is_variadic": false,
          "kind": "template_type",
          "name": "T",
          "template_parameters": []
        },
        {
          "is_variadic": false,
          "kind": "template_type",
          "name": "K",
          "template_parameters": []
        }
      ],
      "type": "class"
    },
    {
      "bases": [],
      "display_name": "clanguml::t00042::A<double>",
      "id": "364538479078826988",
      "is_abstract": false,
      "is_nested": false,
      "is_struct": false,
      "is_template": true,
      "is_union": false,
      "members": [],
      "methods": [],
      "name": "A",
      "namespace": "clanguml::t00042",
      "source_location": {
        "file": "../../tests/t00042/t00042.cc",
        "line": 5
      },
      "template_parameters": [
        {
          "is_variadic": false,
          "kind": "argument",
          "template_parameters": [],
          "type": "double"
        }
      ],
      "type": "class"
    },
    {
      "bases": [],
      "display_name": "clanguml::t00042::A<std::string>",
      "id": "496773262538580186",
      "is_abstract": false,
      "is_nested": false,
      "is_struct": false,
      "is_template": true,
      "is_union": false,
      "members": [],
      "methods": [],
      "name": "A",
      "namespace": "clanguml::t00042",
      "source_location": {
        "file": "../../tests/t00042/t00042.cc",
        "line": 5
      },
      "template_parameters": [
        {
          "is_variadic": false,
          "kind": "argument",
          "template_parameters": [],
          "type": "std::string"
        }
      ],
      "type": "class"
    },
    {
      "bases": [],
      "display_name": "clanguml::t00042::B<int,float>",
      "id": "1833471931530161359",
      "is_abstract": false,
      "is_nested": false,
      "is_struct": false,
      "is_template": true,
      "is_union": false,
      "members": [],
      "methods": [],
      "name": "B",
      "namespace": "clanguml::t00042",
      "source_location": {
        "file": "../../tests/t00042/t00042.cc",
        "line": 13
      },
      "template_parameters": [
        {
          "is_variadic": false,
          "kind": "argument",
          "template_parameters": [],
          "type": "int"
        },
        {
          "is_variadic": false,
          "kind": "argument",
          "template_parameters": [],
          "type": "float"
        }
      ],
      "type": "class"
    }
  ],
  "metadata": {
    "clang_uml_version": "0.3.5-27-g81c7ce7",
    "llvm_version": "Ubuntu clang version 15.0.6",
    "schema_version": 1
  },
  "name": "t00042_class",
  "relationships": [
    {
      "access": "public",
      "destination": "462160951579835462",
      "source": "1422802342059669545",
      "type": "instantiation"
    },
    {
      "access": "public",
      "destination": "462160951579835462",
      "source": "364538479078826988",
      "type": "instantiation"
    },
    {
      "access": "public",
      "destination": "462160951579835462",
      "source": "496773262538580186",
      "type": "instantiation"
    },
    {
      "access": "public",
      "destination": "1414456934388678010",
      "source": "1833471931530161359",
      "type": "instantiation"
    }
  ],
  "using_namespace": "clanguml::t00042"
}
```
