# 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": "2148451609276010605", "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": "743095879760855186", "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": "911510236910860394", "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": "1669283381205253105", "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": "1909240382008619079", "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": "102043386959871430", "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": "2044714081517303079", "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": "877375915521239216", "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": "985421674263139595", "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": "720393008985738554", "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": "1577435969137543418", "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": "1228686762653429102", "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": "1410668113085504962", "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": "2148451609276010605", "participant_id": "2148451609276010605" }, "name": "run()", "return_type": "void", "scope": "normal", "source_location": { "column": 5, "file": "t20039.cc", "line": 33, "translation_unit": "t20039.cc" }, "to": { "activity_id": "743095879760855186", "participant_id": "911510236910860394" }, "type": "message" }, { "from": { "activity_id": "743095879760855186", "participant_id": "911510236910860394" }, "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": "1669283381205253105", "participant_id": "1909240382008619079" }, "type": "message" }, { "from": { "activity_id": "743095879760855186", "participant_id": "911510236910860394" }, "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": "102043386959871430", "participant_id": "2044714081517303079" }, "type": "message" }, { "from": { "activity_id": "743095879760855186", "participant_id": "911510236910860394" }, "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": "877375915521239216", "participant_id": "985421674263139595" }, "type": "message" }, { "from": { "activity_id": "743095879760855186", "participant_id": "911510236910860394" }, "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": "720393008985738554", "participant_id": "1577435969137543418" }, "type": "message" }, { "from": { "activity_id": "743095879760855186", "participant_id": "911510236910860394" }, "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": "1228686762653429102", "participant_id": "1410668113085504962" }, "type": "message" } ], "start_from": { "id": 2148451609276010605, "location": "clanguml::t20039::tmain()" } } ], "using_namespace": "clanguml::t20039" } ```