Files
clang-uml/docs/test_cases/t40003.md
2024-06-17 22:02:29 +02:00

8.2 KiB

t40003 - Dependants and dependencies include diagram filter test

Config

diagrams:
  t40003_include:
    type: include
    # Provide the files to parse in order to look
    # for #include directives
    glob:
      - src/dependants/t1.cc
      - src/dependencies/t2.cc
    # Render the paths relative to this directory
    include:
      # Include files which depend on t1.h
      dependants:
        - include/dependants/t1.h
      # and dependencies of t2.cc
      dependencies:
        - src/dependencies/t2.cc
    exclude:
      # Exclude files which depend on t10.h
      dependants:
        - include/dependants/t10.h
      # and other dependencies of t8.h
      dependencies:
        - include/dependencies/t8.h
    plantuml:
      before:
        - "' t40003 test include diagram"

Source code

File tests/t40003/src/dependencies/t2.cc

#include "../../include/dependencies/t3.h"
#include "../../include/dependencies/t5.h"

namespace clanguml::t40003::dependencies {
void t()
{
    t3();
    t5();
    t8();
}
}

File tests/t40003/src/dependants/t1.cc

#include "../../include/dependants/t3.h"
#include "../../include/dependants/t4.h"

namespace clanguml::t40003::dependants {
void t()
{
    t3();
    t4();
}
}

File tests/t40003/include/dependencies/t3.h

#pragma once

#include "t2.h"

namespace clanguml::t40003::dependencies {
void t3() { t2(); }
}

File tests/t40003/include/dependencies/t8.h

#pragma once

#include "t7.h"

namespace clanguml::t40003::dependencies {
void t8() { t7(); }
}

File tests/t40003/include/dependencies/t1.h

#pragma once

namespace clanguml::t40003::dependencies {
void t1() { }
}

File tests/t40003/include/dependencies/t6.h

#pragma once

#include "t1.h"

namespace clanguml::t40003::dependencies {
void t6() { t1(); }
}

File tests/t40003/include/dependencies/t5.h

#pragma once

#include "t1.h"
#include "t8.h"

namespace clanguml::t40003::dependencies {
void t5()
{
    t1();
    t8();
}
}

File tests/t40003/include/dependencies/t2.h

#pragma once

#include "t1.h"

namespace clanguml::t40003::dependencies {
void t2() { t1(); }
}

File tests/t40003/include/dependencies/t7.h

#pragma once

namespace clanguml::t40003::dependencies {
void t7() { }
}

File tests/t40003/include/dependants/t3.h

#pragma once

#include "t2.h"

namespace clanguml::t40003::dependants {
void t3() { t2(); }
}

File tests/t40003/include/dependants/t10.h

#pragma once

#include "t3.h"

namespace clanguml::t40003::dependants {
void t10() { t3(); }
}

File tests/t40003/include/dependants/t4.h

#pragma once

namespace clanguml::t40003::dependants {
void t4() { }
}

File tests/t40003/include/dependants/t1.h

#pragma once

namespace clanguml::t40003::dependants {
void t1() { }
}

File tests/t40003/include/dependants/t11.h

#pragma once

#include "t10.h"

namespace clanguml::t40003::dependants {
void t11() { t10(); }
}

File tests/t40003/include/dependants/t2.h

#pragma once

#include "t1.h"

namespace clanguml::t40003::dependants {
void t2() { t1(); }
}

Generated PlantUML diagrams

t40003_include

Generated Mermaid diagrams

t40003_include

Generated JSON models

{
  "diagram_type": "include",
  "elements": [
    {
      "display_name": "src",
      "elements": [
        {
          "display_name": "src/dependants",
          "elements": [
            {
              "display_name": "src/dependants/t1.cc",
              "file_kind": "implementation",
              "id": "9722595473477539496",
              "name": "t1.cc",
              "type": "file"
            }
          ],
          "id": "9028452799776030089",
          "name": "dependants",
          "type": "folder"
        },
        {
          "display_name": "src/dependencies",
          "elements": [
            {
              "display_name": "src/dependencies/t2.cc",
              "file_kind": "implementation",
              "id": "17726793412846848469",
              "name": "t2.cc",
              "type": "file"
            }
          ],
          "id": "16123094630178690530",
          "name": "dependencies",
          "type": "folder"
        }
      ],
      "id": "11100957978370531577",
      "name": "src",
      "type": "folder"
    },
    {
      "display_name": "include",
      "elements": [
        {
          "display_name": "include/dependants",
          "elements": [
            {
              "display_name": "include/dependants/t3.h",
              "file_kind": "header",
              "id": "480008165374689457",
              "is_system": false,
              "name": "t3.h",
              "type": "file"
            },
            {
              "display_name": "include/dependants/t2.h",
              "file_kind": "header",
              "id": "15374743137536360107",
              "is_system": false,
              "name": "t2.h",
              "type": "file"
            },
            {
              "display_name": "include/dependants/t1.h",
              "file_kind": "header",
              "id": "18362174245200108524",
              "is_system": false,
              "name": "t1.h",
              "type": "file"
            }
          ],
          "id": "14108210646791327956",
          "name": "dependants",
          "type": "folder"
        },
        {
          "display_name": "include/dependencies",
          "elements": [
            {
              "display_name": "include/dependencies/t3.h",
              "file_kind": "header",
              "id": "9814745789083909391",
              "is_system": false,
              "name": "t3.h",
              "type": "file"
            },
            {
              "display_name": "include/dependencies/t2.h",
              "file_kind": "header",
              "id": "14794790605173081035",
              "is_system": false,
              "name": "t2.h",
              "type": "file"
            },
            {
              "display_name": "include/dependencies/t1.h",
              "file_kind": "header",
              "id": "8962059906444515418",
              "is_system": false,
              "name": "t1.h",
              "type": "file"
            },
            {
              "display_name": "include/dependencies/t5.h",
              "file_kind": "header",
              "id": "16849033273915995749",
              "is_system": false,
              "name": "t5.h",
              "type": "file"
            }
          ],
          "id": "14667830350821396139",
          "name": "dependencies",
          "type": "folder"
        }
      ],
      "id": "7915299339925655008",
      "name": "include",
      "type": "folder"
    }
  ],
  "name": "t40003_include",
  "relationships": [
    {
      "destination": "480008165374689457",
      "source": "9722595473477539496",
      "type": "association"
    },
    {
      "destination": "15063527289428202824",
      "source": "9722595473477539496",
      "type": "association"
    },
    {
      "destination": "9814745789083909391",
      "source": "17726793412846848469",
      "type": "association"
    },
    {
      "destination": "16849033273915995749",
      "source": "17726793412846848469",
      "type": "association"
    },
    {
      "destination": "15374743137536360107",
      "source": "480008165374689457",
      "type": "association"
    },
    {
      "destination": "18362174245200108524",
      "source": "15374743137536360107",
      "type": "association"
    },
    {
      "destination": "14794790605173081035",
      "source": "9814745789083909391",
      "type": "association"
    },
    {
      "destination": "8962059906444515418",
      "source": "14794790605173081035",
      "type": "association"
    },
    {
      "destination": "8962059906444515418",
      "source": "16849033273915995749",
      "type": "association"
    },
    {
      "destination": "15065692964616746228",
      "source": "16849033273915995749",
      "type": "association"
    },
    {
      "destination": "7559120824700944250",
      "source": "15065692964616746228",
      "type": "association"
    }
  ]
}