314 lines
6.9 KiB
Markdown
314 lines
6.9 KiB
Markdown
# t00016 - Unnamed enums and empty templates
|
|
## Config
|
|
```yaml
|
|
diagrams:
|
|
t00016_class:
|
|
type: class
|
|
glob:
|
|
- t00016.cc
|
|
using_namespace: clanguml::t00016
|
|
plantuml:
|
|
style:
|
|
instantiation: up
|
|
include:
|
|
namespaces:
|
|
- clanguml::t00016
|
|
|
|
```
|
|
## Source code
|
|
File `tests/t00016/t00016.cc`
|
|
```cpp
|
|
namespace clanguml {
|
|
namespace t00016 {
|
|
|
|
template <typename> struct is_numeric {
|
|
enum { value = false };
|
|
};
|
|
|
|
template <> struct is_numeric<float> {
|
|
enum { value = true };
|
|
};
|
|
|
|
template <> struct is_numeric<char> {
|
|
enum { value = true };
|
|
};
|
|
|
|
template <> struct is_numeric<unsigned int> {
|
|
enum { value = true };
|
|
};
|
|
|
|
template <> struct is_numeric<int> {
|
|
enum { value = true };
|
|
};
|
|
|
|
template <> struct is_numeric<bool> {
|
|
enum { value = false };
|
|
};
|
|
} // namespace t00016
|
|
} // namespace clanguml
|
|
|
|
```
|
|
## Generated PlantUML diagrams
|
|

|
|
## Generated Mermaid diagrams
|
|

|
|
## Generated JSON models
|
|
```json
|
|
{
|
|
"diagram_type": "class",
|
|
"elements": [
|
|
{
|
|
"bases": [],
|
|
"display_name": "is_numeric<typename>",
|
|
"id": "932856332558460389",
|
|
"is_abstract": false,
|
|
"is_nested": false,
|
|
"is_struct": true,
|
|
"is_template": true,
|
|
"is_union": false,
|
|
"members": [
|
|
{
|
|
"access": "public",
|
|
"is_static": false,
|
|
"name": "value",
|
|
"type": "enum"
|
|
}
|
|
],
|
|
"methods": [],
|
|
"name": "is_numeric",
|
|
"namespace": "clanguml::t00016",
|
|
"source_location": {
|
|
"column": 28,
|
|
"file": "t00016.cc",
|
|
"line": 4,
|
|
"translation_unit": "t00016.cc"
|
|
},
|
|
"template_parameters": [
|
|
{
|
|
"is_variadic": false,
|
|
"kind": "template_type",
|
|
"name": "typename",
|
|
"template_parameters": []
|
|
}
|
|
],
|
|
"type": "class"
|
|
},
|
|
{
|
|
"bases": [],
|
|
"display_name": "is_numeric<float>",
|
|
"id": "95618295648274199",
|
|
"is_abstract": false,
|
|
"is_nested": false,
|
|
"is_struct": true,
|
|
"is_template": true,
|
|
"is_union": false,
|
|
"members": [
|
|
{
|
|
"access": "public",
|
|
"is_static": false,
|
|
"name": "value",
|
|
"type": "enum"
|
|
}
|
|
],
|
|
"methods": [],
|
|
"name": "is_numeric",
|
|
"namespace": "clanguml::t00016",
|
|
"source_location": {
|
|
"column": 20,
|
|
"file": "t00016.cc",
|
|
"line": 8,
|
|
"translation_unit": "t00016.cc"
|
|
},
|
|
"template_parameters": [
|
|
{
|
|
"is_variadic": false,
|
|
"kind": "argument",
|
|
"template_parameters": [],
|
|
"type": "float"
|
|
}
|
|
],
|
|
"type": "class"
|
|
},
|
|
{
|
|
"bases": [],
|
|
"display_name": "is_numeric<char>",
|
|
"id": "979129381790761728",
|
|
"is_abstract": false,
|
|
"is_nested": false,
|
|
"is_struct": true,
|
|
"is_template": true,
|
|
"is_union": false,
|
|
"members": [
|
|
{
|
|
"access": "public",
|
|
"is_static": false,
|
|
"name": "value",
|
|
"type": "enum"
|
|
}
|
|
],
|
|
"methods": [],
|
|
"name": "is_numeric",
|
|
"namespace": "clanguml::t00016",
|
|
"source_location": {
|
|
"column": 20,
|
|
"file": "t00016.cc",
|
|
"line": 12,
|
|
"translation_unit": "t00016.cc"
|
|
},
|
|
"template_parameters": [
|
|
{
|
|
"is_variadic": false,
|
|
"kind": "argument",
|
|
"template_parameters": [],
|
|
"type": "char"
|
|
}
|
|
],
|
|
"type": "class"
|
|
},
|
|
{
|
|
"bases": [],
|
|
"display_name": "is_numeric<unsigned int>",
|
|
"id": "2090787690027341836",
|
|
"is_abstract": false,
|
|
"is_nested": false,
|
|
"is_struct": true,
|
|
"is_template": true,
|
|
"is_union": false,
|
|
"members": [
|
|
{
|
|
"access": "public",
|
|
"is_static": false,
|
|
"name": "value",
|
|
"type": "enum"
|
|
}
|
|
],
|
|
"methods": [],
|
|
"name": "is_numeric",
|
|
"namespace": "clanguml::t00016",
|
|
"source_location": {
|
|
"column": 20,
|
|
"file": "t00016.cc",
|
|
"line": 16,
|
|
"translation_unit": "t00016.cc"
|
|
},
|
|
"template_parameters": [
|
|
{
|
|
"is_variadic": false,
|
|
"kind": "argument",
|
|
"template_parameters": [],
|
|
"type": "unsigned int"
|
|
}
|
|
],
|
|
"type": "class"
|
|
},
|
|
{
|
|
"bases": [],
|
|
"display_name": "is_numeric<int>",
|
|
"id": "500603075237446075",
|
|
"is_abstract": false,
|
|
"is_nested": false,
|
|
"is_struct": true,
|
|
"is_template": true,
|
|
"is_union": false,
|
|
"members": [
|
|
{
|
|
"access": "public",
|
|
"is_static": false,
|
|
"name": "value",
|
|
"type": "enum"
|
|
}
|
|
],
|
|
"methods": [],
|
|
"name": "is_numeric",
|
|
"namespace": "clanguml::t00016",
|
|
"source_location": {
|
|
"column": 20,
|
|
"file": "t00016.cc",
|
|
"line": 20,
|
|
"translation_unit": "t00016.cc"
|
|
},
|
|
"template_parameters": [
|
|
{
|
|
"is_variadic": false,
|
|
"kind": "argument",
|
|
"template_parameters": [],
|
|
"type": "int"
|
|
}
|
|
],
|
|
"type": "class"
|
|
},
|
|
{
|
|
"bases": [],
|
|
"display_name": "is_numeric<bool>",
|
|
"id": "2111316837513419920",
|
|
"is_abstract": false,
|
|
"is_nested": false,
|
|
"is_struct": true,
|
|
"is_template": true,
|
|
"is_union": false,
|
|
"members": [
|
|
{
|
|
"access": "public",
|
|
"is_static": false,
|
|
"name": "value",
|
|
"type": "enum"
|
|
}
|
|
],
|
|
"methods": [],
|
|
"name": "is_numeric",
|
|
"namespace": "clanguml::t00016",
|
|
"source_location": {
|
|
"column": 20,
|
|
"file": "t00016.cc",
|
|
"line": 24,
|
|
"translation_unit": "t00016.cc"
|
|
},
|
|
"template_parameters": [
|
|
{
|
|
"is_variadic": false,
|
|
"kind": "argument",
|
|
"template_parameters": [],
|
|
"type": "bool"
|
|
}
|
|
],
|
|
"type": "class"
|
|
}
|
|
],
|
|
"name": "t00016_class",
|
|
"package_type": "namespace",
|
|
"relationships": [
|
|
{
|
|
"access": "public",
|
|
"destination": "932856332558460389",
|
|
"source": "95618295648274199",
|
|
"type": "instantiation"
|
|
},
|
|
{
|
|
"access": "public",
|
|
"destination": "932856332558460389",
|
|
"source": "979129381790761728",
|
|
"type": "instantiation"
|
|
},
|
|
{
|
|
"access": "public",
|
|
"destination": "932856332558460389",
|
|
"source": "2090787690027341836",
|
|
"type": "instantiation"
|
|
},
|
|
{
|
|
"access": "public",
|
|
"destination": "932856332558460389",
|
|
"source": "500603075237446075",
|
|
"type": "instantiation"
|
|
},
|
|
{
|
|
"access": "public",
|
|
"destination": "932856332558460389",
|
|
"source": "2111316837513419920",
|
|
"type": "instantiation"
|
|
}
|
|
],
|
|
"using_namespace": "clanguml::t00016"
|
|
}
|
|
```
|