# t20035 - from_to sequence diagram test case with free functions ## Config ```yaml compilation_database_dir: .. output_directory: diagrams diagrams: t20035_sequence: type: sequence glob: - ../../tests/t20035/t20035.cc include: namespaces: - clanguml::t20035 using_namespace: - clanguml::t20035 from_to: - [function: "clanguml::t20035::tmain(int,char **)", function: "clanguml::t20035::c(int)"] ``` ## Source code File t20035.cc ```cpp namespace clanguml { namespace t20035 { int c(int arg) { return arg; } int b1(int arg) { return c(arg); } int b2(int arg) { return c(arg); } int a(int arg) { return b1(arg); } int tmain(int argc, char **argv) { return a(argc); } } } ``` ## Generated PlantUML diagrams ![t20035_sequence](./t20035_sequence.svg "from_to sequence diagram test case with free functions") ## Generated Mermaid diagrams ![t20035_sequence](./t20035_sequence_mermaid.svg "from_to sequence diagram test case with free functions") ## Generated JSON models ```json { "diagram_type": "sequence", "metadata": { "clang_uml_version": "0.4.0", "llvm_version": "Ubuntu clang version 16.0.1 (++20230328073357+42d1b276f779-1~exp1~20230328073502.65)", "schema_version": 1 }, "name": "t20035_sequence", "participants": [ { "id": "1380099746477810520", "name": "clanguml::t20035::tmain(int,char **)", "source_location": { "column": 5, "file": "../../tests/t20035/t20035.cc", "line": 12, "translation_unit": "../../tests/t20035/t20035.cc" }, "type": "function" }, { "id": "1503144831959453736", "name": "clanguml::t20035::a(int)", "source_location": { "column": 5, "file": "../../tests/t20035/t20035.cc", "line": 10, "translation_unit": "../../tests/t20035/t20035.cc" }, "type": "function" }, { "id": "440199113909747659", "name": "clanguml::t20035::b1(int)", "source_location": { "column": 5, "file": "../../tests/t20035/t20035.cc", "line": 6, "translation_unit": "../../tests/t20035/t20035.cc" }, "type": "function" }, { "id": "709102392181022891", "name": "clanguml::t20035::c(int)", "source_location": { "column": 5, "file": "../../tests/t20035/t20035.cc", "line": 4, "translation_unit": "../../tests/t20035/t20035.cc" }, "type": "function" } ], "sequences": [ { "from_to": { "from": { "id": 1380099746477810520, "location": "clanguml::t20035::tmain(int,char **)" }, "to": { "id": 709102392181022891, "location": "clanguml::t20035::c(int)" } }, "message_chains": [ { "messages": [ { "from": { "activity_id": "1380099746477810520", "activity_name": "clanguml::t20035::tmain(int,char **)", "participant_id": "1380099746477810520", "participant_name": "clanguml::t20035::tmain(int,char **)" }, "name": "", "return_type": "int", "scope": "normal", "source_location": { "column": 43, "file": "../../tests/t20035/t20035.cc", "line": 12, "translation_unit": "../../tests/t20035/t20035.cc" }, "to": { "activity_id": "1503144831959453736", "activity_name": "clanguml::t20035::a(int)", "participant_id": "1503144831959453736" }, "type": "message" }, { "from": { "activity_id": "1503144831959453736", "activity_name": "clanguml::t20035::a(int)", "participant_id": "1503144831959453736", "participant_name": "clanguml::t20035::a(int)" }, "name": "", "return_type": "int", "scope": "normal", "source_location": { "column": 25, "file": "../../tests/t20035/t20035.cc", "line": 10, "translation_unit": "../../tests/t20035/t20035.cc" }, "to": { "activity_id": "440199113909747659", "activity_name": "clanguml::t20035::b1(int)", "participant_id": "440199113909747659" }, "type": "message" }, { "from": { "activity_id": "440199113909747659", "activity_name": "clanguml::t20035::b1(int)", "participant_id": "440199113909747659", "participant_name": "clanguml::t20035::b1(int)" }, "name": "", "return_type": "int", "scope": "normal", "source_location": { "column": 26, "file": "../../tests/t20035/t20035.cc", "line": 6, "translation_unit": "../../tests/t20035/t20035.cc" }, "to": { "activity_id": "709102392181022891", "activity_name": "clanguml::t20035::c(int)", "participant_id": "709102392181022891" }, "type": "message" } ] } ] } ], "using_namespace": "clanguml::t20035" } ```