456 lines
11 KiB
Markdown
456 lines
11 KiB
Markdown
# t00041 - Context diagram filter test
|
|
## Config
|
|
```yaml
|
|
compilation_database_dir: ..
|
|
output_directory: diagrams
|
|
diagrams:
|
|
t00041_class:
|
|
type: class
|
|
generate_packages: false
|
|
glob:
|
|
- ../../tests/t00041/t00041.cc
|
|
using_namespace:
|
|
- clanguml::t00041
|
|
include:
|
|
namespaces:
|
|
- clanguml::t00041
|
|
context:
|
|
- clanguml::t00041::RR
|
|
subclasses:
|
|
- clanguml::t00041::ns1::N
|
|
exclude:
|
|
namespaces:
|
|
- clanguml::t00041::detail
|
|
relationships:
|
|
- dependency
|
|
```
|
|
## Source code
|
|
File t00041.cc
|
|
```cpp
|
|
namespace clanguml::t00041 {
|
|
|
|
struct B { };
|
|
|
|
struct A { };
|
|
|
|
class AA : public A { };
|
|
|
|
struct R { };
|
|
|
|
struct RR;
|
|
|
|
struct D {
|
|
RR *rr;
|
|
};
|
|
|
|
struct E { };
|
|
|
|
struct F { };
|
|
|
|
namespace detail {
|
|
struct G { };
|
|
} // namespace detail
|
|
|
|
struct H { };
|
|
|
|
struct RR : public R {
|
|
E *e;
|
|
F *f;
|
|
detail::G *g;
|
|
|
|
void foo(H *h) { }
|
|
};
|
|
|
|
struct RRR : public RR { };
|
|
|
|
namespace ns1 {
|
|
struct N { };
|
|
|
|
struct NN : public N { };
|
|
|
|
struct NM : public N { };
|
|
}
|
|
|
|
} // namespace clanguml::t00041
|
|
|
|
```
|
|
## Generated PlantUML diagrams
|
|

|
|
## Generated Mermaid diagrams
|
|

|
|
## Generated JSON models
|
|
```json
|
|
{
|
|
"diagram_type": "class",
|
|
"elements": [
|
|
{
|
|
"bases": [],
|
|
"display_name": "clanguml::t00041::R",
|
|
"id": "775317088453163919",
|
|
"is_abstract": false,
|
|
"is_nested": false,
|
|
"is_struct": true,
|
|
"is_template": false,
|
|
"is_union": false,
|
|
"members": [],
|
|
"methods": [],
|
|
"name": "R",
|
|
"namespace": "clanguml::t00041",
|
|
"source_location": {
|
|
"column": 8,
|
|
"file": "../../tests/t00041/t00041.cc",
|
|
"line": 9,
|
|
"translation_unit": "../../tests/t00041/t00041.cc"
|
|
},
|
|
"template_parameters": [],
|
|
"type": "class"
|
|
},
|
|
{
|
|
"bases": [],
|
|
"display_name": "clanguml::t00041::D",
|
|
"id": "1798851434286108347",
|
|
"is_abstract": false,
|
|
"is_nested": false,
|
|
"is_struct": true,
|
|
"is_template": false,
|
|
"is_union": false,
|
|
"members": [
|
|
{
|
|
"access": "public",
|
|
"is_static": false,
|
|
"name": "rr",
|
|
"source_location": {
|
|
"column": 9,
|
|
"file": "../../tests/t00041/t00041.cc",
|
|
"line": 14,
|
|
"translation_unit": "../../tests/t00041/t00041.cc"
|
|
},
|
|
"type": "RR *"
|
|
}
|
|
],
|
|
"methods": [],
|
|
"name": "D",
|
|
"namespace": "clanguml::t00041",
|
|
"source_location": {
|
|
"column": 8,
|
|
"file": "../../tests/t00041/t00041.cc",
|
|
"line": 13,
|
|
"translation_unit": "../../tests/t00041/t00041.cc"
|
|
},
|
|
"template_parameters": [],
|
|
"type": "class"
|
|
},
|
|
{
|
|
"bases": [],
|
|
"display_name": "clanguml::t00041::E",
|
|
"id": "2158730167547707264",
|
|
"is_abstract": false,
|
|
"is_nested": false,
|
|
"is_struct": true,
|
|
"is_template": false,
|
|
"is_union": false,
|
|
"members": [],
|
|
"methods": [],
|
|
"name": "E",
|
|
"namespace": "clanguml::t00041",
|
|
"source_location": {
|
|
"column": 8,
|
|
"file": "../../tests/t00041/t00041.cc",
|
|
"line": 17,
|
|
"translation_unit": "../../tests/t00041/t00041.cc"
|
|
},
|
|
"template_parameters": [],
|
|
"type": "class"
|
|
},
|
|
{
|
|
"bases": [],
|
|
"display_name": "clanguml::t00041::F",
|
|
"id": "430600213408545846",
|
|
"is_abstract": false,
|
|
"is_nested": false,
|
|
"is_struct": true,
|
|
"is_template": false,
|
|
"is_union": false,
|
|
"members": [],
|
|
"methods": [],
|
|
"name": "F",
|
|
"namespace": "clanguml::t00041",
|
|
"source_location": {
|
|
"column": 8,
|
|
"file": "../../tests/t00041/t00041.cc",
|
|
"line": 19,
|
|
"translation_unit": "../../tests/t00041/t00041.cc"
|
|
},
|
|
"template_parameters": [],
|
|
"type": "class"
|
|
},
|
|
{
|
|
"bases": [
|
|
{
|
|
"access": "public",
|
|
"id": "775317088453163919",
|
|
"is_virtual": false,
|
|
"name": "clanguml::t00041::R"
|
|
}
|
|
],
|
|
"display_name": "clanguml::t00041::RR",
|
|
"id": "175608867682236642",
|
|
"is_abstract": false,
|
|
"is_nested": false,
|
|
"is_struct": true,
|
|
"is_template": false,
|
|
"is_union": false,
|
|
"members": [
|
|
{
|
|
"access": "public",
|
|
"is_static": false,
|
|
"name": "e",
|
|
"source_location": {
|
|
"column": 8,
|
|
"file": "../../tests/t00041/t00041.cc",
|
|
"line": 28,
|
|
"translation_unit": "../../tests/t00041/t00041.cc"
|
|
},
|
|
"type": "E *"
|
|
},
|
|
{
|
|
"access": "public",
|
|
"is_static": false,
|
|
"name": "f",
|
|
"source_location": {
|
|
"column": 8,
|
|
"file": "../../tests/t00041/t00041.cc",
|
|
"line": 29,
|
|
"translation_unit": "../../tests/t00041/t00041.cc"
|
|
},
|
|
"type": "F *"
|
|
},
|
|
{
|
|
"access": "public",
|
|
"is_static": false,
|
|
"name": "g",
|
|
"source_location": {
|
|
"column": 16,
|
|
"file": "../../tests/t00041/t00041.cc",
|
|
"line": 30,
|
|
"translation_unit": "../../tests/t00041/t00041.cc"
|
|
},
|
|
"type": "detail::G *"
|
|
}
|
|
],
|
|
"methods": [
|
|
{
|
|
"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": "foo",
|
|
"parameters": [
|
|
{
|
|
"name": "h",
|
|
"type": "H *"
|
|
}
|
|
],
|
|
"source_location": {
|
|
"column": 10,
|
|
"file": "../../tests/t00041/t00041.cc",
|
|
"line": 32,
|
|
"translation_unit": "../../tests/t00041/t00041.cc"
|
|
},
|
|
"type": "void"
|
|
}
|
|
],
|
|
"name": "RR",
|
|
"namespace": "clanguml::t00041",
|
|
"source_location": {
|
|
"column": 8,
|
|
"file": "../../tests/t00041/t00041.cc",
|
|
"line": 27,
|
|
"translation_unit": "../../tests/t00041/t00041.cc"
|
|
},
|
|
"template_parameters": [],
|
|
"type": "class"
|
|
},
|
|
{
|
|
"bases": [
|
|
{
|
|
"access": "public",
|
|
"id": "175608867682236642",
|
|
"is_virtual": false,
|
|
"name": "clanguml::t00041::RR"
|
|
}
|
|
],
|
|
"display_name": "clanguml::t00041::RRR",
|
|
"id": "819254010294444715",
|
|
"is_abstract": false,
|
|
"is_nested": false,
|
|
"is_struct": true,
|
|
"is_template": false,
|
|
"is_union": false,
|
|
"members": [],
|
|
"methods": [],
|
|
"name": "RRR",
|
|
"namespace": "clanguml::t00041",
|
|
"source_location": {
|
|
"column": 8,
|
|
"file": "../../tests/t00041/t00041.cc",
|
|
"line": 35,
|
|
"translation_unit": "../../tests/t00041/t00041.cc"
|
|
},
|
|
"template_parameters": [],
|
|
"type": "class"
|
|
},
|
|
{
|
|
"bases": [],
|
|
"display_name": "clanguml::t00041::ns1::N",
|
|
"id": "220253364661036147",
|
|
"is_abstract": false,
|
|
"is_nested": false,
|
|
"is_struct": true,
|
|
"is_template": false,
|
|
"is_union": false,
|
|
"members": [],
|
|
"methods": [],
|
|
"name": "N",
|
|
"namespace": "clanguml::t00041::ns1",
|
|
"source_location": {
|
|
"column": 8,
|
|
"file": "../../tests/t00041/t00041.cc",
|
|
"line": 38,
|
|
"translation_unit": "../../tests/t00041/t00041.cc"
|
|
},
|
|
"template_parameters": [],
|
|
"type": "class"
|
|
},
|
|
{
|
|
"bases": [
|
|
{
|
|
"access": "public",
|
|
"id": "220253364661036147",
|
|
"is_virtual": false,
|
|
"name": "clanguml::t00041::ns1::N"
|
|
}
|
|
],
|
|
"display_name": "clanguml::t00041::ns1::NN",
|
|
"id": "618038667214398895",
|
|
"is_abstract": false,
|
|
"is_nested": false,
|
|
"is_struct": true,
|
|
"is_template": false,
|
|
"is_union": false,
|
|
"members": [],
|
|
"methods": [],
|
|
"name": "NN",
|
|
"namespace": "clanguml::t00041::ns1",
|
|
"source_location": {
|
|
"column": 8,
|
|
"file": "../../tests/t00041/t00041.cc",
|
|
"line": 40,
|
|
"translation_unit": "../../tests/t00041/t00041.cc"
|
|
},
|
|
"template_parameters": [],
|
|
"type": "class"
|
|
},
|
|
{
|
|
"bases": [
|
|
{
|
|
"access": "public",
|
|
"id": "220253364661036147",
|
|
"is_virtual": false,
|
|
"name": "clanguml::t00041::ns1::N"
|
|
}
|
|
],
|
|
"display_name": "clanguml::t00041::ns1::NM",
|
|
"id": "1206750351408617127",
|
|
"is_abstract": false,
|
|
"is_nested": false,
|
|
"is_struct": true,
|
|
"is_template": false,
|
|
"is_union": false,
|
|
"members": [],
|
|
"methods": [],
|
|
"name": "NM",
|
|
"namespace": "clanguml::t00041::ns1",
|
|
"source_location": {
|
|
"column": 8,
|
|
"file": "../../tests/t00041/t00041.cc",
|
|
"line": 42,
|
|
"translation_unit": "../../tests/t00041/t00041.cc"
|
|
},
|
|
"template_parameters": [],
|
|
"type": "class"
|
|
}
|
|
],
|
|
"metadata": {
|
|
"clang_uml_version": "0.4.0",
|
|
"llvm_version": "Ubuntu clang version 16.0.1 (++20230328073357+42d1b276f779-1~exp1~20230328073502.65)",
|
|
"schema_version": 1
|
|
},
|
|
"name": "t00041_class",
|
|
"relationships": [
|
|
{
|
|
"access": "public",
|
|
"destination": "175608867682236642",
|
|
"label": "rr",
|
|
"source": "1798851434286108347",
|
|
"type": "association"
|
|
},
|
|
{
|
|
"access": "public",
|
|
"destination": "648827958379389524",
|
|
"source": "175608867682236642",
|
|
"type": "dependency"
|
|
},
|
|
{
|
|
"access": "public",
|
|
"destination": "2158730167547707264",
|
|
"label": "e",
|
|
"source": "175608867682236642",
|
|
"type": "association"
|
|
},
|
|
{
|
|
"access": "public",
|
|
"destination": "430600213408545846",
|
|
"label": "f",
|
|
"source": "175608867682236642",
|
|
"type": "association"
|
|
},
|
|
{
|
|
"access": "public",
|
|
"destination": "775317088453163919",
|
|
"source": "175608867682236642",
|
|
"type": "extension"
|
|
},
|
|
{
|
|
"access": "public",
|
|
"destination": "175608867682236642",
|
|
"source": "819254010294444715",
|
|
"type": "extension"
|
|
},
|
|
{
|
|
"access": "public",
|
|
"destination": "220253364661036147",
|
|
"source": "618038667214398895",
|
|
"type": "extension"
|
|
},
|
|
{
|
|
"access": "public",
|
|
"destination": "220253364661036147",
|
|
"source": "1206750351408617127",
|
|
"type": "extension"
|
|
}
|
|
],
|
|
"using_namespace": "clanguml::t00041"
|
|
}
|
|
```
|