# t20039 - Test case for type aliases config option in sequence diagrams ## Config ```yaml diagrams: t20039_sequence: type: sequence glob: - t20039.cc include: namespaces: - clanguml::t20039 using_namespace: clanguml::t20039 type_aliases: "std::vector": int_vec_t "std::vector": string_vec_t "std::map": int_map_t "std::map": string_map_t from: - function: "clanguml::t20039::tmain()" ``` ## Source code File `tests/t20039/t20039.cc` ```cpp #include #include #include namespace clanguml { namespace t20039 { template struct A { std::vector> a(T p) { return {}; } }; struct R { A a_int; A> a_intvec; A> a_stringvec; A> a_intmap; A> a_stringmap; void run() { a_int.a({}); a_intvec.a({}); a_stringvec.a({}); a_intmap.a({}); a_stringmap.a({}); } }; int tmain() { R r; r.run(); return 0; } } } ``` ## Generated PlantUML diagrams ![t20039_sequence](./t20039_sequence.svg "Test case for type aliases config option in sequence diagrams") ## Generated Mermaid diagrams ![t20039_sequence](./t20039_sequence_mermaid.svg "Test case for type aliases config option in sequence diagrams") ## Generated JSON models ```json { "diagram_type": "sequence", "name": "t20039_sequence", "participants": [ { "display_name": "tmain()", "full_name": "clanguml::t20039::tmain()", "id": "17187612874208084846", "name": "tmain", "namespace": "clanguml::t20039", "source_location": { "column": 5, "file": "t20039.cc", "line": 29, "translation_unit": "t20039.cc" }, "type": "function" }, { "activities": [ { "display_name": "run()", "full_name": "clanguml::t20039::R::run()", "id": "5944767038086841495", "name": "run", "namespace": "", "source_location": { "column": 10, "file": "t20039.cc", "line": 19, "translation_unit": "t20039.cc" }, "type": "method" } ], "display_name": "R", "full_name": "clanguml::t20039::R", "id": "7292081895286883155", "name": "R", "namespace": "clanguml::t20039", "source_location": { "column": 8, "file": "t20039.cc", "line": 12, "translation_unit": "t20039.cc" }, "type": "class" }, { "activities": [ { "display_name": "a(int)", "full_name": "clanguml::t20039::A::a(int)", "id": "13354267049642024843", "name": "a", "namespace": "", "source_location": { "column": 33, "file": "t20039.cc", "line": 9, "translation_unit": "t20039.cc" }, "type": "method" } ], "display_name": "A", "full_name": "clanguml::t20039::A", "id": "15273923056068952633", "name": "A", "namespace": "clanguml::t20039", "source_location": { "column": 30, "file": "t20039.cc", "line": 8, "translation_unit": "t20039.cc" }, "type": "class" }, { "activities": [ { "display_name": "a(int_vec_t)", "full_name": "clanguml::t20039::A::a(int_vec_t)", "id": "816347095678971446", "name": "a", "namespace": "", "source_location": { "column": 33, "file": "t20039.cc", "line": 9, "translation_unit": "t20039.cc" }, "type": "method" } ], "display_name": "A", "full_name": "clanguml::t20039::A", "id": "16357712652138424637", "name": "A", "namespace": "clanguml::t20039", "source_location": { "column": 30, "file": "t20039.cc", "line": 8, "translation_unit": "t20039.cc" }, "type": "class" }, { "activities": [ { "display_name": "a(string_vec_t)", "full_name": "clanguml::t20039::A::a(string_vec_t)", "id": "7019007324169913734", "name": "a", "namespace": "", "source_location": { "column": 33, "file": "t20039.cc", "line": 9, "translation_unit": "t20039.cc" }, "type": "method" } ], "display_name": "A", "full_name": "clanguml::t20039::A", "id": "7883373394105116761", "name": "A", "namespace": "clanguml::t20039", "source_location": { "column": 30, "file": "t20039.cc", "line": 8, "translation_unit": "t20039.cc" }, "type": "class" }, { "activities": [ { "display_name": "a(int_map_t)", "full_name": "clanguml::t20039::A::a(int_map_t)", "id": "5763144071885908438", "name": "a", "namespace": "", "source_location": { "column": 33, "file": "t20039.cc", "line": 9, "translation_unit": "t20039.cc" }, "type": "method" } ], "display_name": "A", "full_name": "clanguml::t20039::A", "id": "12619487753100347345", "name": "A", "namespace": "clanguml::t20039", "source_location": { "column": 30, "file": "t20039.cc", "line": 8, "translation_unit": "t20039.cc" }, "type": "class" }, { "activities": [ { "display_name": "a(string_map_t)", "full_name": "clanguml::t20039::A::a(string_map_t)", "id": "9829494101227432821", "name": "a", "namespace": "", "source_location": { "column": 33, "file": "t20039.cc", "line": 9, "translation_unit": "t20039.cc" }, "type": "method" } ], "display_name": "A", "full_name": "clanguml::t20039::A", "id": "11285344904684039703", "name": "A", "namespace": "clanguml::t20039", "source_location": { "column": 30, "file": "t20039.cc", "line": 8, "translation_unit": "t20039.cc" }, "type": "class" } ], "sequences": [ { "messages": [ { "from": { "activity_id": "17187612874208084846", "participant_id": "17187612874208084846" }, "name": "run()", "return_type": "void", "scope": "normal", "source_location": { "column": 5, "file": "t20039.cc", "line": 33, "translation_unit": "t20039.cc" }, "to": { "activity_id": "5944767038086841495", "participant_id": "7292081895286883155" }, "type": "message" }, { "from": { "activity_id": "5944767038086841495", "participant_id": "7292081895286883155" }, "name": "a(int)", "return_type": "std::vector", "scope": "normal", "source_location": { "column": 9, "file": "t20039.cc", "line": 21, "translation_unit": "t20039.cc" }, "to": { "activity_id": "13354267049642024843", "participant_id": "15273923056068952633" }, "type": "message" }, { "from": { "activity_id": "5944767038086841495", "participant_id": "7292081895286883155" }, "name": "a(int_vec_t)", "return_type": "std::vector>>>", "scope": "normal", "source_location": { "column": 9, "file": "t20039.cc", "line": 22, "translation_unit": "t20039.cc" }, "to": { "activity_id": "816347095678971446", "participant_id": "16357712652138424637" }, "type": "message" }, { "from": { "activity_id": "5944767038086841495", "participant_id": "7292081895286883155" }, "name": "a(string_vec_t)", "return_type": "std::vector,allocator>,allocator,allocator>>>>>", "scope": "normal", "source_location": { "column": 9, "file": "t20039.cc", "line": 23, "translation_unit": "t20039.cc" }, "to": { "activity_id": "7019007324169913734", "participant_id": "7883373394105116761" }, "type": "message" }, { "from": { "activity_id": "5944767038086841495", "participant_id": "7292081895286883155" }, "name": "a(int_map_t)", "return_type": "std::vector,allocator>>>>", "scope": "normal", "source_location": { "column": 9, "file": "t20039.cc", "line": 24, "translation_unit": "t20039.cc" }, "to": { "activity_id": "5763144071885908438", "participant_id": "12619487753100347345" }, "type": "message" }, { "from": { "activity_id": "5944767038086841495", "participant_id": "7292081895286883155" }, "name": "a(string_map_t)", "return_type": "std::vector,allocator>,basic_string,allocator>,less,allocator>>,allocator,allocator>,basic_string,allocator>>>>>>", "scope": "normal", "source_location": { "column": 9, "file": "t20039.cc", "line": 25, "translation_unit": "t20039.cc" }, "to": { "activity_id": "9829494101227432821", "participant_id": "11285344904684039703" }, "type": "message" } ], "start_from": { "id": "17187612874208084846", "location": "clanguml::t20039::tmain()" } } ], "using_namespace": "clanguml::t20039" } ```