Files
clang-uml/docs/test_cases/t30006.md
2023-08-31 23:43:57 +02:00

151 lines
3.3 KiB
Markdown

# t30006 - Package split namespace test case
## Config
```yaml
compilation_database_dir: ..
output_directory: puml
diagrams:
t30006_package:
type: package
glob:
- ../../tests/t30006/t30006.cc
include:
namespaces:
- clanguml::t30006
using_namespace:
- clanguml::t30006
plantuml:
before:
- "' t30006 test package diagram"
```
## Source code
File t30006.cc
```cpp
namespace clanguml {
namespace t30006 {
namespace B {
struct BB { };
}
/// \uml{note[top] Top A note.}
namespace A {
struct A1 {
B::BB *b;
};
}
namespace C {
struct CC { };
}
/// \uml{note[bottom] Bottom A note.}
namespace A {
struct A2 {
C::CC *c;
};
}
}
}
```
## Generated UML diagrams
![t30006_package](./t30006_package.svg "Package split namespace test case")
## Generated JSON models
```json
{
"diagram_type": "package",
"elements": [
{
"display_name": "clanguml",
"elements": [
{
"display_name": "clanguml::t30006",
"id": "1391231216610531704",
"is_deprecated": false,
"name": "t30006",
"source_location": {
"column": 11,
"file": "../../tests/t30006/t30006.cc",
"line": 2,
"translation_unit": "../../tests/t30006/t30006.cc"
},
"type": "namespace"
}
],
"id": "2174271399507040339",
"is_deprecated": false,
"name": "clanguml",
"source_location": {
"column": 11,
"file": "../../tests/t30006/t30006.cc",
"line": 1,
"translation_unit": "../../tests/t30006/t30006.cc"
},
"type": "namespace"
},
{
"display_name": "clanguml::t30006::B",
"id": "1659090172211944144",
"is_deprecated": false,
"name": "B",
"source_location": {
"column": 11,
"file": "../../tests/t30006/t30006.cc",
"line": 4,
"translation_unit": "../../tests/t30006/t30006.cc"
},
"type": "namespace"
},
{
"comment": {
"formatted": "\\uml{note[top] Top A note.}",
"raw": "/// \\uml{note[top] Top A note.}"
},
"display_name": "clanguml::t30006::A",
"id": "1499919423527579699",
"is_deprecated": false,
"name": "A",
"source_location": {
"column": 11,
"file": "../../tests/t30006/t30006.cc",
"line": 9,
"translation_unit": "../../tests/t30006/t30006.cc"
},
"type": "namespace"
},
{
"display_name": "clanguml::t30006::C",
"id": "1380567463986115369",
"is_deprecated": false,
"name": "C",
"source_location": {
"column": 11,
"file": "../../tests/t30006/t30006.cc",
"line": 15,
"translation_unit": "../../tests/t30006/t30006.cc"
},
"type": "namespace"
}
],
"metadata": {
"clang_uml_version": "0.3.8-32-ge830195",
"llvm_version": "Ubuntu clang version 15.0.7",
"schema_version": 1
},
"name": "t30006_package",
"relationships": [
{
"destination": "1659090172211944144",
"source": "1499919423527579699",
"type": "dependency"
},
{
"destination": "1380567463986115369",
"source": "1499919423527579699",
"type": "dependency"
}
],
"using_namespace": "clanguml::t30006"
}
```