138 lines
3.1 KiB
Markdown
138 lines
3.1 KiB
Markdown
# t20005 - Class template basic sequence diagram
|
|
## Config
|
|
```yaml
|
|
compilation_database_dir: ..
|
|
output_directory: puml
|
|
diagrams:
|
|
t20005_sequence:
|
|
type: sequence
|
|
glob:
|
|
- ../../tests/t20005/t20005.cc
|
|
include:
|
|
namespaces:
|
|
- clanguml::t20005
|
|
using_namespace:
|
|
- clanguml::t20005
|
|
start_from:
|
|
- function: "clanguml::t20005::C<T>::c(T)"
|
|
```
|
|
## Source code
|
|
File t20005.cc
|
|
```cpp
|
|
namespace clanguml {
|
|
namespace t20005 {
|
|
|
|
template <typename T> struct A {
|
|
T a(T arg) { return arg; }
|
|
};
|
|
|
|
template <typename T> struct B {
|
|
T b(T arg) { return a_.a(arg); }
|
|
|
|
A<T> a_;
|
|
};
|
|
|
|
template <typename T> struct C {
|
|
T c(T arg) { return b_.b(arg); }
|
|
|
|
B<T> b_;
|
|
};
|
|
|
|
}
|
|
}
|
|
```
|
|
## Generated UML diagrams
|
|

|
|
## Generated JSON models
|
|
```json
|
|
{
|
|
"diagram_type": "sequence",
|
|
"metadata": {
|
|
"clang_uml_version": "0.3.5-13-g57aa174",
|
|
"llvm_version": "Ubuntu clang version 15.0.6",
|
|
"schema_version": 1
|
|
},
|
|
"name": "t20005_sequence",
|
|
"participants": [
|
|
{
|
|
"id": "365569130532127604",
|
|
"name": "clanguml::t20005::C<T>",
|
|
"source_location": {
|
|
"file": "../../tests/t20005/t20005.cc",
|
|
"line": 14
|
|
},
|
|
"type": "class"
|
|
},
|
|
{
|
|
"id": "666000829532846850",
|
|
"name": "clanguml::t20005::B<T>",
|
|
"source_location": {
|
|
"file": "../../tests/t20005/t20005.cc",
|
|
"line": 8
|
|
},
|
|
"type": "class"
|
|
},
|
|
{
|
|
"id": "1278330455625941185",
|
|
"name": "clanguml::t20005::A<T>",
|
|
"source_location": {
|
|
"file": "../../tests/t20005/t20005.cc",
|
|
"line": 4
|
|
},
|
|
"type": "class"
|
|
}
|
|
],
|
|
"sequences": [
|
|
{
|
|
"messages": [
|
|
{
|
|
"from": {
|
|
"activity_id": "578718872965404973",
|
|
"activity_name": "clanguml::t20005::C<T>::c(T)",
|
|
"participant_id": "365569130532127604"
|
|
},
|
|
"name": "b(T)",
|
|
"return_type": "",
|
|
"scope": "normal",
|
|
"source_location": {
|
|
"file": "../../tests/t20005/t20005.cc",
|
|
"line": 15
|
|
},
|
|
"to": {
|
|
"activity_id": "870466496899932117",
|
|
"activity_name": "clanguml::t20005::B<T>::b(T)",
|
|
"participant_id": "666000829532846850"
|
|
},
|
|
"type": "message"
|
|
},
|
|
{
|
|
"from": {
|
|
"activity_id": "870466496899932117",
|
|
"activity_name": "clanguml::t20005::B<T>::b(T)",
|
|
"participant_id": "666000829532846850"
|
|
},
|
|
"name": "a(T)",
|
|
"return_type": "",
|
|
"scope": "normal",
|
|
"source_location": {
|
|
"file": "../../tests/t20005/t20005.cc",
|
|
"line": 9
|
|
},
|
|
"to": {
|
|
"activity_id": "124853455814403745",
|
|
"activity_name": "clanguml::t20005::A<T>::a(T)",
|
|
"participant_id": "1278330455625941185"
|
|
},
|
|
"type": "message"
|
|
}
|
|
],
|
|
"start_from": {
|
|
"id": 578718872965404973,
|
|
"location": "clanguml::t20005::C<T>::c(T)"
|
|
}
|
|
}
|
|
],
|
|
"using_namespace": "clanguml::t20005"
|
|
}
|
|
```
|