# t40001 - Basic include graph diagram test case
## Config
```yaml
diagrams:
  t40001_include:
    type: include
    title: Basic include diagram example
    # Provide the files to parse in order to look
    # for #include directives
    glob:
      - src/t40001.cc
    # Include also external system headers
    generate_system_headers: true
    include:
      # Include only headers belonging to these paths
      paths:
        - .
    plantuml:
      before:
        - "' t40001 test diagram of type {{ diagram.type }}"
      after:
        - 'note right of {{ alias("include/lib1") }}: This is a lib1 include dir'
        - 'note right of {{ alias("include/t40001_include1.h") }}: This is a t40001_include1.h include file'
    mermaid:
      before:
        - "%% t40001 test diagram of type {{ diagram.type }}"
      after:
        - 'N_00001(This is a lib1 include dir)-.-{{ alias("include/lib1") }}'
        - 'N_00002(This is a t40001_include1.h include file)-.-{{ alias("include/t40001_include1.h") }}'
```
## Source code
File `tests/t40001/src/t40001.cc`
```cpp
#include <string>
#include <vector>

#include "../include/t40001_include1.h"

namespace clanguml {
namespace t40001 {

} // namespace t40001
} // namespace clanguml

```
File `tests/t40001/include/t40001_include1.h`
```cpp
#pragma once

#include "lib1/lib1.h"

#include <yaml-cpp/yaml.h>

#include <string>

namespace clanguml::t40001 {

int foo() { return lib1::foo2(); }

}

```
File `tests/t40001/include/lib1/lib1.h`
```cpp
#pragma once

namespace clanguml::t40001::lib1 {

int foo2() { return 0; }

}
```
## Generated PlantUML diagrams
![t40001_include](./t40001_include.svg "Basic include graph diagram test case")
## Generated Mermaid diagrams
![t40001_include](./t40001_include_mermaid.svg "Basic include graph diagram test case")
## Generated JSON models
```json
{
  "diagram_type": "include",
  "elements": [
    {
      "display_name": "src",
      "elements": [
        {
          "display_name": "src/t40001.cc",
          "file_kind": "implementation",
          "id": "14040120133440142713",
          "name": "t40001.cc",
          "type": "file"
        }
      ],
      "id": "11100957978370531577",
      "name": "src",
      "type": "folder"
    },
    {
      "display_name": "string",
      "file_kind": "header",
      "id": "13497578857207247412",
      "is_system": true,
      "name": "string",
      "type": "file"
    },
    {
      "display_name": "vector",
      "file_kind": "header",
      "id": "3241631072200583771",
      "is_system": true,
      "name": "vector",
      "type": "file"
    },
    {
      "display_name": "include",
      "elements": [
        {
          "display_name": "include/t40001_include1.h",
          "file_kind": "header",
          "id": "15413542531524764165",
          "is_system": false,
          "name": "t40001_include1.h",
          "type": "file"
        },
        {
          "display_name": "include/lib1",
          "elements": [
            {
              "display_name": "include/lib1/lib1.h",
              "file_kind": "header",
              "id": "17548393712337957522",
              "is_system": false,
              "name": "lib1.h",
              "type": "file"
            }
          ],
          "id": "13501402687592147456",
          "name": "lib1",
          "type": "folder"
        }
      ],
      "id": "7915299339925655008",
      "name": "include",
      "type": "folder"
    },
    {
      "display_name": "yaml-cpp/yaml.h",
      "file_kind": "header",
      "id": "13277895155864363881",
      "is_system": true,
      "name": "yaml-cpp/yaml.h",
      "type": "file"
    }
  ],
  "name": "t40001_include",
  "relationships": [
    {
      "destination": "13497578857207247412",
      "source": "14040120133440142713",
      "type": "dependency"
    },
    {
      "destination": "3241631072200583771",
      "source": "14040120133440142713",
      "type": "dependency"
    },
    {
      "destination": "15413542531524764165",
      "source": "14040120133440142713",
      "type": "association"
    },
    {
      "destination": "17548393712337957522",
      "source": "15413542531524764165",
      "type": "association"
    },
    {
      "destination": "13277895155864363881",
      "source": "15413542531524764165",
      "type": "dependency"
    },
    {
      "destination": "13497578857207247412",
      "source": "15413542531524764165",
      "type": "dependency"
    }
  ],
  "title": "Basic include diagram example"
}
```
