# t00006 - Class field relationships inferred from templates
## Config
```yaml
compilation_database_dir: ..
output_directory: puml
diagrams:
  t00006_class:
    type: class
    glob:
      - ../../tests/t00006/t00006.cc
    using_namespace:
      - clanguml::t00006
    include:
      namespaces:
        - clanguml::t00006

```
## Source code
File t00006.cc
```cpp
#include <array>
#include <map>
#include <vector>

namespace clanguml {
namespace t00006 {
class A { };

class B { };

class C { };

class D { };

class E { };

class F { };

class G { };

class H { };

class I { };

class J { };

class K { };

class L { };

class M { };

class N { };

class NN { };

class NNN { };

template <typename T> class custom_container {
public:
    std::vector<T> data;
};

class R {
public:
    std::vector<A> a;
    std::vector<B *> b;

    std::map<int, C> c;
    std::map<int, D *> d;

    custom_container<E> e;

    std::vector<std::vector<F>> f;
    std::map<int, std::vector<G *>> g;

    std::array<H, 10> h;
    std::array<I *, 5> i;

    J j[10];
    K *k[20];

    std::vector<std::pair<L, M>> lm;

    std::tuple<N, NN, NNN> ns;
};
} // namespace t00006
} // namespace clanguml

```
## Generated UML diagrams
![t00006_class](./t00006_class.svg "Class field relationships inferred from templates")
## Generated JSON models
```json
{
  "diagram_type": "class",
  "elements": [
    {
      "bases": [],
      "display_name": "clanguml::t00006::A",
      "id": "989095304444672400",
      "is_abstract": false,
      "is_nested": false,
      "is_struct": false,
      "is_template": false,
      "is_union": false,
      "members": [],
      "methods": [],
      "name": "A",
      "namespace": "clanguml::t00006",
      "source_location": {
        "file": "../../tests/t00006/t00006.cc",
        "line": 7
      },
      "template_parameters": [],
      "type": "class"
    },
    {
      "bases": [],
      "display_name": "clanguml::t00006::B",
      "id": "648285260245005311",
      "is_abstract": false,
      "is_nested": false,
      "is_struct": false,
      "is_template": false,
      "is_union": false,
      "members": [],
      "methods": [],
      "name": "B",
      "namespace": "clanguml::t00006",
      "source_location": {
        "file": "../../tests/t00006/t00006.cc",
        "line": 9
      },
      "template_parameters": [],
      "type": "class"
    },
    {
      "bases": [],
      "display_name": "clanguml::t00006::C",
      "id": "323304333007297774",
      "is_abstract": false,
      "is_nested": false,
      "is_struct": false,
      "is_template": false,
      "is_union": false,
      "members": [],
      "methods": [],
      "name": "C",
      "namespace": "clanguml::t00006",
      "source_location": {
        "file": "../../tests/t00006/t00006.cc",
        "line": 11
      },
      "template_parameters": [],
      "type": "class"
    },
    {
      "bases": [],
      "display_name": "clanguml::t00006::D",
      "id": "1006912399043633492",
      "is_abstract": false,
      "is_nested": false,
      "is_struct": false,
      "is_template": false,
      "is_union": false,
      "members": [],
      "methods": [],
      "name": "D",
      "namespace": "clanguml::t00006",
      "source_location": {
        "file": "../../tests/t00006/t00006.cc",
        "line": 13
      },
      "template_parameters": [],
      "type": "class"
    },
    {
      "bases": [],
      "display_name": "clanguml::t00006::E",
      "id": "1092550394020578978",
      "is_abstract": false,
      "is_nested": false,
      "is_struct": false,
      "is_template": false,
      "is_union": false,
      "members": [],
      "methods": [],
      "name": "E",
      "namespace": "clanguml::t00006",
      "source_location": {
        "file": "../../tests/t00006/t00006.cc",
        "line": 15
      },
      "template_parameters": [],
      "type": "class"
    },
    {
      "bases": [],
      "display_name": "clanguml::t00006::F",
      "id": "965398761810782236",
      "is_abstract": false,
      "is_nested": false,
      "is_struct": false,
      "is_template": false,
      "is_union": false,
      "members": [],
      "methods": [],
      "name": "F",
      "namespace": "clanguml::t00006",
      "source_location": {
        "file": "../../tests/t00006/t00006.cc",
        "line": 17
      },
      "template_parameters": [],
      "type": "class"
    },
    {
      "bases": [],
      "display_name": "clanguml::t00006::G",
      "id": "1764732000887030464",
      "is_abstract": false,
      "is_nested": false,
      "is_struct": false,
      "is_template": false,
      "is_union": false,
      "members": [],
      "methods": [],
      "name": "G",
      "namespace": "clanguml::t00006",
      "source_location": {
        "file": "../../tests/t00006/t00006.cc",
        "line": 19
      },
      "template_parameters": [],
      "type": "class"
    },
    {
      "bases": [],
      "display_name": "clanguml::t00006::H",
      "id": "1669285599837552146",
      "is_abstract": false,
      "is_nested": false,
      "is_struct": false,
      "is_template": false,
      "is_union": false,
      "members": [],
      "methods": [],
      "name": "H",
      "namespace": "clanguml::t00006",
      "source_location": {
        "file": "../../tests/t00006/t00006.cc",
        "line": 21
      },
      "template_parameters": [],
      "type": "class"
    },
    {
      "bases": [],
      "display_name": "clanguml::t00006::I",
      "id": "2234750598599000377",
      "is_abstract": false,
      "is_nested": false,
      "is_struct": false,
      "is_template": false,
      "is_union": false,
      "members": [],
      "methods": [],
      "name": "I",
      "namespace": "clanguml::t00006",
      "source_location": {
        "file": "../../tests/t00006/t00006.cc",
        "line": 23
      },
      "template_parameters": [],
      "type": "class"
    },
    {
      "bases": [],
      "display_name": "clanguml::t00006::J",
      "id": "1335933649375465369",
      "is_abstract": false,
      "is_nested": false,
      "is_struct": false,
      "is_template": false,
      "is_union": false,
      "members": [],
      "methods": [],
      "name": "J",
      "namespace": "clanguml::t00006",
      "source_location": {
        "file": "../../tests/t00006/t00006.cc",
        "line": 25
      },
      "template_parameters": [],
      "type": "class"
    },
    {
      "bases": [],
      "display_name": "clanguml::t00006::K",
      "id": "1603190364864080123",
      "is_abstract": false,
      "is_nested": false,
      "is_struct": false,
      "is_template": false,
      "is_union": false,
      "members": [],
      "methods": [],
      "name": "K",
      "namespace": "clanguml::t00006",
      "source_location": {
        "file": "../../tests/t00006/t00006.cc",
        "line": 27
      },
      "template_parameters": [],
      "type": "class"
    },
    {
      "bases": [],
      "display_name": "clanguml::t00006::L",
      "id": "305487238408320046",
      "is_abstract": false,
      "is_nested": false,
      "is_struct": false,
      "is_template": false,
      "is_union": false,
      "members": [],
      "methods": [],
      "name": "L",
      "namespace": "clanguml::t00006",
      "source_location": {
        "file": "../../tests/t00006/t00006.cc",
        "line": 29
      },
      "template_parameters": [],
      "type": "class"
    },
    {
      "bases": [],
      "display_name": "clanguml::t00006::M",
      "id": "1664744512423723275",
      "is_abstract": false,
      "is_nested": false,
      "is_struct": false,
      "is_template": false,
      "is_union": false,
      "members": [],
      "methods": [],
      "name": "M",
      "namespace": "clanguml::t00006",
      "source_location": {
        "file": "../../tests/t00006/t00006.cc",
        "line": 31
      },
      "template_parameters": [],
      "type": "class"
    },
    {
      "bases": [],
      "display_name": "clanguml::t00006::N",
      "id": "950210019792152600",
      "is_abstract": false,
      "is_nested": false,
      "is_struct": false,
      "is_template": false,
      "is_union": false,
      "members": [],
      "methods": [],
      "name": "N",
      "namespace": "clanguml::t00006",
      "source_location": {
        "file": "../../tests/t00006/t00006.cc",
        "line": 33
      },
      "template_parameters": [],
      "type": "class"
    },
    {
      "bases": [],
      "display_name": "clanguml::t00006::NN",
      "id": "1662349735899726224",
      "is_abstract": false,
      "is_nested": false,
      "is_struct": false,
      "is_template": false,
      "is_union": false,
      "members": [],
      "methods": [],
      "name": "NN",
      "namespace": "clanguml::t00006",
      "source_location": {
        "file": "../../tests/t00006/t00006.cc",
        "line": 35
      },
      "template_parameters": [],
      "type": "class"
    },
    {
      "bases": [],
      "display_name": "clanguml::t00006::NNN",
      "id": "1963145075481599858",
      "is_abstract": false,
      "is_nested": false,
      "is_struct": false,
      "is_template": false,
      "is_union": false,
      "members": [],
      "methods": [],
      "name": "NNN",
      "namespace": "clanguml::t00006",
      "source_location": {
        "file": "../../tests/t00006/t00006.cc",
        "line": 37
      },
      "template_parameters": [],
      "type": "class"
    },
    {
      "bases": [],
      "display_name": "clanguml::t00006::custom_container<T>",
      "id": "916380191954937631",
      "is_abstract": false,
      "is_nested": false,
      "is_struct": false,
      "is_template": true,
      "is_union": false,
      "members": [
        {
          "access": "public",
          "is_static": false,
          "name": "data",
          "source_location": {
            "file": "../../tests/t00006/t00006.cc",
            "line": 41
          },
          "type": "std::vector<T>"
        }
      ],
      "methods": [],
      "name": "custom_container",
      "namespace": "clanguml::t00006",
      "source_location": {
        "file": "../../tests/t00006/t00006.cc",
        "line": 39
      },
      "template_parameters": [
        {
          "is_variadic": false,
          "kind": "template_type",
          "name": "T",
          "template_parameters": []
        }
      ],
      "type": "class"
    },
    {
      "bases": [],
      "display_name": "clanguml::t00006::custom_container<clanguml::t00006::E>",
      "id": "50153113082434858",
      "is_abstract": false,
      "is_nested": false,
      "is_struct": false,
      "is_template": true,
      "is_union": false,
      "members": [],
      "methods": [],
      "name": "custom_container",
      "namespace": "clanguml::t00006",
      "source_location": {
        "file": "../../tests/t00006/t00006.cc",
        "line": 39
      },
      "template_parameters": [
        {
          "is_variadic": false,
          "kind": "argument",
          "template_parameters": [],
          "type": "clanguml::t00006::E"
        }
      ],
      "type": "class"
    },
    {
      "bases": [],
      "display_name": "clanguml::t00006::R",
      "id": "303025561016882526",
      "is_abstract": false,
      "is_nested": false,
      "is_struct": false,
      "is_template": false,
      "is_union": false,
      "members": [
        {
          "access": "public",
          "is_static": false,
          "name": "a",
          "source_location": {
            "file": "../../tests/t00006/t00006.cc",
            "line": 46
          },
          "type": "std::vector<A>"
        },
        {
          "access": "public",
          "is_static": false,
          "name": "b",
          "source_location": {
            "file": "../../tests/t00006/t00006.cc",
            "line": 47
          },
          "type": "std::vector<B *>"
        },
        {
          "access": "public",
          "is_static": false,
          "name": "c",
          "source_location": {
            "file": "../../tests/t00006/t00006.cc",
            "line": 49
          },
          "type": "std::map<int,C>"
        },
        {
          "access": "public",
          "is_static": false,
          "name": "d",
          "source_location": {
            "file": "../../tests/t00006/t00006.cc",
            "line": 50
          },
          "type": "std::map<int,D *>"
        },
        {
          "access": "public",
          "is_static": false,
          "name": "e",
          "source_location": {
            "file": "../../tests/t00006/t00006.cc",
            "line": 52
          },
          "type": "custom_container<clanguml::t00006::E>"
        },
        {
          "access": "public",
          "is_static": false,
          "name": "f",
          "source_location": {
            "file": "../../tests/t00006/t00006.cc",
            "line": 54
          },
          "type": "std::vector<std::vector<F>>"
        },
        {
          "access": "public",
          "is_static": false,
          "name": "g",
          "source_location": {
            "file": "../../tests/t00006/t00006.cc",
            "line": 55
          },
          "type": "std::map<int,std::vector<G *>>"
        },
        {
          "access": "public",
          "is_static": false,
          "name": "h",
          "source_location": {
            "file": "../../tests/t00006/t00006.cc",
            "line": 57
          },
          "type": "std::array<H,10>"
        },
        {
          "access": "public",
          "is_static": false,
          "name": "i",
          "source_location": {
            "file": "../../tests/t00006/t00006.cc",
            "line": 58
          },
          "type": "std::array<I *,5>"
        },
        {
          "access": "public",
          "is_static": false,
          "name": "j",
          "source_location": {
            "file": "../../tests/t00006/t00006.cc",
            "line": 60
          },
          "type": "clanguml::t00006::J[10]"
        },
        {
          "access": "public",
          "is_static": false,
          "name": "k",
          "source_location": {
            "file": "../../tests/t00006/t00006.cc",
            "line": 61
          },
          "type": "clanguml::t00006::K *[20]"
        },
        {
          "access": "public",
          "is_static": false,
          "name": "lm",
          "source_location": {
            "file": "../../tests/t00006/t00006.cc",
            "line": 63
          },
          "type": "std::vector<std::pair<L,M>>"
        },
        {
          "access": "public",
          "is_static": false,
          "name": "ns",
          "source_location": {
            "file": "../../tests/t00006/t00006.cc",
            "line": 65
          },
          "type": "std::tuple<N,NN,NNN>"
        }
      ],
      "methods": [],
      "name": "R",
      "namespace": "clanguml::t00006",
      "source_location": {
        "file": "../../tests/t00006/t00006.cc",
        "line": 44
      },
      "template_parameters": [],
      "type": "class"
    }
  ],
  "metadata": {
    "clang_uml_version": "0.3.5-27-g81c7ce7",
    "llvm_version": "Ubuntu clang version 15.0.6",
    "schema_version": 1
  },
  "name": "t00006_class",
  "relationships": [
    {
      "access": "public",
      "destination": "1092550394020578978",
      "source": "50153113082434858",
      "type": "dependency"
    },
    {
      "access": "public",
      "destination": "916380191954937631",
      "source": "50153113082434858",
      "type": "instantiation"
    },
    {
      "access": "public",
      "destination": "989095304444672400",
      "label": "a",
      "source": "303025561016882526",
      "type": "aggregation"
    },
    {
      "access": "public",
      "destination": "648285260245005311",
      "label": "b",
      "source": "303025561016882526",
      "type": "association"
    },
    {
      "access": "public",
      "destination": "323304333007297774",
      "label": "c",
      "source": "303025561016882526",
      "type": "aggregation"
    },
    {
      "access": "public",
      "destination": "1006912399043633492",
      "label": "d",
      "source": "303025561016882526",
      "type": "association"
    },
    {
      "access": "public",
      "destination": "50153113082434858",
      "label": "e",
      "source": "303025561016882526",
      "type": "aggregation"
    },
    {
      "access": "public",
      "destination": "965398761810782236",
      "label": "f",
      "source": "303025561016882526",
      "type": "aggregation"
    },
    {
      "access": "public",
      "destination": "1764732000887030464",
      "label": "g",
      "source": "303025561016882526",
      "type": "association"
    },
    {
      "access": "public",
      "destination": "1669285599837552146",
      "label": "h",
      "source": "303025561016882526",
      "type": "aggregation"
    },
    {
      "access": "public",
      "destination": "2234750598599000377",
      "label": "i",
      "source": "303025561016882526",
      "type": "association"
    },
    {
      "access": "public",
      "destination": "1335933649375465369",
      "label": "j",
      "source": "303025561016882526",
      "type": "aggregation"
    },
    {
      "access": "public",
      "destination": "1603190364864080123",
      "label": "k",
      "source": "303025561016882526",
      "type": "association"
    },
    {
      "access": "public",
      "destination": "305487238408320046",
      "label": "lm",
      "source": "303025561016882526",
      "type": "aggregation"
    },
    {
      "access": "public",
      "destination": "1664744512423723275",
      "label": "lm",
      "source": "303025561016882526",
      "type": "aggregation"
    },
    {
      "access": "public",
      "destination": "950210019792152600",
      "label": "ns",
      "source": "303025561016882526",
      "type": "aggregation"
    },
    {
      "access": "public",
      "destination": "1662349735899726224",
      "label": "ns",
      "source": "303025561016882526",
      "type": "aggregation"
    },
    {
      "access": "public",
      "destination": "1963145075481599858",
      "label": "ns",
      "source": "303025561016882526",
      "type": "aggregation"
    }
  ],
  "using_namespace": "clanguml::t00006"
}
```
