# t20017 - Test case for combine_free_functions_into_file_participants option
## Config
```yaml
compilation_database_dir: ..
output_directory: puml
diagrams:
  t20017_sequence:
    type: sequence
    combine_free_functions_into_file_participants: true
    relative_to: ../../../tests/t20017
    glob:
      - t20017.cc
    include:
      namespaces:
        - clanguml::t20017
      paths:
        - .
    using_namespace:
      - clanguml::t20017
    start_from:
      - function: "clanguml::t20017::tmain()"
```
## Source code
File t20017_b.cc
```cpp
#include "include/t20017_b.h"

namespace clanguml {
namespace t20017 {
int b1(int x, int y) { return x - y; }
}
}
```
File t20017.cc
```cpp
#include "include/t20017_a.h"
#include "include/t20017_b.h"

namespace clanguml {
namespace t20017 {
int tmain() { return b2(a1(a2(a3(1, 2), b1(3, 4)), 5), 6); }
}
}
```
## Generated UML diagrams
![t20017_sequence](./t20017_sequence.svg "Test case for combine_free_functions_into_file_participants option")
## Generated JSON models
```json
{
  "diagram_type": "sequence",
  "metadata": {
    "clang_uml_version": "0.3.5-27-g81c7ce7",
    "llvm_version": "Ubuntu clang version 15.0.6",
    "schema_version": 1
  },
  "name": "t20017_sequence",
  "participants": [
    {
      "id": "800083058974241273",
      "name": "t20017.cc",
      "source_location": {
        "file": "../../clang-uml/tests/t20017/t20017.cc",
        "line": 6
      },
      "type": "function"
    },
    {
      "id": "446029693370832411",
      "name": "include/t20017_a.h",
      "source_location": {
        "file": "../../clang-uml/tests/t20017/include/t20017_a.h",
        "line": 7
      },
      "type": "function"
    },
    {
      "id": "1893799013101029871",
      "name": "include/t20017_b.h",
      "source_location": {
        "file": "../../clang-uml/tests/t20017/include/t20017_b.h",
        "line": 5
      },
      "type": "function"
    }
  ],
  "sequences": [
    {
      "messages": [
        {
          "from": {
            "activity_id": "1484746432546296115",
            "activity_name": "clanguml::t20017::tmain()",
            "participant_id": "800083058974241273"
          },
          "name": "a3(int,int)",
          "return_type": "",
          "scope": "normal",
          "source_location": {
            "file": "../../clang-uml/tests/t20017/t20017.cc",
            "line": 6
          },
          "to": {
            "activity_id": "1681392050252260928",
            "activity_name": "clanguml::t20017::a3(int,int)",
            "participant_id": "446029693370832411"
          },
          "type": "message"
        },
        {
          "from": {
            "activity_id": "1484746432546296115",
            "activity_name": "clanguml::t20017::tmain()",
            "participant_id": "800083058974241273"
          },
          "name": "b1(int,int)",
          "return_type": "",
          "scope": "normal",
          "source_location": {
            "file": "../../clang-uml/tests/t20017/t20017.cc",
            "line": 6
          },
          "to": {
            "activity_id": "1714277838806105702",
            "activity_name": "clanguml::t20017::b1(int,int)",
            "participant_id": "1893799013101029871"
          },
          "type": "message"
        },
        {
          "from": {
            "activity_id": "1484746432546296115",
            "activity_name": "clanguml::t20017::tmain()",
            "participant_id": "800083058974241273"
          },
          "name": "a2(int,int)",
          "return_type": "",
          "scope": "normal",
          "source_location": {
            "file": "../../clang-uml/tests/t20017/t20017.cc",
            "line": 6
          },
          "to": {
            "activity_id": "291553542743365259",
            "activity_name": "clanguml::t20017::a2(int,int)",
            "participant_id": "446029693370832411"
          },
          "type": "message"
        },
        {
          "from": {
            "activity_id": "1484746432546296115",
            "activity_name": "clanguml::t20017::tmain()",
            "participant_id": "800083058974241273"
          },
          "name": "a1(int,int)",
          "return_type": "",
          "scope": "normal",
          "source_location": {
            "file": "../../clang-uml/tests/t20017/t20017.cc",
            "line": 6
          },
          "to": {
            "activity_id": "113759676939330212",
            "activity_name": "clanguml::t20017::a1(int,int)",
            "participant_id": "446029693370832411"
          },
          "type": "message"
        },
        {
          "from": {
            "activity_id": "1484746432546296115",
            "activity_name": "clanguml::t20017::tmain()",
            "participant_id": "800083058974241273"
          },
          "name": "b2<int>(int,int)",
          "return_type": "",
          "scope": "normal",
          "source_location": {
            "file": "../../clang-uml/tests/t20017/t20017.cc",
            "line": 6
          },
          "to": {
            "activity_id": "775081116464505528",
            "activity_name": "clanguml::t20017::b2<int>(int,int)",
            "participant_id": "1893799013101029871"
          },
          "type": "message"
        }
      ],
      "start_from": {
        "id": 1484746432546296115,
        "location": "clanguml::t20017::tmain()"
      }
    }
  ],
  "using_namespace": "clanguml::t20017"
}
```
