579 lines
15 KiB
Markdown
579 lines
15 KiB
Markdown
# t00038 - Template instantiation with unexposed nested templates
|
|
## Config
|
|
```yaml
|
|
diagrams:
|
|
t00038_class:
|
|
type: class
|
|
generate_packages: false
|
|
glob:
|
|
- t00038.cc
|
|
using_namespace: clanguml::t00038
|
|
include:
|
|
namespaces:
|
|
- clanguml::t00038
|
|
- thirdparty::ns1
|
|
```
|
|
## Source code
|
|
File `tests/t00038/t00038.cc`
|
|
```cpp
|
|
#include <map>
|
|
#include <string>
|
|
#include <type_traits>
|
|
#include <vector>
|
|
|
|
namespace thirdparty {
|
|
namespace ns1 {
|
|
enum class color_t { red, green, blue };
|
|
|
|
struct E { };
|
|
} // namespace ns1
|
|
namespace ns2 {
|
|
struct F { };
|
|
} // namespace ns2
|
|
} // namespace thirdparty
|
|
|
|
namespace clanguml {
|
|
namespace t00038 {
|
|
|
|
enum class property_t { property_a, property_b, property_c };
|
|
|
|
struct A { };
|
|
struct B { };
|
|
struct C { };
|
|
|
|
struct key_t {
|
|
std::string key;
|
|
};
|
|
|
|
template <typename T> struct map { };
|
|
|
|
using namespace thirdparty::ns1;
|
|
|
|
template <> struct map<std::integral_constant<color_t, color_t::red>> : E { };
|
|
|
|
template <>
|
|
struct map<std::integral_constant<clanguml::t00038::property_t,
|
|
clanguml::t00038::property_t::property_a>> : A { };
|
|
|
|
template <>
|
|
struct map<std::vector<
|
|
std::integral_constant<t00038::property_t, t00038::property_t::property_b>>>
|
|
: B { };
|
|
|
|
template <>
|
|
struct map<std::map<key_t,
|
|
std::vector<std::integral_constant<property_t, property_t::property_c>>>>
|
|
: C { };
|
|
|
|
} // namespace t00038
|
|
} // namespace clanguml
|
|
|
|
```
|
|
## Generated PlantUML diagrams
|
|

|
|
## Generated Mermaid diagrams
|
|

|
|
## Generated JSON models
|
|
```json
|
|
{
|
|
"diagram_type": "class",
|
|
"elements": [
|
|
{
|
|
"constants": [
|
|
"red",
|
|
"green",
|
|
"blue"
|
|
],
|
|
"display_name": "thirdparty::ns1::color_t",
|
|
"id": "566782399856868761",
|
|
"is_nested": false,
|
|
"name": "color_t",
|
|
"namespace": "thirdparty::ns1",
|
|
"source_location": {
|
|
"column": 12,
|
|
"file": "t00038.cc",
|
|
"line": 8,
|
|
"translation_unit": "t00038.cc"
|
|
},
|
|
"type": "enum"
|
|
},
|
|
{
|
|
"bases": [],
|
|
"display_name": "thirdparty::ns1::E",
|
|
"id": "1642222718760881014",
|
|
"is_abstract": false,
|
|
"is_nested": false,
|
|
"is_struct": true,
|
|
"is_template": false,
|
|
"is_union": false,
|
|
"members": [],
|
|
"methods": [],
|
|
"name": "E",
|
|
"namespace": "thirdparty::ns1",
|
|
"source_location": {
|
|
"column": 8,
|
|
"file": "t00038.cc",
|
|
"line": 10,
|
|
"translation_unit": "t00038.cc"
|
|
},
|
|
"template_parameters": [],
|
|
"type": "class"
|
|
},
|
|
{
|
|
"constants": [
|
|
"property_a",
|
|
"property_b",
|
|
"property_c"
|
|
],
|
|
"display_name": "clanguml::t00038::property_t",
|
|
"id": "7376951310260829",
|
|
"is_nested": false,
|
|
"name": "property_t",
|
|
"namespace": "clanguml::t00038",
|
|
"source_location": {
|
|
"column": 12,
|
|
"file": "t00038.cc",
|
|
"line": 20,
|
|
"translation_unit": "t00038.cc"
|
|
},
|
|
"type": "enum"
|
|
},
|
|
{
|
|
"bases": [],
|
|
"display_name": "clanguml::t00038::A",
|
|
"id": "790040432414172612",
|
|
"is_abstract": false,
|
|
"is_nested": false,
|
|
"is_struct": true,
|
|
"is_template": false,
|
|
"is_union": false,
|
|
"members": [],
|
|
"methods": [],
|
|
"name": "A",
|
|
"namespace": "clanguml::t00038",
|
|
"source_location": {
|
|
"column": 8,
|
|
"file": "t00038.cc",
|
|
"line": 22,
|
|
"translation_unit": "t00038.cc"
|
|
},
|
|
"template_parameters": [],
|
|
"type": "class"
|
|
},
|
|
{
|
|
"bases": [],
|
|
"display_name": "clanguml::t00038::B",
|
|
"id": "1295970068907562690",
|
|
"is_abstract": false,
|
|
"is_nested": false,
|
|
"is_struct": true,
|
|
"is_template": false,
|
|
"is_union": false,
|
|
"members": [],
|
|
"methods": [],
|
|
"name": "B",
|
|
"namespace": "clanguml::t00038",
|
|
"source_location": {
|
|
"column": 8,
|
|
"file": "t00038.cc",
|
|
"line": 23,
|
|
"translation_unit": "t00038.cc"
|
|
},
|
|
"template_parameters": [],
|
|
"type": "class"
|
|
},
|
|
{
|
|
"bases": [],
|
|
"display_name": "clanguml::t00038::C",
|
|
"id": "154510361779680983",
|
|
"is_abstract": false,
|
|
"is_nested": false,
|
|
"is_struct": true,
|
|
"is_template": false,
|
|
"is_union": false,
|
|
"members": [],
|
|
"methods": [],
|
|
"name": "C",
|
|
"namespace": "clanguml::t00038",
|
|
"source_location": {
|
|
"column": 8,
|
|
"file": "t00038.cc",
|
|
"line": 24,
|
|
"translation_unit": "t00038.cc"
|
|
},
|
|
"template_parameters": [],
|
|
"type": "class"
|
|
},
|
|
{
|
|
"bases": [],
|
|
"display_name": "clanguml::t00038::key_t",
|
|
"id": "137163683637529037",
|
|
"is_abstract": false,
|
|
"is_nested": false,
|
|
"is_struct": true,
|
|
"is_template": false,
|
|
"is_union": false,
|
|
"members": [
|
|
{
|
|
"access": "public",
|
|
"is_static": false,
|
|
"name": "key",
|
|
"source_location": {
|
|
"column": 17,
|
|
"file": "t00038.cc",
|
|
"line": 27,
|
|
"translation_unit": "t00038.cc"
|
|
},
|
|
"type": "std::string"
|
|
}
|
|
],
|
|
"methods": [],
|
|
"name": "key_t",
|
|
"namespace": "clanguml::t00038",
|
|
"source_location": {
|
|
"column": 8,
|
|
"file": "t00038.cc",
|
|
"line": 26,
|
|
"translation_unit": "t00038.cc"
|
|
},
|
|
"template_parameters": [],
|
|
"type": "class"
|
|
},
|
|
{
|
|
"bases": [],
|
|
"display_name": "clanguml::t00038::map<T>",
|
|
"id": "1917560728132448300",
|
|
"is_abstract": false,
|
|
"is_nested": false,
|
|
"is_struct": true,
|
|
"is_template": true,
|
|
"is_union": false,
|
|
"members": [],
|
|
"methods": [],
|
|
"name": "map",
|
|
"namespace": "clanguml::t00038",
|
|
"source_location": {
|
|
"column": 30,
|
|
"file": "t00038.cc",
|
|
"line": 30,
|
|
"translation_unit": "t00038.cc"
|
|
},
|
|
"template_parameters": [
|
|
{
|
|
"is_variadic": false,
|
|
"kind": "template_type",
|
|
"name": "T",
|
|
"template_parameters": []
|
|
}
|
|
],
|
|
"type": "class"
|
|
},
|
|
{
|
|
"bases": [
|
|
{
|
|
"access": "public",
|
|
"id": "1642222718760881014",
|
|
"is_virtual": false,
|
|
"name": "thirdparty::ns1::E"
|
|
}
|
|
],
|
|
"display_name": "clanguml::t00038::map<std::integral_constant<thirdparty::ns1::color_t,thirdparty::ns1::color_t::red>>",
|
|
"id": "1664022047310891203",
|
|
"is_abstract": false,
|
|
"is_nested": false,
|
|
"is_struct": true,
|
|
"is_template": true,
|
|
"is_union": false,
|
|
"members": [],
|
|
"methods": [],
|
|
"name": "map",
|
|
"namespace": "clanguml::t00038",
|
|
"source_location": {
|
|
"column": 20,
|
|
"file": "t00038.cc",
|
|
"line": 34,
|
|
"translation_unit": "t00038.cc"
|
|
},
|
|
"template_parameters": [
|
|
{
|
|
"is_variadic": false,
|
|
"kind": "argument",
|
|
"template_parameters": [
|
|
{
|
|
"is_variadic": false,
|
|
"kind": "argument",
|
|
"template_parameters": [],
|
|
"type": "thirdparty::ns1::color_t"
|
|
},
|
|
{
|
|
"is_variadic": false,
|
|
"kind": "argument",
|
|
"template_parameters": [],
|
|
"type": "thirdparty::ns1::color_t::red"
|
|
}
|
|
],
|
|
"type": "std::integral_constant"
|
|
}
|
|
],
|
|
"type": "class"
|
|
},
|
|
{
|
|
"bases": [
|
|
{
|
|
"access": "public",
|
|
"id": "790040432414172612",
|
|
"is_virtual": false,
|
|
"name": "clanguml::t00038::A"
|
|
}
|
|
],
|
|
"display_name": "clanguml::t00038::map<std::integral_constant<clanguml::t00038::property_t,clanguml::t00038::property_t::property_a>>",
|
|
"id": "307700801045535833",
|
|
"is_abstract": false,
|
|
"is_nested": false,
|
|
"is_struct": true,
|
|
"is_template": true,
|
|
"is_union": false,
|
|
"members": [],
|
|
"methods": [],
|
|
"name": "map",
|
|
"namespace": "clanguml::t00038",
|
|
"source_location": {
|
|
"column": 8,
|
|
"file": "t00038.cc",
|
|
"line": 37,
|
|
"translation_unit": "t00038.cc"
|
|
},
|
|
"template_parameters": [
|
|
{
|
|
"is_variadic": false,
|
|
"kind": "argument",
|
|
"template_parameters": [
|
|
{
|
|
"is_variadic": false,
|
|
"kind": "argument",
|
|
"template_parameters": [],
|
|
"type": "clanguml::t00038::property_t"
|
|
},
|
|
{
|
|
"is_variadic": false,
|
|
"kind": "argument",
|
|
"template_parameters": [],
|
|
"type": "clanguml::t00038::property_t::property_a"
|
|
}
|
|
],
|
|
"type": "std::integral_constant"
|
|
}
|
|
],
|
|
"type": "class"
|
|
},
|
|
{
|
|
"bases": [
|
|
{
|
|
"access": "public",
|
|
"id": "1295970068907562690",
|
|
"is_virtual": false,
|
|
"name": "clanguml::t00038::B"
|
|
}
|
|
],
|
|
"display_name": "clanguml::t00038::map<std::vector<std::integral_constant<clanguml::t00038::property_t,clanguml::t00038::property_t::property_b>>>",
|
|
"id": "548231528417484191",
|
|
"is_abstract": false,
|
|
"is_nested": false,
|
|
"is_struct": true,
|
|
"is_template": true,
|
|
"is_union": false,
|
|
"members": [],
|
|
"methods": [],
|
|
"name": "map",
|
|
"namespace": "clanguml::t00038",
|
|
"source_location": {
|
|
"column": 8,
|
|
"file": "t00038.cc",
|
|
"line": 41,
|
|
"translation_unit": "t00038.cc"
|
|
},
|
|
"template_parameters": [
|
|
{
|
|
"is_variadic": false,
|
|
"kind": "argument",
|
|
"template_parameters": [
|
|
{
|
|
"is_variadic": false,
|
|
"kind": "argument",
|
|
"template_parameters": [
|
|
{
|
|
"is_variadic": false,
|
|
"kind": "argument",
|
|
"template_parameters": [],
|
|
"type": "clanguml::t00038::property_t"
|
|
},
|
|
{
|
|
"is_variadic": false,
|
|
"kind": "argument",
|
|
"template_parameters": [],
|
|
"type": "clanguml::t00038::property_t::property_b"
|
|
}
|
|
],
|
|
"type": "std::integral_constant"
|
|
}
|
|
],
|
|
"type": "std::vector"
|
|
}
|
|
],
|
|
"type": "class"
|
|
},
|
|
{
|
|
"bases": [
|
|
{
|
|
"access": "public",
|
|
"id": "154510361779680983",
|
|
"is_virtual": false,
|
|
"name": "clanguml::t00038::C"
|
|
}
|
|
],
|
|
"display_name": "clanguml::t00038::map<std::map<clanguml::t00038::key_t,std::vector<std::integral_constant<clanguml::t00038::property_t,clanguml::t00038::property_t::property_c>>>>",
|
|
"id": "1510200402118706005",
|
|
"is_abstract": false,
|
|
"is_nested": false,
|
|
"is_struct": true,
|
|
"is_template": true,
|
|
"is_union": false,
|
|
"members": [],
|
|
"methods": [],
|
|
"name": "map",
|
|
"namespace": "clanguml::t00038",
|
|
"source_location": {
|
|
"column": 8,
|
|
"file": "t00038.cc",
|
|
"line": 46,
|
|
"translation_unit": "t00038.cc"
|
|
},
|
|
"template_parameters": [
|
|
{
|
|
"is_variadic": false,
|
|
"kind": "argument",
|
|
"template_parameters": [
|
|
{
|
|
"is_variadic": false,
|
|
"kind": "argument",
|
|
"template_parameters": [],
|
|
"type": "clanguml::t00038::key_t"
|
|
},
|
|
{
|
|
"is_variadic": false,
|
|
"kind": "argument",
|
|
"template_parameters": [
|
|
{
|
|
"is_variadic": false,
|
|
"kind": "argument",
|
|
"template_parameters": [
|
|
{
|
|
"is_variadic": false,
|
|
"kind": "argument",
|
|
"template_parameters": [],
|
|
"type": "clanguml::t00038::property_t"
|
|
},
|
|
{
|
|
"is_variadic": false,
|
|
"kind": "argument",
|
|
"template_parameters": [],
|
|
"type": "clanguml::t00038::property_t::property_c"
|
|
}
|
|
],
|
|
"type": "std::integral_constant"
|
|
}
|
|
],
|
|
"type": "std::vector"
|
|
}
|
|
],
|
|
"type": "std::map"
|
|
}
|
|
],
|
|
"type": "class"
|
|
}
|
|
],
|
|
"name": "t00038_class",
|
|
"relationships": [
|
|
{
|
|
"access": "public",
|
|
"destination": "566782399856868761",
|
|
"source": "1664022047310891203",
|
|
"type": "dependency"
|
|
},
|
|
{
|
|
"access": "public",
|
|
"destination": "1917560728132448300",
|
|
"source": "1664022047310891203",
|
|
"type": "instantiation"
|
|
},
|
|
{
|
|
"access": "public",
|
|
"destination": "1642222718760881014",
|
|
"source": "1664022047310891203",
|
|
"type": "extension"
|
|
},
|
|
{
|
|
"access": "public",
|
|
"destination": "7376951310260829",
|
|
"source": "307700801045535833",
|
|
"type": "dependency"
|
|
},
|
|
{
|
|
"access": "public",
|
|
"destination": "1917560728132448300",
|
|
"source": "307700801045535833",
|
|
"type": "instantiation"
|
|
},
|
|
{
|
|
"access": "public",
|
|
"destination": "790040432414172612",
|
|
"source": "307700801045535833",
|
|
"type": "extension"
|
|
},
|
|
{
|
|
"access": "public",
|
|
"destination": "7376951310260829",
|
|
"source": "548231528417484191",
|
|
"type": "dependency"
|
|
},
|
|
{
|
|
"access": "public",
|
|
"destination": "1917560728132448300",
|
|
"source": "548231528417484191",
|
|
"type": "instantiation"
|
|
},
|
|
{
|
|
"access": "public",
|
|
"destination": "1295970068907562690",
|
|
"source": "548231528417484191",
|
|
"type": "extension"
|
|
},
|
|
{
|
|
"access": "public",
|
|
"destination": "137163683637529037",
|
|
"source": "1510200402118706005",
|
|
"type": "dependency"
|
|
},
|
|
{
|
|
"access": "public",
|
|
"destination": "7376951310260829",
|
|
"source": "1510200402118706005",
|
|
"type": "dependency"
|
|
},
|
|
{
|
|
"access": "public",
|
|
"destination": "1917560728132448300",
|
|
"source": "1510200402118706005",
|
|
"type": "instantiation"
|
|
},
|
|
{
|
|
"access": "public",
|
|
"destination": "154510361779680983",
|
|
"source": "1510200402118706005",
|
|
"type": "extension"
|
|
}
|
|
],
|
|
"using_namespace": "clanguml::t00038"
|
|
}
|
|
```
|