Files
clang-uml/docs/test_cases/t30006.md
2024-01-01 21:44:37 +01:00

2.4 KiB

t30006 - Package split namespace test case

Config

diagrams:
  t30006_package:
    type: package
    glob:
      - t30006.cc
    include:
      namespaces:
        - clanguml::t30006
    using_namespace: clanguml::t30006
    plantuml:
      before:
        - "' t30006 test package diagram"

Source code

File tests/t30006/t30006.cc

namespace clanguml {
namespace t30006 {

namespace B {
struct BB { };
}

/// \uml{note[top] Top A note.}
namespace A {
struct A1 {
    B::BB *b;
};
}

namespace C {
struct CC { };
}

/// \uml{note[bottom] Bottom A note.}
namespace A {
struct A2 {
    C::CC *c;
};
}

}
}

Generated PlantUML diagrams

t30006_package

Generated Mermaid diagrams

t30006_package

Generated JSON models

{
  "diagram_type": "package",
  "elements": [
    {
      "display_name": "B",
      "id": "1659090172211944144",
      "is_deprecated": false,
      "name": "B",
      "namespace": "clanguml::t30006",
      "source_location": {
        "column": 11,
        "file": "t30006.cc",
        "line": 4,
        "translation_unit": "t30006.cc"
      },
      "type": "namespace"
    },
    {
      "comment": {
        "formatted": "\\uml{note[top] Top A note.}",
        "raw": "/// \\uml{note[top] Top A note.}"
      },
      "display_name": "A",
      "id": "1499919423527579699",
      "is_deprecated": false,
      "name": "A",
      "namespace": "clanguml::t30006",
      "source_location": {
        "column": 11,
        "file": "t30006.cc",
        "line": 9,
        "translation_unit": "t30006.cc"
      },
      "type": "namespace"
    },
    {
      "display_name": "C",
      "id": "1380567463986115369",
      "is_deprecated": false,
      "name": "C",
      "namespace": "clanguml::t30006",
      "source_location": {
        "column": 11,
        "file": "t30006.cc",
        "line": 15,
        "translation_unit": "t30006.cc"
      },
      "type": "namespace"
    }
  ],
  "name": "t30006_package",
  "package_type": "namespace",
  "relationships": [
    {
      "destination": "1659090172211944144",
      "source": "1499919423527579699",
      "type": "dependency"
    },
    {
      "destination": "1380567463986115369",
      "source": "1499919423527579699",
      "type": "dependency"
    }
  ],
  "using_namespace": "clanguml::t30006"
}