145 lines
3.0 KiB
Markdown
145 lines
3.0 KiB
Markdown
# t30007 - Package diagram layout hints test case
|
|
## Config
|
|
```yaml
|
|
diagrams:
|
|
t30007_package:
|
|
type: package
|
|
glob:
|
|
- t30007.cc
|
|
include:
|
|
namespaces:
|
|
- clanguml::t30007
|
|
using_namespace: clanguml::t30007
|
|
layout:
|
|
C:
|
|
- up: 'A::AA'
|
|
- left: B
|
|
plantuml:
|
|
before:
|
|
- "' t30007 test package diagram"
|
|
```
|
|
## Source code
|
|
File `tests/t30007/t30007.cc`
|
|
```cpp
|
|
namespace clanguml {
|
|
namespace t30007 {
|
|
|
|
namespace B {
|
|
struct BB { };
|
|
}
|
|
|
|
/// \uml{note[top] Compare layout with t30006.}
|
|
namespace A {
|
|
namespace AA {
|
|
struct A1 {
|
|
B::BB *b;
|
|
};
|
|
}
|
|
}
|
|
|
|
namespace C {
|
|
struct CC { };
|
|
}
|
|
|
|
/// \uml{note[bottom] Bottom A note.}
|
|
namespace A {
|
|
namespace AA {
|
|
struct A2 {
|
|
C::CC *c;
|
|
};
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|
|
```
|
|
## Generated PlantUML diagrams
|
|

|
|
## Generated Mermaid diagrams
|
|

|
|
## Generated JSON models
|
|
```json
|
|
{
|
|
"diagram_type": "package",
|
|
"elements": [
|
|
{
|
|
"display_name": "B",
|
|
"id": "1852704221005355550",
|
|
"is_deprecated": false,
|
|
"name": "B",
|
|
"namespace": "clanguml::t30007",
|
|
"source_location": {
|
|
"column": 11,
|
|
"file": "t30007.cc",
|
|
"line": 4,
|
|
"translation_unit": "t30007.cc"
|
|
},
|
|
"type": "namespace"
|
|
},
|
|
{
|
|
"comment": {
|
|
"formatted": "\\uml{note[top] Compare layout with t30006.}",
|
|
"raw": "/// \\uml{note[top] Compare layout with t30006.}"
|
|
},
|
|
"display_name": "A",
|
|
"elements": [
|
|
{
|
|
"display_name": "AA",
|
|
"id": "357722505818238170",
|
|
"is_deprecated": false,
|
|
"name": "AA",
|
|
"namespace": "clanguml::t30007::A",
|
|
"source_location": {
|
|
"column": 11,
|
|
"file": "t30007.cc",
|
|
"line": 10,
|
|
"translation_unit": "t30007.cc"
|
|
},
|
|
"type": "namespace"
|
|
}
|
|
],
|
|
"id": "870874615388866345",
|
|
"is_deprecated": false,
|
|
"name": "A",
|
|
"namespace": "clanguml::t30007",
|
|
"source_location": {
|
|
"column": 11,
|
|
"file": "t30007.cc",
|
|
"line": 9,
|
|
"translation_unit": "t30007.cc"
|
|
},
|
|
"type": "namespace"
|
|
},
|
|
{
|
|
"display_name": "C",
|
|
"id": "937791537887318363",
|
|
"is_deprecated": false,
|
|
"name": "C",
|
|
"namespace": "clanguml::t30007",
|
|
"source_location": {
|
|
"column": 11,
|
|
"file": "t30007.cc",
|
|
"line": 17,
|
|
"translation_unit": "t30007.cc"
|
|
},
|
|
"type": "namespace"
|
|
}
|
|
],
|
|
"name": "t30007_package",
|
|
"package_type": "namespace",
|
|
"relationships": [
|
|
{
|
|
"destination": "1852704221005355550",
|
|
"source": "357722505818238170",
|
|
"type": "dependency"
|
|
},
|
|
{
|
|
"destination": "937791537887318363",
|
|
"source": "357722505818238170",
|
|
"type": "dependency"
|
|
}
|
|
],
|
|
"using_namespace": "clanguml::t30007"
|
|
}
|
|
```
|