# t20009 - Smart pointer dereference call expression test case ## Config ```yaml compilation_database_dir: .. output_directory: puml diagrams: t20009_sequence: type: sequence glob: - ../../tests/t20009/t20009.cc include: namespaces: - clanguml::t20009 using_namespace: - clanguml::t20009 start_from: - function: "clanguml::t20009::tmain()" ``` ## Source code File t20009.cc ```cpp #include #include namespace clanguml { namespace t20009 { template struct A { void a(T arg) { } }; template struct B { void b(T arg) { a->a(arg); } std::unique_ptr> a; }; using BFloatPtr = std::shared_ptr>; void tmain() { std::shared_ptr> bstring; auto bint = std::make_unique>(); BFloatPtr bfloat; bstring->b("b"); bint.get()->b(42); bfloat->b(1.0); } } } ``` ## Generated UML diagrams ![t20009_sequence](./t20009_sequence.svg "Smart pointer dereference call expression test case") ## Generated JSON models ```json { "diagram_type": "sequence", "metadata": { "clang_uml_version": "0.3.3-24-ge2a6b81", "llvm_version": "Ubuntu clang version 15.0.6", "schema_version": 1 }, "name": "t20009_sequence", "participants": [ { "id": "791066686606379857", "name": "clanguml::t20009::tmain()", "source_location": { "file": "../../tests/t20009/t20009.cc", "line": 18 }, "type": "function" }, { "id": "450813573860627679", "name": "clanguml::t20009::B", "source_location": { "file": "../../tests/t20009/t20009.cc", "line": 10 }, "type": "class" }, { "id": "1197403810800583218", "name": "clanguml::t20009::A", "source_location": { "file": "../../tests/t20009/t20009.cc", "line": 6 }, "type": "class" }, { "id": "2002310682025149090", "name": "clanguml::t20009::B", "source_location": { "file": "../../tests/t20009/t20009.cc", "line": 10 }, "type": "class" }, { "id": "1228498754558363121", "name": "clanguml::t20009::A", "source_location": { "file": "../../tests/t20009/t20009.cc", "line": 6 }, "type": "class" }, { "id": "1461902328659683203", "name": "clanguml::t20009::B", "source_location": { "file": "../../tests/t20009/t20009.cc", "line": 10 }, "type": "class" }, { "id": "1243520246309441967", "name": "clanguml::t20009::A", "source_location": { "file": "../../tests/t20009/t20009.cc", "line": 6 }, "type": "class" } ], "sequences": [ { "messages": [ { "from": { "activity_id": "791066686606379857", "activity_name": "clanguml::t20009::tmain()", "participant_id": "791066686606379857", "participant_name": "clanguml::t20009::tmain()" }, "name": "b(std::string)", "return_type": "void", "scope": "normal", "source_location": { "file": "../../tests/t20009/t20009.cc", "line": 24 }, "to": { "activity_id": "1960266381909090879", "activity_name": "clanguml::t20009::B::b(std::string)", "participant_id": "450813573860627679" }, "type": "message" }, { "from": { "activity_id": "1960266381909090879", "activity_name": "clanguml::t20009::B::b(std::string)", "participant_id": "450813573860627679" }, "name": "a(std::string)", "return_type": "void", "scope": "normal", "source_location": { "file": "../../tests/t20009/t20009.cc", "line": 11 }, "to": { "activity_id": "1716775846967761286", "activity_name": "clanguml::t20009::A::a(std::string)", "participant_id": "1197403810800583218" }, "type": "message" }, { "from": { "activity_id": "791066686606379857", "activity_name": "clanguml::t20009::tmain()", "participant_id": "791066686606379857", "participant_name": "clanguml::t20009::tmain()" }, "name": "b(int)", "return_type": "void", "scope": "normal", "source_location": { "file": "../../tests/t20009/t20009.cc", "line": 25 }, "to": { "activity_id": "660557928399203634", "activity_name": "clanguml::t20009::B::b(int)", "participant_id": "2002310682025149090" }, "type": "message" }, { "from": { "activity_id": "660557928399203634", "activity_name": "clanguml::t20009::B::b(int)", "participant_id": "2002310682025149090" }, "name": "a(int)", "return_type": "void", "scope": "normal", "source_location": { "file": "../../tests/t20009/t20009.cc", "line": 11 }, "to": { "activity_id": "2030629454810805092", "activity_name": "clanguml::t20009::A::a(int)", "participant_id": "1228498754558363121" }, "type": "message" }, { "from": { "activity_id": "791066686606379857", "activity_name": "clanguml::t20009::tmain()", "participant_id": "791066686606379857", "participant_name": "clanguml::t20009::tmain()" }, "name": "b(float)", "return_type": "void", "scope": "normal", "source_location": { "file": "../../tests/t20009/t20009.cc", "line": 26 }, "to": { "activity_id": "367805163135583282", "activity_name": "clanguml::t20009::B::b(float)", "participant_id": "1461902328659683203" }, "type": "message" }, { "from": { "activity_id": "367805163135583282", "activity_name": "clanguml::t20009::B::b(float)", "participant_id": "1461902328659683203" }, "name": "a(float)", "return_type": "void", "scope": "normal", "source_location": { "file": "../../tests/t20009/t20009.cc", "line": 11 }, "to": { "activity_id": "1643733911490581293", "activity_name": "clanguml::t20009::A::a(float)", "participant_id": "1243520246309441967" }, "type": "message" } ], "start_from": { "id": 791066686606379857, "location": "clanguml::t20009::tmain()" } } ], "using_namespace": "clanguml::t20009" } ```