# t30002 - Package dependency test case ## Config ```yaml compilation_database_dir: .. output_directory: puml diagrams: t30002_package: type: package glob: - ../../tests/t30002/t30002.cc include: namespaces: - clanguml::t30002 exclude: namespaces: - clanguml::t30002::detail using_namespace: - clanguml::t30002 plantuml: before: - "' t30002 test package diagram" ``` ## Source code File t30002.cc ```cpp #include #include #include #include #include namespace clanguml { namespace t30002 { namespace A::AA { namespace A1 { struct CA { }; } namespace A2 { template struct CB { T cb; }; } namespace A3 { struct CC { }; } namespace A4 { struct CD { }; } namespace A5 { struct CE { }; } namespace A6 { struct CF { }; } namespace A7 { struct CG { }; } namespace A8 { struct CH { }; } namespace A9 { struct CI { }; } namespace A10 { struct CJ { }; } namespace A11 { struct CK { }; } namespace A12 { struct CL { }; } namespace A13 { struct CM { }; } namespace A14 { struct CN { }; } namespace A15 { struct CO { }; } namespace A16 { struct CP { }; } namespace A17 { struct CR { }; } namespace A18 { enum class S { s1, s2, s3 }; } } namespace B::BB::BBB { class CBA : public A::AA::A6::CF { public: A::AA::A1::CA *ca_; A::AA::A2::CB cb_; std::shared_ptr cc_; std::map> *cd_; std::array co_; static A::AA::A16::CP *cp_; CBA() = default; CBA(A::AA::A14::CN *cn) { } friend A::AA::A17::CR; template CBA(std::tuple &items) { } void ce(const std::vector /*ce_*/) { } std::shared_ptr cg() { return {}; } template void ch(std::map> &ch_) { } template std::map> ci(T * /*t*/) { return {}; } A::AA::A18::S s; }; void cj(std::unique_ptr /*cj_*/) { } std::unique_ptr ck() { return {}; } template void cl(std::map> & /*ch_*/) { } template std::map> cm() { return {}; } } } // namespace t30002 } // namespace clanguml ``` ## Generated UML diagrams ![t30002_package](./t30002_package.svg "Package dependency test case") ## Generated JSON models ```json { "diagram_type": "package", "elements": [ { "display_name": "clanguml::t30002::A", "elements": [ { "display_name": "clanguml::t30002::A::AA", "elements": [ { "display_name": "clanguml::t30002::A::AA::A1", "id": "1164966689017271053", "is_deprecated": false, "name": "A1", "source_location": { "column": 11, "file": "../../tests/t30002/t30002.cc", "line": 10, "translation_unit": "../../tests/t30002/t30002.cc" }, "type": "namespace" }, { "display_name": "clanguml::t30002::A::AA::A2", "id": "695366113361481509", "is_deprecated": false, "name": "A2", "source_location": { "column": 11, "file": "../../tests/t30002/t30002.cc", "line": 13, "translation_unit": "../../tests/t30002/t30002.cc" }, "type": "namespace" }, { "display_name": "clanguml::t30002::A::AA::A3", "id": "1267709074800873528", "is_deprecated": false, "name": "A3", "source_location": { "column": 11, "file": "../../tests/t30002/t30002.cc", "line": 18, "translation_unit": "../../tests/t30002/t30002.cc" }, "type": "namespace" }, { "display_name": "clanguml::t30002::A::AA::A4", "id": "299262817531370604", "is_deprecated": false, "name": "A4", "source_location": { "column": 11, "file": "../../tests/t30002/t30002.cc", "line": 21, "translation_unit": "../../tests/t30002/t30002.cc" }, "type": "namespace" }, { "display_name": "clanguml::t30002::A::AA::A5", "id": "1207764290216680521", "is_deprecated": false, "name": "A5", "source_location": { "column": 11, "file": "../../tests/t30002/t30002.cc", "line": 24, "translation_unit": "../../tests/t30002/t30002.cc" }, "type": "namespace" }, { "display_name": "clanguml::t30002::A::AA::A6", "id": "899091126727901939", "is_deprecated": false, "name": "A6", "source_location": { "column": 11, "file": "../../tests/t30002/t30002.cc", "line": 27, "translation_unit": "../../tests/t30002/t30002.cc" }, "type": "namespace" }, { "display_name": "clanguml::t30002::A::AA::A7", "id": "563861734550555261", "is_deprecated": false, "name": "A7", "source_location": { "column": 11, "file": "../../tests/t30002/t30002.cc", "line": 30, "translation_unit": "../../tests/t30002/t30002.cc" }, "type": "namespace" }, { "display_name": "clanguml::t30002::A::AA::A8", "id": "839146342143718390", "is_deprecated": false, "name": "A8", "source_location": { "column": 11, "file": "../../tests/t30002/t30002.cc", "line": 33, "translation_unit": "../../tests/t30002/t30002.cc" }, "type": "namespace" }, { "display_name": "clanguml::t30002::A::AA::A9", "id": "1650835159458422245", "is_deprecated": false, "name": "A9", "source_location": { "column": 11, "file": "../../tests/t30002/t30002.cc", "line": 36, "translation_unit": "../../tests/t30002/t30002.cc" }, "type": "namespace" }, { "display_name": "clanguml::t30002::A::AA::A10", "id": "1453242941322376182", "is_deprecated": false, "name": "A10", "source_location": { "column": 11, "file": "../../tests/t30002/t30002.cc", "line": 39, "translation_unit": "../../tests/t30002/t30002.cc" }, "type": "namespace" }, { "display_name": "clanguml::t30002::A::AA::A11", "id": "384833776371876986", "is_deprecated": false, "name": "A11", "source_location": { "column": 11, "file": "../../tests/t30002/t30002.cc", "line": 42, "translation_unit": "../../tests/t30002/t30002.cc" }, "type": "namespace" }, { "display_name": "clanguml::t30002::A::AA::A12", "id": "1199527037490355138", "is_deprecated": false, "name": "A12", "source_location": { "column": 11, "file": "../../tests/t30002/t30002.cc", "line": 45, "translation_unit": "../../tests/t30002/t30002.cc" }, "type": "namespace" }, { "display_name": "clanguml::t30002::A::AA::A13", "id": "620689743711615190", "is_deprecated": false, "name": "A13", "source_location": { "column": 11, "file": "../../tests/t30002/t30002.cc", "line": 48, "translation_unit": "../../tests/t30002/t30002.cc" }, "type": "namespace" }, { "display_name": "clanguml::t30002::A::AA::A14", "id": "301858476377711436", "is_deprecated": false, "name": "A14", "source_location": { "column": 11, "file": "../../tests/t30002/t30002.cc", "line": 51, "translation_unit": "../../tests/t30002/t30002.cc" }, "type": "namespace" }, { "display_name": "clanguml::t30002::A::AA::A15", "id": "561239706327729436", "is_deprecated": false, "name": "A15", "source_location": { "column": 11, "file": "../../tests/t30002/t30002.cc", "line": 54, "translation_unit": "../../tests/t30002/t30002.cc" }, "type": "namespace" }, { "display_name": "clanguml::t30002::A::AA::A16", "id": "1415398383158410524", "is_deprecated": false, "name": "A16", "source_location": { "column": 11, "file": "../../tests/t30002/t30002.cc", "line": 57, "translation_unit": "../../tests/t30002/t30002.cc" }, "type": "namespace" }, { "display_name": "clanguml::t30002::A::AA::A17", "id": "532437874530119999", "is_deprecated": false, "name": "A17", "source_location": { "column": 11, "file": "../../tests/t30002/t30002.cc", "line": 60, "translation_unit": "../../tests/t30002/t30002.cc" }, "type": "namespace" }, { "display_name": "clanguml::t30002::A::AA::A18", "id": "405712335116487393", "is_deprecated": false, "name": "A18", "source_location": { "column": 11, "file": "../../tests/t30002/t30002.cc", "line": 63, "translation_unit": "../../tests/t30002/t30002.cc" }, "type": "namespace" } ], "id": "1669745471968085401", "is_deprecated": false, "name": "AA", "source_location": { "column": 14, "file": "../../tests/t30002/t30002.cc", "line": 9, "translation_unit": "../../tests/t30002/t30002.cc" }, "type": "namespace" } ], "id": "1543480715632256641", "is_deprecated": false, "name": "A", "source_location": { "column": 11, "file": "../../tests/t30002/t30002.cc", "line": 9, "translation_unit": "../../tests/t30002/t30002.cc" }, "type": "namespace" }, { "display_name": "clanguml::t30002::B", "elements": [ { "display_name": "clanguml::t30002::B::BB", "elements": [ { "display_name": "clanguml::t30002::B::BB::BBB", "id": "2255521339657425355", "is_deprecated": false, "name": "BBB", "source_location": { "column": 18, "file": "../../tests/t30002/t30002.cc", "line": 67, "translation_unit": "../../tests/t30002/t30002.cc" }, "type": "namespace" } ], "id": "1938861639623819235", "is_deprecated": false, "name": "BB", "source_location": { "column": 14, "file": "../../tests/t30002/t30002.cc", "line": 67, "translation_unit": "../../tests/t30002/t30002.cc" }, "type": "namespace" } ], "id": "145302773464360955", "is_deprecated": false, "name": "B", "source_location": { "column": 11, "file": "../../tests/t30002/t30002.cc", "line": 67, "translation_unit": "../../tests/t30002/t30002.cc" }, "type": "namespace" } ], "metadata": { "clang_uml_version": "0.3.7-4-g43cc5cb", "llvm_version": "Ubuntu clang version 16.0.1 (++20230328073357+42d1b276f779-1~exp1~20230328073502.65)", "schema_version": 1 }, "name": "t30002_package", "relationships": [ { "destination": "1246394833900790496", "source": "2255521339657425355", "type": "dependency" }, { "destination": "839146342143718390", "source": "2255521339657425355", "type": "dependency" }, { "destination": "1650835159458422245", "source": "2255521339657425355", "type": "dependency" }, { "destination": "1164966689017271053", "source": "2255521339657425355", "type": "dependency" }, { "destination": "695366113361481509", "source": "2255521339657425355", "type": "dependency" }, { "destination": "1267709074800873528", "source": "2255521339657425355", "type": "dependency" }, { "destination": "1116163804866368736", "source": "2255521339657425355", "type": "dependency" }, { "destination": "299262817531370604", "source": "2255521339657425355", "type": "dependency" }, { "destination": "561239706327729436", "source": "2255521339657425355", "type": "dependency" }, { "destination": "405712335116487393", "source": "2255521339657425355", "type": "dependency" }, { "destination": "1415398383158410524", "source": "2255521339657425355", "type": "dependency" }, { "destination": "301858476377711436", "source": "2255521339657425355", "type": "dependency" }, { "destination": "1207764290216680521", "source": "2255521339657425355", "type": "dependency" }, { "destination": "563861734550555261", "source": "2255521339657425355", "type": "dependency" }, { "destination": "532437874530119999", "source": "2255521339657425355", "type": "dependency" }, { "destination": "899091126727901939", "source": "2255521339657425355", "type": "dependency" }, { "destination": "1453242941322376182", "source": "2255521339657425355", "type": "dependency" }, { "destination": "384833776371876986", "source": "2255521339657425355", "type": "dependency" }, { "destination": "1199527037490355138", "source": "2255521339657425355", "type": "dependency" }, { "destination": "620689743711615190", "source": "2255521339657425355", "type": "dependency" } ], "using_namespace": "clanguml::t30002" } ```