Files
clang-uml/docs/test_cases/t20002.md
2023-10-08 17:24:30 +02:00

4.8 KiB

t20002 - Free function sequence diagram test case

Config

compilation_database_dir: ..
output_directory: diagrams
diagrams:
  t20002_sequence:
    type: sequence
    glob:
      - ../../tests/t20002/t20002.cc
    include:
      namespaces:
        - clanguml::t20002
    using_namespace:
      - clanguml::t20002
    from:
      - function: "clanguml::t20002::m1()"

Source code

File t20002.cc

#include <algorithm>
#include <numeric>
#include <vector>

namespace clanguml {
namespace t20002 {

void m4() { }

void m3() { m4(); }

void m2() { m3(); }

void m1() { m2(); }
}
}

Generated PlantUML diagrams

t20002_sequence

Generated Mermaid diagrams

t20002_sequence

Generated JSON models

{
  "diagram_type": "sequence",
  "metadata": {
    "clang_uml_version": "0.4.0-2-g4ab0d29",
    "llvm_version": "Ubuntu clang version 16.0.6 (++20230710042027+7cbf1a259152-1~exp1~20230710162048.105)",
    "schema_version": 1
  },
  "name": "t20002_sequence",
  "participants": [
    {
      "id": "1619421429271064154",
      "name": "clanguml::t20002::m1()",
      "source_location": {
        "column": 6,
        "file": "../../tests/t20002/t20002.cc",
        "line": 14,
        "translation_unit": "../../tests/t20002/t20002.cc"
      },
      "type": "function"
    },
    {
      "id": "1575240232156112674",
      "name": "clanguml::t20002::m2()",
      "source_location": {
        "column": 6,
        "file": "../../tests/t20002/t20002.cc",
        "line": 12,
        "translation_unit": "../../tests/t20002/t20002.cc"
      },
      "type": "function"
    },
    {
      "id": "1838809176089209580",
      "name": "clanguml::t20002::m3()",
      "source_location": {
        "column": 6,
        "file": "../../tests/t20002/t20002.cc",
        "line": 10,
        "translation_unit": "../../tests/t20002/t20002.cc"
      },
      "type": "function"
    },
    {
      "id": "63715062711218534",
      "name": "clanguml::t20002::m4()",
      "source_location": {
        "column": 6,
        "file": "../../tests/t20002/t20002.cc",
        "line": 8,
        "translation_unit": "../../tests/t20002/t20002.cc"
      },
      "type": "function"
    }
  ],
  "sequences": [
    {
      "messages": [
        {
          "from": {
            "activity_id": "1619421429271064154",
            "activity_name": "clanguml::t20002::m1()",
            "participant_id": "1619421429271064154",
            "participant_name": "clanguml::t20002::m1()"
          },
          "name": "",
          "return_type": "void",
          "scope": "normal",
          "source_location": {
            "column": 13,
            "file": "../../tests/t20002/t20002.cc",
            "line": 14,
            "translation_unit": "../../tests/t20002/t20002.cc"
          },
          "to": {
            "activity_id": "1575240232156112674",
            "activity_name": "clanguml::t20002::m2()",
            "participant_id": "1575240232156112674"
          },
          "type": "message"
        },
        {
          "from": {
            "activity_id": "1575240232156112674",
            "activity_name": "clanguml::t20002::m2()",
            "participant_id": "1575240232156112674",
            "participant_name": "clanguml::t20002::m2()"
          },
          "name": "",
          "return_type": "void",
          "scope": "normal",
          "source_location": {
            "column": 13,
            "file": "../../tests/t20002/t20002.cc",
            "line": 12,
            "translation_unit": "../../tests/t20002/t20002.cc"
          },
          "to": {
            "activity_id": "1838809176089209580",
            "activity_name": "clanguml::t20002::m3()",
            "participant_id": "1838809176089209580"
          },
          "type": "message"
        },
        {
          "from": {
            "activity_id": "1838809176089209580",
            "activity_name": "clanguml::t20002::m3()",
            "participant_id": "1838809176089209580",
            "participant_name": "clanguml::t20002::m3()"
          },
          "name": "",
          "return_type": "void",
          "scope": "normal",
          "source_location": {
            "column": 13,
            "file": "../../tests/t20002/t20002.cc",
            "line": 10,
            "translation_unit": "../../tests/t20002/t20002.cc"
          },
          "to": {
            "activity_id": "63715062711218534",
            "activity_name": "clanguml::t20002::m4()",
            "participant_id": "63715062711218534"
          },
          "type": "message"
        }
      ],
      "start_from": {
        "id": 1619421429271064154,
        "location": "clanguml::t20002::m1()"
      }
    }
  ],
  "using_namespace": "clanguml::t20002"
}