# t00049 - Test case configurable type aliases
## Config
```yaml
compilation_database_dir: ..
output_directory: puml
diagrams:
  t00049_class:
    type: class
    using_namespace: clanguml::t00049
    type_aliases:
      "std::basic_string<char>": thestring
      "std::string": thestring
      "std::vector<std::string>": string_vector
      "std::vector<thestring>": string_vector
      "std::map<int,int>": intmap
    glob:
      - ../../tests/t00049/t00049.cc
    include:
      namespaces:
        - clanguml::t00049
```
## Source code
File t00049.cc
```cpp
#include <map>
#include <string>
#include <vector>

namespace clanguml {
namespace t00049 {
template <typename T> struct A {
    T a;

    T &get_a() { return a; }
};

struct R {
    A<std::basic_string<char>> a_string;
    A<std::vector<std::string>> a_vector_string;
    A<std::map<int, int>> a_int_map;

    A<std::map<int, int>> get_int_map() { return a_int_map; }

    void set_int_map(A<std::map<int, int>> &&int_map) { a_int_map = int_map; }
};
} // namespace t00049
} // namespace clanguml
```
## Generated UML diagrams
![t00049_class](./t00049_class.svg "Test case configurable type aliases")
## Generated JSON models
```json
{
  "diagram_type": "class",
  "elements": [
    {
      "bases": [],
      "display_name": "clanguml::t00049::A<T>",
      "id": "372971769516871577",
      "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/t00049/t00049.cc",
            "line": 8
          },
          "type": "T"
        }
      ],
      "methods": [
        {
          "access": "public",
          "is_const": false,
          "is_defaulted": false,
          "is_implicit": false,
          "is_pure_virtual": false,
          "is_static": false,
          "is_virtual": false,
          "name": "get_a",
          "parameters": [],
          "type": "T &"
        }
      ],
      "name": "A",
      "namespace": "clanguml::t00049",
      "source_location": {
        "file": "../../tests/t00049/t00049.cc",
        "line": 7
      },
      "template_parameters": [
        {
          "is_variadic": false,
          "kind": "template_type",
          "name": "T",
          "template_parameters": []
        }
      ],
      "type": "class"
    },
    {
      "bases": [],
      "display_name": "clanguml::t00049::A<intmap>",
      "id": "654829353386288443",
      "is_abstract": false,
      "is_nested": false,
      "is_struct": false,
      "is_template": true,
      "is_union": false,
      "members": [],
      "methods": [],
      "name": "A",
      "namespace": "clanguml::t00049",
      "source_location": {
        "file": "../../tests/t00049/t00049.cc",
        "line": 7
      },
      "template_parameters": [
        {
          "is_variadic": false,
          "kind": "argument",
          "template_parameters": [],
          "type": "intmap"
        }
      ],
      "type": "class"
    },
    {
      "bases": [],
      "display_name": "clanguml::t00049::A<thestring>",
      "id": "973058255816844469",
      "is_abstract": false,
      "is_nested": false,
      "is_struct": false,
      "is_template": true,
      "is_union": false,
      "members": [],
      "methods": [],
      "name": "A",
      "namespace": "clanguml::t00049",
      "source_location": {
        "file": "../../tests/t00049/t00049.cc",
        "line": 7
      },
      "template_parameters": [
        {
          "is_variadic": false,
          "kind": "argument",
          "template_parameters": [],
          "type": "thestring"
        }
      ],
      "type": "class"
    },
    {
      "bases": [],
      "display_name": "clanguml::t00049::A<string_vector>",
      "id": "562074851310302010",
      "is_abstract": false,
      "is_nested": false,
      "is_struct": false,
      "is_template": true,
      "is_union": false,
      "members": [],
      "methods": [],
      "name": "A",
      "namespace": "clanguml::t00049",
      "source_location": {
        "file": "../../tests/t00049/t00049.cc",
        "line": 7
      },
      "template_parameters": [
        {
          "is_variadic": false,
          "kind": "argument",
          "template_parameters": [],
          "type": "string_vector"
        }
      ],
      "type": "class"
    },
    {
      "bases": [],
      "display_name": "clanguml::t00049::R",
      "id": "2288024073053091226",
      "is_abstract": false,
      "is_nested": false,
      "is_struct": true,
      "is_template": false,
      "is_union": false,
      "members": [
        {
          "access": "public",
          "is_static": false,
          "name": "a_string",
          "source_location": {
            "file": "../../tests/t00049/t00049.cc",
            "line": 14
          },
          "type": "A<std::basic_string<char>>"
        },
        {
          "access": "public",
          "is_static": false,
          "name": "a_vector_string",
          "source_location": {
            "file": "../../tests/t00049/t00049.cc",
            "line": 15
          },
          "type": "A<std::vector<std::string>>"
        },
        {
          "access": "public",
          "is_static": false,
          "name": "a_int_map",
          "source_location": {
            "file": "../../tests/t00049/t00049.cc",
            "line": 16
          },
          "type": "A<std::map<int,int>>"
        }
      ],
      "methods": [
        {
          "access": "public",
          "is_const": false,
          "is_defaulted": false,
          "is_implicit": false,
          "is_pure_virtual": false,
          "is_static": false,
          "is_virtual": false,
          "name": "get_int_map",
          "parameters": [],
          "type": "clanguml::t00049::A<std::map<int,int>>"
        },
        {
          "access": "public",
          "is_const": false,
          "is_defaulted": false,
          "is_implicit": false,
          "is_pure_virtual": false,
          "is_static": false,
          "is_virtual": false,
          "name": "set_int_map",
          "parameters": [
            {
              "name": "int_map",
              "type": "clanguml::t00049::A<std::map<int,int>> &&"
            }
          ],
          "type": "void"
        }
      ],
      "name": "R",
      "namespace": "clanguml::t00049",
      "source_location": {
        "file": "../../tests/t00049/t00049.cc",
        "line": 13
      },
      "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": "t00049_class",
  "relationships": [
    {
      "access": "public",
      "destination": "372971769516871577",
      "source": "654829353386288443",
      "type": "instantiation"
    },
    {
      "access": "public",
      "destination": "372971769516871577",
      "source": "973058255816844469",
      "type": "instantiation"
    },
    {
      "access": "public",
      "destination": "372971769516871577",
      "source": "562074851310302010",
      "type": "instantiation"
    },
    {
      "access": "public",
      "destination": "654829353386288443",
      "source": "2288024073053091226",
      "type": "dependency"
    },
    {
      "access": "public",
      "destination": "973058255816844469",
      "label": "a_string",
      "source": "2288024073053091226",
      "type": "aggregation"
    },
    {
      "access": "public",
      "destination": "562074851310302010",
      "label": "a_vector_string",
      "source": "2288024073053091226",
      "type": "aggregation"
    },
    {
      "access": "public",
      "destination": "654829353386288443",
      "label": "a_int_map",
      "source": "2288024073053091226",
      "type": "aggregation"
    }
  ],
  "using_namespace": "clanguml::t00049"
}
```
