625 lines
18 KiB
Markdown
625 lines
18 KiB
Markdown
# t00065 - Class diagram with packages from directory structure
|
|
## Config
|
|
```yaml
|
|
compilation_database_dir: ..
|
|
output_directory: puml
|
|
diagrams:
|
|
t00065_class:
|
|
type: class
|
|
glob:
|
|
- t00065.cc
|
|
relative_to: ../../../tests/t00065
|
|
generate_packages: true
|
|
package_type: directory
|
|
include:
|
|
namespaces:
|
|
- clanguml::t00065
|
|
using_namespace:
|
|
- clanguml::t00065
|
|
```
|
|
## Source code
|
|
File t00065.cc
|
|
```cpp
|
|
#include "module1/module1.h"
|
|
#include "module2/module2.h"
|
|
|
|
namespace clanguml {
|
|
namespace t00065 {
|
|
struct R {
|
|
A *a;
|
|
C<B> c;
|
|
D<B> d;
|
|
};
|
|
}
|
|
}
|
|
```
|
|
## Generated UML diagrams
|
|

|
|
## Generated JSON models
|
|
```json
|
|
{
|
|
"diagram_type": "class",
|
|
"elements": [
|
|
{
|
|
"display_name": "module1",
|
|
"elements": [
|
|
{
|
|
"display_name": "module1::submodule1a",
|
|
"elements": [
|
|
{
|
|
"bases": [],
|
|
"display_name": "clanguml::t00065::detail::AImpl",
|
|
"id": "674757414308736755",
|
|
"is_abstract": false,
|
|
"is_nested": false,
|
|
"is_struct": true,
|
|
"is_template": false,
|
|
"is_union": false,
|
|
"members": [],
|
|
"methods": [],
|
|
"name": "AImpl",
|
|
"namespace": "clanguml::t00065::detail",
|
|
"source_location": {
|
|
"column": 8,
|
|
"file": "../../clang-uml/tests/t00065/module1/submodule1a/submodule1a.h",
|
|
"line": 6,
|
|
"translation_unit": "../../clang-uml/tests/t00065/t00065.cc"
|
|
},
|
|
"template_parameters": [],
|
|
"type": "class"
|
|
}
|
|
],
|
|
"name": "submodule1a",
|
|
"type": "directory"
|
|
},
|
|
{
|
|
"constants": [
|
|
"a",
|
|
"b",
|
|
"c"
|
|
],
|
|
"display_name": "clanguml::t00065::ABC",
|
|
"id": "2145362985538918973",
|
|
"is_nested": false,
|
|
"name": "ABC",
|
|
"namespace": "clanguml::t00065",
|
|
"source_location": {
|
|
"column": 12,
|
|
"file": "../../clang-uml/tests/t00065/module1/module1.h",
|
|
"line": 8,
|
|
"translation_unit": "../../clang-uml/tests/t00065/t00065.cc"
|
|
},
|
|
"type": "enum"
|
|
},
|
|
{
|
|
"constants": [
|
|
"x",
|
|
"y",
|
|
"z"
|
|
],
|
|
"display_name": "clanguml::t00065::XYZ",
|
|
"id": "1435940218810141944",
|
|
"is_nested": false,
|
|
"name": "XYZ",
|
|
"namespace": "clanguml::t00065",
|
|
"source_location": {
|
|
"column": 6,
|
|
"file": "../../clang-uml/tests/t00065/module1/module1.h",
|
|
"line": 10,
|
|
"translation_unit": "../../clang-uml/tests/t00065/t00065.cc"
|
|
},
|
|
"type": "enum"
|
|
},
|
|
{
|
|
"bases": [],
|
|
"display_name": "clanguml::t00065::A",
|
|
"id": "1178194542408300737",
|
|
"is_abstract": false,
|
|
"is_nested": false,
|
|
"is_struct": true,
|
|
"is_template": false,
|
|
"is_union": false,
|
|
"members": [
|
|
{
|
|
"access": "public",
|
|
"is_static": false,
|
|
"name": "abc",
|
|
"source_location": {
|
|
"column": 9,
|
|
"file": "../../clang-uml/tests/t00065/module1/module1.h",
|
|
"line": 13,
|
|
"translation_unit": "../../clang-uml/tests/t00065/t00065.cc"
|
|
},
|
|
"type": "clanguml::t00065::ABC"
|
|
},
|
|
{
|
|
"access": "public",
|
|
"is_static": false,
|
|
"name": "xyz",
|
|
"source_location": {
|
|
"column": 9,
|
|
"file": "../../clang-uml/tests/t00065/module1/module1.h",
|
|
"line": 14,
|
|
"translation_unit": "../../clang-uml/tests/t00065/t00065.cc"
|
|
},
|
|
"type": "clanguml::t00065::XYZ"
|
|
},
|
|
{
|
|
"access": "public",
|
|
"is_static": false,
|
|
"name": "pimpl",
|
|
"source_location": {
|
|
"column": 20,
|
|
"file": "../../clang-uml/tests/t00065/module1/module1.h",
|
|
"line": 15,
|
|
"translation_unit": "../../clang-uml/tests/t00065/t00065.cc"
|
|
},
|
|
"type": "detail::AImpl *"
|
|
}
|
|
],
|
|
"methods": [],
|
|
"name": "A",
|
|
"namespace": "clanguml::t00065",
|
|
"source_location": {
|
|
"column": 8,
|
|
"file": "../../clang-uml/tests/t00065/module1/module1.h",
|
|
"line": 12,
|
|
"translation_unit": "../../clang-uml/tests/t00065/t00065.cc"
|
|
},
|
|
"template_parameters": [],
|
|
"type": "class"
|
|
}
|
|
],
|
|
"name": "module1",
|
|
"type": "directory"
|
|
},
|
|
{
|
|
"display_name": "module2",
|
|
"elements": [
|
|
{
|
|
"display_name": "module2::concepts",
|
|
"elements": [
|
|
{
|
|
"display_name": "clanguml::t00065::bconcept<T>",
|
|
"id": "1325475407133721370",
|
|
"name": "bconcept",
|
|
"namespace": "clanguml::t00065",
|
|
"parameters": [
|
|
{
|
|
"name": "clanguml::t00065::t",
|
|
"type": "T"
|
|
}
|
|
],
|
|
"source_location": {
|
|
"column": 9,
|
|
"file": "../../clang-uml/tests/t00065/module2/concepts/concepts.h",
|
|
"line": 7,
|
|
"translation_unit": "../../clang-uml/tests/t00065/t00065.cc"
|
|
},
|
|
"statements": [
|
|
"T{}",
|
|
"t.b()"
|
|
],
|
|
"type": "concept"
|
|
}
|
|
],
|
|
"name": "concepts",
|
|
"type": "directory"
|
|
},
|
|
{
|
|
"bases": [],
|
|
"display_name": "clanguml::t00065::B",
|
|
"id": "1651810571114530033",
|
|
"is_abstract": false,
|
|
"is_nested": false,
|
|
"is_struct": true,
|
|
"is_template": false,
|
|
"is_union": false,
|
|
"members": [],
|
|
"methods": [
|
|
{
|
|
"access": "public",
|
|
"is_const": false,
|
|
"is_consteval": false,
|
|
"is_constexpr": false,
|
|
"is_constructor": true,
|
|
"is_copy_assignment": false,
|
|
"is_defaulted": true,
|
|
"is_deleted": false,
|
|
"is_move_assignment": false,
|
|
"is_noexcept": false,
|
|
"is_operator": false,
|
|
"is_pure_virtual": false,
|
|
"is_static": false,
|
|
"is_virtual": false,
|
|
"name": "B",
|
|
"parameters": [],
|
|
"source_location": {
|
|
"column": 5,
|
|
"file": "../../clang-uml/tests/t00065/module2/module2.h",
|
|
"line": 8,
|
|
"translation_unit": "../../clang-uml/tests/t00065/t00065.cc"
|
|
},
|
|
"type": "void"
|
|
},
|
|
{
|
|
"access": "public",
|
|
"is_const": false,
|
|
"is_consteval": false,
|
|
"is_constexpr": false,
|
|
"is_constructor": false,
|
|
"is_copy_assignment": false,
|
|
"is_defaulted": false,
|
|
"is_deleted": false,
|
|
"is_move_assignment": false,
|
|
"is_noexcept": false,
|
|
"is_operator": false,
|
|
"is_pure_virtual": false,
|
|
"is_static": false,
|
|
"is_virtual": false,
|
|
"name": "b",
|
|
"parameters": [],
|
|
"source_location": {
|
|
"column": 10,
|
|
"file": "../../clang-uml/tests/t00065/module2/module2.h",
|
|
"line": 9,
|
|
"translation_unit": "../../clang-uml/tests/t00065/t00065.cc"
|
|
},
|
|
"type": "void"
|
|
}
|
|
],
|
|
"name": "B",
|
|
"namespace": "clanguml::t00065",
|
|
"source_location": {
|
|
"column": 8,
|
|
"file": "../../clang-uml/tests/t00065/module2/module2.h",
|
|
"line": 7,
|
|
"translation_unit": "../../clang-uml/tests/t00065/t00065.cc"
|
|
},
|
|
"template_parameters": [],
|
|
"type": "class"
|
|
},
|
|
{
|
|
"bases": [],
|
|
"display_name": "clanguml::t00065::C<T>",
|
|
"id": "1157378014768957235",
|
|
"is_abstract": false,
|
|
"is_nested": false,
|
|
"is_struct": true,
|
|
"is_template": true,
|
|
"is_union": false,
|
|
"members": [
|
|
{
|
|
"access": "public",
|
|
"is_static": false,
|
|
"name": "t",
|
|
"source_location": {
|
|
"column": 8,
|
|
"file": "../../clang-uml/tests/t00065/module2/module2.h",
|
|
"line": 13,
|
|
"translation_unit": "../../clang-uml/tests/t00065/t00065.cc"
|
|
},
|
|
"type": "T *"
|
|
}
|
|
],
|
|
"methods": [],
|
|
"name": "C",
|
|
"namespace": "clanguml::t00065",
|
|
"source_location": {
|
|
"column": 30,
|
|
"file": "../../clang-uml/tests/t00065/module2/module2.h",
|
|
"line": 12,
|
|
"translation_unit": "../../clang-uml/tests/t00065/t00065.cc"
|
|
},
|
|
"template_parameters": [
|
|
{
|
|
"is_variadic": false,
|
|
"kind": "template_type",
|
|
"name": "T",
|
|
"template_parameters": []
|
|
}
|
|
],
|
|
"type": "class"
|
|
},
|
|
{
|
|
"bases": [],
|
|
"display_name": "clanguml::t00065::C<int>",
|
|
"id": "580575003920044707",
|
|
"is_abstract": false,
|
|
"is_nested": false,
|
|
"is_struct": false,
|
|
"is_template": true,
|
|
"is_union": false,
|
|
"members": [],
|
|
"methods": [],
|
|
"name": "C",
|
|
"namespace": "clanguml::t00065",
|
|
"source_location": {
|
|
"column": 30,
|
|
"file": "../../clang-uml/tests/t00065/module2/module2.h",
|
|
"line": 12,
|
|
"translation_unit": "../../clang-uml/tests/t00065/t00065.cc"
|
|
},
|
|
"template_parameters": [
|
|
{
|
|
"is_variadic": false,
|
|
"kind": "argument",
|
|
"template_parameters": [],
|
|
"type": "int"
|
|
}
|
|
],
|
|
"type": "class"
|
|
},
|
|
{
|
|
"bases": [],
|
|
"display_name": "clanguml::t00065::D<clanguml::t00065::bconcept T>",
|
|
"id": "1719752929087851944",
|
|
"is_abstract": false,
|
|
"is_nested": false,
|
|
"is_struct": true,
|
|
"is_template": true,
|
|
"is_union": false,
|
|
"members": [
|
|
{
|
|
"access": "public",
|
|
"is_static": false,
|
|
"name": "t",
|
|
"source_location": {
|
|
"column": 7,
|
|
"file": "../../clang-uml/tests/t00065/module2/module2.h",
|
|
"line": 17,
|
|
"translation_unit": "../../clang-uml/tests/t00065/t00065.cc"
|
|
},
|
|
"type": "T"
|
|
},
|
|
{
|
|
"access": "public",
|
|
"is_static": false,
|
|
"name": "c",
|
|
"source_location": {
|
|
"column": 12,
|
|
"file": "../../clang-uml/tests/t00065/module2/module2.h",
|
|
"line": 18,
|
|
"translation_unit": "../../clang-uml/tests/t00065/t00065.cc"
|
|
},
|
|
"type": "C<int>"
|
|
}
|
|
],
|
|
"methods": [],
|
|
"name": "D",
|
|
"namespace": "clanguml::t00065",
|
|
"source_location": {
|
|
"column": 30,
|
|
"file": "../../clang-uml/tests/t00065/module2/module2.h",
|
|
"line": 16,
|
|
"translation_unit": "../../clang-uml/tests/t00065/t00065.cc"
|
|
},
|
|
"template_parameters": [
|
|
{
|
|
"is_variadic": false,
|
|
"kind": "template_type",
|
|
"name": "T",
|
|
"template_parameters": []
|
|
}
|
|
],
|
|
"type": "class"
|
|
},
|
|
{
|
|
"bases": [],
|
|
"display_name": "clanguml::t00065::C<clanguml::t00065::B>",
|
|
"id": "1373403346245688670",
|
|
"is_abstract": false,
|
|
"is_nested": false,
|
|
"is_struct": false,
|
|
"is_template": true,
|
|
"is_union": false,
|
|
"members": [],
|
|
"methods": [],
|
|
"name": "C",
|
|
"namespace": "clanguml::t00065",
|
|
"source_location": {
|
|
"column": 30,
|
|
"file": "../../clang-uml/tests/t00065/module2/module2.h",
|
|
"line": 12,
|
|
"translation_unit": "../../clang-uml/tests/t00065/t00065.cc"
|
|
},
|
|
"template_parameters": [
|
|
{
|
|
"is_variadic": false,
|
|
"kind": "argument",
|
|
"template_parameters": [],
|
|
"type": "clanguml::t00065::B"
|
|
}
|
|
],
|
|
"type": "class"
|
|
},
|
|
{
|
|
"bases": [],
|
|
"display_name": "clanguml::t00065::D<clanguml::t00065::B>",
|
|
"id": "2024276012622729482",
|
|
"is_abstract": false,
|
|
"is_nested": false,
|
|
"is_struct": false,
|
|
"is_template": true,
|
|
"is_union": false,
|
|
"members": [],
|
|
"methods": [],
|
|
"name": "D",
|
|
"namespace": "clanguml::t00065",
|
|
"source_location": {
|
|
"column": 30,
|
|
"file": "../../clang-uml/tests/t00065/module2/module2.h",
|
|
"line": 16,
|
|
"translation_unit": "../../clang-uml/tests/t00065/t00065.cc"
|
|
},
|
|
"template_parameters": [
|
|
{
|
|
"is_variadic": false,
|
|
"kind": "argument",
|
|
"template_parameters": [],
|
|
"type": "clanguml::t00065::B"
|
|
}
|
|
],
|
|
"type": "class"
|
|
}
|
|
],
|
|
"name": "module2",
|
|
"type": "directory"
|
|
},
|
|
{
|
|
"bases": [],
|
|
"display_name": "clanguml::t00065::R",
|
|
"id": "1082111961413727438",
|
|
"is_abstract": false,
|
|
"is_nested": false,
|
|
"is_struct": true,
|
|
"is_template": false,
|
|
"is_union": false,
|
|
"members": [
|
|
{
|
|
"access": "public",
|
|
"is_static": false,
|
|
"name": "a",
|
|
"source_location": {
|
|
"column": 8,
|
|
"file": "../../clang-uml/tests/t00065/t00065.cc",
|
|
"line": 7,
|
|
"translation_unit": "../../clang-uml/tests/t00065/t00065.cc"
|
|
},
|
|
"type": "clanguml::t00065::A *"
|
|
},
|
|
{
|
|
"access": "public",
|
|
"is_static": false,
|
|
"name": "c",
|
|
"source_location": {
|
|
"column": 10,
|
|
"file": "../../clang-uml/tests/t00065/t00065.cc",
|
|
"line": 8,
|
|
"translation_unit": "../../clang-uml/tests/t00065/t00065.cc"
|
|
},
|
|
"type": "C<clanguml::t00065::B>"
|
|
},
|
|
{
|
|
"access": "public",
|
|
"is_static": false,
|
|
"name": "d",
|
|
"source_location": {
|
|
"column": 10,
|
|
"file": "../../clang-uml/tests/t00065/t00065.cc",
|
|
"line": 9,
|
|
"translation_unit": "../../clang-uml/tests/t00065/t00065.cc"
|
|
},
|
|
"type": "D<clanguml::t00065::B>"
|
|
}
|
|
],
|
|
"methods": [],
|
|
"name": "R",
|
|
"namespace": "clanguml::t00065",
|
|
"source_location": {
|
|
"column": 8,
|
|
"file": "../../clang-uml/tests/t00065/t00065.cc",
|
|
"line": 6,
|
|
"translation_unit": "../../clang-uml/tests/t00065/t00065.cc"
|
|
},
|
|
"template_parameters": [],
|
|
"type": "class"
|
|
}
|
|
],
|
|
"metadata": {
|
|
"clang_uml_version": "0.3.8-29-gc472792",
|
|
"llvm_version": "Ubuntu clang version 15.0.7",
|
|
"schema_version": 1
|
|
},
|
|
"name": "t00065_class",
|
|
"relationships": [
|
|
{
|
|
"access": "public",
|
|
"destination": "2145362985538918973",
|
|
"label": "abc",
|
|
"source": "1178194542408300737",
|
|
"type": "aggregation"
|
|
},
|
|
{
|
|
"access": "public",
|
|
"destination": "1435940218810141944",
|
|
"label": "xyz",
|
|
"source": "1178194542408300737",
|
|
"type": "aggregation"
|
|
},
|
|
{
|
|
"access": "public",
|
|
"destination": "674757414308736755",
|
|
"label": "pimpl",
|
|
"source": "1178194542408300737",
|
|
"type": "association"
|
|
},
|
|
{
|
|
"access": "public",
|
|
"destination": "1157378014768957235",
|
|
"source": "580575003920044707",
|
|
"type": "instantiation"
|
|
},
|
|
{
|
|
"destination": "1325475407133721370",
|
|
"label": "T",
|
|
"source": "1719752929087851944",
|
|
"type": "constraint"
|
|
},
|
|
{
|
|
"access": "public",
|
|
"destination": "580575003920044707",
|
|
"label": "c",
|
|
"source": "1719752929087851944",
|
|
"type": "aggregation"
|
|
},
|
|
{
|
|
"access": "public",
|
|
"destination": "1651810571114530033",
|
|
"source": "1373403346245688670",
|
|
"type": "dependency"
|
|
},
|
|
{
|
|
"access": "public",
|
|
"destination": "1157378014768957235",
|
|
"source": "1373403346245688670",
|
|
"type": "instantiation"
|
|
},
|
|
{
|
|
"access": "public",
|
|
"destination": "1651810571114530033",
|
|
"source": "2024276012622729482",
|
|
"type": "dependency"
|
|
},
|
|
{
|
|
"access": "public",
|
|
"destination": "1719752929087851944",
|
|
"source": "2024276012622729482",
|
|
"type": "instantiation"
|
|
},
|
|
{
|
|
"access": "public",
|
|
"destination": "1178194542408300737",
|
|
"label": "a",
|
|
"source": "1082111961413727438",
|
|
"type": "association"
|
|
},
|
|
{
|
|
"access": "public",
|
|
"destination": "1373403346245688670",
|
|
"label": "c",
|
|
"source": "1082111961413727438",
|
|
"type": "aggregation"
|
|
},
|
|
{
|
|
"access": "public",
|
|
"destination": "2024276012622729482",
|
|
"label": "d",
|
|
"source": "1082111961413727438",
|
|
"type": "aggregation"
|
|
}
|
|
],
|
|
"using_namespace": "clanguml::t00065"
|
|
}
|
|
```
|