3.2 KiB
3.2 KiB
t20022 - Forward class declaration sequence diagram test case
Config
compilation_database_dir: ..
output_directory: puml
diagrams:
t20022_sequence:
type: sequence
glob:
- ../../tests/t20022/t20022.cc
include:
namespaces:
- clanguml::t20022
using_namespace:
- clanguml::t20022
start_from:
- function: "clanguml::t20022::tmain()"
Source code
File t20022.cc
#include <memory>
namespace clanguml {
namespace t20022 {
class B;
class A {
public:
A(std::unique_ptr<B> b);
void a();
std::unique_ptr<B> b_;
};
class B {
public:
void b() { }
};
A::A(std::unique_ptr<B> b)
: b_{std::move(b)}
{
}
void A::a() { b_->b(); }
int tmain()
{
A a{std::make_unique<B>()};
a.a();
return 0;
}
}
}
Generated UML diagrams
Generated JSON models
{
"diagram_type": "sequence",
"name": "t20022_sequence",
"participants": [
{
"id": "1374011101998494743",
"name": "clanguml::t20022::tmain()",
"source_location": {
"file": "../../tests/t20022/t20022.cc",
"line": 28
},
"type": "function"
},
{
"id": "1535467498096081224",
"name": "clanguml::t20022::A",
"source_location": {
"file": "../../tests/t20022/t20022.cc",
"line": 7
},
"type": "class"
},
{
"id": "1316821731069034940",
"name": "clanguml::t20022::B",
"source_location": {
"file": "../../tests/t20022/t20022.cc",
"line": 16
},
"type": "class"
}
],
"sequences": [
{
"messages": [
{
"from": {
"activity_id": "1374011101998494743",
"activity_name": "clanguml::t20022::tmain()",
"participant_id": "1374011101998494743",
"participant_name": "clanguml::t20022::tmain()"
},
"name": "a()",
"return_type": "void",
"scope": "normal",
"source_location": {
"file": "../../tests/t20022/t20022.cc",
"line": 32
},
"to": {
"activity_id": "1158824701633811441",
"activity_name": "clanguml::t20022::A::a()",
"participant_id": "1535467498096081224"
},
"type": "message"
},
{
"from": {
"activity_id": "1158824701633811441",
"activity_name": "clanguml::t20022::A::a()",
"participant_id": "1535467498096081224"
},
"name": "b()",
"return_type": "void",
"scope": "normal",
"source_location": {
"file": "../../tests/t20022/t20022.cc",
"line": 26
},
"to": {
"activity_id": "2114222968575993291",
"activity_name": "clanguml::t20022::B::b()",
"participant_id": "1316821731069034940"
},
"type": "message"
}
],
"start_from": {
"id": 1374011101998494743,
"location": "clanguml::t20022::tmain()"
}
}
],
"using_namespace": "clanguml::t20022"
}