174 lines
4.0 KiB
Markdown
174 lines
4.0 KiB
Markdown
# t20002 - Free function sequence diagram test case
|
|
## Config
|
|
```yaml
|
|
diagrams:
|
|
t20002_sequence:
|
|
type: sequence
|
|
glob:
|
|
- t20002.cc
|
|
include:
|
|
namespaces:
|
|
- clanguml::t20002
|
|
using_namespace: clanguml::t20002
|
|
from:
|
|
- function: "clanguml::t20002::m1()"
|
|
|
|
```
|
|
## Source code
|
|
File `tests/t20002/t20002.cc`
|
|
```cpp
|
|
#include <algorithm>
|
|
#include <numeric>
|
|
#include <vector>
|
|
|
|
namespace clanguml {
|
|
namespace t20002 {
|
|
|
|
void m4() { }
|
|
|
|
void m3() { m4(); }
|
|
|
|
void m2() { m3(); }
|
|
|
|
void m1() { m2(); }
|
|
}
|
|
}
|
|
|
|
```
|
|
## Generated PlantUML diagrams
|
|

|
|
## Generated Mermaid diagrams
|
|

|
|
## Generated JSON models
|
|
```json
|
|
{
|
|
"diagram_type": "sequence",
|
|
"name": "t20002_sequence",
|
|
"participants": [
|
|
{
|
|
"display_name": "m1()",
|
|
"id": "1619421429271064154",
|
|
"name": "m1",
|
|
"namespace": "clanguml::t20002",
|
|
"source_location": {
|
|
"column": 6,
|
|
"file": "t20002.cc",
|
|
"line": 14,
|
|
"translation_unit": "t20002.cc"
|
|
},
|
|
"type": "function"
|
|
},
|
|
{
|
|
"display_name": "m2()",
|
|
"id": "1575240232156112674",
|
|
"name": "m2",
|
|
"namespace": "clanguml::t20002",
|
|
"source_location": {
|
|
"column": 6,
|
|
"file": "t20002.cc",
|
|
"line": 12,
|
|
"translation_unit": "t20002.cc"
|
|
},
|
|
"type": "function"
|
|
},
|
|
{
|
|
"display_name": "m3()",
|
|
"id": "1838809176089209580",
|
|
"name": "m3",
|
|
"namespace": "clanguml::t20002",
|
|
"source_location": {
|
|
"column": 6,
|
|
"file": "t20002.cc",
|
|
"line": 10,
|
|
"translation_unit": "t20002.cc"
|
|
},
|
|
"type": "function"
|
|
},
|
|
{
|
|
"display_name": "m4()",
|
|
"id": "63715062711218534",
|
|
"name": "m4",
|
|
"namespace": "clanguml::t20002",
|
|
"source_location": {
|
|
"column": 6,
|
|
"file": "t20002.cc",
|
|
"line": 8,
|
|
"translation_unit": "t20002.cc"
|
|
},
|
|
"type": "function"
|
|
}
|
|
],
|
|
"sequences": [
|
|
{
|
|
"messages": [
|
|
{
|
|
"from": {
|
|
"activity_id": "1619421429271064154",
|
|
"participant_id": "1619421429271064154"
|
|
},
|
|
"name": "",
|
|
"return_type": "void",
|
|
"scope": "normal",
|
|
"source_location": {
|
|
"column": 13,
|
|
"file": "t20002.cc",
|
|
"line": 14,
|
|
"translation_unit": "t20002.cc"
|
|
},
|
|
"to": {
|
|
"activity_id": "1575240232156112674",
|
|
"participant_id": "1575240232156112674"
|
|
},
|
|
"type": "message"
|
|
},
|
|
{
|
|
"from": {
|
|
"activity_id": "1575240232156112674",
|
|
"participant_id": "1575240232156112674"
|
|
},
|
|
"name": "",
|
|
"return_type": "void",
|
|
"scope": "normal",
|
|
"source_location": {
|
|
"column": 13,
|
|
"file": "t20002.cc",
|
|
"line": 12,
|
|
"translation_unit": "t20002.cc"
|
|
},
|
|
"to": {
|
|
"activity_id": "1838809176089209580",
|
|
"participant_id": "1838809176089209580"
|
|
},
|
|
"type": "message"
|
|
},
|
|
{
|
|
"from": {
|
|
"activity_id": "1838809176089209580",
|
|
"participant_id": "1838809176089209580"
|
|
},
|
|
"name": "",
|
|
"return_type": "void",
|
|
"scope": "normal",
|
|
"source_location": {
|
|
"column": 13,
|
|
"file": "t20002.cc",
|
|
"line": 10,
|
|
"translation_unit": "t20002.cc"
|
|
},
|
|
"to": {
|
|
"activity_id": "63715062711218534",
|
|
"participant_id": "63715062711218534"
|
|
},
|
|
"type": "message"
|
|
}
|
|
],
|
|
"start_from": {
|
|
"id": 1619421429271064154,
|
|
"location": "clanguml::t20002::m1()"
|
|
}
|
|
}
|
|
],
|
|
"using_namespace": "clanguml::t20002"
|
|
}
|
|
```
|