# t20010 - Container sequence diagram test case ## Config ```yaml compilation_database_dir: .. output_directory: diagrams diagrams: t20010_sequence: type: sequence glob: - ../../tests/t20010/t20010.cc include: namespaces: - clanguml::t20010 using_namespace: - clanguml::t20010 from: - function: "clanguml::t20010::tmain()" ``` ## Source code File t20010.cc ```cpp #include #include #include #include namespace clanguml { namespace t20010 { struct A { void a1() { } void a2() { } void a3() { } void a4() { } }; template struct B { void b1() { a_.a1(); } void b2() { avector_.front().a2(); } void b3() { aptrvector_.front()->a3(); } void b4() { amap_.at(0).a4(); } A a_; std::vector avector_; std::vector> aptrvector_; std::map amap_; }; void tmain() { B b; b.b1(); b.b2(); b.b3(); b.b4(); } } } ``` ## Generated PlantUML diagrams ![t20010_sequence](./t20010_sequence.svg "Container sequence diagram test case") ## Generated Mermaid diagrams ![t20010_sequence](./t20010_sequence_mermaid.svg "Container sequence diagram test case") ## Generated JSON models ```json { "diagram_type": "sequence", "metadata": { "clang_uml_version": "0.4.0-28-g03ac212", "llvm_version": "Ubuntu clang version 16.0.6 (++20230710042027+7cbf1a259152-1~exp1~20230710162048.105)", "schema_version": 1 }, "name": "t20010_sequence", "participants": [ { "id": "1364660609791735244", "name": "clanguml::t20010::tmain()", "source_location": { "column": 6, "file": "../../tests/t20010/t20010.cc", "line": 28, "translation_unit": "../../tests/t20010/t20010.cc" }, "type": "function" }, { "id": "2154977200904210115", "name": "clanguml::t20010::B", "source_location": { "column": 30, "file": "../../tests/t20010/t20010.cc", "line": 16, "translation_unit": "../../tests/t20010/t20010.cc" }, "type": "class" }, { "id": "102070351492425113", "name": "clanguml::t20010::A", "source_location": { "column": 8, "file": "../../tests/t20010/t20010.cc", "line": 9, "translation_unit": "../../tests/t20010/t20010.cc" }, "type": "class" } ], "sequences": [ { "messages": [ { "from": { "activity_id": "1364660609791735244", "activity_name": "clanguml::t20010::tmain()", "participant_id": "1364660609791735244", "participant_name": "clanguml::t20010::tmain()" }, "name": "b1()", "return_type": "void", "scope": "normal", "source_location": { "column": 5, "file": "../../tests/t20010/t20010.cc", "line": 32, "translation_unit": "../../tests/t20010/t20010.cc" }, "to": { "activity_id": "343626060927491836", "activity_name": "clanguml::t20010::B::b1()", "participant_id": "2154977200904210115" }, "type": "message" }, { "from": { "activity_id": "343626060927491836", "activity_name": "clanguml::t20010::B::b1()", "participant_id": "2154977200904210115" }, "name": "a1()", "return_type": "void", "scope": "normal", "source_location": { "column": 17, "file": "../../tests/t20010/t20010.cc", "line": 17, "translation_unit": "../../tests/t20010/t20010.cc" }, "to": { "activity_id": "981184681827469850", "activity_name": "clanguml::t20010::A::a1()", "participant_id": "102070351492425113" }, "type": "message" }, { "from": { "activity_id": "1364660609791735244", "activity_name": "clanguml::t20010::tmain()", "participant_id": "1364660609791735244", "participant_name": "clanguml::t20010::tmain()" }, "name": "b2()", "return_type": "void", "scope": "normal", "source_location": { "column": 5, "file": "../../tests/t20010/t20010.cc", "line": 33, "translation_unit": "../../tests/t20010/t20010.cc" }, "to": { "activity_id": "1633031113603062043", "activity_name": "clanguml::t20010::B::b2()", "participant_id": "2154977200904210115" }, "type": "message" }, { "from": { "activity_id": "1633031113603062043", "activity_name": "clanguml::t20010::B::b2()", "participant_id": "2154977200904210115" }, "name": "a2()", "return_type": "void", "scope": "normal", "source_location": { "column": 17, "file": "../../tests/t20010/t20010.cc", "line": 18, "translation_unit": "../../tests/t20010/t20010.cc" }, "to": { "activity_id": "664370880632146592", "activity_name": "clanguml::t20010::A::a2()", "participant_id": "102070351492425113" }, "type": "message" }, { "from": { "activity_id": "1364660609791735244", "activity_name": "clanguml::t20010::tmain()", "participant_id": "1364660609791735244", "participant_name": "clanguml::t20010::tmain()" }, "name": "b3()", "return_type": "void", "scope": "normal", "source_location": { "column": 5, "file": "../../tests/t20010/t20010.cc", "line": 34, "translation_unit": "../../tests/t20010/t20010.cc" }, "to": { "activity_id": "786218543654309692", "activity_name": "clanguml::t20010::B::b3()", "participant_id": "2154977200904210115" }, "type": "message" }, { "from": { "activity_id": "786218543654309692", "activity_name": "clanguml::t20010::B::b3()", "participant_id": "2154977200904210115" }, "name": "a3()", "return_type": "void", "scope": "normal", "source_location": { "column": 17, "file": "../../tests/t20010/t20010.cc", "line": 19, "translation_unit": "../../tests/t20010/t20010.cc" }, "to": { "activity_id": "2145739294823015899", "activity_name": "clanguml::t20010::A::a3()", "participant_id": "102070351492425113" }, "type": "message" }, { "from": { "activity_id": "1364660609791735244", "activity_name": "clanguml::t20010::tmain()", "participant_id": "1364660609791735244", "participant_name": "clanguml::t20010::tmain()" }, "name": "b4()", "return_type": "void", "scope": "normal", "source_location": { "column": 5, "file": "../../tests/t20010/t20010.cc", "line": 35, "translation_unit": "../../tests/t20010/t20010.cc" }, "to": { "activity_id": "1866068965397702666", "activity_name": "clanguml::t20010::B::b4()", "participant_id": "2154977200904210115" }, "type": "message" }, { "from": { "activity_id": "1866068965397702666", "activity_name": "clanguml::t20010::B::b4()", "participant_id": "2154977200904210115" }, "name": "a4()", "return_type": "void", "scope": "normal", "source_location": { "column": 17, "file": "../../tests/t20010/t20010.cc", "line": 20, "translation_unit": "../../tests/t20010/t20010.cc" }, "to": { "activity_id": "1224936485834400821", "activity_name": "clanguml::t20010::A::a4()", "participant_id": "102070351492425113" }, "type": "message" } ], "start_from": { "id": 1364660609791735244, "location": "clanguml::t20010::tmain()" } } ], "using_namespace": "clanguml::t20010" } ```