# t30001 - Basic package diagram test case
## Config
```yaml
diagrams:
  t30001_package:
    type: package
    title: Basic package diagram example
    glob:
      - t30001.cc
    include:
      namespaces:
        - clanguml::t30001
    exclude:
      namespaces:
        - clanguml::t30001::detail
    using_namespace: clanguml::t30001
    plantuml:
      before:
        - "' t30001 test diagram of type {{ diagram.type }}"
      after:
        - 'note right of {{ alias("A::AA::AAA") }}: A AAA note...'
        - '{% set e=element("A::AA") %} note top of {{ alias("A::AA") }} : {{ e.comment.formatted }}'
        - '{% set e=element("B::AA") %} note top of {{ alias("B::AA") }} : {{ e.comment.formatted }}'
    mermaid:
      before:
        - "%% t30001 test diagram of type {{ diagram.type }}"
      after:
        - 'N_0001(A AAA note...)'
        - 'N_0001 -.- {{ alias("A::AA::AAA") }}'
        - '{% set e=element("A::AA") %}N_0002({{ e.comment.formatted }})'
        - '{% set e=element("B::AA") %}N_0003({{ e.comment.formatted }})'
        - 'N_0002 -.- {{ alias("A::AA") }}'
        - 'N_0003 -.- {{ alias("B::AA") }}'



```
## Source code
File `tests/t30001/t30001.cc`
```cpp
namespace clanguml {
namespace t30001 {
namespace A {
/// This is namespace AA in namespace A
namespace AA {
namespace AAA {
} // namespace AAA
namespace BBB {
} // namespace BBB
} // namespace AA
namespace BB {
} // namespace BB
} // namespace A
namespace B {
/// This is namespace AA in namespace B
namespace AA {
namespace AAA {
} // namespace AAA
namespace BBB {
} // namespace BBB
} // namespace AA
namespace BB {
} // namespace BB
} // namespace B
} // namespace t30001
} // namespace clanguml

```
## Generated PlantUML diagrams
![t30001_package](./t30001_package.svg "Basic package diagram test case")
## Generated Mermaid diagrams
![t30001_package](./t30001_package_mermaid.svg "Basic package diagram test case")
## Generated JSON models
```json
{
  "diagram_type": "package",
  "elements": [
    {
      "display_name": "A",
      "elements": [
        {
          "comment": {
            "formatted": "This is namespace AA in namespace A",
            "raw": "/// This is namespace AA in namespace A"
          },
          "display_name": "AA",
          "elements": [
            {
              "display_name": "AAA",
              "id": "274638237740249424",
              "is_deprecated": false,
              "name": "AAA",
              "namespace": "clanguml::t30001::A::AA",
              "source_location": {
                "column": 11,
                "file": "t30001.cc",
                "line": 6,
                "translation_unit": "t30001.cc"
              },
              "type": "namespace"
            },
            {
              "display_name": "BBB",
              "id": "2129154382024012563",
              "is_deprecated": false,
              "name": "BBB",
              "namespace": "clanguml::t30001::A::AA",
              "source_location": {
                "column": 11,
                "file": "t30001.cc",
                "line": 8,
                "translation_unit": "t30001.cc"
              },
              "type": "namespace"
            }
          ],
          "id": "1528517990989164155",
          "is_deprecated": false,
          "name": "AA",
          "namespace": "clanguml::t30001::A",
          "source_location": {
            "column": 11,
            "file": "t30001.cc",
            "line": 5,
            "translation_unit": "t30001.cc"
          },
          "type": "namespace"
        },
        {
          "display_name": "BB",
          "id": "983199564524723281",
          "is_deprecated": false,
          "name": "BB",
          "namespace": "clanguml::t30001::A",
          "source_location": {
            "column": 11,
            "file": "t30001.cc",
            "line": 11,
            "translation_unit": "t30001.cc"
          },
          "type": "namespace"
        }
      ],
      "id": "1184614645531659789",
      "is_deprecated": false,
      "name": "A",
      "namespace": "clanguml::t30001",
      "source_location": {
        "column": 11,
        "file": "t30001.cc",
        "line": 3,
        "translation_unit": "t30001.cc"
      },
      "type": "namespace"
    },
    {
      "display_name": "B",
      "elements": [
        {
          "comment": {
            "formatted": "This is namespace AA in namespace B",
            "raw": "/// This is namespace AA in namespace B"
          },
          "display_name": "AA",
          "elements": [
            {
              "display_name": "AAA",
              "id": "262162485307734028",
              "is_deprecated": false,
              "name": "AAA",
              "namespace": "clanguml::t30001::B::AA",
              "source_location": {
                "column": 11,
                "file": "t30001.cc",
                "line": 17,
                "translation_unit": "t30001.cc"
              },
              "type": "namespace"
            },
            {
              "display_name": "BBB",
              "id": "18542334992237803",
              "is_deprecated": false,
              "name": "BBB",
              "namespace": "clanguml::t30001::B::AA",
              "source_location": {
                "column": 11,
                "file": "t30001.cc",
                "line": 19,
                "translation_unit": "t30001.cc"
              },
              "type": "namespace"
            }
          ],
          "id": "895913707182089871",
          "is_deprecated": false,
          "name": "AA",
          "namespace": "clanguml::t30001::B",
          "source_location": {
            "column": 11,
            "file": "t30001.cc",
            "line": 16,
            "translation_unit": "t30001.cc"
          },
          "type": "namespace"
        },
        {
          "display_name": "BB",
          "id": "2230464321696304488",
          "is_deprecated": false,
          "name": "BB",
          "namespace": "clanguml::t30001::B",
          "source_location": {
            "column": 11,
            "file": "t30001.cc",
            "line": 22,
            "translation_unit": "t30001.cc"
          },
          "type": "namespace"
        }
      ],
      "id": "1931735210112054430",
      "is_deprecated": false,
      "name": "B",
      "namespace": "clanguml::t30001",
      "source_location": {
        "column": 11,
        "file": "t30001.cc",
        "line": 14,
        "translation_unit": "t30001.cc"
      },
      "type": "namespace"
    }
  ],
  "name": "t30001_package",
  "package_type": "namespace",
  "relationships": [],
  "title": "Basic package diagram example",
  "using_namespace": "clanguml::t30001"
}
```
