Files
clang-uml/docs/test_cases/t20027.md
Bartek Kryza 3e97a37c5f Updated docs
2023-05-28 19:08:10 +02:00

113 lines
2.3 KiB
Markdown

# t20027 - Filter call expressions based on access test case
## Config
```yaml
compilation_database_dir: ..
output_directory: puml
diagrams:
t20027_sequence:
type: sequence
glob:
- ../../tests/t20027/t20027.cc
include:
namespaces:
- clanguml::t20027
access:
- public
using_namespace:
- clanguml::t20027
start_from:
- function: "clanguml::t20027::tmain()"
```
## Source code
File t20027.cc
```cpp
namespace clanguml {
namespace t20027 {
class A {
public:
void a() { aa(); }
protected:
void aa() { aaa(); }
private:
void aaa() { }
};
void tmain()
{
A a;
a.a();
}
}
}
```
## Generated UML diagrams
![t20027_sequence](./t20027_sequence.svg "Filter call expressions based on access test case")
## Generated JSON models
```json
{
"diagram_type": "sequence",
"metadata": {
"clang_uml_version": "0.3.5-27-g81c7ce7",
"llvm_version": "Ubuntu clang version 15.0.6",
"schema_version": 1
},
"name": "t20027_sequence",
"participants": [
{
"id": "1581009482994430286",
"name": "clanguml::t20027::tmain()",
"source_location": {
"file": "../../tests/t20027/t20027.cc",
"line": 15
},
"type": "function"
},
{
"id": "583525629936262089",
"name": "clanguml::t20027::A",
"source_location": {
"file": "../../tests/t20027/t20027.cc",
"line": 4
},
"type": "class"
}
],
"sequences": [
{
"messages": [
{
"from": {
"activity_id": "1581009482994430286",
"activity_name": "clanguml::t20027::tmain()",
"participant_id": "1581009482994430286",
"participant_name": "clanguml::t20027::tmain()"
},
"name": "a()",
"return_type": "void",
"scope": "normal",
"source_location": {
"file": "../../tests/t20027/t20027.cc",
"line": 19
},
"to": {
"activity_id": "910514967786202717",
"activity_name": "clanguml::t20027::A::a()",
"participant_id": "583525629936262089"
},
"type": "message"
}
],
"start_from": {
"id": 1581009482994430286,
"location": "clanguml::t20027::tmain()"
}
}
],
"using_namespace": "clanguml::t20027"
}
```