2.8 KiB
2.8 KiB
t20026 - Virtual method call sequence diagram test case
Config
compilation_database_dir: ..
output_directory: diagrams
diagrams:
t20026_sequence:
type: sequence
glob:
- ../../tests/t20026/t20026.cc
include:
namespaces:
- clanguml::t20026
using_namespace:
- clanguml::t20026
from:
- function: "clanguml::t20026::tmain()"
Source code
File t20026.cc
namespace clanguml {
namespace t20026 {
struct A {
virtual void a() { }
};
struct B : public A {
void a() override { }
};
struct C : public B {
void a() override { }
};
int tmain()
{
C *a{};
dynamic_cast<A *>(a)->a();
return 0;
}
}
}
Generated PlantUML diagrams
Generated Mermaid diagrams
Generated JSON models
{
"diagram_type": "sequence",
"metadata": {
"clang_uml_version": "0.3.9-11-g4a19c8b",
"llvm_version": "Ubuntu clang version 16.0.1 (++20230328073357+42d1b276f779-1~exp1~20230328073502.65)",
"schema_version": 1
},
"name": "t20026_sequence",
"participants": [
{
"id": "2268697350307997040",
"name": "clanguml::t20026::tmain()",
"source_location": {
"column": 5,
"file": "../../tests/t20026/t20026.cc",
"line": 16,
"translation_unit": "../../tests/t20026/t20026.cc"
},
"type": "function"
},
{
"id": "1962121823853291899",
"name": "clanguml::t20026::A",
"source_location": {
"column": 8,
"file": "../../tests/t20026/t20026.cc",
"line": 4,
"translation_unit": "../../tests/t20026/t20026.cc"
},
"type": "class"
}
],
"sequences": [
{
"messages": [
{
"from": {
"activity_id": "2268697350307997040",
"activity_name": "clanguml::t20026::tmain()",
"participant_id": "2268697350307997040",
"participant_name": "clanguml::t20026::tmain()"
},
"name": "a()",
"return_type": "void",
"scope": "normal",
"source_location": {
"column": 5,
"file": "../../tests/t20026/t20026.cc",
"line": 20,
"translation_unit": "../../tests/t20026/t20026.cc"
},
"to": {
"activity_id": "600590770418147864",
"activity_name": "clanguml::t20026::A::a()",
"participant_id": "1962121823853291899"
},
"type": "message"
}
],
"start_from": {
"id": 2268697350307997040,
"location": "clanguml::t20026::tmain()"
}
}
],
"using_namespace": "clanguml::t20026"
}