Files
clang-uml/docs/test_cases/t30007.md
Bartek Kryza 3e97a37c5f Updated docs
2023-05-28 19:08:10 +02:00

2.7 KiB

t30007 - Package diagram layout hints test case

Config

compilation_database_dir: ..
output_directory: puml
diagrams:
  t30007_package:
    type: package
    glob:
      - ../../tests/t30007/t30007.cc
    include:
      namespaces:
        - clanguml::t30007
    using_namespace:
      - clanguml::t30007
    layout:
      C:
        - up: 'A::AA'
        - left: B
    plantuml:
      before:
        - "' t30007 test package diagram"

Source code

File t30007.cc

namespace clanguml {
namespace t30007 {

namespace B {
struct BB { };
}

/// \uml{note[top] Compare layout with t30006.}
namespace A {
namespace AA {
struct A1 {
    B::BB *b;
};
}
}

namespace C {
struct CC { };
}

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

}
}

Generated UML diagrams

t30007_package

Generated JSON models

{
  "diagram_type": "package",
  "elements": [
    {
      "display_name": "clanguml::t30007::B",
      "id": "1852704221005355550",
      "is_deprecated": false,
      "name": "B",
      "source_location": {
        "file": "../../tests/t30007/t30007.cc",
        "line": 4
      },
      "type": "namespace"
    },
    {
      "comment": {
        "formatted": "\\uml{note[top] Compare layout with t30006.}",
        "raw": "/// \\uml{note[top] Compare layout with t30006.}"
      },
      "display_name": "clanguml::t30007::A",
      "elements": [
        {
          "display_name": "clanguml::t30007::A::AA",
          "id": "357722505818238170",
          "is_deprecated": false,
          "name": "AA",
          "source_location": {
            "file": "../../tests/t30007/t30007.cc",
            "line": 10
          },
          "type": "namespace"
        }
      ],
      "id": "870874615388866345",
      "is_deprecated": false,
      "name": "A",
      "source_location": {
        "file": "../../tests/t30007/t30007.cc",
        "line": 9
      },
      "type": "namespace"
    },
    {
      "display_name": "clanguml::t30007::C",
      "id": "937791537887318363",
      "is_deprecated": false,
      "name": "C",
      "source_location": {
        "file": "../../tests/t30007/t30007.cc",
        "line": 17
      },
      "type": "namespace"
    }
  ],
  "metadata": {
    "clang_uml_version": "0.3.5-27-g81c7ce7",
    "llvm_version": "Ubuntu clang version 15.0.6",
    "schema_version": 1
  },
  "name": "t30007_package",
  "relationships": [
    {
      "destination": "1852704221005355550",
      "source": "357722505818238170",
      "type": "dependency"
    },
    {
      "destination": "937791537887318363",
      "source": "357722505818238170",
      "type": "dependency"
    }
  ],
  "using_namespace": "clanguml::t30007"
}