diff --git a/.clang-format-include b/.clang-format-include index d1da7244..838e22f1 100644 --- a/.clang-format-include +++ b/.clang-format-include @@ -6,4 +6,5 @@ + src/**/*.h + tests/**/*.cc + tests/**/*.h ++ tests/**/*.cppm - tests/catch.h diff --git a/.clang-tidy b/.clang-tidy index fb5be52a..9274a133 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -8,6 +8,7 @@ Checks: >- -bugprone-branch-clone, -bugprone-exception-escape, -bugprone-easily-swappable-parameters, + -bugprone-empty-catch, -clang-analyzer-alpha.*, -clang-analyzer-core.StackAddressEscape, -cppcoreguidelines-pro-bounds-array-to-pointer-decay, @@ -16,6 +17,8 @@ Checks: >- -cppcoreguidelines-special-member-functions, -cppcoreguidelines-avoid-magic-numbers, -cppcoreguidelines-non-private-member-variables-in-classes, + -cppcoreguidelines-missing-std-forward, + -cppcoreguidelines-avoid-const-or-ref-data-members, -cert-env33-c, -cert-err58-cpp, -cert-dcl58-cpp, @@ -34,6 +37,7 @@ Checks: >- -misc-no-recursion, -misc-non-private-member-variables-in-classes, -misc-const-correctness, + -misc-include-cleaner, -modernize-use-nodiscard, -modernize-use-trailing-return-type, -modernize-concat-nested-namespaces, diff --git a/CHANGELOG.md b/CHANGELOG.md index ad11ab2b..85b2f67c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # CHANGELOG + * Enabled type_aliases config option for sequence diagrams (#224) + * Refactored and unified JSON generators output (#223) + * Added support for C++20 module based packages in class diagrams (#101) + * Added support for class diagram filtering based on C++20 modules (#195) + * Added support for C++20 coroutines in class diagrams (#221) + * Fixed progress indicator characters on Windows (#218) + ### 0.4.2 * Fixed random typos and omissions in docs (#208) * Fixed handling of diagram hyperlinks with sources outside of project dir (#213) diff --git a/CMakeLists.txt b/CMakeLists.txt index b2bcde24..7721ff83 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.12) +cmake_minimum_required(VERSION 3.16) # # Project name @@ -153,6 +153,7 @@ add_subdirectory(src) # Enable testing via CTest # option(BUILD_TESTS "" ON) +option(ENABLE_CXX_MODULES_TEST_CASES "" OFF) if(BUILD_TESTS) enable_testing() add_subdirectory(tests) diff --git a/Makefile b/Makefile index 9d55dd42..119b0cbf 100644 --- a/Makefile +++ b/Makefile @@ -35,6 +35,9 @@ LLVM_CONFIG_PATH ?= CMAKE_PREFIX ?= CMAKE_CXX_FLAGS ?= CMAKE_EXE_LINKER_FLAGS ?= +CMAKE_GENERATOR ?= Unix Makefiles + +ENABLE_CXX_MODULES_TEST_CASES ?= OFF GIT_VERSION ?= $(shell git describe --tags --always --abbrev=7) PKG_VERSION ?= $(shell git describe --tags --always --abbrev=7 | tr - .) @@ -49,6 +52,7 @@ clean: debug/CMakeLists.txt: cmake -S . -B debug \ + -G"$(CMAKE_GENERATOR)" \ -DGIT_VERSION=$(GIT_VERSION) \ -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ -DCMAKE_BUILD_TYPE=Debug \ @@ -56,10 +60,12 @@ debug/CMakeLists.txt: -DCMAKE_EXE_LINKER_FLAGS="$(CMAKE_EXE_LINKER_FLAGS)" \ -DLLVM_VERSION=${LLVM_VERSION} \ -DLLVM_CONFIG_PATH=${LLVM_CONFIG_PATH} \ - -DCMAKE_PREFIX=${CMAKE_PREFIX} + -DCMAKE_PREFIX=${CMAKE_PREFIX} \ + -DENABLE_CXX_MODULES_TEST_CASES=$(ENABLE_CXX_MODULES_TEST_CASES) release/CMakeLists.txt: cmake -S . -B release \ + -G"$(CMAKE_GENERATOR)" \ -DGIT_VERSION=$(GIT_VERSION) \ -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ -DCMAKE_BUILD_TYPE=Release \ @@ -67,10 +73,12 @@ release/CMakeLists.txt: -DCMAKE_EXE_LINKER_FLAGS="$(CMAKE_EXE_LINKER_FLAGS)" \ -DLLVM_VERSION=${LLVM_VERSION} \ -DLLVM_CONFIG_PATH=${LLVM_CONFIG_PATH} \ - -DCMAKE_PREFIX=${CMAKE_PREFIX} + -DCMAKE_PREFIX=${CMAKE_PREFIX} \ + -DENABLE_CXX_MODULES_TEST_CASES=$(ENABLE_CXX_MODULES_TEST_CASES) debug_tidy/CMakeLists.txt: cmake -S . -B debug_tidy \ + -G"$(CMAKE_GENERATOR)" \ -DGIT_VERSION=$(GIT_VERSION) \ -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ -DCMAKE_BUILD_TYPE=Debug \ @@ -79,24 +87,25 @@ debug_tidy/CMakeLists.txt: -DCMAKE_EXE_LINKER_FLAGS="$(CMAKE_EXE_LINKER_FLAGS)" \ -DLLVM_VERSION=${LLVM_VERSION} \ -DLLVM_CONFIG_PATH=${LLVM_CONFIG_PATH} \ - -DCMAKE_PREFIX=${CMAKE_PREFIX} + -DCMAKE_PREFIX=${CMAKE_PREFIX} \ + -DENABLE_CXX_MODULES_TEST_CASES=$(ENABLE_CXX_MODULES_TEST_CASES) debug: debug/CMakeLists.txt echo "Using ${NUMPROC} cores" - make -C debug -j$(NUMPROC) + cmake --build debug -j$(NUMPROC) debug_tidy: debug_tidy/CMakeLists.txt echo "Using ${NUMPROC} cores" - make -C debug_tidy -j$(NUMPROC) + cmake --build debug_tidy -j$(NUMPROC) release: release/CMakeLists.txt - make -C release -j$(NUMPROC) + cmake --build release -j$(NUMPROC) test: debug - CTEST_OUTPUT_ON_FAILURE=1 make -C debug test + CTEST_OUTPUT_ON_FAILURE=1 ctest --test-dir debug test_release: release - CTEST_OUTPUT_ON_FAILURE=1 make -C release test + CTEST_OUTPUT_ON_FAILURE=1 ctest --test-dir release install: release make -C release install DESTDIR=${DESTDIR} @@ -146,7 +155,7 @@ format: .PHONY: debug_tidy tidy: debug_tidy - run-clang-tidy-15 -j $(NUMPROC) -p debug_tidy ./src + run-clang-tidy-15 -extra-arg=-Wno-unknown-warning-option -j $(NUMPROC) -p debug_tidy ./src .PHONY: check-formatting check-formatting: diff --git a/README.md b/README.md index e37295e3..1b0d3cec 100644 --- a/README.md +++ b/README.md @@ -38,9 +38,12 @@ Main features supported so far include: * Diagram content filtering based on namespaces, elements and relationships - [_example_](docs/test_cases/t00040.md) * Optional package generation from namespaces (only PlantUML) - [_example_](docs/test_cases/t00036.md) * Optional package generation from subdirectories (only PlantUML) - [_example_](docs/test_cases/t00065.md) + * Optional package generation from C++20 modules (only PlantUML) - [_example_](docs/test_cases/t00071.md) * Interactive links to online code or docs for classes, methods and class fields in SVG diagrams - [_example_](https://raw.githubusercontent.com/bkryza/clang-uml/master/docs/test_cases/t00002_class.svg) * Support for plain C99/C11 code (struct, units and their relationships) - [_example_](docs/test_cases/t00057.md) * C++20 concept constraints - [_example_](docs/test_cases/t00059.md) + * C++20 coroutines - [_example_](docs/test_cases/t00069.md) + * Diagram content filtering based on C++20 modules - [_example_](docs/test_cases/t00070.md) * **Sequence diagram generation** * Generation of sequence diagram from specific method or function - [_example_](docs/test_cases/t20001.md) * Generation of loop and conditional statements - [_example_](docs/test_cases/t20021.md) @@ -52,6 +55,7 @@ Main features supported so far include: * **Package diagram generation** * Generation of package diagram based on C++ namespaces - [_example_](docs/test_cases/t30001.md) * Generation of package diagram based on subdirectories - [_example_](docs/test_cases/t30010.md) + * Generation of package diagram based on C++20 modules - [_example_](docs/test_cases/t30014.md) * Dependencies between packages based on symbols used in the code - [_example_](docs/test_cases/t30002.md) * Interactive links to online code to packages - [_example_](https://raw.githubusercontent.com/bkryza/clang-uml/master/docs/test_cases/t30002_package.svg) * **Include graph diagram generation** diff --git a/build.ps1 b/build.ps1 index f43bc470..e13a4212 100644 --- a/build.ps1 +++ b/build.ps1 @@ -1,6 +1,6 @@ param ($Prefix="C:\clang-uml", $BuildType="Release") -cmake -S . -B $BuildType -DCMAKE_PREFIX_PATH="$Prefix" -Thost=x64 +cmake -S . -B $BuildType -DCMAKE_PREFIX_PATH="$Prefix" -DENABLE_CXX_MODULES_TEST_CASES=OFF -Thost=x64 cmake --build $BuildType --config $BuildType # Create compile commands in Visual Studio diff --git a/docs/class_diagrams.md b/docs/class_diagrams.md index a652f2dd..ac6a670b 100644 --- a/docs/class_diagrams.md +++ b/docs/class_diagrams.md @@ -8,6 +8,9 @@ * [Relationships to classes in containers or smart pointers](#relationships-to-classes-in-containers-or-smart-pointers) * [Inheritance diagrams](#inheritance-diagrams) * [Generating UML packages in the diagram](#generating-uml-packages-in-the-diagram) + * [Namespace packages](#namespace-packages) + * [Directory packages](#directory-packages) + * [Module packages](#module-packages) * [Class context diagram](#class-context-diagram) * [Disabling dependency relationships](#disabling-dependency-relationships) @@ -132,6 +135,15 @@ rendered. This can be easily achieved in `clang-uml` through inclusion filters: ``` ## Generating UML packages in the diagram +`clang-uml` supports 3 sources for generating UML packages in a diagram: +* `namespace` - default +* `directory` - based on relative directory paths within the project source tree +* `module` - based on C++20 modules + +Currently, a specific diagram can only contain packages of one of the above +types. + +### Namespace packages By default, `clang-uml` will render all element names including a namespace (relative to `using_namespace` property), e.g. `ns1::ns2::MyClass`. In order to generate packages in the diagram for each namespace instead, the @@ -145,6 +157,7 @@ which results in the following diagram: ![t00036_class](test_cases/t00036_class.svg) +### Directory packages In case the code base is structured based on subdirectory instead of namespaces (or this is a C project, where namespaces are not available), packages can be generated based on the location of a given declaration in the filesystem tree, @@ -162,6 +175,31 @@ which results in the following diagram: > properly configured for your project, if necessary add `relative_to` option to > denote the root path against which all relative paths in the config file are > calculated. + +### Module packages +Finally, to generate UML packages in the diagram based on C++20 modules, use +the following option: + +```yaml +package_type: module +``` + +which can produce the following diagram: + +![t00071_class](test_cases/t00071_class.svg) + +Packages from modules support internal module partitions, which are represented +by `:` prefix in the name as well as conventional submodules separated by `.`. + +Module paths can be rendered relative to a specific parent module, to enable +this add the following option: +```yaml +using_module: mod1.mod2 +``` +which will render modules relative to `mod1.mod2`. + +For examples of this feature check out the following test cases documentation: +[t00071](test_cases/t00072.md) and [t00072](test_cases/t00072.md). ## Class context diagram Sometimes it's helpful to generate a class diagram depicting only direct diff --git a/docs/diagram_filters.md b/docs/diagram_filters.md index 3bfd9f38..759b7c49 100644 --- a/docs/diagram_filters.md +++ b/docs/diagram_filters.md @@ -3,6 +3,7 @@ * [namespaces](#namespaces) +* [modules](#modules) * [elements](#elements) * [element_types](#element_types) * [paths](#paths) @@ -12,6 +13,7 @@ * [parents](#parents) * [specializations](#specializations) * [access](#access) +* [module_access](#module_access) * [method_types](#method_types) * [callee_types](#callee_types) * [dependants and dependencies](#dependants-and-dependencies) @@ -56,22 +58,24 @@ exclude: The following table specifies the values allowed in each filter: -| Filter name | Possible values | Example values | -|-------------------|----------------------------------|------------------------------------------------------------------------------------------------------------------------| -| `namespaces` | Qualified name or regex | ```ns1::ns2::ClassA```, ```r: '.*detail.*'``` | -| `elements` | Qualified name or regex | ```ns1::ns2::ClassA```, ```r: '.*detail.*'``` | -| `element_types` | Types of diagram elements | ```class```, ```enum```, ```concept``` | -| `paths` | File or dir path or glob pattern | ```src/dir1```, ```src/dir2/a.cpp```, ```src/dir3/*.cpp``` | -| `context` | Qualified name or regex | ```ns1::ns2::ClassA```, ```r: 'ns1::ns2::ClassA.+'``` | -| `relationships` | Type of relationship | ```inheritance```, ```composition```, ```aggregation```, ```ownership```, ```association```, ```instantiation```, ```friendship```, ```dependency``` | -| `subclasses` | Qualified name or regex | ```ns1::ns2::ClassA```, ```r: 'ns1::ns2::ClassA.+'``` | -| `parents` | Qualified name or regex | ```ns1::ns2::ClassA```, ```r: 'ns1::ns2::ClassA.+'``` | -| `specializations` | Qualified name or regex | ```ns1::ns2::ClassA```, ```r: 'ns1::ns2::ClassA.+'``` | -| `access` | Method or member access scope | ```public```, ```protected```, ```private``` | -| `method_types` | Type of class method | ```constructor```, ```destructor```, ```assignment```, ```operator```, ```defaulted```, ```deleted```, ```static``` | -| `dependants` | Qualified name or regex | ```ns1::ns2::ClassA```, ```r: 'ns1::ns2::ClassA.+'``` | -| `dependencies` | Qualified name or regex | ```ns1::ns2::ClassA```, ```r: 'ns1::ns2::ClassA.+'``` | -| `callee_types` | Callee types in sequence diagrams| ```constructor```, ```assignment```, ```operator```, ```defaulted```, ```static```, ```method```, ```function```, ```function_template```, ```lambda``` | +| Filter name | Possible values | Example values | +|-------------------|-----------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------| +| `namespaces` | Qualified name or regex | ```ns1::ns2::ClassA```, ```r: '.*detail.*'``` | +| `modules` | Qualified name or regex | ```mod1.mod2:par1```, ```r: '.*impl.*'``` | +| `elements` | Qualified name or regex | ```ns1::ns2::ClassA```, ```r: '.*detail.*'``` | +| `element_types` | Types of diagram elements | ```class```, ```enum```, ```concept``` | +| `paths` | File or dir path or glob pattern | ```src/dir1```, ```src/dir2/a.cpp```, ```src/dir3/*.cpp``` | +| `context` | Qualified name or regex | ```ns1::ns2::ClassA```, ```r: 'ns1::ns2::ClassA.+'``` | +| `relationships` | Type of relationship | ```inheritance```, ```composition```, ```aggregation```, ```ownership```, ```association```, ```instantiation```, ```friendship```, ```dependency``` | +| `subclasses` | Qualified name or regex | ```ns1::ns2::ClassA```, ```r: 'ns1::ns2::ClassA.+'``` | +| `parents` | Qualified name or regex | ```ns1::ns2::ClassA```, ```r: 'ns1::ns2::ClassA.+'``` | +| `specializations` | Qualified name or regex | ```ns1::ns2::ClassA```, ```r: 'ns1::ns2::ClassA.+'``` | +| `access` | Method or member access scope | ```public```, ```protected```, ```private``` | +| `module_access` | Module access scope | ```public```, ```private``` | +| `method_types` | Type of class method | ```constructor```, ```destructor```, ```assignment```, ```operator```, ```defaulted```, ```deleted```, ```static``` | +| `dependants` | Qualified name or regex | ```ns1::ns2::ClassA```, ```r: 'ns1::ns2::ClassA.+'``` | +| `dependencies` | Qualified name or regex | ```ns1::ns2::ClassA```, ```r: 'ns1::ns2::ClassA.+'``` | +| `callee_types` | Callee types in sequence diagrams | ```constructor```, ```assignment```, ```operator```, ```defaulted```, ```static```, ```method```, ```function```, ```function_template```, ```lambda``` | The following filters are available: @@ -88,6 +92,19 @@ Allows to include or exclude entities from specific namespaces. - ns1::ns2::detail ``` +## modules + +Allows to include or exclude entities from specific C++20 module. + +```yaml + include: + modules: + - mod1.mod2 + exclude: + modules: + - r: ".*impl.*" +``` + ## elements Allows to directly include or exclude specific entities from the diagrams, for instance to exclude a specific class @@ -199,15 +216,22 @@ This filter allows to include or exclude specializations and instantiations of a ## access -This filter allows to include or exclude class methods and members based on their access scope, allowed values ar: +This filter allows to include or exclude class methods and members based on their access scope, allowed values are: * `public` * `protected` * `private` +## module_access + +This filter allows to include or exclude diagram elements based on the module in which they are declared, allowed values are: + +* `public` +* `private` + ## method_types -This filter allows to include or exclude various method types from the class diagram, allowed values ar: +This filter allows to include or exclude various method types from the class diagram, allowed values are: * `constructor` * `destructor` * `assignment` diff --git a/docs/interactive_svg_diagrams.md b/docs/interactive_svg_diagrams.md index 3358057e..f41450b6 100644 --- a/docs/interactive_svg_diagrams.md +++ b/docs/interactive_svg_diagrams.md @@ -17,7 +17,11 @@ elements simply add this to your `.clang-uml` file: ```yaml generate_links: link: 'https://github.com/myorg/myrepo/blob/{{ git.commit }}/{{ element.source.path }}#L{{ element.source.line }}' - tooltip: '{% if "comment" in element %}{{ abbrv(trim(replace(element.comment, "\n+", " ")), 256) }}{% else %}{{ element.name }}{% endif %}' + tooltip: '{% if "comment" in element %}{{ abbrv(trim(replace(element.comment.formatted, "\n+", " ")), 256) }}{% else %}{{ element.name }}{% endif %}' ``` -You can open example diagram [here](https://raw.githubusercontent.com/bkryza/clang-uml/master/docs/test_cases/t00014_class.svg) to see how it works in action. \ No newline at end of file +You can open example diagram [here](https://raw.githubusercontent.com/bkryza/clang-uml/master/docs/test_cases/t00014_class.svg) to see how it works in action. + +Full documentation on how to use the [inja](https://github.com/pantor/inja) +template engine in `clang-uml` configuration files can be found +[here](./jinja_templates.md). diff --git a/docs/package_diagrams.md b/docs/package_diagrams.md index 5e542be2..952436c6 100644 --- a/docs/package_diagrams.md +++ b/docs/package_diagrams.md @@ -153,12 +153,31 @@ results the following diagram: ![package_deps](./test_cases/t30002_package.svg) By default, packages are generated from C++ namespaces in the code. However, -they can also be generated from the subdirectories in the filesystem tree by -adding the following option to the configuration file: +they can also be generated from the subdirectories in the filesystem tree or +based on C++20 modules + +Subdirectory based packages can be enabled by adding the following option to +the configuration file: ```yaml package_type: directory ``` -for example checkout this diagram -![t30011_package](./test_cases/t30011_package.svg) \ No newline at end of file +for example check out this diagram +![t30011_package](./test_cases/t30011_package.svg) + +Module based packages can be enabled using the following option: + +```yaml +package_type: module +``` + +for example check out this diagram +![t30014_package](./test_cases/t30011_package.svg) + +Diagrams can be rendered relative to a specific module using `using_module` +option: + +```yaml +using_module: mod1.mod2 +``` diff --git a/docs/test_cases.md b/docs/test_cases.md index 4229cddc..5252dd93 100644 --- a/docs/test_cases.md +++ b/docs/test_cases.md @@ -73,6 +73,10 @@ * [t00066](./test_cases/t00066.md) - Class fields and methods without grouping and sorting * [t00067](./test_cases/t00067.md) - Class method type filter test case * [t00068](./test_cases/t00068.md) - Context filter radius parameter test case + * [t00069](./test_cases/t00069.md) - Coroutine methods in class diagrams + * [t00070](./test_cases/t00070.md) - Diagram filter based on C++20 modules + * [t00071](./test_cases/t00071.md) - Class diagram with C++20 modules generated as packages + * [t00072](./test_cases/t00072.md) - Class diagram with C++20 module partitions generated as packages ## Sequence diagrams * [t20001](./test_cases/t20001.md) - Basic sequence diagram test case * [t20002](./test_cases/t20002.md) - Free function sequence diagram test case @@ -112,6 +116,7 @@ * [t20036](./test_cases/t20036.md) - Test case for rendering all call chains leading to an activity (to) * [t20037](./test_cases/t20037.md) - Test case checking if activities in static variable declarations appear only once * [t20038](./test_cases/t20038.md) - Sequence diagram comment decorator test case + * [t20039](./test_cases/t20039.md) - Test case for type aliases config option in sequence diagrams ## Package diagrams * [t30001](./test_cases/t30001.md) - Basic package diagram test case * [t30002](./test_cases/t30002.md) - Package dependency test case @@ -124,6 +129,10 @@ * [t30009](./test_cases/t30009.md) - Together layout hint test * [t30010](./test_cases/t30010.md) - Package diagram with packages from directory structure * [t30011](./test_cases/t30011.md) - Package diagram with packages from directory structure for plain C + * [t30012](./test_cases/t30012.md) - C++20 modules package diagram test + * [t30013](./test_cases/t30013.md) - C++20 modules package dependencies diagram test + * [t30014](./test_cases/t30014.md) - C++20 modules package diagram test with partitions + * [t30015](./test_cases/t30015.md) - C++20 modules package diagram test with partition dependencies ## Include diagrams * [t40001](./test_cases/t40001.md) - Basic include graph diagram test case * [t40002](./test_cases/t40002.md) - Cyclic include graph diagram test case diff --git a/docs/test_cases/t00002.md b/docs/test_cases/t00002.md index f7be2f21..0ae380e7 100644 --- a/docs/test_cases/t00002.md +++ b/docs/test_cases/t00002.md @@ -27,7 +27,7 @@ diagrams: - 'note for {{ alias("D") }} "{{ comment("D").text }}"' ``` ## Source code -File t00002.cc +File `tests/t00002/t00002.cc` ```cpp #include @@ -139,7 +139,7 @@ private: "raw": "/// \\brief This is class A", "text": "\n \n" }, - "display_name": "clanguml::t00002::A", + "display_name": "A", "id": "987634239855407298", "is_abstract": true, "is_nested": false, @@ -163,6 +163,7 @@ private: "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -196,6 +197,7 @@ private: "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -246,7 +248,7 @@ private: "raw": "/// \\brief This is class B", "text": "\n \n" }, - "display_name": "clanguml::t00002::B", + "display_name": "B", "id": "594234458687375950", "is_abstract": false, "is_nested": false, @@ -262,6 +264,7 @@ private: "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -313,7 +316,7 @@ private: "raw": "/// @brief This is class C - class C has a long comment\n///\n/// Vivamus integer non suscipit taciti mus etiam at primis tempor sagittis sit,\n/// euismod libero facilisi aptent elementum felis blandit cursus gravida sociis\n/// erat ante, eleifend lectus nullam dapibus netus feugiat curae curabitur est\n/// ad.", "text": "\n \n\n Vivamus integer non suscipit taciti mus etiam at primis tempor sagittis sit,\n euismod libero facilisi aptent elementum felis blandit cursus gravida sociis\n erat ante, eleifend lectus nullam dapibus netus feugiat curae curabitur est\n ad.\n" }, - "display_name": "clanguml::t00002::C", + "display_name": "C", "id": "1142499429598587507", "is_abstract": false, "is_nested": false, @@ -337,6 +340,7 @@ private: "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -390,7 +394,7 @@ private: "raw": "/// This is class D\n/// which is a little like B\n/// and a little like C", "text": "\n This is class D\n which is a little like B\n and a little like C\n" }, - "display_name": "clanguml::t00002::D", + "display_name": "D", "id": "60950494980414724", "is_abstract": false, "is_nested": false, @@ -435,6 +439,7 @@ private: "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -468,6 +473,7 @@ private: "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -513,7 +519,7 @@ private: "name": "clanguml::t00002::C" } ], - "display_name": "clanguml::t00002::E", + "display_name": "E", "id": "2237886670308966220", "is_abstract": false, "is_nested": false, @@ -558,6 +564,7 @@ private: "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -591,6 +598,7 @@ private: "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -623,6 +631,7 @@ private: } ], "name": "t00002_class", + "package_type": "namespace", "relationships": [ { "access": "public", diff --git a/docs/test_cases/t00002_class.svg b/docs/test_cases/t00002_class.svg index 9457a489..f2764550 100644 --- a/docs/test_cases/t00002_class.svg +++ b/docs/test_cases/t00002_class.svg @@ -1,6 +1,6 @@ - + @@ -10,123 +10,123 @@ Basic class diagram example - - + + A - + - + foo_a() = 0 : void - + - + foo_c() = 0 : void - - + + B - + - + foo_a() : void - - + + C - + - + foo_c() : void - - + + D - + - + foo_a() : void - + - + foo_c() : void - + - + as : std::vector<A *> - - + + E - + - + foo_a() : void - + - + foo_c() : void - + - + as : std::vector<A *> - + This is class A - + This is class B - + This is class D diff --git a/docs/test_cases/t00002_class_mermaid.svg b/docs/test_cases/t00002_class_mermaid.svg index e9eacc3d..1b2258d6 100644 --- a/docs/test_cases/t00002_class_mermaid.svg +++ b/docs/test_cases/t00002_class_mermaid.svg @@ -169,7 +169,7 @@ - + @@ -198,7 +198,7 @@ - + @@ -222,7 +222,7 @@ - + @@ -246,7 +246,7 @@ - + @@ -280,7 +280,7 @@ - + diff --git a/docs/test_cases/t00003.md b/docs/test_cases/t00003.md index 1c86ff73..1814dcc7 100644 --- a/docs/test_cases/t00003.md +++ b/docs/test_cases/t00003.md @@ -13,7 +13,7 @@ diagrams: ``` ## Source code -File t00003.cc +File `tests/t00003/t00003.cc` ```cpp #include #include @@ -103,7 +103,7 @@ int A::static_int = 1; "elements": [ { "bases": [], - "display_name": "clanguml::t00003::A", + "display_name": "A", "id": "1371951663534295727", "is_abstract": false, "is_nested": false, @@ -240,6 +240,7 @@ int A::static_int = 1; "is_constexpr": false, "is_constructor": true, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": true, "is_deleted": false, "is_move_assignment": false, @@ -265,6 +266,7 @@ int A::static_int = 1; "is_constexpr": false, "is_constructor": true, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -295,6 +297,7 @@ int A::static_int = 1; "is_constexpr": false, "is_constructor": true, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": true, "is_deleted": false, "is_move_assignment": false, @@ -325,6 +328,7 @@ int A::static_int = 1; "is_constexpr": false, "is_constructor": true, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": true, "is_move_assignment": false, @@ -355,6 +359,7 @@ int A::static_int = 1; "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": true, "is_deleted": false, "is_move_assignment": false, @@ -380,6 +385,7 @@ int A::static_int = 1; "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -405,6 +411,7 @@ int A::static_int = 1; "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -430,6 +437,7 @@ int A::static_int = 1; "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -455,6 +463,7 @@ int A::static_int = 1; "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -480,6 +489,7 @@ int A::static_int = 1; "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -505,6 +515,7 @@ int A::static_int = 1; "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": true, @@ -535,6 +546,7 @@ int A::static_int = 1; "is_constexpr": false, "is_constructor": false, "is_copy_assignment": true, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -565,6 +577,7 @@ int A::static_int = 1; "is_constexpr": true, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -590,6 +603,7 @@ int A::static_int = 1; "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -620,6 +634,7 @@ int A::static_int = 1; "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -654,6 +669,7 @@ int A::static_int = 1; "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -685,6 +701,7 @@ int A::static_int = 1; "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -720,6 +737,7 @@ int A::static_int = 1; "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -750,6 +768,7 @@ int A::static_int = 1; "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -775,6 +794,7 @@ int A::static_int = 1; "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -800,6 +820,7 @@ int A::static_int = 1; "is_constexpr": false, "is_constructor": true, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -831,6 +852,7 @@ int A::static_int = 1; } ], "name": "t00003_class", + "package_type": "namespace", "relationships": [], "using_namespace": "clanguml::t00003" } diff --git a/docs/test_cases/t00003_class.svg b/docs/test_cases/t00003_class.svg index 9c902a68..d554e457 100644 --- a/docs/test_cases/t00003_class.svg +++ b/docs/test_cases/t00003_class.svg @@ -1,6 +1,6 @@ - + @@ -9,227 +9,227 @@ - - + + A - + - + A() = default : void - + - + A(int i) : void - + - + A(A &&) = default : void - + - + A(const A &) = deleted : void A<T>(T t) : void - + - + ~A() = default : void - + - + operator=(A && other) noexcept : A & - + - + operator=(A & other) noexcept : A & - + - + operator++() : A & - + - + auto_method() : int - + - + basic_method() : void - + - + const_method() const : void - + - + create_from_int(int i) : A - + - + default_int(int i = 12) : int - + - + default_string(int i, std::string s = "abc") : std::string - + - + double_int(const int i) : int - + - + private_method() : void - + - + protected_method() : void - + - + size() constexpr const : std::size_t - + - + static_method() : int - + - + sum(const double a, const double b) : int - + - + a_ : int - + - + auto_member : const unsigned long - + - + b_ : int - + - + c_ : int - + - + compare : std::function<bool (const int)> - + - + private_member : int - + - + protected_member : int - + - + public_member : int - + - + static_const_int : const int - + - + static_int : int diff --git a/docs/test_cases/t00003_class_mermaid.svg b/docs/test_cases/t00003_class_mermaid.svg index f2e3c3cb..e9e3f595 100644 --- a/docs/test_cases/t00003_class_mermaid.svg +++ b/docs/test_cases/t00003_class_mermaid.svg @@ -52,7 +52,7 @@ - + diff --git a/docs/test_cases/t00004.md b/docs/test_cases/t00004.md index 4b7b036b..3eb44170 100644 --- a/docs/test_cases/t00004.md +++ b/docs/test_cases/t00004.md @@ -13,7 +13,7 @@ diagrams: ``` ## Source code -File t00004.cc +File `tests/t00004/t00004.cc` ```cpp namespace clanguml { namespace t00004 { @@ -80,7 +80,7 @@ public: "elements": [ { "bases": [], - "display_name": "clanguml::t00004::B", + "display_name": "B", "id": "1232624428734051711", "is_abstract": false, "is_nested": false, @@ -106,7 +106,7 @@ public: "AA_2", "AA_3" ], - "display_name": "clanguml::t00004::B::AA", + "display_name": "B::AA", "id": "1630205507215126623", "is_nested": true, "name": "B::AA", @@ -121,7 +121,7 @@ public: }, { "bases": [], - "display_name": "clanguml::t00004::A", + "display_name": "A", "id": "1552274940876611774", "is_abstract": false, "is_nested": false, @@ -137,6 +137,7 @@ public: "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -162,6 +163,7 @@ public: "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -194,7 +196,7 @@ public: }, { "bases": [], - "display_name": "clanguml::t00004::A::AA", + "display_name": "A::AA", "id": "1742499843727859552", "is_abstract": false, "is_nested": true, @@ -220,7 +222,7 @@ public: "Yellow", "Red" ], - "display_name": "clanguml::t00004::A::AA::Lights", + "display_name": "A::AA::Lights", "id": "590936874508841244", "is_nested": true, "name": "A::AA::Lights", @@ -235,7 +237,7 @@ public: }, { "bases": [], - "display_name": "clanguml::t00004::A::AA::AAA", + "display_name": "A::AA::AAA", "id": "1430186633004282131", "is_abstract": false, "is_nested": true, @@ -257,7 +259,7 @@ public: }, { "bases": [], - "display_name": "clanguml::t00004::C::B", + "display_name": "C::B", "id": "287819369330075965", "is_abstract": false, "is_nested": false, @@ -286,7 +288,7 @@ public: }, { "bases": [], - "display_name": "clanguml::t00004::C", + "display_name": "C", "id": "2278328177727440136", "is_abstract": false, "is_nested": false, @@ -340,7 +342,7 @@ public: }, { "bases": [], - "display_name": "clanguml::t00004::C::AA", + "display_name": "C::AA", "id": "623940132897927654", "is_abstract": false, "is_nested": true, @@ -362,7 +364,7 @@ public: }, { "bases": [], - "display_name": "clanguml::t00004::C::AA::AAA", + "display_name": "C::AA::AAA", "id": "1597801087286500866", "is_abstract": false, "is_nested": true, @@ -387,7 +389,7 @@ public: "CCC_1", "CCC_2" ], - "display_name": "clanguml::t00004::C::AA::CCC", + "display_name": "C::AA::CCC", "id": "81819202639599734", "is_nested": true, "name": "C::AA::CCC", @@ -402,7 +404,7 @@ public: }, { "bases": [], - "display_name": "clanguml::t00004::C::B", + "display_name": "C::B", "id": "1381298335849583950", "is_abstract": false, "is_nested": true, @@ -447,7 +449,7 @@ public: "CC_1", "CC_2" ], - "display_name": "clanguml::t00004::C::CC", + "display_name": "C::CC", "id": "2037378936100378699", "is_nested": true, "name": "C::CC", @@ -462,7 +464,7 @@ public: }, { "bases": [], - "display_name": "clanguml::t00004::detail::D", + "display_name": "detail::D", "id": "612133170877135796", "is_abstract": false, "is_nested": false, @@ -488,7 +490,7 @@ public: "AA_2", "AA_3" ], - "display_name": "clanguml::t00004::detail::D::AA", + "display_name": "detail::D::AA", "id": "1572080057917630922", "is_nested": true, "name": "D::AA", @@ -503,7 +505,7 @@ public: }, { "bases": [], - "display_name": "clanguml::t00004::detail::D::DD", + "display_name": "detail::D::DD", "id": "600916232677555492", "is_abstract": false, "is_nested": true, @@ -525,6 +527,7 @@ public: } ], "name": "t00004_class", + "package_type": "namespace", "relationships": [ { "access": "public", diff --git a/docs/test_cases/t00004_class.svg b/docs/test_cases/t00004_class.svg index f8143353..cdd34a5c 100644 --- a/docs/test_cases/t00004_class.svg +++ b/docs/test_cases/t00004_class.svg @@ -1,6 +1,6 @@ - + @@ -9,16 +9,16 @@ - - + + B - - + + B::AA @@ -28,38 +28,38 @@ AA_3 - - + + A - + - + foo() const : void - + - + foo2() const : void - - + + A::AA - - + + A::AA::Lights @@ -69,16 +69,16 @@ Red - - + + A::AA::AAA - - + + C::B @@ -87,8 +87,8 @@ - - + + C @@ -97,38 +97,38 @@ - + - + b_int : B<int> - + - + t : T - - + + C::AA - - + + C::AA::AAA - - + + C::AA::CCC @@ -137,8 +137,8 @@ CCC_2 - - + + C::B @@ -147,15 +147,15 @@ - + - + b : V - - + + C::CC @@ -164,16 +164,16 @@ CC_2 - - + + detail::D - - + + detail::D::AA @@ -183,8 +183,8 @@ AA_3 - - + + detail::D::DD diff --git a/docs/test_cases/t00004_class_mermaid.svg b/docs/test_cases/t00004_class_mermaid.svg index 51589e80..f1d47fc2 100644 --- a/docs/test_cases/t00004_class_mermaid.svg +++ b/docs/test_cases/t00004_class_mermaid.svg @@ -210,7 +210,7 @@ - + @@ -229,7 +229,7 @@ - + @@ -263,7 +263,7 @@ - + @@ -292,7 +292,7 @@ - + @@ -311,7 +311,7 @@ - + @@ -345,7 +345,7 @@ - + @@ -364,7 +364,7 @@ - + @@ -383,7 +383,7 @@ - + @@ -412,7 +412,7 @@ - + @@ -431,7 +431,7 @@ - + @@ -450,7 +450,7 @@ - + @@ -479,7 +479,7 @@ - + @@ -503,7 +503,7 @@ - + @@ -532,7 +532,7 @@ - + @@ -551,7 +551,7 @@ - + @@ -585,7 +585,7 @@ - + diff --git a/docs/test_cases/t00005.md b/docs/test_cases/t00005.md index cfcbaf55..398e3f3a 100644 --- a/docs/test_cases/t00005.md +++ b/docs/test_cases/t00005.md @@ -13,7 +13,7 @@ diagrams: ``` ## Source code -File t00005.cc +File `tests/t00005/t00005.cc` ```cpp namespace clanguml { namespace t00005 { @@ -72,7 +72,7 @@ public: "elements": [ { "bases": [], - "display_name": "clanguml::t00005::A", + "display_name": "A", "id": "96355893895780319", "is_abstract": false, "is_nested": false, @@ -94,7 +94,7 @@ public: }, { "bases": [], - "display_name": "clanguml::t00005::B", + "display_name": "B", "id": "1909425857334087541", "is_abstract": false, "is_nested": false, @@ -116,7 +116,7 @@ public: }, { "bases": [], - "display_name": "clanguml::t00005::C", + "display_name": "C", "id": "968176384460064907", "is_abstract": false, "is_nested": false, @@ -138,7 +138,7 @@ public: }, { "bases": [], - "display_name": "clanguml::t00005::D", + "display_name": "D", "id": "1735599590836186693", "is_abstract": false, "is_nested": false, @@ -160,7 +160,7 @@ public: }, { "bases": [], - "display_name": "clanguml::t00005::E", + "display_name": "E", "id": "887960136921844658", "is_abstract": false, "is_nested": false, @@ -182,7 +182,7 @@ public: }, { "bases": [], - "display_name": "clanguml::t00005::F", + "display_name": "F", "id": "772719357856231772", "is_abstract": false, "is_nested": false, @@ -204,7 +204,7 @@ public: }, { "bases": [], - "display_name": "clanguml::t00005::G", + "display_name": "G", "id": "979147885884736437", "is_abstract": false, "is_nested": false, @@ -226,7 +226,7 @@ public: }, { "bases": [], - "display_name": "clanguml::t00005::H", + "display_name": "H", "id": "1440673301054236675", "is_abstract": false, "is_nested": false, @@ -248,7 +248,7 @@ public: }, { "bases": [], - "display_name": "clanguml::t00005::I", + "display_name": "I", "id": "109681731550086430", "is_abstract": false, "is_nested": false, @@ -270,7 +270,7 @@ public: }, { "bases": [], - "display_name": "clanguml::t00005::J", + "display_name": "J", "id": "338330011969650325", "is_abstract": false, "is_nested": false, @@ -292,7 +292,7 @@ public: }, { "bases": [], - "display_name": "clanguml::t00005::K", + "display_name": "K", "id": "2179119389830432509", "is_abstract": false, "is_nested": false, @@ -314,7 +314,7 @@ public: }, { "bases": [], - "display_name": "clanguml::t00005::R", + "display_name": "R", "id": "630692407373144211", "is_abstract": false, "is_nested": false, @@ -517,6 +517,7 @@ public: } ], "name": "t00005_class", + "package_type": "namespace", "relationships": [ { "access": "public", diff --git a/docs/test_cases/t00005_class.svg b/docs/test_cases/t00005_class.svg index dff1eb8f..ed43cd1e 100644 --- a/docs/test_cases/t00005_class.svg +++ b/docs/test_cases/t00005_class.svg @@ -1,6 +1,6 @@ - + @@ -9,205 +9,205 @@ - - + + A - - + + B - - + + C - - + + D - - + + E - - + + F - - + + G - - + + H - - + + I - - + + J - - + + K - - + + R - + - + a : A - + - + b : B * - + - + c : C & - + - + d : const D * - + - + e : const E & - + - + f : F && - + - + g : G ** - + - + h : H *** - + - + i : I *& - + - + j : volatile J * - + - + k : K * - + - + some_int : int - + - + some_int_pointer : int * - + - + some_int_pointer_pointer : int ** - + - + some_int_reference : int & diff --git a/docs/test_cases/t00005_class_mermaid.svg b/docs/test_cases/t00005_class_mermaid.svg index 4ccee16d..90885aa8 100644 --- a/docs/test_cases/t00005_class_mermaid.svg +++ b/docs/test_cases/t00005_class_mermaid.svg @@ -186,7 +186,7 @@ - + @@ -205,7 +205,7 @@ - + @@ -224,7 +224,7 @@ - + @@ -243,7 +243,7 @@ - + @@ -262,7 +262,7 @@ - + @@ -281,7 +281,7 @@ - + @@ -300,7 +300,7 @@ - + @@ -319,7 +319,7 @@ - + @@ -338,7 +338,7 @@ - + @@ -357,7 +357,7 @@ - + @@ -376,7 +376,7 @@ - + @@ -395,7 +395,7 @@ - + diff --git a/docs/test_cases/t00006.md b/docs/test_cases/t00006.md index a6bf6f58..3d1aa118 100644 --- a/docs/test_cases/t00006.md +++ b/docs/test_cases/t00006.md @@ -13,7 +13,7 @@ diagrams: ``` ## Source code -File t00006.cc +File `tests/t00006/t00006.cc` ```cpp #include #include @@ -96,7 +96,7 @@ public: "elements": [ { "bases": [], - "display_name": "clanguml::t00006::A", + "display_name": "A", "id": "989095304444672400", "is_abstract": false, "is_nested": false, @@ -118,7 +118,7 @@ public: }, { "bases": [], - "display_name": "clanguml::t00006::B", + "display_name": "B", "id": "648285260245005311", "is_abstract": false, "is_nested": false, @@ -140,7 +140,7 @@ public: }, { "bases": [], - "display_name": "clanguml::t00006::C", + "display_name": "C", "id": "323304333007297774", "is_abstract": false, "is_nested": false, @@ -162,7 +162,7 @@ public: }, { "bases": [], - "display_name": "clanguml::t00006::D", + "display_name": "D", "id": "1006912399043633492", "is_abstract": false, "is_nested": false, @@ -184,7 +184,7 @@ public: }, { "bases": [], - "display_name": "clanguml::t00006::E", + "display_name": "E", "id": "1092550394020578978", "is_abstract": false, "is_nested": false, @@ -206,7 +206,7 @@ public: }, { "bases": [], - "display_name": "clanguml::t00006::F", + "display_name": "F", "id": "965398761810782236", "is_abstract": false, "is_nested": false, @@ -228,7 +228,7 @@ public: }, { "bases": [], - "display_name": "clanguml::t00006::G", + "display_name": "G", "id": "1764732000887030464", "is_abstract": false, "is_nested": false, @@ -250,7 +250,7 @@ public: }, { "bases": [], - "display_name": "clanguml::t00006::H", + "display_name": "H", "id": "1669285599837552146", "is_abstract": false, "is_nested": false, @@ -272,7 +272,7 @@ public: }, { "bases": [], - "display_name": "clanguml::t00006::I", + "display_name": "I", "id": "2234750598599000377", "is_abstract": false, "is_nested": false, @@ -294,7 +294,7 @@ public: }, { "bases": [], - "display_name": "clanguml::t00006::J", + "display_name": "J", "id": "1335933649375465369", "is_abstract": false, "is_nested": false, @@ -316,7 +316,7 @@ public: }, { "bases": [], - "display_name": "clanguml::t00006::K", + "display_name": "K", "id": "1603190364864080123", "is_abstract": false, "is_nested": false, @@ -338,7 +338,7 @@ public: }, { "bases": [], - "display_name": "clanguml::t00006::L", + "display_name": "L", "id": "305487238408320046", "is_abstract": false, "is_nested": false, @@ -360,7 +360,7 @@ public: }, { "bases": [], - "display_name": "clanguml::t00006::M", + "display_name": "M", "id": "1664744512423723275", "is_abstract": false, "is_nested": false, @@ -382,7 +382,7 @@ public: }, { "bases": [], - "display_name": "clanguml::t00006::N", + "display_name": "N", "id": "950210019792152600", "is_abstract": false, "is_nested": false, @@ -404,7 +404,7 @@ public: }, { "bases": [], - "display_name": "clanguml::t00006::NN", + "display_name": "NN", "id": "1662349735899726224", "is_abstract": false, "is_nested": false, @@ -426,7 +426,7 @@ public: }, { "bases": [], - "display_name": "clanguml::t00006::NNN", + "display_name": "NNN", "id": "1963145075481599858", "is_abstract": false, "is_nested": false, @@ -448,7 +448,7 @@ public: }, { "bases": [], - "display_name": "clanguml::t00006::custom_container", + "display_name": "custom_container", "id": "916380191954937631", "is_abstract": false, "is_nested": false, @@ -490,7 +490,7 @@ public: }, { "bases": [], - "display_name": "clanguml::t00006::custom_container", + "display_name": "custom_container", "id": "50153113082434858", "is_abstract": false, "is_nested": false, @@ -519,7 +519,7 @@ public: }, { "bases": [], - "display_name": "clanguml::t00006::R", + "display_name": "R", "id": "303025561016882526", "is_abstract": false, "is_nested": false, @@ -698,6 +698,7 @@ public: } ], "name": "t00006_class", + "package_type": "namespace", "relationships": [ { "access": "public", diff --git a/docs/test_cases/t00006_class.svg b/docs/test_cases/t00006_class.svg index 554d0cf4..1f44cd05 100644 --- a/docs/test_cases/t00006_class.svg +++ b/docs/test_cases/t00006_class.svg @@ -1,6 +1,6 @@ - + @@ -9,136 +9,136 @@ - - + + A - - + + B - - + + C - - + + D - - + + E - - + + F - - + + G - - + + H - - + + I - - + + J - - + + K - - + + L - - + + M - - + + N - - + + NN - - + + NNN - - + + custom_container @@ -147,15 +147,15 @@ - + - + data : std::vector<T> - - + + custom_container @@ -164,103 +164,103 @@ - - + + R - + - + a : std::vector<A> - + - + b : std::vector<B *> - + - + c : std::map<int,C> - + - + d : std::map<int,D *> - + - + e : custom_container<E> - + - + f : std::vector<std::vector<F>> - + - + g : std::map<int,std::vector<G *>> - + - + h : std::array<H,10> - + - + i : std::array<I *,5> - + - + j : J[10] - + - + k : K *[20] - + - + lm : std::vector<std::pair<L,M>> - + - + ns : std::tuple<N,NN,NNN> diff --git a/docs/test_cases/t00006_class_mermaid.svg b/docs/test_cases/t00006_class_mermaid.svg index 6476f4a6..b4e14635 100644 --- a/docs/test_cases/t00006_class_mermaid.svg +++ b/docs/test_cases/t00006_class_mermaid.svg @@ -270,7 +270,7 @@ - + @@ -289,7 +289,7 @@ - + @@ -308,7 +308,7 @@ - + @@ -327,7 +327,7 @@ - + @@ -346,7 +346,7 @@ - + @@ -365,7 +365,7 @@ - + @@ -384,7 +384,7 @@ - + @@ -403,7 +403,7 @@ - + @@ -422,7 +422,7 @@ - + @@ -441,7 +441,7 @@ - + @@ -460,7 +460,7 @@ - + @@ -479,7 +479,7 @@ - + @@ -498,7 +498,7 @@ - + @@ -517,7 +517,7 @@ - + @@ -536,7 +536,7 @@ - + @@ -555,7 +555,7 @@ - + @@ -574,7 +574,7 @@ - + @@ -598,7 +598,7 @@ - + @@ -617,7 +617,7 @@ - + diff --git a/docs/test_cases/t00007.md b/docs/test_cases/t00007.md index 8f9bb8e3..73bb122d 100644 --- a/docs/test_cases/t00007.md +++ b/docs/test_cases/t00007.md @@ -13,7 +13,7 @@ diagrams: ``` ## Source code -File t00007.cc +File `tests/t00007/t00007.cc` ```cpp #include @@ -46,7 +46,7 @@ public: "elements": [ { "bases": [], - "display_name": "clanguml::t00007::A", + "display_name": "A", "id": "98876622534017019", "is_abstract": false, "is_nested": false, @@ -68,7 +68,7 @@ public: }, { "bases": [], - "display_name": "clanguml::t00007::B", + "display_name": "B", "id": "696381312773707784", "is_abstract": false, "is_nested": false, @@ -90,7 +90,7 @@ public: }, { "bases": [], - "display_name": "clanguml::t00007::C", + "display_name": "C", "id": "972031178679364068", "is_abstract": false, "is_nested": false, @@ -112,7 +112,7 @@ public: }, { "bases": [], - "display_name": "clanguml::t00007::R", + "display_name": "R", "id": "66905874721300157", "is_abstract": false, "is_nested": false, @@ -171,6 +171,7 @@ public: } ], "name": "t00007_class", + "package_type": "namespace", "relationships": [ { "access": "public", diff --git a/docs/test_cases/t00007_class.svg b/docs/test_cases/t00007_class.svg index fd6b9057..ac722d91 100644 --- a/docs/test_cases/t00007_class.svg +++ b/docs/test_cases/t00007_class.svg @@ -1,6 +1,6 @@ - + @@ -9,57 +9,57 @@ - - + + A - - + + B - - + + C - - + + R - + - + a : std::unique_ptr<A> - + - + b : std::shared_ptr<B> - + - + c : std::weak_ptr<C> diff --git a/docs/test_cases/t00007_class_mermaid.svg b/docs/test_cases/t00007_class_mermaid.svg index 5a68b373..c5929f5b 100644 --- a/docs/test_cases/t00007_class_mermaid.svg +++ b/docs/test_cases/t00007_class_mermaid.svg @@ -90,7 +90,7 @@ - + @@ -109,7 +109,7 @@ - + @@ -128,7 +128,7 @@ - + @@ -147,7 +147,7 @@ - + diff --git a/docs/test_cases/t00008.md b/docs/test_cases/t00008.md index 9ee1aa14..5acd5616 100644 --- a/docs/test_cases/t00008.md +++ b/docs/test_cases/t00008.md @@ -13,7 +13,7 @@ diagrams: ``` ## Source code -File t00008.cc +File `tests/t00008/t00008.cc` ```cpp #include #include @@ -79,7 +79,7 @@ template <> struct E::nested_template { "elements": [ { "bases": [], - "display_name": "clanguml::t00008::A", + "display_name": "A", "id": "2293517130897538130", "is_abstract": false, "is_nested": false, @@ -203,7 +203,7 @@ template <> struct E::nested_template { }, { "bases": [], - "display_name": "clanguml::t00008::Vector", + "display_name": "Vector", "id": "1677407014842680311", "is_abstract": false, "is_nested": false, @@ -245,7 +245,7 @@ template <> struct E::nested_template { }, { "bases": [], - "display_name": "clanguml::t00008::B>", + "display_name": "B>", "id": "1968575752686868237", "is_abstract": false, "is_nested": false, @@ -293,7 +293,7 @@ template <> struct E::nested_template { }, { "bases": [], - "display_name": "clanguml::t00008::B", + "display_name": "B", "id": "1449136415707203971", "is_abstract": false, "is_nested": false, @@ -328,7 +328,7 @@ template <> struct E::nested_template { }, { "bases": [], - "display_name": "clanguml::t00008::D", + "display_name": "D", "id": "1562396858816419857", "is_abstract": false, "is_nested": false, @@ -357,6 +357,7 @@ template <> struct E::nested_template { "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -387,6 +388,7 @@ template <> struct E::nested_template { "is_constexpr": false, "is_constructor": true, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -418,7 +420,7 @@ template <> struct E::nested_template { }, { "bases": [], - "display_name": "clanguml::t00008::E", + "display_name": "E", "id": "1787658457052431115", "is_abstract": false, "is_nested": false, @@ -440,7 +442,7 @@ template <> struct E::nested_template { }, { "bases": [], - "display_name": "clanguml::t00008::E::nested_template", + "display_name": "E::nested_template", "id": "1549419203490064906", "is_abstract": false, "is_nested": true, @@ -456,6 +458,7 @@ template <> struct E::nested_template { "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -500,7 +503,7 @@ template <> struct E::nested_template { }, { "bases": [], - "display_name": "clanguml::t00008::E::nested_template", + "display_name": "E::nested_template", "id": "33637089897037832", "is_abstract": false, "is_nested": true, @@ -516,6 +519,7 @@ template <> struct E::nested_template { "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -560,6 +564,7 @@ template <> struct E::nested_template { } ], "name": "t00008_class", + "package_type": "namespace", "relationships": [ { "access": "public", diff --git a/docs/test_cases/t00008_class.svg b/docs/test_cases/t00008_class.svg index b4261568..1de1a238 100644 --- a/docs/test_cases/t00008_class.svg +++ b/docs/test_cases/t00008_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + A @@ -19,50 +19,50 @@ - + - + comparator : CMP - + - + ints : std::array<int,N> - + - + pointer : T * - + - + reference : T & - + - + value : T - + - + values : std::vector<P> - - + + Vector @@ -71,15 +71,15 @@ - + - + values : std::vector<T> - - + + B @@ -88,15 +88,15 @@ - + - + template_template : C<T> - - + + B @@ -105,8 +105,8 @@ - - + + D @@ -115,31 +115,31 @@ D<Items...>(std::tuple<Items...> *) : void - + - + add(int i) : void - + - + ints : B<int,Vector> - - + + E - - + + E::nested_template @@ -147,16 +147,16 @@ ET - + - + get(ET * d) : DT * - - + + E::nested_template @@ -164,11 +164,11 @@ char - + - + getDecl(char * c) : DeclType * diff --git a/docs/test_cases/t00008_class_mermaid.svg b/docs/test_cases/t00008_class_mermaid.svg index 9d2c9549..3c4131e0 100644 --- a/docs/test_cases/t00008_class_mermaid.svg +++ b/docs/test_cases/t00008_class_mermaid.svg @@ -114,7 +114,7 @@ - + @@ -163,7 +163,7 @@ - + @@ -187,7 +187,7 @@ - + @@ -211,7 +211,7 @@ - + @@ -230,7 +230,7 @@ - + @@ -264,7 +264,7 @@ - + @@ -283,7 +283,7 @@ - + @@ -307,7 +307,7 @@ - + diff --git a/docs/test_cases/t00009.md b/docs/test_cases/t00009.md index e8eabe68..2bccfcb8 100644 --- a/docs/test_cases/t00009.md +++ b/docs/test_cases/t00009.md @@ -13,7 +13,7 @@ diagrams: ``` ## Source code -File t00009.cc +File `tests/t00009/t00009.cc` ```cpp #include #include @@ -47,7 +47,7 @@ public: "elements": [ { "bases": [], - "display_name": "clanguml::t00009::A", + "display_name": "A", "id": "412228989111660105", "is_abstract": false, "is_nested": false, @@ -89,7 +89,7 @@ public: }, { "bases": [], - "display_name": "clanguml::t00009::A", + "display_name": "A", "id": "1894387438043499", "is_abstract": false, "is_nested": false, @@ -118,7 +118,7 @@ public: }, { "bases": [], - "display_name": "clanguml::t00009::A", + "display_name": "A", "id": "1340793233843139195", "is_abstract": false, "is_nested": false, @@ -147,7 +147,7 @@ public: }, { "bases": [], - "display_name": "clanguml::t00009::A>", + "display_name": "A>", "id": "1370808797762248850", "is_abstract": false, "is_nested": false, @@ -183,7 +183,7 @@ public: }, { "bases": [], - "display_name": "clanguml::t00009::B", + "display_name": "B", "id": "176239714450247310", "is_abstract": false, "is_nested": false, @@ -242,6 +242,7 @@ public: } ], "name": "t00009_class", + "package_type": "namespace", "relationships": [ { "access": "public", diff --git a/docs/test_cases/t00009_class.svg b/docs/test_cases/t00009_class.svg index 18770a6e..41be461e 100644 --- a/docs/test_cases/t00009_class.svg +++ b/docs/test_cases/t00009_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + A @@ -19,15 +19,15 @@ - + - + value : T - - + + A @@ -36,8 +36,8 @@ - - + + A @@ -46,8 +46,8 @@ - - + + A @@ -56,33 +56,33 @@ - - + + B - + - + aint : A<int> - + - + astring : A<std::string> * - + - + avector : A<std::vector<std::string>> & diff --git a/docs/test_cases/t00009_class_mermaid.svg b/docs/test_cases/t00009_class_mermaid.svg index ddebcaf1..51b960ac 100644 --- a/docs/test_cases/t00009_class_mermaid.svg +++ b/docs/test_cases/t00009_class_mermaid.svg @@ -126,7 +126,7 @@ - + @@ -150,7 +150,7 @@ - + @@ -169,7 +169,7 @@ - + @@ -188,7 +188,7 @@ - + @@ -207,7 +207,7 @@ - + diff --git a/docs/test_cases/t00010.md b/docs/test_cases/t00010.md index 624e3571..0ae27f3b 100644 --- a/docs/test_cases/t00010.md +++ b/docs/test_cases/t00010.md @@ -13,7 +13,7 @@ diagrams: ``` ## Source code -File t00010.cc +File `tests/t00010/t00010.cc` ```cpp #include #include @@ -51,7 +51,7 @@ public: "elements": [ { "bases": [], - "display_name": "clanguml::t00010::A", + "display_name": "A", "id": "2222216618904514099", "is_abstract": false, "is_nested": false, @@ -111,7 +111,7 @@ public: }, { "bases": [], - "display_name": "clanguml::t00010::A", + "display_name": "A", "id": "1861520693741915300", "is_abstract": false, "is_nested": false, @@ -146,7 +146,7 @@ public: }, { "bases": [], - "display_name": "clanguml::t00010::B", + "display_name": "B", "id": "2303611426082708583", "is_abstract": false, "is_nested": false, @@ -188,7 +188,7 @@ public: }, { "bases": [], - "display_name": "clanguml::t00010::B", + "display_name": "B", "id": "1498376939480949099", "is_abstract": false, "is_nested": false, @@ -217,7 +217,7 @@ public: }, { "bases": [], - "display_name": "clanguml::t00010::C", + "display_name": "C", "id": "1880966578968892571", "is_abstract": false, "is_nested": false, @@ -252,6 +252,7 @@ public: } ], "name": "t00010_class", + "package_type": "namespace", "relationships": [ { "access": "public", diff --git a/docs/test_cases/t00010_class.svg b/docs/test_cases/t00010_class.svg index 0b253b80..01cefb17 100644 --- a/docs/test_cases/t00010_class.svg +++ b/docs/test_cases/t00010_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + A @@ -19,22 +19,22 @@ - + - + first : T - + - + second : P - - + + A @@ -43,8 +43,8 @@ - - + + B @@ -53,15 +53,15 @@ - + - + astring : A<T,std::string> - - + + B @@ -70,19 +70,19 @@ - - + + C - + - + aintstring : B<int> diff --git a/docs/test_cases/t00010_class_mermaid.svg b/docs/test_cases/t00010_class_mermaid.svg index c70fed3e..32c876bf 100644 --- a/docs/test_cases/t00010_class_mermaid.svg +++ b/docs/test_cases/t00010_class_mermaid.svg @@ -102,7 +102,7 @@ - + @@ -131,7 +131,7 @@ - + @@ -150,7 +150,7 @@ - + @@ -174,7 +174,7 @@ - + @@ -193,7 +193,7 @@ - + diff --git a/docs/test_cases/t00011.md b/docs/test_cases/t00011.md index 8b361e80..fee12b52 100644 --- a/docs/test_cases/t00011.md +++ b/docs/test_cases/t00011.md @@ -13,7 +13,7 @@ diagrams: ``` ## Source code -File t00011.cc +File `tests/t00011/t00011.cc` ```cpp namespace external { class C { }; @@ -60,7 +60,7 @@ public: "elements": [ { "bases": [], - "display_name": "clanguml::t00011::D", + "display_name": "D", "id": "1150639902748052276", "is_abstract": false, "is_nested": false, @@ -102,7 +102,7 @@ public: }, { "bases": [], - "display_name": "clanguml::t00011::A", + "display_name": "A", "id": "1420516952857803719", "is_abstract": false, "is_nested": false, @@ -118,6 +118,7 @@ public: "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -150,7 +151,7 @@ public: }, { "bases": [], - "display_name": "clanguml::t00011::B", + "display_name": "B", "id": "1687427603952049829", "is_abstract": false, "is_nested": false, @@ -179,6 +180,7 @@ public: "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -211,6 +213,7 @@ public: } ], "name": "t00011_class", + "package_type": "namespace", "relationships": [ { "access": "public", diff --git a/docs/test_cases/t00011_class.svg b/docs/test_cases/t00011_class.svg index e2dc0aca..f206038a 100644 --- a/docs/test_cases/t00011_class.svg +++ b/docs/test_cases/t00011_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + D @@ -19,48 +19,48 @@ - + - + value : T - - + + A - + - + foo() : void - - + + B - + - + foo() : void - + - + m_a : A * diff --git a/docs/test_cases/t00011_class_mermaid.svg b/docs/test_cases/t00011_class_mermaid.svg index 615a4d81..2998a19a 100644 --- a/docs/test_cases/t00011_class_mermaid.svg +++ b/docs/test_cases/t00011_class_mermaid.svg @@ -78,7 +78,7 @@ - + @@ -102,7 +102,7 @@ - + @@ -126,7 +126,7 @@ - + diff --git a/docs/test_cases/t00012.md b/docs/test_cases/t00012.md index 4144b325..47106719 100644 --- a/docs/test_cases/t00012.md +++ b/docs/test_cases/t00012.md @@ -16,7 +16,7 @@ diagrams: ``` ## Source code -File t00012.cc +File `tests/t00012/t00012.cc` ```cpp #include #include @@ -67,7 +67,7 @@ class R { "elements": [ { "bases": [], - "display_name": "clanguml::t00012::A", + "display_name": "A", "id": "1773299890023132282", "is_abstract": false, "is_nested": false, @@ -127,7 +127,7 @@ class R { }, { "bases": [], - "display_name": "clanguml::t00012::B", + "display_name": "B", "id": "2061171077567279746", "is_abstract": false, "is_nested": false, @@ -170,7 +170,7 @@ class R { }, { "bases": [], - "display_name": "clanguml::t00012::C", + "display_name": "C", "id": "627809578407650629", "is_abstract": false, "is_nested": false, @@ -219,7 +219,7 @@ class R { }, { "bases": [], - "display_name": "clanguml::t00012::A", + "display_name": "A", "id": "286972398942005457", "is_abstract": false, "is_nested": false, @@ -260,7 +260,7 @@ class R { }, { "bases": [], - "display_name": "clanguml::t00012::A", + "display_name": "A", "id": "299466181098300963", "is_abstract": false, "is_nested": false, @@ -301,7 +301,7 @@ class R { }, { "bases": [], - "display_name": "clanguml::t00012::B<3,2,1>", + "display_name": "B<3,2,1>", "id": "489063277971613593", "is_abstract": false, "is_nested": false, @@ -342,7 +342,7 @@ class R { }, { "bases": [], - "display_name": "clanguml::t00012::B<1,1,1,1>", + "display_name": "B<1,1,1,1>", "id": "14232362483200599", "is_abstract": false, "is_nested": false, @@ -389,7 +389,7 @@ class R { }, { "bases": [], - "display_name": "clanguml::t00012::C>>>,3,3,3>", + "display_name": "C>>>,3,3,3>", "id": "1478239414632239754", "is_abstract": false, "is_nested": false, @@ -470,7 +470,7 @@ class R { }, { "bases": [], - "display_name": "clanguml::t00012::R", + "display_name": "R", "id": "559263385732885469", "is_abstract": false, "is_nested": false, @@ -553,6 +553,7 @@ class R { } ], "name": "t00012_class", + "package_type": "namespace", "relationships": [ { "access": "public", diff --git a/docs/test_cases/t00012_class.svg b/docs/test_cases/t00012_class.svg index dac2df08..32a3961e 100644 --- a/docs/test_cases/t00012_class.svg +++ b/docs/test_cases/t00012_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + A @@ -19,22 +19,22 @@ - + - + value : T - + - + values : std::variant<Ts...> - - + + B @@ -43,15 +43,15 @@ - + - + ints : std::array<int,sizeof...(Is)> - - + + C @@ -60,15 +60,15 @@ - + - + ints : std::array<T,sizeof...(Is)> - - + + A @@ -77,8 +77,8 @@ - - + + A @@ -87,8 +87,8 @@ - - + + B @@ -97,8 +97,8 @@ - - + + B @@ -107,8 +107,8 @@ - - + + C @@ -117,50 +117,50 @@ - - + + R - + - + a1 : A<int,std::string,float> - + - + a2 : A<int,std::string,bool> - + - + b1 : B<3,2,1> - + - + b2 : B<1,1,1,1> - + - + c1 : C<std::map<int,std::vector<std::vector<std::vector<std::string>>>>,3,3,3> - + Long template annotation diff --git a/docs/test_cases/t00012_class_mermaid.svg b/docs/test_cases/t00012_class_mermaid.svg index 76d79a4a..5723a64a 100644 --- a/docs/test_cases/t00012_class_mermaid.svg +++ b/docs/test_cases/t00012_class_mermaid.svg @@ -174,7 +174,7 @@ - + @@ -203,7 +203,7 @@ - + @@ -227,7 +227,7 @@ - + @@ -251,7 +251,7 @@ - + @@ -270,7 +270,7 @@ - + @@ -289,7 +289,7 @@ - + @@ -308,7 +308,7 @@ - + @@ -327,7 +327,7 @@ - + @@ -346,7 +346,7 @@ - + diff --git a/docs/test_cases/t00013.md b/docs/test_cases/t00013.md index 02ca593a..1e54e3d5 100644 --- a/docs/test_cases/t00013.md +++ b/docs/test_cases/t00013.md @@ -14,7 +14,7 @@ diagrams: ``` ## Source code -File t00013.cc +File `tests/t00013/t00013.cc` ```cpp #include #include @@ -166,7 +166,7 @@ private: }, { "bases": [], - "display_name": "clanguml::t00013::A", + "display_name": "A", "id": "519995486237427479", "is_abstract": false, "is_nested": false, @@ -201,7 +201,7 @@ private: }, { "bases": [], - "display_name": "clanguml::t00013::B", + "display_name": "B", "id": "1177487653597650440", "is_abstract": false, "is_nested": false, @@ -236,7 +236,7 @@ private: }, { "bases": [], - "display_name": "clanguml::t00013::C", + "display_name": "C", "id": "1028245818073128358", "is_abstract": false, "is_nested": false, @@ -271,7 +271,7 @@ private: }, { "bases": [], - "display_name": "clanguml::t00013::D", + "display_name": "D", "id": "409373870621931875", "is_abstract": false, "is_nested": false, @@ -300,6 +300,7 @@ private: "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -337,7 +338,7 @@ private: }, { "bases": [], - "display_name": "clanguml::t00013::E", + "display_name": "E", "id": "864055993755439230", "is_abstract": false, "is_nested": false, @@ -379,7 +380,7 @@ private: }, { "bases": [], - "display_name": "clanguml::t00013::G", + "display_name": "G", "id": "205927019127027617", "is_abstract": false, "is_nested": false, @@ -439,7 +440,7 @@ private: }, { "bases": [], - "display_name": "clanguml::t00013::E", + "display_name": "E", "id": "1977486318799565722", "is_abstract": false, "is_nested": false, @@ -468,7 +469,7 @@ private: }, { "bases": [], - "display_name": "clanguml::t00013::G", + "display_name": "G", "id": "1526733274613822014", "is_abstract": false, "is_nested": false, @@ -509,7 +510,7 @@ private: }, { "bases": [], - "display_name": "clanguml::t00013::E", + "display_name": "E", "id": "531523220915557686", "is_abstract": false, "is_nested": false, @@ -538,7 +539,7 @@ private: }, { "bases": [], - "display_name": "clanguml::t00013::R", + "display_name": "R", "id": "2198686676355573844", "is_abstract": false, "is_nested": false, @@ -579,6 +580,7 @@ private: "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -609,6 +611,7 @@ private: "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -639,6 +642,7 @@ private: "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -669,6 +673,7 @@ private: "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -699,6 +704,7 @@ private: "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -729,6 +735,7 @@ private: "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -759,6 +766,7 @@ private: "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -789,6 +797,7 @@ private: "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -819,6 +828,7 @@ private: "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -849,6 +859,7 @@ private: "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -873,6 +884,7 @@ private: "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -904,6 +916,7 @@ private: } ], "name": "t00013_class", + "package_type": "namespace", "relationships": [ { "access": "public", diff --git a/docs/test_cases/t00013_class.svg b/docs/test_cases/t00013_class.svg index e9da2fca..bca0a240 100644 --- a/docs/test_cases/t00013_class.svg +++ b/docs/test_cases/t00013_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + ABCD::F @@ -19,15 +19,15 @@ - + - + f : T - - + + ABCD::F @@ -36,75 +36,75 @@ - - + + A - + - + a : int - - + + B - + - + b : int - - + + C - + - + c : int - - + + D - + - + print(R * r) : void - + - + d : int - - + + E @@ -113,15 +113,15 @@ - + - + e : T - - + + G @@ -130,22 +130,22 @@ - + - + args : std::tuple<Args...> - + - + g : T - - + + E @@ -154,8 +154,8 @@ - - + + G @@ -164,8 +164,8 @@ - - + + E @@ -174,93 +174,93 @@ - - + + R - + - + get_a(A * a) : int - + - + get_b(B & b) : int - + - + get_c(C c) : int - + - + get_const_b(const B & b) : int - + - + get_d(D && d) : int - + - + get_d2(D && d) : int get_e<T>(E<T> e) : T get_f<T>(const F<T> & f) : T - + - + get_int_e(const E<int> & e) : int - + - + get_int_e2(E<int> & e) : int - + - + get_int_f(const ABCD::F<int> & f) : int - + - + estring : E<std::string> - + - + gintstring : G<int,float,std::string> diff --git a/docs/test_cases/t00013_class_mermaid.svg b/docs/test_cases/t00013_class_mermaid.svg index ad396bb6..b07bf1a1 100644 --- a/docs/test_cases/t00013_class_mermaid.svg +++ b/docs/test_cases/t00013_class_mermaid.svg @@ -234,7 +234,7 @@ - + @@ -258,7 +258,7 @@ - + @@ -277,7 +277,7 @@ - + @@ -301,7 +301,7 @@ - + @@ -325,7 +325,7 @@ - + @@ -349,7 +349,7 @@ - + @@ -378,7 +378,7 @@ - + @@ -402,7 +402,7 @@ - + @@ -431,7 +431,7 @@ - + @@ -450,7 +450,7 @@ - + @@ -469,7 +469,7 @@ - + @@ -488,7 +488,7 @@ - + diff --git a/docs/test_cases/t00014.md b/docs/test_cases/t00014.md index 05e676f5..bc04bc1c 100644 --- a/docs/test_cases/t00014.md +++ b/docs/test_cases/t00014.md @@ -18,7 +18,7 @@ diagrams: - direction LR ``` ## Source code -File t00014.cc +File `tests/t00014/t00014.cc` ```cpp #include #include @@ -115,7 +115,7 @@ public: "elements": [ { "bases": [], - "display_name": "clanguml::t00014::A", + "display_name": "A", "id": "765890579167335652", "is_abstract": false, "is_nested": false, @@ -175,7 +175,7 @@ public: }, { "bases": [], - "display_name": "clanguml::t00014::B", + "display_name": "B", "id": "934136012292043506", "is_abstract": false, "is_nested": false, @@ -210,7 +210,7 @@ public: }, { "bases": [], - "display_name": "clanguml::t00014::A", + "display_name": "A", "id": "2186387853087008570", "is_abstract": false, "is_nested": false, @@ -245,7 +245,7 @@ public: }, { "bases": [], - "display_name": "clanguml::t00014::A>", + "display_name": "A>", "id": "947292733740993297", "is_abstract": false, "is_nested": false, @@ -287,7 +287,7 @@ public: }, { "bases": [], - "display_name": "clanguml::t00014::A", + "display_name": "A", "id": "1700006390494465667", "is_abstract": false, "is_nested": false, @@ -322,7 +322,7 @@ public: }, { "bases": [], - "display_name": "clanguml::t00014::A", + "display_name": "A", "id": "2017665567517853203", "is_abstract": false, "is_nested": false, @@ -357,7 +357,7 @@ public: }, { "bases": [], - "display_name": "clanguml::t00014::A", + "display_name": "A", "id": "906557320263235873", "is_abstract": false, "is_nested": false, @@ -392,7 +392,7 @@ public: }, { "bases": [], - "display_name": "clanguml::t00014::A", + "display_name": "A", "id": "378898020828430636", "is_abstract": false, "is_nested": false, @@ -427,7 +427,7 @@ public: }, { "bases": [], - "display_name": "clanguml::t00014::A", + "display_name": "A", "id": "2082013375525130414", "is_abstract": false, "is_nested": false, @@ -462,7 +462,7 @@ public: }, { "bases": [], - "display_name": "clanguml::t00014::A", + "display_name": "A", "id": "51978493292659230", "is_abstract": false, "is_nested": false, @@ -497,7 +497,7 @@ public: }, { "bases": [], - "display_name": "clanguml::t00014::A", + "display_name": "A", "id": "197769253782961588", "is_abstract": false, "is_nested": false, @@ -532,7 +532,7 @@ public: }, { "bases": [], - "display_name": "clanguml::t00014::A", + "display_name": "A", "id": "895940711566401184", "is_abstract": false, "is_nested": false, @@ -567,7 +567,7 @@ public: }, { "bases": [], - "display_name": "clanguml::t00014::A>", + "display_name": "A>", "id": "1751732625010742161", "is_abstract": false, "is_nested": false, @@ -609,7 +609,7 @@ public: }, { "bases": [], - "display_name": "clanguml::t00014::A", + "display_name": "A", "id": "887121441210847583", "is_abstract": false, "is_nested": false, @@ -644,7 +644,7 @@ public: }, { "bases": [], - "display_name": "clanguml::t00014::A", + "display_name": "A", "id": "1119452495635561975", "is_abstract": false, "is_nested": false, @@ -679,7 +679,7 @@ public: }, { "bases": [], - "display_name": "clanguml::t00014::A", + "display_name": "A", "id": "340562099063642390", "is_abstract": false, "is_nested": false, @@ -714,7 +714,7 @@ public: }, { "bases": [], - "display_name": "clanguml::t00014::A", + "display_name": "A", "id": "1388877149159894665", "is_abstract": false, "is_nested": false, @@ -749,7 +749,7 @@ public: }, { "bases": [], - "display_name": "clanguml::t00014::R", + "display_name": "R", "id": "1758213171584933144", "is_abstract": false, "is_nested": false, @@ -971,6 +971,7 @@ public: } ], "name": "t00014_class", + "package_type": "namespace", "relationships": [ { "access": "public", diff --git a/docs/test_cases/t00014_class.svg b/docs/test_cases/t00014_class.svg index 7c9d4b36..57cd9936 100644 --- a/docs/test_cases/t00014_class.svg +++ b/docs/test_cases/t00014_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + A @@ -19,37 +19,37 @@ - + - + p : P - + - + t : T - - + + B - + - + value : std::string - - + + A @@ -58,8 +58,8 @@ - - + + A @@ -68,8 +68,8 @@ - - + + A @@ -78,8 +78,8 @@ - - + + A @@ -88,8 +88,8 @@ - - + + A @@ -98,8 +98,8 @@ - - + + A @@ -108,8 +108,8 @@ - - + + A @@ -118,8 +118,8 @@ - - + + A @@ -128,8 +128,8 @@ - - + + A @@ -138,8 +138,8 @@ - - + + A @@ -148,8 +148,8 @@ - - + + A @@ -158,8 +158,8 @@ - - + + A @@ -168,8 +168,8 @@ - - + + A @@ -178,7 +178,7 @@ - + A @@ -186,7 +186,7 @@ char,std::string - + A @@ -194,8 +194,8 @@ wchar_t,std::string - - + + R @@ -204,116 +204,116 @@ - + - + abool : APtr<bool> - + - + aboolfloat : AAPtr<bool,float> - + - + afloat : ASharedPtr<float> - + - + atfloat : AAPtr<T,float> - + - + bapair : PairPairBA<bool> - + - + boolstring : A<bool,std::string> - + - + bs : BVector - + - + bs2 : BVector2 - + - + bstringstring : BStringString - + - + cb : SimpleCallback<ACharString> - + - + floatstring : AStringPtr<float> - + - + gcb : GenericCallback<AWCharString> - + - + intstring : AIntString - + - + stringstring : AStringString - + - + vcb : VoidCallback - + - + vps : VectorPtr<B> diff --git a/docs/test_cases/t00014_class_mermaid.svg b/docs/test_cases/t00014_class_mermaid.svg index 69548c78..d72a732b 100644 --- a/docs/test_cases/t00014_class_mermaid.svg +++ b/docs/test_cases/t00014_class_mermaid.svg @@ -474,7 +474,7 @@ - + @@ -503,7 +503,7 @@ - + @@ -527,7 +527,7 @@ - + @@ -546,7 +546,7 @@ - + @@ -565,7 +565,7 @@ - + @@ -584,7 +584,7 @@ - + @@ -603,7 +603,7 @@ - + @@ -622,7 +622,7 @@ - + @@ -641,7 +641,7 @@ - + @@ -660,7 +660,7 @@ - + @@ -679,7 +679,7 @@ - + @@ -698,7 +698,7 @@ - + @@ -717,7 +717,7 @@ - + @@ -736,7 +736,7 @@ - + @@ -755,7 +755,7 @@ - + @@ -774,7 +774,7 @@ - + @@ -793,7 +793,7 @@ - + @@ -812,7 +812,7 @@ - + diff --git a/docs/test_cases/t00015.md b/docs/test_cases/t00015.md index 4a164bc9..f2490582 100644 --- a/docs/test_cases/t00015.md +++ b/docs/test_cases/t00015.md @@ -13,7 +13,7 @@ diagrams: ``` ## Source code -File t00015.cc +File `tests/t00015/t00015.cc` ```cpp namespace clanguml { namespace t00015 { @@ -55,7 +55,7 @@ class B : public ns1::ns2::Anon { }; "elements": [ { "bases": [], - "display_name": "clanguml::t00015::ns1::A", + "display_name": "ns1::A", "id": "1410694888805149453", "is_abstract": false, "is_nested": false, @@ -77,7 +77,7 @@ class B : public ns1::ns2::Anon { }; }, { "bases": [], - "display_name": "clanguml::t00015::ns1::ns2_v0_9_0::A", + "display_name": "ns1::ns2_v0_9_0::A", "id": "485552648049088863", "is_abstract": false, "is_nested": false, @@ -106,7 +106,7 @@ class B : public ns1::ns2::Anon { }; "name": "clanguml::t00015::ns1::A" } ], - "display_name": "clanguml::t00015::ns1::Anon", + "display_name": "ns1::Anon", "id": "1060731132374575329", "is_abstract": false, "is_nested": false, @@ -135,7 +135,7 @@ class B : public ns1::ns2::Anon { }; "name": "clanguml::t00015::ns1::A" } ], - "display_name": "clanguml::t00015::ns3::ns1::ns2::Anon", + "display_name": "ns3::ns1::ns2::Anon", "id": "1797521288354158629", "is_abstract": false, "is_nested": false, @@ -164,7 +164,7 @@ class B : public ns1::ns2::Anon { }; "name": "clanguml::t00015::ns3::ns1::ns2::Anon" } ], - "display_name": "clanguml::t00015::ns3::B", + "display_name": "ns3::B", "id": "870882387819356092", "is_abstract": false, "is_nested": false, @@ -186,6 +186,7 @@ class B : public ns1::ns2::Anon { }; } ], "name": "t00015_class", + "package_type": "namespace", "relationships": [ { "access": "public", diff --git a/docs/test_cases/t00015_class.svg b/docs/test_cases/t00015_class.svg index 54f7793d..8f5bc888 100644 --- a/docs/test_cases/t00015_class.svg +++ b/docs/test_cases/t00015_class.svg @@ -1,6 +1,6 @@ - + @@ -9,40 +9,40 @@ - - + + ns1::A - - + + ns1::ns2_v0_9_0::A - - + + ns1::Anon - - + + ns3::ns1::ns2::Anon - - + + ns3::B diff --git a/docs/test_cases/t00015_class_mermaid.svg b/docs/test_cases/t00015_class_mermaid.svg index a9900acc..fcffa272 100644 --- a/docs/test_cases/t00015_class_mermaid.svg +++ b/docs/test_cases/t00015_class_mermaid.svg @@ -84,7 +84,7 @@ - + @@ -103,7 +103,7 @@ - + @@ -122,7 +122,7 @@ - + @@ -141,7 +141,7 @@ - + @@ -160,7 +160,7 @@ - + diff --git a/docs/test_cases/t00016.md b/docs/test_cases/t00016.md index a25ec3d2..3f32887d 100644 --- a/docs/test_cases/t00016.md +++ b/docs/test_cases/t00016.md @@ -13,7 +13,7 @@ diagrams: ``` ## Source code -File t00016.cc +File `tests/t00016/t00016.cc` ```cpp namespace clanguml { namespace t00016 { @@ -56,7 +56,7 @@ template <> struct is_numeric { "elements": [ { "bases": [], - "display_name": "clanguml::t00016::is_numeric", + "display_name": "is_numeric", "id": "932856332558460389", "is_abstract": false, "is_nested": false, @@ -92,7 +92,7 @@ template <> struct is_numeric { }, { "bases": [], - "display_name": "clanguml::t00016::is_numeric", + "display_name": "is_numeric", "id": "95618295648274199", "is_abstract": false, "is_nested": false, @@ -128,7 +128,7 @@ template <> struct is_numeric { }, { "bases": [], - "display_name": "clanguml::t00016::is_numeric", + "display_name": "is_numeric", "id": "979129381790761728", "is_abstract": false, "is_nested": false, @@ -164,7 +164,7 @@ template <> struct is_numeric { }, { "bases": [], - "display_name": "clanguml::t00016::is_numeric", + "display_name": "is_numeric", "id": "2090787690027341836", "is_abstract": false, "is_nested": false, @@ -200,7 +200,7 @@ template <> struct is_numeric { }, { "bases": [], - "display_name": "clanguml::t00016::is_numeric", + "display_name": "is_numeric", "id": "500603075237446075", "is_abstract": false, "is_nested": false, @@ -236,7 +236,7 @@ template <> struct is_numeric { }, { "bases": [], - "display_name": "clanguml::t00016::is_numeric", + "display_name": "is_numeric", "id": "2111316837513419920", "is_abstract": false, "is_nested": false, @@ -272,6 +272,7 @@ template <> struct is_numeric { } ], "name": "t00016_class", + "package_type": "namespace", "relationships": [ { "access": "public", diff --git a/docs/test_cases/t00016_class.svg b/docs/test_cases/t00016_class.svg index b6ed1472..889b0cbb 100644 --- a/docs/test_cases/t00016_class.svg +++ b/docs/test_cases/t00016_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + is_numeric @@ -21,8 +21,8 @@ value : enum - - + + is_numeric @@ -33,8 +33,8 @@ value : enum - - + + is_numeric @@ -45,8 +45,8 @@ value : enum - - + + is_numeric @@ -57,8 +57,8 @@ value : enum - - + + is_numeric @@ -69,8 +69,8 @@ value : enum - - + + is_numeric diff --git a/docs/test_cases/t00016_class_mermaid.svg b/docs/test_cases/t00016_class_mermaid.svg index 4e03e3ed..e31fb698 100644 --- a/docs/test_cases/t00016_class_mermaid.svg +++ b/docs/test_cases/t00016_class_mermaid.svg @@ -114,7 +114,7 @@ - + @@ -138,7 +138,7 @@ - + @@ -162,7 +162,7 @@ - + @@ -186,7 +186,7 @@ - + @@ -210,7 +210,7 @@ - + @@ -234,7 +234,7 @@ - + diff --git a/docs/test_cases/t00017.md b/docs/test_cases/t00017.md index 85e1593c..ca028a62 100644 --- a/docs/test_cases/t00017.md +++ b/docs/test_cases/t00017.md @@ -14,7 +14,7 @@ diagrams: ``` ## Source code -File t00017.cc +File `tests/t00017/t00017.cc` ```cpp #include @@ -84,7 +84,7 @@ private: "elements": [ { "bases": [], - "display_name": "clanguml::t00017::A", + "display_name": "A", "id": "121332093434690887", "is_abstract": false, "is_nested": false, @@ -106,7 +106,7 @@ private: }, { "bases": [], - "display_name": "clanguml::t00017::B", + "display_name": "B", "id": "1424864837456200487", "is_abstract": false, "is_nested": false, @@ -128,7 +128,7 @@ private: }, { "bases": [], - "display_name": "clanguml::t00017::C", + "display_name": "C", "id": "2151170391844743478", "is_abstract": false, "is_nested": false, @@ -150,7 +150,7 @@ private: }, { "bases": [], - "display_name": "clanguml::t00017::D", + "display_name": "D", "id": "1378112127131766972", "is_abstract": false, "is_nested": false, @@ -172,7 +172,7 @@ private: }, { "bases": [], - "display_name": "clanguml::t00017::E", + "display_name": "E", "id": "1535300935831802489", "is_abstract": false, "is_nested": false, @@ -194,7 +194,7 @@ private: }, { "bases": [], - "display_name": "clanguml::t00017::F", + "display_name": "F", "id": "1803800465279710134", "is_abstract": false, "is_nested": false, @@ -216,7 +216,7 @@ private: }, { "bases": [], - "display_name": "clanguml::t00017::G", + "display_name": "G", "id": "1135797791892670246", "is_abstract": false, "is_nested": false, @@ -238,7 +238,7 @@ private: }, { "bases": [], - "display_name": "clanguml::t00017::H", + "display_name": "H", "id": "1243547836571712317", "is_abstract": false, "is_nested": false, @@ -260,7 +260,7 @@ private: }, { "bases": [], - "display_name": "clanguml::t00017::I", + "display_name": "I", "id": "387733199705628658", "is_abstract": false, "is_nested": false, @@ -282,7 +282,7 @@ private: }, { "bases": [], - "display_name": "clanguml::t00017::J", + "display_name": "J", "id": "747991828672433537", "is_abstract": false, "is_nested": false, @@ -304,7 +304,7 @@ private: }, { "bases": [], - "display_name": "clanguml::t00017::K", + "display_name": "K", "id": "1783571342994833467", "is_abstract": false, "is_nested": false, @@ -326,7 +326,7 @@ private: }, { "bases": [], - "display_name": "clanguml::t00017::R", + "display_name": "R", "id": "287495916564113342", "is_abstract": false, "is_nested": false, @@ -523,6 +523,7 @@ private: "is_constexpr": false, "is_constructor": true, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -576,6 +577,7 @@ private: } ], "name": "t00017_class", + "package_type": "namespace", "relationships": [ { "access": "private", diff --git a/docs/test_cases/t00017_class.svg b/docs/test_cases/t00017_class.svg index 014a08a8..343b40b2 100644 --- a/docs/test_cases/t00017_class.svg +++ b/docs/test_cases/t00017_class.svg @@ -1,6 +1,6 @@ - + @@ -9,135 +9,135 @@ - - + + A - - + + B - - + + C - - + + D - - + + E - - + + F - - + + G - - + + H - - + + I - - + + J - - + + K - - + + R - + - + R(int & some_int, C & cc, const E & ee, F && ff, I *& ii) : void - + - + some_int : int - + - + some_int_pointer : int * - + - + some_int_pointer_pointer : int ** - + - + some_int_reference : int & diff --git a/docs/test_cases/t00017_class_mermaid.svg b/docs/test_cases/t00017_class_mermaid.svg index b7b1f113..5028b787 100644 --- a/docs/test_cases/t00017_class_mermaid.svg +++ b/docs/test_cases/t00017_class_mermaid.svg @@ -186,7 +186,7 @@ - + @@ -205,7 +205,7 @@ - + @@ -224,7 +224,7 @@ - + @@ -243,7 +243,7 @@ - + @@ -262,7 +262,7 @@ - + @@ -281,7 +281,7 @@ - + @@ -300,7 +300,7 @@ - + @@ -319,7 +319,7 @@ - + @@ -338,7 +338,7 @@ - + @@ -357,7 +357,7 @@ - + @@ -376,7 +376,7 @@ - + @@ -395,7 +395,7 @@ - + diff --git a/docs/test_cases/t00018.md b/docs/test_cases/t00018.md index 228c03a7..3b358daa 100644 --- a/docs/test_cases/t00018.md +++ b/docs/test_cases/t00018.md @@ -13,7 +13,7 @@ diagrams: ``` ## Source code -File t00018.h +File `tests/t00018/t00018.h` ```cpp #pragma once @@ -51,7 +51,7 @@ public: } ``` -File t00018_impl.h +File `tests/t00018/t00018_impl.h` ```cpp #pragma once @@ -74,7 +74,7 @@ public: } ``` -File t00018.cc +File `tests/t00018/t00018.cc` ```cpp #include "t00018.h" #include "t00018_impl.h" @@ -100,7 +100,7 @@ widget &widget::operator=(widget &&) = default; } // namespace clanguml ``` -File t00018_impl.cc +File `tests/t00018/t00018_impl.cc` ```cpp #include "t00018_impl.h" #include "t00018.h" @@ -141,7 +141,7 @@ void widget::draw(const clanguml::t00018::widget &w) "elements": [ { "bases": [], - "display_name": "clanguml::t00018::impl::widget", + "display_name": "impl::widget", "id": "130502639682787993", "is_abstract": false, "is_nested": false, @@ -170,6 +170,7 @@ void widget::draw(const clanguml::t00018::widget &w) "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -200,6 +201,7 @@ void widget::draw(const clanguml::t00018::widget &w) "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -230,6 +232,7 @@ void widget::draw(const clanguml::t00018::widget &w) "is_constexpr": false, "is_constructor": true, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -267,7 +270,7 @@ void widget::draw(const clanguml::t00018::widget &w) }, { "bases": [], - "display_name": "clanguml::t00018::widget", + "display_name": "widget", "id": "1005661284373854088", "is_abstract": false, "is_nested": false, @@ -296,6 +299,7 @@ void widget::draw(const clanguml::t00018::widget &w) "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -321,6 +325,7 @@ void widget::draw(const clanguml::t00018::widget &w) "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -346,6 +351,7 @@ void widget::draw(const clanguml::t00018::widget &w) "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -371,6 +377,7 @@ void widget::draw(const clanguml::t00018::widget &w) "is_constexpr": false, "is_constructor": true, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -401,6 +408,7 @@ void widget::draw(const clanguml::t00018::widget &w) "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -426,6 +434,7 @@ void widget::draw(const clanguml::t00018::widget &w) "is_constexpr": false, "is_constructor": true, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -456,6 +465,7 @@ void widget::draw(const clanguml::t00018::widget &w) "is_constexpr": false, "is_constructor": true, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": true, "is_move_assignment": false, @@ -486,6 +496,7 @@ void widget::draw(const clanguml::t00018::widget &w) "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": true, @@ -516,6 +527,7 @@ void widget::draw(const clanguml::t00018::widget &w) "is_constexpr": false, "is_constructor": false, "is_copy_assignment": true, + "is_coroutine": false, "is_defaulted": false, "is_deleted": true, "is_move_assignment": false, @@ -553,6 +565,7 @@ void widget::draw(const clanguml::t00018::widget &w) } ], "name": "t00018_class", + "package_type": "namespace", "relationships": [ { "access": "public", diff --git a/docs/test_cases/t00018_class.svg b/docs/test_cases/t00018_class.svg index d335d19c..888ceb8d 100644 --- a/docs/test_cases/t00018_class.svg +++ b/docs/test_cases/t00018_class.svg @@ -1,6 +1,6 @@ - + @@ -9,121 +9,121 @@ - - + + impl::widget - + - + widget(int n) : void - + - + draw(const widget & w) const : void - + - + draw(const widget & w) : void - + - + n : int - - + + widget - + - + widget(int) : void - + - + widget(widget &&) : void - + - + widget(const widget &) = deleted : void - + - + ~widget() : void - + - + operator=(widget &&) : widget & - + - + operator=(const widget &) = deleted : widget & - + - + draw() const : void - + - + draw() : void - + - + shown() const : bool - + - + pImpl : std::unique_ptr<impl::widget> diff --git a/docs/test_cases/t00018_class_mermaid.svg b/docs/test_cases/t00018_class_mermaid.svg index 4658f593..54ae6f58 100644 --- a/docs/test_cases/t00018_class_mermaid.svg +++ b/docs/test_cases/t00018_class_mermaid.svg @@ -78,7 +78,7 @@ - + @@ -117,7 +117,7 @@ - + diff --git a/docs/test_cases/t00019.md b/docs/test_cases/t00019.md index 5bf5e100..94c5ffe0 100644 --- a/docs/test_cases/t00019.md +++ b/docs/test_cases/t00019.md @@ -14,7 +14,7 @@ diagrams: ``` ## Source code -File t00019_layer1.h +File `tests/t00019/t00019_layer1.h` ```cpp #pragma once @@ -44,7 +44,7 @@ template class Layer1 : public LowerLayer { } ``` -File t00019.cc +File `tests/t00019/t00019.cc` ```cpp #include "t00019_base.h" #include "t00019_layer1.h" @@ -64,7 +64,7 @@ public: } ``` -File t00019_layer2.h +File `tests/t00019/t00019_layer2.h` ```cpp #pragma once @@ -88,7 +88,7 @@ template class Layer2 : public LowerLayer { } ``` -File t00019_layer3.h +File `tests/t00019/t00019_layer3.h` ```cpp #pragma once @@ -125,7 +125,7 @@ private: } ``` -File t00019_base.h +File `tests/t00019/t00019_base.h` ```cpp #pragma once @@ -159,7 +159,7 @@ class Base { "elements": [ { "bases": [], - "display_name": "clanguml::t00019::Base", + "display_name": "Base", "id": "261668487476634123", "is_abstract": false, "is_nested": false, @@ -175,6 +175,7 @@ class Base { "is_constexpr": false, "is_constructor": true, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": true, "is_deleted": false, "is_move_assignment": false, @@ -200,6 +201,7 @@ class Base { "is_constexpr": true, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": true, "is_deleted": false, "is_move_assignment": false, @@ -225,6 +227,7 @@ class Base { "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -250,6 +253,7 @@ class Base { "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -282,7 +286,7 @@ class Base { }, { "bases": [], - "display_name": "clanguml::t00019::Layer1", + "display_name": "Layer1", "id": "902631298537519271", "is_abstract": false, "is_nested": false, @@ -298,6 +302,7 @@ class Base { "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -323,6 +328,7 @@ class Base { "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -362,7 +368,7 @@ class Base { }, { "bases": [], - "display_name": "clanguml::t00019::Layer2", + "display_name": "Layer2", "id": "1115150925302580647", "is_abstract": false, "is_nested": false, @@ -378,6 +384,7 @@ class Base { "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -417,7 +424,7 @@ class Base { }, { "bases": [], - "display_name": "clanguml::t00019::Layer3", + "display_name": "Layer3", "id": "1853410560073854945", "is_abstract": false, "is_nested": false, @@ -458,6 +465,7 @@ class Base { "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -483,6 +491,7 @@ class Base { "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -508,6 +517,7 @@ class Base { "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -533,6 +543,7 @@ class Base { "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -579,7 +590,7 @@ class Base { "name": "clanguml::t00019::Base" } ], - "display_name": "clanguml::t00019::Layer3", + "display_name": "Layer3", "id": "972890420743280319", "is_abstract": false, "is_nested": false, @@ -593,7 +604,7 @@ class Base { "source_location": { "column": 11, "file": "", - "line": 242, + "line": 269, "translation_unit": "t00019.cc" }, "template_parameters": [ @@ -615,7 +626,7 @@ class Base { "name": "clanguml::t00019::Layer3" } ], - "display_name": "clanguml::t00019::Layer2>", + "display_name": "Layer2>", "id": "129784999866998870", "is_abstract": false, "is_nested": false, @@ -629,7 +640,7 @@ class Base { "source_location": { "column": 11, "file": "", - "line": 242, + "line": 269, "translation_unit": "t00019.cc" }, "template_parameters": [ @@ -658,7 +669,7 @@ class Base { "name": "clanguml::t00019::Layer2>" } ], - "display_name": "clanguml::t00019::Layer1>>", + "display_name": "Layer1>>", "id": "659076058325663708", "is_abstract": false, "is_nested": false, @@ -672,7 +683,7 @@ class Base { "source_location": { "column": 11, "file": "", - "line": 242, + "line": 269, "translation_unit": "t00019.cc" }, "template_parameters": [ @@ -701,7 +712,7 @@ class Base { }, { "bases": [], - "display_name": "clanguml::t00019::A", + "display_name": "A", "id": "1015164998787089197", "is_abstract": false, "is_nested": false, @@ -736,6 +747,7 @@ class Base { } ], "name": "t00019_class", + "package_type": "namespace", "relationships": [ { "access": "public", diff --git a/docs/test_cases/t00019_class.svg b/docs/test_cases/t00019_class.svg index bf9dc0b9..c32862db 100644 --- a/docs/test_cases/t00019_class.svg +++ b/docs/test_cases/t00019_class.svg @@ -1,6 +1,6 @@ - + @@ -9,45 +9,45 @@ - - + + Base - + - + Base() = default : void - + - + ~Base() constexpr = default : void - + - + m1() : int - + - + m2() : std::string - - + + Layer1 @@ -55,23 +55,23 @@ LowerLayer - + - + m1() : int - + - + m2() : std::string - - + + Layer2 @@ -79,16 +79,16 @@ LowerLayer - + - + all_calls_count() const : int - - + + Layer3 @@ -96,50 +96,50 @@ LowerLayer - + - + m1() : int - + - + m1_calls() const : int - + - + m2() : std::string - + - + m2_calls() const : int - + - + m_m1_calls : int - + - + m_m2_calls : int - + Layer3 @@ -147,7 +147,7 @@ Base - + Layer2 @@ -155,7 +155,7 @@ Layer3<Base> - + Layer1 @@ -163,19 +163,19 @@ Layer2<Layer3<Base>> - - + + A - + - + layers : std::unique_ptr<Layer1<Layer2<Layer3<Base>>>> diff --git a/docs/test_cases/t00019_class_mermaid.svg b/docs/test_cases/t00019_class_mermaid.svg index 0291df78..3dd64186 100644 --- a/docs/test_cases/t00019_class_mermaid.svg +++ b/docs/test_cases/t00019_class_mermaid.svg @@ -132,7 +132,7 @@ - + @@ -171,7 +171,7 @@ - + @@ -200,7 +200,7 @@ - + @@ -224,7 +224,7 @@ - + @@ -273,7 +273,7 @@ - + @@ -292,7 +292,7 @@ - + @@ -311,7 +311,7 @@ - + @@ -330,7 +330,7 @@ - + diff --git a/docs/test_cases/t00020.md b/docs/test_cases/t00020.md index fe541264..7a3b031a 100644 --- a/docs/test_cases/t00020.md +++ b/docs/test_cases/t00020.md @@ -19,7 +19,7 @@ diagrams: ``` ## Source code -File t00020.cc +File `tests/t00020/t00020.cc` ```cpp #include @@ -104,7 +104,7 @@ public: "elements": [ { "bases": [], - "display_name": "clanguml::t00020::ProductA", + "display_name": "ProductA", "id": "425267229659464944", "is_abstract": true, "is_nested": false, @@ -120,6 +120,7 @@ public: "is_constexpr": true, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": true, "is_deleted": false, "is_move_assignment": false, @@ -145,6 +146,7 @@ public: "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -189,7 +191,7 @@ public: "name": "clanguml::t00020::ProductA" } ], - "display_name": "clanguml::t00020::ProductA1", + "display_name": "ProductA1", "id": "1756496029797864207", "is_abstract": false, "is_nested": false, @@ -205,6 +207,7 @@ public: "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -249,7 +252,7 @@ public: "name": "clanguml::t00020::ProductA" } ], - "display_name": "clanguml::t00020::ProductA2", + "display_name": "ProductA2", "id": "1531708592885216981", "is_abstract": false, "is_nested": false, @@ -265,6 +268,7 @@ public: "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -302,7 +306,7 @@ public: }, { "bases": [], - "display_name": "clanguml::t00020::ProductB", + "display_name": "ProductB", "id": "2235759006374865842", "is_abstract": true, "is_nested": false, @@ -318,6 +322,7 @@ public: "is_constexpr": true, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": true, "is_deleted": false, "is_move_assignment": false, @@ -343,6 +348,7 @@ public: "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -387,7 +393,7 @@ public: "name": "clanguml::t00020::ProductB" } ], - "display_name": "clanguml::t00020::ProductB1", + "display_name": "ProductB1", "id": "1465493024233223845", "is_abstract": false, "is_nested": false, @@ -403,6 +409,7 @@ public: "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -447,7 +454,7 @@ public: "name": "clanguml::t00020::ProductB" } ], - "display_name": "clanguml::t00020::ProductB2", + "display_name": "ProductB2", "id": "2154665562370057871", "is_abstract": false, "is_nested": false, @@ -463,6 +470,7 @@ public: "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -500,7 +508,7 @@ public: }, { "bases": [], - "display_name": "clanguml::t00020::AbstractFactory", + "display_name": "AbstractFactory", "id": "1705546469218961425", "is_abstract": true, "is_nested": false, @@ -516,6 +524,7 @@ public: "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -541,6 +550,7 @@ public: "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -580,7 +590,7 @@ public: "name": "clanguml::t00020::AbstractFactory" } ], - "display_name": "clanguml::t00020::Factory1", + "display_name": "Factory1", "id": "692346848484854107", "is_abstract": false, "is_nested": false, @@ -596,6 +606,7 @@ public: "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -621,6 +632,7 @@ public: "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -660,7 +672,7 @@ public: "name": "clanguml::t00020::AbstractFactory" } ], - "display_name": "clanguml::t00020::Factory2", + "display_name": "Factory2", "id": "1566325870805013023", "is_abstract": false, "is_nested": false, @@ -676,6 +688,7 @@ public: "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -701,6 +714,7 @@ public: "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -733,6 +747,7 @@ public: } ], "name": "t00020_class", + "package_type": "namespace", "relationships": [ { "access": "public", diff --git a/docs/test_cases/t00020_class.svg b/docs/test_cases/t00020_class.svg index 90172649..8badb4d2 100644 --- a/docs/test_cases/t00020_class.svg +++ b/docs/test_cases/t00020_class.svg @@ -1,6 +1,6 @@ - + @@ -9,175 +9,175 @@ - - + + ProductA - + - + ~ProductA() constexpr = default : void - + - + sell(int price) const = 0 : bool - - + + ProductA1 - + - + sell(int price) const : bool - - + + ProductA2 - + - + sell(int price) const : bool - - + + ProductB - + - + ~ProductB() constexpr = default : void - + - + buy(int price) const = 0 : bool - - + + ProductB1 - + - + buy(int price) const : bool - - + + ProductB2 - + - + buy(int price) const : bool - - + + AbstractFactory - + - + make_a() const = 0 : std::unique_ptr<ProductA> - + - + make_b() const = 0 : std::unique_ptr<ProductB> - - + + Factory1 - + - + make_a() const : std::unique_ptr<ProductA> - + - + make_b() const : std::unique_ptr<ProductB> - - + + Factory2 - + - + make_a() const : std::unique_ptr<ProductA> - + - + make_b() const : std::unique_ptr<ProductB> diff --git a/docs/test_cases/t00020_class_mermaid.svg b/docs/test_cases/t00020_class_mermaid.svg index 3262b989..92003c4d 100644 --- a/docs/test_cases/t00020_class_mermaid.svg +++ b/docs/test_cases/t00020_class_mermaid.svg @@ -186,7 +186,7 @@ - + @@ -215,7 +215,7 @@ - + @@ -239,7 +239,7 @@ - + @@ -263,7 +263,7 @@ - + @@ -292,7 +292,7 @@ - + @@ -316,7 +316,7 @@ - + @@ -340,7 +340,7 @@ - + @@ -369,7 +369,7 @@ - + @@ -398,7 +398,7 @@ - + diff --git a/docs/test_cases/t00021.md b/docs/test_cases/t00021.md index 07b7c92a..f67c0a26 100644 --- a/docs/test_cases/t00021.md +++ b/docs/test_cases/t00021.md @@ -13,7 +13,7 @@ diagrams: ``` ## Source code -File t00021.cc +File `tests/t00021/t00021.cc` ```cpp #include @@ -78,7 +78,7 @@ public: "elements": [ { "bases": [], - "display_name": "clanguml::t00021::Visitor", + "display_name": "Visitor", "id": "1668671110672744395", "is_abstract": true, "is_nested": false, @@ -94,6 +94,7 @@ public: "is_constexpr": true, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": true, "is_deleted": false, "is_move_assignment": false, @@ -119,6 +120,7 @@ public: "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -149,6 +151,7 @@ public: "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -193,7 +196,7 @@ public: "name": "clanguml::t00021::Visitor" } ], - "display_name": "clanguml::t00021::Visitor1", + "display_name": "Visitor1", "id": "1028369219400401946", "is_abstract": false, "is_nested": false, @@ -209,6 +212,7 @@ public: "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -239,6 +243,7 @@ public: "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -283,7 +288,7 @@ public: "name": "clanguml::t00021::Visitor" } ], - "display_name": "clanguml::t00021::Visitor2", + "display_name": "Visitor2", "id": "1710373315476287130", "is_abstract": false, "is_nested": false, @@ -299,6 +304,7 @@ public: "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -329,6 +335,7 @@ public: "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -373,7 +380,7 @@ public: "name": "clanguml::t00021::Visitor" } ], - "display_name": "clanguml::t00021::Visitor3", + "display_name": "Visitor3", "id": "1399026228179178025", "is_abstract": false, "is_nested": false, @@ -389,6 +396,7 @@ public: "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -419,6 +427,7 @@ public: "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -456,7 +465,7 @@ public: }, { "bases": [], - "display_name": "clanguml::t00021::Item", + "display_name": "Item", "id": "1491568826758947722", "is_abstract": true, "is_nested": false, @@ -472,6 +481,7 @@ public: "is_constexpr": true, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": true, "is_deleted": false, "is_move_assignment": false, @@ -497,6 +507,7 @@ public: "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -541,7 +552,7 @@ public: "name": "clanguml::t00021::Item" } ], - "display_name": "clanguml::t00021::A", + "display_name": "A", "id": "1494142745564026823", "is_abstract": false, "is_nested": false, @@ -557,6 +568,7 @@ public: "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -601,7 +613,7 @@ public: "name": "clanguml::t00021::Item" } ], - "display_name": "clanguml::t00021::B", + "display_name": "B", "id": "1452948650450999568", "is_abstract": false, "is_nested": false, @@ -617,6 +629,7 @@ public: "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -654,6 +667,7 @@ public: } ], "name": "t00021_class", + "package_type": "namespace", "relationships": [ { "access": "public", diff --git a/docs/test_cases/t00021_class.svg b/docs/test_cases/t00021_class.svg index 49fd0d61..7e3bb5ce 100644 --- a/docs/test_cases/t00021_class.svg +++ b/docs/test_cases/t00021_class.svg @@ -1,6 +1,6 @@ - + @@ -9,152 +9,152 @@ - - + + Visitor - + - + ~Visitor() constexpr = default : void - + - + visit_A(const A & item) const = 0 : void - + - + visit_B(const B & item) const = 0 : void - - + + Visitor1 - + - + visit_A(const A & item) const : void - + - + visit_B(const B & item) const : void - - + + Visitor2 - + - + visit_A(const A & item) const : void - + - + visit_B(const B & item) const : void - - + + Visitor3 - + - + visit_A(const A & item) const : void - + - + visit_B(const B & item) const : void - - + + Item - + - + ~Item() constexpr = default : void - + - + accept(const Visitor & visitor) const = 0 : void - - + + A - + - + accept(const Visitor & visitor) const : void - - + + B - + - + accept(const Visitor & visitor) const : void diff --git a/docs/test_cases/t00021_class_mermaid.svg b/docs/test_cases/t00021_class_mermaid.svg index 708ac9cb..77dd2160 100644 --- a/docs/test_cases/t00021_class_mermaid.svg +++ b/docs/test_cases/t00021_class_mermaid.svg @@ -236,7 +236,7 @@ - + @@ -270,7 +270,7 @@ - + @@ -299,7 +299,7 @@ - + @@ -328,7 +328,7 @@ - + @@ -357,7 +357,7 @@ - + @@ -386,7 +386,7 @@ - + @@ -410,7 +410,7 @@ - + diff --git a/docs/test_cases/t00022.md b/docs/test_cases/t00022.md index e452784b..f3f741e2 100644 --- a/docs/test_cases/t00022.md +++ b/docs/test_cases/t00022.md @@ -13,7 +13,7 @@ diagrams: ``` ## Source code -File t00022.cc +File `tests/t00022/t00022.cc` ```cpp #include @@ -59,7 +59,7 @@ protected: "elements": [ { "bases": [], - "display_name": "clanguml::t00022::A", + "display_name": "A", "id": "2012435893382068755", "is_abstract": true, "is_nested": false, @@ -75,6 +75,7 @@ protected: "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -100,6 +101,7 @@ protected: "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -125,6 +127,7 @@ protected: "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -164,7 +167,7 @@ protected: "name": "clanguml::t00022::A" } ], - "display_name": "clanguml::t00022::A1", + "display_name": "A1", "id": "2282061426381077447", "is_abstract": false, "is_nested": false, @@ -180,6 +183,7 @@ protected: "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -205,6 +209,7 @@ protected: "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -244,7 +249,7 @@ protected: "name": "clanguml::t00022::A" } ], - "display_name": "clanguml::t00022::A2", + "display_name": "A2", "id": "158819862916671538", "is_abstract": false, "is_nested": false, @@ -260,6 +265,7 @@ protected: "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -285,6 +291,7 @@ protected: "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -317,6 +324,7 @@ protected: } ], "name": "t00022_class", + "package_type": "namespace", "relationships": [ { "access": "public", diff --git a/docs/test_cases/t00022_class.svg b/docs/test_cases/t00022_class.svg index 42e7b34e..3328d458 100644 --- a/docs/test_cases/t00022_class.svg +++ b/docs/test_cases/t00022_class.svg @@ -1,6 +1,6 @@ - + @@ -9,76 +9,76 @@ - - + + A - + - + method1() = 0 : void - + - + method2() = 0 : void - + - + template_method() : void - - + + A1 - + - + method1() : void - + - + method2() : void - - + + A2 - + - + method1() : void - + - + method2() : void diff --git a/docs/test_cases/t00022_class_mermaid.svg b/docs/test_cases/t00022_class_mermaid.svg index c4cfc462..b6b302fd 100644 --- a/docs/test_cases/t00022_class_mermaid.svg +++ b/docs/test_cases/t00022_class_mermaid.svg @@ -74,7 +74,7 @@ - + @@ -108,7 +108,7 @@ - + @@ -137,7 +137,7 @@ - + diff --git a/docs/test_cases/t00023.md b/docs/test_cases/t00023.md index d828ee4c..2ac5d7d8 100644 --- a/docs/test_cases/t00023.md +++ b/docs/test_cases/t00023.md @@ -13,7 +13,7 @@ diagrams: ``` ## Source code -File t00023.cc +File `tests/t00023/t00023.cc` ```cpp #include @@ -68,7 +68,7 @@ private: "elements": [ { "bases": [], - "display_name": "clanguml::t00023::Strategy", + "display_name": "Strategy", "id": "1469857696438841976", "is_abstract": true, "is_nested": false, @@ -84,6 +84,7 @@ private: "is_constexpr": true, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": true, "is_deleted": false, "is_move_assignment": false, @@ -109,6 +110,7 @@ private: "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -148,7 +150,7 @@ private: "name": "clanguml::t00023::Strategy" } ], - "display_name": "clanguml::t00023::StrategyA", + "display_name": "StrategyA", "id": "1245533075819635385", "is_abstract": false, "is_nested": false, @@ -164,6 +166,7 @@ private: "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -203,7 +206,7 @@ private: "name": "clanguml::t00023::Strategy" } ], - "display_name": "clanguml::t00023::StrategyB", + "display_name": "StrategyB", "id": "264986406899645", "is_abstract": false, "is_nested": false, @@ -219,6 +222,7 @@ private: "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -258,7 +262,7 @@ private: "name": "clanguml::t00023::Strategy" } ], - "display_name": "clanguml::t00023::StrategyC", + "display_name": "StrategyC", "id": "174795176193483089", "is_abstract": false, "is_nested": false, @@ -274,6 +278,7 @@ private: "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -306,7 +311,7 @@ private: }, { "bases": [], - "display_name": "clanguml::t00023::Context", + "display_name": "Context", "id": "2038594012979479050", "is_abstract": false, "is_nested": false, @@ -335,6 +340,7 @@ private: "is_constexpr": false, "is_constructor": true, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -365,6 +371,7 @@ private: "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -397,6 +404,7 @@ private: } ], "name": "t00023_class", + "package_type": "namespace", "relationships": [ { "access": "public", diff --git a/docs/test_cases/t00023_class.svg b/docs/test_cases/t00023_class.svg index b0c24c95..3dcfd92e 100644 --- a/docs/test_cases/t00023_class.svg +++ b/docs/test_cases/t00023_class.svg @@ -1,6 +1,6 @@ - + @@ -9,102 +9,102 @@ - - + + Strategy - + - + ~Strategy() constexpr = default : void - + - + algorithm() = 0 : void - - + + StrategyA - + - + algorithm() : void - - + + StrategyB - + - + algorithm() : void - - + + StrategyC - + - + algorithm() : void - - + + Context - + - + Context(std::unique_ptr<Strategy> strategy) : void - + - + apply() : void - + - + m_strategy : std::unique_ptr<Strategy> diff --git a/docs/test_cases/t00023_class_mermaid.svg b/docs/test_cases/t00023_class_mermaid.svg index 5205390e..f4a6bf11 100644 --- a/docs/test_cases/t00023_class_mermaid.svg +++ b/docs/test_cases/t00023_class_mermaid.svg @@ -96,7 +96,7 @@ - + @@ -125,7 +125,7 @@ - + @@ -149,7 +149,7 @@ - + @@ -173,7 +173,7 @@ - + @@ -197,7 +197,7 @@ - + diff --git a/docs/test_cases/t00024.md b/docs/test_cases/t00024.md index ab0e7efc..e16bb8c6 100644 --- a/docs/test_cases/t00024.md +++ b/docs/test_cases/t00024.md @@ -13,7 +13,7 @@ diagrams: ``` ## Source code -File t00024.cc +File `tests/t00024/t00024.cc` ```cpp #include @@ -67,7 +67,7 @@ private: "elements": [ { "bases": [], - "display_name": "clanguml::t00024::Target", + "display_name": "Target", "id": "1116408959993110019", "is_abstract": true, "is_nested": false, @@ -83,6 +83,7 @@ private: "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -108,6 +109,7 @@ private: "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -133,6 +135,7 @@ private: "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -172,7 +175,7 @@ private: "name": "clanguml::t00024::Target" } ], - "display_name": "clanguml::t00024::Target1", + "display_name": "Target1", "id": "669517069151826610", "is_abstract": false, "is_nested": false, @@ -188,6 +191,7 @@ private: "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -213,6 +217,7 @@ private: "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -252,7 +257,7 @@ private: "name": "clanguml::t00024::Target" } ], - "display_name": "clanguml::t00024::Target2", + "display_name": "Target2", "id": "1210513233906695933", "is_abstract": false, "is_nested": false, @@ -268,6 +273,7 @@ private: "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -293,6 +299,7 @@ private: "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -332,7 +339,7 @@ private: "name": "clanguml::t00024::Target" } ], - "display_name": "clanguml::t00024::Proxy", + "display_name": "Proxy", "id": "594707401639991215", "is_abstract": false, "is_nested": false, @@ -361,6 +368,7 @@ private: "is_constexpr": false, "is_constructor": true, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -391,6 +399,7 @@ private: "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -416,6 +425,7 @@ private: "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -448,6 +458,7 @@ private: } ], "name": "t00024_class", + "package_type": "namespace", "relationships": [ { "access": "public", diff --git a/docs/test_cases/t00024_class.svg b/docs/test_cases/t00024_class.svg index f9b7dbad..35bf6f75 100644 --- a/docs/test_cases/t00024_class.svg +++ b/docs/test_cases/t00024_class.svg @@ -1,6 +1,6 @@ - + @@ -9,115 +9,115 @@ - - + + Target - + - + ~Target() = 0 : void - + - + m1() = 0 : void - + - + m2() = 0 : void - - + + Target1 - + - + m1() : void - + - + m2() : void - - + + Target2 - + - + m1() : void - + - + m2() : void - - + + Proxy - + - + Proxy(std::shared_ptr<Target> target) : void - + - + m1() : void - + - + m2() : void - + - + m_target : std::shared_ptr<Target> diff --git a/docs/test_cases/t00024_class_mermaid.svg b/docs/test_cases/t00024_class_mermaid.svg index c9fa5109..65a0e3ff 100644 --- a/docs/test_cases/t00024_class_mermaid.svg +++ b/docs/test_cases/t00024_class_mermaid.svg @@ -96,7 +96,7 @@ - + @@ -130,7 +130,7 @@ - + @@ -159,7 +159,7 @@ - + @@ -188,7 +188,7 @@ - + diff --git a/docs/test_cases/t00025.md b/docs/test_cases/t00025.md index c3e29106..8b63bdf3 100644 --- a/docs/test_cases/t00025.md +++ b/docs/test_cases/t00025.md @@ -13,7 +13,7 @@ diagrams: ``` ## Source code -File t00025.cc +File `tests/t00025/t00025.cc` ```cpp #include @@ -65,7 +65,7 @@ public: "elements": [ { "bases": [], - "display_name": "clanguml::t00025::Target1", + "display_name": "Target1", "id": "1573849034571194138", "is_abstract": false, "is_nested": false, @@ -81,6 +81,7 @@ public: "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -106,6 +107,7 @@ public: "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -138,7 +140,7 @@ public: }, { "bases": [], - "display_name": "clanguml::t00025::Target2", + "display_name": "Target2", "id": "751896409461834669", "is_abstract": false, "is_nested": false, @@ -154,6 +156,7 @@ public: "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -179,6 +182,7 @@ public: "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -211,7 +215,7 @@ public: }, { "bases": [], - "display_name": "clanguml::t00025::Proxy", + "display_name": "Proxy", "id": "1483353300536405088", "is_abstract": false, "is_nested": false, @@ -240,6 +244,7 @@ public: "is_constexpr": false, "is_constructor": true, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -270,6 +275,7 @@ public: "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -295,6 +301,7 @@ public: "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -334,7 +341,7 @@ public: }, { "bases": [], - "display_name": "clanguml::t00025::Proxy", + "display_name": "Proxy", "id": "1644966842838139424", "is_abstract": false, "is_nested": false, @@ -363,7 +370,7 @@ public: }, { "bases": [], - "display_name": "clanguml::t00025::Proxy", + "display_name": "Proxy", "id": "1190103100236298763", "is_abstract": false, "is_nested": false, @@ -392,7 +399,7 @@ public: }, { "bases": [], - "display_name": "clanguml::t00025::ProxyHolder", + "display_name": "ProxyHolder", "id": "1906317303950647748", "is_abstract": false, "is_nested": false, @@ -439,6 +446,7 @@ public: } ], "name": "t00025_class", + "package_type": "namespace", "relationships": [ { "access": "public", diff --git a/docs/test_cases/t00025_class.svg b/docs/test_cases/t00025_class.svg index 046ea65c..87a02d59 100644 --- a/docs/test_cases/t00025_class.svg +++ b/docs/test_cases/t00025_class.svg @@ -1,6 +1,6 @@ - + @@ -9,52 +9,52 @@ - - + + Target1 - + - + m1() : void - + - + m2() : void - - + + Target2 - + - + m1() : void - + - + m2() : void - - + + Proxy @@ -62,38 +62,38 @@ T - + - + Proxy(std::shared_ptr<T> target) : void - + - + m1() : void - + - + m2() : void - + - + m_target : std::shared_ptr<T> - - + + Proxy @@ -102,8 +102,8 @@ - - + + Proxy @@ -112,26 +112,26 @@ - - + + ProxyHolder - + - + proxy1 : Proxy<Target1> - + - + proxy2 : Proxy<Target2> diff --git a/docs/test_cases/t00025_class_mermaid.svg b/docs/test_cases/t00025_class_mermaid.svg index 6e09d9c2..5b7d3843 100644 --- a/docs/test_cases/t00025_class_mermaid.svg +++ b/docs/test_cases/t00025_class_mermaid.svg @@ -126,7 +126,7 @@ - + @@ -155,7 +155,7 @@ - + @@ -184,7 +184,7 @@ - + @@ -223,7 +223,7 @@ - + @@ -242,7 +242,7 @@ - + @@ -261,7 +261,7 @@ - + diff --git a/docs/test_cases/t00026.md b/docs/test_cases/t00026.md index 2a62b904..e0e52803 100644 --- a/docs/test_cases/t00026.md +++ b/docs/test_cases/t00026.md @@ -13,7 +13,7 @@ diagrams: ``` ## Source code -File t00026.cc +File `tests/t00026/t00026.cc` ```cpp #include #include @@ -86,7 +86,7 @@ struct StringMemento { "elements": [ { "bases": [], - "display_name": "clanguml::t00026::Memento", + "display_name": "Memento", "id": "1241204213727905390", "is_abstract": false, "is_nested": false, @@ -115,6 +115,7 @@ struct StringMemento { "is_constexpr": false, "is_constructor": true, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -145,6 +146,7 @@ struct StringMemento { "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -184,7 +186,7 @@ struct StringMemento { }, { "bases": [], - "display_name": "clanguml::t00026::Originator", + "display_name": "Originator", "id": "1324770803720816727", "is_abstract": false, "is_nested": false, @@ -213,6 +215,7 @@ struct StringMemento { "is_constexpr": false, "is_constructor": true, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -243,6 +246,7 @@ struct StringMemento { "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -268,6 +272,7 @@ struct StringMemento { "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -298,6 +303,7 @@ struct StringMemento { "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -323,6 +329,7 @@ struct StringMemento { "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -367,7 +374,7 @@ struct StringMemento { }, { "bases": [], - "display_name": "clanguml::t00026::Caretaker", + "display_name": "Caretaker", "id": "2032715387182792204", "is_abstract": false, "is_nested": false, @@ -396,6 +403,7 @@ struct StringMemento { "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -426,6 +434,7 @@ struct StringMemento { "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -474,7 +483,7 @@ struct StringMemento { }, { "bases": [], - "display_name": "clanguml::t00026::Caretaker", + "display_name": "Caretaker", "id": "1708482137721157489", "is_abstract": false, "is_nested": false, @@ -503,7 +512,7 @@ struct StringMemento { }, { "bases": [], - "display_name": "clanguml::t00026::Originator", + "display_name": "Originator", "id": "1014247960805363560", "is_abstract": false, "is_nested": false, @@ -532,7 +541,7 @@ struct StringMemento { }, { "bases": [], - "display_name": "clanguml::t00026::StringMemento", + "display_name": "StringMemento", "id": "851750942915129289", "is_abstract": false, "is_nested": false, @@ -579,6 +588,7 @@ struct StringMemento { } ], "name": "t00026_class", + "package_type": "namespace", "relationships": [ { "access": "public", diff --git a/docs/test_cases/t00026_class.svg b/docs/test_cases/t00026_class.svg index cd8ff6e8..74d0db81 100644 --- a/docs/test_cases/t00026_class.svg +++ b/docs/test_cases/t00026_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + Memento @@ -18,31 +18,31 @@ T - + - + Memento(T && v) : void - + - + value() const : T - + - + m_value : T - - + + Originator @@ -50,52 +50,52 @@ T - + - + Originator(T && v) : void - + - + load(const Memento<T> & m) : void - + - + memoize_value() const : Memento<T> - + - + print() const : void - + - + set(T && v) : void - + - + m_value : T - - + + Caretaker @@ -103,30 +103,30 @@ T - + - + set_state(const std::string & s, Memento<T> && m) : void - + - + state(const std::string & n) : Memento<T> & - + - + m_mementos : std::unordered_map<std::string,Memento<T>> - - + + Caretaker @@ -135,8 +135,8 @@ - - + + Originator @@ -145,26 +145,26 @@ - - + + StringMemento - + - + caretaker : Caretaker<std::string> - + - + originator : Originator<std::string> diff --git a/docs/test_cases/t00026_class_mermaid.svg b/docs/test_cases/t00026_class_mermaid.svg index 7b427346..d8a96909 100644 --- a/docs/test_cases/t00026_class_mermaid.svg +++ b/docs/test_cases/t00026_class_mermaid.svg @@ -126,7 +126,7 @@ - + @@ -160,7 +160,7 @@ - + @@ -209,7 +209,7 @@ - + @@ -243,7 +243,7 @@ - + @@ -262,7 +262,7 @@ - + @@ -281,7 +281,7 @@ - + diff --git a/docs/test_cases/t00027.md b/docs/test_cases/t00027.md index 7f2e86bf..c289e0ad 100644 --- a/docs/test_cases/t00027.md +++ b/docs/test_cases/t00027.md @@ -13,7 +13,7 @@ diagrams: ``` ## Source code -File t00027.cc +File `tests/t00027/t00027.cc` ```cpp #include #include @@ -83,7 +83,7 @@ struct Window { "elements": [ { "bases": [], - "display_name": "clanguml::t00027::Shape", + "display_name": "Shape", "id": "1593092483959332221", "is_abstract": true, "is_nested": false, @@ -99,6 +99,7 @@ struct Window { "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -124,6 +125,7 @@ struct Window { "is_constexpr": true, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": true, "is_deleted": false, "is_move_assignment": false, @@ -156,7 +158,7 @@ struct Window { }, { "bases": [], - "display_name": "clanguml::t00027::Line", + "display_name": "Line", "id": "1568932879061562228", "is_abstract": false, "is_nested": false, @@ -191,7 +193,7 @@ struct Window { "name": "T>" } ], - "display_name": "clanguml::t00027::Line...>", + "display_name": "Line...>", "id": "142374082478337852", "is_abstract": false, "is_nested": false, @@ -207,6 +209,7 @@ struct Window { "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -246,7 +249,7 @@ struct Window { }, { "bases": [], - "display_name": "clanguml::t00027::Text", + "display_name": "Text", "id": "1833467466291294724", "is_abstract": false, "is_nested": false, @@ -281,7 +284,7 @@ struct Window { "name": "T>" } ], - "display_name": "clanguml::t00027::Text...>", + "display_name": "Text...>", "id": "1114634647721878603", "is_abstract": false, "is_nested": false, @@ -297,6 +300,7 @@ struct Window { "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -336,7 +340,7 @@ struct Window { }, { "bases": [], - "display_name": "clanguml::t00027::ShapeDecorator", + "display_name": "ShapeDecorator", "id": "2049188825706164566", "is_abstract": true, "is_nested": false, @@ -352,6 +356,7 @@ struct Window { "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -391,7 +396,7 @@ struct Window { "name": "clanguml::t00027::ShapeDecorator" } ], - "display_name": "clanguml::t00027::Color", + "display_name": "Color", "id": "1473536569433029444", "is_abstract": false, "is_nested": false, @@ -407,6 +412,7 @@ struct Window { "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -453,7 +459,7 @@ struct Window { "name": "clanguml::t00027::ShapeDecorator" } ], - "display_name": "clanguml::t00027::Weight", + "display_name": "Weight", "id": "2049455532387561338", "is_abstract": false, "is_nested": false, @@ -469,6 +475,7 @@ struct Window { "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -508,7 +515,7 @@ struct Window { }, { "bases": [], - "display_name": "clanguml::t00027::Line", + "display_name": "Line", "id": "2082936326417164202", "is_abstract": false, "is_nested": false, @@ -543,7 +550,7 @@ struct Window { }, { "bases": [], - "display_name": "clanguml::t00027::Line", + "display_name": "Line", "id": "675132943535054947", "is_abstract": false, "is_nested": false, @@ -572,7 +579,7 @@ struct Window { }, { "bases": [], - "display_name": "clanguml::t00027::Text", + "display_name": "Text", "id": "1678874302644303776", "is_abstract": false, "is_nested": false, @@ -607,7 +614,7 @@ struct Window { }, { "bases": [], - "display_name": "clanguml::t00027::Text", + "display_name": "Text", "id": "1887786688778664182", "is_abstract": false, "is_nested": false, @@ -636,7 +643,7 @@ struct Window { }, { "bases": [], - "display_name": "clanguml::t00027::Window", + "display_name": "Window", "id": "1373544984027721472", "is_abstract": false, "is_nested": false, @@ -707,6 +714,7 @@ struct Window { } ], "name": "t00027_class", + "package_type": "namespace", "relationships": [ { "access": "public", diff --git a/docs/test_cases/t00027_class.svg b/docs/test_cases/t00027_class.svg index eb4237c3..1810ab78 100644 --- a/docs/test_cases/t00027_class.svg +++ b/docs/test_cases/t00027_class.svg @@ -1,6 +1,6 @@ - + @@ -9,39 +9,39 @@ - - + + Shape - + - + ~Shape() constexpr = default : void - + - + display() = 0 : void - - + + Line - - + + Line @@ -49,24 +49,24 @@ T<>... - + - + display() : void - - + + Text - - + + Text @@ -74,31 +74,31 @@ T<>... - + - + display() : void - - + + ShapeDecorator - + - + display() = 0 : void - - + + Color @@ -106,16 +106,16 @@ T - + - + display() : void - - + + Weight @@ -123,16 +123,16 @@ T - + - + display() : void - - + + Line @@ -141,8 +141,8 @@ - - + + Line @@ -151,8 +151,8 @@ - - + + Text @@ -161,8 +161,8 @@ - - + + Text @@ -171,40 +171,40 @@ - - + + Window - + - + border : Line<Color,Weight> - + - + description : Text<Color> - + - + divider : Line<Color> - + - + title : Text<Color,Weight> diff --git a/docs/test_cases/t00027_class_mermaid.svg b/docs/test_cases/t00027_class_mermaid.svg index c0e56f14..ceb8f209 100644 --- a/docs/test_cases/t00027_class_mermaid.svg +++ b/docs/test_cases/t00027_class_mermaid.svg @@ -190,7 +190,7 @@ - + @@ -219,7 +219,7 @@ - + @@ -238,7 +238,7 @@ - + @@ -262,7 +262,7 @@ - + @@ -281,7 +281,7 @@ - + @@ -305,7 +305,7 @@ - + @@ -329,7 +329,7 @@ - + @@ -353,7 +353,7 @@ - + @@ -377,7 +377,7 @@ - + @@ -396,7 +396,7 @@ - + @@ -415,7 +415,7 @@ - + @@ -434,7 +434,7 @@ - + @@ -453,7 +453,7 @@ - + diff --git a/docs/test_cases/t00028.md b/docs/test_cases/t00028.md index e974c36d..e66b4280 100644 --- a/docs/test_cases/t00028.md +++ b/docs/test_cases/t00028.md @@ -19,7 +19,7 @@ diagrams: ``` ## Source code -File t00028.cc +File `tests/t00028/t00028.cc` ```cpp #include #include @@ -96,7 +96,7 @@ class R { "formatted": "\\uml{note[top] A class note.}", "raw": "/// \\uml{note[top] A class note.}" }, - "display_name": "clanguml::t00028::A", + "display_name": "A", "id": "1519850480962783588", "is_abstract": false, "is_nested": false, @@ -122,7 +122,7 @@ class R { "formatted": "\\uml{note[] B class note.}", "raw": "/// \\uml{note[] B class note.}" }, - "display_name": "clanguml::t00028::B", + "display_name": "B", "id": "1980597091567213070", "is_abstract": false, "is_nested": false, @@ -148,7 +148,7 @@ class R { "formatted": "\n @uml{note:t00028_class[bottom] C class note.}\n This is class C.", "raw": "///\n/// @uml{note:t00028_class[bottom] C class note.}\n/// This is class C." }, - "display_name": "clanguml::t00028::C", + "display_name": "C", "id": "984577258575112753", "is_abstract": false, "is_nested": false, @@ -174,7 +174,7 @@ class R { "formatted": "\\uml{note\nD\nclass\nnote.}", "raw": "/// \\uml{note\n/// D\n/// class\n/// note.}" }, - "display_name": "clanguml::t00028::D", + "display_name": "D", "id": "1263778658518784070", "is_abstract": false, "is_nested": false, @@ -200,7 +200,7 @@ class R { "formatted": "\\uml{note E template class note.}", "raw": "/// \\uml{note E template class note.}" }, - "display_name": "clanguml::t00028::E", + "display_name": "E", "id": "1014136565447389473", "is_abstract": false, "is_nested": false, @@ -246,7 +246,7 @@ class R { "formatted": "\\uml{note:other_diagram[left] G class note.}", "raw": "/// \\uml{note:other_diagram[left] G class note.}" }, - "display_name": "clanguml::t00028::G", + "display_name": "G", "id": "764713728396057122", "is_abstract": false, "is_nested": false, @@ -276,7 +276,7 @@ class R { "two", "three" ], - "display_name": "clanguml::t00028::F", + "display_name": "F", "id": "589227897266388677", "is_nested": false, "name": "F", @@ -291,7 +291,7 @@ class R { }, { "bases": [], - "display_name": "clanguml::t00028::E", + "display_name": "E", "id": "1949673179441298667", "is_abstract": false, "is_nested": false, @@ -324,7 +324,7 @@ class R { "formatted": "\\uml{note[right] R class note.}", "raw": "/// \\uml{note[right] R class note.}" }, - "display_name": "clanguml::t00028::R", + "display_name": "R", "id": "1189142882239313116", "is_abstract": false, "is_nested": false, @@ -421,6 +421,7 @@ class R { "is_constexpr": false, "is_constructor": true, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -458,6 +459,7 @@ class R { } ], "name": "t00028_class", + "package_type": "namespace", "relationships": [ { "access": "public", diff --git a/docs/test_cases/t00028_class.svg b/docs/test_cases/t00028_class.svg index 71839075..bd726d1b 100644 --- a/docs/test_cases/t00028_class.svg +++ b/docs/test_cases/t00028_class.svg @@ -1,6 +1,6 @@ - + @@ -9,54 +9,54 @@ - - + + A - + A class note. - - + + B - + B class note. - - + + C - + C class note. - - + + D - + D class note. - - + + E @@ -65,26 +65,26 @@ - + - + param : T - + E template class note. - - + + G - - + + F @@ -94,11 +94,11 @@ three - + F enum note. - - + + E @@ -107,70 +107,70 @@ - - + + R - + - + R(C & c) : void - + - + aaa : A - + - + bbb : B * - + - + ccc : C & - + - + ddd : std::vector<std::shared_ptr<D>> - + - + eee : E<int> - + - + ggg : G ** - + R class note. - + R contains an instance of A. - + Reference to C. diff --git a/docs/test_cases/t00028_class_mermaid.svg b/docs/test_cases/t00028_class_mermaid.svg index 6ed95962..bf01c53f 100644 --- a/docs/test_cases/t00028_class_mermaid.svg +++ b/docs/test_cases/t00028_class_mermaid.svg @@ -218,7 +218,7 @@ - + @@ -237,7 +237,7 @@ - + @@ -256,7 +256,7 @@ - + @@ -275,7 +275,7 @@ - + @@ -294,7 +294,7 @@ - + @@ -318,7 +318,7 @@ - + @@ -337,7 +337,7 @@ - + @@ -371,7 +371,7 @@ - + @@ -390,7 +390,7 @@ - + diff --git a/docs/test_cases/t00029.md b/docs/test_cases/t00029.md index 298ecac3..2574fbed 100644 --- a/docs/test_cases/t00029.md +++ b/docs/test_cases/t00029.md @@ -13,7 +13,7 @@ diagrams: ``` ## Source code -File t00029.cc +File `tests/t00029/t00029.cc` ```cpp #include #include @@ -75,7 +75,7 @@ struct R { "elements": [ { "bases": [], - "display_name": "clanguml::t00029::A", + "display_name": "A", "id": "1970994826766369014", "is_abstract": false, "is_nested": false, @@ -97,7 +97,7 @@ struct R { }, { "bases": [], - "display_name": "clanguml::t00029::C", + "display_name": "C", "id": "543766389270348470", "is_abstract": false, "is_nested": false, @@ -143,7 +143,7 @@ struct R { "formatted": "@uml{skip:t00029_class}", "raw": "/// @uml{skip:t00029_class}" }, - "display_name": "clanguml::t00029::D", + "display_name": "D", "id": "1496914969429483234", "is_abstract": false, "is_nested": false, @@ -182,7 +182,7 @@ struct R { "two", "three" ], - "display_name": "clanguml::t00029::E", + "display_name": "E", "id": "1936873082456592219", "is_nested": false, "name": "E", @@ -197,7 +197,7 @@ struct R { }, { "bases": [], - "display_name": "clanguml::t00029::G1", + "display_name": "G1", "id": "1980718063838190763", "is_abstract": false, "is_nested": false, @@ -219,7 +219,7 @@ struct R { }, { "bases": [], - "display_name": "clanguml::t00029::G2", + "display_name": "G2", "id": "2204627213593766591", "is_abstract": false, "is_nested": false, @@ -241,7 +241,7 @@ struct R { }, { "bases": [], - "display_name": "clanguml::t00029::G3", + "display_name": "G3", "id": "767180516665070631", "is_abstract": false, "is_nested": false, @@ -263,7 +263,7 @@ struct R { }, { "bases": [], - "display_name": "clanguml::t00029::G4", + "display_name": "G4", "id": "715074622924270214", "is_abstract": false, "is_nested": false, @@ -285,7 +285,7 @@ struct R { }, { "bases": [], - "display_name": "clanguml::t00029::R", + "display_name": "R", "id": "348749731659902910", "is_abstract": false, "is_nested": false, @@ -348,6 +348,7 @@ struct R { } ], "name": "t00029_class", + "package_type": "namespace", "relationships": [ { "access": "public", diff --git a/docs/test_cases/t00029_class.svg b/docs/test_cases/t00029_class.svg index ea5edcd4..85a7e9e7 100644 --- a/docs/test_cases/t00029_class.svg +++ b/docs/test_cases/t00029_class.svg @@ -1,6 +1,6 @@ - + @@ -9,16 +9,16 @@ - - + + A - - + + C @@ -27,30 +27,30 @@ - + - + param : T - - + + D - + - + param : T - - + + E @@ -60,65 +60,65 @@ three - - + + G1 - - + + G2 - - + + G3 - - + + G4 - - + + R - + - + g1 : G1 - + - + g3 : G3 & - + - + g4 : std::shared_ptr<G4> diff --git a/docs/test_cases/t00029_class_mermaid.svg b/docs/test_cases/t00029_class_mermaid.svg index ddeeabb3..c42d14d5 100644 --- a/docs/test_cases/t00029_class_mermaid.svg +++ b/docs/test_cases/t00029_class_mermaid.svg @@ -78,7 +78,7 @@ - + @@ -97,7 +97,7 @@ - + @@ -121,7 +121,7 @@ - + @@ -145,7 +145,7 @@ - + @@ -179,7 +179,7 @@ - + @@ -198,7 +198,7 @@ - + @@ -217,7 +217,7 @@ - + @@ -236,7 +236,7 @@ - + @@ -255,7 +255,7 @@ - + diff --git a/docs/test_cases/t00030.md b/docs/test_cases/t00030.md index 1eead785..c05d7c5b 100644 --- a/docs/test_cases/t00030.md +++ b/docs/test_cases/t00030.md @@ -13,7 +13,7 @@ diagrams: ``` ## Source code -File t00030.cc +File `tests/t00030/t00030.cc` ```cpp #include #include @@ -63,7 +63,7 @@ struct R { "elements": [ { "bases": [], - "display_name": "clanguml::t00030::A", + "display_name": "A", "id": "64769484767514424", "is_abstract": false, "is_nested": false, @@ -85,7 +85,7 @@ struct R { }, { "bases": [], - "display_name": "clanguml::t00030::B", + "display_name": "B", "id": "156923198106222307", "is_abstract": false, "is_nested": false, @@ -107,7 +107,7 @@ struct R { }, { "bases": [], - "display_name": "clanguml::t00030::C", + "display_name": "C", "id": "1651557398557662399", "is_abstract": false, "is_nested": false, @@ -129,7 +129,7 @@ struct R { }, { "bases": [], - "display_name": "clanguml::t00030::D", + "display_name": "D", "id": "1089781072752262158", "is_abstract": false, "is_nested": false, @@ -151,7 +151,7 @@ struct R { }, { "bases": [], - "display_name": "clanguml::t00030::E", + "display_name": "E", "id": "425964641881054607", "is_abstract": false, "is_nested": false, @@ -173,7 +173,7 @@ struct R { }, { "bases": [], - "display_name": "clanguml::t00030::R", + "display_name": "R", "id": "263468735940481091", "is_abstract": false, "is_nested": false, @@ -276,6 +276,7 @@ struct R { } ], "name": "t00030_class", + "package_type": "namespace", "relationships": [ { "access": "public", diff --git a/docs/test_cases/t00030_class.svg b/docs/test_cases/t00030_class.svg index b5d3a3b6..05447bc2 100644 --- a/docs/test_cases/t00030_class.svg +++ b/docs/test_cases/t00030_class.svg @@ -1,6 +1,6 @@ - + @@ -9,87 +9,87 @@ - - + + A - - + + B - - + + C - - + + D - - + + E - - + + R - + - + aaa : A - + - + bbb : std::vector<B> - + - + ccc : std::vector<C> - + - + ddd : D - + - + eee : E * diff --git a/docs/test_cases/t00030_class_mermaid.svg b/docs/test_cases/t00030_class_mermaid.svg index 4fb9158c..6a7535c7 100644 --- a/docs/test_cases/t00030_class_mermaid.svg +++ b/docs/test_cases/t00030_class_mermaid.svg @@ -164,7 +164,7 @@ - + @@ -183,7 +183,7 @@ - + @@ -202,7 +202,7 @@ - + @@ -221,7 +221,7 @@ - + @@ -240,7 +240,7 @@ - + @@ -259,7 +259,7 @@ - + diff --git a/docs/test_cases/t00031.md b/docs/test_cases/t00031.md index 206097d3..ae7ed19d 100644 --- a/docs/test_cases/t00031.md +++ b/docs/test_cases/t00031.md @@ -14,7 +14,7 @@ diagrams: ``` ## Source code -File t00031.cc +File `tests/t00031/t00031.cc` ```cpp #include #include @@ -71,7 +71,7 @@ struct R { "formatted": "@uml{style[#back:lightgreen|yellow;header:blue/red]}", "raw": "/// @uml{style[#back:lightgreen|yellow;header:blue/red]}" }, - "display_name": "clanguml::t00031::A", + "display_name": "A", "id": "847775539502907247", "is_abstract": false, "is_nested": false, @@ -101,7 +101,7 @@ struct R { "two", "three" ], - "display_name": "clanguml::t00031::B", + "display_name": "B", "id": "1441796358326382179", "is_nested": false, "name": "B", @@ -120,7 +120,7 @@ struct R { "formatted": "@uml{style[#pink;line:red;line.bold;text:red]}", "raw": "/// @uml{style[#pink;line:red;line.bold;text:red]}" }, - "display_name": "clanguml::t00031::C", + "display_name": "C", "id": "116209144733282955", "is_abstract": false, "is_nested": false, @@ -162,7 +162,7 @@ struct R { }, { "bases": [], - "display_name": "clanguml::t00031::D", + "display_name": "D", "id": "2266534344475505157", "is_abstract": false, "is_nested": false, @@ -184,7 +184,7 @@ struct R { }, { "bases": [], - "display_name": "clanguml::t00031::C", + "display_name": "C", "id": "208700529175860645", "is_abstract": false, "is_nested": false, @@ -213,7 +213,7 @@ struct R { }, { "bases": [], - "display_name": "clanguml::t00031::R", + "display_name": "R", "id": "484712092364868032", "is_abstract": false, "is_nested": false, @@ -294,6 +294,7 @@ struct R { "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -331,6 +332,7 @@ struct R { } ], "name": "t00031_class", + "package_type": "namespace", "relationships": [ { "access": "public", diff --git a/docs/test_cases/t00031_class.svg b/docs/test_cases/t00031_class.svg index 21448be6..45208e98 100644 --- a/docs/test_cases/t00031_class.svg +++ b/docs/test_cases/t00031_class.svg @@ -1,33 +1,33 @@ - + - + - + - - - + + + A - - + + B @@ -37,8 +37,8 @@ three - - + + @@ -48,23 +48,23 @@ - + - + ttt : T - - + + D - - + + C @@ -73,47 +73,47 @@ - - + + R - + - + add_b(B b) : void - + - + aaa : A * - + - + bbb : std::vector<B> - + - + ccc : C<int> - + - + ddd : D * diff --git a/docs/test_cases/t00031_class_mermaid.svg b/docs/test_cases/t00031_class_mermaid.svg index 400df57f..47698726 100644 --- a/docs/test_cases/t00031_class_mermaid.svg +++ b/docs/test_cases/t00031_class_mermaid.svg @@ -126,7 +126,7 @@ - + @@ -145,7 +145,7 @@ - + @@ -179,7 +179,7 @@ - + @@ -203,7 +203,7 @@ - + @@ -222,7 +222,7 @@ - + @@ -241,7 +241,7 @@ - + diff --git a/docs/test_cases/t00032.md b/docs/test_cases/t00032.md index 8cdb6f9a..e4d15f16 100644 --- a/docs/test_cases/t00032.md +++ b/docs/test_cases/t00032.md @@ -13,7 +13,7 @@ diagrams: ``` ## Source code -File t00032.cc +File `tests/t00032/t00032.cc` ```cpp #include #include @@ -64,7 +64,7 @@ struct R { "elements": [ { "bases": [], - "display_name": "clanguml::t00032::Base", + "display_name": "Base", "id": "1619396229227632210", "is_abstract": false, "is_nested": false, @@ -86,7 +86,7 @@ struct R { }, { "bases": [], - "display_name": "clanguml::t00032::TBase", + "display_name": "TBase", "id": "543776954602127752", "is_abstract": false, "is_nested": false, @@ -108,7 +108,7 @@ struct R { }, { "bases": [], - "display_name": "clanguml::t00032::A", + "display_name": "A", "id": "687909853333071234", "is_abstract": false, "is_nested": false, @@ -124,6 +124,7 @@ struct R { "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -156,7 +157,7 @@ struct R { }, { "bases": [], - "display_name": "clanguml::t00032::B", + "display_name": "B", "id": "737235057776029746", "is_abstract": false, "is_nested": false, @@ -172,6 +173,7 @@ struct R { "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -204,7 +206,7 @@ struct R { }, { "bases": [], - "display_name": "clanguml::t00032::C", + "display_name": "C", "id": "1497964256865073382", "is_abstract": false, "is_nested": false, @@ -220,6 +222,7 @@ struct R { "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -259,7 +262,7 @@ struct R { "name": "clanguml::t00032::Base" } ], - "display_name": "clanguml::t00032::Overload", + "display_name": "Overload", "id": "1463422997970691679", "is_abstract": false, "is_nested": false, @@ -338,7 +341,7 @@ struct R { "name": "clanguml::t00032::C" } ], - "display_name": "clanguml::t00032::Overload", + "display_name": "Overload", "id": "1706455047176879286", "is_abstract": false, "is_nested": false, @@ -391,7 +394,7 @@ struct R { }, { "bases": [], - "display_name": "clanguml::t00032::R", + "display_name": "R", "id": "85539867332573320", "is_abstract": false, "is_nested": false, @@ -426,6 +429,7 @@ struct R { } ], "name": "t00032_class", + "package_type": "namespace", "relationships": [ { "access": "public", diff --git a/docs/test_cases/t00032_class.svg b/docs/test_cases/t00032_class.svg index c3ffb2dc..98a845a5 100644 --- a/docs/test_cases/t00032_class.svg +++ b/docs/test_cases/t00032_class.svg @@ -1,6 +1,6 @@ - + @@ -9,69 +9,69 @@ - - + + Base - - + + TBase - - + + A - + - + operator()() : void - - + + B - + - + operator()() : void - - + + C - + - + operator()() : void - - + + Overload @@ -80,15 +80,15 @@ - + - + counter : L - - + + Overload @@ -97,19 +97,19 @@ - - + + R - + - + overload : Overload<TBase,int,A,B,C> diff --git a/docs/test_cases/t00032_class_mermaid.svg b/docs/test_cases/t00032_class_mermaid.svg index abc5a971..6f6fadc5 100644 --- a/docs/test_cases/t00032_class_mermaid.svg +++ b/docs/test_cases/t00032_class_mermaid.svg @@ -128,7 +128,7 @@ - + @@ -147,7 +147,7 @@ - + @@ -166,7 +166,7 @@ - + @@ -190,7 +190,7 @@ - + @@ -214,7 +214,7 @@ - + @@ -238,7 +238,7 @@ - + @@ -262,7 +262,7 @@ - + @@ -281,7 +281,7 @@ - + diff --git a/docs/test_cases/t00033.md b/docs/test_cases/t00033.md index fc7eeb48..921e661a 100644 --- a/docs/test_cases/t00033.md +++ b/docs/test_cases/t00033.md @@ -13,7 +13,7 @@ diagrams: ``` ## Source code -File t00033.cc +File `tests/t00033/t00033.cc` ```cpp #include #include @@ -56,7 +56,7 @@ struct R { "elements": [ { "bases": [], - "display_name": "clanguml::t00033::A", + "display_name": "A", "id": "2036031998980633871", "is_abstract": false, "is_nested": false, @@ -98,7 +98,7 @@ struct R { }, { "bases": [], - "display_name": "clanguml::t00033::B", + "display_name": "B", "id": "765515233845859023", "is_abstract": false, "is_nested": false, @@ -140,7 +140,7 @@ struct R { }, { "bases": [], - "display_name": "clanguml::t00033::C", + "display_name": "C", "id": "1436835384265552869", "is_abstract": false, "is_nested": false, @@ -182,7 +182,7 @@ struct R { }, { "bases": [], - "display_name": "clanguml::t00033::D", + "display_name": "D", "id": "2199581366769423637", "is_abstract": false, "is_nested": false, @@ -217,7 +217,7 @@ struct R { }, { "bases": [], - "display_name": "clanguml::t00033::C", + "display_name": "C", "id": "1609446044604054241", "is_abstract": false, "is_nested": false, @@ -246,7 +246,7 @@ struct R { }, { "bases": [], - "display_name": "clanguml::t00033::B>>", + "display_name": "B>>", "id": "384927316081978893", "is_abstract": false, "is_nested": false, @@ -289,7 +289,7 @@ struct R { }, { "bases": [], - "display_name": "clanguml::t00033::A>>>", + "display_name": "A>>>", "id": "1747493965420341251", "is_abstract": false, "is_nested": false, @@ -339,7 +339,7 @@ struct R { }, { "bases": [], - "display_name": "clanguml::t00033::R", + "display_name": "R", "id": "1866392706312766470", "is_abstract": false, "is_nested": false, @@ -374,6 +374,7 @@ struct R { } ], "name": "t00033_class", + "package_type": "namespace", "relationships": [ { "access": "public", diff --git a/docs/test_cases/t00033_class.svg b/docs/test_cases/t00033_class.svg index 3380b19c..655ce973 100644 --- a/docs/test_cases/t00033_class.svg +++ b/docs/test_cases/t00033_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + A @@ -19,15 +19,15 @@ - + - + aaa : T - - + + B @@ -36,15 +36,15 @@ - + - + bbb : T - - + + C @@ -53,30 +53,30 @@ - + - + ccc : T - - + + D - + - + ddd : int - - + + C @@ -85,8 +85,8 @@ - - + + B @@ -95,8 +95,8 @@ - - + + A @@ -105,19 +105,19 @@ - - + + R - + - + abc : A<B<std::unique_ptr<C<D>>>> diff --git a/docs/test_cases/t00033_class_mermaid.svg b/docs/test_cases/t00033_class_mermaid.svg index fcc00a91..7bd2acb7 100644 --- a/docs/test_cases/t00033_class_mermaid.svg +++ b/docs/test_cases/t00033_class_mermaid.svg @@ -138,7 +138,7 @@ - + @@ -162,7 +162,7 @@ - + @@ -186,7 +186,7 @@ - + @@ -210,7 +210,7 @@ - + @@ -234,7 +234,7 @@ - + @@ -253,7 +253,7 @@ - + @@ -272,7 +272,7 @@ - + @@ -291,7 +291,7 @@ - + diff --git a/docs/test_cases/t00034.md b/docs/test_cases/t00034.md index 4c37dd94..8671ef16 100644 --- a/docs/test_cases/t00034.md +++ b/docs/test_cases/t00034.md @@ -16,7 +16,7 @@ diagrams: ``` ## Source code -File t00034.cc +File `tests/t00034/t00034.cc` ```cpp #include @@ -82,7 +82,7 @@ struct R { "elements": [ { "bases": [], - "display_name": "clanguml::t00034::Void", + "display_name": "Void", "id": "1704456490210873213", "is_abstract": false, "is_nested": false, @@ -98,6 +98,7 @@ struct R { "is_constexpr": true, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -128,6 +129,7 @@ struct R { "is_constexpr": true, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -165,7 +167,7 @@ struct R { }, { "bases": [], - "display_name": "clanguml::t00034::lift_void", + "display_name": "lift_void", "id": "867472442996685316", "is_abstract": false, "is_nested": false, @@ -194,7 +196,7 @@ struct R { }, { "bases": [], - "display_name": "clanguml::t00034::lift_void", + "display_name": "lift_void", "id": "126450862226197239", "is_abstract": false, "is_nested": false, @@ -223,7 +225,7 @@ struct R { }, { "bases": [], - "display_name": "clanguml::t00034::drop_void", + "display_name": "drop_void", "id": "1578745816100337706", "is_abstract": false, "is_nested": false, @@ -252,7 +254,7 @@ struct R { }, { "bases": [], - "display_name": "clanguml::t00034::drop_void", + "display_name": "drop_void", "id": "1849836134504075115", "is_abstract": false, "is_nested": false, @@ -281,7 +283,7 @@ struct R { }, { "bases": [], - "display_name": "clanguml::t00034::A", + "display_name": "A", "id": "1383912907884688827", "is_abstract": false, "is_nested": false, @@ -303,7 +305,7 @@ struct R { }, { "bases": [], - "display_name": "clanguml::t00034::R", + "display_name": "R", "id": "1713991735741265309", "is_abstract": false, "is_nested": false, @@ -350,6 +352,7 @@ struct R { } ], "name": "t00034_class", + "package_type": "namespace", "relationships": [ { "access": "public", diff --git a/docs/test_cases/t00034_class.svg b/docs/test_cases/t00034_class.svg index 77e5c0a2..49a48cfe 100644 --- a/docs/test_cases/t00034_class.svg +++ b/docs/test_cases/t00034_class.svg @@ -1,6 +1,6 @@ - + @@ -9,30 +9,30 @@ - - + + Void - + - + operator!=(const Void &) constexpr const : bool - + - + operator==(const Void &) constexpr const : bool - - + + lift_void @@ -41,8 +41,8 @@ - - + + lift_void @@ -51,8 +51,8 @@ - - + + drop_void @@ -61,8 +61,8 @@ - - + + drop_void @@ -71,34 +71,34 @@ - - + + A - - + + R - + - + la : lift_void_t<A> * - + - + lv : lift_void_t<void> * diff --git a/docs/test_cases/t00034_class_mermaid.svg b/docs/test_cases/t00034_class_mermaid.svg index d1a177cf..2babeaa7 100644 --- a/docs/test_cases/t00034_class_mermaid.svg +++ b/docs/test_cases/t00034_class_mermaid.svg @@ -102,7 +102,7 @@ - + @@ -131,7 +131,7 @@ - + @@ -150,7 +150,7 @@ - + @@ -169,7 +169,7 @@ - + @@ -188,7 +188,7 @@ - + @@ -207,7 +207,7 @@ - + @@ -226,7 +226,7 @@ - + diff --git a/docs/test_cases/t00035.md b/docs/test_cases/t00035.md index 135a60d1..f06c66a0 100644 --- a/docs/test_cases/t00035.md +++ b/docs/test_cases/t00035.md @@ -19,7 +19,7 @@ diagrams: ``` ## Source code -File t00035.cc +File `tests/t00035/t00035.cc` ```cpp namespace clanguml { namespace t00035 { @@ -49,7 +49,7 @@ struct Right { }; "elements": [ { "bases": [], - "display_name": "clanguml::t00035::Top", + "display_name": "Top", "id": "2241062883697294772", "is_abstract": false, "is_nested": false, @@ -71,7 +71,7 @@ struct Right { }; }, { "bases": [], - "display_name": "clanguml::t00035::Left", + "display_name": "Left", "id": "242562856080127946", "is_abstract": false, "is_nested": false, @@ -93,7 +93,7 @@ struct Right { }; }, { "bases": [], - "display_name": "clanguml::t00035::Center", + "display_name": "Center", "id": "1933304541849408421", "is_abstract": false, "is_nested": false, @@ -115,7 +115,7 @@ struct Right { }; }, { "bases": [], - "display_name": "clanguml::t00035::Bottom", + "display_name": "Bottom", "id": "1646691079607377420", "is_abstract": false, "is_nested": false, @@ -137,7 +137,7 @@ struct Right { }; }, { "bases": [], - "display_name": "clanguml::t00035::Right", + "display_name": "Right", "id": "200121820090372322", "is_abstract": false, "is_nested": false, @@ -159,6 +159,7 @@ struct Right { }; } ], "name": "t00035_class", + "package_type": "namespace", "relationships": [], "using_namespace": "clanguml::t00035" } diff --git a/docs/test_cases/t00035_class.svg b/docs/test_cases/t00035_class.svg index 764ae082..8afeb972 100644 --- a/docs/test_cases/t00035_class.svg +++ b/docs/test_cases/t00035_class.svg @@ -1,6 +1,6 @@ - + @@ -9,40 +9,40 @@ - - + + Top - - + + Left - - + + Center - - + + Bottom - - + + Right diff --git a/docs/test_cases/t00035_class_mermaid.svg b/docs/test_cases/t00035_class_mermaid.svg index 5efbb922..f2f9c322 100644 --- a/docs/test_cases/t00035_class_mermaid.svg +++ b/docs/test_cases/t00035_class_mermaid.svg @@ -52,7 +52,7 @@ - + @@ -71,7 +71,7 @@ - + @@ -90,7 +90,7 @@ - + @@ -109,7 +109,7 @@ - + @@ -128,7 +128,7 @@ - + diff --git a/docs/test_cases/t00036.md b/docs/test_cases/t00036.md index 956a311f..eabe606f 100644 --- a/docs/test_cases/t00036.md +++ b/docs/test_cases/t00036.md @@ -16,7 +16,7 @@ diagrams: - clanguml::t00036::ns2::ns22::D ``` ## Source code -File t00036.cc +File `tests/t00036/t00036.cc` ```cpp namespace clanguml { namespace t00036 { @@ -37,7 +37,7 @@ struct B { A a_int; }; -} +} // namespace ns111 } // namespace ns11 } // namespace ns1 @@ -49,8 +49,8 @@ struct C { }; struct D { }; -} -} +} // namespace ns22 +} // namespace ns2 namespace ns3 { namespace ns33 { @@ -74,14 +74,14 @@ struct DImpl : public ns2::ns22::D { }; "diagram_type": "class", "elements": [ { - "display_name": "clanguml::t00036::ns1", + "display_name": "ns1", "elements": [ { "constants": [ "blue", "yellow" ], - "display_name": "clanguml::t00036::ns1::E", + "display_name": "ns1::E", "id": "2144761953049158478", "is_nested": false, "name": "E", @@ -95,11 +95,11 @@ struct DImpl : public ns2::ns22::D { }; "type": "enum" }, { - "display_name": "clanguml::t00036::ns1::ns11", + "display_name": "ns11", "elements": [ { "bases": [], - "display_name": "clanguml::t00036::ns1::ns11::A", + "display_name": "ns1::ns11::A", "id": "571573305652194946", "is_abstract": false, "is_nested": false, @@ -140,11 +140,11 @@ struct DImpl : public ns2::ns22::D { }; "type": "class" }, { - "display_name": "clanguml::t00036::ns1::ns11::ns111", + "display_name": "ns111", "elements": [ { "bases": [], - "display_name": "clanguml::t00036::ns1::ns11::ns111::B", + "display_name": "ns1::ns11::ns111::B", "id": "1964031933563607376", "is_abstract": false, "is_nested": false, @@ -183,7 +183,7 @@ struct DImpl : public ns2::ns22::D { }; }, { "bases": [], - "display_name": "clanguml::t00036::ns1::ns11::A", + "display_name": "ns1::ns11::A", "id": "1832710427462319797", "is_abstract": false, "is_nested": false, @@ -219,14 +219,14 @@ struct DImpl : public ns2::ns22::D { }; "type": "namespace" }, { - "display_name": "clanguml::t00036::ns2", + "display_name": "ns2", "elements": [ { - "display_name": "clanguml::t00036::ns2::ns22", + "display_name": "ns22", "elements": [ { "bases": [], - "display_name": "clanguml::t00036::ns2::ns22::C", + "display_name": "ns2::ns22::C", "id": "2038956882066165590", "is_abstract": false, "is_nested": false, @@ -255,13 +255,13 @@ struct DImpl : public ns2::ns22::D { }; "type": "namespace" }, { - "display_name": "clanguml::t00036::ns3", + "display_name": "ns3", "elements": [ { - "display_name": "clanguml::t00036::ns3::ns33", + "display_name": "ns33", "elements": [ { - "display_name": "clanguml::t00036::ns3::ns33::detail", + "display_name": "detail", "name": "detail", "type": "namespace" } @@ -275,6 +275,7 @@ struct DImpl : public ns2::ns22::D { }; } ], "name": "t00036_class", + "package_type": "namespace", "relationships": [ { "access": "public", diff --git a/docs/test_cases/t00036_class.svg b/docs/test_cases/t00036_class.svg index 3aead8f9..917fc5cb 100644 --- a/docs/test_cases/t00036_class.svg +++ b/docs/test_cases/t00036_class.svg @@ -1,6 +1,6 @@ - + @@ -9,23 +9,23 @@ - + ns1 - + ns11 - + ns111 - + ns2 - + ns22 - - + + E @@ -34,8 +34,8 @@ yellow - - + + A @@ -44,15 +44,15 @@ - + - + a : T - - + + A @@ -61,23 +61,23 @@ - - + + B - + - + a_int : A<int> - - + + C diff --git a/docs/test_cases/t00036_class_mermaid.svg b/docs/test_cases/t00036_class_mermaid.svg index eb6aed9a..41437a01 100644 --- a/docs/test_cases/t00036_class_mermaid.svg +++ b/docs/test_cases/t00036_class_mermaid.svg @@ -78,7 +78,7 @@ - + @@ -107,7 +107,7 @@ - + @@ -131,7 +131,7 @@ - + @@ -155,7 +155,7 @@ - + @@ -174,7 +174,7 @@ - + diff --git a/docs/test_cases/t00037.md b/docs/test_cases/t00037.md index 63199dca..f31e2e0d 100644 --- a/docs/test_cases/t00037.md +++ b/docs/test_cases/t00037.md @@ -13,7 +13,7 @@ diagrams: - clanguml::t00037 ``` ## Source code -File t00037.cc +File `tests/t00037/t00037.cc` ```cpp namespace clanguml { namespace t00037 { @@ -61,7 +61,7 @@ struct A { "elements": [ { "bases": [], - "display_name": "clanguml::t00037::ST", + "display_name": "ST", "id": "11203041379038775", "is_abstract": false, "is_nested": false, @@ -108,7 +108,7 @@ struct A { }, { "bases": [], - "display_name": "clanguml::t00037::ST::(dimensions)", + "display_name": "ST::(dimensions)", "id": "1980820317972901050", "is_abstract": false, "is_nested": true, @@ -179,7 +179,7 @@ struct A { }, { "bases": [], - "display_name": "clanguml::t00037::ST::(units)", + "display_name": "ST::(units)", "id": "1811145508890403377", "is_abstract": false, "is_nested": true, @@ -226,7 +226,7 @@ struct A { }, { "bases": [], - "display_name": "clanguml::t00037::A", + "display_name": "A", "id": "1322794181774144954", "is_abstract": false, "is_nested": false, @@ -255,6 +255,7 @@ struct A { "is_constexpr": false, "is_constructor": true, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -287,6 +288,7 @@ struct A { } ], "name": "t00037_class", + "package_type": "namespace", "relationships": [ { "access": "public", diff --git a/docs/test_cases/t00037_class.svg b/docs/test_cases/t00037_class.svg index c06624ec..1b8b4cf7 100644 --- a/docs/test_cases/t00037_class.svg +++ b/docs/test_cases/t00037_class.svg @@ -1,6 +1,6 @@ - + @@ -9,106 +9,106 @@ - - + + ST - + - + dimensions : ST::(anonymous_662) - + - + units : ST::(anonymous_792) - - + + ST::(dimensions) - + - + t : double - + - + x : double - + - + y : double - + - + z : double - - + + ST::(units) - + - + c : double - + - + h : double - - + + A - + - + A() : void - + - + st : ST diff --git a/docs/test_cases/t00037_class_mermaid.svg b/docs/test_cases/t00037_class_mermaid.svg index 78bf339a..88f3b1a4 100644 --- a/docs/test_cases/t00037_class_mermaid.svg +++ b/docs/test_cases/t00037_class_mermaid.svg @@ -90,7 +90,7 @@ - + @@ -119,7 +119,7 @@ - + @@ -158,7 +158,7 @@ - + @@ -187,7 +187,7 @@ - + diff --git a/docs/test_cases/t00038.md b/docs/test_cases/t00038.md index e7e758ff..29bbeb56 100644 --- a/docs/test_cases/t00038.md +++ b/docs/test_cases/t00038.md @@ -14,7 +14,7 @@ diagrams: - thirdparty::ns1 ``` ## Source code -File t00038.cc +File `tests/t00038/t00038.cc` ```cpp #include #include @@ -125,7 +125,7 @@ struct map", + "display_name": "map", "id": "1917560728132448300", "is_abstract": false, "is_nested": false, @@ -277,7 +277,7 @@ struct map>", + "display_name": "map>", "id": "1664022047310891203", "is_abstract": false, "is_nested": false, @@ -326,7 +326,7 @@ struct map>", + "display_name": "map>", "id": "307700801045535833", "is_abstract": false, "is_nested": false, @@ -375,7 +375,7 @@ struct map>>", + "display_name": "map>>", "id": "548231528417484191", "is_abstract": false, "is_nested": false, @@ -431,7 +431,7 @@ struct map>>>", + "display_name": "map>>>", "id": "1510200402118706005", "is_abstract": false, "is_nested": false, @@ -493,6 +493,7 @@ struct map - + @@ -9,8 +9,8 @@ - - + + thirdparty::ns1::color_t @@ -20,16 +20,16 @@ blue - - + + thirdparty::ns1::E - - + + property_t @@ -39,47 +39,47 @@ property_c - - + + A - - + + B - - + + C - - + + key_t - + - + key : std::string - - + + map @@ -88,8 +88,8 @@ - - + + map @@ -98,8 +98,8 @@ - - + + map @@ -108,8 +108,8 @@ - - + + map @@ -118,8 +118,8 @@ - - + + map diff --git a/docs/test_cases/t00038_class_mermaid.svg b/docs/test_cases/t00038_class_mermaid.svg index 28561545..fe74e7b8 100644 --- a/docs/test_cases/t00038_class_mermaid.svg +++ b/docs/test_cases/t00038_class_mermaid.svg @@ -202,7 +202,7 @@ - + @@ -236,7 +236,7 @@ - + @@ -255,7 +255,7 @@ - + @@ -289,7 +289,7 @@ - + @@ -308,7 +308,7 @@ - + @@ -327,7 +327,7 @@ - + @@ -346,7 +346,7 @@ - + @@ -370,7 +370,7 @@ - + @@ -389,7 +389,7 @@ - + @@ -408,7 +408,7 @@ - + @@ -427,7 +427,7 @@ - + @@ -446,7 +446,7 @@ - + diff --git a/docs/test_cases/t00039.md b/docs/test_cases/t00039.md index 8419df21..fe316946 100644 --- a/docs/test_cases/t00039.md +++ b/docs/test_cases/t00039.md @@ -24,7 +24,7 @@ diagrams: - clanguml::t00039::ns3::detail ``` ## Source code -File t00039.cc +File `tests/t00039/t00039.cc` ```cpp #include @@ -95,7 +95,7 @@ template struct FFF : public FF { "elements": [ { "bases": [], - "display_name": "clanguml::t00039::C", + "display_name": "C", "id": "241234977032861936", "is_abstract": false, "is_nested": false, @@ -117,7 +117,7 @@ template struct FFF : public FF { }, { "bases": [], - "display_name": "clanguml::t00039::D", + "display_name": "D", "id": "1975187139659616784", "is_abstract": false, "is_nested": false, @@ -139,7 +139,7 @@ template struct FFF : public FF { }, { "bases": [], - "display_name": "clanguml::t00039::E", + "display_name": "E", "id": "1959131184346890363", "is_abstract": false, "is_nested": false, @@ -174,7 +174,7 @@ template struct FFF : public FF { "name": "clanguml::t00039::D" } ], - "display_name": "clanguml::t00039::CD", + "display_name": "CD", "id": "850483622527996929", "is_abstract": false, "is_nested": false, @@ -209,7 +209,7 @@ template struct FFF : public FF { "name": "clanguml::t00039::E" } ], - "display_name": "clanguml::t00039::DE", + "display_name": "DE", "id": "1316022308303681160", "is_abstract": false, "is_nested": false, @@ -250,7 +250,7 @@ template struct FFF : public FF { "name": "clanguml::t00039::E" } ], - "display_name": "clanguml::t00039::CDE", + "display_name": "CDE", "id": "1877487144594774465", "is_abstract": false, "is_nested": false, @@ -272,7 +272,7 @@ template struct FFF : public FF { }, { "bases": [], - "display_name": "clanguml::t00039::A", + "display_name": "A", "id": "1051171525946759825", "is_abstract": false, "is_nested": false, @@ -301,7 +301,7 @@ template struct FFF : public FF { "name": "clanguml::t00039::A" } ], - "display_name": "clanguml::t00039::AA", + "display_name": "AA", "id": "1761969273600680013", "is_abstract": false, "is_nested": false, @@ -330,7 +330,7 @@ template struct FFF : public FF { "name": "clanguml::t00039::AA" } ], - "display_name": "clanguml::t00039::AAA", + "display_name": "AAA", "id": "2158483243842147804", "is_abstract": false, "is_nested": false, @@ -372,7 +372,7 @@ template struct FFF : public FF { "name": "clanguml::t00039::AAA" } ], - "display_name": "clanguml::t00039::ns2::AAAA", + "display_name": "ns2::AAAA", "id": "1857294881176816154", "is_abstract": false, "is_nested": false, @@ -394,7 +394,7 @@ template struct FFF : public FF { }, { "bases": [], - "display_name": "clanguml::t00039::ns3::F", + "display_name": "ns3::F", "id": "955785395599769805", "is_abstract": false, "is_nested": false, @@ -443,7 +443,7 @@ template struct FFF : public FF { "name": "F" } ], - "display_name": "clanguml::t00039::ns3::FF", + "display_name": "ns3::FF", "id": "1321996888067531304", "is_abstract": false, "is_nested": false, @@ -498,7 +498,7 @@ template struct FFF : public FF { "name": "F" } ], - "display_name": "clanguml::t00039::ns3::FE", + "display_name": "ns3::FE", "id": "2008055732881129924", "is_abstract": false, "is_nested": false, @@ -553,7 +553,7 @@ template struct FFF : public FF { "name": "FF" } ], - "display_name": "clanguml::t00039::ns3::FFF", + "display_name": "ns3::FFF", "id": "1617455840736919039", "is_abstract": false, "is_nested": false, @@ -607,6 +607,7 @@ template struct FFF : public FF { } ], "name": "t00039_class", + "package_type": "namespace", "relationships": [ { "access": "public", diff --git a/docs/test_cases/t00039_class.svg b/docs/test_cases/t00039_class.svg index 229f8cd5..3690d535 100644 --- a/docs/test_cases/t00039_class.svg +++ b/docs/test_cases/t00039_class.svg @@ -1,6 +1,6 @@ - + @@ -9,95 +9,95 @@ - - + + C - - + + D - - + + E - - + + CD - - + + DE - - + + CDE - - + + A - - + + AA - - + + AAA - + - + b : B * - - + + ns2::AAAA - - + + ns3::F @@ -106,15 +106,15 @@ - + - + t : T * - - + + ns3::FF @@ -123,15 +123,15 @@ - + - + m : M * - - + + ns3::FE @@ -140,15 +140,15 @@ - + - + m : M * - - + + ns3::FFF @@ -157,11 +157,11 @@ - + - + n : N * diff --git a/docs/test_cases/t00039_class_mermaid.svg b/docs/test_cases/t00039_class_mermaid.svg index 403290f4..435b1f53 100644 --- a/docs/test_cases/t00039_class_mermaid.svg +++ b/docs/test_cases/t00039_class_mermaid.svg @@ -184,7 +184,7 @@ - + @@ -203,7 +203,7 @@ - + @@ -222,7 +222,7 @@ - + @@ -241,7 +241,7 @@ - + @@ -260,7 +260,7 @@ - + @@ -279,7 +279,7 @@ - + @@ -298,7 +298,7 @@ - + @@ -317,7 +317,7 @@ - + @@ -336,7 +336,7 @@ - + @@ -360,7 +360,7 @@ - + @@ -379,7 +379,7 @@ - + @@ -403,7 +403,7 @@ - + @@ -427,7 +427,7 @@ - + @@ -451,7 +451,7 @@ - + diff --git a/docs/test_cases/t00040.md b/docs/test_cases/t00040.md index c3826184..fe1d5978 100644 --- a/docs/test_cases/t00040.md +++ b/docs/test_cases/t00040.md @@ -21,7 +21,7 @@ diagrams: - clanguml::t00040::B ``` ## Source code -File t00040.cc +File `tests/t00040/t00040.cc` ```cpp namespace clanguml::t00040 { @@ -71,7 +71,7 @@ struct R { "elements": [ { "bases": [], - "display_name": "clanguml::t00040::A", + "display_name": "A", "id": "307580006083737677", "is_abstract": false, "is_nested": false, @@ -112,6 +112,7 @@ struct R { "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -151,7 +152,7 @@ struct R { "name": "clanguml::t00040::A" } ], - "display_name": "clanguml::t00040::AA", + "display_name": "AA", "id": "534115812779766127", "is_abstract": false, "is_nested": false, @@ -180,7 +181,7 @@ struct R { "name": "clanguml::t00040::AA" } ], - "display_name": "clanguml::t00040::AAA", + "display_name": "AAA", "id": "745371908432158369", "is_abstract": false, "is_nested": false, @@ -221,6 +222,7 @@ struct R { "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -253,7 +255,7 @@ struct R { }, { "bases": [], - "display_name": "clanguml::t00040::R", + "display_name": "R", "id": "1539035020975101539", "is_abstract": false, "is_nested": false, @@ -269,6 +271,7 @@ struct R { "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -306,6 +309,7 @@ struct R { } ], "name": "t00040_class", + "package_type": "namespace", "relationships": [ { "access": "public", diff --git a/docs/test_cases/t00040_class.svg b/docs/test_cases/t00040_class.svg index aab8e213..1f59a480 100644 --- a/docs/test_cases/t00040_class.svg +++ b/docs/test_cases/t00040_class.svg @@ -1,6 +1,6 @@ - + @@ -9,70 +9,70 @@ - - + + A - + - + get_a() : int - + - + ii_ : int - - + + AA - - + + AAA - + - + get_aaa() : int - + - + b : B * - - + + R - + - + foo(A * a) : void diff --git a/docs/test_cases/t00040_class_mermaid.svg b/docs/test_cases/t00040_class_mermaid.svg index 8613ef7c..82e3afbc 100644 --- a/docs/test_cases/t00040_class_mermaid.svg +++ b/docs/test_cases/t00040_class_mermaid.svg @@ -74,7 +74,7 @@ - + @@ -103,7 +103,7 @@ - + @@ -122,7 +122,7 @@ - + @@ -151,7 +151,7 @@ - + diff --git a/docs/test_cases/t00041.md b/docs/test_cases/t00041.md index 970ddd93..d881e31d 100644 --- a/docs/test_cases/t00041.md +++ b/docs/test_cases/t00041.md @@ -22,7 +22,7 @@ diagrams: - dependency ``` ## Source code -File t00041.cc +File `tests/t00041/t00041.cc` ```cpp namespace clanguml::t00041 { @@ -82,7 +82,7 @@ struct NM : public N { }; "elements": [ { "bases": [], - "display_name": "clanguml::t00041::R", + "display_name": "R", "id": "775317088453163919", "is_abstract": false, "is_nested": false, @@ -104,7 +104,7 @@ struct NM : public N { }; }, { "bases": [], - "display_name": "clanguml::t00041::D", + "display_name": "D", "id": "1798851434286108347", "is_abstract": false, "is_nested": false, @@ -139,7 +139,7 @@ struct NM : public N { }; }, { "bases": [], - "display_name": "clanguml::t00041::E", + "display_name": "E", "id": "2158730167547707264", "is_abstract": false, "is_nested": false, @@ -161,7 +161,7 @@ struct NM : public N { }; }, { "bases": [], - "display_name": "clanguml::t00041::F", + "display_name": "F", "id": "430600213408545846", "is_abstract": false, "is_nested": false, @@ -190,7 +190,7 @@ struct NM : public N { }; "name": "clanguml::t00041::R" } ], - "display_name": "clanguml::t00041::RR", + "display_name": "RR", "id": "175608867682236642", "is_abstract": false, "is_nested": false, @@ -243,6 +243,7 @@ struct NM : public N { }; "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -287,7 +288,7 @@ struct NM : public N { }; "name": "clanguml::t00041::RR" } ], - "display_name": "clanguml::t00041::RRR", + "display_name": "RRR", "id": "819254010294444715", "is_abstract": false, "is_nested": false, @@ -309,7 +310,7 @@ struct NM : public N { }; }, { "bases": [], - "display_name": "clanguml::t00041::ns1::N", + "display_name": "ns1::N", "id": "220253364661036147", "is_abstract": false, "is_nested": false, @@ -338,7 +339,7 @@ struct NM : public N { }; "name": "clanguml::t00041::ns1::N" } ], - "display_name": "clanguml::t00041::ns1::NN", + "display_name": "ns1::NN", "id": "618038667214398895", "is_abstract": false, "is_nested": false, @@ -367,7 +368,7 @@ struct NM : public N { }; "name": "clanguml::t00041::ns1::N" } ], - "display_name": "clanguml::t00041::ns1::NM", + "display_name": "ns1::NM", "id": "1206750351408617127", "is_abstract": false, "is_nested": false, @@ -389,6 +390,7 @@ struct NM : public N { }; } ], "name": "t00041_class", + "package_type": "namespace", "relationships": [ { "access": "public", diff --git a/docs/test_cases/t00041_class.svg b/docs/test_cases/t00041_class.svg index 5ecbe97f..bc11a084 100644 --- a/docs/test_cases/t00041_class.svg +++ b/docs/test_cases/t00041_class.svg @@ -1,6 +1,6 @@ - + @@ -9,107 +9,107 @@ - - + + R - - + + D - + - + rr : RR * - - + + E - - + + F - - + + RR - + - + foo(H * h) : void - + - + e : E * - + - + f : F * - + - + g : detail::G * - - + + RRR - - + + ns1::N - - + + ns1::NN - - + + ns1::NM diff --git a/docs/test_cases/t00041_class_mermaid.svg b/docs/test_cases/t00041_class_mermaid.svg index d952a32e..09b55765 100644 --- a/docs/test_cases/t00041_class_mermaid.svg +++ b/docs/test_cases/t00041_class_mermaid.svg @@ -130,7 +130,7 @@ - + @@ -149,7 +149,7 @@ - + @@ -173,7 +173,7 @@ - + @@ -192,7 +192,7 @@ - + @@ -211,7 +211,7 @@ - + @@ -250,7 +250,7 @@ - + @@ -269,7 +269,7 @@ - + @@ -288,7 +288,7 @@ - + @@ -307,7 +307,7 @@ - + diff --git a/docs/test_cases/t00042.md b/docs/test_cases/t00042.md index d3f37dca..f9e2e655 100644 --- a/docs/test_cases/t00042.md +++ b/docs/test_cases/t00042.md @@ -21,7 +21,7 @@ diagrams: - std ``` ## Source code -File t00042.cc +File `tests/t00042/t00042.cc` ```cpp #include @@ -67,7 +67,7 @@ struct R { "elements": [ { "bases": [], - "display_name": "clanguml::t00042::A", + "display_name": "A", "id": "462160951579835462", "is_abstract": false, "is_nested": false, @@ -109,7 +109,7 @@ struct R { }, { "bases": [], - "display_name": "clanguml::t00042::A", + "display_name": "A", "id": "1422802342059669545", "is_abstract": false, "is_nested": false, @@ -151,7 +151,7 @@ struct R { }, { "bases": [], - "display_name": "clanguml::t00042::B", + "display_name": "B", "id": "1414456934388678010", "is_abstract": false, "is_nested": false, @@ -211,7 +211,7 @@ struct R { }, { "bases": [], - "display_name": "clanguml::t00042::A", + "display_name": "A", "id": "364538479078826988", "is_abstract": false, "is_nested": false, @@ -240,7 +240,7 @@ struct R { }, { "bases": [], - "display_name": "clanguml::t00042::A", + "display_name": "A", "id": "496773262538580186", "is_abstract": false, "is_nested": false, @@ -269,7 +269,7 @@ struct R { }, { "bases": [], - "display_name": "clanguml::t00042::B", + "display_name": "B", "id": "1833471931530161359", "is_abstract": false, "is_nested": false, @@ -304,6 +304,7 @@ struct R { } ], "name": "t00042_class", + "package_type": "namespace", "relationships": [ { "access": "public", diff --git a/docs/test_cases/t00042_class.svg b/docs/test_cases/t00042_class.svg index 0cb9049f..ea89bd86 100644 --- a/docs/test_cases/t00042_class.svg +++ b/docs/test_cases/t00042_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + A @@ -19,15 +19,15 @@ - + - + a : T - - + + A @@ -36,15 +36,15 @@ - + - + a : void * - - + + B @@ -53,22 +53,22 @@ - + - + b : T - + - + bb : K - - + + A @@ -77,8 +77,8 @@ - - + + A @@ -87,8 +87,8 @@ - - + + B diff --git a/docs/test_cases/t00042_class_mermaid.svg b/docs/test_cases/t00042_class_mermaid.svg index bff212c9..6a685df8 100644 --- a/docs/test_cases/t00042_class_mermaid.svg +++ b/docs/test_cases/t00042_class_mermaid.svg @@ -102,7 +102,7 @@ - + @@ -126,7 +126,7 @@ - + @@ -150,7 +150,7 @@ - + @@ -179,7 +179,7 @@ - + @@ -198,7 +198,7 @@ - + @@ -217,7 +217,7 @@ - + diff --git a/docs/test_cases/t00043.md b/docs/test_cases/t00043.md index e2557d36..be2f8518 100644 --- a/docs/test_cases/t00043.md +++ b/docs/test_cases/t00043.md @@ -17,7 +17,7 @@ diagrams: - dependency ``` ## Source code -File t00043.cc +File `tests/t00043/t00043.cc` ```cpp namespace clanguml::t00043 { @@ -85,11 +85,11 @@ struct J { "diagram_type": "class", "elements": [ { - "display_name": "clanguml::t00043::dependants", + "display_name": "dependants", "elements": [ { "bases": [], - "display_name": "clanguml::t00043::dependants::A", + "display_name": "dependants::A", "id": "1454679300998460550", "is_abstract": false, "is_nested": false, @@ -111,7 +111,7 @@ struct J { }, { "bases": [], - "display_name": "clanguml::t00043::dependants::B", + "display_name": "dependants::B", "id": "1972977265990430931", "is_abstract": false, "is_nested": false, @@ -127,6 +127,7 @@ struct J { "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -164,7 +165,7 @@ struct J { }, { "bases": [], - "display_name": "clanguml::t00043::dependants::BB", + "display_name": "dependants::BB", "id": "1906291555025945295", "is_abstract": false, "is_nested": false, @@ -180,6 +181,7 @@ struct J { "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -217,7 +219,7 @@ struct J { }, { "bases": [], - "display_name": "clanguml::t00043::dependants::C", + "display_name": "dependants::C", "id": "823759225351121534", "is_abstract": false, "is_nested": false, @@ -233,6 +235,7 @@ struct J { "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -270,7 +273,7 @@ struct J { }, { "bases": [], - "display_name": "clanguml::t00043::dependants::D", + "display_name": "dependants::D", "id": "2277976215348279426", "is_abstract": false, "is_nested": false, @@ -286,6 +289,7 @@ struct J { "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -316,6 +320,7 @@ struct J { "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -353,7 +358,7 @@ struct J { }, { "bases": [], - "display_name": "clanguml::t00043::dependants::E", + "display_name": "dependants::E", "id": "1694685540293810116", "is_abstract": false, "is_nested": false, @@ -369,6 +374,7 @@ struct J { "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -409,11 +415,11 @@ struct J { "type": "namespace" }, { - "display_name": "clanguml::t00043::dependencies", + "display_name": "dependencies", "elements": [ { "bases": [], - "display_name": "clanguml::t00043::dependencies::G", + "display_name": "dependencies::G", "id": "736400571183204899", "is_abstract": false, "is_nested": false, @@ -435,7 +441,7 @@ struct J { }, { "bases": [], - "display_name": "clanguml::t00043::dependencies::GG", + "display_name": "dependencies::GG", "id": "1522297681294871411", "is_abstract": false, "is_nested": false, @@ -457,7 +463,7 @@ struct J { }, { "bases": [], - "display_name": "clanguml::t00043::dependencies::H", + "display_name": "dependencies::H", "id": "1534191494825314170", "is_abstract": false, "is_nested": false, @@ -473,6 +479,7 @@ struct J { "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -503,6 +510,7 @@ struct J { "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -540,7 +548,7 @@ struct J { }, { "bases": [], - "display_name": "clanguml::t00043::dependencies::I", + "display_name": "dependencies::I", "id": "97422543769740359", "is_abstract": false, "is_nested": false, @@ -556,6 +564,7 @@ struct J { "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -593,7 +602,7 @@ struct J { }, { "bases": [], - "display_name": "clanguml::t00043::dependencies::J", + "display_name": "dependencies::J", "id": "1498530043106438011", "is_abstract": false, "is_nested": false, @@ -609,6 +618,7 @@ struct J { "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -650,6 +660,7 @@ struct J { } ], "name": "t00043_class", + "package_type": "namespace", "relationships": [ { "access": "public", diff --git a/docs/test_cases/t00043_class.svg b/docs/test_cases/t00043_class.svg index 86acef31..af1fb66f 100644 --- a/docs/test_cases/t00043_class.svg +++ b/docs/test_cases/t00043_class.svg @@ -1,6 +1,6 @@ - + @@ -9,167 +9,167 @@ - + dependants - + dependencies - - + + A - - + + B - + - + b(A * a) : void - - + + BB - + - + bb(A * a) : void - - + + C - + - + c(B * b) : void - - + + D - + - + d(C * c) : void - + - + dd(BB * bb) : void - - + + E - + - + e(D * d) : void - - + + G - - + + GG - - + + H - + - + h(G * g) : void - + - + hh(GG * gg) : void - - + + I - + - + i(H * h) : void - - + + J - + - + i(I * i) : void diff --git a/docs/test_cases/t00043_class_mermaid.svg b/docs/test_cases/t00043_class_mermaid.svg index fd971ff0..bafa8736 100644 --- a/docs/test_cases/t00043_class_mermaid.svg +++ b/docs/test_cases/t00043_class_mermaid.svg @@ -174,7 +174,7 @@ - + @@ -193,7 +193,7 @@ - + @@ -217,7 +217,7 @@ - + @@ -241,7 +241,7 @@ - + @@ -265,7 +265,7 @@ - + @@ -294,7 +294,7 @@ - + @@ -318,7 +318,7 @@ - + @@ -337,7 +337,7 @@ - + @@ -356,7 +356,7 @@ - + @@ -385,7 +385,7 @@ - + @@ -409,7 +409,7 @@ - + diff --git a/docs/test_cases/t00044.md b/docs/test_cases/t00044.md index 96c0e5ce..e11b072d 100644 --- a/docs/test_cases/t00044.md +++ b/docs/test_cases/t00044.md @@ -13,7 +13,7 @@ diagrams: - clanguml::t00044 ``` ## Source code -File t00044.cc +File `tests/t00044/t00044.cc` ```cpp // Inspired by skypjack/entt signal handlers namespace clanguml::t00044 { @@ -65,7 +65,7 @@ struct R { "elements": [ { "bases": [], - "display_name": "clanguml::t00044::signal_handler", + "display_name": "signal_handler", "id": "1591729735727316875", "is_abstract": false, "is_nested": false, @@ -112,7 +112,7 @@ struct R { }, { "bases": [], - "display_name": "clanguml::t00044::sink>", + "display_name": "sink>", "id": "559574389062594251", "is_abstract": false, "is_nested": false, @@ -141,6 +141,7 @@ struct R { "is_constexpr": false, "is_constructor": true, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -171,6 +172,7 @@ struct R { "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -229,7 +231,7 @@ struct R { }, { "bases": [], - "display_name": "clanguml::t00044::signal_handler", + "display_name": "signal_handler", "id": "103559998624864011", "is_abstract": false, "is_nested": false, @@ -276,7 +278,7 @@ struct R { }, { "bases": [], - "display_name": "clanguml::t00044::sink>", + "display_name": "sink>", "id": "1718007222067272862", "is_abstract": false, "is_nested": false, @@ -330,7 +332,7 @@ struct R { }, { "bases": [], - "display_name": "clanguml::t00044::R", + "display_name": "R", "id": "1644484569399365272", "is_abstract": false, "is_nested": false, @@ -365,7 +367,7 @@ struct R { }, { "bases": [], - "display_name": "clanguml::t00044::signal_handler", + "display_name": "signal_handler", "id": "276594465967577895", "is_abstract": false, "is_nested": false, @@ -400,7 +402,7 @@ struct R { }, { "bases": [], - "display_name": "clanguml::t00044::sink", + "display_name": "sink", "id": "1759724482769288325", "is_abstract": false, "is_nested": false, @@ -429,6 +431,7 @@ struct R { } ], "name": "t00044_class", + "package_type": "namespace", "relationships": [ { "access": "public", diff --git a/docs/test_cases/t00044_class.svg b/docs/test_cases/t00044_class.svg index 5eea494f..67538079 100644 --- a/docs/test_cases/t00044_class.svg +++ b/docs/test_cases/t00044_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + signal_handler @@ -19,8 +19,8 @@ - - + + sink @@ -28,26 +28,26 @@ signal_handler<Ret(Args...),A> - + - + sink(signal_t & sh) : void get_signal<CastTo>() : CastTo * - + - + signal : signal_t * - - + + signal_handler @@ -56,8 +56,8 @@ - - + + sink @@ -66,23 +66,23 @@ - - + + R - + - + sink1 : sink<signal_handler<void (int),bool>> - - + + signal_handler @@ -91,8 +91,8 @@ - - + + sink diff --git a/docs/test_cases/t00044_class_mermaid.svg b/docs/test_cases/t00044_class_mermaid.svg index d98a99da..049ce887 100644 --- a/docs/test_cases/t00044_class_mermaid.svg +++ b/docs/test_cases/t00044_class_mermaid.svg @@ -138,7 +138,7 @@ - + @@ -157,7 +157,7 @@ - + @@ -191,7 +191,7 @@ - + @@ -210,7 +210,7 @@ - + @@ -229,7 +229,7 @@ - + @@ -253,7 +253,7 @@ - + @@ -272,7 +272,7 @@ - + diff --git a/docs/test_cases/t00045.md b/docs/test_cases/t00045.md index f5372bcc..4659275c 100644 --- a/docs/test_cases/t00045.md +++ b/docs/test_cases/t00045.md @@ -11,7 +11,7 @@ diagrams: - std ``` ## Source code -File t00045.cc +File `tests/t00045/t00045.cc` ```cpp class A { }; @@ -424,6 +424,7 @@ public: "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -461,6 +462,7 @@ public: } ], "name": "t00045_class", + "package_type": "namespace", "relationships": [ { "access": "public", diff --git a/docs/test_cases/t00045_class.svg b/docs/test_cases/t00045_class.svg index f13e9bbf..04eb02c3 100644 --- a/docs/test_cases/t00045_class.svg +++ b/docs/test_cases/t00045_class.svg @@ -1,6 +1,6 @@ - + @@ -9,32 +9,32 @@ - - + + A - - + + AA - - + + AAA - - + + AAAA @@ -43,110 +43,110 @@ - + - + t : T - - + + ns1::A - - + + ns1::ns2::A - - + + ns1::ns2::B - - + + ns1::ns2::C - - + + ns1::ns2::D - - + + ns1::ns2::E - - + + ns1::ns2::AAA - - + + ns1::ns2::R - + - + foo(AA & aa) : void - + - + a : A * - + - + ns1_a : ns1::A * - + - + ns1_ns2_a : ns1::ns2::A * - + - + root_a : ::A * diff --git a/docs/test_cases/t00045_class_mermaid.svg b/docs/test_cases/t00045_class_mermaid.svg index ad7e8a41..d4b81a7a 100644 --- a/docs/test_cases/t00045_class_mermaid.svg +++ b/docs/test_cases/t00045_class_mermaid.svg @@ -166,7 +166,7 @@ - + @@ -185,7 +185,7 @@ - + @@ -204,7 +204,7 @@ - + @@ -223,7 +223,7 @@ - + @@ -247,7 +247,7 @@ - + @@ -266,7 +266,7 @@ - + @@ -285,7 +285,7 @@ - + @@ -304,7 +304,7 @@ - + @@ -323,7 +323,7 @@ - + @@ -342,7 +342,7 @@ - + @@ -361,7 +361,7 @@ - + @@ -380,7 +380,7 @@ - + diff --git a/docs/test_cases/t00046.md b/docs/test_cases/t00046.md index 8db7f304..46bccef1 100644 --- a/docs/test_cases/t00046.md +++ b/docs/test_cases/t00046.md @@ -12,7 +12,7 @@ diagrams: - std ``` ## Source code -File t00046.cc +File `tests/t00046/t00046.cc` ```cpp #include #include @@ -130,7 +130,7 @@ public: "type": "class" }, { - "display_name": "ns1::ns2", + "display_name": "ns2", "elements": [ { "bases": [], @@ -349,6 +349,7 @@ public: "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -394,6 +395,7 @@ public: } ], "name": "t00046_class", + "package_type": "namespace", "relationships": [ { "access": "public", diff --git a/docs/test_cases/t00046_class.svg b/docs/test_cases/t00046_class.svg index 3d5f5f35..85046385 100644 --- a/docs/test_cases/t00046_class.svg +++ b/docs/test_cases/t00046_class.svg @@ -1,6 +1,6 @@ - + @@ -9,120 +9,120 @@ - + ns1 - + ns2 - - + + A - - + + A - - + + B - - + + C - - + + D - - + + E - - + + R - + - + foo(AA & aa) : void - + - + a : A * - + - + i : std::vector<std::uint8_t> - + - + ns1_a : ns1::A * - + - + ns1_ns2_a : ns1::ns2::A * - + - + root_a : ::A * - - + + A - - + + AA diff --git a/docs/test_cases/t00046_class_mermaid.svg b/docs/test_cases/t00046_class_mermaid.svg index c6735e8d..b63ebf3e 100644 --- a/docs/test_cases/t00046_class_mermaid.svg +++ b/docs/test_cases/t00046_class_mermaid.svg @@ -154,7 +154,7 @@ - + @@ -173,7 +173,7 @@ - + @@ -192,7 +192,7 @@ - + @@ -211,7 +211,7 @@ - + @@ -230,7 +230,7 @@ - + @@ -249,7 +249,7 @@ - + @@ -268,7 +268,7 @@ - + @@ -287,7 +287,7 @@ - + @@ -306,7 +306,7 @@ - + diff --git a/docs/test_cases/t00047.md b/docs/test_cases/t00047.md index f8f5093b..66b74dc5 100644 --- a/docs/test_cases/t00047.md +++ b/docs/test_cases/t00047.md @@ -12,7 +12,7 @@ diagrams: - clanguml::t00047 ``` ## Source code -File t00047.cc +File `tests/t00047/t00047.cc` ```cpp #include @@ -52,7 +52,7 @@ using conditional = typename conditional_t::type; "elements": [ { "bases": [], - "display_name": "clanguml::t00047::conditional_t", + "display_name": "conditional_t", "id": "47394280824625133", "is_abstract": false, "is_nested": false, @@ -81,7 +81,7 @@ using conditional = typename conditional_t::type; }, { "bases": [], - "display_name": "clanguml::t00047::conditional_t", + "display_name": "conditional_t", "id": "599782159389775809", "is_abstract": false, "is_nested": false, @@ -122,7 +122,7 @@ using conditional = typename conditional_t::type; }, { "bases": [], - "display_name": "clanguml::t00047::conditional_t", + "display_name": "conditional_t", "id": "824938194184364511", "is_abstract": false, "is_nested": false, @@ -163,7 +163,7 @@ using conditional = typename conditional_t::type; }, { "bases": [], - "display_name": "clanguml::t00047::conditional_t", + "display_name": "conditional_t", "id": "1673692992642087414", "is_abstract": false, "is_nested": false, @@ -192,6 +192,7 @@ using conditional = typename conditional_t::type; } ], "name": "t00047_class", + "package_type": "namespace", "relationships": [ { "access": "public", diff --git a/docs/test_cases/t00047_class.svg b/docs/test_cases/t00047_class.svg index b2906ed0..db457d66 100644 --- a/docs/test_cases/t00047_class.svg +++ b/docs/test_cases/t00047_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + conditional_t @@ -19,8 +19,8 @@ - - + + conditional_t @@ -29,8 +29,8 @@ - - + + conditional_t @@ -39,8 +39,8 @@ - - + + conditional_t diff --git a/docs/test_cases/t00047_class_mermaid.svg b/docs/test_cases/t00047_class_mermaid.svg index a13c7f79..6954c516 100644 --- a/docs/test_cases/t00047_class_mermaid.svg +++ b/docs/test_cases/t00047_class_mermaid.svg @@ -90,7 +90,7 @@ - + @@ -109,7 +109,7 @@ - + @@ -128,7 +128,7 @@ - + @@ -147,7 +147,7 @@ - + diff --git a/docs/test_cases/t00048.md b/docs/test_cases/t00048.md index 070fa091..c42e151d 100644 --- a/docs/test_cases/t00048.md +++ b/docs/test_cases/t00048.md @@ -14,7 +14,7 @@ diagrams: - clanguml::t00048 ``` ## Source code -File b_t00048.h +File `tests/t00048/b_t00048.h` ```cpp #include "t00048.h" @@ -38,7 +38,7 @@ template struct BTemplate : public BaseTemplate { } } ``` -File b_t00048.cc +File `tests/t00048/b_t00048.cc` ```cpp #include "b_t00048.h" @@ -50,7 +50,7 @@ void B::foo() { } } } ``` -File t00048.cc +File `tests/t00048/t00048.cc` ```cpp #include "t00048.h" @@ -59,7 +59,7 @@ namespace t00048 { } } ``` -File a_t00048.h +File `tests/t00048/a_t00048.h` ```cpp #include "t00048.h" @@ -83,7 +83,7 @@ template struct ATemplate : public BaseTemplate { } } ``` -File a_t00048.cc +File `tests/t00048/a_t00048.cc` ```cpp #include "a_t00048.h" @@ -95,7 +95,7 @@ void A::foo() { } } } ``` -File t00048.h +File `tests/t00048/t00048.h` ```cpp #pragma once @@ -128,7 +128,7 @@ template struct BaseTemplate { "elements": [ { "bases": [], - "display_name": "clanguml::t00048::Base", + "display_name": "Base", "id": "10200626899013233", "is_abstract": true, "is_nested": false, @@ -157,6 +157,7 @@ template struct BaseTemplate { "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -189,7 +190,7 @@ template struct BaseTemplate { }, { "bases": [], - "display_name": "clanguml::t00048::BaseTemplate", + "display_name": "BaseTemplate", "id": "630197772543569536", "is_abstract": true, "is_nested": false, @@ -218,6 +219,7 @@ template struct BaseTemplate { "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -264,7 +266,7 @@ template struct BaseTemplate { "name": "clanguml::t00048::Base" } ], - "display_name": "clanguml::t00048::B", + "display_name": "B", "id": "59336049758992190", "is_abstract": false, "is_nested": false, @@ -293,6 +295,7 @@ template struct BaseTemplate { "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -332,7 +335,7 @@ template struct BaseTemplate { "name": "BaseTemplate" } ], - "display_name": "clanguml::t00048::BTemplate", + "display_name": "BTemplate", "id": "1635850649347735305", "is_abstract": false, "is_nested": false, @@ -361,6 +364,7 @@ template struct BaseTemplate { "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -407,7 +411,7 @@ template struct BaseTemplate { "name": "clanguml::t00048::Base" } ], - "display_name": "clanguml::t00048::A", + "display_name": "A", "id": "199333691834211223", "is_abstract": false, "is_nested": false, @@ -436,6 +440,7 @@ template struct BaseTemplate { "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -475,7 +480,7 @@ template struct BaseTemplate { "name": "BaseTemplate" } ], - "display_name": "clanguml::t00048::ATemplate", + "display_name": "ATemplate", "id": "1025697108404463905", "is_abstract": false, "is_nested": false, @@ -504,6 +509,7 @@ template struct BaseTemplate { "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -543,6 +549,7 @@ template struct BaseTemplate { } ], "name": "t00048_class", + "package_type": "namespace", "relationships": [ { "access": "public", diff --git a/docs/test_cases/t00048_class.svg b/docs/test_cases/t00048_class.svg index a03cfad9..1e4d98ef 100644 --- a/docs/test_cases/t00048_class.svg +++ b/docs/test_cases/t00048_class.svg @@ -1,6 +1,6 @@ - + @@ -9,30 +9,30 @@ - - + + Base - + - + foo() = 0 : void - + - + base : int - - + + BaseTemplate @@ -40,45 +40,45 @@ T - + - + foo() = 0 : void - + - + base : T - - + + B - + - + foo() : void - + - + b : int - - + + BTemplate @@ -86,45 +86,45 @@ T - + - + foo() : void - + - + b : T - - + + A - + - + foo() : void - + - + a : int - - + + ATemplate @@ -132,19 +132,19 @@ T - + - + foo() : void - + - + a : T diff --git a/docs/test_cases/t00048_class_mermaid.svg b/docs/test_cases/t00048_class_mermaid.svg index 53eda906..c987436e 100644 --- a/docs/test_cases/t00048_class_mermaid.svg +++ b/docs/test_cases/t00048_class_mermaid.svg @@ -94,7 +94,7 @@ - + @@ -123,7 +123,7 @@ - + @@ -152,7 +152,7 @@ - + @@ -181,7 +181,7 @@ - + @@ -210,7 +210,7 @@ - + @@ -239,7 +239,7 @@ - + diff --git a/docs/test_cases/t00049.md b/docs/test_cases/t00049.md index e70de0d7..e076aaab 100644 --- a/docs/test_cases/t00049.md +++ b/docs/test_cases/t00049.md @@ -18,7 +18,7 @@ diagrams: - clanguml::t00049 ``` ## Source code -File t00049.cc +File `tests/t00049/t00049.cc` ```cpp #include #include @@ -55,7 +55,7 @@ struct R { "elements": [ { "bases": [], - "display_name": "clanguml::t00049::A", + "display_name": "A", "id": "372971769516871577", "is_abstract": false, "is_nested": false, @@ -84,6 +84,7 @@ struct R { "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -123,7 +124,7 @@ struct R { }, { "bases": [], - "display_name": "clanguml::t00049::A", + "display_name": "A", "id": "654829353386288443", "is_abstract": false, "is_nested": false, @@ -152,7 +153,7 @@ struct R { }, { "bases": [], - "display_name": "clanguml::t00049::A", + "display_name": "A", "id": "973058255816844469", "is_abstract": false, "is_nested": false, @@ -181,7 +182,7 @@ struct R { }, { "bases": [], - "display_name": "clanguml::t00049::A", + "display_name": "A", "id": "562074851310302010", "is_abstract": false, "is_nested": false, @@ -210,7 +211,7 @@ struct R { }, { "bases": [], - "display_name": "clanguml::t00049::R", + "display_name": "R", "id": "2288024073053091226", "is_abstract": false, "is_nested": false, @@ -263,6 +264,7 @@ struct R { "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -288,6 +290,7 @@ struct R { "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -325,6 +328,7 @@ struct R { } ], "name": "t00049_class", + "package_type": "namespace", "relationships": [ { "access": "public", diff --git a/docs/test_cases/t00049_class.svg b/docs/test_cases/t00049_class.svg index 7d511227..2a95a451 100644 --- a/docs/test_cases/t00049_class.svg +++ b/docs/test_cases/t00049_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + A @@ -18,23 +18,23 @@ T - + - + get_a() : T & - + - + a : T - - + + A @@ -43,8 +43,8 @@ - - + + A @@ -53,8 +53,8 @@ - - + + A @@ -63,47 +63,47 @@ - - + + R - + - + get_int_map() : A<intmap> - + - + set_int_map(A<intmap> && int_map) : void - + - + a_int_map : A<intmap> - + - + a_string : A<thestring> - + - + a_vector_string : A<string_vector> diff --git a/docs/test_cases/t00049_class_mermaid.svg b/docs/test_cases/t00049_class_mermaid.svg index 4e4016f5..5ae87ae2 100644 --- a/docs/test_cases/t00049_class_mermaid.svg +++ b/docs/test_cases/t00049_class_mermaid.svg @@ -126,7 +126,7 @@ - + @@ -155,7 +155,7 @@ - + @@ -174,7 +174,7 @@ - + @@ -193,7 +193,7 @@ - + @@ -212,7 +212,7 @@ - + diff --git a/docs/test_cases/t00050.md b/docs/test_cases/t00050.md index 90a25345..2e847070 100644 --- a/docs/test_cases/t00050.md +++ b/docs/test_cases/t00050.md @@ -105,7 +105,7 @@ diagrams: ``` ## Source code -File t00050.cc +File `tests/t00050/t00050.cc` ```cpp namespace clanguml { @@ -223,7 +223,7 @@ class NoComment { }; "raw": "/// Lorem ipsum dolor sit", "text": "\n Lorem ipsum dolor sit\n" }, - "display_name": "clanguml::t00050::A", + "display_name": "A", "id": "1885563213397742674", "is_abstract": false, "is_nested": false, @@ -263,7 +263,7 @@ class NoComment { }; " 3. Implement\n" ] }, - "display_name": "clanguml::t00050::B", + "display_name": "B", "id": "500262098409836244", "is_abstract": false, "is_nested": false, @@ -299,7 +299,7 @@ class NoComment { }; "raw": "/// \\brief Long comment example\n///\n/// Lorem ipsum dolor sit amet consectetur adipiscing elit, urna consequat felis\n/// vehicula class ultricies mollis dictumst, aenean non a in donec nulla.\n/// Phasellus ante pellentesque erat cum risus consequat imperdiet aliquam,\n/// integer placerat et turpis mi eros nec lobortis taciti, vehicula nisl litora\n/// tellus ligula porttitor metus.\n///\n/// Vivamus integer non suscipit taciti mus etiam at primis tempor sagittis sit,\n/// euismod libero facilisi aptent elementum felis blandit cursus gravida sociis\n/// erat ante, eleifend lectus nullam dapibus netus feugiat curae curabitur est\n/// ad. Massa curae fringilla porttitor quam sollicitudin iaculis aptent leo\n/// ligula euismod dictumst, orci penatibus mauris eros etiam praesent erat\n/// volutpat posuere hac. Metus fringilla nec ullamcorper odio aliquam lacinia\n/// conubia mauris tempor, etiam ultricies proin quisque lectus sociis id\n/// tristique, integer phasellus taciti pretium adipiscing tortor sagittis\n/// ligula.\n///\n/// Mollis pretium lorem primis senectus habitasse lectus scelerisque\n/// donec, ultricies tortor suspendisse adipiscing fusce morbi volutpat\n/// pellentesque, consectetur mi risus molestie curae malesuada cum. Dignissim\n/// lacus convallis massa mauris enim ad mattis magnis senectus montes, mollis\n/// taciti phasellus accumsan bibendum semper blandit suspendisse faucibus nibh\n/// est, metus lobortis morbi cras magna vivamus per risus fermentum. Dapibus\n/// imperdiet praesent magnis ridiculus congue gravida curabitur dictum\n/// sagittis, enim et magna sit inceptos sodales parturient pharetra mollis,\n/// aenean vel nostra tellus commodo pretium sapien sociosqu.", "text": "\n \n\n Lorem ipsum dolor sit amet consectetur adipiscing elit, urna consequat felis\n vehicula class ultricies mollis dictumst, aenean non a in donec nulla.\n Phasellus ante pellentesque erat cum risus consequat imperdiet aliquam,\n integer placerat et turpis mi eros nec lobortis taciti, vehicula nisl litora\n tellus ligula porttitor metus.\n\n Vivamus integer non suscipit taciti mus etiam at primis tempor sagittis sit,\n euismod libero facilisi aptent elementum felis blandit cursus gravida sociis\n erat ante, eleifend lectus nullam dapibus netus feugiat curae curabitur est\n ad. Massa curae fringilla porttitor quam sollicitudin iaculis aptent leo\n ligula euismod dictumst, orci penatibus mauris eros etiam praesent erat\n volutpat posuere hac. Metus fringilla nec ullamcorper odio aliquam lacinia\n conubia mauris tempor, etiam ultricies proin quisque lectus sociis id\n tristique, integer phasellus taciti pretium adipiscing tortor sagittis\n ligula.\n\n Mollis pretium lorem primis senectus habitasse lectus scelerisque\n donec, ultricies tortor suspendisse adipiscing fusce morbi volutpat\n pellentesque, consectetur mi risus molestie curae malesuada cum. Dignissim\n lacus convallis massa mauris enim ad mattis magnis senectus montes, mollis\n taciti phasellus accumsan bibendum semper blandit suspendisse faucibus nibh\n est, metus lobortis morbi cras magna vivamus per risus fermentum. Dapibus\n imperdiet praesent magnis ridiculus congue gravida curabitur dictum\n sagittis, enim et magna sit inceptos sodales parturient pharetra mollis,\n aenean vel nostra tellus commodo pretium sapien sociosqu.\n" }, - "display_name": "clanguml::t00050::C", + "display_name": "C", "id": "1663081653671078922", "is_abstract": false, "is_nested": false, @@ -333,7 +333,7 @@ class NoComment { }; " Implement...\n" ] }, - "display_name": "clanguml::t00050::utils::D", + "display_name": "utils::D", "id": "1492514566602019299", "is_abstract": false, "is_nested": false, @@ -367,7 +367,7 @@ class NoComment { }; "E2", "E3" ], - "display_name": "clanguml::t00050::E", + "display_name": "E", "id": "2027344031570117998", "is_nested": false, "name": "E", @@ -409,7 +409,7 @@ class NoComment { }; } ] }, - "display_name": "clanguml::t00050::F", + "display_name": "F", "id": "793698410848959592", "is_abstract": false, "is_nested": false, @@ -486,7 +486,7 @@ class NoComment { }; "raw": "/// This is a short description of class G.\n///\n/// This is an intermediate description of class G.\n///\n/// This is a long description of class G.", "text": "\n This is a short description of class G.\n\n This is an intermediate description of class G.\n\n This is a long description of class G.\n" }, - "display_name": "clanguml::t00050::G", + "display_name": "G", "id": "449485154531299941", "is_abstract": false, "is_nested": false, @@ -508,7 +508,7 @@ class NoComment { }; }, { "bases": [], - "display_name": "clanguml::t00050::NoComment", + "display_name": "NoComment", "id": "1832693799357996932", "is_abstract": false, "is_nested": false, @@ -530,6 +530,7 @@ class NoComment { }; } ], "name": "t00050_class", + "package_type": "namespace", "relationships": [], "using_namespace": "clanguml::t00050" } diff --git a/docs/test_cases/t00050_class.svg b/docs/test_cases/t00050_class.svg index e955e835..2de17019 100644 --- a/docs/test_cases/t00050_class.svg +++ b/docs/test_cases/t00050_class.svg @@ -1,6 +1,6 @@ - + @@ -9,40 +9,40 @@ - - + + A - - + + B - - + + C - - + + utils::D - - + + E @@ -52,8 +52,8 @@ E3 - - + + F @@ -62,43 +62,43 @@ - + - + t : T[N] - + - + v : V - - + + G - - + + NoComment - + Lorem ipsum dolor sit - + Lorem ipsum dolor sit - + Lorem ipsum dolor sit amet consectetur adipiscing elit, urna consequat felis vehicula class ultricies mollis dictumst, aenean non a in donec nulla. @@ -125,50 +125,50 @@ imperdiet praesent magnis ridiculus congue gravida curabitur dictum sagittis, enim et magna sit inceptos sodales parturient pharetra mollis, aenean vel nostra tellus commodo pretium sapien sociosqu. - + This is a short description of class G. - + This is an intermediate description of class G. - + This is a long description of class G. - + Lorem ipsum - + TODO 1. Write meaningful comment - + TODO 2. Write tests - + TODO 3. Implement - + Long comment example - + TODO Implement... - + Simple array wrapper. - + Template parameters diff --git a/docs/test_cases/t00050_class_mermaid.svg b/docs/test_cases/t00050_class_mermaid.svg index ec069114..fc0b293b 100644 --- a/docs/test_cases/t00050_class_mermaid.svg +++ b/docs/test_cases/t00050_class_mermaid.svg @@ -184,7 +184,7 @@ - + @@ -203,7 +203,7 @@ - + @@ -222,7 +222,7 @@ - + @@ -241,7 +241,7 @@ - + @@ -260,7 +260,7 @@ - + @@ -294,7 +294,7 @@ - + @@ -323,7 +323,7 @@ - + @@ -342,7 +342,7 @@ - + diff --git a/docs/test_cases/t00051.md b/docs/test_cases/t00051.md index 0f6587fa..1f8cfe80 100644 --- a/docs/test_cases/t00051.md +++ b/docs/test_cases/t00051.md @@ -12,7 +12,7 @@ diagrams: using_namespace: clanguml::t00051 ``` ## Source code -File t00051.cc +File `tests/t00051/t00051.cc` ```cpp #include @@ -97,7 +97,7 @@ A::custom_thread2 A::start_thread2() "name": "std::thread" } ], - "display_name": "clanguml::t00051::B", + "display_name": "B", "id": "486675674447050206", "is_abstract": false, "is_nested": false, @@ -138,6 +138,7 @@ A::custom_thread2 A::start_thread2() "is_constexpr": false, "is_constructor": true, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -172,6 +173,7 @@ A::custom_thread2 A::start_thread2() "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -197,6 +199,7 @@ A::custom_thread2 A::start_thread2() "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -250,7 +253,7 @@ A::custom_thread2 A::start_thread2() "name": "std::thread" } ], - "display_name": "clanguml::t00051::B<(lambda at t00051.cc:43:18),(lambda at t00051.cc:43:27)>", + "display_name": "B<(lambda at t00051.cc:43:18),(lambda at t00051.cc:43:27)>", "id": "1969502737237579476", "is_abstract": false, "is_nested": false, @@ -291,6 +294,7 @@ A::custom_thread2 A::start_thread2() "is_constexpr": false, "is_constructor": true, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -325,6 +329,7 @@ A::custom_thread2 A::start_thread2() "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -350,6 +355,7 @@ A::custom_thread2 A::start_thread2() "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -395,7 +401,7 @@ A::custom_thread2 A::start_thread2() }, { "bases": [], - "display_name": "clanguml::t00051::A", + "display_name": "A", "id": "1064663612772326174", "is_abstract": false, "is_nested": false, @@ -411,6 +417,7 @@ A::custom_thread2 A::start_thread2() "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -436,6 +443,7 @@ A::custom_thread2 A::start_thread2() "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -461,6 +469,7 @@ A::custom_thread2 A::start_thread2() "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -486,6 +495,7 @@ A::custom_thread2 A::start_thread2() "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -525,7 +535,7 @@ A::custom_thread2 A::start_thread2() "name": "std::thread" } ], - "display_name": "clanguml::t00051::A::custom_thread1", + "display_name": "A::custom_thread1", "id": "267762118222214764", "is_abstract": false, "is_nested": true, @@ -541,6 +551,7 @@ A::custom_thread2 A::start_thread2() "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -583,7 +594,7 @@ A::custom_thread2 A::start_thread2() "name": "std::thread" } ], - "display_name": "clanguml::t00051::A::custom_thread2", + "display_name": "A::custom_thread2", "id": "728501319748477470", "is_abstract": false, "is_nested": true, @@ -599,6 +610,7 @@ A::custom_thread2 A::start_thread2() "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -636,6 +648,7 @@ A::custom_thread2 A::start_thread2() } ], "name": "t00051_class", + "package_type": "namespace", "relationships": [ { "access": "private", diff --git a/docs/test_cases/t00051_class.svg b/docs/test_cases/t00051_class.svg index cefcead2..4bbdc77c 100644 --- a/docs/test_cases/t00051_class.svg +++ b/docs/test_cases/t00051_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + B @@ -18,45 +18,45 @@ F,FF=F - + - + B(F && f, FF && ff) : void - + - + f() : void - + - + ff() : void - + - + f_ : F - + - + ff_ : FF - - + + B @@ -64,81 +64,81 @@ (lambda at t00051.cc:43:18),(lambda at t00051.cc:43:27) - + - + B((lambda at t00051.cc:43:18) && f, (lambda at t00051.cc:43:27) && ff) : void - + - + f() : void - + - + ff() : void - + - + f_ : (lambda at t00051.cc:43:18) - + - + ff_ : (lambda at t00051.cc:43:27) - - + + A - + - + get_function() : (lambda at t00051.cc:48:16) - + - + start_thread1() : custom_thread1 - + - + start_thread2() : custom_thread2 - + - + start_thread3() : B<(lambda at t00051.cc:43:18),(lambda at t00051.cc:43:27)> - - + + A::custom_thread1 @@ -147,18 +147,18 @@ custom_thread1<Function,Args...>(Function && f, Args &&... args) : void - - + + A::custom_thread2 - + - + thread((lambda at t00051.cc:59:27) &&) : void diff --git a/docs/test_cases/t00051_class_mermaid.svg b/docs/test_cases/t00051_class_mermaid.svg index 539b4cf2..dc4945c3 100644 --- a/docs/test_cases/t00051_class_mermaid.svg +++ b/docs/test_cases/t00051_class_mermaid.svg @@ -102,7 +102,7 @@ - + @@ -146,7 +146,7 @@ - + @@ -190,7 +190,7 @@ - + @@ -229,7 +229,7 @@ - + @@ -253,7 +253,7 @@ - + diff --git a/docs/test_cases/t00052.md b/docs/test_cases/t00052.md index 93ab2c7b..8e841b26 100644 --- a/docs/test_cases/t00052.md +++ b/docs/test_cases/t00052.md @@ -12,7 +12,7 @@ diagrams: using_namespace: clanguml::t00052 ``` ## Source code -File t00052.cc +File `tests/t00052/t00052.cc` ```cpp #include @@ -61,7 +61,7 @@ struct R { "elements": [ { "bases": [], - "display_name": "clanguml::t00052::A", + "display_name": "A", "id": "2200853067459698271", "is_abstract": false, "is_nested": false, @@ -77,6 +77,7 @@ struct R { "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -101,6 +102,7 @@ struct R { "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -136,7 +138,7 @@ struct R { }, { "bases": [], - "display_name": "clanguml::t00052::B", + "display_name": "B", "id": "1737293776724790064", "is_abstract": false, "is_nested": false, @@ -152,6 +154,7 @@ struct R { "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -182,6 +185,7 @@ struct R { "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -224,7 +228,7 @@ struct R { }, { "bases": [], - "display_name": "clanguml::t00052::C", + "display_name": "C", "id": "687756639884832524", "is_abstract": false, "is_nested": false, @@ -240,6 +244,7 @@ struct R { "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -278,7 +283,7 @@ struct R { }, { "bases": [], - "display_name": "clanguml::t00052::B", + "display_name": "B", "id": "1043027222809675776", "is_abstract": false, "is_nested": false, @@ -307,7 +312,7 @@ struct R { }, { "bases": [], - "display_name": "clanguml::t00052::C", + "display_name": "C", "id": "492968837554438176", "is_abstract": false, "is_nested": false, @@ -336,7 +341,7 @@ struct R { }, { "bases": [], - "display_name": "clanguml::t00052::R", + "display_name": "R", "id": "1157978668683299226", "is_abstract": false, "is_nested": false, @@ -395,6 +400,7 @@ struct R { } ], "name": "t00052_class", + "package_type": "namespace", "relationships": [ { "access": "public", diff --git a/docs/test_cases/t00052_class.svg b/docs/test_cases/t00052_class.svg index b830e31e..566225d4 100644 --- a/docs/test_cases/t00052_class.svg +++ b/docs/test_cases/t00052_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + A @@ -21,8 +21,8 @@ aa<F,Q>(F && f, Q q) : void - - + + B @@ -30,18 +30,18 @@ T - + - + b(T t) : T bb<F>(F && f, T t) : T - - + + C @@ -52,8 +52,8 @@ c<P>(P p) : T - - + + B @@ -62,8 +62,8 @@ - - + + C @@ -72,33 +72,33 @@ - - + + R - + - + a : A - + - + b : B<int> - + - + c : C<int> diff --git a/docs/test_cases/t00052_class_mermaid.svg b/docs/test_cases/t00052_class_mermaid.svg index e8dbe054..3e3cb624 100644 --- a/docs/test_cases/t00052_class_mermaid.svg +++ b/docs/test_cases/t00052_class_mermaid.svg @@ -114,7 +114,7 @@ - + @@ -143,7 +143,7 @@ - + @@ -172,7 +172,7 @@ - + @@ -196,7 +196,7 @@ - + @@ -215,7 +215,7 @@ - + @@ -234,7 +234,7 @@ - + diff --git a/docs/test_cases/t00053.md b/docs/test_cases/t00053.md index d9b65f96..60c9735b 100644 --- a/docs/test_cases/t00053.md +++ b/docs/test_cases/t00053.md @@ -20,7 +20,7 @@ diagrams: ``` ## Source code -File t00053.cc +File `tests/t00053/t00053.cc` ```cpp namespace clanguml { namespace t00053 { @@ -58,7 +58,7 @@ enum class j { jjj }; "elements": [ { "bases": [], - "display_name": "clanguml::t00053::a", + "display_name": "a", "id": "347629837292519144", "is_abstract": false, "is_nested": false, @@ -80,7 +80,7 @@ enum class j { jjj }; }, { "bases": [], - "display_name": "clanguml::t00053::b", + "display_name": "b", "id": "1376344645244260547", "is_abstract": false, "is_nested": false, @@ -102,7 +102,7 @@ enum class j { jjj }; }, { "bases": [], - "display_name": "clanguml::t00053::c", + "display_name": "c", "id": "504463801094568803", "is_abstract": false, "is_nested": false, @@ -124,7 +124,7 @@ enum class j { jjj }; }, { "bases": [], - "display_name": "clanguml::t00053::d", + "display_name": "d", "id": "1264455164862224089", "is_abstract": false, "is_nested": false, @@ -146,7 +146,7 @@ enum class j { jjj }; }, { "bases": [], - "display_name": "clanguml::t00053::e", + "display_name": "e", "id": "907921963776939609", "is_abstract": false, "is_nested": false, @@ -168,7 +168,7 @@ enum class j { jjj }; }, { "bases": [], - "display_name": "clanguml::t00053::f", + "display_name": "f", "id": "1421289128664274084", "is_abstract": false, "is_nested": false, @@ -190,7 +190,7 @@ enum class j { jjj }; }, { "bases": [], - "display_name": "clanguml::t00053::g", + "display_name": "g", "id": "200227126708762001", "is_abstract": false, "is_nested": false, @@ -212,7 +212,7 @@ enum class j { jjj }; }, { "bases": [], - "display_name": "clanguml::t00053::A", + "display_name": "A", "id": "322642841130459425", "is_abstract": false, "is_nested": false, @@ -234,7 +234,7 @@ enum class j { jjj }; }, { "bases": [], - "display_name": "clanguml::t00053::B", + "display_name": "B", "id": "876623970071162908", "is_abstract": false, "is_nested": false, @@ -256,7 +256,7 @@ enum class j { jjj }; }, { "bases": [], - "display_name": "clanguml::t00053::C", + "display_name": "C", "id": "1248473990784124468", "is_abstract": false, "is_nested": false, @@ -278,7 +278,7 @@ enum class j { jjj }; }, { "bases": [], - "display_name": "clanguml::t00053::D", + "display_name": "D", "id": "470228045297785394", "is_abstract": false, "is_nested": false, @@ -300,7 +300,7 @@ enum class j { jjj }; }, { "bases": [], - "display_name": "clanguml::t00053::E", + "display_name": "E", "id": "1038384764221361257", "is_abstract": false, "is_nested": false, @@ -322,7 +322,7 @@ enum class j { jjj }; }, { "bases": [], - "display_name": "clanguml::t00053::F", + "display_name": "F", "id": "530253748811039667", "is_abstract": false, "is_nested": false, @@ -344,7 +344,7 @@ enum class j { jjj }; }, { "bases": [], - "display_name": "clanguml::t00053::G", + "display_name": "G", "id": "1031614323468823578", "is_abstract": false, "is_nested": false, @@ -368,7 +368,7 @@ enum class j { jjj }; "constants": [ "hhh" ], - "display_name": "clanguml::t00053::h", + "display_name": "h", "id": "190978367074032185", "is_nested": false, "name": "h", @@ -385,7 +385,7 @@ enum class j { jjj }; "constants": [ "iii" ], - "display_name": "clanguml::t00053::i", + "display_name": "i", "id": "1473214620883985930", "is_nested": false, "name": "i", @@ -402,7 +402,7 @@ enum class j { jjj }; "constants": [ "jjj" ], - "display_name": "clanguml::t00053::j", + "display_name": "j", "id": "965083605473661435", "is_nested": false, "name": "j", @@ -417,6 +417,7 @@ enum class j { jjj }; } ], "name": "t00053_class", + "package_type": "namespace", "relationships": [], "using_namespace": "clanguml::t00053" } diff --git a/docs/test_cases/t00053_class.svg b/docs/test_cases/t00053_class.svg index a9b9434d..78016ebc 100644 --- a/docs/test_cases/t00053_class.svg +++ b/docs/test_cases/t00053_class.svg @@ -1,6 +1,6 @@ - + @@ -9,72 +9,72 @@ - - + + A - - + + C - - + + E - - + + F - - + + a - - + + c - - + + e - - + + f - - + + h @@ -82,8 +82,8 @@ hhh - - + + j @@ -91,56 +91,56 @@ jjj - - + + b - - + + d - - + + g - - + + B - - + + D - - + + G - - + + i diff --git a/docs/test_cases/t00053_class_mermaid.svg b/docs/test_cases/t00053_class_mermaid.svg index 502ce400..579e02d2 100644 --- a/docs/test_cases/t00053_class_mermaid.svg +++ b/docs/test_cases/t00053_class_mermaid.svg @@ -52,7 +52,7 @@ - + @@ -71,7 +71,7 @@ - + @@ -90,7 +90,7 @@ - + @@ -109,7 +109,7 @@ - + @@ -128,7 +128,7 @@ - + @@ -147,7 +147,7 @@ - + @@ -166,7 +166,7 @@ - + @@ -190,7 +190,7 @@ - + @@ -209,7 +209,7 @@ - + @@ -228,7 +228,7 @@ - + @@ -247,7 +247,7 @@ - + @@ -266,7 +266,7 @@ - + @@ -285,7 +285,7 @@ - + @@ -304,7 +304,7 @@ - + @@ -323,7 +323,7 @@ - + @@ -342,7 +342,7 @@ - + @@ -366,7 +366,7 @@ - + diff --git a/docs/test_cases/t00054.md b/docs/test_cases/t00054.md index 02353751..735a6e90 100644 --- a/docs/test_cases/t00054.md +++ b/docs/test_cases/t00054.md @@ -24,7 +24,7 @@ diagrams: - together: [detail4::i,detail4::j] ``` ## Source code -File t00054.cc +File `tests/t00054/t00054.cc` ```cpp namespace clanguml { namespace t00054 { @@ -72,7 +72,7 @@ enum class j { jjj }; "elements": [ { "bases": [], - "display_name": "clanguml::t00054::a", + "display_name": "a", "id": "1158868779503074564", "is_abstract": false, "is_nested": false, @@ -94,7 +94,7 @@ enum class j { jjj }; }, { "bases": [], - "display_name": "clanguml::t00054::b", + "display_name": "b", "id": "252416999805673718", "is_abstract": false, "is_nested": false, @@ -115,11 +115,11 @@ enum class j { jjj }; "type": "class" }, { - "display_name": "clanguml::t00054::detail", + "display_name": "detail", "elements": [ { "bases": [], - "display_name": "clanguml::t00054::detail::c", + "display_name": "detail::c", "id": "1168031834662719964", "is_abstract": false, "is_nested": false, @@ -141,7 +141,7 @@ enum class j { jjj }; }, { "bases": [], - "display_name": "clanguml::t00054::detail::d", + "display_name": "detail::d", "id": "1569559620782547158", "is_abstract": false, "is_nested": false, @@ -163,7 +163,7 @@ enum class j { jjj }; }, { "bases": [], - "display_name": "clanguml::t00054::detail::e", + "display_name": "detail::e", "id": "2037550833462858827", "is_abstract": false, "is_nested": false, @@ -189,7 +189,7 @@ enum class j { jjj }; }, { "bases": [], - "display_name": "clanguml::t00054::f", + "display_name": "f", "id": "2123626454198320938", "is_abstract": false, "is_nested": false, @@ -211,7 +211,7 @@ enum class j { jjj }; }, { "bases": [], - "display_name": "clanguml::t00054::g", + "display_name": "g", "id": "595494794840378320", "is_abstract": false, "is_nested": false, @@ -233,7 +233,7 @@ enum class j { jjj }; }, { "bases": [], - "display_name": "clanguml::t00054::A", + "display_name": "A", "id": "917656824503504804", "is_abstract": false, "is_nested": false, @@ -255,7 +255,7 @@ enum class j { jjj }; }, { "bases": [], - "display_name": "clanguml::t00054::B", + "display_name": "B", "id": "1235773045370563004", "is_abstract": false, "is_nested": false, @@ -276,11 +276,11 @@ enum class j { jjj }; "type": "class" }, { - "display_name": "clanguml::t00054::detail2", + "display_name": "detail2", "elements": [ { "bases": [], - "display_name": "clanguml::t00054::detail2::C", + "display_name": "detail2::C", "id": "540054955081677892", "is_abstract": false, "is_nested": false, @@ -301,11 +301,11 @@ enum class j { jjj }; "type": "class" }, { - "display_name": "clanguml::t00054::detail2::detail3", + "display_name": "detail3", "elements": [ { "bases": [], - "display_name": "clanguml::t00054::detail2::detail3::D", + "display_name": "detail2::detail3::D", "id": "1266390196945323478", "is_abstract": false, "is_nested": false, @@ -327,7 +327,7 @@ enum class j { jjj }; }, { "bases": [], - "display_name": "clanguml::t00054::detail2::detail3::E", + "display_name": "detail2::detail3::E", "id": "134928214982255105", "is_abstract": false, "is_nested": false, @@ -353,7 +353,7 @@ enum class j { jjj }; }, { "bases": [], - "display_name": "clanguml::t00054::detail2::F", + "display_name": "detail2::F", "id": "446694692150903211", "is_abstract": false, "is_nested": false, @@ -379,7 +379,7 @@ enum class j { jjj }; }, { "bases": [], - "display_name": "clanguml::t00054::G", + "display_name": "G", "id": "1365815261671395853", "is_abstract": false, "is_nested": false, @@ -400,13 +400,13 @@ enum class j { jjj }; "type": "class" }, { - "display_name": "clanguml::t00054::detail4", + "display_name": "detail4", "elements": [ { "constants": [ "hhh" ], - "display_name": "clanguml::t00054::detail4::h", + "display_name": "detail4::h", "id": "1592677999268391183", "is_nested": false, "name": "h", @@ -423,7 +423,7 @@ enum class j { jjj }; "constants": [ "iii" ], - "display_name": "clanguml::t00054::detail4::i", + "display_name": "detail4::i", "id": "441521323390223397", "is_nested": false, "name": "i", @@ -440,7 +440,7 @@ enum class j { jjj }; "constants": [ "jjj" ], - "display_name": "clanguml::t00054::detail4::j", + "display_name": "detail4::j", "id": "499334434426587347", "is_nested": false, "name": "j", @@ -459,6 +459,7 @@ enum class j { jjj }; } ], "name": "t00054_class", + "package_type": "namespace", "relationships": [], "using_namespace": "clanguml::t00054" } diff --git a/docs/test_cases/t00054_class.svg b/docs/test_cases/t00054_class.svg index d6d07155..24bea75a 100644 --- a/docs/test_cases/t00054_class.svg +++ b/docs/test_cases/t00054_class.svg @@ -1,6 +1,6 @@ - + @@ -9,28 +9,28 @@ - + detail - + detail2 - + detail3 - + detail4 - - + + d - - + + a @@ -40,8 +40,8 @@ - - + + c @@ -51,8 +51,8 @@ - - + + e @@ -62,40 +62,40 @@ - - + + C - - + + F - - + + D - - + + E - - + + A @@ -104,8 +104,8 @@ - - + + B @@ -114,8 +114,8 @@ - - + + f @@ -124,8 +124,8 @@ - - + + G @@ -133,8 +133,8 @@ - - + + h @@ -143,8 +143,8 @@ hhh - - + + i @@ -153,8 +153,8 @@ iii - - + + j @@ -163,16 +163,16 @@ jjj - - + + b - - + + g diff --git a/docs/test_cases/t00054_class_mermaid.svg b/docs/test_cases/t00054_class_mermaid.svg index 64dbb670..1cfc22f0 100644 --- a/docs/test_cases/t00054_class_mermaid.svg +++ b/docs/test_cases/t00054_class_mermaid.svg @@ -52,7 +52,7 @@ - + @@ -71,7 +71,7 @@ - + @@ -90,7 +90,7 @@ - + @@ -109,7 +109,7 @@ - + @@ -128,7 +128,7 @@ - + @@ -147,7 +147,7 @@ - + @@ -166,7 +166,7 @@ - + @@ -185,7 +185,7 @@ - + @@ -204,7 +204,7 @@ - + @@ -223,7 +223,7 @@ - + @@ -242,7 +242,7 @@ - + @@ -261,7 +261,7 @@ - + @@ -280,7 +280,7 @@ - + @@ -304,7 +304,7 @@ - + @@ -328,7 +328,7 @@ - + @@ -352,7 +352,7 @@ - + @@ -371,7 +371,7 @@ - + diff --git a/docs/test_cases/t00055.md b/docs/test_cases/t00055.md index d6889792..057a08ff 100644 --- a/docs/test_cases/t00055.md +++ b/docs/test_cases/t00055.md @@ -17,7 +17,7 @@ diagrams: - column: [D, F, H, J] ``` ## Source code -File t00055.cc +File `tests/t00055/t00055.cc` ```cpp namespace clanguml { namespace t00055 { @@ -45,7 +45,7 @@ struct J { }; "elements": [ { "bases": [], - "display_name": "clanguml::t00055::A", + "display_name": "A", "id": "1697191682863715554", "is_abstract": false, "is_nested": false, @@ -67,7 +67,7 @@ struct J { }; }, { "bases": [], - "display_name": "clanguml::t00055::B", + "display_name": "B", "id": "188599859894721517", "is_abstract": false, "is_nested": false, @@ -89,7 +89,7 @@ struct J { }; }, { "bases": [], - "display_name": "clanguml::t00055::C", + "display_name": "C", "id": "625177137967392996", "is_abstract": false, "is_nested": false, @@ -111,7 +111,7 @@ struct J { }; }, { "bases": [], - "display_name": "clanguml::t00055::D", + "display_name": "D", "id": "1046415640323289221", "is_abstract": false, "is_nested": false, @@ -133,7 +133,7 @@ struct J { }; }, { "bases": [], - "display_name": "clanguml::t00055::E", + "display_name": "E", "id": "702117239243796422", "is_abstract": false, "is_nested": false, @@ -155,7 +155,7 @@ struct J { }; }, { "bases": [], - "display_name": "clanguml::t00055::F", + "display_name": "F", "id": "1511375015718046137", "is_abstract": false, "is_nested": false, @@ -177,7 +177,7 @@ struct J { }; }, { "bases": [], - "display_name": "clanguml::t00055::G", + "display_name": "G", "id": "651600874645139639", "is_abstract": false, "is_nested": false, @@ -199,7 +199,7 @@ struct J { }; }, { "bases": [], - "display_name": "clanguml::t00055::H", + "display_name": "H", "id": "374142601071476038", "is_abstract": false, "is_nested": false, @@ -221,7 +221,7 @@ struct J { }; }, { "bases": [], - "display_name": "clanguml::t00055::I", + "display_name": "I", "id": "295372236079742697", "is_abstract": false, "is_nested": false, @@ -243,7 +243,7 @@ struct J { }; }, { "bases": [], - "display_name": "clanguml::t00055::J", + "display_name": "J", "id": "769231292718551090", "is_abstract": false, "is_nested": false, @@ -265,6 +265,7 @@ struct J { }; } ], "name": "t00055_class", + "package_type": "namespace", "relationships": [], "using_namespace": "clanguml::t00055" } diff --git a/docs/test_cases/t00055_class.svg b/docs/test_cases/t00055_class.svg index fd032d8b..c733fb17 100644 --- a/docs/test_cases/t00055_class.svg +++ b/docs/test_cases/t00055_class.svg @@ -1,6 +1,6 @@ - + @@ -9,80 +9,80 @@ - - + + A - - + + B - - + + C - - + + D - - + + E - - + + F - - + + G - - + + H - - + + I - - + + J diff --git a/docs/test_cases/t00055_class_mermaid.svg b/docs/test_cases/t00055_class_mermaid.svg index 6e63c0cc..ac2b128c 100644 --- a/docs/test_cases/t00055_class_mermaid.svg +++ b/docs/test_cases/t00055_class_mermaid.svg @@ -52,7 +52,7 @@ - + @@ -71,7 +71,7 @@ - + @@ -90,7 +90,7 @@ - + @@ -109,7 +109,7 @@ - + @@ -128,7 +128,7 @@ - + @@ -147,7 +147,7 @@ - + @@ -166,7 +166,7 @@ - + @@ -185,7 +185,7 @@ - + @@ -204,7 +204,7 @@ - + @@ -223,7 +223,7 @@ - + diff --git a/docs/test_cases/t00056.md b/docs/test_cases/t00056.md index 9c5f8104..8a1addbf 100644 --- a/docs/test_cases/t00056.md +++ b/docs/test_cases/t00056.md @@ -12,7 +12,7 @@ diagrams: using_namespace: clanguml::t00056 ``` ## Source code -File t00056.cc +File `tests/t00056/t00056.cc` ```cpp #include #include @@ -119,7 +119,7 @@ struct F { "diagram_type": "class", "elements": [ { - "display_name": "clanguml::t00056::greater_than_simple", + "display_name": "greater_than_simple", "id": "902541696362244204", "name": "greater_than_simple", "namespace": "clanguml::t00056", @@ -134,7 +134,7 @@ struct F { "type": "concept" }, { - "display_name": "clanguml::t00056::greater_than_with_requires", + "display_name": "greater_than_with_requires", "id": "1830716585637735576", "name": "greater_than_with_requires", "namespace": "clanguml::t00056", @@ -160,7 +160,7 @@ struct F { "type": "concept" }, { - "display_name": "clanguml::t00056::max_four_bytes", + "display_name": "max_four_bytes", "id": "385255522691733325", "name": "max_four_bytes", "namespace": "clanguml::t00056", @@ -175,7 +175,7 @@ struct F { "type": "concept" }, { - "display_name": "clanguml::t00056::iterable", + "display_name": "iterable", "id": "392540961352249242", "name": "iterable", "namespace": "clanguml::t00056", @@ -198,7 +198,7 @@ struct F { "type": "concept" }, { - "display_name": "clanguml::t00056::has_value_type", + "display_name": "has_value_type", "id": "1850394311226276678", "name": "has_value_type", "namespace": "clanguml::t00056", @@ -215,7 +215,7 @@ struct F { "type": "concept" }, { - "display_name": "clanguml::t00056::convertible_to_string", + "display_name": "convertible_to_string", "id": "137304962071054497", "name": "convertible_to_string", "namespace": "clanguml::t00056", @@ -239,7 +239,7 @@ struct F { "type": "concept" }, { - "display_name": "clanguml::t00056::iterable_with_value_type", + "display_name": "iterable_with_value_type", "id": "1043398062146751019", "name": "iterable_with_value_type", "namespace": "clanguml::t00056", @@ -254,7 +254,7 @@ struct F { "type": "concept" }, { - "display_name": "clanguml::t00056::iterable_or_small_value_type", + "display_name": "iterable_or_small_value_type", "id": "866345615551223718", "name": "iterable_or_small_value_type", "namespace": "clanguml::t00056", @@ -270,7 +270,7 @@ struct F { }, { "bases": [], - "display_name": "clanguml::t00056::A", + "display_name": "A", "id": "1418333499545421661", "is_abstract": false, "is_nested": false, @@ -312,7 +312,7 @@ struct F { }, { "bases": [], - "display_name": "clanguml::t00056::B", + "display_name": "B", "id": "1814355496814977880", "is_abstract": false, "is_nested": false, @@ -354,7 +354,7 @@ struct F { }, { "bases": [], - "display_name": "clanguml::t00056::C", + "display_name": "C", "id": "1512618198241549089", "is_abstract": false, "is_nested": false, @@ -396,7 +396,7 @@ struct F { }, { "bases": [], - "display_name": "clanguml::t00056::D", + "display_name": "D", "id": "1635109601630198093", "is_abstract": false, "is_nested": false, @@ -449,7 +449,7 @@ struct F { }, { "bases": [], - "display_name": "clanguml::t00056::E", + "display_name": "E", "id": "1429225801945621089", "is_abstract": false, "is_nested": false, @@ -527,7 +527,7 @@ struct F { }, { "bases": [], - "display_name": "clanguml::t00056::F", + "display_name": "F", "id": "856301122972546034", "is_abstract": false, "is_nested": false, @@ -605,6 +605,7 @@ struct F { } ], "name": "t00056_class", + "package_type": "namespace", "relationships": [ { "destination": "385255522691733325", diff --git a/docs/test_cases/t00056_class.svg b/docs/test_cases/t00056_class.svg index 206c7d55..02e702a6 100644 --- a/docs/test_cases/t00056_class.svg +++ b/docs/test_cases/t00056_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + «concept» @@ -20,8 +20,8 @@ - - + + «concept» @@ -33,8 +33,8 @@ sizeof (l) > sizeof (r) - - + + «concept» @@ -44,8 +44,8 @@ - - + + «concept» @@ -58,8 +58,8 @@ container.begin() container.end() - - + + «concept» @@ -71,8 +71,8 @@ typename T::value_type - - + + «concept» @@ -86,8 +86,8 @@ {std::to_string(s)} noexcept {std::to_string(s)} -> std::same_as<std::string> - - + + «concept» @@ -97,8 +97,8 @@ - - + + «concept» @@ -108,8 +108,8 @@ - - + + A @@ -118,15 +118,15 @@ - + - + a : T - - + + B @@ -135,15 +135,15 @@ - + - + b : T - - + + C @@ -152,15 +152,15 @@ - + - + c : T - - + + D @@ -169,8 +169,8 @@ - - + + E @@ -179,29 +179,29 @@ - + - + e1 : T1 - + - + e2 : T2 - + - + e3 : T3 - - + + F @@ -210,25 +210,25 @@ - + - + f1 : T1 - + - + f2 : T2 - + - + f3 : T3 diff --git a/docs/test_cases/t00056_class_mermaid.svg b/docs/test_cases/t00056_class_mermaid.svg index 7e213452..a57e180e 100644 --- a/docs/test_cases/t00056_class_mermaid.svg +++ b/docs/test_cases/t00056_class_mermaid.svg @@ -222,7 +222,7 @@ - + @@ -241,7 +241,7 @@ - + @@ -270,7 +270,7 @@ - + @@ -289,7 +289,7 @@ - + @@ -323,7 +323,7 @@ - + @@ -352,7 +352,7 @@ - + @@ -391,7 +391,7 @@ - + @@ -410,7 +410,7 @@ - + @@ -429,7 +429,7 @@ - + @@ -453,7 +453,7 @@ - + @@ -477,7 +477,7 @@ - + @@ -501,7 +501,7 @@ - + @@ -520,7 +520,7 @@ - + @@ -554,7 +554,7 @@ - + diff --git a/docs/test_cases/t00057.md b/docs/test_cases/t00057.md index 6dfe08c0..61cdd8c9 100644 --- a/docs/test_cases/t00057.md +++ b/docs/test_cases/t00057.md @@ -9,7 +9,7 @@ diagrams: - src/t00057_impl.c ``` ## Source code -File t00057.c +File `tests/t00057/t00057.c` ```cpp #include "include/t00057.h" @@ -56,6 +56,20 @@ struct t00057_R { struct t00057_G *g; }; +``` +File `tests/t00057/src/t00057_impl.c` +```cpp +#include "../include/t00057.h" + +struct t00057_F { + int f1; +}; +``` +File `tests/t00057/include/t00057.h` +```cpp +#pragma once + +struct t00057_F; ``` ## Generated PlantUML diagrams ![t00057_class](./t00057_class.svg "Test case C99/C11 translation units with structs and unions") @@ -550,6 +564,7 @@ struct t00057_R { } ], "name": "t00057_class", + "package_type": "namespace", "relationships": [ { "access": "public", diff --git a/docs/test_cases/t00057_class.svg b/docs/test_cases/t00057_class.svg index 071a6541..5f2e931d 100644 --- a/docs/test_cases/t00057_class.svg +++ b/docs/test_cases/t00057_class.svg @@ -1,6 +1,6 @@ - + @@ -9,53 +9,53 @@ - - + + t00057_A - + - + a1 : int - - + + t00057_B - + - + b1 : int - - + + t00057_C - + - + c1 : int - - + + «union» @@ -63,73 +63,73 @@ - + - + d1 : int - + - + d2 : float - - + + t00057_E - + - + coordinates : t00057_E::(anonymous_739) - + - + e : int - + - + height : t00057_E::(anonymous_807) - - + + t00057_E::(coordinates) - + - + x : int - + - + y : int - - + + «union» @@ -137,105 +137,105 @@ - + - + t : double - + - + z : int - - + + t00057_G - + - + g1 : int - - + + t00057_R - + - + a : struct t00057_A - + - + b : t00057_B - + - + c : struct t00057_C * - + - + d : union t00057_D - + - + e : struct t00057_E * - + - + f : struct t00057_F * - + - + g : struct t00057_G * - - + + t00057_F - + - + f1 : int diff --git a/docs/test_cases/t00057_class_mermaid.svg b/docs/test_cases/t00057_class_mermaid.svg index de8a84d2..172bbbdf 100644 --- a/docs/test_cases/t00057_class_mermaid.svg +++ b/docs/test_cases/t00057_class_mermaid.svg @@ -162,7 +162,7 @@ - + @@ -186,7 +186,7 @@ - + @@ -210,7 +210,7 @@ - + @@ -234,7 +234,7 @@ - + @@ -263,7 +263,7 @@ - + @@ -297,7 +297,7 @@ - + @@ -326,7 +326,7 @@ - + @@ -355,7 +355,7 @@ - + @@ -379,7 +379,7 @@ - + @@ -433,7 +433,7 @@ - + diff --git a/docs/test_cases/t00058.md b/docs/test_cases/t00058.md index a7e0966a..9b12c112 100644 --- a/docs/test_cases/t00058.md +++ b/docs/test_cases/t00058.md @@ -15,7 +15,7 @@ diagrams: - '{{ alias("same_as_first_type") }} ..> {{ alias("first_type") }}' ``` ## Source code -File t00058.cc +File `tests/t00058/t00058.cc` ```cpp #include #include @@ -73,7 +73,7 @@ struct R { "elements": [ { "bases": [], - "display_name": "clanguml::t00058::first_type", + "display_name": "first_type", "id": "39461943261269692", "is_abstract": false, "is_nested": false, @@ -107,7 +107,7 @@ struct R { "type": "class" }, { - "display_name": "clanguml::t00058::same_as_first_type", + "display_name": "same_as_first_type", "id": "1725820236573641307", "name": "same_as_first_type", "namespace": "clanguml::t00058", @@ -123,7 +123,7 @@ struct R { }, { "bases": [], - "display_name": "clanguml::t00058::A", + "display_name": "A", "id": "798619347004821702", "is_abstract": false, "is_nested": false, @@ -171,7 +171,7 @@ struct R { }, { "bases": [], - "display_name": "clanguml::t00058::B", + "display_name": "B", "id": "420594889696591405", "is_abstract": false, "is_nested": false, @@ -237,7 +237,7 @@ struct R { }, { "bases": [], - "display_name": "clanguml::t00058::A", + "display_name": "A", "id": "1724002183455178980", "is_abstract": false, "is_nested": false, @@ -284,7 +284,7 @@ struct R { }, { "bases": [], - "display_name": "clanguml::t00058::A", + "display_name": "A", "id": "1372381231906520278", "is_abstract": false, "is_nested": false, @@ -319,7 +319,7 @@ struct R { }, { "bases": [], - "display_name": "clanguml::t00058::B>", + "display_name": "B>", "id": "290383080560130133", "is_abstract": false, "is_nested": false, @@ -385,7 +385,7 @@ struct R { }, { "bases": [], - "display_name": "clanguml::t00058::R", + "display_name": "R", "id": "1015108159699260009", "is_abstract": false, "is_nested": false, @@ -432,6 +432,7 @@ struct R { } ], "name": "t00058_class", + "package_type": "namespace", "relationships": [ { "destination": "1725820236573641307", diff --git a/docs/test_cases/t00058_class.svg b/docs/test_cases/t00058_class.svg index 16214db5..ea71cecc 100644 --- a/docs/test_cases/t00058_class.svg +++ b/docs/test_cases/t00058_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + first_type @@ -19,8 +19,8 @@ - - + + «concept» @@ -30,8 +30,8 @@ - - + + A @@ -40,15 +40,15 @@ - + - + a : std::vector<T> - - + + B @@ -57,22 +57,22 @@ - + - + b : std::vector<T> - + - + bb : P - - + + A @@ -81,8 +81,8 @@ - - + + A @@ -91,8 +91,8 @@ - - + + B @@ -101,26 +101,26 @@ - - + + R - + - + aa : A<int,int,double,std::string> - + - + bb : B<int,std::string,int,double,A<int,int>> diff --git a/docs/test_cases/t00058_class_mermaid.svg b/docs/test_cases/t00058_class_mermaid.svg index 5ad57e5a..7a3b177d 100644 --- a/docs/test_cases/t00058_class_mermaid.svg +++ b/docs/test_cases/t00058_class_mermaid.svg @@ -150,7 +150,7 @@ - + @@ -169,7 +169,7 @@ - + @@ -188,7 +188,7 @@ - + @@ -212,7 +212,7 @@ - + @@ -241,7 +241,7 @@ - + @@ -260,7 +260,7 @@ - + @@ -279,7 +279,7 @@ - + @@ -298,7 +298,7 @@ - + diff --git a/docs/test_cases/t00059.md b/docs/test_cases/t00059.md index 1686ab54..4170426e 100644 --- a/docs/test_cases/t00059.md +++ b/docs/test_cases/t00059.md @@ -12,7 +12,7 @@ diagrams: using_namespace: clanguml::t00059 ``` ## Source code -File t00059.cc +File `tests/t00059/t00059.cc` ```cpp #include @@ -81,7 +81,7 @@ struct R { "diagram_type": "class", "elements": [ { - "display_name": "clanguml::t00059::fruit_c", + "display_name": "fruit_c", "id": "1926201868069460340", "name": "fruit_c", "namespace": "clanguml::t00059", @@ -104,7 +104,7 @@ struct R { "type": "concept" }, { - "display_name": "clanguml::t00059::apple_c", + "display_name": "apple_c", "id": "1932582371736186409", "name": "apple_c", "namespace": "clanguml::t00059", @@ -126,7 +126,7 @@ struct R { "type": "concept" }, { - "display_name": "clanguml::t00059::orange_c", + "display_name": "orange_c", "id": "1483904441065806133", "name": "orange_c", "namespace": "clanguml::t00059", @@ -149,7 +149,7 @@ struct R { }, { "bases": [], - "display_name": "clanguml::t00059::gala_apple", + "display_name": "gala_apple", "id": "399997161214328320", "is_abstract": false, "is_nested": false, @@ -165,6 +165,7 @@ struct R { "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -190,6 +191,7 @@ struct R { "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -222,7 +224,7 @@ struct R { }, { "bases": [], - "display_name": "clanguml::t00059::empire_apple", + "display_name": "empire_apple", "id": "660406972347773654", "is_abstract": false, "is_nested": false, @@ -238,6 +240,7 @@ struct R { "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -263,6 +266,7 @@ struct R { "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -295,7 +299,7 @@ struct R { }, { "bases": [], - "display_name": "clanguml::t00059::lima_orange", + "display_name": "lima_orange", "id": "1649295452510454080", "is_abstract": false, "is_nested": false, @@ -311,6 +315,7 @@ struct R { "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -336,6 +341,7 @@ struct R { "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -368,7 +374,7 @@ struct R { }, { "bases": [], - "display_name": "clanguml::t00059::valencia_orange", + "display_name": "valencia_orange", "id": "802727760415733923", "is_abstract": false, "is_nested": false, @@ -384,6 +390,7 @@ struct R { "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -409,6 +416,7 @@ struct R { "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -441,7 +449,7 @@ struct R { }, { "bases": [], - "display_name": "clanguml::t00059::fruit_factory", + "display_name": "fruit_factory", "id": "2301786483822933456", "is_abstract": false, "is_nested": false, @@ -457,6 +465,7 @@ struct R { "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -482,6 +491,7 @@ struct R { "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -527,7 +537,7 @@ struct R { }, { "bases": [], - "display_name": "clanguml::t00059::fruit_factory", + "display_name": "fruit_factory", "id": "551278102444647278", "is_abstract": false, "is_nested": false, @@ -562,7 +572,7 @@ struct R { }, { "bases": [], - "display_name": "clanguml::t00059::fruit_factory", + "display_name": "fruit_factory", "id": "536390279563541226", "is_abstract": false, "is_nested": false, @@ -597,7 +607,7 @@ struct R { }, { "bases": [], - "display_name": "clanguml::t00059::R", + "display_name": "R", "id": "1128300671453354325", "is_abstract": false, "is_nested": false, @@ -644,6 +654,7 @@ struct R { } ], "name": "t00059_class", + "package_type": "namespace", "relationships": [ { "destination": "1926201868069460340", diff --git a/docs/test_cases/t00059_class.svg b/docs/test_cases/t00059_class.svg index a9b69bb0..4639b2a1 100644 --- a/docs/test_cases/t00059_class.svg +++ b/docs/test_cases/t00059_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + «concept» @@ -23,8 +23,8 @@ T{} t.get_name() - - + + «concept» @@ -36,8 +36,8 @@ t.get_sweetness() - - + + «concept» @@ -49,96 +49,96 @@ t.get_bitterness() - - + + gala_apple - + - + get_name() const : std::string - + - + get_sweetness() const : float - - + + empire_apple - + - + get_name() const : std::string - + - + get_sweetness() const : float - - + + lima_orange - + - + get_bitterness() const : float - + - + get_name() const : std::string - - + + valencia_orange - + - + get_bitterness() const : float - + - + get_name() const : std::string - - + + fruit_factory @@ -146,23 +146,23 @@ apple_c TA,orange_c TO - + - + create_apple() const : TA - + - + create_orange() const : TO - - + + fruit_factory @@ -171,8 +171,8 @@ - - + + fruit_factory @@ -181,26 +181,26 @@ - - + + R - + - + factory_1 : fruit_factory_1 - + - + factory_2 : fruit_factory_2 diff --git a/docs/test_cases/t00059_class_mermaid.svg b/docs/test_cases/t00059_class_mermaid.svg index 0025a45d..e5177b2e 100644 --- a/docs/test_cases/t00059_class_mermaid.svg +++ b/docs/test_cases/t00059_class_mermaid.svg @@ -198,7 +198,7 @@ - + @@ -232,7 +232,7 @@ - + @@ -261,7 +261,7 @@ - + @@ -290,7 +290,7 @@ - + @@ -319,7 +319,7 @@ - + @@ -348,7 +348,7 @@ - + @@ -377,7 +377,7 @@ - + @@ -406,7 +406,7 @@ - + @@ -435,7 +435,7 @@ - + @@ -454,7 +454,7 @@ - + @@ -473,7 +473,7 @@ - + diff --git a/docs/test_cases/t00060.md b/docs/test_cases/t00060.md index d27d0768..bf33de7d 100644 --- a/docs/test_cases/t00060.md +++ b/docs/test_cases/t00060.md @@ -15,7 +15,7 @@ diagrams: using_namespace: clanguml::t00060 ``` ## Source code -File t00060.cc +File `tests/t00060/t00060.cc` ```cpp namespace clanguml { namespace t00060 { @@ -49,7 +49,7 @@ template struct H : public G { "elements": [ { "bases": [], - "display_name": "clanguml::t00060::A", + "display_name": "A", "id": "1373615549846303472", "is_abstract": false, "is_nested": false, @@ -78,7 +78,7 @@ template struct H : public G { "name": "clanguml::t00060::A" } ], - "display_name": "clanguml::t00060::B", + "display_name": "B", "id": "479650368930934571", "is_abstract": false, "is_nested": false, @@ -107,7 +107,7 @@ template struct H : public G { "name": "clanguml::t00060::A" } ], - "display_name": "clanguml::t00060::C", + "display_name": "C", "id": "1827660844127264787", "is_abstract": false, "is_nested": false, @@ -142,7 +142,7 @@ template struct H : public G { "name": "clanguml::t00060::C" } ], - "display_name": "clanguml::t00060::D", + "display_name": "D", "id": "1629687372290281981", "is_abstract": false, "is_nested": false, @@ -164,7 +164,7 @@ template struct H : public G { }, { "bases": [], - "display_name": "clanguml::t00060::G", + "display_name": "G", "id": "1877304825033069517", "is_abstract": false, "is_nested": false, @@ -213,7 +213,7 @@ template struct H : public G { "name": "G" } ], - "display_name": "clanguml::t00060::H", + "display_name": "H", "id": "1881610349123495638", "is_abstract": false, "is_nested": false, @@ -273,6 +273,7 @@ template struct H : public G { } ], "name": "t00060_class", + "package_type": "namespace", "relationships": [ { "access": "public", diff --git a/docs/test_cases/t00060_class.svg b/docs/test_cases/t00060_class.svg index f19e215f..10504ff8 100644 --- a/docs/test_cases/t00060_class.svg +++ b/docs/test_cases/t00060_class.svg @@ -1,6 +1,6 @@ - + @@ -9,40 +9,40 @@ - - + + A - - + + B - - + + C - - + + D - - + + G @@ -51,15 +51,15 @@ - + - + g : T - - + + H @@ -68,18 +68,18 @@ - + - + h : G<T> - + - + hh : P diff --git a/docs/test_cases/t00060_class_mermaid.svg b/docs/test_cases/t00060_class_mermaid.svg index 48e49b72..f661620e 100644 --- a/docs/test_cases/t00060_class_mermaid.svg +++ b/docs/test_cases/t00060_class_mermaid.svg @@ -116,7 +116,7 @@ - + @@ -135,7 +135,7 @@ - + @@ -154,7 +154,7 @@ - + @@ -173,7 +173,7 @@ - + @@ -192,7 +192,7 @@ - + @@ -216,7 +216,7 @@ - + diff --git a/docs/test_cases/t00061.md b/docs/test_cases/t00061.md index a643b640..98a321e0 100644 --- a/docs/test_cases/t00061.md +++ b/docs/test_cases/t00061.md @@ -14,7 +14,7 @@ diagrams: using_namespace: clanguml::t00061 ``` ## Source code -File t00061.cc +File `tests/t00061/t00061.cc` ```cpp #include "include/t00061_a.h" #include "include/t00061_b.h" @@ -28,6 +28,22 @@ struct C { } } ``` +File `tests/t00061/include/t00061_a.h` +```cpp +namespace clanguml { +namespace t00061 { +struct A { }; +} +} +``` +File `tests/t00061/include/t00061_b.h` +```cpp +namespace clanguml { +namespace t00061 { +struct B { }; +} +} +``` ## Generated PlantUML diagrams ![t00061_class](./t00061_class.svg "Paths diagram filter test case") ## Generated Mermaid diagrams @@ -39,7 +55,7 @@ struct C { "elements": [ { "bases": [], - "display_name": "clanguml::t00061::A", + "display_name": "A", "id": "1010204727957329423", "is_abstract": false, "is_nested": false, @@ -61,6 +77,7 @@ struct C { } ], "name": "t00061_class", + "package_type": "namespace", "relationships": [], "using_namespace": "clanguml::t00061" } diff --git a/docs/test_cases/t00061_class.svg b/docs/test_cases/t00061_class.svg index c5a15856..92c304ae 100644 --- a/docs/test_cases/t00061_class.svg +++ b/docs/test_cases/t00061_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + A diff --git a/docs/test_cases/t00061_class_mermaid.svg b/docs/test_cases/t00061_class_mermaid.svg index 04eaa65c..dbc46f7e 100644 --- a/docs/test_cases/t00061_class_mermaid.svg +++ b/docs/test_cases/t00061_class_mermaid.svg @@ -52,7 +52,7 @@ - + diff --git a/docs/test_cases/t00062.md b/docs/test_cases/t00062.md index 439ecaf9..b2d50631 100644 --- a/docs/test_cases/t00062.md +++ b/docs/test_cases/t00062.md @@ -15,7 +15,7 @@ diagrams: - left to right direction ``` ## Source code -File t00062.cc +File `tests/t00062/t00062.cc` ```cpp #include #include @@ -130,7 +130,7 @@ struct A> { "elements": [ { "bases": [], - "display_name": "clanguml::t00062::A", + "display_name": "A", "id": "1046827200300090710", "is_abstract": false, "is_nested": false, @@ -172,7 +172,7 @@ struct A> { }, { "bases": [], - "display_name": "clanguml::t00062::A &>", + "display_name": "A &>", "id": "1099548178945911245", "is_abstract": false, "is_nested": false, @@ -227,7 +227,7 @@ struct A> { }, { "bases": [], - "display_name": "clanguml::t00062::A> &>", + "display_name": "A> &>", "id": "1239388209995793547", "is_abstract": false, "is_nested": false, @@ -282,7 +282,7 @@ struct A> { }, { "bases": [], - "display_name": "clanguml::t00062::A", + "display_name": "A", "id": "45701897814162098", "is_abstract": false, "is_nested": false, @@ -324,7 +324,7 @@ struct A> { }, { "bases": [], - "display_name": "clanguml::t00062::A", + "display_name": "A", "id": "1379193770802992785", "is_abstract": false, "is_nested": false, @@ -366,7 +366,7 @@ struct A> { }, { "bases": [], - "display_name": "clanguml::t00062::A", + "display_name": "A", "id": "1407865337446777280", "is_abstract": false, "is_nested": false, @@ -408,7 +408,7 @@ struct A> { }, { "bases": [], - "display_name": "clanguml::t00062::A", + "display_name": "A", "id": "1034483227649400416", "is_abstract": false, "is_nested": false, @@ -450,7 +450,7 @@ struct A> { }, { "bases": [], - "display_name": "clanguml::t00062::A", + "display_name": "A", "id": "352457857519671117", "is_abstract": false, "is_nested": false, @@ -492,7 +492,7 @@ struct A> { }, { "bases": [], - "display_name": "clanguml::t00062::A", + "display_name": "A", "id": "314708288320430272", "is_abstract": false, "is_nested": false, @@ -558,7 +558,7 @@ struct A> { }, { "bases": [], - "display_name": "clanguml::t00062::A", + "display_name": "A", "id": "827753335392390402", "is_abstract": false, "is_nested": false, @@ -624,7 +624,7 @@ struct A> { }, { "bases": [], - "display_name": "clanguml::t00062::A", + "display_name": "A", "id": "395583480407686249", "is_abstract": false, "is_nested": false, @@ -696,7 +696,7 @@ struct A> { }, { "bases": [], - "display_name": "clanguml::t00062::A", + "display_name": "A", "id": "476497055497873078", "is_abstract": false, "is_nested": false, @@ -756,7 +756,7 @@ struct A> { }, { "bases": [], - "display_name": "clanguml::t00062::A", + "display_name": "A", "id": "1619634759668095904", "is_abstract": false, "is_nested": false, @@ -828,7 +828,7 @@ struct A> { }, { "bases": [], - "display_name": "clanguml::t00062::A", + "display_name": "A", "id": "1357746808315142717", "is_abstract": false, "is_nested": false, @@ -900,7 +900,7 @@ struct A> { }, { "bases": [], - "display_name": "clanguml::t00062::A", + "display_name": "A", "id": "544335779197078982", "is_abstract": false, "is_nested": false, @@ -984,7 +984,7 @@ struct A> { }, { "bases": [], - "display_name": "clanguml::t00062::A", + "display_name": "A", "id": "602066980416477930", "is_abstract": false, "is_nested": false, @@ -1038,7 +1038,7 @@ struct A> { }, { "bases": [], - "display_name": "clanguml::t00062::A", + "display_name": "A", "id": "1318419672443856415", "is_abstract": false, "is_nested": false, @@ -1092,7 +1092,7 @@ struct A> { }, { "bases": [], - "display_name": "clanguml::t00062::A", + "display_name": "A", "id": "599593856979463652", "is_abstract": false, "is_nested": false, @@ -1170,7 +1170,7 @@ struct A> { }, { "bases": [], - "display_name": "clanguml::t00062::A", + "display_name": "A", "id": "15395295268000991", "is_abstract": false, "is_nested": false, @@ -1224,7 +1224,7 @@ struct A> { }, { "bases": [], - "display_name": "clanguml::t00062::A>", + "display_name": "A>", "id": "1603321863498552207", "is_abstract": false, "is_nested": false, @@ -1273,7 +1273,7 @@ struct A> { }, { "bases": [], - "display_name": "clanguml::t00062::A>", + "display_name": "A>", "id": "232518961342221670", "is_abstract": false, "is_nested": false, @@ -1340,7 +1340,7 @@ struct A> { }, { "bases": [], - "display_name": "clanguml::t00062::A", + "display_name": "A", "id": "121103565834936476", "is_abstract": false, "is_nested": false, @@ -1369,6 +1369,7 @@ struct A> { } ], "name": "t00062_class", + "package_type": "namespace", "relationships": [ { "access": "public", diff --git a/docs/test_cases/t00062_class.svg b/docs/test_cases/t00062_class.svg index dfd806dc..8ba68ed6 100644 --- a/docs/test_cases/t00062_class.svg +++ b/docs/test_cases/t00062_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + A @@ -19,15 +19,15 @@ - + - + u : U & - - + + A @@ -36,15 +36,15 @@ - + - + u : U & - - + + A @@ -53,8 +53,8 @@ - - + + A @@ -63,15 +63,15 @@ - + - + u : U ** - - + + A @@ -80,15 +80,15 @@ - + - + u : U *** - - + + A @@ -97,15 +97,15 @@ - + - + u : U *** - - + + A @@ -114,15 +114,15 @@ - + - + u : U && - - + + A @@ -131,15 +131,15 @@ - + - + u : const U & - - + + A @@ -148,22 +148,22 @@ - + - + c : C & - + - + m : M C::* - - + + A @@ -172,22 +172,22 @@ - + - + c : C && - + - + m : M C::* - - + + A @@ -196,22 +196,22 @@ - + - + c : C & - + - + m : M C::* - - + + A @@ -220,15 +220,15 @@ - + - + c : C & - - + + A @@ -237,22 +237,22 @@ - + - + c : C && - + - + m : M C::* - - + + A @@ -261,22 +261,22 @@ - + - + c : C && - + - + mf : float C::* - - + + A @@ -285,22 +285,22 @@ - + - + c : C & - + - + m : M C::* - - + + A @@ -309,15 +309,15 @@ - + - + n : char[N] - - + + A @@ -326,15 +326,15 @@ - + - + n : std::vector<char> - - + + A @@ -343,15 +343,15 @@ - + - + klm : char[K][L][M] - - + + A @@ -360,15 +360,15 @@ - + - + u : bool - - + + A @@ -377,15 +377,15 @@ - + - + c : C<T> - - + + A @@ -394,22 +394,22 @@ - + - + args : std::tuple<Args...> - + - + c : C<T> - - + + A diff --git a/docs/test_cases/t00062_class_mermaid.svg b/docs/test_cases/t00062_class_mermaid.svg index a739c0a0..f0746d7b 100644 --- a/docs/test_cases/t00062_class_mermaid.svg +++ b/docs/test_cases/t00062_class_mermaid.svg @@ -306,7 +306,7 @@ - + @@ -330,7 +330,7 @@ - + @@ -354,7 +354,7 @@ - + @@ -373,7 +373,7 @@ - + @@ -397,7 +397,7 @@ - + @@ -421,7 +421,7 @@ - + @@ -445,7 +445,7 @@ - + @@ -469,7 +469,7 @@ - + @@ -493,7 +493,7 @@ - + @@ -522,7 +522,7 @@ - + @@ -551,7 +551,7 @@ - + @@ -580,7 +580,7 @@ - + @@ -604,7 +604,7 @@ - + @@ -633,7 +633,7 @@ - + @@ -662,7 +662,7 @@ - + @@ -691,7 +691,7 @@ - + @@ -715,7 +715,7 @@ - + @@ -739,7 +739,7 @@ - + @@ -763,7 +763,7 @@ - + @@ -787,7 +787,7 @@ - + @@ -811,7 +811,7 @@ - + @@ -840,7 +840,7 @@ - + diff --git a/docs/test_cases/t00063.md b/docs/test_cases/t00063.md index 71f6bbbf..df61e8f6 100644 --- a/docs/test_cases/t00063.md +++ b/docs/test_cases/t00063.md @@ -15,7 +15,7 @@ diagrams: using_namespace: clanguml::t00063 ``` ## Source code -File t00063.cc +File `tests/t00063/t00063.cc` ```cpp namespace clanguml { namespace t00063 { @@ -38,7 +38,7 @@ enum class C { c1, c2, c3 }; "elements": [ { "bases": [], - "display_name": "clanguml::t00063::A", + "display_name": "A", "id": "1518171774798799557", "is_abstract": false, "is_nested": false, @@ -60,6 +60,7 @@ enum class C { c1, c2, c3 }; } ], "name": "t00063_class", + "package_type": "namespace", "relationships": [], "using_namespace": "clanguml::t00063" } diff --git a/docs/test_cases/t00063_class.svg b/docs/test_cases/t00063_class.svg index ff16f157..1d919346 100644 --- a/docs/test_cases/t00063_class.svg +++ b/docs/test_cases/t00063_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + A diff --git a/docs/test_cases/t00063_class_mermaid.svg b/docs/test_cases/t00063_class_mermaid.svg index f86ddbb2..0a1c1f57 100644 --- a/docs/test_cases/t00063_class_mermaid.svg +++ b/docs/test_cases/t00063_class_mermaid.svg @@ -52,7 +52,7 @@ - + diff --git a/docs/test_cases/t00064.md b/docs/test_cases/t00064.md index 7e349227..a40bde1c 100644 --- a/docs/test_cases/t00064.md +++ b/docs/test_cases/t00064.md @@ -15,7 +15,7 @@ diagrams: - left to right direction ``` ## Source code -File t00064.cc +File `tests/t00064/t00064.cc` ```cpp #include #include @@ -90,7 +90,7 @@ public: "elements": [ { "bases": [], - "display_name": "clanguml::t00064::type_list", + "display_name": "type_list", "id": "2055044356505752139", "is_abstract": false, "is_nested": false, @@ -119,7 +119,7 @@ public: }, { "bases": [], - "display_name": "clanguml::t00064::type_list", + "display_name": "type_list", "id": "1536403088019105838", "is_abstract": false, "is_nested": false, @@ -166,7 +166,7 @@ public: }, { "bases": [], - "display_name": "clanguml::t00064::type_list", + "display_name": "type_list", "id": "1613293628874851145", "is_abstract": false, "is_nested": false, @@ -201,7 +201,7 @@ public: }, { "bases": [], - "display_name": "clanguml::t00064::type_list", + "display_name": "type_list", "id": "96201031647373215", "is_abstract": false, "is_nested": false, @@ -236,7 +236,7 @@ public: }, { "bases": [], - "display_name": "clanguml::t00064::head>", + "display_name": "head>", "id": "1342666740698875376", "is_abstract": false, "is_nested": false, @@ -278,7 +278,7 @@ public: }, { "bases": [], - "display_name": "clanguml::t00064::type_list", + "display_name": "type_list", "id": "74655005329778311", "is_abstract": false, "is_nested": false, @@ -307,7 +307,7 @@ public: }, { "bases": [], - "display_name": "clanguml::t00064::type_list", + "display_name": "type_list", "id": "1877705309010128195", "is_abstract": false, "is_nested": false, @@ -336,7 +336,7 @@ public: }, { "bases": [], - "display_name": "clanguml::t00064::type_list", + "display_name": "type_list", "id": "1737554639587928188", "is_abstract": false, "is_nested": false, @@ -365,7 +365,7 @@ public: }, { "bases": [], - "display_name": "clanguml::t00064::type_group_pair,clanguml::t00064::type_list>", + "display_name": "type_group_pair,type_list>", "id": "1313421318785708660", "is_abstract": false, "is_nested": false, @@ -427,7 +427,7 @@ public: }, { "bases": [], - "display_name": "clanguml::t00064::optional_ref", + "display_name": "optional_ref", "id": "2110316024454672764", "is_abstract": false, "is_nested": false, @@ -456,7 +456,7 @@ public: }, { "bases": [], - "display_name": "clanguml::t00064::optional_ref,clanguml::t00064::type_list>::value_type>", + "display_name": "optional_ref,type_list>::value_type>", "id": "476531044436856932", "is_abstract": false, "is_nested": false, @@ -485,7 +485,7 @@ public: }, { "bases": [], - "display_name": "clanguml::t00064::type_group_pair_it,clanguml::t00064::type_list>", + "display_name": "type_group_pair_it,type_list>", "id": "1024383802991748694", "is_abstract": false, "is_nested": false, @@ -501,6 +501,7 @@ public: "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -531,6 +532,7 @@ public: "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -561,6 +563,7 @@ public: "is_constexpr": true, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -631,7 +634,7 @@ public: }, { "bases": [], - "display_name": "clanguml::t00064::A", + "display_name": "A", "id": "586286676481245707", "is_abstract": false, "is_nested": false, @@ -653,7 +656,7 @@ public: }, { "bases": [], - "display_name": "clanguml::t00064::B", + "display_name": "B", "id": "1353306307770366167", "is_abstract": false, "is_nested": false, @@ -675,7 +678,7 @@ public: }, { "bases": [], - "display_name": "clanguml::t00064::C", + "display_name": "C", "id": "598044391549147725", "is_abstract": false, "is_nested": false, @@ -697,7 +700,7 @@ public: }, { "bases": [], - "display_name": "clanguml::t00064::type_list", + "display_name": "type_list", "id": "425551452299939770", "is_abstract": false, "is_nested": false, @@ -738,7 +741,7 @@ public: }, { "bases": [], - "display_name": "clanguml::t00064::type_list", + "display_name": "type_list", "id": "179850898515269194", "is_abstract": false, "is_nested": false, @@ -773,7 +776,7 @@ public: }, { "bases": [], - "display_name": "clanguml::t00064::type_list", + "display_name": "type_list", "id": "1070380438303872295", "is_abstract": false, "is_nested": false, @@ -814,7 +817,7 @@ public: }, { "bases": [], - "display_name": "clanguml::t00064::type_group_pair,clanguml::t00064::type_list>", + "display_name": "type_group_pair,type_list>", "id": "1854055939974723413", "is_abstract": false, "is_nested": false, @@ -881,7 +884,7 @@ public: }, { "bases": [], - "display_name": "clanguml::t00064::R", + "display_name": "R", "id": "2161425587790795236", "is_abstract": false, "is_nested": false, @@ -928,7 +931,7 @@ public: }, { "bases": [], - "display_name": "clanguml::t00064::type_group_pair", + "display_name": "type_group_pair", "id": "271990753639572557", "is_abstract": false, "is_nested": false, @@ -963,7 +966,7 @@ public: }, { "bases": [], - "display_name": "clanguml::t00064::type_group_pair_it", + "display_name": "type_group_pair_it", "id": "1057906395469156958", "is_abstract": false, "is_nested": false, @@ -1004,7 +1007,7 @@ public: }, { "bases": [], - "display_name": "clanguml::t00064::head", + "display_name": "head", "id": "1317314479884183399", "is_abstract": false, "is_nested": false, @@ -1033,6 +1036,7 @@ public: } ], "name": "t00064_class", + "package_type": "namespace", "relationships": [ { "access": "public", diff --git a/docs/test_cases/t00064_class.svg b/docs/test_cases/t00064_class.svg index 57142fcb..3bcabf6e 100644 --- a/docs/test_cases/t00064_class.svg +++ b/docs/test_cases/t00064_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + type_list @@ -19,8 +19,8 @@ - - + + type_list @@ -29,8 +29,8 @@ - - + + type_list @@ -39,8 +39,8 @@ - - + + type_list @@ -49,8 +49,8 @@ - - + + head @@ -59,8 +59,8 @@ - - + + type_list @@ -69,8 +69,8 @@ - - + + type_list @@ -79,8 +79,8 @@ - - + + type_list @@ -89,8 +89,8 @@ - - + + type_group_pair @@ -99,15 +99,15 @@ - + - + size : const size_t - - + + optional_ref @@ -116,8 +116,8 @@ - - + + optional_ref @@ -126,8 +126,8 @@ - - + + type_group_pair_it @@ -135,54 +135,54 @@ It,type_list<First...>,type_list<Second...> - + - + find(const value_type & v) constexpr : unsigned int - + - + get(unsigned int i) : ref_t - + - + getp(unsigned int i) : const value_type * - - + + A - - + + B - - + + C - - + + type_list @@ -191,8 +191,8 @@ - - + + type_list @@ -201,8 +201,8 @@ - - + + type_list @@ -211,8 +211,8 @@ - - + + type_group_pair @@ -221,30 +221,30 @@ - - + + R - + - + abc : type_group_pair<type_list<float,double>,type_list<A,B,C>> - + - + aboolint : type_list<A,bool,int> - - + + type_group_pair @@ -253,8 +253,8 @@ - - + + type_group_pair_it @@ -263,8 +263,8 @@ - - + + head diff --git a/docs/test_cases/t00064_class_mermaid.svg b/docs/test_cases/t00064_class_mermaid.svg index 66e2f38e..36dea75d 100644 --- a/docs/test_cases/t00064_class_mermaid.svg +++ b/docs/test_cases/t00064_class_mermaid.svg @@ -390,7 +390,7 @@ - + @@ -409,7 +409,7 @@ - + @@ -428,7 +428,7 @@ - + @@ -447,7 +447,7 @@ - + @@ -466,7 +466,7 @@ - + @@ -485,7 +485,7 @@ - + @@ -504,7 +504,7 @@ - + @@ -523,7 +523,7 @@ - + @@ -542,7 +542,7 @@ - + @@ -566,7 +566,7 @@ - + @@ -585,7 +585,7 @@ - + @@ -604,7 +604,7 @@ - + @@ -638,7 +638,7 @@ - + @@ -657,7 +657,7 @@ - + @@ -676,7 +676,7 @@ - + @@ -695,7 +695,7 @@ - + @@ -714,7 +714,7 @@ - + @@ -733,7 +733,7 @@ - + @@ -752,7 +752,7 @@ - + @@ -771,7 +771,7 @@ - + @@ -800,7 +800,7 @@ - + @@ -819,7 +819,7 @@ - + @@ -838,7 +838,7 @@ - + diff --git a/docs/test_cases/t00065.md b/docs/test_cases/t00065.md index f357d420..4001872e 100644 --- a/docs/test_cases/t00065.md +++ b/docs/test_cases/t00065.md @@ -14,7 +14,7 @@ diagrams: using_namespace: clanguml::t00065 ``` ## Source code -File t00065.cc +File `tests/t00065/t00065.cc` ```cpp #include "module1/module1.h" #include "module2/module2.h" @@ -29,6 +29,80 @@ struct R { } } ``` +File `tests/t00065/module2/module2.h` +```cpp +#pragma once + +#include "concepts/concepts.h" + +namespace clanguml { +namespace t00065 { +struct B { + B() = default; + void b() { } +}; + +template struct C { + T *t; +}; + +template struct D { + T t; + C c; +}; + +} +} +``` +File `tests/t00065/module2/concepts/concepts.h` +```cpp +#pragma once + +namespace clanguml { +namespace t00065 { + +template +concept bconcept = requires(T t) { + T{}; + t.b(); + }; + +} +} +``` +File `tests/t00065/module1/module1.h` +```cpp +#include "submodule1a/submodule1a.h" + +#pragma once + +namespace clanguml { +namespace t00065 { + +enum class ABC { a, b, c }; + +enum XYZ { x, y, z }; + +struct A { + ABC abc; + XYZ xyz; + detail::AImpl *pimpl; +}; +} +} +``` +File `tests/t00065/module1/submodule1a/submodule1a.h` +```cpp +#pragma once + +namespace clanguml { +namespace t00065 { +namespace detail { +struct AImpl { }; +} +} +} +``` ## Generated PlantUML diagrams ![t00065_class](./t00065_class.svg "Class diagram with packages from directory structure") ## Generated Mermaid diagrams @@ -42,11 +116,11 @@ struct R { "display_name": "module1", "elements": [ { - "display_name": "module1::submodule1a", + "display_name": "submodule1a", "elements": [ { "bases": [], - "display_name": "clanguml::t00065::detail::AImpl", + "display_name": "detail::AImpl", "id": "674757414308736755", "is_abstract": false, "is_nested": false, @@ -76,7 +150,7 @@ struct R { "b", "c" ], - "display_name": "clanguml::t00065::ABC", + "display_name": "ABC", "id": "2145362985538918973", "is_nested": false, "name": "ABC", @@ -95,7 +169,7 @@ struct R { "y", "z" ], - "display_name": "clanguml::t00065::XYZ", + "display_name": "XYZ", "id": "1435940218810141944", "is_nested": false, "name": "XYZ", @@ -110,7 +184,7 @@ struct R { }, { "bases": [], - "display_name": "clanguml::t00065::A", + "display_name": "A", "id": "1178194542408300737", "is_abstract": false, "is_nested": false, @@ -175,10 +249,10 @@ struct R { "display_name": "module2", "elements": [ { - "display_name": "module2::concepts", + "display_name": "concepts", "elements": [ { - "display_name": "clanguml::t00065::bconcept", + "display_name": "bconcept", "id": "1325475407133721370", "name": "bconcept", "namespace": "clanguml::t00065", @@ -206,7 +280,7 @@ struct R { }, { "bases": [], - "display_name": "clanguml::t00065::B", + "display_name": "B", "id": "1651810571114530033", "is_abstract": false, "is_nested": false, @@ -222,6 +296,7 @@ struct R { "is_constexpr": false, "is_constructor": true, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": true, "is_deleted": false, "is_move_assignment": false, @@ -247,6 +322,7 @@ struct R { "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -279,7 +355,7 @@ struct R { }, { "bases": [], - "display_name": "clanguml::t00065::C", + "display_name": "C", "id": "1157378014768957235", "is_abstract": false, "is_nested": false, @@ -321,7 +397,7 @@ struct R { }, { "bases": [], - "display_name": "clanguml::t00065::C", + "display_name": "C", "id": "580575003920044707", "is_abstract": false, "is_nested": false, @@ -350,7 +426,7 @@ struct R { }, { "bases": [], - "display_name": "clanguml::t00065::D", + "display_name": "D", "id": "1719752929087851944", "is_abstract": false, "is_nested": false, @@ -404,7 +480,7 @@ struct R { }, { "bases": [], - "display_name": "clanguml::t00065::C", + "display_name": "C", "id": "1373403346245688670", "is_abstract": false, "is_nested": false, @@ -433,7 +509,7 @@ struct R { }, { "bases": [], - "display_name": "clanguml::t00065::D", + "display_name": "D", "id": "2024276012622729482", "is_abstract": false, "is_nested": false, @@ -466,7 +542,7 @@ struct R { }, { "bases": [], - "display_name": "clanguml::t00065::R", + "display_name": "R", "id": "1082111961413727438", "is_abstract": false, "is_nested": false, @@ -525,6 +601,7 @@ struct R { } ], "name": "t00065_class", + "package_type": "directory", "relationships": [ { "access": "public", diff --git a/docs/test_cases/t00065_class.svg b/docs/test_cases/t00065_class.svg index d5a2175a..2116e0ce 100644 --- a/docs/test_cases/t00065_class.svg +++ b/docs/test_cases/t00065_class.svg @@ -1,6 +1,6 @@ - + - + @@ -9,20 +9,20 @@ - + module1 - - - submodule1a - - - module2 - - - concepts - - + + + submodule1a + + + module2 + + + concepts + + ABC @@ -32,8 +32,8 @@ c - - + + XYZ @@ -43,214 +43,216 @@ z - - - - - A - - + + + + + A + + - - - + + + - - abc : ABC + + abc : ABC - - - + + + - - pimpl : detail::AImpl * + + pimpl : detail::AImpl * - - - + + + - - xyz : XYZ + + xyz : XYZ - - - - - AImpl - - + + + + + detail::AImpl + + - - - - - B - + + + + + B + - - - + + + - - B() = default : void + + B() = default : void - - - - + + + + - - b() : void + + b() : void - - - - - - C - - T - - + + + + + + C + + T + + - - - + + + - - t : T * + + t : T * - - - - - C - - int - - + + + + + C + + int + + - - - - - D - - bconcept T - - + + + + + D + + bconcept T + + - - - + + + - - c : C<int> + + c : C<int> - - - + + + - - t : T + + t : T - - - - - C - - B - - + + + + + C + + B + + - - - - - D - - B - - + + + + + D + + B + + - - - - - «concept» - bconcept - - (T t) - - T{} - t.b() + + + + + «concept» + bconcept + + T + + (T t) + + T{} + t.b() - - - - - R - - + + + + + R + + - - - + + + - - a : A * + + a : A * - - - + + + - - c : C<B> + + c : C<B> - - - + + + - - d : D<B> + + d : D<B> - - - - abc - - - - xyz - - - - pimpl - - - - - T - - - +c - - - - - - - - - - - +a - - - +c - - - +d + + + + abc + + + + xyz + + + + pimpl + + + + + T + + + +c + + + + + + + + + + + +a + + + +c + + + +d diff --git a/docs/test_cases/t00065_class_mermaid.svg b/docs/test_cases/t00065_class_mermaid.svg index 620f8af3..906fc069 100644 --- a/docs/test_cases/t00065_class_mermaid.svg +++ b/docs/test_cases/t00065_class_mermaid.svg @@ -210,7 +210,7 @@ - + @@ -229,7 +229,7 @@ - + @@ -263,7 +263,7 @@ - + @@ -297,7 +297,7 @@ - + @@ -331,7 +331,7 @@ - + @@ -365,7 +365,7 @@ - + @@ -394,7 +394,7 @@ - + @@ -418,7 +418,7 @@ - + @@ -437,7 +437,7 @@ - + @@ -466,7 +466,7 @@ - + @@ -485,7 +485,7 @@ - + @@ -504,7 +504,7 @@ - + diff --git a/docs/test_cases/t00066.md b/docs/test_cases/t00066.md index 9ab7858f..b0335cc5 100644 --- a/docs/test_cases/t00066.md +++ b/docs/test_cases/t00066.md @@ -14,7 +14,7 @@ diagrams: using_namespace: clanguml::t00066 ``` ## Source code -File t00066.cc +File `tests/t00066/t00066.cc` ```cpp #include #include @@ -97,7 +97,7 @@ int A::static_int = 1; "elements": [ { "bases": [], - "display_name": "clanguml::t00066::A", + "display_name": "A", "id": "1899957281758233935", "is_abstract": false, "is_nested": false, @@ -234,6 +234,7 @@ int A::static_int = 1; "is_constexpr": false, "is_constructor": true, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": true, "is_deleted": false, "is_move_assignment": false, @@ -259,6 +260,7 @@ int A::static_int = 1; "is_constexpr": false, "is_constructor": true, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -289,6 +291,7 @@ int A::static_int = 1; "is_constexpr": false, "is_constructor": true, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": true, "is_deleted": false, "is_move_assignment": false, @@ -319,6 +322,7 @@ int A::static_int = 1; "is_constexpr": false, "is_constructor": true, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": true, "is_move_assignment": false, @@ -349,6 +353,7 @@ int A::static_int = 1; "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": true, "is_deleted": false, "is_move_assignment": false, @@ -374,6 +379,7 @@ int A::static_int = 1; "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -399,6 +405,7 @@ int A::static_int = 1; "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -424,6 +431,7 @@ int A::static_int = 1; "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -449,6 +457,7 @@ int A::static_int = 1; "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -474,6 +483,7 @@ int A::static_int = 1; "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -499,6 +509,7 @@ int A::static_int = 1; "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": true, @@ -529,6 +540,7 @@ int A::static_int = 1; "is_constexpr": false, "is_constructor": false, "is_copy_assignment": true, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -559,6 +571,7 @@ int A::static_int = 1; "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -584,6 +597,7 @@ int A::static_int = 1; "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -614,6 +628,7 @@ int A::static_int = 1; "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -648,6 +663,7 @@ int A::static_int = 1; "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -679,6 +695,7 @@ int A::static_int = 1; "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -714,6 +731,7 @@ int A::static_int = 1; "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -744,6 +762,7 @@ int A::static_int = 1; "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -769,6 +788,7 @@ int A::static_int = 1; "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -801,6 +821,7 @@ int A::static_int = 1; } ], "name": "t00066_class", + "package_type": "namespace", "relationships": [], "using_namespace": "clanguml::t00066" } diff --git a/docs/test_cases/t00066_class.svg b/docs/test_cases/t00066_class.svg index 4096b831..f4386bbe 100644 --- a/docs/test_cases/t00066_class.svg +++ b/docs/test_cases/t00066_class.svg @@ -1,6 +1,6 @@ - + @@ -9,222 +9,222 @@ - - + + A - + - + public_member : int - + - + protected_member : int - + - + private_member : int - + - + a_ : int - + - + b_ : int - + - + c_ : int - + - + static_int : int - + - + static_const_int : const int - + - + auto_member : const unsigned long - + - + A() = default : void - + - + A(int i) : void - + - + A(A &&) = default : void - + - + A(const A &) = deleted : void - + - + ~A() = default : void - + - + basic_method() : void - + - + static_method() : int - + - + const_method() const : void - + - + auto_method() : int - + - + operator++() : A & - + - + operator=(A && other) noexcept : A & - + - + operator=(A & other) noexcept : A & - + - + size() const : std::size_t - + - + double_int(const int i) : int - + - + sum(const double a, const double b) : int - + - + default_int(int i = 12) : int - + - + default_string(int i, std::string s = "abc") : std::string - + - + create_from_int(int i) : A - + - + protected_method() : void - + - + private_method() : void - + - + compare : std::function<bool (const int)> diff --git a/docs/test_cases/t00066_class_mermaid.svg b/docs/test_cases/t00066_class_mermaid.svg index 1ec82fac..b51a7ec3 100644 --- a/docs/test_cases/t00066_class_mermaid.svg +++ b/docs/test_cases/t00066_class_mermaid.svg @@ -52,7 +52,7 @@ - + diff --git a/docs/test_cases/t00067.md b/docs/test_cases/t00067.md index 7822566a..caf5131f 100644 --- a/docs/test_cases/t00067.md +++ b/docs/test_cases/t00067.md @@ -19,7 +19,7 @@ diagrams: using_namespace: clanguml::t00067 ``` ## Source code -File t00067.cc +File `tests/t00067/t00067.cc` ```cpp #include #include @@ -100,7 +100,7 @@ int A::static_int = 1; "elements": [ { "bases": [], - "display_name": "clanguml::t00067::A", + "display_name": "A", "id": "541140581420098839", "is_abstract": false, "is_nested": false, @@ -237,6 +237,7 @@ int A::static_int = 1; "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -262,6 +263,7 @@ int A::static_int = 1; "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -287,6 +289,7 @@ int A::static_int = 1; "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -312,6 +315,7 @@ int A::static_int = 1; "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -337,6 +341,7 @@ int A::static_int = 1; "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -367,6 +372,7 @@ int A::static_int = 1; "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -401,6 +407,7 @@ int A::static_int = 1; "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -432,6 +439,7 @@ int A::static_int = 1; "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -467,6 +475,7 @@ int A::static_int = 1; "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -492,6 +501,7 @@ int A::static_int = 1; "is_constexpr": false, "is_constructor": false, "is_copy_assignment": false, + "is_coroutine": false, "is_defaulted": false, "is_deleted": false, "is_move_assignment": false, @@ -524,6 +534,7 @@ int A::static_int = 1; } ], "name": "t00067_class", + "package_type": "namespace", "relationships": [], "using_namespace": "clanguml::t00067" } diff --git a/docs/test_cases/t00067_class.svg b/docs/test_cases/t00067_class.svg index 6498ede8..d9bf4e9f 100644 --- a/docs/test_cases/t00067_class.svg +++ b/docs/test_cases/t00067_class.svg @@ -1,6 +1,6 @@ - + @@ -9,152 +9,152 @@ - - + + A - + - + auto_method() : int - + - + basic_method() : void - + - + const_method() const : void - + - + default_int(int i = 12) : int - + - + default_string(int i, std::string s = "abc") : std::string - + - + double_int(const int i) : int - + - + private_method() : void - + - + protected_method() : void - + - + size() const : std::size_t - + - + sum(const double a, const double b) : int - + - + a_ : int - + - + auto_member : const unsigned long - + - + b_ : int - + - + c_ : int - + - + compare : std::function<bool (const int)> - + - + private_member : int - + - + protected_member : int - + - + public_member : int - + - + static_const_int : const int - + - + static_int : int diff --git a/docs/test_cases/t00067_class_mermaid.svg b/docs/test_cases/t00067_class_mermaid.svg index 6b362e53..904952d0 100644 --- a/docs/test_cases/t00067_class_mermaid.svg +++ b/docs/test_cases/t00067_class_mermaid.svg @@ -52,7 +52,7 @@ - + diff --git a/docs/test_cases/t00068.md b/docs/test_cases/t00068.md index f4e00155..f4939ccb 100644 --- a/docs/test_cases/t00068.md +++ b/docs/test_cases/t00068.md @@ -43,7 +43,7 @@ diagrams: using_namespace: clanguml::t00068 ``` ## Source code -File t00068.cc +File `tests/t00068/t00068.cc` ```cpp #include #include @@ -100,7 +100,7 @@ struct RR { "name": "clanguml::t00068::AA" } ], - "display_name": "clanguml::t00068::AAA", + "display_name": "AAA", "id": "1484819281509619918", "is_abstract": false, "is_nested": false, @@ -147,6 +147,7 @@ struct RR { } ], "name": "t00068_r0_class", + "package_type": "namespace", "relationships": [ { "access": "public", @@ -179,7 +180,7 @@ struct RR { "elements": [ { "bases": [], - "display_name": "clanguml::t00068::BB", + "display_name": "BB", "id": "1427649116338755656", "is_abstract": false, "is_nested": false, @@ -218,7 +219,7 @@ struct RR { "TwoA", "ThreeA" ], - "display_name": "clanguml::t00068::AKind", + "display_name": "AKind", "id": "1888428536574868284", "is_nested": false, "name": "AKind", @@ -240,7 +241,7 @@ struct RR { "name": "clanguml::t00068::A" } ], - "display_name": "clanguml::t00068::AA", + "display_name": "AA", "id": "577981285610429577", "is_abstract": false, "is_nested": false, @@ -269,7 +270,7 @@ struct RR { "name": "clanguml::t00068::AA" } ], - "display_name": "clanguml::t00068::AAA", + "display_name": "AAA", "id": "1484819281509619918", "is_abstract": false, "is_nested": false, @@ -316,7 +317,7 @@ struct RR { }, { "bases": [], - "display_name": "clanguml::t00068::R", + "display_name": "R", "id": "999621481464424961", "is_abstract": false, "is_nested": false, @@ -351,6 +352,7 @@ struct RR { } ], "name": "t00068_r1_class", + "package_type": "namespace", "relationships": [ { "access": "public", @@ -403,7 +405,7 @@ struct RR { "elements": [ { "bases": [], - "display_name": "clanguml::t00068::B", + "display_name": "B", "id": "359183874441719256", "is_abstract": false, "is_nested": false, @@ -425,7 +427,7 @@ struct RR { }, { "bases": [], - "display_name": "clanguml::t00068::BB", + "display_name": "BB", "id": "1427649116338755656", "is_abstract": false, "is_nested": false, @@ -464,7 +466,7 @@ struct RR { "TwoA", "ThreeA" ], - "display_name": "clanguml::t00068::AKind", + "display_name": "AKind", "id": "1888428536574868284", "is_nested": false, "name": "AKind", @@ -479,7 +481,7 @@ struct RR { }, { "bases": [], - "display_name": "clanguml::t00068::A", + "display_name": "A", "id": "1297439817144700057", "is_abstract": false, "is_nested": false, @@ -508,7 +510,7 @@ struct RR { "name": "clanguml::t00068::A" } ], - "display_name": "clanguml::t00068::AA", + "display_name": "AA", "id": "577981285610429577", "is_abstract": false, "is_nested": false, @@ -537,7 +539,7 @@ struct RR { "name": "clanguml::t00068::AA" } ], - "display_name": "clanguml::t00068::AAA", + "display_name": "AAA", "id": "1484819281509619918", "is_abstract": false, "is_nested": false, @@ -584,7 +586,7 @@ struct RR { }, { "bases": [], - "display_name": "clanguml::t00068::R", + "display_name": "R", "id": "999621481464424961", "is_abstract": false, "is_nested": false, @@ -619,7 +621,7 @@ struct RR { }, { "bases": [], - "display_name": "clanguml::t00068::RR", + "display_name": "RR", "id": "1168375787542426694", "is_abstract": false, "is_nested": false, @@ -654,6 +656,7 @@ struct RR { } ], "name": "t00068_r2_class", + "package_type": "namespace", "relationships": [ { "access": "public", diff --git a/docs/test_cases/t00068_r0_class.svg b/docs/test_cases/t00068_r0_class.svg index 6f5707a2..991b6804 100644 --- a/docs/test_cases/t00068_r0_class.svg +++ b/docs/test_cases/t00068_r0_class.svg @@ -1,6 +1,6 @@ - + @@ -10,26 +10,26 @@ AAA context of radius 0 - - + + AAA - + - + akind : AKind - + - + bb : BB * diff --git a/docs/test_cases/t00068_r0_class_mermaid.svg b/docs/test_cases/t00068_r0_class_mermaid.svg index 571e28d7..689f23d5 100644 --- a/docs/test_cases/t00068_r0_class_mermaid.svg +++ b/docs/test_cases/t00068_r0_class_mermaid.svg @@ -53,7 +53,7 @@ - + diff --git a/docs/test_cases/t00068_r1_class.svg b/docs/test_cases/t00068_r1_class.svg index 0283cabb..7abfaadb 100644 --- a/docs/test_cases/t00068_r1_class.svg +++ b/docs/test_cases/t00068_r1_class.svg @@ -1,6 +1,6 @@ - + @@ -10,23 +10,23 @@ AAA context of radius 1 - - + + BB - + - + b : std::vector<B> - - + + AKind @@ -36,49 +36,49 @@ ThreeA - - + + AA - - + + AAA - + - + akind : AKind - + - + bb : BB * - - + + R - + - + aaa : AAA * diff --git a/docs/test_cases/t00068_r1_class_mermaid.svg b/docs/test_cases/t00068_r1_class_mermaid.svg index 0fe4ab70..2d9b0f5a 100644 --- a/docs/test_cases/t00068_r1_class_mermaid.svg +++ b/docs/test_cases/t00068_r1_class_mermaid.svg @@ -101,7 +101,7 @@ - + @@ -125,7 +125,7 @@ - + @@ -159,7 +159,7 @@ - + @@ -178,7 +178,7 @@ - + @@ -207,7 +207,7 @@ - + diff --git a/docs/test_cases/t00068_r2_class.svg b/docs/test_cases/t00068_r2_class.svg index b4f0b979..0d361cca 100644 --- a/docs/test_cases/t00068_r2_class.svg +++ b/docs/test_cases/t00068_r2_class.svg @@ -1,6 +1,6 @@ - + @@ -10,31 +10,31 @@ AAA context of radius 2 - - + + B - - + + BB - + - + b : std::vector<B> - - + + AKind @@ -44,72 +44,72 @@ ThreeA - - + + A - - + + AA - - + + AAA - + - + akind : AKind - + - + bb : BB * - - + + R - + - + aaa : AAA * - - + + RR - + - + r : std::shared_ptr<R> diff --git a/docs/test_cases/t00068_r2_class_mermaid.svg b/docs/test_cases/t00068_r2_class_mermaid.svg index b442380a..f1cc8267 100644 --- a/docs/test_cases/t00068_r2_class_mermaid.svg +++ b/docs/test_cases/t00068_r2_class_mermaid.svg @@ -135,7 +135,7 @@ - + @@ -154,7 +154,7 @@ - + @@ -178,7 +178,7 @@ - + @@ -212,7 +212,7 @@ - + @@ -231,7 +231,7 @@ - + @@ -250,7 +250,7 @@ - + @@ -279,7 +279,7 @@ - + @@ -303,7 +303,7 @@ - + diff --git a/docs/test_cases/t00069.md b/docs/test_cases/t00069.md new file mode 100644 index 00000000..e544d504 --- /dev/null +++ b/docs/test_cases/t00069.md @@ -0,0 +1,548 @@ +# t00069 - Coroutine methods in class diagrams +## Config +```yaml +diagrams: + t00069_class: + type: class + glob: + - t00069.cc + include: + namespaces: + - clanguml::t00069 + using_namespace: clanguml::t00069 +``` +## Source code +File `tests/t00069/t00069.cc` +```cpp +#include +#include + +namespace clanguml { +namespace t00069 { + +template struct generator { + struct promise_type; + using handle_type = std::coroutine_handle; + + generator(handle_type h) + : h_(h) + { + } + + ~generator() { h_.destroy(); } + + struct promise_type { + T value_; + std::exception_ptr exception_; + + generator get_return_object() + { + return generator(handle_type::from_promise(*this)); + } + std::suspend_always initial_suspend() { return {}; } + + std::suspend_always final_suspend() noexcept { return {}; } + + void unhandled_exception() { exception_ = std::current_exception(); } + + template From> + std::suspend_always yield_value(From &&from) + { + value_ = std::forward(from); + return {}; + } + + void return_void() { } + }; + + handle_type h_; + +private: + bool full_ = false; +}; + +class A { +public: + generator iota() { co_yield counter_++; } + + generator seed() + { + counter_ = 42; + co_return; + } + +private: + unsigned long counter_; +}; + +} // namespace t00069 +} // namespace clanguml + +``` +## Generated PlantUML diagrams +![t00069_class](./t00069_class.svg "Coroutine methods in class diagrams") +## Generated Mermaid diagrams +![t00069_class](./t00069_class_mermaid.svg "Coroutine methods in class diagrams") +## Generated JSON models +```json +{ + "diagram_type": "class", + "elements": [ + { + "bases": [], + "display_name": "generator", + "id": "2142496233889685657", + "is_abstract": false, + "is_nested": false, + "is_struct": true, + "is_template": true, + "is_union": false, + "members": [ + { + "access": "public", + "is_static": false, + "name": "h_", + "source_location": { + "column": 17, + "file": "t00069.cc", + "line": 42, + "translation_unit": "t00069.cc" + }, + "type": "handle_type" + }, + { + "access": "private", + "is_static": false, + "name": "full_", + "source_location": { + "column": 10, + "file": "t00069.cc", + "line": 45, + "translation_unit": "t00069.cc" + }, + "type": "bool" + } + ], + "methods": [ + { + "access": "public", + "is_const": false, + "is_consteval": false, + "is_constexpr": false, + "is_constructor": true, + "is_copy_assignment": false, + "is_coroutine": false, + "is_defaulted": false, + "is_deleted": false, + "is_move_assignment": false, + "is_noexcept": false, + "is_operator": false, + "is_pure_virtual": false, + "is_static": false, + "is_virtual": false, + "name": "generator", + "parameters": [ + { + "name": "h", + "type": "handle_type" + } + ], + "source_location": { + "column": 5, + "file": "t00069.cc", + "line": 11, + "translation_unit": "t00069.cc" + }, + "type": "void" + }, + { + "access": "public", + "is_const": false, + "is_consteval": false, + "is_constexpr": false, + "is_constructor": false, + "is_copy_assignment": false, + "is_coroutine": false, + "is_defaulted": false, + "is_deleted": false, + "is_move_assignment": false, + "is_noexcept": false, + "is_operator": false, + "is_pure_virtual": false, + "is_static": false, + "is_virtual": false, + "name": "~generator", + "parameters": [], + "source_location": { + "column": 5, + "file": "t00069.cc", + "line": 16, + "translation_unit": "t00069.cc" + }, + "type": "void" + } + ], + "name": "generator", + "namespace": "clanguml::t00069", + "source_location": { + "column": 30, + "file": "t00069.cc", + "line": 7, + "translation_unit": "t00069.cc" + }, + "template_parameters": [ + { + "is_variadic": false, + "kind": "template_type", + "name": "T", + "template_parameters": [] + } + ], + "type": "class" + }, + { + "bases": [], + "display_name": "generator::promise_type", + "id": "721812727497968117", + "is_abstract": false, + "is_nested": true, + "is_struct": true, + "is_template": false, + "is_union": false, + "members": [ + { + "access": "public", + "is_static": false, + "name": "value_", + "source_location": { + "column": 11, + "file": "t00069.cc", + "line": 19, + "translation_unit": "t00069.cc" + }, + "type": "T" + }, + { + "access": "public", + "is_static": false, + "name": "exception_", + "source_location": { + "column": 28, + "file": "t00069.cc", + "line": 20, + "translation_unit": "t00069.cc" + }, + "type": "std::exception_ptr" + } + ], + "methods": [ + { + "access": "public", + "is_const": false, + "is_consteval": false, + "is_constexpr": false, + "is_constructor": false, + "is_copy_assignment": false, + "is_coroutine": false, + "is_defaulted": false, + "is_deleted": false, + "is_move_assignment": false, + "is_noexcept": false, + "is_operator": false, + "is_pure_virtual": false, + "is_static": false, + "is_virtual": false, + "name": "get_return_object", + "parameters": [], + "source_location": { + "column": 19, + "file": "t00069.cc", + "line": 22, + "translation_unit": "t00069.cc" + }, + "type": "generator" + }, + { + "access": "public", + "is_const": false, + "is_consteval": false, + "is_constexpr": false, + "is_constructor": false, + "is_copy_assignment": false, + "is_coroutine": false, + "is_defaulted": false, + "is_deleted": false, + "is_move_assignment": false, + "is_noexcept": false, + "is_operator": false, + "is_pure_virtual": false, + "is_static": false, + "is_virtual": false, + "name": "initial_suspend", + "parameters": [], + "source_location": { + "column": 29, + "file": "t00069.cc", + "line": 26, + "translation_unit": "t00069.cc" + }, + "type": "std::suspend_always" + }, + { + "access": "public", + "is_const": false, + "is_consteval": false, + "is_constexpr": false, + "is_constructor": false, + "is_copy_assignment": false, + "is_coroutine": false, + "is_defaulted": false, + "is_deleted": false, + "is_move_assignment": false, + "is_noexcept": true, + "is_operator": false, + "is_pure_virtual": false, + "is_static": false, + "is_virtual": false, + "name": "final_suspend", + "parameters": [], + "source_location": { + "column": 29, + "file": "t00069.cc", + "line": 28, + "translation_unit": "t00069.cc" + }, + "type": "std::suspend_always" + }, + { + "access": "public", + "is_const": false, + "is_consteval": false, + "is_constexpr": false, + "is_constructor": false, + "is_copy_assignment": false, + "is_coroutine": false, + "is_defaulted": false, + "is_deleted": false, + "is_move_assignment": false, + "is_noexcept": false, + "is_operator": false, + "is_pure_virtual": false, + "is_static": false, + "is_virtual": false, + "name": "unhandled_exception", + "parameters": [], + "source_location": { + "column": 14, + "file": "t00069.cc", + "line": 30, + "translation_unit": "t00069.cc" + }, + "type": "void" + }, + { + "access": "public", + "is_const": false, + "is_consteval": false, + "is_constexpr": false, + "is_constructor": false, + "is_copy_assignment": false, + "is_coroutine": false, + "is_defaulted": false, + "is_deleted": false, + "is_move_assignment": false, + "is_noexcept": false, + "is_operator": false, + "is_pure_virtual": false, + "is_static": false, + "is_virtual": false, + "name": "return_void", + "parameters": [], + "source_location": { + "column": 14, + "file": "t00069.cc", + "line": 39, + "translation_unit": "t00069.cc" + }, + "type": "void" + }, + { + "access": "public", + "is_const": false, + "is_consteval": false, + "is_constexpr": false, + "is_constructor": false, + "is_copy_assignment": false, + "is_coroutine": false, + "is_defaulted": false, + "is_deleted": false, + "is_move_assignment": false, + "is_noexcept": false, + "is_operator": false, + "is_pure_virtual": false, + "is_static": false, + "is_virtual": false, + "name": "yield_value", + "parameters": [ + { + "name": "from", + "type": "From &&" + } + ], + "type": "std::suspend_always" + } + ], + "name": "generator::promise_type", + "namespace": "clanguml::t00069", + "source_location": { + "column": 12, + "file": "t00069.cc", + "line": 18, + "translation_unit": "t00069.cc" + }, + "template_parameters": [], + "type": "class" + }, + { + "bases": [], + "display_name": "generator", + "id": "1604358347140526608", + "is_abstract": false, + "is_nested": false, + "is_struct": false, + "is_template": true, + "is_union": false, + "members": [], + "methods": [], + "name": "generator", + "namespace": "clanguml::t00069", + "source_location": { + "column": 30, + "file": "t00069.cc", + "line": 7, + "translation_unit": "t00069.cc" + }, + "template_parameters": [ + { + "is_variadic": false, + "kind": "argument", + "template_parameters": [], + "type": "unsigned long" + } + ], + "type": "class" + }, + { + "bases": [], + "display_name": "A", + "id": "2160142503252767290", + "is_abstract": false, + "is_nested": false, + "is_struct": false, + "is_template": false, + "is_union": false, + "members": [ + { + "access": "private", + "is_static": false, + "name": "counter_", + "source_location": { + "column": 19, + "file": "t00069.cc", + "line": 59, + "translation_unit": "t00069.cc" + }, + "type": "unsigned long" + } + ], + "methods": [ + { + "access": "public", + "is_const": false, + "is_consteval": false, + "is_constexpr": false, + "is_constructor": false, + "is_copy_assignment": false, + "is_coroutine": true, + "is_defaulted": false, + "is_deleted": false, + "is_move_assignment": false, + "is_noexcept": false, + "is_operator": false, + "is_pure_virtual": false, + "is_static": false, + "is_virtual": false, + "name": "iota", + "parameters": [], + "source_location": { + "column": 30, + "file": "t00069.cc", + "line": 50, + "translation_unit": "t00069.cc" + }, + "type": "clanguml::t00069::generator" + }, + { + "access": "public", + "is_const": false, + "is_consteval": false, + "is_constexpr": false, + "is_constructor": false, + "is_copy_assignment": false, + "is_coroutine": true, + "is_defaulted": false, + "is_deleted": false, + "is_move_assignment": false, + "is_noexcept": false, + "is_operator": false, + "is_pure_virtual": false, + "is_static": false, + "is_virtual": false, + "name": "seed", + "parameters": [], + "source_location": { + "column": 30, + "file": "t00069.cc", + "line": 52, + "translation_unit": "t00069.cc" + }, + "type": "clanguml::t00069::generator" + } + ], + "name": "A", + "namespace": "clanguml::t00069", + "source_location": { + "column": 7, + "file": "t00069.cc", + "line": 48, + "translation_unit": "t00069.cc" + }, + "template_parameters": [], + "type": "class" + } + ], + "name": "t00069_class", + "package_type": "namespace", + "relationships": [ + { + "access": "public", + "destination": "2142496233889685657", + "source": "721812727497968117", + "type": "containment" + }, + { + "access": "public", + "destination": "2142496233889685657", + "source": "1604358347140526608", + "type": "instantiation" + }, + { + "access": "public", + "destination": "1604358347140526608", + "source": "2160142503252767290", + "type": "dependency" + } + ], + "using_namespace": "clanguml::t00069" +} +``` diff --git a/docs/test_cases/t00069_class.svg b/docs/test_cases/t00069_class.svg new file mode 100644 index 00000000..de782f10 --- /dev/null +++ b/docs/test_cases/t00069_class.svg @@ -0,0 +1,157 @@ + + + + + + + + + + + + + + + + generator + + T + + + + + + + + generator(handle_type h) : void + + + + + + + ~generator() : void + + + + + + + + full_ : bool + + + + + + + h_ : handle_type + + + + + + generator::promise_type + + + + + + + + final_suspend() noexcept : std::suspend_always + + + + + + + get_return_object() : generator<T> + + + + + + + initial_suspend() : std::suspend_always + + + + + + + return_void() : void + + + + + + + unhandled_exception() : void + + + yield_value<std::convertible_to From>(From && from) : std::suspend_always + + + + + + + exception_ : std::exception_ptr + + + + + + + value_ : T + + + + + + generator + + unsigned long + + + + + + + + A + + + + + + + + iota() [coroutine] : generator<unsigned long> + + + + + + + seed() [coroutine] : generator<unsigned long> + + + + + + + + counter_ : unsigned long + + + + + + + + + + + diff --git a/docs/test_cases/t00069_class_mermaid.svg b/docs/test_cases/t00069_class_mermaid.svg new file mode 100644 index 00000000..83412602 --- /dev/null +++ b/docs/test_cases/t00069_class_mermaid.svg @@ -0,0 +1,247 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+
+
+
+ + + +
+ + + +
+
+
+
+ + + +
+ + + +
+
+
+
+
+ + + + + + + + +
+ +
+
+ +
+ generator<T> +
+
+ +
+ -full_ : bool +
+
+ +
+ +h_ : handle_type +
+
+ +
+ +generator(handle_type h) : void +
+
+ +
+ +~generator() : void +
+
+
+
+
+ + + + + + + +
+ +
+
+ +
+ generator::promise_type +
+
+ +
+ +exception_ : std::exception_ptr +
+
+ +
+ +value_ : T +
+
+ +
+ +final_suspend() : std::suspend_always +
+
+ +
+ +get_return_object() : generator<T> +
+
+ +
+ +initial_suspend() : std::suspend_always +
+
+ +
+ +return_void() : void +
+
+ +
+ +unhandled_exception() : void +
+
+ +
+ +yield_value(From && from) : std::suspend_always +
+
+
+
+
+ + + + + + + +
+ +
+
+ +
+ generator<unsigned long> +
+
+
+
+
+ + + + + + + +
+ +
+
+ +
+ A +
+
+ +
+ -counter_ : unsigned long +
+
+ +
+ +iota() : [coroutine] generator<unsigned long> +
+
+ +
+ +seed() : [coroutine] generator<unsigned long> +
+
+
+
+
+
+
+
+
diff --git a/docs/test_cases/t00070.md b/docs/test_cases/t00070.md new file mode 100644 index 00000000..047fa287 --- /dev/null +++ b/docs/test_cases/t00070.md @@ -0,0 +1,260 @@ +# t00070 - Diagram filter based on C++20 modules +## Config +```yaml +diagrams: + t00070_class: + type: class + glob: + - t00070.cc + include: + modules: + - t00070 + exclude: + modules: + - t00070.lib2 + module_access: + - private + using_namespace: clanguml::t00070 +``` +## Source code +File `tests/t00070/t00070.cc` +```cpp +import t00070; +import t00070.lib1; +import t00070.lib2; + +namespace clanguml { +namespace t00070 { +int tmain() +{ + B b; + C c; + + return 0; +} +} +} +``` +File `tests/t00070/src/common.cppm` +```cpp +export module t00070; +export import t00070.lib1; +export import t00070.lib2; + +export namespace clanguml::t00070 { +class A { + int get() { return a; } + + int a; +}; +} +``` +File `tests/t00070/src/lib2.cppm` +```cpp +export module t00070.lib2; + +export namespace clanguml::t00070 { +class C { }; + +template class CC { + T t; +}; + +enum class CCC { ccc1, ccc2 }; +} +``` +File `tests/t00070/src/lib1.cppm` +```cpp +export module t00070.lib1; + +export namespace clanguml::t00070 { +class B { }; + +template class BB { + T t; +}; + +enum class BBB { bbb1, bbb2 }; +} + +module :private; +namespace clanguml::t00070 { +class BBBB { }; +} +``` +## Generated PlantUML diagrams +![t00070_class](./t00070_class.svg "Diagram filter based on C++20 modules") +## Generated Mermaid diagrams +![t00070_class](./t00070_class_mermaid.svg "Diagram filter based on C++20 modules") +## Generated JSON models +```json +{ + "diagram_type": "class", + "elements": [ + { + "bases": [], + "display_name": "B", + "id": "1364261599035905834", + "is_abstract": false, + "is_nested": false, + "is_struct": false, + "is_template": false, + "is_union": false, + "members": [], + "methods": [], + "module": { + "is_private": false, + "name": "t00070.lib1" + }, + "name": "B", + "namespace": "clanguml::t00070", + "source_location": { + "column": 7, + "file": "src/lib1.cppm", + "line": 4, + "translation_unit": "t00070.cc" + }, + "template_parameters": [], + "type": "class" + }, + { + "bases": [], + "display_name": "BB", + "id": "1485755083045282660", + "is_abstract": false, + "is_nested": false, + "is_struct": false, + "is_template": true, + "is_union": false, + "members": [ + { + "access": "private", + "is_static": false, + "name": "t", + "source_location": { + "column": 7, + "file": "src/lib1.cppm", + "line": 7, + "translation_unit": "t00070.cc" + }, + "type": "T" + } + ], + "methods": [], + "module": { + "is_private": false, + "name": "t00070.lib1" + }, + "name": "BB", + "namespace": "clanguml::t00070", + "source_location": { + "column": 29, + "file": "src/lib1.cppm", + "line": 6, + "translation_unit": "t00070.cc" + }, + "template_parameters": [ + { + "is_variadic": false, + "kind": "template_type", + "name": "T", + "template_parameters": [] + } + ], + "type": "class" + }, + { + "constants": [ + "bbb1", + "bbb2" + ], + "display_name": "BBB", + "id": "1734694076622541097", + "is_nested": false, + "module": { + "is_private": false, + "name": "t00070.lib1" + }, + "name": "BBB", + "namespace": "clanguml::t00070", + "source_location": { + "column": 12, + "file": "src/lib1.cppm", + "line": 10, + "translation_unit": "t00070.cc" + }, + "type": "enum" + }, + { + "bases": [], + "display_name": "A", + "id": "668221430913861424", + "is_abstract": false, + "is_nested": false, + "is_struct": false, + "is_template": false, + "is_union": false, + "members": [ + { + "access": "private", + "is_static": false, + "name": "a", + "source_location": { + "column": 9, + "file": "src/common.cppm", + "line": 9, + "translation_unit": "t00070.cc" + }, + "type": "int" + } + ], + "methods": [ + { + "access": "private", + "is_const": false, + "is_consteval": false, + "is_constexpr": false, + "is_constructor": false, + "is_copy_assignment": false, + "is_coroutine": false, + "is_defaulted": false, + "is_deleted": false, + "is_move_assignment": false, + "is_noexcept": false, + "is_operator": false, + "is_pure_virtual": false, + "is_static": false, + "is_virtual": false, + "name": "get", + "parameters": [], + "source_location": { + "column": 9, + "file": "src/common.cppm", + "line": 7, + "translation_unit": "t00070.cc" + }, + "type": "int" + } + ], + "module": { + "is_private": false, + "name": "t00070" + }, + "name": "A", + "namespace": "clanguml::t00070", + "source_location": { + "column": 7, + "file": "src/common.cppm", + "line": 6, + "translation_unit": "t00070.cc" + }, + "template_parameters": [], + "type": "class" + } + ], + "name": "t00070_class", + "package_type": "namespace", + "relationships": [], + "using_namespace": "clanguml::t00070" +} +``` diff --git a/docs/test_cases/t00070_class.svg b/docs/test_cases/t00070_class.svg new file mode 100644 index 00000000..c85df48d --- /dev/null +++ b/docs/test_cases/t00070_class.svg @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + B + + + + + + + + BB + + T + + + + + + + + + t : T + + + + + + BBB + + bbb1 + bbb2 + + + + + + + A + + + + + + + + get() : int + + + + + + + + a : int + + + diff --git a/docs/test_cases/t00070_class_mermaid.svg b/docs/test_cases/t00070_class_mermaid.svg new file mode 100644 index 00000000..7b35254d --- /dev/null +++ b/docs/test_cases/t00070_class_mermaid.svg @@ -0,0 +1,159 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+ +
+ B +
+
+
+
+
+ + + + + + + +
+ +
+
+ +
+ BB<T> +
+
+ +
+ -t : T +
+
+
+
+
+ + + + + + + +
+ «enumeration» +
+
+ +
+ BBB +
+
+ +
+ bbb1 +
+
+ +
+ bbb2 +
+
+
+
+
+ + + + + + + +
+ +
+
+ +
+ A +
+
+ +
+ -a : int +
+
+ +
+ -get() : int +
+
+
+
+
+
+
+
+
diff --git a/docs/test_cases/t00071.md b/docs/test_cases/t00071.md new file mode 100644 index 00000000..abf6dfcd --- /dev/null +++ b/docs/test_cases/t00071.md @@ -0,0 +1,536 @@ +# t00071 - Class diagram with C++20 modules generated as packages +## Config +```yaml +diagrams: + t00071_class: + type: class + glob: + - t00071.cc + include: + namespaces: + - clanguml::t00071 + generate_packages: true + package_type: module + using_namespace: clanguml::t00071 + using_module: t00071 +``` +## Source code +File `tests/t00071/t00071.cc` +```cpp +import t00071.app; +import t00071.app.lib1; +import t00071.app.lib1.mod1; +import t00071.app.lib1.mod2; +import t00071.app.lib2; + +namespace clanguml { +namespace t00071 { +class R { + A *a; + B *b; + C *c; +}; +} +} +``` +File `tests/t00071/src/lib1mod2.cppm` +```cpp +export module t00071.app.lib1.mod2; + +export namespace clanguml::t00071 { +class E { }; +} +``` +File `tests/t00071/src/t00071_mod.cppm` +```cpp +export module t00071.app; +export import t00071.app.lib1; +export import t00071.app.lib2; + +export namespace clanguml::t00071 { +class A { + int get() { return a; } + + int a; +}; +} +``` +File `tests/t00071/src/lib2.cppm` +```cpp +export module t00071.app.lib2; + +export namespace clanguml::t00071 { +class C { }; + +template class CC { + T t; +}; + +namespace detail { +enum class CCC { ccc1, ccc2 }; +} +} +``` +File `tests/t00071/src/lib1.cppm` +```cpp +export module t00071.app.lib1; + +export namespace clanguml::t00071 { +class B { }; + +template class BB { + T t; +}; + +namespace detail { +enum class BBB { bbb1, bbb2 }; +} // namespace detail +} +``` +File `tests/t00071/src/lib1mod1.cppm` +```cpp +export module t00071.app.lib1.mod1; + +export namespace clanguml::t00071 { +class D { }; +} +``` +## Generated PlantUML diagrams +![t00071_class](./t00071_class.svg "Class diagram with C++20 modules generated as packages") +## Generated Mermaid diagrams +![t00071_class](./t00071_class_mermaid.svg "Class diagram with C++20 modules generated as packages") +## Generated JSON models +```json +{ + "diagram_type": "class", + "elements": [ + { + "display_name": "app", + "elements": [ + { + "display_name": "lib1", + "elements": [ + { + "bases": [], + "display_name": "B", + "id": "1319862510251967999", + "is_abstract": false, + "is_nested": false, + "is_struct": false, + "is_template": false, + "is_union": false, + "members": [], + "methods": [], + "module": { + "is_private": false, + "name": "t00071.app.lib1" + }, + "name": "B", + "namespace": "clanguml::t00071", + "source_location": { + "column": 7, + "file": "src/lib1.cppm", + "line": 4, + "translation_unit": "t00071.cc" + }, + "template_parameters": [], + "type": "class" + }, + { + "bases": [], + "display_name": "BB", + "id": "569632796637866961", + "is_abstract": false, + "is_nested": false, + "is_struct": false, + "is_template": true, + "is_union": false, + "members": [ + { + "access": "private", + "is_static": false, + "name": "t", + "source_location": { + "column": 7, + "file": "src/lib1.cppm", + "line": 7, + "translation_unit": "t00071.cc" + }, + "type": "T" + } + ], + "methods": [], + "module": { + "is_private": false, + "name": "t00071.app.lib1" + }, + "name": "BB", + "namespace": "clanguml::t00071", + "source_location": { + "column": 29, + "file": "src/lib1.cppm", + "line": 6, + "translation_unit": "t00071.cc" + }, + "template_parameters": [ + { + "is_variadic": false, + "kind": "template_type", + "name": "T", + "template_parameters": [] + } + ], + "type": "class" + }, + { + "constants": [ + "bbb1", + "bbb2" + ], + "display_name": "detail::BBB", + "id": "1625078061541942293", + "is_nested": false, + "module": { + "is_private": false, + "name": "t00071.app.lib1" + }, + "name": "BBB", + "namespace": "clanguml::t00071::detail", + "source_location": { + "column": 12, + "file": "src/lib1.cppm", + "line": 11, + "translation_unit": "t00071.cc" + }, + "type": "enum" + }, + { + "display_name": "mod1", + "elements": [ + { + "bases": [], + "display_name": "D", + "id": "1168777064323042894", + "is_abstract": false, + "is_nested": false, + "is_struct": false, + "is_template": false, + "is_union": false, + "members": [], + "methods": [], + "module": { + "is_private": false, + "name": "t00071.app.lib1.mod1" + }, + "name": "D", + "namespace": "clanguml::t00071", + "source_location": { + "column": 7, + "file": "src/lib1mod1.cppm", + "line": 4, + "translation_unit": "t00071.cc" + }, + "template_parameters": [], + "type": "class" + } + ], + "name": "mod1", + "type": "module" + }, + { + "display_name": "mod2", + "elements": [ + { + "bases": [], + "display_name": "E", + "id": "1302694761523535504", + "is_abstract": false, + "is_nested": false, + "is_struct": false, + "is_template": false, + "is_union": false, + "members": [], + "methods": [], + "module": { + "is_private": false, + "name": "t00071.app.lib1.mod2" + }, + "name": "E", + "namespace": "clanguml::t00071", + "source_location": { + "column": 7, + "file": "src/lib1mod2.cppm", + "line": 4, + "translation_unit": "t00071.cc" + }, + "template_parameters": [], + "type": "class" + } + ], + "name": "mod2", + "type": "module" + } + ], + "name": "lib1", + "type": "module" + }, + { + "display_name": "lib2", + "elements": [ + { + "bases": [], + "display_name": "C", + "id": "1697463991772603674", + "is_abstract": false, + "is_nested": false, + "is_struct": false, + "is_template": false, + "is_union": false, + "members": [], + "methods": [], + "module": { + "is_private": false, + "name": "t00071.app.lib2" + }, + "name": "C", + "namespace": "clanguml::t00071", + "source_location": { + "column": 7, + "file": "src/lib2.cppm", + "line": 4, + "translation_unit": "t00071.cc" + }, + "template_parameters": [], + "type": "class" + }, + { + "bases": [], + "display_name": "CC", + "id": "1911193033649971391", + "is_abstract": false, + "is_nested": false, + "is_struct": false, + "is_template": true, + "is_union": false, + "members": [ + { + "access": "private", + "is_static": false, + "name": "t", + "source_location": { + "column": 7, + "file": "src/lib2.cppm", + "line": 7, + "translation_unit": "t00071.cc" + }, + "type": "T" + } + ], + "methods": [], + "module": { + "is_private": false, + "name": "t00071.app.lib2" + }, + "name": "CC", + "namespace": "clanguml::t00071", + "source_location": { + "column": 29, + "file": "src/lib2.cppm", + "line": 6, + "translation_unit": "t00071.cc" + }, + "template_parameters": [ + { + "is_variadic": false, + "kind": "template_type", + "name": "T", + "template_parameters": [] + } + ], + "type": "class" + }, + { + "constants": [ + "ccc1", + "ccc2" + ], + "display_name": "detail::CCC", + "id": "931278702894205804", + "is_nested": false, + "module": { + "is_private": false, + "name": "t00071.app.lib2" + }, + "name": "CCC", + "namespace": "clanguml::t00071::detail", + "source_location": { + "column": 12, + "file": "src/lib2.cppm", + "line": 11, + "translation_unit": "t00071.cc" + }, + "type": "enum" + } + ], + "name": "lib2", + "type": "module" + }, + { + "bases": [], + "display_name": "A", + "id": "2210005074053139118", + "is_abstract": false, + "is_nested": false, + "is_struct": false, + "is_template": false, + "is_union": false, + "members": [ + { + "access": "private", + "is_static": false, + "name": "a", + "source_location": { + "column": 9, + "file": "src/t00071_mod.cppm", + "line": 9, + "translation_unit": "t00071.cc" + }, + "type": "int" + } + ], + "methods": [ + { + "access": "private", + "is_const": false, + "is_consteval": false, + "is_constexpr": false, + "is_constructor": false, + "is_copy_assignment": false, + "is_coroutine": false, + "is_defaulted": false, + "is_deleted": false, + "is_move_assignment": false, + "is_noexcept": false, + "is_operator": false, + "is_pure_virtual": false, + "is_static": false, + "is_virtual": false, + "name": "get", + "parameters": [], + "source_location": { + "column": 9, + "file": "src/t00071_mod.cppm", + "line": 7, + "translation_unit": "t00071.cc" + }, + "type": "int" + } + ], + "module": { + "is_private": false, + "name": "t00071.app" + }, + "name": "A", + "namespace": "clanguml::t00071", + "source_location": { + "column": 7, + "file": "src/t00071_mod.cppm", + "line": 6, + "translation_unit": "t00071.cc" + }, + "template_parameters": [], + "type": "class" + } + ], + "name": "app", + "type": "module" + }, + { + "bases": [], + "display_name": "R", + "id": "1629943620359873327", + "is_abstract": false, + "is_nested": false, + "is_struct": false, + "is_template": false, + "is_union": false, + "members": [ + { + "access": "private", + "is_static": false, + "name": "a", + "source_location": { + "column": 8, + "file": "t00071.cc", + "line": 10, + "translation_unit": "t00071.cc" + }, + "type": "A *" + }, + { + "access": "private", + "is_static": false, + "name": "b", + "source_location": { + "column": 8, + "file": "t00071.cc", + "line": 11, + "translation_unit": "t00071.cc" + }, + "type": "B *" + }, + { + "access": "private", + "is_static": false, + "name": "c", + "source_location": { + "column": 8, + "file": "t00071.cc", + "line": 12, + "translation_unit": "t00071.cc" + }, + "type": "C *" + } + ], + "methods": [], + "name": "R", + "namespace": "clanguml::t00071", + "source_location": { + "column": 7, + "file": "t00071.cc", + "line": 9, + "translation_unit": "t00071.cc" + }, + "template_parameters": [], + "type": "class" + } + ], + "name": "t00071_class", + "package_type": "module", + "relationships": [ + { + "access": "private", + "destination": "2210005074053139118", + "label": "a", + "source": "1629943620359873327", + "type": "association" + }, + { + "access": "private", + "destination": "1319862510251967999", + "label": "b", + "source": "1629943620359873327", + "type": "association" + }, + { + "access": "private", + "destination": "1697463991772603674", + "label": "c", + "source": "1629943620359873327", + "type": "association" + } + ], + "using_module": "t00071", + "using_namespace": "clanguml::t00071" +} +``` diff --git a/docs/test_cases/t00071_class.svg b/docs/test_cases/t00071_class.svg new file mode 100644 index 00000000..69fcdf67 --- /dev/null +++ b/docs/test_cases/t00071_class.svg @@ -0,0 +1,174 @@ + + + + + + + + + + + + + + app + + + lib1 + + + mod1 + + + mod2 + + + lib2 + + + + + A + + + + + + + + get() : int + + + + + + + + a : int + + + + + + B + + + + + + + + BB + + T + + + + + + + + + t : T + + + + + + detail::BBB + + bbb1 + bbb2 + + + + + + + D + + + + + + + + E + + + + + + + + C + + + + + + + + CC + + T + + + + + + + + + t : T + + + + + + detail::CCC + + ccc1 + ccc2 + + + + + + + R + + + + + + + + + a : A * + + + + + + + b : B * + + + + + + + c : C * + + + + -a + + + -b + + + -c + + diff --git a/docs/test_cases/t00071_class_mermaid.svg b/docs/test_cases/t00071_class_mermaid.svg new file mode 100644 index 00000000..b7d1ff17 --- /dev/null +++ b/docs/test_cases/t00071_class_mermaid.svg @@ -0,0 +1,341 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + -a + +
+
+
+
+ + + +
+ + -b + +
+
+
+
+ + + +
+ + -c + +
+
+
+
+
+ + + + + + + + +
+ +
+
+ +
+ B +
+
+
+
+
+ + + + + + + +
+ +
+
+ +
+ BB<T> +
+
+ +
+ -t : T +
+
+
+
+
+ + + + + + + +
+ «enumeration» +
+
+ +
+ detail::BBB +
+
+ +
+ bbb1 +
+
+ +
+ bbb2 +
+
+
+
+
+ + + + + + + +
+ +
+
+ +
+ D +
+
+
+
+
+ + + + + + + +
+ +
+
+ +
+ E +
+
+
+
+
+ + + + + + + +
+ +
+
+ +
+ C +
+
+
+
+
+ + + + + + + +
+ +
+
+ +
+ CC<T> +
+
+ +
+ -t : T +
+
+
+
+
+ + + + + + + +
+ «enumeration» +
+
+ +
+ detail::CCC +
+
+ +
+ ccc1 +
+
+ +
+ ccc2 +
+
+
+
+
+ + + + + + + +
+ +
+
+ +
+ A +
+
+ +
+ -a : int +
+
+ +
+ -get() : int +
+
+
+
+
+ + + + + + + +
+ +
+
+ +
+ R +
+
+ +
+ -a : A +
+
+ +
+ -b : B +
+
+ +
+ -c : C +
+
+
+
+
+
+
+
+
diff --git a/docs/test_cases/t00072.md b/docs/test_cases/t00072.md new file mode 100644 index 00000000..1e0137d5 --- /dev/null +++ b/docs/test_cases/t00072.md @@ -0,0 +1,448 @@ +# t00072 - Class diagram with C++20 module partitions generated as packages +## Config +```yaml +diagrams: + t00072_class: + type: class + glob: + - t00072.cc + generate_packages: true + package_type: module + include: + modules: + - t00072 + using_module: t00072 + using_namespace: clanguml::t00072 +``` +## Source code +File `tests/t00072/t00072.cc` +```cpp +import t00072.app; + +namespace clanguml { +namespace t00072 { +} +} +``` +File `tests/t00072/src/lib1mod2.cppm` +```cpp +export module t00072.app:lib1.mod2; + +export namespace clanguml::t00072 { +class E { }; +} +``` +File `tests/t00072/src/t00072_mod.cppm` +```cpp +export module t00072.app; +export import :lib1; +export import :lib1.mod1; +export import :lib1.mod2; +export import :lib2; + +export namespace clanguml::t00072 { +class A { + int get() { return a; } + + int a; +}; +} +``` +File `tests/t00072/src/lib2.cppm` +```cpp +export module t00072.app:lib2; + +export namespace clanguml::t00072 { +class C { }; + +template class CC { + T t; +}; + +namespace detail { +enum class CCC { ccc1, ccc2 }; +} +} +``` +File `tests/t00072/src/lib1.cppm` +```cpp +export module t00072.app:lib1; + +export namespace clanguml::t00072 { +class B { }; + +template class BB { + T t; +}; + +namespace detail { +enum class BBB { bbb1, bbb2 }; +} // namespace detail +} +``` +File `tests/t00072/src/lib1mod1.cppm` +```cpp +export module t00072.app:lib1.mod1; + +export namespace clanguml::t00072 { +class D { }; +} +``` +## Generated PlantUML diagrams +![t00072_class](./t00072_class.svg "Class diagram with C++20 module partitions generated as packages") +## Generated Mermaid diagrams +![t00072_class](./t00072_class_mermaid.svg "Class diagram with C++20 module partitions generated as packages") +## Generated JSON models +```json +{ + "diagram_type": "class", + "elements": [ + { + "display_name": "app", + "elements": [ + { + "display_name": ":lib1", + "elements": [ + { + "bases": [], + "display_name": "B", + "id": "1450150421445257774", + "is_abstract": false, + "is_nested": false, + "is_struct": false, + "is_template": false, + "is_union": false, + "members": [], + "methods": [], + "module": { + "is_private": false, + "name": "t00072.app:lib1" + }, + "name": "B", + "namespace": "clanguml::t00072", + "source_location": { + "column": 7, + "file": "src/lib1.cppm", + "line": 4, + "translation_unit": "t00072.cc" + }, + "template_parameters": [], + "type": "class" + }, + { + "bases": [], + "display_name": "BB", + "id": "744925471008373109", + "is_abstract": false, + "is_nested": false, + "is_struct": false, + "is_template": true, + "is_union": false, + "members": [ + { + "access": "private", + "is_static": false, + "name": "t", + "source_location": { + "column": 7, + "file": "src/lib1.cppm", + "line": 7, + "translation_unit": "t00072.cc" + }, + "type": "T" + } + ], + "methods": [], + "module": { + "is_private": false, + "name": "t00072.app:lib1" + }, + "name": "BB", + "namespace": "clanguml::t00072", + "source_location": { + "column": 29, + "file": "src/lib1.cppm", + "line": 6, + "translation_unit": "t00072.cc" + }, + "template_parameters": [ + { + "is_variadic": false, + "kind": "template_type", + "name": "T", + "template_parameters": [] + } + ], + "type": "class" + }, + { + "constants": [ + "bbb1", + "bbb2" + ], + "display_name": "detail::BBB", + "id": "610293402618118513", + "is_nested": false, + "module": { + "is_private": false, + "name": "t00072.app:lib1" + }, + "name": "BBB", + "namespace": "clanguml::t00072::detail", + "source_location": { + "column": 12, + "file": "src/lib1.cppm", + "line": 11, + "translation_unit": "t00072.cc" + }, + "type": "enum" + }, + { + "display_name": "mod1", + "elements": [ + { + "bases": [], + "display_name": "D", + "id": "516204432765266678", + "is_abstract": false, + "is_nested": false, + "is_struct": false, + "is_template": false, + "is_union": false, + "members": [], + "methods": [], + "module": { + "is_private": false, + "name": "t00072.app:lib1.mod1" + }, + "name": "D", + "namespace": "clanguml::t00072", + "source_location": { + "column": 7, + "file": "src/lib1mod1.cppm", + "line": 4, + "translation_unit": "t00072.cc" + }, + "template_parameters": [], + "type": "class" + } + ], + "name": "mod1", + "type": "module" + }, + { + "display_name": "mod2", + "elements": [ + { + "bases": [], + "display_name": "E", + "id": "347204883768272660", + "is_abstract": false, + "is_nested": false, + "is_struct": false, + "is_template": false, + "is_union": false, + "members": [], + "methods": [], + "module": { + "is_private": false, + "name": "t00072.app:lib1.mod2" + }, + "name": "E", + "namespace": "clanguml::t00072", + "source_location": { + "column": 7, + "file": "src/lib1mod2.cppm", + "line": 4, + "translation_unit": "t00072.cc" + }, + "template_parameters": [], + "type": "class" + } + ], + "name": "mod2", + "type": "module" + } + ], + "name": ":lib1", + "type": "module" + }, + { + "display_name": ":lib2", + "elements": [ + { + "bases": [], + "display_name": "C", + "id": "1144612141363797057", + "is_abstract": false, + "is_nested": false, + "is_struct": false, + "is_template": false, + "is_union": false, + "members": [], + "methods": [], + "module": { + "is_private": false, + "name": "t00072.app:lib2" + }, + "name": "C", + "namespace": "clanguml::t00072", + "source_location": { + "column": 7, + "file": "src/lib2.cppm", + "line": 4, + "translation_unit": "t00072.cc" + }, + "template_parameters": [], + "type": "class" + }, + { + "bases": [], + "display_name": "CC", + "id": "1472938318775327089", + "is_abstract": false, + "is_nested": false, + "is_struct": false, + "is_template": true, + "is_union": false, + "members": [ + { + "access": "private", + "is_static": false, + "name": "t", + "source_location": { + "column": 7, + "file": "src/lib2.cppm", + "line": 7, + "translation_unit": "t00072.cc" + }, + "type": "T" + } + ], + "methods": [], + "module": { + "is_private": false, + "name": "t00072.app:lib2" + }, + "name": "CC", + "namespace": "clanguml::t00072", + "source_location": { + "column": 29, + "file": "src/lib2.cppm", + "line": 6, + "translation_unit": "t00072.cc" + }, + "template_parameters": [ + { + "is_variadic": false, + "kind": "template_type", + "name": "T", + "template_parameters": [] + } + ], + "type": "class" + }, + { + "constants": [ + "ccc1", + "ccc2" + ], + "display_name": "detail::CCC", + "id": "448885573685763285", + "is_nested": false, + "module": { + "is_private": false, + "name": "t00072.app:lib2" + }, + "name": "CCC", + "namespace": "clanguml::t00072::detail", + "source_location": { + "column": 12, + "file": "src/lib2.cppm", + "line": 11, + "translation_unit": "t00072.cc" + }, + "type": "enum" + } + ], + "name": ":lib2", + "type": "module" + }, + { + "bases": [], + "display_name": "A", + "id": "1552096180171121044", + "is_abstract": false, + "is_nested": false, + "is_struct": false, + "is_template": false, + "is_union": false, + "members": [ + { + "access": "private", + "is_static": false, + "name": "a", + "source_location": { + "column": 9, + "file": "src/t00072_mod.cppm", + "line": 11, + "translation_unit": "t00072.cc" + }, + "type": "int" + } + ], + "methods": [ + { + "access": "private", + "is_const": false, + "is_consteval": false, + "is_constexpr": false, + "is_constructor": false, + "is_copy_assignment": false, + "is_coroutine": false, + "is_defaulted": false, + "is_deleted": false, + "is_move_assignment": false, + "is_noexcept": false, + "is_operator": false, + "is_pure_virtual": false, + "is_static": false, + "is_virtual": false, + "name": "get", + "parameters": [], + "source_location": { + "column": 9, + "file": "src/t00072_mod.cppm", + "line": 9, + "translation_unit": "t00072.cc" + }, + "type": "int" + } + ], + "module": { + "is_private": false, + "name": "t00072.app" + }, + "name": "A", + "namespace": "clanguml::t00072", + "source_location": { + "column": 7, + "file": "src/t00072_mod.cppm", + "line": 8, + "translation_unit": "t00072.cc" + }, + "template_parameters": [], + "type": "class" + } + ], + "name": "app", + "type": "module" + } + ], + "name": "t00072_class", + "package_type": "module", + "relationships": [], + "using_module": "t00072", + "using_namespace": "clanguml::t00072" +} +``` diff --git a/docs/test_cases/t00072_class.svg b/docs/test_cases/t00072_class.svg new file mode 100644 index 00000000..5bce9ae4 --- /dev/null +++ b/docs/test_cases/t00072_class.svg @@ -0,0 +1,136 @@ + + + + + + + + + + + + + + app + + + :lib1 + + + mod1 + + + mod2 + + + :lib2 + + + + + A + + + + + + + + get() : int + + + + + + + + a : int + + + + + + B + + + + + + + + BB + + T + + + + + + + + + t : T + + + + + + detail::BBB + + bbb1 + bbb2 + + + + + + + D + + + + + + + + E + + + + + + + + C + + + + + + + + CC + + T + + + + + + + + + t : T + + + + + + detail::CCC + + ccc1 + ccc2 + + + + diff --git a/docs/test_cases/t00072_class_mermaid.svg b/docs/test_cases/t00072_class_mermaid.svg new file mode 100644 index 00000000..b563d13c --- /dev/null +++ b/docs/test_cases/t00072_class_mermaid.svg @@ -0,0 +1,269 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+ +
+ B +
+
+
+
+
+ + + + + + + +
+ +
+
+ +
+ BB<T> +
+
+ +
+ -t : T +
+
+
+
+
+ + + + + + + +
+ «enumeration» +
+
+ +
+ detail::BBB +
+
+ +
+ bbb1 +
+
+ +
+ bbb2 +
+
+
+
+
+ + + + + + + +
+ +
+
+ +
+ D +
+
+
+
+
+ + + + + + + +
+ +
+
+ +
+ E +
+
+
+
+
+ + + + + + + +
+ +
+
+ +
+ C +
+
+
+
+
+ + + + + + + +
+ +
+
+ +
+ CC<T> +
+
+ +
+ -t : T +
+
+
+
+
+ + + + + + + +
+ «enumeration» +
+
+ +
+ detail::CCC +
+
+ +
+ ccc1 +
+
+ +
+ ccc2 +
+
+
+
+
+ + + + + + + +
+ +
+
+ +
+ A +
+
+ +
+ -a : int +
+
+ +
+ -get() : int +
+
+
+
+
+
+
+
+
diff --git a/docs/test_cases/t20001.md b/docs/test_cases/t20001.md index 4ea79e4d..94e14048 100644 --- a/docs/test_cases/t20001.md +++ b/docs/test_cases/t20001.md @@ -31,7 +31,7 @@ diagrams: ``` ## Source code -File t20001.cc +File `tests/t20001/t20001.cc` ```cpp #include #include @@ -119,8 +119,10 @@ int tmain() "name": "t20001_sequence", "participants": [ { + "display_name": "tmain()", "id": "622672604730036140", - "name": "clanguml::t20001::tmain()", + "name": "tmain", + "namespace": "clanguml::t20001", "source_location": { "column": 5, "file": "t20001.cc", @@ -130,8 +132,64 @@ int tmain() "type": "function" }, { + "activities": [ + { + "display_name": "A()", + "id": "275353461034438145", + "name": "A", + "namespace": "", + "source_location": { + "column": 5, + "file": "t20001.cc", + "line": 15, + "translation_unit": "t20001.cc" + }, + "type": "method" + }, + { + "display_name": "add(int,int)", + "id": "1131549932713395402", + "name": "add", + "namespace": "", + "source_location": { + "column": 9, + "file": "t20001.cc", + "line": 17, + "translation_unit": "t20001.cc" + }, + "type": "method" + }, + { + "display_name": "add3(int,int,int)", + "id": "2090436635449419593", + "name": "add3", + "namespace": "", + "source_location": { + "column": 9, + "file": "t20001.cc", + "line": 19, + "translation_unit": "t20001.cc" + }, + "type": "method" + }, + { + "display_name": "log_result(int)", + "id": "1205947631808952097", + "name": "log_result", + "namespace": "", + "source_location": { + "column": 17, + "file": "t20001.cc", + "line": 30, + "translation_unit": "t20001.cc" + }, + "type": "method" + } + ], + "display_name": "A", "id": "1771943546649183134", - "name": "clanguml::t20001::A", + "name": "A", + "namespace": "clanguml::t20001", "source_location": { "column": 7, "file": "t20001.cc", @@ -141,8 +199,38 @@ int tmain() "type": "class" }, { + "activities": [ + { + "display_name": "B(A &)", + "id": "2235477658795500000", + "name": "B", + "namespace": "", + "source_location": { + "column": 5, + "file": "t20001.cc", + "line": 38, + "translation_unit": "t20001.cc" + }, + "type": "method" + }, + { + "display_name": "wrap_add3(int,int,int)", + "id": "642550151323208936", + "name": "wrap_add3", + "namespace": "", + "source_location": { + "column": 9, + "file": "t20001.cc", + "line": 50, + "translation_unit": "t20001.cc" + }, + "type": "method" + } + ], + "display_name": "B", "id": "272433898507800600", - "name": "clanguml::t20001::B", + "name": "B", + "namespace": "clanguml::t20001", "source_location": { "column": 7, "file": "t20001.cc", @@ -158,9 +246,7 @@ int tmain() { "from": { "activity_id": "622672604730036140", - "activity_name": "clanguml::t20001::tmain()", - "participant_id": "622672604730036140", - "participant_name": "clanguml::t20001::tmain()" + "participant_id": "622672604730036140" }, "name": "A()", "return_type": "void", @@ -173,7 +259,6 @@ int tmain() }, "to": { "activity_id": "275353461034438145", - "activity_name": "clanguml::t20001::A::A()", "participant_id": "1771943546649183134" }, "type": "message" @@ -181,9 +266,7 @@ int tmain() { "from": { "activity_id": "622672604730036140", - "activity_name": "clanguml::t20001::tmain()", - "participant_id": "622672604730036140", - "participant_name": "clanguml::t20001::tmain()" + "participant_id": "622672604730036140" }, "name": "B(A &)", "return_type": "void", @@ -196,7 +279,6 @@ int tmain() }, "to": { "activity_id": "2235477658795500000", - "activity_name": "clanguml::t20001::B::B(A &)", "participant_id": "272433898507800600" }, "type": "message" @@ -205,9 +287,7 @@ int tmain() "comment": "\\uml{note Just add 2 numbers}", "from": { "activity_id": "622672604730036140", - "activity_name": "clanguml::t20001::tmain()", - "participant_id": "622672604730036140", - "participant_name": "clanguml::t20001::tmain()" + "participant_id": "622672604730036140" }, "name": "add(int,int)", "return_type": "int", @@ -220,7 +300,6 @@ int tmain() }, "to": { "activity_id": "1131549932713395402", - "activity_name": "clanguml::t20001::A::add(int,int)", "participant_id": "1771943546649183134" }, "type": "message" @@ -229,9 +308,7 @@ int tmain() "comment": "\\uml{note[] And now add another 2}", "from": { "activity_id": "622672604730036140", - "activity_name": "clanguml::t20001::tmain()", - "participant_id": "622672604730036140", - "participant_name": "clanguml::t20001::tmain()" + "participant_id": "622672604730036140" }, "name": "wrap_add3(int,int,int)", "return_type": "int", @@ -244,7 +321,6 @@ int tmain() }, "to": { "activity_id": "642550151323208936", - "activity_name": "clanguml::t20001::B::wrap_add3(int,int,int)", "participant_id": "272433898507800600" }, "type": "message" @@ -252,7 +328,6 @@ int tmain() { "from": { "activity_id": "642550151323208936", - "activity_name": "clanguml::t20001::B::wrap_add3(int,int,int)", "participant_id": "272433898507800600" }, "name": "add3(int,int,int)", @@ -266,7 +341,6 @@ int tmain() }, "to": { "activity_id": "2090436635449419593", - "activity_name": "clanguml::t20001::A::add3(int,int,int)", "participant_id": "1771943546649183134" }, "type": "message" @@ -274,7 +348,6 @@ int tmain() { "from": { "activity_id": "2090436635449419593", - "activity_name": "clanguml::t20001::A::add3(int,int,int)", "participant_id": "1771943546649183134" }, "name": "add(int,int)", @@ -288,7 +361,6 @@ int tmain() }, "to": { "activity_id": "1131549932713395402", - "activity_name": "clanguml::t20001::A::add(int,int)", "participant_id": "1771943546649183134" }, "type": "message" @@ -296,7 +368,6 @@ int tmain() { "from": { "activity_id": "2090436635449419593", - "activity_name": "clanguml::t20001::A::add3(int,int,int)", "participant_id": "1771943546649183134" }, "name": "log_result(int)", @@ -310,7 +381,6 @@ int tmain() }, "to": { "activity_id": "1205947631808952097", - "activity_name": "clanguml::t20001::A::log_result(int)", "participant_id": "1771943546649183134" }, "type": "message" @@ -318,7 +388,6 @@ int tmain() { "from": { "activity_id": "642550151323208936", - "activity_name": "clanguml::t20001::B::wrap_add3(int,int,int)", "participant_id": "272433898507800600" }, "name": "log_result(int)", @@ -332,7 +401,6 @@ int tmain() }, "to": { "activity_id": "1205947631808952097", - "activity_name": "clanguml::t20001::A::log_result(int)", "participant_id": "1771943546649183134" }, "type": "message" diff --git a/docs/test_cases/t20001_sequence.svg b/docs/test_cases/t20001_sequence.svg index fe2a3803..27920143 100644 --- a/docs/test_cases/t20001_sequence.svg +++ b/docs/test_cases/t20001_sequence.svg @@ -1,6 +1,6 @@ - + @@ -10,79 +10,79 @@ Basic sequence diagram example - - - - - - - - - + + + + + + + + + - - + + tmain() - + tmain() - - + + A - + A - - + + B - + B - - - - - - - - - - + + + + + + + + + + A() - + B(A &) - + Just add 2 numbers - + add(int,int) - + And now add another 2 - + wrap_add3(int,int,int) - + add3(int,int,int) - + @@ -93,7 +93,7 @@ - + @@ -102,14 +102,14 @@ - + log_result(int) - + Main test function diff --git a/docs/test_cases/t20002.md b/docs/test_cases/t20002.md index eea0656e..1c2908c0 100644 --- a/docs/test_cases/t20002.md +++ b/docs/test_cases/t20002.md @@ -15,7 +15,7 @@ diagrams: ``` ## Source code -File t20002.cc +File `tests/t20002/t20002.cc` ```cpp #include #include @@ -46,8 +46,10 @@ void m1() { m2(); } "name": "t20002_sequence", "participants": [ { + "display_name": "m1()", "id": "1619421429271064154", - "name": "clanguml::t20002::m1()", + "name": "m1", + "namespace": "clanguml::t20002", "source_location": { "column": 6, "file": "t20002.cc", @@ -57,8 +59,10 @@ void m1() { m2(); } "type": "function" }, { + "display_name": "m2()", "id": "1575240232156112674", - "name": "clanguml::t20002::m2()", + "name": "m2", + "namespace": "clanguml::t20002", "source_location": { "column": 6, "file": "t20002.cc", @@ -68,8 +72,10 @@ void m1() { m2(); } "type": "function" }, { + "display_name": "m3()", "id": "1838809176089209580", - "name": "clanguml::t20002::m3()", + "name": "m3", + "namespace": "clanguml::t20002", "source_location": { "column": 6, "file": "t20002.cc", @@ -79,8 +85,10 @@ void m1() { m2(); } "type": "function" }, { + "display_name": "m4()", "id": "63715062711218534", - "name": "clanguml::t20002::m4()", + "name": "m4", + "namespace": "clanguml::t20002", "source_location": { "column": 6, "file": "t20002.cc", @@ -96,9 +104,7 @@ void m1() { m2(); } { "from": { "activity_id": "1619421429271064154", - "activity_name": "clanguml::t20002::m1()", - "participant_id": "1619421429271064154", - "participant_name": "clanguml::t20002::m1()" + "participant_id": "1619421429271064154" }, "name": "", "return_type": "void", @@ -111,7 +117,6 @@ void m1() { m2(); } }, "to": { "activity_id": "1575240232156112674", - "activity_name": "clanguml::t20002::m2()", "participant_id": "1575240232156112674" }, "type": "message" @@ -119,9 +124,7 @@ void m1() { m2(); } { "from": { "activity_id": "1575240232156112674", - "activity_name": "clanguml::t20002::m2()", - "participant_id": "1575240232156112674", - "participant_name": "clanguml::t20002::m2()" + "participant_id": "1575240232156112674" }, "name": "", "return_type": "void", @@ -134,7 +137,6 @@ void m1() { m2(); } }, "to": { "activity_id": "1838809176089209580", - "activity_name": "clanguml::t20002::m3()", "participant_id": "1838809176089209580" }, "type": "message" @@ -142,9 +144,7 @@ void m1() { m2(); } { "from": { "activity_id": "1838809176089209580", - "activity_name": "clanguml::t20002::m3()", - "participant_id": "1838809176089209580", - "participant_name": "clanguml::t20002::m3()" + "participant_id": "1838809176089209580" }, "name": "", "return_type": "void", @@ -157,7 +157,6 @@ void m1() { m2(); } }, "to": { "activity_id": "63715062711218534", - "activity_name": "clanguml::t20002::m4()", "participant_id": "63715062711218534" }, "type": "message" diff --git a/docs/test_cases/t20002_sequence.svg b/docs/test_cases/t20002_sequence.svg index 188e8fd2..9f418e6b 100644 --- a/docs/test_cases/t20002_sequence.svg +++ b/docs/test_cases/t20002_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,51 +9,51 @@ - - - - + + + + - - + + m1() - + m1() - - + + m2() - + m2() - - + + m3() - + m3() - - + + m4() - + m4() - - - - - + + + + + - + - + diff --git a/docs/test_cases/t20003.md b/docs/test_cases/t20003.md index f523d0a0..a8383069 100644 --- a/docs/test_cases/t20003.md +++ b/docs/test_cases/t20003.md @@ -15,7 +15,7 @@ diagrams: ``` ## Source code -File t20003.cc +File `tests/t20003/t20003.cc` ```cpp namespace clanguml { namespace t20003 { @@ -42,8 +42,10 @@ template void m1(T p) { m2(p); } "name": "t20003_sequence", "participants": [ { + "display_name": "m1(T)", "id": "469205740799240869", - "name": "clanguml::t20003::m1(T)", + "name": "m1", + "namespace": "clanguml::t20003", "source_location": { "column": 28, "file": "t20003.cc", @@ -53,8 +55,10 @@ template void m1(T p) { m2(p); } "type": "function_template" }, { + "display_name": "m2(T)", "id": "1502957449367040488", - "name": "clanguml::t20003::m2(T)", + "name": "m2", + "namespace": "clanguml::t20003", "source_location": { "column": 28, "file": "t20003.cc", @@ -64,8 +68,10 @@ template void m1(T p) { m2(p); } "type": "function_template" }, { + "display_name": "m3(T)", "id": "613477682313507585", - "name": "clanguml::t20003::m3(T)", + "name": "m3", + "namespace": "clanguml::t20003", "source_location": { "column": 28, "file": "t20003.cc", @@ -75,8 +81,10 @@ template void m1(T p) { m2(p); } "type": "function_template" }, { + "display_name": "m4(T)", "id": "619960023608507925", - "name": "clanguml::t20003::m4(T)", + "name": "m4", + "namespace": "clanguml::t20003", "source_location": { "column": 28, "file": "t20003.cc", @@ -92,9 +100,7 @@ template void m1(T p) { m2(p); } { "from": { "activity_id": "469205740799240869", - "activity_name": "clanguml::t20003::m1(T)", - "participant_id": "469205740799240869", - "participant_name": "clanguml::t20003::m1(T)" + "participant_id": "469205740799240869" }, "name": "", "return_type": "void", @@ -107,7 +113,6 @@ template void m1(T p) { m2(p); } }, "to": { "activity_id": "1502957449367040488", - "activity_name": "clanguml::t20003::m2(T)", "participant_id": "1502957449367040488" }, "type": "message" @@ -115,9 +120,7 @@ template void m1(T p) { m2(p); } { "from": { "activity_id": "1502957449367040488", - "activity_name": "clanguml::t20003::m2(T)", - "participant_id": "1502957449367040488", - "participant_name": "clanguml::t20003::m2(T)" + "participant_id": "1502957449367040488" }, "name": "", "return_type": "void", @@ -130,7 +133,6 @@ template void m1(T p) { m2(p); } }, "to": { "activity_id": "613477682313507585", - "activity_name": "clanguml::t20003::m3(T)", "participant_id": "613477682313507585" }, "type": "message" @@ -138,9 +140,7 @@ template void m1(T p) { m2(p); } { "from": { "activity_id": "613477682313507585", - "activity_name": "clanguml::t20003::m3(T)", - "participant_id": "613477682313507585", - "participant_name": "clanguml::t20003::m3(T)" + "participant_id": "613477682313507585" }, "name": "", "return_type": "void", @@ -153,7 +153,6 @@ template void m1(T p) { m2(p); } }, "to": { "activity_id": "619960023608507925", - "activity_name": "clanguml::t20003::m4(T)", "participant_id": "619960023608507925" }, "type": "message" diff --git a/docs/test_cases/t20003_sequence.svg b/docs/test_cases/t20003_sequence.svg index 0502df17..140ece2a 100644 --- a/docs/test_cases/t20003_sequence.svg +++ b/docs/test_cases/t20003_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,51 +9,51 @@ - - - - + + + + - - + + m1<T>(T) - + m1<T>(T) - - + + m2<T>(T) - + m2<T>(T) - - + + m3<T>(T) - + m3<T>(T) - - + + m4<T>(T) - + m4<T>(T) - - - - - + + + + + - + - + diff --git a/docs/test_cases/t20004.md b/docs/test_cases/t20004.md index 46d2ffff..a8c5edd5 100644 --- a/docs/test_cases/t20004.md +++ b/docs/test_cases/t20004.md @@ -14,7 +14,7 @@ diagrams: - function: "clanguml::t20004::main()" ``` ## Source code -File t20004.cc +File `tests/t20004/t20004.cc` ```cpp #include @@ -78,8 +78,10 @@ int main() "name": "t20004_sequence", "participants": [ { + "display_name": "main()", "id": "2299662004367884401", - "name": "clanguml::t20004::main()", + "name": "main", + "namespace": "clanguml::t20004", "source_location": { "column": 5, "file": "t20004.cc", @@ -89,8 +91,10 @@ int main() "type": "function" }, { + "display_name": "m1(float)", "id": "138925040763435897", - "name": "clanguml::t20004::m1(float)", + "name": "m1", + "namespace": "clanguml::t20004", "source_location": { "column": 36, "file": "t20004.cc", @@ -100,8 +104,10 @@ int main() "type": "function_template" }, { + "display_name": "m1(unsigned long)", "id": "1239083518717603720", - "name": "clanguml::t20004::m1(unsigned long)", + "name": "m1", + "namespace": "clanguml::t20004", "source_location": { "column": 44, "file": "t20004.cc", @@ -111,8 +117,10 @@ int main() "type": "function_template" }, { + "display_name": "m4(unsigned long)", "id": "376599675205498367", - "name": "clanguml::t20004::m4(unsigned long)", + "name": "m4", + "namespace": "clanguml::t20004", "source_location": { "column": 44, "file": "t20004.cc", @@ -122,8 +130,10 @@ int main() "type": "function_template" }, { + "display_name": "m1(std::string)", "id": "1845817984839618223", - "name": "clanguml::t20004::m1(std::string)", + "name": "m1", + "namespace": "clanguml::t20004", "source_location": { "column": 42, "file": "t20004.cc", @@ -133,8 +143,10 @@ int main() "type": "function_template" }, { + "display_name": "m2(std::string)", "id": "1735054254122948614", - "name": "clanguml::t20004::m2(std::string)", + "name": "m2", + "namespace": "clanguml::t20004", "source_location": { "column": 42, "file": "t20004.cc", @@ -144,8 +156,10 @@ int main() "type": "function_template" }, { + "display_name": "m1(int)", "id": "121663532044911922", - "name": "clanguml::t20004::m1(int)", + "name": "m1", + "namespace": "clanguml::t20004", "source_location": { "column": 25, "file": "t20004.cc", @@ -155,8 +169,10 @@ int main() "type": "function_template" }, { + "display_name": "m2(int)", "id": "1475362124497386656", - "name": "clanguml::t20004::m2(int)", + "name": "m2", + "namespace": "clanguml::t20004", "source_location": { "column": 25, "file": "t20004.cc", @@ -166,8 +182,10 @@ int main() "type": "function_template" }, { + "display_name": "m3(int)", "id": "734999226157549914", - "name": "clanguml::t20004::m3(int)", + "name": "m3", + "namespace": "clanguml::t20004", "source_location": { "column": 25, "file": "t20004.cc", @@ -177,8 +195,10 @@ int main() "type": "function_template" }, { + "display_name": "m4(int)", "id": "1006390865908497562", - "name": "clanguml::t20004::m4(int)", + "name": "m4", + "namespace": "clanguml::t20004", "source_location": { "column": 34, "file": "t20004.cc", @@ -194,9 +214,7 @@ int main() { "from": { "activity_id": "2299662004367884401", - "activity_name": "clanguml::t20004::main()", - "participant_id": "2299662004367884401", - "participant_name": "clanguml::t20004::main()" + "participant_id": "2299662004367884401" }, "name": "", "return_type": "", @@ -209,7 +227,6 @@ int main() }, "to": { "activity_id": "138925040763435897", - "activity_name": "clanguml::t20004::m1(float)", "participant_id": "138925040763435897" }, "type": "message" @@ -217,9 +234,7 @@ int main() { "from": { "activity_id": "2299662004367884401", - "activity_name": "clanguml::t20004::main()", - "participant_id": "2299662004367884401", - "participant_name": "clanguml::t20004::main()" + "participant_id": "2299662004367884401" }, "name": "", "return_type": "", @@ -232,7 +247,6 @@ int main() }, "to": { "activity_id": "1239083518717603720", - "activity_name": "clanguml::t20004::m1(unsigned long)", "participant_id": "1239083518717603720" }, "type": "message" @@ -240,9 +254,7 @@ int main() { "from": { "activity_id": "1239083518717603720", - "activity_name": "clanguml::t20004::m1(unsigned long)", - "participant_id": "1239083518717603720", - "participant_name": "clanguml::t20004::m1(unsigned long)" + "participant_id": "1239083518717603720" }, "name": "", "return_type": "", @@ -255,7 +267,6 @@ int main() }, "to": { "activity_id": "376599675205498367", - "activity_name": "clanguml::t20004::m4(unsigned long)", "participant_id": "376599675205498367" }, "type": "message" @@ -263,9 +274,7 @@ int main() { "from": { "activity_id": "2299662004367884401", - "activity_name": "clanguml::t20004::main()", - "participant_id": "2299662004367884401", - "participant_name": "clanguml::t20004::main()" + "participant_id": "2299662004367884401" }, "name": "", "return_type": "", @@ -278,7 +287,6 @@ int main() }, "to": { "activity_id": "1845817984839618223", - "activity_name": "clanguml::t20004::m1(std::string)", "participant_id": "1845817984839618223" }, "type": "message" @@ -286,9 +294,7 @@ int main() { "from": { "activity_id": "1845817984839618223", - "activity_name": "clanguml::t20004::m1(std::string)", - "participant_id": "1845817984839618223", - "participant_name": "clanguml::t20004::m1(std::string)" + "participant_id": "1845817984839618223" }, "name": "", "return_type": "", @@ -301,7 +307,6 @@ int main() }, "to": { "activity_id": "1735054254122948614", - "activity_name": "clanguml::t20004::m2(std::string)", "participant_id": "1735054254122948614" }, "type": "message" @@ -309,9 +314,7 @@ int main() { "from": { "activity_id": "2299662004367884401", - "activity_name": "clanguml::t20004::main()", - "participant_id": "2299662004367884401", - "participant_name": "clanguml::t20004::main()" + "participant_id": "2299662004367884401" }, "name": "", "return_type": "", @@ -324,7 +327,6 @@ int main() }, "to": { "activity_id": "121663532044911922", - "activity_name": "clanguml::t20004::m1(int)", "participant_id": "121663532044911922" }, "type": "message" @@ -332,9 +334,7 @@ int main() { "from": { "activity_id": "121663532044911922", - "activity_name": "clanguml::t20004::m1(int)", - "participant_id": "121663532044911922", - "participant_name": "clanguml::t20004::m1(int)" + "participant_id": "121663532044911922" }, "name": "", "return_type": "", @@ -347,7 +347,6 @@ int main() }, "to": { "activity_id": "1475362124497386656", - "activity_name": "clanguml::t20004::m2(int)", "participant_id": "1475362124497386656" }, "type": "message" @@ -355,9 +354,7 @@ int main() { "from": { "activity_id": "1475362124497386656", - "activity_name": "clanguml::t20004::m2(int)", - "participant_id": "1475362124497386656", - "participant_name": "clanguml::t20004::m2(int)" + "participant_id": "1475362124497386656" }, "name": "", "return_type": "", @@ -370,7 +367,6 @@ int main() }, "to": { "activity_id": "734999226157549914", - "activity_name": "clanguml::t20004::m3(int)", "participant_id": "734999226157549914" }, "type": "message" @@ -378,9 +374,7 @@ int main() { "from": { "activity_id": "734999226157549914", - "activity_name": "clanguml::t20004::m3(int)", - "participant_id": "734999226157549914", - "participant_name": "clanguml::t20004::m3(int)" + "participant_id": "734999226157549914" }, "name": "", "return_type": "", @@ -393,7 +387,6 @@ int main() }, "to": { "activity_id": "1006390865908497562", - "activity_name": "clanguml::t20004::m4(int)", "participant_id": "1006390865908497562" }, "type": "message" diff --git a/docs/test_cases/t20004_sequence.svg b/docs/test_cases/t20004_sequence.svg index 32db2ffb..033f3952 100644 --- a/docs/test_cases/t20004_sequence.svg +++ b/docs/test_cases/t20004_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,16 +9,16 @@ - - - - - - - - - - + + + + + + + + + + @@ -29,87 +29,87 @@ - - + + main() - + main() - - + + m1<float>(float) - + m1<float>(float) - - + + m1<unsigned long>(unsigned long) - + m1<unsigned long>(unsigned long) - - + + m4<unsigned long>(unsigned long) - + m4<unsigned long>(unsigned long) - - + + m1<std::string>(std::string) - + m1<std::string>(std::string) - - + + m2<std::string>(std::string) - + m2<std::string>(std::string) - - + + m1<int>(int) - + m1<int>(int) - - + + m2<int>(int) - + m2<int>(int) - - + + m3<int>(int) - + m3<int>(int) - - + + m4<int>(int) - + m4<int>(int) - - - - - - - - - - - + + + + + + + + + + + - + - + @@ -117,11 +117,11 @@ - + - + @@ -129,19 +129,19 @@ - + - + - + - + diff --git a/docs/test_cases/t20005.md b/docs/test_cases/t20005.md index 7946a80d..daa14c5a 100644 --- a/docs/test_cases/t20005.md +++ b/docs/test_cases/t20005.md @@ -14,7 +14,7 @@ diagrams: - function: "clanguml::t20005::C::c(T)" ``` ## Source code -File t20005.cc +File `tests/t20005/t20005.cc` ```cpp namespace clanguml { namespace t20005 { @@ -49,8 +49,25 @@ template struct C { "name": "t20005_sequence", "participants": [ { + "activities": [ + { + "display_name": "c(T)", + "id": "578718872965404973", + "name": "c", + "namespace": "", + "source_location": { + "column": 7, + "file": "t20005.cc", + "line": 15, + "translation_unit": "t20005.cc" + }, + "type": "method" + } + ], + "display_name": "C", "id": "365569130532127604", - "name": "clanguml::t20005::C", + "name": "C", + "namespace": "clanguml::t20005", "source_location": { "column": 30, "file": "t20005.cc", @@ -60,8 +77,25 @@ template struct C { "type": "class" }, { + "activities": [ + { + "display_name": "b(T)", + "id": "870466496899932117", + "name": "b", + "namespace": "", + "source_location": { + "column": 7, + "file": "t20005.cc", + "line": 9, + "translation_unit": "t20005.cc" + }, + "type": "method" + } + ], + "display_name": "B", "id": "666000829532846850", - "name": "clanguml::t20005::B", + "name": "B", + "namespace": "clanguml::t20005", "source_location": { "column": 30, "file": "t20005.cc", @@ -71,8 +105,25 @@ template struct C { "type": "class" }, { + "activities": [ + { + "display_name": "a(T)", + "id": "124853455814403745", + "name": "a", + "namespace": "", + "source_location": { + "column": 7, + "file": "t20005.cc", + "line": 5, + "translation_unit": "t20005.cc" + }, + "type": "method" + } + ], + "display_name": "A", "id": "1278330455625941185", - "name": "clanguml::t20005::A", + "name": "A", + "namespace": "clanguml::t20005", "source_location": { "column": 30, "file": "t20005.cc", @@ -88,7 +139,6 @@ template struct C { { "from": { "activity_id": "578718872965404973", - "activity_name": "clanguml::t20005::C::c(T)", "participant_id": "365569130532127604" }, "name": "b(T)", @@ -102,7 +152,6 @@ template struct C { }, "to": { "activity_id": "870466496899932117", - "activity_name": "clanguml::t20005::B::b(T)", "participant_id": "666000829532846850" }, "type": "message" @@ -110,7 +159,6 @@ template struct C { { "from": { "activity_id": "870466496899932117", - "activity_name": "clanguml::t20005::B::b(T)", "participant_id": "666000829532846850" }, "name": "a(T)", @@ -124,7 +172,6 @@ template struct C { }, "to": { "activity_id": "124853455814403745", - "activity_name": "clanguml::t20005::A::a(T)", "participant_id": "1278330455625941185" }, "type": "message" diff --git a/docs/test_cases/t20005_sequence.svg b/docs/test_cases/t20005_sequence.svg index 3cea17ef..a4f6829b 100644 --- a/docs/test_cases/t20005_sequence.svg +++ b/docs/test_cases/t20005_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,42 +9,42 @@ - - - + + + - - + + C<T> - + C<T> - - + + B<T> - + B<T> - - + + A<T> - + A<T> - - - + + + c(T) - + b(T) - + a(T) diff --git a/docs/test_cases/t20006.md b/docs/test_cases/t20006.md index dd640a5e..afb11868 100644 --- a/docs/test_cases/t20006.md +++ b/docs/test_cases/t20006.md @@ -14,7 +14,7 @@ diagrams: - function: "clanguml::t20006::tmain()" ``` ## Source code -File t20006.cc +File `tests/t20006/t20006.cc` ```cpp #include @@ -107,8 +107,10 @@ void tmain() "name": "t20006_sequence", "participants": [ { + "display_name": "tmain()", "id": "363965584448680958", - "name": "clanguml::t20006::tmain()", + "name": "tmain", + "namespace": "clanguml::t20006", "source_location": { "column": 6, "file": "t20006.cc", @@ -118,8 +120,25 @@ void tmain() "type": "function" }, { + "activities": [ + { + "display_name": "b(int)", + "id": "250247217888843587", + "name": "b", + "namespace": "", + "source_location": { + "column": 7, + "file": "t20006.cc", + "line": 12, + "translation_unit": "t20006.cc" + }, + "type": "method" + } + ], + "display_name": "B", "id": "2197760498261923035", - "name": "clanguml::t20006::B", + "name": "B", + "namespace": "clanguml::t20006", "source_location": { "column": 30, "file": "t20006.cc", @@ -129,8 +148,25 @@ void tmain() "type": "class" }, { + "activities": [ + { + "display_name": "a1(int)", + "id": "196390487987395669", + "name": "a1", + "namespace": "", + "source_location": { + "column": 7, + "file": "t20006.cc", + "line": 7, + "translation_unit": "t20006.cc" + }, + "type": "method" + } + ], + "display_name": "A", "id": "596484796124829039", - "name": "clanguml::t20006::A", + "name": "A", + "namespace": "clanguml::t20006", "source_location": { "column": 30, "file": "t20006.cc", @@ -140,8 +176,25 @@ void tmain() "type": "class" }, { + "activities": [ + { + "display_name": "b(std::string)", + "id": "13049632552871157", + "name": "b", + "namespace": "", + "source_location": { + "column": 17, + "file": "t20006.cc", + "line": 17, + "translation_unit": "t20006.cc" + }, + "type": "method" + } + ], + "display_name": "B", "id": "2102622661983365981", - "name": "clanguml::t20006::B", + "name": "B", + "namespace": "clanguml::t20006", "source_location": { "column": 20, "file": "t20006.cc", @@ -151,8 +204,25 @@ void tmain() "type": "class" }, { + "activities": [ + { + "display_name": "a2(std::string)", + "id": "11762588624112907", + "name": "a2", + "namespace": "", + "source_location": { + "column": 7, + "file": "t20006.cc", + "line": 8, + "translation_unit": "t20006.cc" + }, + "type": "method" + } + ], + "display_name": "A", "id": "413459875415381273", - "name": "clanguml::t20006::A", + "name": "A", + "namespace": "clanguml::t20006", "source_location": { "column": 30, "file": "t20006.cc", @@ -162,8 +232,51 @@ void tmain() "type": "class" }, { + "activities": [ + { + "display_name": "BB(AA *)", + "id": "381732876807761480", + "name": "BB", + "namespace": "", + "source_location": { + "column": 5, + "file": "t20006.cc", + "line": 37, + "translation_unit": "t20006.cc" + }, + "type": "method" + }, + { + "display_name": "bb1(int,std::string)", + "id": "1062874005712014125", + "name": "bb1", + "namespace": "", + "source_location": { + "column": 10, + "file": "t20006.cc", + "line": 34, + "translation_unit": "t20006.cc" + }, + "type": "method" + }, + { + "display_name": "bb2(int,std::string)", + "id": "787705189994778234", + "name": "bb2", + "namespace": "", + "source_location": { + "column": 10, + "file": "t20006.cc", + "line": 35, + "translation_unit": "t20006.cc" + }, + "type": "method" + } + ], + "display_name": "BB", "id": "2269742833301555472", - "name": "clanguml::t20006::BB", + "name": "BB", + "namespace": "clanguml::t20006", "source_location": { "column": 30, "file": "t20006.cc", @@ -173,8 +286,51 @@ void tmain() "type": "class" }, { + "activities": [ + { + "display_name": "BB(AA &)", + "id": "1051013203072323842", + "name": "BB", + "namespace": "", + "source_location": { + "column": 5, + "file": "t20006.cc", + "line": 49, + "translation_unit": "t20006.cc" + }, + "type": "method" + }, + { + "display_name": "bb1(int,float)", + "id": "1463188845572485713", + "name": "bb1", + "namespace": "", + "source_location": { + "column": 10, + "file": "t20006.cc", + "line": 46, + "translation_unit": "t20006.cc" + }, + "type": "method" + }, + { + "display_name": "bb2(int,float)", + "id": "732362671329401903", + "name": "bb2", + "namespace": "", + "source_location": { + "column": 10, + "file": "t20006.cc", + "line": 47, + "translation_unit": "t20006.cc" + }, + "type": "method" + } + ], + "display_name": "BB", "id": "1743503037360505162", - "name": "clanguml::t20006::BB", + "name": "BB", + "namespace": "clanguml::t20006", "source_location": { "column": 30, "file": "t20006.cc", @@ -184,8 +340,38 @@ void tmain() "type": "class" }, { + "activities": [ + { + "display_name": "bb1(int,int)", + "id": "1213865121829347654", + "name": "bb1", + "namespace": "", + "source_location": { + "column": 10, + "file": "t20006.cc", + "line": 27, + "translation_unit": "t20006.cc" + }, + "type": "method" + }, + { + "display_name": "bb2(int,int)", + "id": "361650123916792854", + "name": "bb2", + "namespace": "", + "source_location": { + "column": 10, + "file": "t20006.cc", + "line": 28, + "translation_unit": "t20006.cc" + }, + "type": "method" + } + ], + "display_name": "BB", "id": "264392653889863384", - "name": "clanguml::t20006::BB", + "name": "BB", + "namespace": "clanguml::t20006", "source_location": { "column": 42, "file": "t20006.cc", @@ -195,8 +381,38 @@ void tmain() "type": "class" }, { + "activities": [ + { + "display_name": "aa1(int)", + "id": "1235428163990670191", + "name": "aa1", + "namespace": "", + "source_location": { + "column": 10, + "file": "t20006.cc", + "line": 22, + "translation_unit": "t20006.cc" + }, + "type": "method" + }, + { + "display_name": "aa2(int)", + "id": "582097827335267290", + "name": "aa2", + "namespace": "", + "source_location": { + "column": 10, + "file": "t20006.cc", + "line": 23, + "translation_unit": "t20006.cc" + }, + "type": "method" + } + ], + "display_name": "AA", "id": "1903567228894636312", - "name": "clanguml::t20006::AA", + "name": "AA", + "namespace": "clanguml::t20006", "source_location": { "column": 30, "file": "t20006.cc", @@ -212,9 +428,7 @@ void tmain() { "from": { "activity_id": "363965584448680958", - "activity_name": "clanguml::t20006::tmain()", - "participant_id": "363965584448680958", - "participant_name": "clanguml::t20006::tmain()" + "participant_id": "363965584448680958" }, "name": "b(int)", "return_type": "int", @@ -227,7 +441,6 @@ void tmain() }, "to": { "activity_id": "250247217888843587", - "activity_name": "clanguml::t20006::B::b(int)", "participant_id": "2197760498261923035" }, "type": "message" @@ -235,7 +448,6 @@ void tmain() { "from": { "activity_id": "250247217888843587", - "activity_name": "clanguml::t20006::B::b(int)", "participant_id": "2197760498261923035" }, "name": "a1(int)", @@ -249,7 +461,6 @@ void tmain() }, "to": { "activity_id": "196390487987395669", - "activity_name": "clanguml::t20006::A::a1(int)", "participant_id": "596484796124829039" }, "type": "message" @@ -257,9 +468,7 @@ void tmain() { "from": { "activity_id": "363965584448680958", - "activity_name": "clanguml::t20006::tmain()", - "participant_id": "363965584448680958", - "participant_name": "clanguml::t20006::tmain()" + "participant_id": "363965584448680958" }, "name": "b(std::string)", "return_type": "std::string", @@ -272,7 +481,6 @@ void tmain() }, "to": { "activity_id": "13049632552871157", - "activity_name": "clanguml::t20006::B::b(std::string)", "participant_id": "2102622661983365981" }, "type": "message" @@ -280,7 +488,6 @@ void tmain() { "from": { "activity_id": "13049632552871157", - "activity_name": "clanguml::t20006::B::b(std::string)", "participant_id": "2102622661983365981" }, "name": "a2(std::string)", @@ -294,7 +501,6 @@ void tmain() }, "to": { "activity_id": "11762588624112907", - "activity_name": "clanguml::t20006::A::a2(std::string)", "participant_id": "413459875415381273" }, "type": "message" @@ -302,9 +508,7 @@ void tmain() { "from": { "activity_id": "363965584448680958", - "activity_name": "clanguml::t20006::tmain()", - "participant_id": "363965584448680958", - "participant_name": "clanguml::t20006::tmain()" + "participant_id": "363965584448680958" }, "name": "BB(AA *)", "return_type": "void", @@ -317,7 +521,6 @@ void tmain() }, "to": { "activity_id": "381732876807761480", - "activity_name": "clanguml::t20006::BB::BB(AA *)", "participant_id": "2269742833301555472" }, "type": "message" @@ -325,9 +528,7 @@ void tmain() { "from": { "activity_id": "363965584448680958", - "activity_name": "clanguml::t20006::tmain()", - "participant_id": "363965584448680958", - "participant_name": "clanguml::t20006::tmain()" + "participant_id": "363965584448680958" }, "name": "BB(AA &)", "return_type": "void", @@ -340,7 +541,6 @@ void tmain() }, "to": { "activity_id": "1051013203072323842", - "activity_name": "clanguml::t20006::BB::BB(AA &)", "participant_id": "1743503037360505162" }, "type": "message" @@ -348,9 +548,7 @@ void tmain() { "from": { "activity_id": "363965584448680958", - "activity_name": "clanguml::t20006::tmain()", - "participant_id": "363965584448680958", - "participant_name": "clanguml::t20006::tmain()" + "participant_id": "363965584448680958" }, "name": "bb1(int,int)", "return_type": "void", @@ -363,7 +561,6 @@ void tmain() }, "to": { "activity_id": "1213865121829347654", - "activity_name": "clanguml::t20006::BB::bb1(int,int)", "participant_id": "264392653889863384" }, "type": "message" @@ -371,7 +568,6 @@ void tmain() { "from": { "activity_id": "1213865121829347654", - "activity_name": "clanguml::t20006::BB::bb1(int,int)", "participant_id": "264392653889863384" }, "name": "aa1(int)", @@ -385,7 +581,6 @@ void tmain() }, "to": { "activity_id": "1235428163990670191", - "activity_name": "clanguml::t20006::AA::aa1(int)", "participant_id": "1903567228894636312" }, "type": "message" @@ -393,9 +588,7 @@ void tmain() { "from": { "activity_id": "363965584448680958", - "activity_name": "clanguml::t20006::tmain()", - "participant_id": "363965584448680958", - "participant_name": "clanguml::t20006::tmain()" + "participant_id": "363965584448680958" }, "name": "bb2(int,int)", "return_type": "void", @@ -408,7 +601,6 @@ void tmain() }, "to": { "activity_id": "361650123916792854", - "activity_name": "clanguml::t20006::BB::bb2(int,int)", "participant_id": "264392653889863384" }, "type": "message" @@ -416,7 +608,6 @@ void tmain() { "from": { "activity_id": "361650123916792854", - "activity_name": "clanguml::t20006::BB::bb2(int,int)", "participant_id": "264392653889863384" }, "name": "aa2(int)", @@ -430,7 +621,6 @@ void tmain() }, "to": { "activity_id": "582097827335267290", - "activity_name": "clanguml::t20006::AA::aa2(int)", "participant_id": "1903567228894636312" }, "type": "message" @@ -438,9 +628,7 @@ void tmain() { "from": { "activity_id": "363965584448680958", - "activity_name": "clanguml::t20006::tmain()", - "participant_id": "363965584448680958", - "participant_name": "clanguml::t20006::tmain()" + "participant_id": "363965584448680958" }, "name": "bb1(int,std::string)", "return_type": "void", @@ -453,7 +641,6 @@ void tmain() }, "to": { "activity_id": "1062874005712014125", - "activity_name": "clanguml::t20006::BB::bb1(int,std::string)", "participant_id": "2269742833301555472" }, "type": "message" @@ -461,7 +648,6 @@ void tmain() { "from": { "activity_id": "1062874005712014125", - "activity_name": "clanguml::t20006::BB::bb1(int,std::string)", "participant_id": "2269742833301555472" }, "name": "aa2(int)", @@ -475,7 +661,6 @@ void tmain() }, "to": { "activity_id": "582097827335267290", - "activity_name": "clanguml::t20006::AA::aa2(int)", "participant_id": "1903567228894636312" }, "type": "message" @@ -483,9 +668,7 @@ void tmain() { "from": { "activity_id": "363965584448680958", - "activity_name": "clanguml::t20006::tmain()", - "participant_id": "363965584448680958", - "participant_name": "clanguml::t20006::tmain()" + "participant_id": "363965584448680958" }, "name": "bb2(int,std::string)", "return_type": "void", @@ -498,7 +681,6 @@ void tmain() }, "to": { "activity_id": "787705189994778234", - "activity_name": "clanguml::t20006::BB::bb2(int,std::string)", "participant_id": "2269742833301555472" }, "type": "message" @@ -506,7 +688,6 @@ void tmain() { "from": { "activity_id": "787705189994778234", - "activity_name": "clanguml::t20006::BB::bb2(int,std::string)", "participant_id": "2269742833301555472" }, "name": "aa1(int)", @@ -520,7 +701,6 @@ void tmain() }, "to": { "activity_id": "1235428163990670191", - "activity_name": "clanguml::t20006::AA::aa1(int)", "participant_id": "1903567228894636312" }, "type": "message" @@ -528,9 +708,7 @@ void tmain() { "from": { "activity_id": "363965584448680958", - "activity_name": "clanguml::t20006::tmain()", - "participant_id": "363965584448680958", - "participant_name": "clanguml::t20006::tmain()" + "participant_id": "363965584448680958" }, "name": "bb1(int,float)", "return_type": "void", @@ -543,7 +721,6 @@ void tmain() }, "to": { "activity_id": "1463188845572485713", - "activity_name": "clanguml::t20006::BB::bb1(int,float)", "participant_id": "1743503037360505162" }, "type": "message" @@ -551,7 +728,6 @@ void tmain() { "from": { "activity_id": "1463188845572485713", - "activity_name": "clanguml::t20006::BB::bb1(int,float)", "participant_id": "1743503037360505162" }, "name": "bb2(int,float)", @@ -565,7 +741,6 @@ void tmain() }, "to": { "activity_id": "732362671329401903", - "activity_name": "clanguml::t20006::BB::bb2(int,float)", "participant_id": "1743503037360505162" }, "type": "message" @@ -573,7 +748,6 @@ void tmain() { "from": { "activity_id": "732362671329401903", - "activity_name": "clanguml::t20006::BB::bb2(int,float)", "participant_id": "1743503037360505162" }, "name": "aa2(int)", @@ -587,7 +761,6 @@ void tmain() }, "to": { "activity_id": "582097827335267290", - "activity_name": "clanguml::t20006::AA::aa2(int)", "participant_id": "1903567228894636312" }, "type": "message" diff --git a/docs/test_cases/t20006_sequence.svg b/docs/test_cases/t20006_sequence.svg index a254564e..012ee3f4 100644 --- a/docs/test_cases/t20006_sequence.svg +++ b/docs/test_cases/t20006_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,24 +9,24 @@ - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + @@ -36,84 +36,84 @@ - - + + tmain() - + tmain() - - + + B<int> - + B<int> - - + + A<int> - + A<int> - - + + B<std::string> - + B<std::string> - - + + A<std::string> - + A<std::string> - - + + BB<int,std::string> - + BB<int,std::string> - - + + BB<int,float> - + BB<int,float> - - + + BB<int,int> - + BB<int,int> - - + + AA<int> - + AA<int> - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + b(int) - + a1(int) @@ -122,12 +122,12 @@ - + b(std::string) - + a2(std::string) @@ -136,69 +136,69 @@ - + BB(AA<int> *) - + BB(AA<int> &) - + bb1(int,int) - + aa1(int) - + bb2(int,int) - + aa2(int) - + bb1(int,std::string) - + aa2(int) - + bb2(int,std::string) - + aa1(int) - + bb1(int,float) - + bb2(int,float) - + aa2(int) diff --git a/docs/test_cases/t20007.md b/docs/test_cases/t20007.md index ed41be24..8b727497 100644 --- a/docs/test_cases/t20007.md +++ b/docs/test_cases/t20007.md @@ -14,7 +14,7 @@ diagrams: - function: "clanguml::t20007::tmain()" ``` ## Source code -File t20007.cc +File `tests/t20007/t20007.cc` ```cpp #include #include @@ -53,8 +53,10 @@ void tmain() "name": "t20007_sequence", "participants": [ { + "display_name": "tmain()", "id": "622662006747239840", - "name": "clanguml::t20007::tmain()", + "name": "tmain", + "namespace": "clanguml::t20007", "source_location": { "column": 6, "file": "t20007.cc", @@ -64,8 +66,25 @@ void tmain() "type": "function" }, { + "activities": [ + { + "display_name": "add(int &&,int &&)", + "id": "438133719207269065", + "name": "add", + "namespace": "", + "source_location": { + "column": 11, + "file": "t20007.cc", + "line": 8, + "translation_unit": "t20007.cc" + }, + "type": "method" + } + ], + "display_name": "Adder", "id": "1742497005509009302", - "name": "clanguml::t20007::Adder", + "name": "Adder", + "namespace": "clanguml::t20007", "source_location": { "column": 52, "file": "t20007.cc", @@ -75,8 +94,25 @@ void tmain() "type": "class" }, { + "activities": [ + { + "display_name": "add(int &&,float &&,double &&)", + "id": "9522724767688870", + "name": "add", + "namespace": "", + "source_location": { + "column": 11, + "file": "t20007.cc", + "line": 8, + "translation_unit": "t20007.cc" + }, + "type": "method" + } + ], + "display_name": "Adder", "id": "599640474306956868", - "name": "clanguml::t20007::Adder", + "name": "Adder", + "namespace": "clanguml::t20007", "source_location": { "column": 52, "file": "t20007.cc", @@ -86,8 +122,25 @@ void tmain() "type": "class" }, { + "activities": [ + { + "display_name": "add(std::string &&,std::string &&,std::string &&)", + "id": "384866641042941480", + "name": "add", + "namespace": "", + "source_location": { + "column": 11, + "file": "t20007.cc", + "line": 8, + "translation_unit": "t20007.cc" + }, + "type": "method" + } + ], + "display_name": "Adder", "id": "228191787514523926", - "name": "clanguml::t20007::Adder", + "name": "Adder", + "namespace": "clanguml::t20007", "source_location": { "column": 52, "file": "t20007.cc", @@ -103,9 +156,7 @@ void tmain() { "from": { "activity_id": "622662006747239840", - "activity_name": "clanguml::t20007::tmain()", - "participant_id": "622662006747239840", - "participant_name": "clanguml::t20007::tmain()" + "participant_id": "622662006747239840" }, "name": "add(int &&,int &&)", "return_type": "int", @@ -118,7 +169,6 @@ void tmain() }, "to": { "activity_id": "438133719207269065", - "activity_name": "clanguml::t20007::Adder::add(int &&,int &&)", "participant_id": "1742497005509009302" }, "type": "message" @@ -126,9 +176,7 @@ void tmain() { "from": { "activity_id": "622662006747239840", - "activity_name": "clanguml::t20007::tmain()", - "participant_id": "622662006747239840", - "participant_name": "clanguml::t20007::tmain()" + "participant_id": "622662006747239840" }, "name": "add(int &&,float &&,double &&)", "return_type": "int", @@ -141,7 +189,6 @@ void tmain() }, "to": { "activity_id": "9522724767688870", - "activity_name": "clanguml::t20007::Adder::add(int &&,float &&,double &&)", "participant_id": "599640474306956868" }, "type": "message" @@ -149,9 +196,7 @@ void tmain() { "from": { "activity_id": "622662006747239840", - "activity_name": "clanguml::t20007::tmain()", - "participant_id": "622662006747239840", - "participant_name": "clanguml::t20007::tmain()" + "participant_id": "622662006747239840" }, "name": "add(std::string &&,std::string &&,std::string &&)", "return_type": "std::basic_string", @@ -164,7 +209,6 @@ void tmain() }, "to": { "activity_id": "384866641042941480", - "activity_name": "clanguml::t20007::Adder::add(std::string &&,std::string &&,std::string &&)", "participant_id": "228191787514523926" }, "type": "message" diff --git a/docs/test_cases/t20007_sequence.svg b/docs/test_cases/t20007_sequence.svg index f26892f6..01ed1389 100644 --- a/docs/test_cases/t20007_sequence.svg +++ b/docs/test_cases/t20007_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,57 +9,57 @@ - - - - + + + + - - + + tmain() - + tmain() - - + + Adder<int,int> - + Adder<int,int> - - + + Adder<int,float,double> - + Adder<int,float,double> - - + + Adder<std::string,std::string,std::string> - + Adder<std::string,std::string,std::string> - - - - - + + + + + add(int &&,int &&) - + add(int &&,float &&,double &&) - + add(std::string &&,std::string &&,std::string &&) diff --git a/docs/test_cases/t20008.md b/docs/test_cases/t20008.md index df1d6091..7db49a43 100644 --- a/docs/test_cases/t20008.md +++ b/docs/test_cases/t20008.md @@ -14,7 +14,7 @@ diagrams: - function: "clanguml::t20008::tmain()" ``` ## Source code -File t20008.cc +File `tests/t20008/t20008.cc` ```cpp #include #include @@ -71,8 +71,10 @@ void tmain() "name": "t20008_sequence", "participants": [ { + "display_name": "tmain()", "id": "1180776240543224244", - "name": "clanguml::t20008::tmain()", + "name": "tmain", + "namespace": "clanguml::t20008", "source_location": { "column": 6, "file": "t20008.cc", @@ -82,8 +84,25 @@ void tmain() "type": "function" }, { + "activities": [ + { + "display_name": "b(int)", + "id": "379850145437051189", + "name": "b", + "namespace": "", + "source_location": { + "column": 10, + "file": "t20008.cc", + "line": 16, + "translation_unit": "t20008.cc" + }, + "type": "method" + } + ], + "display_name": "B", "id": "1906510289157013670", - "name": "clanguml::t20008::B", + "name": "B", + "namespace": "clanguml::t20008", "source_location": { "column": 30, "file": "t20008.cc", @@ -93,8 +112,25 @@ void tmain() "type": "class" }, { + "activities": [ + { + "display_name": "a1(int)", + "id": "2066363630174644719", + "name": "a1", + "namespace": "", + "source_location": { + "column": 10, + "file": "t20008.cc", + "line": 8, + "translation_unit": "t20008.cc" + }, + "type": "method" + } + ], + "display_name": "A", "id": "1376149084762923197", - "name": "clanguml::t20008::A", + "name": "A", + "namespace": "clanguml::t20008", "source_location": { "column": 30, "file": "t20008.cc", @@ -104,8 +140,25 @@ void tmain() "type": "class" }, { + "activities": [ + { + "display_name": "b(const char *)", + "id": "1347162523481637780", + "name": "b", + "namespace": "", + "source_location": { + "column": 10, + "file": "t20008.cc", + "line": 16, + "translation_unit": "t20008.cc" + }, + "type": "method" + } + ], + "display_name": "B", "id": "867098551202196741", - "name": "clanguml::t20008::B", + "name": "B", + "namespace": "clanguml::t20008", "source_location": { "column": 30, "file": "t20008.cc", @@ -115,8 +168,25 @@ void tmain() "type": "class" }, { + "activities": [ + { + "display_name": "a2(const char *)", + "id": "718650834962275580", + "name": "a2", + "namespace": "", + "source_location": { + "column": 10, + "file": "t20008.cc", + "line": 9, + "translation_unit": "t20008.cc" + }, + "type": "method" + } + ], + "display_name": "A", "id": "144833378017373200", - "name": "clanguml::t20008::A", + "name": "A", + "namespace": "clanguml::t20008", "source_location": { "column": 30, "file": "t20008.cc", @@ -126,8 +196,25 @@ void tmain() "type": "class" }, { + "activities": [ + { + "display_name": "b(std::string)", + "id": "1286410946666951254", + "name": "b", + "namespace": "", + "source_location": { + "column": 10, + "file": "t20008.cc", + "line": 16, + "translation_unit": "t20008.cc" + }, + "type": "method" + } + ], + "display_name": "B", "id": "927702553742507923", - "name": "clanguml::t20008::B", + "name": "B", + "namespace": "clanguml::t20008", "source_location": { "column": 30, "file": "t20008.cc", @@ -137,8 +224,25 @@ void tmain() "type": "class" }, { + "activities": [ + { + "display_name": "a3(std::string)", + "id": "1404594247101138737", + "name": "a3", + "namespace": "", + "source_location": { + "column": 10, + "file": "t20008.cc", + "line": 10, + "translation_unit": "t20008.cc" + }, + "type": "method" + } + ], + "display_name": "A", "id": "390605614583363778", - "name": "clanguml::t20008::A", + "name": "A", + "namespace": "clanguml::t20008", "source_location": { "column": 30, "file": "t20008.cc", @@ -154,9 +258,7 @@ void tmain() { "from": { "activity_id": "1180776240543224244", - "activity_name": "clanguml::t20008::tmain()", - "participant_id": "1180776240543224244", - "participant_name": "clanguml::t20008::tmain()" + "participant_id": "1180776240543224244" }, "name": "b(int)", "return_type": "void", @@ -169,7 +271,6 @@ void tmain() }, "to": { "activity_id": "379850145437051189", - "activity_name": "clanguml::t20008::B::b(int)", "participant_id": "1906510289157013670" }, "type": "message" @@ -177,7 +278,6 @@ void tmain() { "from": { "activity_id": "379850145437051189", - "activity_name": "clanguml::t20008::B::b(int)", "participant_id": "1906510289157013670" }, "name": "a1(int)", @@ -191,7 +291,6 @@ void tmain() }, "to": { "activity_id": "2066363630174644719", - "activity_name": "clanguml::t20008::A::a1(int)", "participant_id": "1376149084762923197" }, "type": "message" @@ -199,9 +298,7 @@ void tmain() { "from": { "activity_id": "1180776240543224244", - "activity_name": "clanguml::t20008::tmain()", - "participant_id": "1180776240543224244", - "participant_name": "clanguml::t20008::tmain()" + "participant_id": "1180776240543224244" }, "name": "b(const char *)", "return_type": "void", @@ -214,7 +311,6 @@ void tmain() }, "to": { "activity_id": "1347162523481637780", - "activity_name": "clanguml::t20008::B::b(const char *)", "participant_id": "867098551202196741" }, "type": "message" @@ -222,7 +318,6 @@ void tmain() { "from": { "activity_id": "1347162523481637780", - "activity_name": "clanguml::t20008::B::b(const char *)", "participant_id": "867098551202196741" }, "name": "a2(const char *)", @@ -236,7 +331,6 @@ void tmain() }, "to": { "activity_id": "718650834962275580", - "activity_name": "clanguml::t20008::A::a2(const char *)", "participant_id": "144833378017373200" }, "type": "message" @@ -244,9 +338,7 @@ void tmain() { "from": { "activity_id": "1180776240543224244", - "activity_name": "clanguml::t20008::tmain()", - "participant_id": "1180776240543224244", - "participant_name": "clanguml::t20008::tmain()" + "participant_id": "1180776240543224244" }, "name": "b(std::string)", "return_type": "void", @@ -259,7 +351,6 @@ void tmain() }, "to": { "activity_id": "1286410946666951254", - "activity_name": "clanguml::t20008::B::b(std::string)", "participant_id": "927702553742507923" }, "type": "message" @@ -267,7 +358,6 @@ void tmain() { "from": { "activity_id": "1286410946666951254", - "activity_name": "clanguml::t20008::B::b(std::string)", "participant_id": "927702553742507923" }, "name": "a3(std::string)", @@ -281,7 +371,6 @@ void tmain() }, "to": { "activity_id": "1404594247101138737", - "activity_name": "clanguml::t20008::A::a3(std::string)", "participant_id": "390605614583363778" }, "type": "message" diff --git a/docs/test_cases/t20008_sequence.svg b/docs/test_cases/t20008_sequence.svg index 811803db..1035c52b 100644 --- a/docs/test_cases/t20008_sequence.svg +++ b/docs/test_cases/t20008_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,13 +9,13 @@ - - - - - - - + + + + + + + @@ -23,81 +23,81 @@ - - + + tmain() - + tmain() - - + + B<int> - + B<int> - - + + A<int> - + A<int> - - + + B<const char *> - + B<const char *> - - + + A<const char *> - + A<const char *> - - + + B<std::string> - + B<std::string> - - + + A<std::string> - + A<std::string> - - - - - - - - + + + + + + + + b(int) - + a1(int) - + b(const char *) - + a2(const char *) - + b(std::string) - + a3(std::string) diff --git a/docs/test_cases/t20009.md b/docs/test_cases/t20009.md index 20fb2e98..4df3f8d4 100644 --- a/docs/test_cases/t20009.md +++ b/docs/test_cases/t20009.md @@ -14,7 +14,7 @@ diagrams: - function: "clanguml::t20009::tmain()" ``` ## Source code -File t20009.cc +File `tests/t20009/t20009.cc` ```cpp #include #include @@ -57,8 +57,10 @@ void tmain() "name": "t20009_sequence", "participants": [ { + "display_name": "tmain()", "id": "791066686606379857", - "name": "clanguml::t20009::tmain()", + "name": "tmain", + "namespace": "clanguml::t20009", "source_location": { "column": 6, "file": "t20009.cc", @@ -68,8 +70,25 @@ void tmain() "type": "function" }, { + "activities": [ + { + "display_name": "b(std::string)", + "id": "1960266381909090879", + "name": "b", + "namespace": "", + "source_location": { + "column": 10, + "file": "t20009.cc", + "line": 11, + "translation_unit": "t20009.cc" + }, + "type": "method" + } + ], + "display_name": "B", "id": "450813573860627679", - "name": "clanguml::t20009::B", + "name": "B", + "namespace": "clanguml::t20009", "source_location": { "column": 30, "file": "t20009.cc", @@ -79,8 +98,25 @@ void tmain() "type": "class" }, { + "activities": [ + { + "display_name": "a(std::string)", + "id": "1716775846967761286", + "name": "a", + "namespace": "", + "source_location": { + "column": 10, + "file": "t20009.cc", + "line": 7, + "translation_unit": "t20009.cc" + }, + "type": "method" + } + ], + "display_name": "A", "id": "1197403810800583218", - "name": "clanguml::t20009::A", + "name": "A", + "namespace": "clanguml::t20009", "source_location": { "column": 30, "file": "t20009.cc", @@ -90,8 +126,25 @@ void tmain() "type": "class" }, { + "activities": [ + { + "display_name": "b(int)", + "id": "660557928399203634", + "name": "b", + "namespace": "", + "source_location": { + "column": 10, + "file": "t20009.cc", + "line": 11, + "translation_unit": "t20009.cc" + }, + "type": "method" + } + ], + "display_name": "B", "id": "2002310682025149090", - "name": "clanguml::t20009::B", + "name": "B", + "namespace": "clanguml::t20009", "source_location": { "column": 30, "file": "t20009.cc", @@ -101,8 +154,25 @@ void tmain() "type": "class" }, { + "activities": [ + { + "display_name": "a(int)", + "id": "2030629454810805092", + "name": "a", + "namespace": "", + "source_location": { + "column": 10, + "file": "t20009.cc", + "line": 7, + "translation_unit": "t20009.cc" + }, + "type": "method" + } + ], + "display_name": "A", "id": "1228498754558363121", - "name": "clanguml::t20009::A", + "name": "A", + "namespace": "clanguml::t20009", "source_location": { "column": 30, "file": "t20009.cc", @@ -112,8 +182,25 @@ void tmain() "type": "class" }, { + "activities": [ + { + "display_name": "b(float)", + "id": "367805163135583282", + "name": "b", + "namespace": "", + "source_location": { + "column": 10, + "file": "t20009.cc", + "line": 11, + "translation_unit": "t20009.cc" + }, + "type": "method" + } + ], + "display_name": "B", "id": "1461902328659683203", - "name": "clanguml::t20009::B", + "name": "B", + "namespace": "clanguml::t20009", "source_location": { "column": 30, "file": "t20009.cc", @@ -123,8 +210,25 @@ void tmain() "type": "class" }, { + "activities": [ + { + "display_name": "a(float)", + "id": "1643733911490581293", + "name": "a", + "namespace": "", + "source_location": { + "column": 10, + "file": "t20009.cc", + "line": 7, + "translation_unit": "t20009.cc" + }, + "type": "method" + } + ], + "display_name": "A", "id": "1243520246309441967", - "name": "clanguml::t20009::A", + "name": "A", + "namespace": "clanguml::t20009", "source_location": { "column": 30, "file": "t20009.cc", @@ -140,9 +244,7 @@ void tmain() { "from": { "activity_id": "791066686606379857", - "activity_name": "clanguml::t20009::tmain()", - "participant_id": "791066686606379857", - "participant_name": "clanguml::t20009::tmain()" + "participant_id": "791066686606379857" }, "name": "b(std::string)", "return_type": "void", @@ -155,7 +257,6 @@ void tmain() }, "to": { "activity_id": "1960266381909090879", - "activity_name": "clanguml::t20009::B::b(std::string)", "participant_id": "450813573860627679" }, "type": "message" @@ -163,7 +264,6 @@ void tmain() { "from": { "activity_id": "1960266381909090879", - "activity_name": "clanguml::t20009::B::b(std::string)", "participant_id": "450813573860627679" }, "name": "a(std::string)", @@ -177,7 +277,6 @@ void tmain() }, "to": { "activity_id": "1716775846967761286", - "activity_name": "clanguml::t20009::A::a(std::string)", "participant_id": "1197403810800583218" }, "type": "message" @@ -185,9 +284,7 @@ void tmain() { "from": { "activity_id": "791066686606379857", - "activity_name": "clanguml::t20009::tmain()", - "participant_id": "791066686606379857", - "participant_name": "clanguml::t20009::tmain()" + "participant_id": "791066686606379857" }, "name": "b(int)", "return_type": "void", @@ -200,7 +297,6 @@ void tmain() }, "to": { "activity_id": "660557928399203634", - "activity_name": "clanguml::t20009::B::b(int)", "participant_id": "2002310682025149090" }, "type": "message" @@ -208,7 +304,6 @@ void tmain() { "from": { "activity_id": "660557928399203634", - "activity_name": "clanguml::t20009::B::b(int)", "participant_id": "2002310682025149090" }, "name": "a(int)", @@ -222,7 +317,6 @@ void tmain() }, "to": { "activity_id": "2030629454810805092", - "activity_name": "clanguml::t20009::A::a(int)", "participant_id": "1228498754558363121" }, "type": "message" @@ -230,9 +324,7 @@ void tmain() { "from": { "activity_id": "791066686606379857", - "activity_name": "clanguml::t20009::tmain()", - "participant_id": "791066686606379857", - "participant_name": "clanguml::t20009::tmain()" + "participant_id": "791066686606379857" }, "name": "b(float)", "return_type": "void", @@ -245,7 +337,6 @@ void tmain() }, "to": { "activity_id": "367805163135583282", - "activity_name": "clanguml::t20009::B::b(float)", "participant_id": "1461902328659683203" }, "type": "message" @@ -253,7 +344,6 @@ void tmain() { "from": { "activity_id": "367805163135583282", - "activity_name": "clanguml::t20009::B::b(float)", "participant_id": "1461902328659683203" }, "name": "a(float)", @@ -267,7 +357,6 @@ void tmain() }, "to": { "activity_id": "1643733911490581293", - "activity_name": "clanguml::t20009::A::a(float)", "participant_id": "1243520246309441967" }, "type": "message" diff --git a/docs/test_cases/t20009_sequence.svg b/docs/test_cases/t20009_sequence.svg index b9342bc3..63f63801 100644 --- a/docs/test_cases/t20009_sequence.svg +++ b/docs/test_cases/t20009_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,13 +9,13 @@ - - - - - - - + + + + + + + @@ -23,81 +23,81 @@ - - + + tmain() - + tmain() - - + + B<std::string> - + B<std::string> - - + + A<std::string> - + A<std::string> - - + + B<int> - + B<int> - - + + A<int> - + A<int> - - + + B<float> - + B<float> - - + + A<float> - + A<float> - - - - - - - - + + + + + + + + b(std::string) - + a(std::string) - + b(int) - + a(int) - + b(float) - + a(float) diff --git a/docs/test_cases/t20010.md b/docs/test_cases/t20010.md index da541ed7..56336dc4 100644 --- a/docs/test_cases/t20010.md +++ b/docs/test_cases/t20010.md @@ -14,7 +14,7 @@ diagrams: - function: "clanguml::t20010::tmain()" ``` ## Source code -File t20010.cc +File `tests/t20010/t20010.cc` ```cpp #include #include @@ -67,8 +67,10 @@ void tmain() "name": "t20010_sequence", "participants": [ { + "display_name": "tmain()", "id": "1364660609791735244", - "name": "clanguml::t20010::tmain()", + "name": "tmain", + "namespace": "clanguml::t20010", "source_location": { "column": 6, "file": "t20010.cc", @@ -78,8 +80,64 @@ void tmain() "type": "function" }, { + "activities": [ + { + "display_name": "b1()", + "id": "343626060927491836", + "name": "b1", + "namespace": "", + "source_location": { + "column": 10, + "file": "t20010.cc", + "line": 17, + "translation_unit": "t20010.cc" + }, + "type": "method" + }, + { + "display_name": "b2()", + "id": "1633031113603062043", + "name": "b2", + "namespace": "", + "source_location": { + "column": 10, + "file": "t20010.cc", + "line": 18, + "translation_unit": "t20010.cc" + }, + "type": "method" + }, + { + "display_name": "b3()", + "id": "786218543654309692", + "name": "b3", + "namespace": "", + "source_location": { + "column": 10, + "file": "t20010.cc", + "line": 19, + "translation_unit": "t20010.cc" + }, + "type": "method" + }, + { + "display_name": "b4()", + "id": "1866068965397702666", + "name": "b4", + "namespace": "", + "source_location": { + "column": 10, + "file": "t20010.cc", + "line": 20, + "translation_unit": "t20010.cc" + }, + "type": "method" + } + ], + "display_name": "B", "id": "2154977200904210115", - "name": "clanguml::t20010::B", + "name": "B", + "namespace": "clanguml::t20010", "source_location": { "column": 30, "file": "t20010.cc", @@ -89,8 +147,64 @@ void tmain() "type": "class" }, { + "activities": [ + { + "display_name": "a1()", + "id": "981184681827469850", + "name": "a1", + "namespace": "", + "source_location": { + "column": 10, + "file": "t20010.cc", + "line": 10, + "translation_unit": "t20010.cc" + }, + "type": "method" + }, + { + "display_name": "a2()", + "id": "664370880632146592", + "name": "a2", + "namespace": "", + "source_location": { + "column": 10, + "file": "t20010.cc", + "line": 11, + "translation_unit": "t20010.cc" + }, + "type": "method" + }, + { + "display_name": "a3()", + "id": "2145739294823015899", + "name": "a3", + "namespace": "", + "source_location": { + "column": 10, + "file": "t20010.cc", + "line": 12, + "translation_unit": "t20010.cc" + }, + "type": "method" + }, + { + "display_name": "a4()", + "id": "1224936485834400821", + "name": "a4", + "namespace": "", + "source_location": { + "column": 10, + "file": "t20010.cc", + "line": 13, + "translation_unit": "t20010.cc" + }, + "type": "method" + } + ], + "display_name": "A", "id": "102070351492425113", - "name": "clanguml::t20010::A", + "name": "A", + "namespace": "clanguml::t20010", "source_location": { "column": 8, "file": "t20010.cc", @@ -106,9 +220,7 @@ void tmain() { "from": { "activity_id": "1364660609791735244", - "activity_name": "clanguml::t20010::tmain()", - "participant_id": "1364660609791735244", - "participant_name": "clanguml::t20010::tmain()" + "participant_id": "1364660609791735244" }, "name": "b1()", "return_type": "void", @@ -121,7 +233,6 @@ void tmain() }, "to": { "activity_id": "343626060927491836", - "activity_name": "clanguml::t20010::B::b1()", "participant_id": "2154977200904210115" }, "type": "message" @@ -129,7 +240,6 @@ void tmain() { "from": { "activity_id": "343626060927491836", - "activity_name": "clanguml::t20010::B::b1()", "participant_id": "2154977200904210115" }, "name": "a1()", @@ -143,7 +253,6 @@ void tmain() }, "to": { "activity_id": "981184681827469850", - "activity_name": "clanguml::t20010::A::a1()", "participant_id": "102070351492425113" }, "type": "message" @@ -151,9 +260,7 @@ void tmain() { "from": { "activity_id": "1364660609791735244", - "activity_name": "clanguml::t20010::tmain()", - "participant_id": "1364660609791735244", - "participant_name": "clanguml::t20010::tmain()" + "participant_id": "1364660609791735244" }, "name": "b2()", "return_type": "void", @@ -166,7 +273,6 @@ void tmain() }, "to": { "activity_id": "1633031113603062043", - "activity_name": "clanguml::t20010::B::b2()", "participant_id": "2154977200904210115" }, "type": "message" @@ -174,7 +280,6 @@ void tmain() { "from": { "activity_id": "1633031113603062043", - "activity_name": "clanguml::t20010::B::b2()", "participant_id": "2154977200904210115" }, "name": "a2()", @@ -188,7 +293,6 @@ void tmain() }, "to": { "activity_id": "664370880632146592", - "activity_name": "clanguml::t20010::A::a2()", "participant_id": "102070351492425113" }, "type": "message" @@ -196,9 +300,7 @@ void tmain() { "from": { "activity_id": "1364660609791735244", - "activity_name": "clanguml::t20010::tmain()", - "participant_id": "1364660609791735244", - "participant_name": "clanguml::t20010::tmain()" + "participant_id": "1364660609791735244" }, "name": "b3()", "return_type": "void", @@ -211,7 +313,6 @@ void tmain() }, "to": { "activity_id": "786218543654309692", - "activity_name": "clanguml::t20010::B::b3()", "participant_id": "2154977200904210115" }, "type": "message" @@ -219,7 +320,6 @@ void tmain() { "from": { "activity_id": "786218543654309692", - "activity_name": "clanguml::t20010::B::b3()", "participant_id": "2154977200904210115" }, "name": "a3()", @@ -233,7 +333,6 @@ void tmain() }, "to": { "activity_id": "2145739294823015899", - "activity_name": "clanguml::t20010::A::a3()", "participant_id": "102070351492425113" }, "type": "message" @@ -241,9 +340,7 @@ void tmain() { "from": { "activity_id": "1364660609791735244", - "activity_name": "clanguml::t20010::tmain()", - "participant_id": "1364660609791735244", - "participant_name": "clanguml::t20010::tmain()" + "participant_id": "1364660609791735244" }, "name": "b4()", "return_type": "void", @@ -256,7 +353,6 @@ void tmain() }, "to": { "activity_id": "1866068965397702666", - "activity_name": "clanguml::t20010::B::b4()", "participant_id": "2154977200904210115" }, "type": "message" @@ -264,7 +360,6 @@ void tmain() { "from": { "activity_id": "1866068965397702666", - "activity_name": "clanguml::t20010::B::b4()", "participant_id": "2154977200904210115" }, "name": "a4()", @@ -278,7 +373,6 @@ void tmain() }, "to": { "activity_id": "1224936485834400821", - "activity_name": "clanguml::t20010::A::a4()", "participant_id": "102070351492425113" }, "type": "message" diff --git a/docs/test_cases/t20010_sequence.svg b/docs/test_cases/t20010_sequence.svg index 97d689c4..3978e5c1 100644 --- a/docs/test_cases/t20010_sequence.svg +++ b/docs/test_cases/t20010_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,81 +9,81 @@ - - - - - - - - - + + + + + + + + + - - + + tmain() - + tmain() - - + + B<int> - + B<int> - - + + A - + A - - - - - - - - - - + + + + + + + + + + b1() - + a1() - + b2() - + a2() - + b3() - + a3() - + b4() - + a4() diff --git a/docs/test_cases/t20011.md b/docs/test_cases/t20011.md index 90513c32..9fa3443a 100644 --- a/docs/test_cases/t20011.md +++ b/docs/test_cases/t20011.md @@ -14,7 +14,7 @@ diagrams: - function: "clanguml::t20011::tmain()" ``` ## Source code -File t20011.cc +File `tests/t20011/t20011.cc` ```cpp namespace clanguml { namespace t20011 { @@ -59,8 +59,10 @@ void tmain() "name": "t20011_sequence", "participants": [ { + "display_name": "tmain()", "id": "1866210527166391126", - "name": "clanguml::t20011::tmain()", + "name": "tmain", + "namespace": "clanguml::t20011", "source_location": { "column": 6, "file": "t20011.cc", @@ -70,8 +72,64 @@ void tmain() "type": "function" }, { + "activities": [ + { + "display_name": "a(int)", + "id": "1647578261840204206", + "name": "a", + "namespace": "", + "source_location": { + "column": 10, + "file": "t20011.cc", + "line": 5, + "translation_unit": "t20011.cc" + }, + "type": "method" + }, + { + "display_name": "b(int)", + "id": "305456175818875420", + "name": "b", + "namespace": "", + "source_location": { + "column": 10, + "file": "t20011.cc", + "line": 11, + "translation_unit": "t20011.cc" + }, + "type": "method" + }, + { + "display_name": "c(int)", + "id": "963268672079901211", + "name": "c", + "namespace": "", + "source_location": { + "column": 10, + "file": "t20011.cc", + "line": 12, + "translation_unit": "t20011.cc" + }, + "type": "method" + }, + { + "display_name": "d(int)", + "id": "1874311762268001137", + "name": "d", + "namespace": "", + "source_location": { + "column": 10, + "file": "t20011.cc", + "line": 13, + "translation_unit": "t20011.cc" + }, + "type": "method" + } + ], + "display_name": "A", "id": "816061502062128285", - "name": "clanguml::t20011::A", + "name": "A", + "namespace": "clanguml::t20011", "source_location": { "column": 8, "file": "t20011.cc", @@ -87,9 +145,7 @@ void tmain() { "from": { "activity_id": "1866210527166391126", - "activity_name": "clanguml::t20011::tmain()", - "participant_id": "1866210527166391126", - "participant_name": "clanguml::t20011::tmain()" + "participant_id": "1866210527166391126" }, "name": "a(int)", "return_type": "void", @@ -102,7 +158,6 @@ void tmain() }, "to": { "activity_id": "1647578261840204206", - "activity_name": "clanguml::t20011::A::a(int)", "participant_id": "816061502062128285" }, "type": "message" @@ -115,7 +170,6 @@ void tmain() { "from": { "activity_id": "1647578261840204206", - "activity_name": "clanguml::t20011::A::a(int)", "participant_id": "816061502062128285" }, "name": "a(int)", @@ -129,7 +183,6 @@ void tmain() }, "to": { "activity_id": "1647578261840204206", - "activity_name": "clanguml::t20011::A::a(int)", "participant_id": "816061502062128285" }, "type": "message" @@ -144,9 +197,7 @@ void tmain() { "from": { "activity_id": "1866210527166391126", - "activity_name": "clanguml::t20011::tmain()", - "participant_id": "1866210527166391126", - "participant_name": "clanguml::t20011::tmain()" + "participant_id": "1866210527166391126" }, "name": "b(int)", "return_type": "void", @@ -159,7 +210,6 @@ void tmain() }, "to": { "activity_id": "305456175818875420", - "activity_name": "clanguml::t20011::A::b(int)", "participant_id": "816061502062128285" }, "type": "message" @@ -167,7 +217,6 @@ void tmain() { "from": { "activity_id": "305456175818875420", - "activity_name": "clanguml::t20011::A::b(int)", "participant_id": "816061502062128285" }, "name": "c(int)", @@ -181,7 +230,6 @@ void tmain() }, "to": { "activity_id": "963268672079901211", - "activity_name": "clanguml::t20011::A::c(int)", "participant_id": "816061502062128285" }, "type": "message" @@ -189,7 +237,6 @@ void tmain() { "from": { "activity_id": "963268672079901211", - "activity_name": "clanguml::t20011::A::c(int)", "participant_id": "816061502062128285" }, "name": "d(int)", @@ -203,7 +250,6 @@ void tmain() }, "to": { "activity_id": "1874311762268001137", - "activity_name": "clanguml::t20011::A::d(int)", "participant_id": "816061502062128285" }, "type": "message" @@ -216,7 +262,6 @@ void tmain() { "from": { "activity_id": "1874311762268001137", - "activity_name": "clanguml::t20011::A::d(int)", "participant_id": "816061502062128285" }, "name": "b(int)", @@ -230,7 +275,6 @@ void tmain() }, "to": { "activity_id": "305456175818875420", - "activity_name": "clanguml::t20011::A::b(int)", "participant_id": "816061502062128285" }, "type": "message" @@ -238,7 +282,6 @@ void tmain() { "from": { "activity_id": "1874311762268001137", - "activity_name": "clanguml::t20011::A::d(int)", "participant_id": "816061502062128285" }, "name": "a(int)", @@ -252,7 +295,6 @@ void tmain() }, "to": { "activity_id": "1647578261840204206", - "activity_name": "clanguml::t20011::A::a(int)", "participant_id": "816061502062128285" }, "type": "message" diff --git a/docs/test_cases/t20011_sequence.svg b/docs/test_cases/t20011_sequence.svg index b6d82166..f349baef 100644 --- a/docs/test_cases/t20011_sequence.svg +++ b/docs/test_cases/t20011_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,42 +9,42 @@ - - - - - - - - - - - - + + + + + + + + + + + + - - + + tmain() - + tmain() - - + + A - + A - - - - - - - - - - + + + + + + + + + + a(int) @@ -52,26 +52,26 @@ alt - + a(int) - + b(int) - + c(int) - + @@ -81,14 +81,14 @@ alt - + b(int) - + @@ -98,7 +98,7 @@ alt - + diff --git a/docs/test_cases/t20012.md b/docs/test_cases/t20012.md index 79ca70fc..811072f9 100644 --- a/docs/test_cases/t20012.md +++ b/docs/test_cases/t20012.md @@ -14,7 +14,7 @@ diagrams: - function: "clanguml::t20012::tmain()" ``` ## Source code -File t20012.cc +File `tests/t20012/t20012.cc` ```cpp #include #include @@ -134,8 +134,10 @@ void tmain() "name": "t20012_sequence", "participants": [ { + "display_name": "tmain()", "id": "893699278278125827", - "name": "clanguml::t20012::tmain()", + "name": "tmain", + "namespace": "clanguml::t20012", "source_location": { "column": 6, "file": "t20012.cc", @@ -145,19 +147,73 @@ void tmain() "type": "function" }, { + "activities": [ + { + "display_name": "operator()()", + "id": "1314931307342523651", + "name": "operator()", + "namespace": "", + "type": "method" + } + ], + "display_name": "tmain()::(lambda t20012.cc:67:20)", "id": "1823127147500894672", - "name": "clanguml::t20012::tmain()::(lambda t20012.cc:67:20)", + "name": "tmain()::(lambda t20012.cc:67:20)", + "namespace": "clanguml::t20012", "source_location": { "column": 20, "file": "t20012.cc", "line": 67, "translation_unit": "t20012.cc" }, - "type": "class" + "type": "lambda" }, { + "activities": [ + { + "display_name": "a()", + "id": "1871432932744498976", + "name": "a", + "namespace": "", + "source_location": { + "column": 10, + "file": "t20012.cc", + "line": 11, + "translation_unit": "t20012.cc" + }, + "type": "method" + }, + { + "display_name": "aa()", + "id": "1100933039353876539", + "name": "aa", + "namespace": "", + "source_location": { + "column": 10, + "file": "t20012.cc", + "line": 13, + "translation_unit": "t20012.cc" + }, + "type": "method" + }, + { + "display_name": "aaa()", + "id": "941636185823691898", + "name": "aaa", + "namespace": "", + "source_location": { + "column": 10, + "file": "t20012.cc", + "line": 15, + "translation_unit": "t20012.cc" + }, + "type": "method" + } + ], + "display_name": "A", "id": "1798184226128732119", - "name": "clanguml::t20012::A", + "name": "A", + "namespace": "clanguml::t20012", "source_location": { "column": 8, "file": "t20012.cc", @@ -167,8 +223,51 @@ void tmain() "type": "class" }, { + "activities": [ + { + "display_name": "b()", + "id": "2142697410385270633", + "name": "b", + "namespace": "", + "source_location": { + "column": 10, + "file": "t20012.cc", + "line": 19, + "translation_unit": "t20012.cc" + }, + "type": "method" + }, + { + "display_name": "bb()", + "id": "973718340784931313", + "name": "bb", + "namespace": "", + "source_location": { + "column": 10, + "file": "t20012.cc", + "line": 21, + "translation_unit": "t20012.cc" + }, + "type": "method" + }, + { + "display_name": "bbb()", + "id": "195788529004378403", + "name": "bbb", + "namespace": "", + "source_location": { + "column": 10, + "file": "t20012.cc", + "line": 23, + "translation_unit": "t20012.cc" + }, + "type": "method" + } + ], + "display_name": "B", "id": "1893469899260202653", - "name": "clanguml::t20012::B", + "name": "B", + "namespace": "clanguml::t20012", "source_location": { "column": 8, "file": "t20012.cc", @@ -178,19 +277,73 @@ void tmain() "type": "class" }, { + "activities": [ + { + "display_name": "operator()()", + "id": "1464047298179756286", + "name": "operator()", + "namespace": "", + "type": "method" + } + ], + "display_name": "tmain()::(lambda t20012.cc:80:20)", "id": "2103332104162021186", - "name": "clanguml::t20012::tmain()::(lambda t20012.cc:80:20)", + "name": "tmain()::(lambda t20012.cc:80:20)", + "namespace": "clanguml::t20012", "source_location": { "column": 20, "file": "t20012.cc", "line": 80, "translation_unit": "t20012.cc" }, - "type": "class" + "type": "lambda" }, { + "activities": [ + { + "display_name": "c()", + "id": "675369415318225607", + "name": "c", + "namespace": "", + "source_location": { + "column": 10, + "file": "t20012.cc", + "line": 29, + "translation_unit": "t20012.cc" + }, + "type": "method" + }, + { + "display_name": "cc()", + "id": "1451821704315336057", + "name": "cc", + "namespace": "", + "source_location": { + "column": 10, + "file": "t20012.cc", + "line": 31, + "translation_unit": "t20012.cc" + }, + "type": "method" + }, + { + "display_name": "ccc()", + "id": "1956141408799600460", + "name": "ccc", + "namespace": "", + "source_location": { + "column": 10, + "file": "t20012.cc", + "line": 33, + "translation_unit": "t20012.cc" + }, + "type": "method" + } + ], + "display_name": "C", "id": "2071958121786360262", - "name": "clanguml::t20012::C", + "name": "C", + "namespace": "clanguml::t20012", "source_location": { "column": 8, "file": "t20012.cc", @@ -200,8 +353,38 @@ void tmain() "type": "class" }, { + "activities": [ + { + "display_name": "R((lambda at /home/bartek/devel/clang-uml/tests/t20012/t20012.cc:86:9) &&)", + "id": "1225911104877544354", + "name": "R", + "namespace": "", + "source_location": { + "column": 5, + "file": "t20012.cc", + "line": 49, + "translation_unit": "t20012.cc" + }, + "type": "method" + }, + { + "display_name": "r()", + "id": "984475898639439059", + "name": "r", + "namespace": "", + "source_location": { + "column": 10, + "file": "t20012.cc", + "line": 54, + "translation_unit": "t20012.cc" + }, + "type": "method" + } + ], + "display_name": "R", "id": "943938410171869397", - "name": "clanguml::t20012::R", + "name": "R", + "namespace": "clanguml::t20012", "source_location": { "column": 30, "file": "t20012.cc", @@ -211,15 +394,26 @@ void tmain() "type": "class" }, { + "activities": [ + { + "display_name": "operator()()", + "id": "1801444422355429914", + "name": "operator()", + "namespace": "", + "type": "method" + } + ], + "display_name": "tmain()::(lambda t20012.cc:86:9)", "id": "1523229682883773614", - "name": "clanguml::t20012::tmain()::(lambda t20012.cc:86:9)", + "name": "tmain()::(lambda t20012.cc:86:9)", + "namespace": "clanguml::t20012", "source_location": { "column": 9, "file": "t20012.cc", "line": 86, "translation_unit": "t20012.cc" }, - "type": "class" + "type": "lambda" } ], "sequences": [ @@ -228,9 +422,7 @@ void tmain() { "from": { "activity_id": "893699278278125827", - "activity_name": "clanguml::t20012::tmain()", - "participant_id": "893699278278125827", - "participant_name": "clanguml::t20012::tmain()" + "participant_id": "893699278278125827" }, "name": "operator()()", "return_type": "", @@ -243,7 +435,6 @@ void tmain() }, "to": { "activity_id": "1314931307342523651", - "activity_name": "clanguml::t20012::tmain()##(lambda t20012.cc:67:20)::operator()()", "participant_id": "1823127147500894672" }, "type": "message" @@ -251,7 +442,6 @@ void tmain() { "from": { "activity_id": "1314931307342523651", - "activity_name": "clanguml::t20012::tmain()::(lambda t20012.cc:67:20)::operator()()", "participant_id": "1823127147500894672" }, "name": "a()", @@ -265,7 +455,6 @@ void tmain() }, "to": { "activity_id": "1871432932744498976", - "activity_name": "clanguml::t20012::A::a()", "participant_id": "1798184226128732119" }, "type": "message" @@ -273,7 +462,6 @@ void tmain() { "from": { "activity_id": "1871432932744498976", - "activity_name": "clanguml::t20012::A::a()", "participant_id": "1798184226128732119" }, "name": "aa()", @@ -287,7 +475,6 @@ void tmain() }, "to": { "activity_id": "1100933039353876539", - "activity_name": "clanguml::t20012::A::aa()", "participant_id": "1798184226128732119" }, "type": "message" @@ -295,7 +482,6 @@ void tmain() { "from": { "activity_id": "1100933039353876539", - "activity_name": "clanguml::t20012::A::aa()", "participant_id": "1798184226128732119" }, "name": "aaa()", @@ -309,7 +495,6 @@ void tmain() }, "to": { "activity_id": "941636185823691898", - "activity_name": "clanguml::t20012::A::aaa()", "participant_id": "1798184226128732119" }, "type": "message" @@ -317,7 +502,6 @@ void tmain() { "from": { "activity_id": "1314931307342523651", - "activity_name": "clanguml::t20012::tmain()::(lambda t20012.cc:67:20)::operator()()", "participant_id": "1823127147500894672" }, "name": "b()", @@ -331,7 +515,6 @@ void tmain() }, "to": { "activity_id": "2142697410385270633", - "activity_name": "clanguml::t20012::B::b()", "participant_id": "1893469899260202653" }, "type": "message" @@ -339,7 +522,6 @@ void tmain() { "from": { "activity_id": "2142697410385270633", - "activity_name": "clanguml::t20012::B::b()", "participant_id": "1893469899260202653" }, "name": "bb()", @@ -353,7 +535,6 @@ void tmain() }, "to": { "activity_id": "973718340784931313", - "activity_name": "clanguml::t20012::B::bb()", "participant_id": "1893469899260202653" }, "type": "message" @@ -361,7 +542,6 @@ void tmain() { "from": { "activity_id": "973718340784931313", - "activity_name": "clanguml::t20012::B::bb()", "participant_id": "1893469899260202653" }, "name": "bbb()", @@ -375,7 +555,6 @@ void tmain() }, "to": { "activity_id": "195788529004378403", - "activity_name": "clanguml::t20012::B::bbb()", "participant_id": "1893469899260202653" }, "type": "message" @@ -383,9 +562,7 @@ void tmain() { "from": { "activity_id": "893699278278125827", - "activity_name": "clanguml::t20012::tmain()", - "participant_id": "893699278278125827", - "participant_name": "clanguml::t20012::tmain()" + "participant_id": "893699278278125827" }, "name": "operator()()", "return_type": "", @@ -398,7 +575,6 @@ void tmain() }, "to": { "activity_id": "1464047298179756286", - "activity_name": "clanguml::t20012::tmain()##(lambda t20012.cc:80:20)::operator()()", "participant_id": "2103332104162021186" }, "type": "message" @@ -406,7 +582,6 @@ void tmain() { "from": { "activity_id": "1464047298179756286", - "activity_name": "clanguml::t20012::tmain()::(lambda t20012.cc:80:20)::operator()()", "participant_id": "2103332104162021186" }, "name": "c()", @@ -420,7 +595,6 @@ void tmain() }, "to": { "activity_id": "675369415318225607", - "activity_name": "clanguml::t20012::C::c()", "participant_id": "2071958121786360262" }, "type": "message" @@ -428,7 +602,6 @@ void tmain() { "from": { "activity_id": "675369415318225607", - "activity_name": "clanguml::t20012::C::c()", "participant_id": "2071958121786360262" }, "name": "cc()", @@ -442,7 +615,6 @@ void tmain() }, "to": { "activity_id": "1451821704315336057", - "activity_name": "clanguml::t20012::C::cc()", "participant_id": "2071958121786360262" }, "type": "message" @@ -450,7 +622,6 @@ void tmain() { "from": { "activity_id": "1451821704315336057", - "activity_name": "clanguml::t20012::C::cc()", "participant_id": "2071958121786360262" }, "name": "ccc()", @@ -464,7 +635,6 @@ void tmain() }, "to": { "activity_id": "1956141408799600460", - "activity_name": "clanguml::t20012::C::ccc()", "participant_id": "2071958121786360262" }, "type": "message" @@ -472,7 +642,6 @@ void tmain() { "from": { "activity_id": "1464047298179756286", - "activity_name": "clanguml::t20012::tmain()::(lambda t20012.cc:80:20)::operator()()", "participant_id": "2103332104162021186" }, "name": "operator()()", @@ -486,7 +655,6 @@ void tmain() }, "to": { "activity_id": "1314931307342523651", - "activity_name": "clanguml::t20012::tmain()##(lambda t20012.cc:67:20)::operator()()", "participant_id": "1823127147500894672" }, "type": "message" @@ -494,9 +662,7 @@ void tmain() { "from": { "activity_id": "893699278278125827", - "activity_name": "clanguml::t20012::tmain()", - "participant_id": "893699278278125827", - "participant_name": "clanguml::t20012::tmain()" + "participant_id": "893699278278125827" }, "name": "R((lambda at /home/bartek/devel/clang-uml/tests/t20012/t20012.cc:86:9) &&)", "return_type": "void", @@ -509,7 +675,6 @@ void tmain() }, "to": { "activity_id": "1225911104877544354", - "activity_name": "clanguml::t20012::R::R((lambda at /home/bartek/devel/clang-uml/tests/t20012/t20012.cc:86:9) &&)", "participant_id": "943938410171869397" }, "type": "message" @@ -517,9 +682,7 @@ void tmain() { "from": { "activity_id": "893699278278125827", - "activity_name": "clanguml::t20012::tmain()", - "participant_id": "893699278278125827", - "participant_name": "clanguml::t20012::tmain()" + "participant_id": "893699278278125827" }, "name": "r()", "return_type": "void", @@ -532,7 +695,6 @@ void tmain() }, "to": { "activity_id": "984475898639439059", - "activity_name": "clanguml::t20012::R::r()", "participant_id": "943938410171869397" }, "type": "message" @@ -540,7 +702,6 @@ void tmain() { "from": { "activity_id": "984475898639439059", - "activity_name": "clanguml::t20012::R::r()", "participant_id": "943938410171869397" }, "name": "operator()()", @@ -554,7 +715,6 @@ void tmain() }, "to": { "activity_id": "1801444422355429914", - "activity_name": "clanguml::t20012::tmain()##(lambda t20012.cc:86:9)::operator()()", "participant_id": "1523229682883773614" }, "type": "message" @@ -562,7 +722,6 @@ void tmain() { "from": { "activity_id": "1801444422355429914", - "activity_name": "clanguml::t20012::tmain()::(lambda t20012.cc:86:9)::operator()()", "participant_id": "1523229682883773614" }, "name": "c()", @@ -576,7 +735,6 @@ void tmain() }, "to": { "activity_id": "675369415318225607", - "activity_name": "clanguml::t20012::C::c()", "participant_id": "2071958121786360262" }, "type": "message" diff --git a/docs/test_cases/t20012_sequence.svg b/docs/test_cases/t20012_sequence.svg index 96fbed23..c046a262 100644 --- a/docs/test_cases/t20012_sequence.svg +++ b/docs/test_cases/t20012_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,31 +9,31 @@ - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + @@ -42,116 +42,116 @@ - - + + tmain() - + tmain() - - + + tmain()::(lambda t20012.cc:67:20) - + tmain()::(lambda t20012.cc:67:20) - - + + A - + A - - + + B - + B - - + + tmain()::(lambda t20012.cc:80:20) - + tmain()::(lambda t20012.cc:80:20) - - + + C - + C - - + + R<R::(lambda t20012.cc:86:9)> - + R<R::(lambda t20012.cc:86:9)> - - + + tmain()::(lambda t20012.cc:86:9) - + tmain()::(lambda t20012.cc:86:9) - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + operator()() - + a() - + aa() - + aaa() - + b() - + bb() - + @@ -160,67 +160,67 @@ - + operator()() - + c() - + cc() - + ccc() - + operator()() - + a() - + aa() - + aaa() - + b() - + bb() - + @@ -231,34 +231,34 @@ - + R((lambda at /home/bartek/devel/clang-uml/tests/t20012/t20012.cc:86:9) &&) - + r() - + operator()() - + c() - + cc() - + diff --git a/docs/test_cases/t20013.md b/docs/test_cases/t20013.md index b7832457..98eef980 100644 --- a/docs/test_cases/t20013.md +++ b/docs/test_cases/t20013.md @@ -14,7 +14,7 @@ diagrams: - function: "clanguml::t20013::tmain(int,char **)" ``` ## Source code -File t20013.cc +File `tests/t20013/t20013.cc` ```cpp namespace clanguml { namespace t20013 { @@ -55,8 +55,10 @@ void tmain(int argc, char **argv) "name": "t20013_sequence", "participants": [ { + "display_name": "tmain(int,char **)", "id": "1249768632077843821", - "name": "clanguml::t20013::tmain(int,char **)", + "name": "tmain", + "namespace": "clanguml::t20013", "source_location": { "column": 6, "file": "t20013.cc", @@ -66,8 +68,51 @@ void tmain(int argc, char **argv) "type": "function" }, { + "activities": [ + { + "display_name": "b(int)", + "id": "2144804108273682993", + "name": "b", + "namespace": "", + "source_location": { + "column": 9, + "file": "t20013.cc", + "line": 11, + "translation_unit": "t20013.cc" + }, + "type": "method" + }, + { + "display_name": "b(double)", + "id": "640747884486165287", + "name": "b", + "namespace": "", + "source_location": { + "column": 12, + "file": "t20013.cc", + "line": 12, + "translation_unit": "t20013.cc" + }, + "type": "method" + }, + { + "display_name": "b(const char *)", + "id": "1066935874364409142", + "name": "b", + "namespace": "", + "source_location": { + "column": 17, + "file": "t20013.cc", + "line": 13, + "translation_unit": "t20013.cc" + }, + "type": "method" + } + ], + "display_name": "B", "id": "1106407610612951303", - "name": "clanguml::t20013::B", + "name": "B", + "namespace": "clanguml::t20013", "source_location": { "column": 8, "file": "t20013.cc", @@ -77,8 +122,51 @@ void tmain(int argc, char **argv) "type": "class" }, { + "activities": [ + { + "display_name": "a1(int)", + "id": "1034027282942033004", + "name": "a1", + "namespace": "", + "source_location": { + "column": 9, + "file": "t20013.cc", + "line": 5, + "translation_unit": "t20013.cc" + }, + "type": "method" + }, + { + "display_name": "a2(double)", + "id": "394053399890813915", + "name": "a2", + "namespace": "", + "source_location": { + "column": 12, + "file": "t20013.cc", + "line": 6, + "translation_unit": "t20013.cc" + }, + "type": "method" + }, + { + "display_name": "a3(const char *)", + "id": "1841239321495867611", + "name": "a3", + "namespace": "", + "source_location": { + "column": 17, + "file": "t20013.cc", + "line": 7, + "translation_unit": "t20013.cc" + }, + "type": "method" + } + ], + "display_name": "A", "id": "976623130699225079", - "name": "clanguml::t20013::A", + "name": "A", + "namespace": "clanguml::t20013", "source_location": { "column": 8, "file": "t20013.cc", @@ -94,9 +182,7 @@ void tmain(int argc, char **argv) { "from": { "activity_id": "1249768632077843821", - "activity_name": "clanguml::t20013::tmain(int,char **)", - "participant_id": "1249768632077843821", - "participant_name": "clanguml::t20013::tmain(int,char **)" + "participant_id": "1249768632077843821" }, "name": "b(int)", "return_type": "int", @@ -109,7 +195,6 @@ void tmain(int argc, char **argv) }, "to": { "activity_id": "2144804108273682993", - "activity_name": "clanguml::t20013::B::b(int)", "participant_id": "1106407610612951303" }, "type": "message" @@ -117,7 +202,6 @@ void tmain(int argc, char **argv) { "from": { "activity_id": "2144804108273682993", - "activity_name": "clanguml::t20013::B::b(int)", "participant_id": "1106407610612951303" }, "name": "a1(int)", @@ -131,7 +215,6 @@ void tmain(int argc, char **argv) }, "to": { "activity_id": "1034027282942033004", - "activity_name": "clanguml::t20013::A::a1(int)", "participant_id": "976623130699225079" }, "type": "message" @@ -139,9 +222,7 @@ void tmain(int argc, char **argv) { "from": { "activity_id": "1249768632077843821", - "activity_name": "clanguml::t20013::tmain(int,char **)", - "participant_id": "1249768632077843821", - "participant_name": "clanguml::t20013::tmain(int,char **)" + "participant_id": "1249768632077843821" }, "name": "b(double)", "return_type": "double", @@ -154,7 +235,6 @@ void tmain(int argc, char **argv) }, "to": { "activity_id": "640747884486165287", - "activity_name": "clanguml::t20013::B::b(double)", "participant_id": "1106407610612951303" }, "type": "message" @@ -162,7 +242,6 @@ void tmain(int argc, char **argv) { "from": { "activity_id": "640747884486165287", - "activity_name": "clanguml::t20013::B::b(double)", "participant_id": "1106407610612951303" }, "name": "a2(double)", @@ -176,7 +255,6 @@ void tmain(int argc, char **argv) }, "to": { "activity_id": "394053399890813915", - "activity_name": "clanguml::t20013::A::a2(double)", "participant_id": "976623130699225079" }, "type": "message" @@ -184,9 +262,7 @@ void tmain(int argc, char **argv) { "from": { "activity_id": "1249768632077843821", - "activity_name": "clanguml::t20013::tmain(int,char **)", - "participant_id": "1249768632077843821", - "participant_name": "clanguml::t20013::tmain(int,char **)" + "participant_id": "1249768632077843821" }, "name": "b(const char *)", "return_type": "const char *", @@ -199,7 +275,6 @@ void tmain(int argc, char **argv) }, "to": { "activity_id": "1066935874364409142", - "activity_name": "clanguml::t20013::B::b(const char *)", "participant_id": "1106407610612951303" }, "type": "message" @@ -207,7 +282,6 @@ void tmain(int argc, char **argv) { "from": { "activity_id": "1066935874364409142", - "activity_name": "clanguml::t20013::B::b(const char *)", "participant_id": "1106407610612951303" }, "name": "a3(const char *)", @@ -221,7 +295,6 @@ void tmain(int argc, char **argv) }, "to": { "activity_id": "1841239321495867611", - "activity_name": "clanguml::t20013::A::a3(const char *)", "participant_id": "976623130699225079" }, "type": "message" diff --git a/docs/test_cases/t20013_sequence.svg b/docs/test_cases/t20013_sequence.svg index 82745b5d..268c163e 100644 --- a/docs/test_cases/t20013_sequence.svg +++ b/docs/test_cases/t20013_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,47 +9,47 @@ - - - - - - - + + + + + + + - - + + tmain(int,char **) - + tmain(int,char **) - - + + B - + B - - + + A - + A - - - - - - - - + + + + + + + + b(int) - + a1(int) @@ -58,12 +58,12 @@ - + b(double) - + a2(double) @@ -72,12 +72,12 @@ - + b(const char *) - + a3(const char *) diff --git a/docs/test_cases/t20014.md b/docs/test_cases/t20014.md index aa6bae26..59d155bd 100644 --- a/docs/test_cases/t20014.md +++ b/docs/test_cases/t20014.md @@ -17,7 +17,7 @@ diagrams: - function: "clanguml::t20014::tmain()" ``` ## Source code -File t20014.cc +File `tests/t20014/t20014.cc` ```cpp #include "include/t20014.h" #include "include/t20014_b.h" @@ -43,7 +43,7 @@ int tmain() } } ``` -File t20014_a.cc +File `tests/t20014/t20014_a.cc` ```cpp #include "include/t20014_a.h" namespace clanguml { @@ -56,7 +56,7 @@ int A::a2(int i, int j) { return i - j; } } } ``` -File t20014_b.cc +File `tests/t20014/t20014_b.cc` ```cpp #include "include/t20014_b.h" namespace clanguml { @@ -69,13 +69,77 @@ int B::b2(int i, int j) { return a_.a2(i, j); } } } ``` -File t20014_c.cc +File `tests/t20014/t20014_c.cc` ```cpp #include "include/t20014_c.h" namespace clanguml { namespace t20014 { +} +} +``` +File `tests/t20014/include/t20014_b.h` +```cpp +#pragma once + +#include "t20014_a.h" + +namespace clanguml { +namespace t20014 { + +struct B { + int b1(int i, int); + int b2(int i, int); + + A a_; +}; + +} +} +``` +File `tests/t20014/include/t20014.h` +```cpp +#pragma once + +namespace clanguml { +namespace t20014 { + +int tmain(); + +} +} +``` +File `tests/t20014/include/t20014_c.h` +```cpp +#pragma once + +namespace clanguml { +namespace t20014 { + +template struct C { + F c1(F i, F j) { return c_.b1(i, j); } + + F c2(F i, F j) { return c_.b2(i, j); } + + T c_; +}; + +} +} +``` +File `tests/t20014/include/t20014_a.h` +```cpp +#pragma once + +namespace clanguml { +namespace t20014 { + +struct A { + int a1(int i, int j); + int a2(int i, int j); +}; + } } ``` @@ -90,8 +154,10 @@ namespace t20014 { "name": "t20014_sequence", "participants": [ { + "display_name": "tmain()", "id": "512436830818921250", - "name": "clanguml::t20014::tmain()", + "name": "tmain", + "namespace": "clanguml::t20014", "source_location": { "column": 5, "file": "t20014.cc", @@ -101,8 +167,38 @@ namespace t20014 { "type": "function" }, { + "activities": [ + { + "display_name": "b1(int,int)", + "id": "1251633571711578431", + "name": "b1", + "namespace": "", + "source_location": { + "column": 9, + "file": "include/t20014_b.h", + "line": 9, + "translation_unit": "t20014.cc" + }, + "type": "method" + }, + { + "display_name": "b2(int,int)", + "id": "767830966714379991", + "name": "b2", + "namespace": "", + "source_location": { + "column": 9, + "file": "include/t20014_b.h", + "line": 10, + "translation_unit": "t20014.cc" + }, + "type": "method" + } + ], + "display_name": "B", "id": "1537634076295867978", - "name": "clanguml::t20014::B", + "name": "B", + "namespace": "clanguml::t20014", "source_location": { "column": 8, "file": "include/t20014_b.h", @@ -112,8 +208,38 @@ namespace t20014 { "type": "class" }, { + "activities": [ + { + "display_name": "a1(int,int)", + "id": "1753682948110709616", + "name": "a1", + "namespace": "", + "source_location": { + "column": 9, + "file": "include/t20014_a.h", + "line": 7, + "translation_unit": "t20014.cc" + }, + "type": "method" + }, + { + "display_name": "a2(int,int)", + "id": "1943487088673912694", + "name": "a2", + "namespace": "", + "source_location": { + "column": 9, + "file": "include/t20014_a.h", + "line": 8, + "translation_unit": "t20014.cc" + }, + "type": "method" + } + ], + "display_name": "A", "id": "1504706415756333840", - "name": "clanguml::t20014::A", + "name": "A", + "namespace": "clanguml::t20014", "source_location": { "column": 8, "file": "include/t20014_a.h", @@ -123,8 +249,25 @@ namespace t20014 { "type": "class" }, { + "activities": [ + { + "display_name": "c1(int,int)", + "id": "407559038402563981", + "name": "c1", + "namespace": "", + "source_location": { + "column": 7, + "file": "include/t20014_c.h", + "line": 7, + "translation_unit": "t20014.cc" + }, + "type": "method" + } + ], + "display_name": "C", "id": "500712304857049435", - "name": "clanguml::t20014::C", + "name": "C", + "namespace": "clanguml::t20014", "source_location": { "column": 42, "file": "include/t20014_c.h", @@ -140,9 +283,7 @@ namespace t20014 { { "from": { "activity_id": "512436830818921250", - "activity_name": "clanguml::t20014::tmain()", - "participant_id": "512436830818921250", - "participant_name": "clanguml::t20014::tmain()" + "participant_id": "512436830818921250" }, "name": "b1(int,int)", "return_type": "int", @@ -155,7 +296,6 @@ namespace t20014 { }, "to": { "activity_id": "1251633571711578431", - "activity_name": "clanguml::t20014::B::b1(int,int)", "participant_id": "1537634076295867978" }, "type": "message" @@ -163,7 +303,6 @@ namespace t20014 { { "from": { "activity_id": "1251633571711578431", - "activity_name": "clanguml::t20014::B::b1(int,int)", "participant_id": "1537634076295867978" }, "name": "a1(int,int)", @@ -177,7 +316,6 @@ namespace t20014 { }, "to": { "activity_id": "1753682948110709616", - "activity_name": "clanguml::t20014::A::a1(int,int)", "participant_id": "1504706415756333840" }, "type": "message" @@ -185,9 +323,7 @@ namespace t20014 { { "from": { "activity_id": "512436830818921250", - "activity_name": "clanguml::t20014::tmain()", - "participant_id": "512436830818921250", - "participant_name": "clanguml::t20014::tmain()" + "participant_id": "512436830818921250" }, "name": "b2(int,int)", "return_type": "int", @@ -200,7 +336,6 @@ namespace t20014 { }, "to": { "activity_id": "767830966714379991", - "activity_name": "clanguml::t20014::B::b2(int,int)", "participant_id": "1537634076295867978" }, "type": "message" @@ -208,7 +343,6 @@ namespace t20014 { { "from": { "activity_id": "767830966714379991", - "activity_name": "clanguml::t20014::B::b2(int,int)", "participant_id": "1537634076295867978" }, "name": "a2(int,int)", @@ -222,7 +356,6 @@ namespace t20014 { }, "to": { "activity_id": "1943487088673912694", - "activity_name": "clanguml::t20014::A::a2(int,int)", "participant_id": "1504706415756333840" }, "type": "message" @@ -230,9 +363,7 @@ namespace t20014 { { "from": { "activity_id": "512436830818921250", - "activity_name": "clanguml::t20014::tmain()", - "participant_id": "512436830818921250", - "participant_name": "clanguml::t20014::tmain()" + "participant_id": "512436830818921250" }, "name": "c1(int,int)", "return_type": "int", @@ -245,7 +376,6 @@ namespace t20014 { }, "to": { "activity_id": "407559038402563981", - "activity_name": "clanguml::t20014::C::c1(int,int)", "participant_id": "500712304857049435" }, "type": "message" @@ -253,7 +383,6 @@ namespace t20014 { { "from": { "activity_id": "407559038402563981", - "activity_name": "clanguml::t20014::C::c1(int,int)", "participant_id": "500712304857049435" }, "name": "b1(int,int)", @@ -267,7 +396,6 @@ namespace t20014 { }, "to": { "activity_id": "1251633571711578431", - "activity_name": "clanguml::t20014::B::b1(int,int)", "participant_id": "1537634076295867978" }, "type": "message" diff --git a/docs/test_cases/t20014_sequence.svg b/docs/test_cases/t20014_sequence.svg index dee72eee..840b7f9a 100644 --- a/docs/test_cases/t20014_sequence.svg +++ b/docs/test_cases/t20014_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,56 +9,56 @@ - - - - - - - - + + + + + + + + - - + + tmain() - + tmain() - - + + B - + B - - + + A - + A - - + + C<B,int> - + C<B,int> - - - - - - - - - + + + + + + + + + b1(int,int) - + a1(int,int) @@ -67,12 +67,12 @@ - + b2(int,int) - + a2(int,int) @@ -81,17 +81,17 @@ - + c1(int,int) - + b1(int,int) - + a1(int,int) diff --git a/docs/test_cases/t20015.md b/docs/test_cases/t20015.md index 2885a933..3cd38edd 100644 --- a/docs/test_cases/t20015.md +++ b/docs/test_cases/t20015.md @@ -17,7 +17,7 @@ diagrams: - function: "clanguml::t20015::tmain()" ``` ## Source code -File t20015.cc +File `tests/t20015/t20015.cc` ```cpp #include #include @@ -71,8 +71,10 @@ void tmain() "name": "t20015_sequence", "participants": [ { + "display_name": "tmain()", "id": "1011496551872082945", - "name": "clanguml::t20015::tmain()", + "name": "tmain", + "namespace": "clanguml::t20015", "source_location": { "column": 6, "file": "t20015.cc", @@ -82,8 +84,25 @@ void tmain() "type": "function" }, { + "activities": [ + { + "display_name": "setup_a(std::shared_ptr &)", + "id": "431575772398797060", + "name": "setup_a", + "namespace": "", + "source_location": { + "column": 10, + "file": "t20015.cc", + "line": 23, + "translation_unit": "t20015.cc" + }, + "type": "method" + } + ], + "display_name": "B", "id": "1302656676783358645", - "name": "clanguml::t20015::B", + "name": "B", + "namespace": "clanguml::t20015", "source_location": { "column": 7, "file": "t20015.cc", @@ -99,9 +118,7 @@ void tmain() { "from": { "activity_id": "1011496551872082945", - "activity_name": "clanguml::t20015::tmain()", - "participant_id": "1011496551872082945", - "participant_name": "clanguml::t20015::tmain()" + "participant_id": "1011496551872082945" }, "name": "setup_a(std::shared_ptr &)", "return_type": "void", @@ -114,7 +131,6 @@ void tmain() }, "to": { "activity_id": "431575772398797060", - "activity_name": "clanguml::t20015::B::setup_a(std::shared_ptr &)", "participant_id": "1302656676783358645" }, "type": "message" diff --git a/docs/test_cases/t20015_sequence.svg b/docs/test_cases/t20015_sequence.svg index c11653fc..f4495b80 100644 --- a/docs/test_cases/t20015_sequence.svg +++ b/docs/test_cases/t20015_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,25 +9,25 @@ - - + + - - + + tmain() - + tmain() - - + + B - + B - - - + + + setup_a(std::shared_ptr<detail::A> &) diff --git a/docs/test_cases/t20016.md b/docs/test_cases/t20016.md index dda41246..1dd9921c 100644 --- a/docs/test_cases/t20016.md +++ b/docs/test_cases/t20016.md @@ -14,7 +14,7 @@ diagrams: - function: "clanguml::t20016::tmain()" ``` ## Source code -File t20016.cc +File `tests/t20016/t20016.cc` ```cpp namespace clanguml { namespace t20016 { @@ -53,8 +53,10 @@ void tmain() "name": "t20016_sequence", "participants": [ { + "display_name": "tmain()", "id": "1912662358651926712", - "name": "clanguml::t20016::tmain()", + "name": "tmain", + "namespace": "clanguml::t20016", "source_location": { "column": 6, "file": "t20016.cc", @@ -64,8 +66,38 @@ void tmain() "type": "function" }, { + "activities": [ + { + "display_name": "b1(long)", + "id": "2064264710178722261", + "name": "b1", + "namespace": "", + "source_location": { + "column": 10, + "file": "t20016.cc", + "line": 9, + "translation_unit": "t20016.cc" + }, + "type": "method" + }, + { + "display_name": "b2(long)", + "id": "203381140188081853", + "name": "b2", + "namespace": "", + "source_location": { + "column": 29, + "file": "t20016.cc", + "line": 11, + "translation_unit": "t20016.cc" + }, + "type": "method" + } + ], + "display_name": "B", "id": "1688340912643326666", - "name": "clanguml::t20016::B", + "name": "B", + "namespace": "clanguml::t20016", "source_location": { "column": 30, "file": "t20016.cc", @@ -75,8 +107,38 @@ void tmain() "type": "class" }, { + "activities": [ + { + "display_name": "a1(int)", + "id": "1198371121423942542", + "name": "a1", + "namespace": "", + "source_location": { + "column": 10, + "file": "t20016.cc", + "line": 4, + "translation_unit": "t20016.cc" + }, + "type": "method" + }, + { + "display_name": "a2(const long &)", + "id": "1208784669530380166", + "name": "a2", + "namespace": "", + "source_location": { + "column": 29, + "file": "t20016.cc", + "line": 5, + "translation_unit": "t20016.cc" + }, + "type": "method" + } + ], + "display_name": "A", "id": "1351242594275053195", - "name": "clanguml::t20016::A", + "name": "A", + "namespace": "clanguml::t20016", "source_location": { "column": 8, "file": "t20016.cc", @@ -92,9 +154,7 @@ void tmain() { "from": { "activity_id": "1912662358651926712", - "activity_name": "clanguml::t20016::tmain()", - "participant_id": "1912662358651926712", - "participant_name": "clanguml::t20016::tmain()" + "participant_id": "1912662358651926712" }, "name": "b1(long)", "return_type": "void", @@ -107,7 +167,6 @@ void tmain() }, "to": { "activity_id": "2064264710178722261", - "activity_name": "clanguml::t20016::B::b1(long)", "participant_id": "1688340912643326666" }, "type": "message" @@ -115,7 +174,6 @@ void tmain() { "from": { "activity_id": "2064264710178722261", - "activity_name": "clanguml::t20016::B::b1(long)", "participant_id": "1688340912643326666" }, "name": "a1(int)", @@ -129,7 +187,6 @@ void tmain() }, "to": { "activity_id": "1198371121423942542", - "activity_name": "clanguml::t20016::A::a1(int)", "participant_id": "1351242594275053195" }, "type": "message" @@ -137,9 +194,7 @@ void tmain() { "from": { "activity_id": "1912662358651926712", - "activity_name": "clanguml::t20016::tmain()", - "participant_id": "1912662358651926712", - "participant_name": "clanguml::t20016::tmain()" + "participant_id": "1912662358651926712" }, "name": "b2(long)", "return_type": "F", @@ -152,7 +207,6 @@ void tmain() }, "to": { "activity_id": "203381140188081853", - "activity_name": "clanguml::t20016::B::b2(long)", "participant_id": "1688340912643326666" }, "type": "message" @@ -160,7 +214,6 @@ void tmain() { "from": { "activity_id": "203381140188081853", - "activity_name": "clanguml::t20016::B::b2(long)", "participant_id": "1688340912643326666" }, "name": "a2(const long &)", @@ -174,7 +227,6 @@ void tmain() }, "to": { "activity_id": "1208784669530380166", - "activity_name": "clanguml::t20016::A::a2(const long &)", "participant_id": "1351242594275053195" }, "type": "message" diff --git a/docs/test_cases/t20016_sequence.svg b/docs/test_cases/t20016_sequence.svg index 855247e6..5f867671 100644 --- a/docs/test_cases/t20016_sequence.svg +++ b/docs/test_cases/t20016_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,53 +9,53 @@ - - - - - + + + + + - - + + tmain() - + tmain() - - + + B<long> - + B<long> - - + + A - + A - - - - - - + + + + + + b1(long) - + a1(int) - + b2(long) - + a2(const long &) diff --git a/docs/test_cases/t20017.md b/docs/test_cases/t20017.md index cb88dffb..f783f2c3 100644 --- a/docs/test_cases/t20017.md +++ b/docs/test_cases/t20017.md @@ -18,7 +18,7 @@ diagrams: - function: "clanguml::t20017::tmain()" ``` ## Source code -File t20017_b.cc +File `tests/t20017/t20017_b.cc` ```cpp #include "include/t20017_b.h" @@ -28,7 +28,7 @@ int b1(int x, int y) { return x - y; } } } ``` -File t20017.cc +File `tests/t20017/t20017.cc` ```cpp #include "include/t20017_a.h" #include "include/t20017_b.h" @@ -39,6 +39,30 @@ int tmain() { return b2(a1(a2(a3(1, 2), b1(3, 4)), 5), 6); } } } ``` +File `tests/t20017/include/t20017_a.h` +```cpp +#pragma once + +namespace clanguml { +namespace t20017 { +int a1(int x, int y) { return x + y; } +int a2(int x, int y) { return x - y; } +int a3(int x, int y) { return x * y; } +} +} +``` +File `tests/t20017/include/t20017_b.h` +```cpp +#pragma once + +namespace clanguml { +namespace t20017 { +int b1(int x, int y); + +template T b2(T x, T y) { return x / y; } +} +} +``` ## Generated PlantUML diagrams ![t20017_sequence](./t20017_sequence.svg "Test case for combine_free_functions_into_file_participants option") ## Generated Mermaid diagrams @@ -50,37 +74,109 @@ int tmain() { return b2(a1(a2(a3(1, 2), b1(3, 4)), 5), 6); } "name": "t20017_sequence", "participants": [ { + "activities": [ + { + "display_name": "tmain()", + "id": "1484746432546296115", + "name": "tmain", + "namespace": "clanguml::t20017", + "source_location": { + "column": 5, + "file": "t20017.cc", + "line": 6, + "translation_unit": "t20017.cc" + }, + "type": "function" + } + ], + "display_name": "t20017.cc", "id": "294332401323799021", "name": "t20017.cc", - "source_location": { - "column": 5, - "file": "t20017.cc", - "line": 6, - "translation_unit": "t20017.cc" - }, - "type": "function" + "namespace": "clanguml::t20017", + "type": "file" }, { + "activities": [ + { + "display_name": "a3(int,int)", + "id": "1681392050252260928", + "name": "a3", + "namespace": "clanguml::t20017", + "source_location": { + "column": 5, + "file": "include/t20017_a.h", + "line": 7, + "translation_unit": "t20017.cc" + }, + "type": "function" + }, + { + "display_name": "a2(int,int)", + "id": "291553542743365259", + "name": "a2", + "namespace": "clanguml::t20017", + "source_location": { + "column": 5, + "file": "include/t20017_a.h", + "line": 6, + "translation_unit": "t20017.cc" + }, + "type": "function" + }, + { + "display_name": "a1(int,int)", + "id": "113759676939330212", + "name": "a1", + "namespace": "clanguml::t20017", + "source_location": { + "column": 5, + "file": "include/t20017_a.h", + "line": 5, + "translation_unit": "t20017.cc" + }, + "type": "function" + } + ], + "display_name": "include/t20017_a.h", "id": "1591222867263639510", - "name": "include/t20017_a.h", - "source_location": { - "column": 5, - "file": "include/t20017_a.h", - "line": 7, - "translation_unit": "t20017.cc" - }, - "type": "function" + "name": "t20017_a.h", + "namespace": "clanguml::t20017", + "type": "file" }, { + "activities": [ + { + "display_name": "b1(int,int)", + "id": "1714277838806105702", + "name": "b1", + "namespace": "clanguml::t20017", + "source_location": { + "column": 5, + "file": "include/t20017_b.h", + "line": 5, + "translation_unit": "t20017.cc" + }, + "type": "function" + }, + { + "display_name": "b2(int,int)", + "id": "775081116464505528", + "name": "b2", + "namespace": "clanguml::t20017", + "source_location": { + "column": 25, + "file": "include/t20017_b.h", + "line": 7, + "translation_unit": "t20017.cc" + }, + "type": "function_template" + } + ], + "display_name": "include/t20017_b.h", "id": "1113611539183189365", - "name": "include/t20017_b.h", - "source_location": { - "column": 5, - "file": "include/t20017_b.h", - "line": 5, - "translation_unit": "t20017.cc" - }, - "type": "function" + "name": "t20017_b.h", + "namespace": "clanguml::t20017", + "type": "file" } ], "sequences": [ @@ -89,7 +185,6 @@ int tmain() { return b2(a1(a2(a3(1, 2), b1(3, 4)), 5), 6); } { "from": { "activity_id": "1484746432546296115", - "activity_name": "clanguml::t20017::tmain()", "participant_id": "294332401323799021" }, "name": "a3(int,int)", @@ -103,7 +198,6 @@ int tmain() { return b2(a1(a2(a3(1, 2), b1(3, 4)), 5), 6); } }, "to": { "activity_id": "1681392050252260928", - "activity_name": "clanguml::t20017::a3(int,int)", "participant_id": "1591222867263639510" }, "type": "message" @@ -111,7 +205,6 @@ int tmain() { return b2(a1(a2(a3(1, 2), b1(3, 4)), 5), 6); } { "from": { "activity_id": "1484746432546296115", - "activity_name": "clanguml::t20017::tmain()", "participant_id": "294332401323799021" }, "name": "b1(int,int)", @@ -125,7 +218,6 @@ int tmain() { return b2(a1(a2(a3(1, 2), b1(3, 4)), 5), 6); } }, "to": { "activity_id": "1714277838806105702", - "activity_name": "clanguml::t20017::b1(int,int)", "participant_id": "1113611539183189365" }, "type": "message" @@ -133,7 +225,6 @@ int tmain() { return b2(a1(a2(a3(1, 2), b1(3, 4)), 5), 6); } { "from": { "activity_id": "1484746432546296115", - "activity_name": "clanguml::t20017::tmain()", "participant_id": "294332401323799021" }, "name": "a2(int,int)", @@ -147,7 +238,6 @@ int tmain() { return b2(a1(a2(a3(1, 2), b1(3, 4)), 5), 6); } }, "to": { "activity_id": "291553542743365259", - "activity_name": "clanguml::t20017::a2(int,int)", "participant_id": "1591222867263639510" }, "type": "message" @@ -155,7 +245,6 @@ int tmain() { return b2(a1(a2(a3(1, 2), b1(3, 4)), 5), 6); } { "from": { "activity_id": "1484746432546296115", - "activity_name": "clanguml::t20017::tmain()", "participant_id": "294332401323799021" }, "name": "a1(int,int)", @@ -169,7 +258,6 @@ int tmain() { return b2(a1(a2(a3(1, 2), b1(3, 4)), 5), 6); } }, "to": { "activity_id": "113759676939330212", - "activity_name": "clanguml::t20017::a1(int,int)", "participant_id": "1591222867263639510" }, "type": "message" @@ -177,7 +265,6 @@ int tmain() { return b2(a1(a2(a3(1, 2), b1(3, 4)), 5), 6); } { "from": { "activity_id": "1484746432546296115", - "activity_name": "clanguml::t20017::tmain()", "participant_id": "294332401323799021" }, "name": "b2(int,int)", @@ -191,7 +278,6 @@ int tmain() { return b2(a1(a2(a3(1, 2), b1(3, 4)), 5), 6); } }, "to": { "activity_id": "775081116464505528", - "activity_name": "clanguml::t20017::b2(int,int)", "participant_id": "1113611539183189365" }, "type": "message" diff --git a/docs/test_cases/t20017_sequence.svg b/docs/test_cases/t20017_sequence.svg index 409b1775..abee61a4 100644 --- a/docs/test_cases/t20017_sequence.svg +++ b/docs/test_cases/t20017_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,65 +9,65 @@ - - - - - - + + + + + + - + t20017.cc - + t20017.cc - + include/t20017_a.h - + include/t20017_a.h - + include/t20017_b.h - + include/t20017_b.h - - - - - - + + + + + + tmain() - + a3(int,int) - + b1(int,int) - + a2(int,int) - + a1(int,int) - + b2<int>(int,int) diff --git a/docs/test_cases/t20018.md b/docs/test_cases/t20018.md index 2168fbef..79814f4e 100644 --- a/docs/test_cases/t20018.md +++ b/docs/test_cases/t20018.md @@ -14,7 +14,7 @@ diagrams: - function: "clanguml::t20018::tmain()" ``` ## Source code -File t20018.cc +File `tests/t20018/t20018.cc` ```cpp #include @@ -55,8 +55,10 @@ void tmain() { Answer>::print(); } "name": "t20018_sequence", "participants": [ { + "display_name": "tmain()", "id": "227581758025403815", - "name": "clanguml::t20018::tmain()", + "name": "tmain", + "namespace": "clanguml::t20018", "source_location": { "column": 6, "file": "t20018.cc", @@ -66,8 +68,25 @@ void tmain() { Answer>::print(); } "type": "function" }, { + "activities": [ + { + "display_name": "print()", + "id": "1185770766239304952", + "name": "print", + "namespace": "", + "source_location": { + "column": 17, + "file": "t20018.cc", + "line": 22, + "translation_unit": "t20018.cc" + }, + "type": "method" + } + ], + "display_name": "Answer,120>", "id": "1163521725351533502", - "name": "clanguml::t20018::Answer,120>", + "name": "Answer", + "namespace": "clanguml::t20018", "source_location": { "column": 48, "file": "t20018.cc", @@ -77,8 +96,25 @@ void tmain() { Answer>::print(); } "type": "class" }, { + "activities": [ + { + "display_name": "print(int)", + "id": "833100888453299461", + "name": "print", + "namespace": "", + "source_location": { + "column": 17, + "file": "t20018.cc", + "line": 9, + "translation_unit": "t20018.cc" + }, + "type": "method" + } + ], + "display_name": "Factorial<5>", "id": "1482779373563849921", - "name": "clanguml::t20018::Factorial<5>", + "name": "Factorial", + "namespace": "clanguml::t20018", "source_location": { "column": 25, "file": "t20018.cc", @@ -88,8 +124,25 @@ void tmain() { Answer>::print(); } "type": "class" }, { + "activities": [ + { + "display_name": "print(int)", + "id": "1782586643813991247", + "name": "print", + "namespace": "", + "source_location": { + "column": 17, + "file": "t20018.cc", + "line": 9, + "translation_unit": "t20018.cc" + }, + "type": "method" + } + ], + "display_name": "Factorial<4>", "id": "52416404065514823", - "name": "clanguml::t20018::Factorial<4>", + "name": "Factorial", + "namespace": "clanguml::t20018", "source_location": { "column": 25, "file": "t20018.cc", @@ -99,8 +152,25 @@ void tmain() { Answer>::print(); } "type": "class" }, { + "activities": [ + { + "display_name": "print(int)", + "id": "1238078028595736678", + "name": "print", + "namespace": "", + "source_location": { + "column": 17, + "file": "t20018.cc", + "line": 9, + "translation_unit": "t20018.cc" + }, + "type": "method" + } + ], + "display_name": "Factorial<3>", "id": "1658728078296100018", - "name": "clanguml::t20018::Factorial<3>", + "name": "Factorial", + "namespace": "clanguml::t20018", "source_location": { "column": 25, "file": "t20018.cc", @@ -110,8 +180,25 @@ void tmain() { Answer>::print(); } "type": "class" }, { + "activities": [ + { + "display_name": "print(int)", + "id": "2163270950475476780", + "name": "print", + "namespace": "", + "source_location": { + "column": 17, + "file": "t20018.cc", + "line": 9, + "translation_unit": "t20018.cc" + }, + "type": "method" + } + ], + "display_name": "Factorial<2>", "id": "969903469166760124", - "name": "clanguml::t20018::Factorial<2>", + "name": "Factorial", + "namespace": "clanguml::t20018", "source_location": { "column": 25, "file": "t20018.cc", @@ -121,8 +208,25 @@ void tmain() { Answer>::print(); } "type": "class" }, { + "activities": [ + { + "display_name": "print(int)", + "id": "501166016325937670", + "name": "print", + "namespace": "", + "source_location": { + "column": 17, + "file": "t20018.cc", + "line": 9, + "translation_unit": "t20018.cc" + }, + "type": "method" + } + ], + "display_name": "Factorial<1>", "id": "2032621198190600516", - "name": "clanguml::t20018::Factorial<1>", + "name": "Factorial", + "namespace": "clanguml::t20018", "source_location": { "column": 25, "file": "t20018.cc", @@ -132,8 +236,25 @@ void tmain() { Answer>::print(); } "type": "class" }, { + "activities": [ + { + "display_name": "print(int)", + "id": "577232827352391544", + "name": "print", + "namespace": "", + "source_location": { + "column": 17, + "file": "t20018.cc", + "line": 15, + "translation_unit": "t20018.cc" + }, + "type": "method" + } + ], + "display_name": "Factorial<0>", "id": "1581865799666386458", - "name": "clanguml::t20018::Factorial<0>", + "name": "Factorial", + "namespace": "clanguml::t20018", "source_location": { "column": 20, "file": "t20018.cc", @@ -149,9 +270,7 @@ void tmain() { Answer>::print(); } { "from": { "activity_id": "227581758025403815", - "activity_name": "clanguml::t20018::tmain()", - "participant_id": "227581758025403815", - "participant_name": "clanguml::t20018::tmain()" + "participant_id": "227581758025403815" }, "name": "print()", "return_type": "void", @@ -164,7 +283,6 @@ void tmain() { Answer>::print(); } }, "to": { "activity_id": "1185770766239304952", - "activity_name": "clanguml::t20018::Answer,120>::print()", "participant_id": "1163521725351533502" }, "type": "message" @@ -172,7 +290,6 @@ void tmain() { Answer>::print(); } { "from": { "activity_id": "1185770766239304952", - "activity_name": "clanguml::t20018::Answer,120>::print()", "participant_id": "1163521725351533502" }, "name": "print(int)", @@ -186,7 +303,6 @@ void tmain() { Answer>::print(); } }, "to": { "activity_id": "833100888453299461", - "activity_name": "clanguml::t20018::Factorial<5>::print(int)", "participant_id": "1482779373563849921" }, "type": "message" @@ -194,7 +310,6 @@ void tmain() { Answer>::print(); } { "from": { "activity_id": "833100888453299461", - "activity_name": "clanguml::t20018::Factorial<5>::print(int)", "participant_id": "1482779373563849921" }, "name": "print(int)", @@ -208,7 +323,6 @@ void tmain() { Answer>::print(); } }, "to": { "activity_id": "1782586643813991247", - "activity_name": "clanguml::t20018::Factorial<4>::print(int)", "participant_id": "52416404065514823" }, "type": "message" @@ -216,7 +330,6 @@ void tmain() { Answer>::print(); } { "from": { "activity_id": "1782586643813991247", - "activity_name": "clanguml::t20018::Factorial<4>::print(int)", "participant_id": "52416404065514823" }, "name": "print(int)", @@ -230,7 +343,6 @@ void tmain() { Answer>::print(); } }, "to": { "activity_id": "1238078028595736678", - "activity_name": "clanguml::t20018::Factorial<3>::print(int)", "participant_id": "1658728078296100018" }, "type": "message" @@ -238,7 +350,6 @@ void tmain() { Answer>::print(); } { "from": { "activity_id": "1238078028595736678", - "activity_name": "clanguml::t20018::Factorial<3>::print(int)", "participant_id": "1658728078296100018" }, "name": "print(int)", @@ -252,7 +363,6 @@ void tmain() { Answer>::print(); } }, "to": { "activity_id": "2163270950475476780", - "activity_name": "clanguml::t20018::Factorial<2>::print(int)", "participant_id": "969903469166760124" }, "type": "message" @@ -260,7 +370,6 @@ void tmain() { Answer>::print(); } { "from": { "activity_id": "2163270950475476780", - "activity_name": "clanguml::t20018::Factorial<2>::print(int)", "participant_id": "969903469166760124" }, "name": "print(int)", @@ -274,7 +383,6 @@ void tmain() { Answer>::print(); } }, "to": { "activity_id": "501166016325937670", - "activity_name": "clanguml::t20018::Factorial<1>::print(int)", "participant_id": "2032621198190600516" }, "type": "message" @@ -282,7 +390,6 @@ void tmain() { Answer>::print(); } { "from": { "activity_id": "501166016325937670", - "activity_name": "clanguml::t20018::Factorial<1>::print(int)", "participant_id": "2032621198190600516" }, "name": "print(int)", @@ -296,7 +403,6 @@ void tmain() { Answer>::print(); } }, "to": { "activity_id": "577232827352391544", - "activity_name": "clanguml::t20018::Factorial<0>::print(int)", "participant_id": "1581865799666386458" }, "type": "message" diff --git a/docs/test_cases/t20018_sequence.svg b/docs/test_cases/t20018_sequence.svg index 931d5df0..81837bdd 100644 --- a/docs/test_cases/t20018_sequence.svg +++ b/docs/test_cases/t20018_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,14 +9,14 @@ - - - - - - - - + + + + + + + + @@ -25,93 +25,93 @@ - - + + tmain() - + tmain() - - + + Answer<Factorial<5>,120> - + Answer<Factorial<5>,120> - - + + Factorial<5> - + Factorial<5> - - + + Factorial<4> - + Factorial<4> - - + + Factorial<3> - + Factorial<3> - - + + Factorial<2> - + Factorial<2> - - + + Factorial<1> - + Factorial<1> - - + + Factorial<0> - + Factorial<0> - - - - - - - - - + + + + + + + + + print() - + print(int) - + print(int) - + print(int) - + print(int) - + print(int) - + print(int) diff --git a/docs/test_cases/t20019.md b/docs/test_cases/t20019.md index c9c8e2d2..b8f1358d 100644 --- a/docs/test_cases/t20019.md +++ b/docs/test_cases/t20019.md @@ -14,7 +14,7 @@ diagrams: - function: "clanguml::t20019::tmain()" ``` ## Source code -File t20019.cc +File `tests/t20019/t20019.cc` ```cpp #include @@ -62,8 +62,10 @@ void tmain() "name": "t20019_sequence", "participants": [ { + "display_name": "tmain()", "id": "375304196268652861", - "name": "clanguml::t20019::tmain()", + "name": "tmain", + "namespace": "clanguml::t20019", "source_location": { "column": 6, "file": "t20019.cc", @@ -73,8 +75,25 @@ void tmain() "type": "function" }, { + "activities": [ + { + "display_name": "name()", + "id": "1038853547136467401", + "name": "name", + "namespace": "", + "source_location": { + "column": 10, + "file": "t20019.cc", + "line": 9, + "translation_unit": "t20019.cc" + }, + "type": "method" + } + ], + "display_name": "Base", "id": "381327373934972004", - "name": "clanguml::t20019::Base", + "name": "Base", + "namespace": "clanguml::t20019", "source_location": { "column": 33, "file": "t20019.cc", @@ -84,8 +103,25 @@ void tmain() "type": "class" }, { + "activities": [ + { + "display_name": "impl()", + "id": "603969604599968603", + "name": "impl", + "namespace": "", + "source_location": { + "column": 10, + "file": "t20019.cc", + "line": 13, + "translation_unit": "t20019.cc" + }, + "type": "method" + } + ], + "display_name": "D1", "id": "1282259011856139592", - "name": "clanguml::t20019::D1", + "name": "D1", + "namespace": "clanguml::t20019", "source_location": { "column": 8, "file": "t20019.cc", @@ -95,8 +131,25 @@ void tmain() "type": "class" }, { + "activities": [ + { + "display_name": "name()", + "id": "1918672956676175365", + "name": "name", + "namespace": "", + "source_location": { + "column": 10, + "file": "t20019.cc", + "line": 9, + "translation_unit": "t20019.cc" + }, + "type": "method" + } + ], + "display_name": "Base", "id": "1659477498076328530", - "name": "clanguml::t20019::Base", + "name": "Base", + "namespace": "clanguml::t20019", "source_location": { "column": 33, "file": "t20019.cc", @@ -106,8 +159,25 @@ void tmain() "type": "class" }, { + "activities": [ + { + "display_name": "impl()", + "id": "861400435979772695", + "name": "impl", + "namespace": "", + "source_location": { + "column": 10, + "file": "t20019.cc", + "line": 17, + "translation_unit": "t20019.cc" + }, + "type": "method" + } + ], + "display_name": "D2", "id": "1307471723138212117", - "name": "clanguml::t20019::D2", + "name": "D2", + "namespace": "clanguml::t20019", "source_location": { "column": 8, "file": "t20019.cc", @@ -123,9 +193,7 @@ void tmain() { "from": { "activity_id": "375304196268652861", - "activity_name": "clanguml::t20019::tmain()", - "participant_id": "375304196268652861", - "participant_name": "clanguml::t20019::tmain()" + "participant_id": "375304196268652861" }, "name": "name()", "return_type": "void", @@ -138,7 +206,6 @@ void tmain() }, "to": { "activity_id": "1038853547136467401", - "activity_name": "clanguml::t20019::Base::name()", "participant_id": "381327373934972004" }, "type": "message" @@ -146,7 +213,6 @@ void tmain() { "from": { "activity_id": "1038853547136467401", - "activity_name": "clanguml::t20019::Base::name()", "participant_id": "381327373934972004" }, "name": "impl()", @@ -160,7 +226,6 @@ void tmain() }, "to": { "activity_id": "603969604599968603", - "activity_name": "clanguml::t20019::D1::impl()", "participant_id": "1282259011856139592" }, "type": "message" @@ -168,9 +233,7 @@ void tmain() { "from": { "activity_id": "375304196268652861", - "activity_name": "clanguml::t20019::tmain()", - "participant_id": "375304196268652861", - "participant_name": "clanguml::t20019::tmain()" + "participant_id": "375304196268652861" }, "name": "name()", "return_type": "void", @@ -183,7 +246,6 @@ void tmain() }, "to": { "activity_id": "1918672956676175365", - "activity_name": "clanguml::t20019::Base::name()", "participant_id": "1659477498076328530" }, "type": "message" @@ -191,7 +253,6 @@ void tmain() { "from": { "activity_id": "1918672956676175365", - "activity_name": "clanguml::t20019::Base::name()", "participant_id": "1659477498076328530" }, "name": "impl()", @@ -205,7 +266,6 @@ void tmain() }, "to": { "activity_id": "861400435979772695", - "activity_name": "clanguml::t20019::D2::impl()", "participant_id": "1307471723138212117" }, "type": "message" @@ -213,9 +273,7 @@ void tmain() { "from": { "activity_id": "375304196268652861", - "activity_name": "clanguml::t20019::tmain()", - "participant_id": "375304196268652861", - "participant_name": "clanguml::t20019::tmain()" + "participant_id": "375304196268652861" }, "name": "name()", "return_type": "void", @@ -228,7 +286,6 @@ void tmain() }, "to": { "activity_id": "1038853547136467401", - "activity_name": "clanguml::t20019::Base::name()", "participant_id": "381327373934972004" }, "type": "message" @@ -236,9 +293,7 @@ void tmain() { "from": { "activity_id": "375304196268652861", - "activity_name": "clanguml::t20019::tmain()", - "participant_id": "375304196268652861", - "participant_name": "clanguml::t20019::tmain()" + "participant_id": "375304196268652861" }, "name": "name()", "return_type": "void", @@ -251,7 +306,6 @@ void tmain() }, "to": { "activity_id": "1918672956676175365", - "activity_name": "clanguml::t20019::Base::name()", "participant_id": "1659477498076328530" }, "type": "message" diff --git a/docs/test_cases/t20019_sequence.svg b/docs/test_cases/t20019_sequence.svg index af637231..d1f0545d 100644 --- a/docs/test_cases/t20019_sequence.svg +++ b/docs/test_cases/t20019_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,95 +9,95 @@ - - - - - - - - - + + + + + + + + + - - + + tmain() - + tmain() - - + + Base<D1> - + Base<D1> - - + + D1 - + D1 - - + + Base<D2> - + Base<D2> - - + + D2 - + D2 - - - - - - - - - - + + + + + + + + + + name() - + impl() - + name() - + impl() - + name() - + impl() - + name() - + impl() diff --git a/docs/test_cases/t20020.md b/docs/test_cases/t20020.md index 46ce82fa..26b80d87 100644 --- a/docs/test_cases/t20020.md +++ b/docs/test_cases/t20020.md @@ -14,7 +14,7 @@ diagrams: - function: "clanguml::t20020::tmain()" ``` ## Source code -File t20020.cc +File `tests/t20020/t20020.cc` ```cpp #include #include @@ -118,8 +118,10 @@ int tmain() "name": "t20020_sequence", "participants": [ { + "display_name": "tmain()", "id": "432124388562400664", - "name": "clanguml::t20020::tmain()", + "name": "tmain", + "namespace": "clanguml::t20020", "source_location": { "column": 5, "file": "t20020.cc", @@ -129,8 +131,77 @@ int tmain() "type": "function" }, { + "activities": [ + { + "display_name": "a1()", + "id": "43928675765534701", + "name": "a1", + "namespace": "", + "source_location": { + "column": 9, + "file": "t20020.cc", + "line": 7, + "translation_unit": "t20020.cc" + }, + "type": "method" + }, + { + "display_name": "a5()", + "id": "1613457246223182826", + "name": "a5", + "namespace": "", + "source_location": { + "column": 9, + "file": "t20020.cc", + "line": 11, + "translation_unit": "t20020.cc" + }, + "type": "method" + }, + { + "display_name": "a2()", + "id": "1289745252290688140", + "name": "a2", + "namespace": "", + "source_location": { + "column": 9, + "file": "t20020.cc", + "line": 8, + "translation_unit": "t20020.cc" + }, + "type": "method" + }, + { + "display_name": "a3()", + "id": "1983660679554669898", + "name": "a3", + "namespace": "", + "source_location": { + "column": 9, + "file": "t20020.cc", + "line": 9, + "translation_unit": "t20020.cc" + }, + "type": "method" + }, + { + "display_name": "a4()", + "id": "20573198999978866", + "name": "a4", + "namespace": "", + "source_location": { + "column": 9, + "file": "t20020.cc", + "line": 10, + "translation_unit": "t20020.cc" + }, + "type": "method" + } + ], + "display_name": "A", "id": "208941846648931609", - "name": "clanguml::t20020::A", + "name": "A", + "namespace": "clanguml::t20020", "source_location": { "column": 8, "file": "t20020.cc", @@ -140,8 +211,64 @@ int tmain() "type": "class" }, { + "activities": [ + { + "display_name": "c3(int)", + "id": "1303438784842196201", + "name": "c3", + "namespace": "", + "source_location": { + "column": 9, + "file": "t20020.cc", + "line": 32, + "translation_unit": "t20020.cc" + }, + "type": "method" + }, + { + "display_name": "c1() const", + "id": "1473521613404783653", + "name": "c1", + "namespace": "", + "source_location": { + "column": 10, + "file": "t20020.cc", + "line": 24, + "translation_unit": "t20020.cc" + }, + "type": "method" + }, + { + "display_name": "c2() const", + "id": "1789116382725485914", + "name": "c2", + "namespace": "", + "source_location": { + "column": 10, + "file": "t20020.cc", + "line": 30, + "translation_unit": "t20020.cc" + }, + "type": "method" + }, + { + "display_name": "log() const", + "id": "635780525021572670", + "name": "log", + "namespace": "", + "source_location": { + "column": 10, + "file": "t20020.cc", + "line": 22, + "translation_unit": "t20020.cc" + }, + "type": "method" + } + ], + "display_name": "C", "id": "1562462306909405383", - "name": "clanguml::t20020::C", + "name": "C", + "namespace": "clanguml::t20020", "source_location": { "column": 8, "file": "t20020.cc", @@ -151,8 +278,51 @@ int tmain() "type": "class" }, { + "activities": [ + { + "display_name": "b1()", + "id": "542196582335607343", + "name": "b1", + "namespace": "", + "source_location": { + "column": 9, + "file": "t20020.cc", + "line": 17, + "translation_unit": "t20020.cc" + }, + "type": "method" + }, + { + "display_name": "b2()", + "id": "505760236964179187", + "name": "b2", + "namespace": "", + "source_location": { + "column": 9, + "file": "t20020.cc", + "line": 18, + "translation_unit": "t20020.cc" + }, + "type": "method" + }, + { + "display_name": "log()", + "id": "1436250788704205026", + "name": "log", + "namespace": "", + "source_location": { + "column": 10, + "file": "t20020.cc", + "line": 15, + "translation_unit": "t20020.cc" + }, + "type": "method" + } + ], + "display_name": "B", "id": "1342563483612170412", - "name": "clanguml::t20020::B", + "name": "B", + "namespace": "clanguml::t20020", "source_location": { "column": 8, "file": "t20020.cc", @@ -162,8 +332,25 @@ int tmain() "type": "class" }, { + "activities": [ + { + "display_name": "d1(int,int)", + "id": "1780002010052842766", + "name": "d1", + "namespace": "", + "source_location": { + "column": 7, + "file": "t20020.cc", + "line": 37, + "translation_unit": "t20020.cc" + }, + "type": "method" + } + ], + "display_name": "D", "id": "1605914310746811866", - "name": "clanguml::t20020::D", + "name": "D", + "namespace": "clanguml::t20020", "source_location": { "column": 30, "file": "t20020.cc", @@ -184,9 +371,7 @@ int tmain() { "from": { "activity_id": "432124388562400664", - "activity_name": "clanguml::t20020::tmain()", - "participant_id": "432124388562400664", - "participant_name": "clanguml::t20020::tmain()" + "participant_id": "432124388562400664" }, "name": "a1()", "return_type": "int", @@ -199,7 +384,6 @@ int tmain() }, "to": { "activity_id": "43928675765534701", - "activity_name": "clanguml::t20020::A::a1()", "participant_id": "208941846648931609" }, "type": "message" @@ -212,9 +396,7 @@ int tmain() { "from": { "activity_id": "432124388562400664", - "activity_name": "clanguml::t20020::tmain()", - "participant_id": "432124388562400664", - "participant_name": "clanguml::t20020::tmain()" + "participant_id": "432124388562400664" }, "name": "a5()", "return_type": "int", @@ -227,7 +409,6 @@ int tmain() }, "to": { "activity_id": "1613457246223182826", - "activity_name": "clanguml::t20020::A::a5()", "participant_id": "208941846648931609" }, "type": "message" @@ -245,9 +426,7 @@ int tmain() { "from": { "activity_id": "432124388562400664", - "activity_name": "clanguml::t20020::tmain()", - "participant_id": "432124388562400664", - "participant_name": "clanguml::t20020::tmain()" + "participant_id": "432124388562400664" }, "name": "a2()", "return_type": "int", @@ -260,7 +439,6 @@ int tmain() }, "to": { "activity_id": "1289745252290688140", - "activity_name": "clanguml::t20020::A::a2()", "participant_id": "208941846648931609" }, "type": "message" @@ -268,9 +446,7 @@ int tmain() { "from": { "activity_id": "432124388562400664", - "activity_name": "clanguml::t20020::tmain()", - "participant_id": "432124388562400664", - "participant_name": "clanguml::t20020::tmain()" + "participant_id": "432124388562400664" }, "name": "c3(int)", "return_type": "int", @@ -283,7 +459,6 @@ int tmain() }, "to": { "activity_id": "1303438784842196201", - "activity_name": "clanguml::t20020::C::c3(int)", "participant_id": "1562462306909405383" }, "type": "message" @@ -291,9 +466,7 @@ int tmain() { "from": { "activity_id": "432124388562400664", - "activity_name": "clanguml::t20020::tmain()", - "participant_id": "432124388562400664", - "participant_name": "clanguml::t20020::tmain()" + "participant_id": "432124388562400664" }, "name": "b1()", "return_type": "int", @@ -306,7 +479,6 @@ int tmain() }, "to": { "activity_id": "542196582335607343", - "activity_name": "clanguml::t20020::B::b1()", "participant_id": "1342563483612170412" }, "type": "message" @@ -319,9 +491,7 @@ int tmain() { "from": { "activity_id": "432124388562400664", - "activity_name": "clanguml::t20020::tmain()", - "participant_id": "432124388562400664", - "participant_name": "clanguml::t20020::tmain()" + "participant_id": "432124388562400664" }, "name": "a3()", "return_type": "int", @@ -334,7 +504,6 @@ int tmain() }, "to": { "activity_id": "1983660679554669898", - "activity_name": "clanguml::t20020::A::a3()", "participant_id": "208941846648931609" }, "type": "message" @@ -342,9 +511,7 @@ int tmain() { "from": { "activity_id": "432124388562400664", - "activity_name": "clanguml::t20020::tmain()", - "participant_id": "432124388562400664", - "participant_name": "clanguml::t20020::tmain()" + "participant_id": "432124388562400664" }, "name": "b2()", "return_type": "int", @@ -357,7 +524,6 @@ int tmain() }, "to": { "activity_id": "505760236964179187", - "activity_name": "clanguml::t20020::B::b2()", "participant_id": "1342563483612170412" }, "type": "message" @@ -377,9 +543,7 @@ int tmain() { "from": { "activity_id": "432124388562400664", - "activity_name": "clanguml::t20020::tmain()", - "participant_id": "432124388562400664", - "participant_name": "clanguml::t20020::tmain()" + "participant_id": "432124388562400664" }, "name": "a4()", "return_type": "int", @@ -392,7 +556,6 @@ int tmain() }, "to": { "activity_id": "20573198999978866", - "activity_name": "clanguml::t20020::A::a4()", "participant_id": "208941846648931609" }, "type": "message" @@ -407,9 +570,7 @@ int tmain() { "from": { "activity_id": "432124388562400664", - "activity_name": "clanguml::t20020::tmain()", - "participant_id": "432124388562400664", - "participant_name": "clanguml::t20020::tmain()" + "participant_id": "432124388562400664" }, "name": "log()", "return_type": "void", @@ -422,7 +583,6 @@ int tmain() }, "to": { "activity_id": "1436250788704205026", - "activity_name": "clanguml::t20020::B::log()", "participant_id": "1342563483612170412" }, "type": "message" @@ -435,9 +595,7 @@ int tmain() { "from": { "activity_id": "432124388562400664", - "activity_name": "clanguml::t20020::tmain()", - "participant_id": "432124388562400664", - "participant_name": "clanguml::t20020::tmain()" + "participant_id": "432124388562400664" }, "name": "c1() const", "return_type": "void", @@ -450,7 +608,6 @@ int tmain() }, "to": { "activity_id": "1473521613404783653", - "activity_name": "clanguml::t20020::C::c1() const", "participant_id": "1562462306909405383" }, "type": "message" @@ -463,7 +620,6 @@ int tmain() { "from": { "activity_id": "1473521613404783653", - "activity_name": "clanguml::t20020::C::c1() const", "participant_id": "1562462306909405383" }, "name": "c2() const", @@ -477,7 +633,6 @@ int tmain() }, "to": { "activity_id": "1789116382725485914", - "activity_name": "clanguml::t20020::C::c2() const", "participant_id": "1562462306909405383" }, "type": "message" @@ -485,7 +640,6 @@ int tmain() { "from": { "activity_id": "1473521613404783653", - "activity_name": "clanguml::t20020::C::c1() const", "participant_id": "1562462306909405383" }, "name": "log() const", @@ -499,7 +653,6 @@ int tmain() }, "to": { "activity_id": "635780525021572670", - "activity_name": "clanguml::t20020::C::log() const", "participant_id": "1562462306909405383" }, "type": "message" @@ -526,9 +679,7 @@ int tmain() { "from": { "activity_id": "432124388562400664", - "activity_name": "clanguml::t20020::tmain()", - "participant_id": "432124388562400664", - "participant_name": "clanguml::t20020::tmain()" + "participant_id": "432124388562400664" }, "name": "d1(int,int)", "return_type": "int", @@ -541,7 +692,6 @@ int tmain() }, "to": { "activity_id": "1780002010052842766", - "activity_name": "clanguml::t20020::D::d1(int,int)", "participant_id": "1605914310746811866" }, "type": "message" diff --git a/docs/test_cases/t20020_sequence.svg b/docs/test_cases/t20020_sequence.svg index 4e25416c..599aed74 100644 --- a/docs/test_cases/t20020_sequence.svg +++ b/docs/test_cases/t20020_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,82 +9,82 @@ - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - + - - - + + + - - + + tmain() - + tmain() - - + + A - + A - - + + C - + C - - + + B - + B - - + + D<int> - + D<int> - - - - - - - - - - - - - - + + + + + + + + + + + + + + alt - + a1() @@ -92,7 +92,7 @@ - + a5() @@ -103,7 +103,7 @@ alt - + [ @@ -112,7 +112,7 @@ - + [ @@ -121,7 +121,7 @@ - + b1() @@ -129,7 +129,7 @@ - + [ @@ -138,7 +138,7 @@ - + b2() @@ -146,14 +146,14 @@ - + a4() - + log() @@ -161,7 +161,7 @@ alt - + c1() const @@ -169,7 +169,7 @@ alt - + @@ -182,7 +182,7 @@ - + @@ -192,7 +192,7 @@ alt - + d1(int,int) diff --git a/docs/test_cases/t20021.md b/docs/test_cases/t20021.md index 842372a8..aaa507b9 100644 --- a/docs/test_cases/t20021.md +++ b/docs/test_cases/t20021.md @@ -14,7 +14,7 @@ diagrams: - function: "clanguml::t20021::tmain()" ``` ## Source code -File t20021.cc +File `tests/t20021/t20021.cc` ```cpp #include @@ -85,8 +85,10 @@ int tmain() "name": "t20021_sequence", "participants": [ { + "display_name": "tmain()", "id": "1682631020380557915", - "name": "clanguml::t20021::tmain()", + "name": "tmain", + "namespace": "clanguml::t20021", "source_location": { "column": 5, "file": "t20021.cc", @@ -96,8 +98,90 @@ int tmain() "type": "function" }, { + "activities": [ + { + "display_name": "c4()", + "id": "124927877622321176", + "name": "c4", + "namespace": "", + "source_location": { + "column": 9, + "file": "t20021.cc", + "line": 22, + "translation_unit": "t20021.cc" + }, + "type": "method" + }, + { + "display_name": "c5()", + "id": "1325720714179808628", + "name": "c5", + "namespace": "", + "source_location": { + "column": 9, + "file": "t20021.cc", + "line": 23, + "translation_unit": "t20021.cc" + }, + "type": "method" + }, + { + "display_name": "c1()", + "id": "2143764740072323303", + "name": "c1", + "namespace": "", + "source_location": { + "column": 9, + "file": "t20021.cc", + "line": 19, + "translation_unit": "t20021.cc" + }, + "type": "method" + }, + { + "display_name": "c2()", + "id": "1707693479408501017", + "name": "c2", + "namespace": "", + "source_location": { + "column": 9, + "file": "t20021.cc", + "line": 20, + "translation_unit": "t20021.cc" + }, + "type": "method" + }, + { + "display_name": "c3()", + "id": "1302892753246800390", + "name": "c3", + "namespace": "", + "source_location": { + "column": 9, + "file": "t20021.cc", + "line": 21, + "translation_unit": "t20021.cc" + }, + "type": "method" + }, + { + "display_name": "contents()", + "id": "814405216385697964", + "name": "contents", + "namespace": "", + "source_location": { + "column": 23, + "file": "t20021.cc", + "line": 25, + "translation_unit": "t20021.cc" + }, + "type": "method" + } + ], + "display_name": "C", "id": "451128000259357438", - "name": "clanguml::t20021::C", + "name": "C", + "namespace": "clanguml::t20021", "source_location": { "column": 8, "file": "t20021.cc", @@ -107,8 +191,51 @@ int tmain() "type": "class" }, { + "activities": [ + { + "display_name": "a3()", + "id": "1867955233624891190", + "name": "a3", + "namespace": "", + "source_location": { + "column": 9, + "file": "t20021.cc", + "line": 8, + "translation_unit": "t20021.cc" + }, + "type": "method" + }, + { + "display_name": "a2()", + "id": "1139294797758415018", + "name": "a2", + "namespace": "", + "source_location": { + "column": 9, + "file": "t20021.cc", + "line": 7, + "translation_unit": "t20021.cc" + }, + "type": "method" + }, + { + "display_name": "a1()", + "id": "1659488549696810992", + "name": "a1", + "namespace": "", + "source_location": { + "column": 9, + "file": "t20021.cc", + "line": 6, + "translation_unit": "t20021.cc" + }, + "type": "method" + } + ], + "display_name": "A", "id": "1280483607329510730", - "name": "clanguml::t20021::A", + "name": "A", + "namespace": "clanguml::t20021", "source_location": { "column": 8, "file": "t20021.cc", @@ -118,8 +245,25 @@ int tmain() "type": "class" }, { + "activities": [ + { + "display_name": "b2() const", + "id": "1561040999276563077", + "name": "b2", + "namespace": "", + "source_location": { + "column": 9, + "file": "t20021.cc", + "line": 15, + "translation_unit": "t20021.cc" + }, + "type": "method" + } + ], + "display_name": "B", "id": "1849696080443395393", - "name": "clanguml::t20021::B", + "name": "B", + "namespace": "clanguml::t20021", "source_location": { "column": 8, "file": "t20021.cc", @@ -138,9 +282,7 @@ int tmain() { "from": { "activity_id": "1682631020380557915", - "activity_name": "clanguml::t20021::tmain()", - "participant_id": "1682631020380557915", - "participant_name": "clanguml::t20021::tmain()" + "participant_id": "1682631020380557915" }, "name": "c4()", "return_type": "int", @@ -153,7 +295,6 @@ int tmain() }, "to": { "activity_id": "124927877622321176", - "activity_name": "clanguml::t20021::C::c4()", "participant_id": "451128000259357438" }, "type": "message" @@ -161,7 +302,6 @@ int tmain() { "from": { "activity_id": "124927877622321176", - "activity_name": "clanguml::t20021::C::c4()", "participant_id": "451128000259357438" }, "name": "c5()", @@ -175,7 +315,6 @@ int tmain() }, "to": { "activity_id": "1325720714179808628", - "activity_name": "clanguml::t20021::C::c5()", "participant_id": "451128000259357438" }, "type": "message" @@ -183,9 +322,7 @@ int tmain() { "from": { "activity_id": "1682631020380557915", - "activity_name": "clanguml::t20021::tmain()", - "participant_id": "1682631020380557915", - "participant_name": "clanguml::t20021::tmain()" + "participant_id": "1682631020380557915" }, "name": "a3()", "return_type": "int", @@ -198,7 +335,6 @@ int tmain() }, "to": { "activity_id": "1867955233624891190", - "activity_name": "clanguml::t20021::A::a3()", "participant_id": "1280483607329510730" }, "type": "message" @@ -212,9 +348,7 @@ int tmain() { "from": { "activity_id": "1682631020380557915", - "activity_name": "clanguml::t20021::tmain()", - "participant_id": "1682631020380557915", - "participant_name": "clanguml::t20021::tmain()" + "participant_id": "1682631020380557915" }, "name": "a2()", "return_type": "int", @@ -227,7 +361,6 @@ int tmain() }, "to": { "activity_id": "1139294797758415018", - "activity_name": "clanguml::t20021::A::a2()", "participant_id": "1280483607329510730" }, "type": "message" @@ -235,9 +368,7 @@ int tmain() { "from": { "activity_id": "1682631020380557915", - "activity_name": "clanguml::t20021::tmain()", - "participant_id": "1682631020380557915", - "participant_name": "clanguml::t20021::tmain()" + "participant_id": "1682631020380557915" }, "name": "c1()", "return_type": "int", @@ -250,7 +381,6 @@ int tmain() }, "to": { "activity_id": "2143764740072323303", - "activity_name": "clanguml::t20021::C::c1()", "participant_id": "451128000259357438" }, "type": "message" @@ -258,9 +388,7 @@ int tmain() { "from": { "activity_id": "1682631020380557915", - "activity_name": "clanguml::t20021::tmain()", - "participant_id": "1682631020380557915", - "participant_name": "clanguml::t20021::tmain()" + "participant_id": "1682631020380557915" }, "name": "c2()", "return_type": "int", @@ -273,7 +401,6 @@ int tmain() }, "to": { "activity_id": "1707693479408501017", - "activity_name": "clanguml::t20021::C::c2()", "participant_id": "451128000259357438" }, "type": "message" @@ -281,9 +408,7 @@ int tmain() { "from": { "activity_id": "1682631020380557915", - "activity_name": "clanguml::t20021::tmain()", - "participant_id": "1682631020380557915", - "participant_name": "clanguml::t20021::tmain()" + "participant_id": "1682631020380557915" }, "name": "a1()", "return_type": "int", @@ -296,7 +421,6 @@ int tmain() }, "to": { "activity_id": "1659488549696810992", - "activity_name": "clanguml::t20021::A::a1()", "participant_id": "1280483607329510730" }, "type": "message" @@ -308,9 +432,7 @@ int tmain() { "from": { "activity_id": "1682631020380557915", - "activity_name": "clanguml::t20021::tmain()", - "participant_id": "1682631020380557915", - "participant_name": "clanguml::t20021::tmain()" + "participant_id": "1682631020380557915" }, "name": "c3()", "return_type": "int", @@ -323,7 +445,6 @@ int tmain() }, "to": { "activity_id": "1302892753246800390", - "activity_name": "clanguml::t20021::C::c3()", "participant_id": "451128000259357438" }, "type": "message" @@ -342,9 +463,7 @@ int tmain() { "from": { "activity_id": "1682631020380557915", - "activity_name": "clanguml::t20021::tmain()", - "participant_id": "1682631020380557915", - "participant_name": "clanguml::t20021::tmain()" + "participant_id": "1682631020380557915" }, "name": "b2() const", "return_type": "int", @@ -357,7 +476,6 @@ int tmain() }, "to": { "activity_id": "1561040999276563077", - "activity_name": "clanguml::t20021::B::b2() const", "participant_id": "1849696080443395393" }, "type": "message" @@ -372,9 +490,7 @@ int tmain() { "from": { "activity_id": "1682631020380557915", - "activity_name": "clanguml::t20021::tmain()", - "participant_id": "1682631020380557915", - "participant_name": "clanguml::t20021::tmain()" + "participant_id": "1682631020380557915" }, "name": "contents()", "return_type": "std::vector &", @@ -387,7 +503,6 @@ int tmain() }, "to": { "activity_id": "814405216385697964", - "activity_name": "clanguml::t20021::C::contents()", "participant_id": "451128000259357438" }, "type": "message" @@ -399,9 +514,7 @@ int tmain() { "from": { "activity_id": "1682631020380557915", - "activity_name": "clanguml::t20021::tmain()", - "participant_id": "1682631020380557915", - "participant_name": "clanguml::t20021::tmain()" + "participant_id": "1682631020380557915" }, "name": "b2() const", "return_type": "int", @@ -414,7 +527,6 @@ int tmain() }, "to": { "activity_id": "1561040999276563077", - "activity_name": "clanguml::t20021::B::b2() const", "participant_id": "1849696080443395393" }, "type": "message" diff --git a/docs/test_cases/t20021_sequence.svg b/docs/test_cases/t20021_sequence.svg index d1882660..a004c93c 100644 --- a/docs/test_cases/t20021_sequence.svg +++ b/docs/test_cases/t20021_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,74 +9,74 @@ - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - - + + tmain() - + tmain() - - + + C - + C - - + + A - + A - - + + B - + B - - - - - - - - - - - - + + + + + + + + + + + + loop - + [ c4() ] - + @@ -89,7 +89,7 @@ - + a3() @@ -102,7 +102,7 @@ loop - + [ @@ -111,7 +111,7 @@ - + [ @@ -120,7 +120,7 @@ - + [ @@ -129,14 +129,14 @@ - + a1() - + [ @@ -148,7 +148,7 @@ loop - + b2() const @@ -158,7 +158,7 @@ loop - + [ @@ -167,7 +167,7 @@ - + b2() const diff --git a/docs/test_cases/t20022.md b/docs/test_cases/t20022.md index bbd03ba5..3a5b201f 100644 --- a/docs/test_cases/t20022.md +++ b/docs/test_cases/t20022.md @@ -14,7 +14,7 @@ diagrams: - function: "clanguml::t20022::tmain()" ``` ## Source code -File t20022.cc +File `tests/t20022/t20022.cc` ```cpp #include @@ -65,8 +65,10 @@ int tmain() "name": "t20022_sequence", "participants": [ { + "display_name": "tmain()", "id": "1374011101998494743", - "name": "clanguml::t20022::tmain()", + "name": "tmain", + "namespace": "clanguml::t20022", "source_location": { "column": 5, "file": "t20022.cc", @@ -76,8 +78,38 @@ int tmain() "type": "function" }, { + "activities": [ + { + "display_name": "A(std::unique_ptr
)", + "id": "1226569306557207632", + "name": "A", + "namespace": "", + "source_location": { + "column": 4, + "file": "t20022.cc", + "line": 21, + "translation_unit": "t20022.cc" + }, + "type": "method" + }, + { + "display_name": "a()", + "id": "1158824701633811441", + "name": "a", + "namespace": "", + "source_location": { + "column": 9, + "file": "t20022.cc", + "line": 26, + "translation_unit": "t20022.cc" + }, + "type": "method" + } + ], + "display_name": "A", "id": "1535467498096081224", - "name": "clanguml::t20022::A", + "name": "A", + "namespace": "clanguml::t20022", "source_location": { "column": 7, "file": "t20022.cc", @@ -87,8 +119,25 @@ int tmain() "type": "class" }, { + "activities": [ + { + "display_name": "b()", + "id": "2114222968575993291", + "name": "b", + "namespace": "", + "source_location": { + "column": 10, + "file": "t20022.cc", + "line": 18, + "translation_unit": "t20022.cc" + }, + "type": "method" + } + ], + "display_name": "B", "id": "1316821731069034940", - "name": "clanguml::t20022::B", + "name": "B", + "namespace": "clanguml::t20022", "source_location": { "column": 7, "file": "t20022.cc", @@ -104,9 +153,7 @@ int tmain() { "from": { "activity_id": "1374011101998494743", - "activity_name": "clanguml::t20022::tmain()", - "participant_id": "1374011101998494743", - "participant_name": "clanguml::t20022::tmain()" + "participant_id": "1374011101998494743" }, "name": "A(std::unique_ptr)", "return_type": "void", @@ -119,7 +166,6 @@ int tmain() }, "to": { "activity_id": "1226569306557207632", - "activity_name": "clanguml::t20022::A::A(std::unique_ptr)", "participant_id": "1535467498096081224" }, "type": "message" @@ -127,9 +173,7 @@ int tmain() { "from": { "activity_id": "1374011101998494743", - "activity_name": "clanguml::t20022::tmain()", - "participant_id": "1374011101998494743", - "participant_name": "clanguml::t20022::tmain()" + "participant_id": "1374011101998494743" }, "name": "a()", "return_type": "void", @@ -142,7 +186,6 @@ int tmain() }, "to": { "activity_id": "1158824701633811441", - "activity_name": "clanguml::t20022::A::a()", "participant_id": "1535467498096081224" }, "type": "message" @@ -150,7 +193,6 @@ int tmain() { "from": { "activity_id": "1158824701633811441", - "activity_name": "clanguml::t20022::A::a()", "participant_id": "1535467498096081224" }, "name": "b()", @@ -164,7 +206,6 @@ int tmain() }, "to": { "activity_id": "2114222968575993291", - "activity_name": "clanguml::t20022::B::b()", "participant_id": "1316821731069034940" }, "type": "message" diff --git a/docs/test_cases/t20022_sequence.svg b/docs/test_cases/t20022_sequence.svg index 4395b792..97dc7a3c 100644 --- a/docs/test_cases/t20022_sequence.svg +++ b/docs/test_cases/t20022_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,47 +9,47 @@ - - - - + + + + - - + + tmain() - + tmain() - - + + A - + A - - + + B - + B - - - - - + + + + + A(std::unique_ptr ) - + a() - + b() diff --git a/docs/test_cases/t20023.md b/docs/test_cases/t20023.md index 923520d1..2c6e8223 100644 --- a/docs/test_cases/t20023.md +++ b/docs/test_cases/t20023.md @@ -14,7 +14,7 @@ diagrams: - function: "clanguml::t20023::tmain()" ``` ## Source code -File t20023.cc +File `tests/t20023/t20023.cc` ```cpp #include @@ -68,8 +68,10 @@ int tmain() "name": "t20023_sequence", "participants": [ { + "display_name": "tmain()", "id": "761552264135157511", - "name": "clanguml::t20023::tmain()", + "name": "tmain", + "namespace": "clanguml::t20023", "source_location": { "column": 5, "file": "t20023.cc", @@ -79,8 +81,77 @@ int tmain() "type": "function" }, { + "activities": [ + { + "display_name": "a()", + "id": "530651320277188697", + "name": "a", + "namespace": "", + "source_location": { + "column": 9, + "file": "t20023.cc", + "line": 12, + "translation_unit": "t20023.cc" + }, + "type": "method" + }, + { + "display_name": "a1()", + "id": "94135113932519208", + "name": "a1", + "namespace": "", + "source_location": { + "column": 9, + "file": "t20023.cc", + "line": 7, + "translation_unit": "t20023.cc" + }, + "type": "method" + }, + { + "display_name": "a2()", + "id": "2060438178899014465", + "name": "a2", + "namespace": "", + "source_location": { + "column": 9, + "file": "t20023.cc", + "line": 8, + "translation_unit": "t20023.cc" + }, + "type": "method" + }, + { + "display_name": "a3()", + "id": "1776927259621603017", + "name": "a3", + "namespace": "", + "source_location": { + "column": 9, + "file": "t20023.cc", + "line": 9, + "translation_unit": "t20023.cc" + }, + "type": "method" + }, + { + "display_name": "a4()", + "id": "1082587698374248813", + "name": "a4", + "namespace": "", + "source_location": { + "column": 9, + "file": "t20023.cc", + "line": 10, + "translation_unit": "t20023.cc" + }, + "type": "method" + } + ], + "display_name": "A", "id": "750638294800359616", - "name": "clanguml::t20023::A", + "name": "A", + "namespace": "clanguml::t20023", "source_location": { "column": 8, "file": "t20023.cc", @@ -96,9 +167,7 @@ int tmain() { "from": { "activity_id": "761552264135157511", - "activity_name": "clanguml::t20023::tmain()", - "participant_id": "761552264135157511", - "participant_name": "clanguml::t20023::tmain()" + "participant_id": "761552264135157511" }, "name": "a()", "return_type": "int", @@ -111,7 +180,6 @@ int tmain() }, "to": { "activity_id": "530651320277188697", - "activity_name": "clanguml::t20023::A::a()", "participant_id": "750638294800359616" }, "type": "message" @@ -124,7 +192,6 @@ int tmain() { "from": { "activity_id": "530651320277188697", - "activity_name": "clanguml::t20023::A::a()", "participant_id": "750638294800359616" }, "name": "a1()", @@ -138,7 +205,6 @@ int tmain() }, "to": { "activity_id": "94135113932519208", - "activity_name": "clanguml::t20023::A::a1()", "participant_id": "750638294800359616" }, "type": "message" @@ -151,7 +217,6 @@ int tmain() { "from": { "activity_id": "530651320277188697", - "activity_name": "clanguml::t20023::A::a()", "participant_id": "750638294800359616" }, "name": "a2()", @@ -165,7 +230,6 @@ int tmain() }, "to": { "activity_id": "2060438178899014465", - "activity_name": "clanguml::t20023::A::a2()", "participant_id": "750638294800359616" }, "type": "message" @@ -178,7 +242,6 @@ int tmain() { "from": { "activity_id": "530651320277188697", - "activity_name": "clanguml::t20023::A::a()", "participant_id": "750638294800359616" }, "name": "a3()", @@ -192,7 +255,6 @@ int tmain() }, "to": { "activity_id": "1776927259621603017", - "activity_name": "clanguml::t20023::A::a3()", "participant_id": "750638294800359616" }, "type": "message" @@ -205,7 +267,6 @@ int tmain() { "from": { "activity_id": "530651320277188697", - "activity_name": "clanguml::t20023::A::a()", "participant_id": "750638294800359616" }, "name": "a4()", @@ -219,7 +280,6 @@ int tmain() }, "to": { "activity_id": "1082587698374248813", - "activity_name": "clanguml::t20023::A::a4()", "participant_id": "750638294800359616" }, "type": "message" diff --git a/docs/test_cases/t20023_sequence.svg b/docs/test_cases/t20023_sequence.svg index 7b97fa28..9f18b116 100644 --- a/docs/test_cases/t20023_sequence.svg +++ b/docs/test_cases/t20023_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,37 +9,37 @@ - - - - - - - + + + + + + + - - + + tmain() - + tmain() - - + + A - + A - - - - - - - + + + + + + + a() @@ -47,7 +47,7 @@ try - + @@ -60,7 +60,7 @@ [std::runtime_error &] - + @@ -73,7 +73,7 @@ [std::logic_error &] - + @@ -86,7 +86,7 @@ [...] - + diff --git a/docs/test_cases/t20024.md b/docs/test_cases/t20024.md index 2df7d3c2..83fdb4c9 100644 --- a/docs/test_cases/t20024.md +++ b/docs/test_cases/t20024.md @@ -14,7 +14,7 @@ diagrams: - function: "clanguml::t20024::tmain()" ``` ## Source code -File t20024.cc +File `tests/t20024/t20024.cc` ```cpp namespace clanguml { namespace t20024 { @@ -93,8 +93,10 @@ int tmain() "name": "t20024_sequence", "participants": [ { + "display_name": "tmain()", "id": "1919714441225983014", - "name": "clanguml::t20024::tmain()", + "name": "tmain", + "namespace": "clanguml::t20024", "source_location": { "column": 5, "file": "t20024.cc", @@ -104,8 +106,77 @@ int tmain() "type": "function" }, { + "activities": [ + { + "display_name": "select(enum_a)", + "id": "1200587047701031901", + "name": "select", + "namespace": "", + "source_location": { + "column": 9, + "file": "t20024.cc", + "line": 9, + "translation_unit": "t20024.cc" + }, + "type": "method" + }, + { + "display_name": "a0()", + "id": "1859614580641799156", + "name": "a0", + "namespace": "", + "source_location": { + "column": 9, + "file": "t20024.cc", + "line": 23, + "translation_unit": "t20024.cc" + }, + "type": "method" + }, + { + "display_name": "a1()", + "id": "501598940454911460", + "name": "a1", + "namespace": "", + "source_location": { + "column": 9, + "file": "t20024.cc", + "line": 24, + "translation_unit": "t20024.cc" + }, + "type": "method" + }, + { + "display_name": "a2()", + "id": "1698866541173753340", + "name": "a2", + "namespace": "", + "source_location": { + "column": 9, + "file": "t20024.cc", + "line": 25, + "translation_unit": "t20024.cc" + }, + "type": "method" + }, + { + "display_name": "a3()", + "id": "490376438551958259", + "name": "a3", + "namespace": "", + "source_location": { + "column": 9, + "file": "t20024.cc", + "line": 26, + "translation_unit": "t20024.cc" + }, + "type": "method" + } + ], + "display_name": "A", "id": "40786919835708828", - "name": "clanguml::t20024::A", + "name": "A", + "namespace": "clanguml::t20024", "source_location": { "column": 8, "file": "t20024.cc", @@ -115,8 +186,77 @@ int tmain() "type": "class" }, { + "activities": [ + { + "display_name": "select(colors)", + "id": "286108218156977422", + "name": "select", + "namespace": "", + "source_location": { + "column": 10, + "file": "t20024.cc", + "line": 30, + "translation_unit": "t20024.cc" + }, + "type": "method" + }, + { + "display_name": "red()", + "id": "112014563206084467", + "name": "red", + "namespace": "", + "source_location": { + "column": 10, + "file": "t20024.cc", + "line": 47, + "translation_unit": "t20024.cc" + }, + "type": "method" + }, + { + "display_name": "orange()", + "id": "2222823236498505185", + "name": "orange", + "namespace": "", + "source_location": { + "column": 10, + "file": "t20024.cc", + "line": 48, + "translation_unit": "t20024.cc" + }, + "type": "method" + }, + { + "display_name": "green()", + "id": "519021723720658376", + "name": "green", + "namespace": "", + "source_location": { + "column": 10, + "file": "t20024.cc", + "line": 49, + "translation_unit": "t20024.cc" + }, + "type": "method" + }, + { + "display_name": "grey()", + "id": "1813557671878544737", + "name": "grey", + "namespace": "", + "source_location": { + "column": 10, + "file": "t20024.cc", + "line": 50, + "translation_unit": "t20024.cc" + }, + "type": "method" + } + ], + "display_name": "B", "id": "933287014626440872", - "name": "clanguml::t20024::B", + "name": "B", + "namespace": "clanguml::t20024", "source_location": { "column": 8, "file": "t20024.cc", @@ -132,9 +272,7 @@ int tmain() { "from": { "activity_id": "1919714441225983014", - "activity_name": "clanguml::t20024::tmain()", - "participant_id": "1919714441225983014", - "participant_name": "clanguml::t20024::tmain()" + "participant_id": "1919714441225983014" }, "name": "select(enum_a)", "return_type": "int", @@ -147,7 +285,6 @@ int tmain() }, "to": { "activity_id": "1200587047701031901", - "activity_name": "clanguml::t20024::A::select(enum_a)", "participant_id": "40786919835708828" }, "type": "message" @@ -160,7 +297,6 @@ int tmain() { "from": { "activity_id": "1200587047701031901", - "activity_name": "clanguml::t20024::A::select(enum_a)", "participant_id": "40786919835708828" }, "name": "a0()", @@ -174,7 +310,6 @@ int tmain() }, "to": { "activity_id": "1859614580641799156", - "activity_name": "clanguml::t20024::A::a0()", "participant_id": "40786919835708828" }, "type": "message" @@ -188,7 +323,6 @@ int tmain() { "from": { "activity_id": "1200587047701031901", - "activity_name": "clanguml::t20024::A::select(enum_a)", "participant_id": "40786919835708828" }, "name": "a1()", @@ -202,7 +336,6 @@ int tmain() }, "to": { "activity_id": "501598940454911460", - "activity_name": "clanguml::t20024::A::a1()", "participant_id": "40786919835708828" }, "type": "message" @@ -216,7 +349,6 @@ int tmain() { "from": { "activity_id": "1200587047701031901", - "activity_name": "clanguml::t20024::A::select(enum_a)", "participant_id": "40786919835708828" }, "name": "a2()", @@ -230,7 +362,6 @@ int tmain() }, "to": { "activity_id": "1698866541173753340", - "activity_name": "clanguml::t20024::A::a2()", "participant_id": "40786919835708828" }, "type": "message" @@ -244,7 +375,6 @@ int tmain() { "from": { "activity_id": "1200587047701031901", - "activity_name": "clanguml::t20024::A::select(enum_a)", "participant_id": "40786919835708828" }, "name": "a3()", @@ -258,7 +388,6 @@ int tmain() }, "to": { "activity_id": "490376438551958259", - "activity_name": "clanguml::t20024::A::a3()", "participant_id": "40786919835708828" }, "type": "message" @@ -274,9 +403,7 @@ int tmain() { "from": { "activity_id": "1919714441225983014", - "activity_name": "clanguml::t20024::tmain()", - "participant_id": "1919714441225983014", - "participant_name": "clanguml::t20024::tmain()" + "participant_id": "1919714441225983014" }, "name": "select(colors)", "return_type": "void", @@ -289,7 +416,6 @@ int tmain() }, "to": { "activity_id": "286108218156977422", - "activity_name": "clanguml::t20024::B::select(colors)", "participant_id": "933287014626440872" }, "type": "message" @@ -302,7 +428,6 @@ int tmain() { "from": { "activity_id": "286108218156977422", - "activity_name": "clanguml::t20024::B::select(colors)", "participant_id": "933287014626440872" }, "name": "red()", @@ -316,7 +441,6 @@ int tmain() }, "to": { "activity_id": "112014563206084467", - "activity_name": "clanguml::t20024::B::red()", "participant_id": "933287014626440872" }, "type": "message" @@ -330,7 +454,6 @@ int tmain() { "from": { "activity_id": "286108218156977422", - "activity_name": "clanguml::t20024::B::select(colors)", "participant_id": "933287014626440872" }, "name": "orange()", @@ -344,7 +467,6 @@ int tmain() }, "to": { "activity_id": "2222823236498505185", - "activity_name": "clanguml::t20024::B::orange()", "participant_id": "933287014626440872" }, "type": "message" @@ -358,7 +480,6 @@ int tmain() { "from": { "activity_id": "286108218156977422", - "activity_name": "clanguml::t20024::B::select(colors)", "participant_id": "933287014626440872" }, "name": "green()", @@ -372,7 +493,6 @@ int tmain() }, "to": { "activity_id": "519021723720658376", - "activity_name": "clanguml::t20024::B::green()", "participant_id": "933287014626440872" }, "type": "message" @@ -386,7 +506,6 @@ int tmain() { "from": { "activity_id": "286108218156977422", - "activity_name": "clanguml::t20024::B::select(colors)", "participant_id": "933287014626440872" }, "name": "grey()", @@ -400,7 +519,6 @@ int tmain() }, "to": { "activity_id": "1813557671878544737", - "activity_name": "clanguml::t20024::B::grey()", "participant_id": "933287014626440872" }, "type": "message" diff --git a/docs/test_cases/t20024_sequence.svg b/docs/test_cases/t20024_sequence.svg index 0db18bd4..ee65f3a4 100644 --- a/docs/test_cases/t20024_sequence.svg +++ b/docs/test_cases/t20024_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,23 +9,23 @@ - - - - - - - - - - - - + + + + + + + + + + + + - + @@ -33,36 +33,36 @@ - - + + tmain() - + tmain() - - + + A - + A - - + + B - + B - - - - - - - - - - - - + + + + + + + + + + + + select(enum_a) @@ -72,7 +72,7 @@ switch [zero] - + @@ -85,7 +85,7 @@ [one] - + @@ -98,7 +98,7 @@ [two] - + @@ -111,7 +111,7 @@ [default] - + @@ -124,7 +124,7 @@ - + select(colors) @@ -134,7 +134,7 @@ switch [enum colors::red] - + @@ -143,7 +143,7 @@ [enum colors::orange] - + @@ -152,7 +152,7 @@ [enum colors::green] - + @@ -161,7 +161,7 @@ [default] - + diff --git a/docs/test_cases/t20025.md b/docs/test_cases/t20025.md index 3bf4fe21..fccaf773 100644 --- a/docs/test_cases/t20025.md +++ b/docs/test_cases/t20025.md @@ -14,7 +14,7 @@ diagrams: - function: "clanguml::t20025::tmain()" ``` ## Source code -File t20025.cc +File `tests/t20025/t20025.cc` ```cpp namespace clanguml { namespace t20025 { @@ -73,8 +73,10 @@ int tmain() "name": "t20025_sequence", "participants": [ { + "display_name": "tmain()", "id": "1268545806896171690", - "name": "clanguml::t20025::tmain()", + "name": "tmain", + "namespace": "clanguml::t20025", "source_location": { "column": 5, "file": "t20025.cc", @@ -84,8 +86,25 @@ int tmain() "type": "function" }, { + "activities": [ + { + "display_name": "a()", + "id": "1119830104994271584", + "name": "a", + "namespace": "", + "source_location": { + "column": 9, + "file": "t20025.cc", + "line": 15, + "translation_unit": "t20025.cc" + }, + "type": "method" + } + ], + "display_name": "A", "id": "2144852170258286289", - "name": "clanguml::t20025::A", + "name": "A", + "namespace": "clanguml::t20025", "source_location": { "column": 8, "file": "t20025.cc", @@ -95,8 +114,10 @@ int tmain() "type": "class" }, { + "display_name": "add(int,int)", "id": "228843323046630374", - "name": "clanguml::t20025::add(int,int)", + "name": "add", + "namespace": "clanguml::t20025", "source_location": { "column": 5, "file": "t20025.cc", @@ -112,9 +133,7 @@ int tmain() { "from": { "activity_id": "1268545806896171690", - "activity_name": "clanguml::t20025::tmain()", - "participant_id": "1268545806896171690", - "participant_name": "clanguml::t20025::tmain()" + "participant_id": "1268545806896171690" }, "name": "a()", "return_type": "int", @@ -127,7 +146,6 @@ int tmain() }, "to": { "activity_id": "1119830104994271584", - "activity_name": "clanguml::t20025::A::a()", "participant_id": "2144852170258286289" }, "type": "message" @@ -135,9 +153,7 @@ int tmain() { "from": { "activity_id": "1268545806896171690", - "activity_name": "clanguml::t20025::tmain()", - "participant_id": "1268545806896171690", - "participant_name": "clanguml::t20025::tmain()" + "participant_id": "1268545806896171690" }, "name": "", "return_type": "int", @@ -150,7 +166,6 @@ int tmain() }, "to": { "activity_id": "228843323046630374", - "activity_name": "clanguml::t20025::add(int,int)", "participant_id": "228843323046630374" }, "type": "message" diff --git a/docs/test_cases/t20025_sequence.svg b/docs/test_cases/t20025_sequence.svg index f919c8ee..218e3874 100644 --- a/docs/test_cases/t20025_sequence.svg +++ b/docs/test_cases/t20025_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,41 +9,41 @@ - - - + + + - - + + tmain() - + tmain() - - + + A - + A - - + + add(int,int) - + add(int,int) - - - - + + + + a() - + diff --git a/docs/test_cases/t20026.md b/docs/test_cases/t20026.md index 19a12b67..dcb559c4 100644 --- a/docs/test_cases/t20026.md +++ b/docs/test_cases/t20026.md @@ -14,7 +14,7 @@ diagrams: - function: "clanguml::t20026::tmain()" ``` ## Source code -File t20026.cc +File `tests/t20026/t20026.cc` ```cpp namespace clanguml { namespace t20026 { @@ -53,8 +53,10 @@ int tmain() "name": "t20026_sequence", "participants": [ { + "display_name": "tmain()", "id": "2268697350307997040", - "name": "clanguml::t20026::tmain()", + "name": "tmain", + "namespace": "clanguml::t20026", "source_location": { "column": 5, "file": "t20026.cc", @@ -64,8 +66,25 @@ int tmain() "type": "function" }, { + "activities": [ + { + "display_name": "a()", + "id": "600590770418147864", + "name": "a", + "namespace": "", + "source_location": { + "column": 18, + "file": "t20026.cc", + "line": 5, + "translation_unit": "t20026.cc" + }, + "type": "method" + } + ], + "display_name": "A", "id": "1962121823853291899", - "name": "clanguml::t20026::A", + "name": "A", + "namespace": "clanguml::t20026", "source_location": { "column": 8, "file": "t20026.cc", @@ -81,9 +100,7 @@ int tmain() { "from": { "activity_id": "2268697350307997040", - "activity_name": "clanguml::t20026::tmain()", - "participant_id": "2268697350307997040", - "participant_name": "clanguml::t20026::tmain()" + "participant_id": "2268697350307997040" }, "name": "a()", "return_type": "void", @@ -96,7 +113,6 @@ int tmain() }, "to": { "activity_id": "600590770418147864", - "activity_name": "clanguml::t20026::A::a()", "participant_id": "1962121823853291899" }, "type": "message" diff --git a/docs/test_cases/t20026_sequence.svg b/docs/test_cases/t20026_sequence.svg index 0e383134..10fd7f6c 100644 --- a/docs/test_cases/t20026_sequence.svg +++ b/docs/test_cases/t20026_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,25 +9,25 @@ - - + + - - + + tmain() - + tmain() - - + + A - + A - - - + + + a() diff --git a/docs/test_cases/t20027.md b/docs/test_cases/t20027.md index 6b75773c..debe9624 100644 --- a/docs/test_cases/t20027.md +++ b/docs/test_cases/t20027.md @@ -16,7 +16,7 @@ diagrams: - function: "clanguml::t20027::tmain()" ``` ## Source code -File t20027.cc +File `tests/t20027/t20027.cc` ```cpp namespace clanguml { namespace t20027 { @@ -52,8 +52,10 @@ void tmain() "name": "t20027_sequence", "participants": [ { + "display_name": "tmain()", "id": "1581009482994430286", - "name": "clanguml::t20027::tmain()", + "name": "tmain", + "namespace": "clanguml::t20027", "source_location": { "column": 6, "file": "t20027.cc", @@ -63,8 +65,25 @@ void tmain() "type": "function" }, { + "activities": [ + { + "display_name": "a()", + "id": "910514967786202717", + "name": "a", + "namespace": "", + "source_location": { + "column": 10, + "file": "t20027.cc", + "line": 6, + "translation_unit": "t20027.cc" + }, + "type": "method" + } + ], + "display_name": "A", "id": "583525629936262089", - "name": "clanguml::t20027::A", + "name": "A", + "namespace": "clanguml::t20027", "source_location": { "column": 7, "file": "t20027.cc", @@ -80,9 +99,7 @@ void tmain() { "from": { "activity_id": "1581009482994430286", - "activity_name": "clanguml::t20027::tmain()", - "participant_id": "1581009482994430286", - "participant_name": "clanguml::t20027::tmain()" + "participant_id": "1581009482994430286" }, "name": "a()", "return_type": "void", @@ -95,7 +112,6 @@ void tmain() }, "to": { "activity_id": "910514967786202717", - "activity_name": "clanguml::t20027::A::a()", "participant_id": "583525629936262089" }, "type": "message" diff --git a/docs/test_cases/t20027_sequence.svg b/docs/test_cases/t20027_sequence.svg index a246289c..d2e2cf4e 100644 --- a/docs/test_cases/t20027_sequence.svg +++ b/docs/test_cases/t20027_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,25 +9,25 @@ - - + + - - + + tmain() - + tmain() - - + + A - + A - - - + + + a() diff --git a/docs/test_cases/t20028.md b/docs/test_cases/t20028.md index 584adaa4..9f698cdd 100644 --- a/docs/test_cases/t20028.md +++ b/docs/test_cases/t20028.md @@ -17,7 +17,7 @@ diagrams: - function: "clanguml::t20028::tmain()" ``` ## Source code -File t20028.cc +File `tests/t20028/t20028.cc` ```cpp namespace clanguml { namespace t20028 { @@ -62,8 +62,10 @@ int tmain() "name": "t20028_sequence", "participants": [ { + "display_name": "tmain()", "id": "1347206662193933194", - "name": "clanguml::t20028::tmain()", + "name": "tmain", + "namespace": "clanguml::t20028", "source_location": { "column": 5, "file": "t20028.cc", @@ -73,8 +75,64 @@ int tmain() "type": "function" }, { + "activities": [ + { + "display_name": "a()", + "id": "666210834901940781", + "name": "a", + "namespace": "", + "source_location": { + "column": 9, + "file": "t20028.cc", + "line": 5, + "translation_unit": "t20028.cc" + }, + "type": "method" + }, + { + "display_name": "b()", + "id": "793793464184037795", + "name": "b", + "namespace": "", + "source_location": { + "column": 9, + "file": "t20028.cc", + "line": 6, + "translation_unit": "t20028.cc" + }, + "type": "method" + }, + { + "display_name": "c()", + "id": "1582152567698110078", + "name": "c", + "namespace": "", + "source_location": { + "column": 9, + "file": "t20028.cc", + "line": 7, + "translation_unit": "t20028.cc" + }, + "type": "method" + }, + { + "display_name": "d()", + "id": "1178268687951492696", + "name": "d", + "namespace": "", + "source_location": { + "column": 9, + "file": "t20028.cc", + "line": 8, + "translation_unit": "t20028.cc" + }, + "type": "method" + } + ], + "display_name": "A", "id": "2073479923903128898", - "name": "clanguml::t20028::A", + "name": "A", + "namespace": "clanguml::t20028", "source_location": { "column": 8, "file": "t20028.cc", @@ -95,9 +153,7 @@ int tmain() { "from": { "activity_id": "1347206662193933194", - "activity_name": "clanguml::t20028::tmain()", - "participant_id": "1347206662193933194", - "participant_name": "clanguml::t20028::tmain()" + "participant_id": "1347206662193933194" }, "name": "a()", "return_type": "int", @@ -110,7 +166,6 @@ int tmain() }, "to": { "activity_id": "666210834901940781", - "activity_name": "clanguml::t20028::A::a()", "participant_id": "2073479923903128898" }, "type": "message" @@ -118,9 +173,7 @@ int tmain() { "from": { "activity_id": "1347206662193933194", - "activity_name": "clanguml::t20028::tmain()", - "participant_id": "1347206662193933194", - "participant_name": "clanguml::t20028::tmain()" + "participant_id": "1347206662193933194" }, "name": "b()", "return_type": "int", @@ -133,7 +186,6 @@ int tmain() }, "to": { "activity_id": "793793464184037795", - "activity_name": "clanguml::t20028::A::b()", "participant_id": "2073479923903128898" }, "type": "message" @@ -141,9 +193,7 @@ int tmain() { "from": { "activity_id": "1347206662193933194", - "activity_name": "clanguml::t20028::tmain()", - "participant_id": "1347206662193933194", - "participant_name": "clanguml::t20028::tmain()" + "participant_id": "1347206662193933194" }, "name": "c()", "return_type": "int", @@ -156,7 +206,6 @@ int tmain() }, "to": { "activity_id": "1582152567698110078", - "activity_name": "clanguml::t20028::A::c()", "participant_id": "2073479923903128898" }, "type": "message" @@ -169,9 +218,7 @@ int tmain() { "from": { "activity_id": "1347206662193933194", - "activity_name": "clanguml::t20028::tmain()", - "participant_id": "1347206662193933194", - "participant_name": "clanguml::t20028::tmain()" + "participant_id": "1347206662193933194" }, "name": "d()", "return_type": "int", @@ -184,7 +231,6 @@ int tmain() }, "to": { "activity_id": "1178268687951492696", - "activity_name": "clanguml::t20028::A::d()", "participant_id": "2073479923903128898" }, "type": "message" diff --git a/docs/test_cases/t20028_sequence.svg b/docs/test_cases/t20028_sequence.svg index c5966367..27b01ed1 100644 --- a/docs/test_cases/t20028_sequence.svg +++ b/docs/test_cases/t20028_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,36 +9,36 @@ - - - - - - + + + + + + - - + + tmain() - + tmain() - - + + A - + A - - - - - + + + + + alt - + [ @@ -47,14 +47,14 @@ - + b() - + c() @@ -62,7 +62,7 @@ - + d() diff --git a/docs/test_cases/t20029.md b/docs/test_cases/t20029.md index e761dbcf..5adbaa45 100644 --- a/docs/test_cases/t20029.md +++ b/docs/test_cases/t20029.md @@ -26,7 +26,7 @@ diagrams: - clanguml::t20029::encode_b64(std::string &&) ``` ## Source code -File t20029.cc +File `tests/t20029/t20029.cc` ```cpp #include #include @@ -115,8 +115,10 @@ int tmain() "name": "t20029_sequence", "participants": [ { + "display_name": "tmain()", "id": "2091374738808319642", - "name": "clanguml::t20029::tmain()", + "name": "tmain", + "namespace": "clanguml::t20029", "source_location": { "column": 5, "file": "t20029.cc", @@ -126,8 +128,38 @@ int tmain() "type": "function" }, { + "activities": [ + { + "display_name": "send(std::string &&)", + "id": "2026763864005979273", + "name": "send", + "namespace": "", + "source_location": { + "column": 10, + "file": "t20029.cc", + "line": 13, + "translation_unit": "t20029.cc" + }, + "type": "method" + }, + { + "display_name": "encode(std::string &&)", + "id": "1468258269466480773", + "name": "encode", + "namespace": "", + "source_location": { + "column": 17, + "file": "t20029.cc", + "line": 22, + "translation_unit": "t20029.cc" + }, + "type": "method" + } + ], + "display_name": "Encoder>", "id": "1673261195873192383", - "name": "clanguml::t20029::Encoder>", + "name": "Encoder", + "namespace": "clanguml::t20029", "source_location": { "column": 29, "file": "t20029.cc", @@ -137,8 +169,25 @@ int tmain() "type": "class" }, { + "activities": [ + { + "display_name": "send(std::string &&)", + "id": "30515971485361302", + "name": "send", + "namespace": "", + "source_location": { + "column": 10, + "file": "t20029.cc", + "line": 27, + "translation_unit": "t20029.cc" + }, + "type": "method" + } + ], + "display_name": "Retrier", "id": "658058855590948094", - "name": "clanguml::t20029::Retrier", + "name": "Retrier", + "namespace": "clanguml::t20029", "source_location": { "column": 29, "file": "t20029.cc", @@ -148,8 +197,38 @@ int tmain() "type": "class" }, { + "activities": [ + { + "display_name": "connect()", + "id": "940428568182104530", + "name": "connect", + "namespace": "", + "source_location": { + "column": 10, + "file": "t20029.cc", + "line": 45, + "translation_unit": "t20029.cc" + }, + "type": "method" + }, + { + "display_name": "send(const std::string &)", + "id": "972625940114169157", + "name": "send", + "namespace": "", + "source_location": { + "column": 10, + "file": "t20029.cc", + "line": 51, + "translation_unit": "t20029.cc" + }, + "type": "method" + } + ], + "display_name": "ConnectionPool", "id": "1896406205097618937", - "name": "clanguml::t20029::ConnectionPool", + "name": "ConnectionPool", + "namespace": "clanguml::t20029", "source_location": { "column": 7, "file": "t20029.cc", @@ -159,8 +238,10 @@ int tmain() "type": "class" }, { + "display_name": "encode_b64(std::string &&)", "id": "1362646431260879440", - "name": "clanguml::t20029::encode_b64(std::string &&)", + "name": "encode_b64", + "namespace": "clanguml::t20029", "source_location": { "column": 13, "file": "t20029.cc", @@ -177,9 +258,7 @@ int tmain() "comment": "Establish connection to the remote server synchronously", "from": { "activity_id": "2091374738808319642", - "activity_name": "clanguml::t20029::tmain()", - "participant_id": "2091374738808319642", - "participant_name": "clanguml::t20029::tmain()" + "participant_id": "2091374738808319642" }, "name": "connect()", "return_type": "void", @@ -192,7 +271,6 @@ int tmain() }, "to": { "activity_id": "940428568182104530", - "activity_name": "clanguml::t20029::ConnectionPool::connect()", "participant_id": "1896406205097618937" }, "type": "message" @@ -208,9 +286,7 @@ int tmain() { "from": { "activity_id": "2091374738808319642", - "activity_name": "clanguml::t20029::tmain()", - "participant_id": "2091374738808319642", - "participant_name": "clanguml::t20029::tmain()" + "participant_id": "2091374738808319642" }, "name": "send(std::string &&)", "return_type": "bool", @@ -223,7 +299,6 @@ int tmain() }, "to": { "activity_id": "2026763864005979273", - "activity_name": "clanguml::t20029::Encoder>::send(std::string &&)", "participant_id": "1673261195873192383" }, "type": "message" @@ -232,7 +307,6 @@ int tmain() "comment": "Encode the message using Base64 encoding and pass it to the next\nlayer", "from": { "activity_id": "2026763864005979273", - "activity_name": "clanguml::t20029::Encoder>::send(std::string &&)", "participant_id": "1673261195873192383" }, "name": "encode(std::string &&)", @@ -246,7 +320,6 @@ int tmain() }, "to": { "activity_id": "1468258269466480773", - "activity_name": "clanguml::t20029::Encoder>::encode(std::string &&)", "participant_id": "1673261195873192383" }, "type": "message" @@ -254,7 +327,6 @@ int tmain() { "from": { "activity_id": "1468258269466480773", - "activity_name": "clanguml::t20029::Encoder>::encode(std::string &&)", "participant_id": "1673261195873192383" }, "name": "", @@ -268,7 +340,6 @@ int tmain() }, "to": { "activity_id": "1362646431260879440", - "activity_name": "clanguml::t20029::encode_b64(std::string &&)", "participant_id": "1362646431260879440" }, "type": "message" @@ -276,7 +347,6 @@ int tmain() { "from": { "activity_id": "2026763864005979273", - "activity_name": "clanguml::t20029::Encoder>::send(std::string &&)", "participant_id": "1673261195873192383" }, "name": "send(std::string &&)", @@ -290,7 +360,6 @@ int tmain() }, "to": { "activity_id": "30515971485361302", - "activity_name": "clanguml::t20029::Retrier::send(std::string &&)", "participant_id": "658058855590948094" }, "type": "message" @@ -306,7 +375,6 @@ int tmain() { "from": { "activity_id": "30515971485361302", - "activity_name": "clanguml::t20029::Retrier::send(std::string &&)", "participant_id": "658058855590948094" }, "name": "send(const std::string &)", @@ -320,7 +388,6 @@ int tmain() }, "to": { "activity_id": "972625940114169157", - "activity_name": "clanguml::t20029::ConnectionPool::send(const std::string &)", "participant_id": "1896406205097618937" }, "type": "message" diff --git a/docs/test_cases/t20029_sequence.svg b/docs/test_cases/t20029_sequence.svg index 370102a5..d50b9a10 100644 --- a/docs/test_cases/t20029_sequence.svg +++ b/docs/test_cases/t20029_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,69 +9,69 @@ - - - - - - - - - - - + + + + + + + + + + + - - + + tmain() - + tmain() - - + + Encoder<Retrier<ConnectionPool>> - + Encoder<Retrier<ConnectionPool>> - - + + Retrier<ConnectionPool> - + Retrier<ConnectionPool> - - + + ConnectionPool - + ConnectionPool - - + + encode_b64(std::string &&) - + encode_b64(std::string &&) - - - - - - - - + + + + + + + + Establish connection to the remote server synchronously - + connect() - + Repeat for each line in the input stream @@ -81,26 +81,26 @@ alt - + [ send(std::string &&) ] - + Encode the message using Base64 encoding and pass it to the next layer - + encode(std::string &&) - + @@ -110,12 +110,12 @@ - + send(std::string &&) - + Repeat until send() succeeds or retry count is exceeded @@ -125,7 +125,7 @@ alt - + [ diff --git a/docs/test_cases/t20030.md b/docs/test_cases/t20030.md index 3f705e77..1046ed4f 100644 --- a/docs/test_cases/t20030.md +++ b/docs/test_cases/t20030.md @@ -15,7 +15,7 @@ diagrams: - function: "clanguml::t20030::tmain(bool,int)" ``` ## Source code -File t20030.cc +File `tests/t20030/t20030.cc` ```cpp namespace clanguml { namespace t20030 { @@ -80,8 +80,10 @@ int tmain(bool f, int a) "name": "t20030_sequence", "participants": [ { + "display_name": "tmain(int)", "id": "1264643561983920529", - "name": "clanguml::t20030::tmain(int)", + "name": "tmain", + "namespace": "clanguml::t20030", "source_location": { "column": 6, "file": "t20030.cc", @@ -91,8 +93,10 @@ int tmain(bool f, int a) "type": "function" }, { + "display_name": "magic()", "id": "1038740565367213967", - "name": "clanguml::t20030::magic()", + "name": "magic", + "namespace": "clanguml::t20030", "source_location": { "column": 5, "file": "t20030.cc", @@ -102,8 +106,116 @@ int tmain(bool f, int a) "type": "function" }, { + "activities": [ + { + "display_name": "A(int)", + "id": "2192298168642377389", + "name": "A", + "namespace": "", + "source_location": { + "column": 5, + "file": "t20030.cc", + "line": 10, + "translation_unit": "t20030.cc" + }, + "type": "method" + }, + { + "display_name": "operator+=(int)", + "id": "2032167997122548080", + "name": "operator+=", + "namespace": "", + "source_location": { + "column": 8, + "file": "t20030.cc", + "line": 18, + "translation_unit": "t20030.cc" + }, + "type": "method" + }, + { + "display_name": "add(int)", + "id": "2174827432067616124", + "name": "add", + "namespace": "", + "source_location": { + "column": 10, + "file": "t20030.cc", + "line": 29, + "translation_unit": "t20030.cc" + }, + "type": "method" + }, + { + "display_name": "A()", + "id": "32184916294885915", + "name": "A", + "namespace": "", + "source_location": { + "column": 5, + "file": "t20030.cc", + "line": 8, + "translation_unit": "t20030.cc" + }, + "type": "method" + }, + { + "display_name": "create()", + "id": "890578100069139188", + "name": "create", + "namespace": "", + "source_location": { + "column": 10, + "file": "t20030.cc", + "line": 27, + "translation_unit": "t20030.cc" + }, + "type": "method" + }, + { + "display_name": "operator=(const A &)", + "id": "1796303685088700396", + "name": "operator=", + "namespace": "", + "source_location": { + "column": 8, + "file": "t20030.cc", + "line": 12, + "translation_unit": "t20030.cc" + }, + "type": "method" + }, + { + "display_name": "set(int)", + "id": "2212978510776223413", + "name": "set", + "namespace": "", + "source_location": { + "column": 10, + "file": "t20030.cc", + "line": 30, + "translation_unit": "t20030.cc" + }, + "type": "method" + }, + { + "display_name": "value() const", + "id": "1754957340376276968", + "name": "value", + "namespace": "", + "source_location": { + "column": 9, + "file": "t20030.cc", + "line": 24, + "translation_unit": "t20030.cc" + }, + "type": "method" + } + ], + "display_name": "A", "id": "1081707114848460702", - "name": "clanguml::t20030::A", + "name": "A", + "namespace": "clanguml::t20030", "source_location": { "column": 7, "file": "t20030.cc", @@ -113,8 +225,10 @@ int tmain(bool f, int a) "type": "class" }, { + "display_name": "tmain(bool,int)", "id": "36090614888670483", - "name": "clanguml::t20030::tmain(bool,int)", + "name": "tmain", + "namespace": "clanguml::t20030", "source_location": { "column": 5, "file": "t20030.cc", @@ -130,9 +244,7 @@ int tmain(bool f, int a) { "from": { "activity_id": "1264643561983920529", - "activity_name": "clanguml::t20030::tmain(int)", - "participant_id": "1264643561983920529", - "participant_name": "clanguml::t20030::tmain(int)" + "participant_id": "1264643561983920529" }, "name": "", "return_type": "int", @@ -145,7 +257,6 @@ int tmain(bool f, int a) }, "to": { "activity_id": "1038740565367213967", - "activity_name": "clanguml::t20030::magic()", "participant_id": "1038740565367213967" }, "type": "message" @@ -153,9 +264,7 @@ int tmain(bool f, int a) { "from": { "activity_id": "1264643561983920529", - "activity_name": "clanguml::t20030::tmain(int)", - "participant_id": "1264643561983920529", - "participant_name": "clanguml::t20030::tmain(int)" + "participant_id": "1264643561983920529" }, "name": "A(int)", "return_type": "void", @@ -168,7 +277,6 @@ int tmain(bool f, int a) }, "to": { "activity_id": "2192298168642377389", - "activity_name": "clanguml::t20030::A::A(int)", "participant_id": "1081707114848460702" }, "type": "message" @@ -176,9 +284,7 @@ int tmain(bool f, int a) { "from": { "activity_id": "1264643561983920529", - "activity_name": "clanguml::t20030::tmain(int)", - "participant_id": "1264643561983920529", - "participant_name": "clanguml::t20030::tmain(int)" + "participant_id": "1264643561983920529" }, "name": "operator+=(int)", "return_type": "A &", @@ -191,7 +297,6 @@ int tmain(bool f, int a) }, "to": { "activity_id": "2032167997122548080", - "activity_name": "clanguml::t20030::A::operator+=(int)", "participant_id": "1081707114848460702" }, "type": "message" @@ -199,7 +304,6 @@ int tmain(bool f, int a) { "from": { "activity_id": "2032167997122548080", - "activity_name": "clanguml::t20030::A::operator+=(int)", "participant_id": "1081707114848460702" }, "name": "add(int)", @@ -213,7 +317,6 @@ int tmain(bool f, int a) }, "to": { "activity_id": "2174827432067616124", - "activity_name": "clanguml::t20030::A::add(int)", "participant_id": "1081707114848460702" }, "type": "message" @@ -229,9 +332,7 @@ int tmain(bool f, int a) { "from": { "activity_id": "36090614888670483", - "activity_name": "clanguml::t20030::tmain(bool,int)", - "participant_id": "36090614888670483", - "participant_name": "clanguml::t20030::tmain(bool,int)" + "participant_id": "36090614888670483" }, "name": "A()", "return_type": "void", @@ -244,7 +345,6 @@ int tmain(bool f, int a) }, "to": { "activity_id": "32184916294885915", - "activity_name": "clanguml::t20030::A::A()", "participant_id": "1081707114848460702" }, "type": "message" @@ -252,7 +352,6 @@ int tmain(bool f, int a) { "from": { "activity_id": "32184916294885915", - "activity_name": "clanguml::t20030::A::A()", "participant_id": "1081707114848460702" }, "name": "create()", @@ -266,7 +365,6 @@ int tmain(bool f, int a) }, "to": { "activity_id": "890578100069139188", - "activity_name": "clanguml::t20030::A::create()", "participant_id": "1081707114848460702" }, "type": "message" @@ -274,9 +372,7 @@ int tmain(bool f, int a) { "from": { "activity_id": "36090614888670483", - "activity_name": "clanguml::t20030::tmain(bool,int)", - "participant_id": "36090614888670483", - "participant_name": "clanguml::t20030::tmain(bool,int)" + "participant_id": "36090614888670483" }, "name": "A()", "return_type": "void", @@ -289,7 +385,6 @@ int tmain(bool f, int a) }, "to": { "activity_id": "32184916294885915", - "activity_name": "clanguml::t20030::A::A()", "participant_id": "1081707114848460702" }, "type": "message" @@ -297,9 +392,7 @@ int tmain(bool f, int a) { "from": { "activity_id": "36090614888670483", - "activity_name": "clanguml::t20030::tmain(bool,int)", - "participant_id": "36090614888670483", - "participant_name": "clanguml::t20030::tmain(bool,int)" + "participant_id": "36090614888670483" }, "name": "operator+=(int)", "return_type": "A &", @@ -312,7 +405,6 @@ int tmain(bool f, int a) }, "to": { "activity_id": "2032167997122548080", - "activity_name": "clanguml::t20030::A::operator+=(int)", "participant_id": "1081707114848460702" }, "type": "message" @@ -320,7 +412,6 @@ int tmain(bool f, int a) { "from": { "activity_id": "2032167997122548080", - "activity_name": "clanguml::t20030::A::operator+=(int)", "participant_id": "1081707114848460702" }, "name": "add(int)", @@ -334,7 +425,6 @@ int tmain(bool f, int a) }, "to": { "activity_id": "2174827432067616124", - "activity_name": "clanguml::t20030::A::add(int)", "participant_id": "1081707114848460702" }, "type": "message" @@ -342,9 +432,7 @@ int tmain(bool f, int a) { "from": { "activity_id": "36090614888670483", - "activity_name": "clanguml::t20030::tmain(bool,int)", - "participant_id": "36090614888670483", - "participant_name": "clanguml::t20030::tmain(bool,int)" + "participant_id": "36090614888670483" }, "name": "operator=(const A &)", "return_type": "A &", @@ -357,7 +445,6 @@ int tmain(bool f, int a) }, "to": { "activity_id": "1796303685088700396", - "activity_name": "clanguml::t20030::A::operator=(const A &)", "participant_id": "1081707114848460702" }, "type": "message" @@ -365,7 +452,6 @@ int tmain(bool f, int a) { "from": { "activity_id": "1796303685088700396", - "activity_name": "clanguml::t20030::A::operator=(const A &)", "participant_id": "1081707114848460702" }, "name": "set(int)", @@ -379,7 +465,6 @@ int tmain(bool f, int a) }, "to": { "activity_id": "2212978510776223413", - "activity_name": "clanguml::t20030::A::set(int)", "participant_id": "1081707114848460702" }, "type": "message" @@ -387,9 +472,7 @@ int tmain(bool f, int a) { "from": { "activity_id": "36090614888670483", - "activity_name": "clanguml::t20030::tmain(bool,int)", - "participant_id": "36090614888670483", - "participant_name": "clanguml::t20030::tmain(bool,int)" + "participant_id": "36090614888670483" }, "name": "value() const", "return_type": "int", @@ -402,7 +485,6 @@ int tmain(bool f, int a) }, "to": { "activity_id": "1754957340376276968", - "activity_name": "clanguml::t20030::A::value() const", "participant_id": "1081707114848460702" }, "type": "message" diff --git a/docs/test_cases/t20030_sequence.svg b/docs/test_cases/t20030_sequence.svg index 20b8a1dc..c4dbd9cc 100644 --- a/docs/test_cases/t20030_sequence.svg +++ b/docs/test_cases/t20030_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,81 +9,81 @@ - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - + + tmain(int) - + tmain(int) - - + + magic() - + magic() - - + + A - + A - - + + tmain(bool,int) - + tmain(bool,int) - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - + A(int) - + operator+=(int) - + @@ -92,36 +92,36 @@ - + A() - + create() - + A() - + create() - + operator+=(int) - + @@ -130,12 +130,12 @@ - + operator=(const A &) - + @@ -144,7 +144,7 @@ - + value() const diff --git a/docs/test_cases/t20031.md b/docs/test_cases/t20031.md index 9747bfab..90ac6d95 100644 --- a/docs/test_cases/t20031.md +++ b/docs/test_cases/t20031.md @@ -20,7 +20,7 @@ diagrams: - function: "clanguml::t20031::tmain(bool,int)" ``` ## Source code -File t20031.cc +File `tests/t20031/t20031.cc` ```cpp #include @@ -96,8 +96,10 @@ int tmain(bool f, int a) "name": "t20031_sequence", "participants": [ { + "display_name": "tmain(int)", "id": "1045973591033429178", - "name": "clanguml::t20031::tmain(int)", + "name": "tmain", + "namespace": "clanguml::t20031", "source_location": { "column": 6, "file": "t20031.cc", @@ -107,8 +109,10 @@ int tmain(bool f, int a) "type": "function" }, { + "display_name": "magic()", "id": "2265790048300959619", - "name": "clanguml::t20031::magic()", + "name": "magic", + "namespace": "clanguml::t20031", "source_location": { "column": 5, "file": "t20031.cc", @@ -118,8 +122,10 @@ int tmain(bool f, int a) "type": "function" }, { + "display_name": "tmain(bool,int)", "id": "2189754495514350927", - "name": "clanguml::t20031::tmain(bool,int)", + "name": "tmain", + "namespace": "clanguml::t20031", "source_location": { "column": 5, "file": "t20031.cc", @@ -129,8 +135,10 @@ int tmain(bool f, int a) "type": "function" }, { + "display_name": "execute(std::function)", "id": "2230160420908832598", - "name": "clanguml::t20031::execute(std::function)", + "name": "execute", + "namespace": "clanguml::t20031", "source_location": { "column": 5, "file": "t20031.cc", @@ -140,8 +148,25 @@ int tmain(bool f, int a) "type": "function" }, { + "activities": [ + { + "display_name": "value() const", + "id": "1089278431155817348", + "name": "value", + "namespace": "", + "source_location": { + "column": 9, + "file": "t20031.cc", + "line": 28, + "translation_unit": "t20031.cc" + }, + "type": "method" + } + ], + "display_name": "A", "id": "1081580052625775404", - "name": "clanguml::t20031::A", + "name": "A", + "namespace": "clanguml::t20031", "source_location": { "column": 7, "file": "t20031.cc", @@ -157,9 +182,7 @@ int tmain(bool f, int a) { "from": { "activity_id": "1045973591033429178", - "activity_name": "clanguml::t20031::tmain(int)", - "participant_id": "1045973591033429178", - "participant_name": "clanguml::t20031::tmain(int)" + "participant_id": "1045973591033429178" }, "name": "", "return_type": "int", @@ -172,7 +195,6 @@ int tmain(bool f, int a) }, "to": { "activity_id": "2265790048300959619", - "activity_name": "clanguml::t20031::magic()", "participant_id": "2265790048300959619" }, "type": "message" @@ -188,9 +210,7 @@ int tmain(bool f, int a) { "from": { "activity_id": "2189754495514350927", - "activity_name": "clanguml::t20031::tmain(bool,int)", - "participant_id": "2189754495514350927", - "participant_name": "clanguml::t20031::tmain(bool,int)" + "participant_id": "2189754495514350927" }, "name": "", "return_type": "int", @@ -203,7 +223,6 @@ int tmain(bool f, int a) }, "to": { "activity_id": "2230160420908832598", - "activity_name": "clanguml::t20031::execute(std::function)", "participant_id": "2230160420908832598" }, "type": "message" @@ -211,9 +230,7 @@ int tmain(bool f, int a) { "from": { "activity_id": "2189754495514350927", - "activity_name": "clanguml::t20031::tmain(bool,int)", - "participant_id": "2189754495514350927", - "participant_name": "clanguml::t20031::tmain(bool,int)" + "participant_id": "2189754495514350927" }, "name": "value() const", "return_type": "int", @@ -226,7 +243,6 @@ int tmain(bool f, int a) }, "to": { "activity_id": "1089278431155817348", - "activity_name": "clanguml::t20031::A::value() const", "participant_id": "1081580052625775404" }, "type": "message" diff --git a/docs/test_cases/t20031_sequence.svg b/docs/test_cases/t20031_sequence.svg index bad071f9..dd2bcea7 100644 --- a/docs/test_cases/t20031_sequence.svg +++ b/docs/test_cases/t20031_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,64 +9,64 @@ - - - - - + + + + + - - + + tmain(int) - + tmain(int) - - + + magic() - + magic() - - + + tmain(bool,int) - + tmain(bool,int) - - + + execute(std::function<int ()>) - + execute(std::function<int ()>) - - + + A - + A - - - - - - + + + + + + - + - + value() const diff --git a/docs/test_cases/t20032.md b/docs/test_cases/t20032.md index 636254b7..2692af8c 100644 --- a/docs/test_cases/t20032.md +++ b/docs/test_cases/t20032.md @@ -15,7 +15,7 @@ diagrams: - function: "clanguml::t20032::tmain(int,char **)" ``` ## Source code -File t20032.cc +File `tests/t20032/t20032.cc` ```cpp namespace clanguml { namespace t20032 { @@ -56,8 +56,10 @@ void tmain(int argc, char **argv) "name": "t20032_sequence", "participants": [ { + "display_name": "tmain(int,char **)", "id": "2159371207846335450", - "name": "clanguml::t20032::tmain(int,char **)", + "name": "tmain", + "namespace": "clanguml::t20032", "source_location": { "column": 6, "file": "t20032.cc", @@ -67,8 +69,51 @@ void tmain(int argc, char **argv) "type": "function" }, { + "activities": [ + { + "display_name": "b(int)", + "id": "1775727925274471949", + "name": "b", + "namespace": "", + "source_location": { + "column": 9, + "file": "t20032.cc", + "line": 11, + "translation_unit": "t20032.cc" + }, + "type": "method" + }, + { + "display_name": "b(double)", + "id": "404223226092650061", + "name": "b", + "namespace": "", + "source_location": { + "column": 12, + "file": "t20032.cc", + "line": 12, + "translation_unit": "t20032.cc" + }, + "type": "method" + }, + { + "display_name": "b(const char *)", + "id": "1676684483397143166", + "name": "b", + "namespace": "", + "source_location": { + "column": 17, + "file": "t20032.cc", + "line": 13, + "translation_unit": "t20032.cc" + }, + "type": "method" + } + ], + "display_name": "B", "id": "775765108342558014", - "name": "clanguml::t20032::B", + "name": "B", + "namespace": "clanguml::t20032", "source_location": { "column": 8, "file": "t20032.cc", @@ -78,8 +123,51 @@ void tmain(int argc, char **argv) "type": "class" }, { + "activities": [ + { + "display_name": "a1(int)", + "id": "913842443932719355", + "name": "a1", + "namespace": "", + "source_location": { + "column": 9, + "file": "t20032.cc", + "line": 5, + "translation_unit": "t20032.cc" + }, + "type": "method" + }, + { + "display_name": "a2(double)", + "id": "1293114170675037977", + "name": "a2", + "namespace": "", + "source_location": { + "column": 12, + "file": "t20032.cc", + "line": 6, + "translation_unit": "t20032.cc" + }, + "type": "method" + }, + { + "display_name": "a3(const char *)", + "id": "2099821524363509275", + "name": "a3", + "namespace": "", + "source_location": { + "column": 17, + "file": "t20032.cc", + "line": 7, + "translation_unit": "t20032.cc" + }, + "type": "method" + } + ], + "display_name": "A", "id": "1674177120713592616", - "name": "clanguml::t20032::A", + "name": "A", + "namespace": "clanguml::t20032", "source_location": { "column": 8, "file": "t20032.cc", @@ -95,9 +183,7 @@ void tmain(int argc, char **argv) { "from": { "activity_id": "2159371207846335450", - "activity_name": "clanguml::t20032::tmain(int,char **)", - "participant_id": "2159371207846335450", - "participant_name": "clanguml::t20032::tmain(int,char **)" + "participant_id": "2159371207846335450" }, "name": "b(int)", "return_type": "int", @@ -110,7 +196,6 @@ void tmain(int argc, char **argv) }, "to": { "activity_id": "1775727925274471949", - "activity_name": "clanguml::t20032::B::b(int)", "participant_id": "775765108342558014" }, "type": "message" @@ -118,7 +203,6 @@ void tmain(int argc, char **argv) { "from": { "activity_id": "1775727925274471949", - "activity_name": "clanguml::t20032::B::b(int)", "participant_id": "775765108342558014" }, "name": "a1(int)", @@ -132,7 +216,6 @@ void tmain(int argc, char **argv) }, "to": { "activity_id": "913842443932719355", - "activity_name": "clanguml::t20032::A::a1(int)", "participant_id": "1674177120713592616" }, "type": "message" @@ -140,9 +223,7 @@ void tmain(int argc, char **argv) { "from": { "activity_id": "2159371207846335450", - "activity_name": "clanguml::t20032::tmain(int,char **)", - "participant_id": "2159371207846335450", - "participant_name": "clanguml::t20032::tmain(int,char **)" + "participant_id": "2159371207846335450" }, "name": "b(double)", "return_type": "double", @@ -155,7 +236,6 @@ void tmain(int argc, char **argv) }, "to": { "activity_id": "404223226092650061", - "activity_name": "clanguml::t20032::B::b(double)", "participant_id": "775765108342558014" }, "type": "message" @@ -163,7 +243,6 @@ void tmain(int argc, char **argv) { "from": { "activity_id": "404223226092650061", - "activity_name": "clanguml::t20032::B::b(double)", "participant_id": "775765108342558014" }, "name": "a2(double)", @@ -177,7 +256,6 @@ void tmain(int argc, char **argv) }, "to": { "activity_id": "1293114170675037977", - "activity_name": "clanguml::t20032::A::a2(double)", "participant_id": "1674177120713592616" }, "type": "message" @@ -185,9 +263,7 @@ void tmain(int argc, char **argv) { "from": { "activity_id": "2159371207846335450", - "activity_name": "clanguml::t20032::tmain(int,char **)", - "participant_id": "2159371207846335450", - "participant_name": "clanguml::t20032::tmain(int,char **)" + "participant_id": "2159371207846335450" }, "name": "b(const char *)", "return_type": "const char *", @@ -200,7 +276,6 @@ void tmain(int argc, char **argv) }, "to": { "activity_id": "1676684483397143166", - "activity_name": "clanguml::t20032::B::b(const char *)", "participant_id": "775765108342558014" }, "type": "message" @@ -208,7 +283,6 @@ void tmain(int argc, char **argv) { "from": { "activity_id": "1676684483397143166", - "activity_name": "clanguml::t20032::B::b(const char *)", "participant_id": "775765108342558014" }, "name": "a3(const char *)", @@ -222,7 +296,6 @@ void tmain(int argc, char **argv) }, "to": { "activity_id": "2099821524363509275", - "activity_name": "clanguml::t20032::A::a3(const char *)", "participant_id": "1674177120713592616" }, "type": "message" diff --git a/docs/test_cases/t20032_sequence.svg b/docs/test_cases/t20032_sequence.svg index b07f4fc2..9809ffc4 100644 --- a/docs/test_cases/t20032_sequence.svg +++ b/docs/test_cases/t20032_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,47 +9,47 @@ - - - - - - - + + + + + + + - - + + tmain(int,char **) - + tmain(int,char **) - - + + B - + B - - + + A - + A - - - - - - - - + + + + + + + + b(int) - + a1(int) @@ -60,12 +60,12 @@ int - + b(double) - + a2(double) @@ -76,12 +76,12 @@ double - + b(const char *) - + a3(const char *) diff --git a/docs/test_cases/t20033.md b/docs/test_cases/t20033.md index bf2f75e8..1c01220c 100644 --- a/docs/test_cases/t20033.md +++ b/docs/test_cases/t20033.md @@ -15,7 +15,7 @@ diagrams: - function: "clanguml::t20033::tmain()" ``` ## Source code -File t20033.cc +File `tests/t20033/t20033.cc` ```cpp #include #include @@ -94,8 +94,10 @@ int tmain() "name": "t20033_sequence", "participants": [ { + "display_name": "tmain()", "id": "2284981553733959328", - "name": "clanguml::t20033::tmain()", + "name": "tmain", + "namespace": "clanguml::t20033", "source_location": { "column": 5, "file": "t20033.cc", @@ -105,8 +107,64 @@ int tmain() "type": "function" }, { + "activities": [ + { + "display_name": "a1()", + "id": "558885502745634115", + "name": "a1", + "namespace": "", + "source_location": { + "column": 9, + "file": "t20033.cc", + "line": 8, + "translation_unit": "t20033.cc" + }, + "type": "method" + }, + { + "display_name": "a2()", + "id": "748502947476611794", + "name": "a2", + "namespace": "", + "source_location": { + "column": 9, + "file": "t20033.cc", + "line": 9, + "translation_unit": "t20033.cc" + }, + "type": "method" + }, + { + "display_name": "a3()", + "id": "55903385814245839", + "name": "a3", + "namespace": "", + "source_location": { + "column": 9, + "file": "t20033.cc", + "line": 10, + "translation_unit": "t20033.cc" + }, + "type": "method" + }, + { + "display_name": "a4()", + "id": "1686426476339443579", + "name": "a4", + "namespace": "", + "source_location": { + "column": 9, + "file": "t20033.cc", + "line": 11, + "translation_unit": "t20033.cc" + }, + "type": "method" + } + ], + "display_name": "A", "id": "615995652843962691", - "name": "clanguml::t20033::A", + "name": "A", + "namespace": "clanguml::t20033", "source_location": { "column": 8, "file": "t20033.cc", @@ -130,9 +188,7 @@ int tmain() { "from": { "activity_id": "2284981553733959328", - "activity_name": "clanguml::t20033::tmain()", - "participant_id": "2284981553733959328", - "participant_name": "clanguml::t20033::tmain()" + "participant_id": "2284981553733959328" }, "name": "a1()", "return_type": "int", @@ -145,7 +201,6 @@ int tmain() }, "to": { "activity_id": "558885502745634115", - "activity_name": "clanguml::t20033::A::a1()", "participant_id": "615995652843962691" }, "type": "message" @@ -158,9 +213,7 @@ int tmain() { "from": { "activity_id": "2284981553733959328", - "activity_name": "clanguml::t20033::tmain()", - "participant_id": "2284981553733959328", - "participant_name": "clanguml::t20033::tmain()" + "participant_id": "2284981553733959328" }, "name": "a2()", "return_type": "int", @@ -173,7 +226,6 @@ int tmain() }, "to": { "activity_id": "748502947476611794", - "activity_name": "clanguml::t20033::A::a2()", "participant_id": "615995652843962691" }, "type": "message" @@ -186,9 +238,7 @@ int tmain() { "from": { "activity_id": "2284981553733959328", - "activity_name": "clanguml::t20033::tmain()", - "participant_id": "2284981553733959328", - "participant_name": "clanguml::t20033::tmain()" + "participant_id": "2284981553733959328" }, "name": "a2()", "return_type": "int", @@ -201,7 +251,6 @@ int tmain() }, "to": { "activity_id": "748502947476611794", - "activity_name": "clanguml::t20033::A::a2()", "participant_id": "615995652843962691" }, "type": "message" @@ -209,9 +258,7 @@ int tmain() { "from": { "activity_id": "2284981553733959328", - "activity_name": "clanguml::t20033::tmain()", - "participant_id": "2284981553733959328", - "participant_name": "clanguml::t20033::tmain()" + "participant_id": "2284981553733959328" }, "name": "a3()", "return_type": "int", @@ -224,7 +271,6 @@ int tmain() }, "to": { "activity_id": "55903385814245839", - "activity_name": "clanguml::t20033::A::a3()", "participant_id": "615995652843962691" }, "type": "message" @@ -232,9 +278,7 @@ int tmain() { "from": { "activity_id": "2284981553733959328", - "activity_name": "clanguml::t20033::tmain()", - "participant_id": "2284981553733959328", - "participant_name": "clanguml::t20033::tmain()" + "participant_id": "2284981553733959328" }, "name": "a3()", "return_type": "int", @@ -247,7 +291,6 @@ int tmain() }, "to": { "activity_id": "55903385814245839", - "activity_name": "clanguml::t20033::A::a3()", "participant_id": "615995652843962691" }, "type": "message" @@ -260,9 +303,7 @@ int tmain() { "from": { "activity_id": "2284981553733959328", - "activity_name": "clanguml::t20033::tmain()", - "participant_id": "2284981553733959328", - "participant_name": "clanguml::t20033::tmain()" + "participant_id": "2284981553733959328" }, "name": "a4()", "return_type": "int", @@ -275,7 +316,6 @@ int tmain() }, "to": { "activity_id": "1686426476339443579", - "activity_name": "clanguml::t20033::A::a4()", "participant_id": "615995652843962691" }, "type": "message" @@ -296,9 +336,7 @@ int tmain() { "from": { "activity_id": "2284981553733959328", - "activity_name": "clanguml::t20033::tmain()", - "participant_id": "2284981553733959328", - "participant_name": "clanguml::t20033::tmain()" + "participant_id": "2284981553733959328" }, "name": "a2()", "return_type": "int", @@ -311,7 +349,6 @@ int tmain() }, "to": { "activity_id": "748502947476611794", - "activity_name": "clanguml::t20033::A::a2()", "participant_id": "615995652843962691" }, "type": "message" @@ -319,9 +356,7 @@ int tmain() { "from": { "activity_id": "2284981553733959328", - "activity_name": "clanguml::t20033::tmain()", - "participant_id": "2284981553733959328", - "participant_name": "clanguml::t20033::tmain()" + "participant_id": "2284981553733959328" }, "name": "a3()", "return_type": "int", @@ -334,7 +369,6 @@ int tmain() }, "to": { "activity_id": "55903385814245839", - "activity_name": "clanguml::t20033::A::a3()", "participant_id": "615995652843962691" }, "type": "message" @@ -354,9 +388,7 @@ int tmain() { "from": { "activity_id": "2284981553733959328", - "activity_name": "clanguml::t20033::tmain()", - "participant_id": "2284981553733959328", - "participant_name": "clanguml::t20033::tmain()" + "participant_id": "2284981553733959328" }, "name": "a2()", "return_type": "int", @@ -369,7 +401,6 @@ int tmain() }, "to": { "activity_id": "748502947476611794", - "activity_name": "clanguml::t20033::A::a2()", "participant_id": "615995652843962691" }, "type": "message" @@ -377,9 +408,7 @@ int tmain() { "from": { "activity_id": "2284981553733959328", - "activity_name": "clanguml::t20033::tmain()", - "participant_id": "2284981553733959328", - "participant_name": "clanguml::t20033::tmain()" + "participant_id": "2284981553733959328" }, "name": "a3()", "return_type": "int", @@ -392,7 +421,6 @@ int tmain() }, "to": { "activity_id": "55903385814245839", - "activity_name": "clanguml::t20033::A::a3()", "participant_id": "615995652843962691" }, "type": "message" @@ -404,9 +432,7 @@ int tmain() { "from": { "activity_id": "2284981553733959328", - "activity_name": "clanguml::t20033::tmain()", - "participant_id": "2284981553733959328", - "participant_name": "clanguml::t20033::tmain()" + "participant_id": "2284981553733959328" }, "name": "a3()", "return_type": "int", @@ -419,7 +445,6 @@ int tmain() }, "to": { "activity_id": "55903385814245839", - "activity_name": "clanguml::t20033::A::a3()", "participant_id": "615995652843962691" }, "type": "message" @@ -431,9 +456,7 @@ int tmain() { "from": { "activity_id": "2284981553733959328", - "activity_name": "clanguml::t20033::tmain()", - "participant_id": "2284981553733959328", - "participant_name": "clanguml::t20033::tmain()" + "participant_id": "2284981553733959328" }, "name": "a2()", "return_type": "int", @@ -446,7 +469,6 @@ int tmain() }, "to": { "activity_id": "748502947476611794", - "activity_name": "clanguml::t20033::A::a2()", "participant_id": "615995652843962691" }, "type": "message" @@ -462,9 +484,7 @@ int tmain() { "from": { "activity_id": "2284981553733959328", - "activity_name": "clanguml::t20033::tmain()", - "participant_id": "2284981553733959328", - "participant_name": "clanguml::t20033::tmain()" + "participant_id": "2284981553733959328" }, "name": "a4()", "return_type": "int", @@ -477,7 +497,6 @@ int tmain() }, "to": { "activity_id": "1686426476339443579", - "activity_name": "clanguml::t20033::A::a4()", "participant_id": "615995652843962691" }, "type": "message" @@ -485,9 +504,7 @@ int tmain() { "from": { "activity_id": "2284981553733959328", - "activity_name": "clanguml::t20033::tmain()", - "participant_id": "2284981553733959328", - "participant_name": "clanguml::t20033::tmain()" + "participant_id": "2284981553733959328" }, "name": "a3()", "return_type": "int", @@ -500,7 +517,6 @@ int tmain() }, "to": { "activity_id": "55903385814245839", - "activity_name": "clanguml::t20033::A::a3()", "participant_id": "615995652843962691" }, "type": "message" @@ -517,9 +533,7 @@ int tmain() { "from": { "activity_id": "2284981553733959328", - "activity_name": "clanguml::t20033::tmain()", - "participant_id": "2284981553733959328", - "participant_name": "clanguml::t20033::tmain()" + "participant_id": "2284981553733959328" }, "name": "a4()", "return_type": "int", @@ -532,7 +546,6 @@ int tmain() }, "to": { "activity_id": "1686426476339443579", - "activity_name": "clanguml::t20033::A::a4()", "participant_id": "615995652843962691" }, "type": "message" @@ -555,9 +568,7 @@ int tmain() { "from": { "activity_id": "2284981553733959328", - "activity_name": "clanguml::t20033::tmain()", - "participant_id": "2284981553733959328", - "participant_name": "clanguml::t20033::tmain()" + "participant_id": "2284981553733959328" }, "name": "a4()", "return_type": "int", @@ -570,7 +581,6 @@ int tmain() }, "to": { "activity_id": "1686426476339443579", - "activity_name": "clanguml::t20033::A::a4()", "participant_id": "615995652843962691" }, "type": "message" diff --git a/docs/test_cases/t20033_sequence.svg b/docs/test_cases/t20033_sequence.svg index cf252279..e0d58075 100644 --- a/docs/test_cases/t20033_sequence.svg +++ b/docs/test_cases/t20033_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,73 +9,73 @@ - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - - - - + + + + + - + - - + + tmain() - + tmain() - - + + A - + A - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + alt [false] [reinterpret_cast<uint64_t>(&a) % 100 == 0ULL] - + a1() @@ -84,7 +84,7 @@ [reinterpret_cast<uint64_t>(&a) % 64 == 0ULL] - + a2() @@ -93,7 +93,7 @@ [a.a2() == 2 && a.a3() == 3] - + [ @@ -102,7 +102,7 @@ - + [ @@ -111,7 +111,7 @@ - + a3() @@ -119,7 +119,7 @@ - + a4() @@ -130,7 +130,7 @@ alt [int i = a.a2(); i != 2] - + [ @@ -139,7 +139,7 @@ - + a3() @@ -150,7 +150,7 @@ loop [int i = 0; i < a.a2(); i++] - + [ @@ -159,14 +159,14 @@ - + a3() - + a3() @@ -177,7 +177,7 @@ loop [retry_count--] - + a2() @@ -188,14 +188,14 @@ loop [retry_count++ < a.a3()] - + a4() - + [ @@ -208,7 +208,7 @@ alt [a.a4() % 6] - + [ @@ -222,7 +222,7 @@ loop [ints] - + a4() diff --git a/docs/test_cases/t20034.md b/docs/test_cases/t20034.md index b7a4b87e..39cb673b 100644 --- a/docs/test_cases/t20034.md +++ b/docs/test_cases/t20034.md @@ -15,7 +15,7 @@ diagrams: function: "clanguml::t20034::A::a2()"] ``` ## Source code -File t20034.cc +File `tests/t20034/t20034.cc` ```cpp #include @@ -100,8 +100,25 @@ void B::b4() "name": "t20034_sequence", "participants": [ { + "activities": [ + { + "display_name": "d2()", + "id": "1707514178726476738", + "name": "d2", + "namespace": "", + "source_location": { + "column": 10, + "file": "t20034.cc", + "line": 46, + "translation_unit": "t20034.cc" + }, + "type": "method" + } + ], + "display_name": "D", "id": "272777525372220260", - "name": "clanguml::t20034::D", + "name": "D", + "namespace": "clanguml::t20034", "source_location": { "column": 8, "file": "t20034.cc", @@ -111,8 +128,64 @@ void B::b4() "type": "class" }, { + "activities": [ + { + "display_name": "c2()", + "id": "472904899982022039", + "name": "c2", + "namespace": "", + "source_location": { + "column": 10, + "file": "t20034.cc", + "line": 30, + "translation_unit": "t20034.cc" + }, + "type": "method" + }, + { + "display_name": "c4()", + "id": "395720534444062628", + "name": "c4", + "namespace": "", + "source_location": { + "column": 10, + "file": "t20034.cc", + "line": 39, + "translation_unit": "t20034.cc" + }, + "type": "method" + }, + { + "display_name": "c1()", + "id": "148530508384958711", + "name": "c1", + "namespace": "", + "source_location": { + "column": 10, + "file": "t20034.cc", + "line": 29, + "translation_unit": "t20034.cc" + }, + "type": "method" + }, + { + "display_name": "c3()", + "id": "2116989777037608337", + "name": "c3", + "namespace": "", + "source_location": { + "column": 10, + "file": "t20034.cc", + "line": 31, + "translation_unit": "t20034.cc" + }, + "type": "method" + } + ], + "display_name": "C", "id": "2153793652884753477", - "name": "clanguml::t20034::C", + "name": "C", + "namespace": "clanguml::t20034", "source_location": { "column": 8, "file": "t20034.cc", @@ -122,8 +195,51 @@ void B::b4() "type": "class" }, { + "activities": [ + { + "display_name": "b2()", + "id": "1034410188120190919", + "name": "b2", + "namespace": "", + "source_location": { + "column": 10, + "file": "t20034.cc", + "line": 19, + "translation_unit": "t20034.cc" + }, + "type": "method" + }, + { + "display_name": "b4()", + "id": "1774155279072101253", + "name": "b4", + "namespace": "", + "source_location": { + "column": 9, + "file": "t20034.cc", + "line": 65, + "translation_unit": "t20034.cc" + }, + "type": "method" + }, + { + "display_name": "b1()", + "id": "289899516984058785", + "name": "b1", + "namespace": "", + "source_location": { + "column": 10, + "file": "t20034.cc", + "line": 14, + "translation_unit": "t20034.cc" + }, + "type": "method" + } + ], + "display_name": "B", "id": "1214895773389400008", - "name": "clanguml::t20034::B", + "name": "B", + "namespace": "clanguml::t20034", "source_location": { "column": 8, "file": "t20034.cc", @@ -133,8 +249,25 @@ void B::b4() "type": "class" }, { + "activities": [ + { + "display_name": "a2()", + "id": "1307188853155365430", + "name": "a2", + "namespace": "", + "source_location": { + "column": 10, + "file": "t20034.cc", + "line": 7, + "translation_unit": "t20034.cc" + }, + "type": "method" + } + ], + "display_name": "A", "id": "1029414747563549012", - "name": "clanguml::t20034::A", + "name": "A", + "namespace": "clanguml::t20034", "source_location": { "column": 8, "file": "t20034.cc", @@ -144,15 +277,26 @@ void B::b4() "type": "class" }, { + "activities": [ + { + "display_name": "operator()()", + "id": "1996671438591925718", + "name": "operator()", + "namespace": "", + "type": "method" + } + ], + "display_name": "D::d2()::(lambda t20034.cc:56:18)", "id": "1026588549514900751", - "name": "clanguml::t20034::D::d2()::(lambda t20034.cc:56:18)", + "name": "D::d2()::(lambda t20034.cc:56:18)", + "namespace": "clanguml::t20034", "source_location": { "column": 18, "file": "t20034.cc", "line": 56, "translation_unit": "t20034.cc" }, - "type": "class" + "type": "lambda" } ], "sequences": [ @@ -173,7 +317,6 @@ void B::b4() { "from": { "activity_id": "1707514178726476738", - "activity_name": "clanguml::t20034::D::d2()", "participant_id": "272777525372220260" }, "name": "c2()", @@ -187,7 +330,6 @@ void B::b4() }, "to": { "activity_id": "472904899982022039", - "activity_name": "clanguml::t20034::C::c2()", "participant_id": "2153793652884753477" }, "type": "message" @@ -195,7 +337,6 @@ void B::b4() { "from": { "activity_id": "472904899982022039", - "activity_name": "clanguml::t20034::C::c2()", "participant_id": "2153793652884753477" }, "name": "b2()", @@ -209,7 +350,6 @@ void B::b4() }, "to": { "activity_id": "1034410188120190919", - "activity_name": "clanguml::t20034::B::b2()", "participant_id": "1214895773389400008" }, "type": "message" @@ -217,7 +357,6 @@ void B::b4() { "from": { "activity_id": "1034410188120190919", - "activity_name": "clanguml::t20034::B::b2()", "participant_id": "1214895773389400008" }, "name": "a2()", @@ -231,7 +370,6 @@ void B::b4() }, "to": { "activity_id": "1307188853155365430", - "activity_name": "clanguml::t20034::A::a2()", "participant_id": "1029414747563549012" }, "type": "message" @@ -243,7 +381,6 @@ void B::b4() { "from": { "activity_id": "1707514178726476738", - "activity_name": "clanguml::t20034::D::d2()", "participant_id": "272777525372220260" }, "name": "a2()", @@ -257,7 +394,6 @@ void B::b4() }, "to": { "activity_id": "1307188853155365430", - "activity_name": "clanguml::t20034::A::a2()", "participant_id": "1029414747563549012" }, "type": "message" @@ -269,7 +405,6 @@ void B::b4() { "from": { "activity_id": "1707514178726476738", - "activity_name": "clanguml::t20034::D::d2()", "participant_id": "272777525372220260" }, "name": "operator()()", @@ -283,7 +418,6 @@ void B::b4() }, "to": { "activity_id": "1996671438591925718", - "activity_name": "clanguml::t20034::D::d2()##(lambda t20034.cc:56:18)::operator()()", "participant_id": "1026588549514900751" }, "type": "message" @@ -291,7 +425,6 @@ void B::b4() { "from": { "activity_id": "1996671438591925718", - "activity_name": "clanguml::t20034::D::d2()::(lambda t20034.cc:56:18)::operator()()", "participant_id": "1026588549514900751" }, "name": "a2()", @@ -305,7 +438,6 @@ void B::b4() }, "to": { "activity_id": "1307188853155365430", - "activity_name": "clanguml::t20034::A::a2()", "participant_id": "1029414747563549012" }, "type": "message" @@ -317,7 +449,6 @@ void B::b4() { "from": { "activity_id": "1707514178726476738", - "activity_name": "clanguml::t20034::D::d2()", "participant_id": "272777525372220260" }, "name": "c4()", @@ -331,7 +462,6 @@ void B::b4() }, "to": { "activity_id": "395720534444062628", - "activity_name": "clanguml::t20034::C::c4()", "participant_id": "2153793652884753477" }, "type": "message" @@ -339,7 +469,6 @@ void B::b4() { "from": { "activity_id": "395720534444062628", - "activity_name": "clanguml::t20034::C::c4()", "participant_id": "2153793652884753477" }, "name": "b4()", @@ -353,7 +482,6 @@ void B::b4() }, "to": { "activity_id": "1774155279072101253", - "activity_name": "clanguml::t20034::B::b4()", "participant_id": "1214895773389400008" }, "type": "message" @@ -361,7 +489,6 @@ void B::b4() { "from": { "activity_id": "1774155279072101253", - "activity_name": "clanguml::t20034::B::b4()", "participant_id": "1214895773389400008" }, "name": "b2()", @@ -375,7 +502,6 @@ void B::b4() }, "to": { "activity_id": "1034410188120190919", - "activity_name": "clanguml::t20034::B::b2()", "participant_id": "1214895773389400008" }, "type": "message" @@ -383,7 +509,6 @@ void B::b4() { "from": { "activity_id": "1034410188120190919", - "activity_name": "clanguml::t20034::B::b2()", "participant_id": "1214895773389400008" }, "name": "a2()", @@ -397,7 +522,6 @@ void B::b4() }, "to": { "activity_id": "1307188853155365430", - "activity_name": "clanguml::t20034::A::a2()", "participant_id": "1029414747563549012" }, "type": "message" @@ -409,7 +533,6 @@ void B::b4() { "from": { "activity_id": "1707514178726476738", - "activity_name": "clanguml::t20034::D::d2()", "participant_id": "272777525372220260" }, "name": "c1()", @@ -423,7 +546,6 @@ void B::b4() }, "to": { "activity_id": "148530508384958711", - "activity_name": "clanguml::t20034::C::c1()", "participant_id": "2153793652884753477" }, "type": "message" @@ -431,7 +553,6 @@ void B::b4() { "from": { "activity_id": "148530508384958711", - "activity_name": "clanguml::t20034::C::c1()", "participant_id": "2153793652884753477" }, "name": "b1()", @@ -445,7 +566,6 @@ void B::b4() }, "to": { "activity_id": "289899516984058785", - "activity_name": "clanguml::t20034::B::b1()", "participant_id": "1214895773389400008" }, "type": "message" @@ -453,7 +573,6 @@ void B::b4() { "from": { "activity_id": "289899516984058785", - "activity_name": "clanguml::t20034::B::b1()", "participant_id": "1214895773389400008" }, "name": "a2()", @@ -467,7 +586,6 @@ void B::b4() }, "to": { "activity_id": "1307188853155365430", - "activity_name": "clanguml::t20034::A::a2()", "participant_id": "1029414747563549012" }, "type": "message" @@ -479,7 +597,6 @@ void B::b4() { "from": { "activity_id": "1707514178726476738", - "activity_name": "clanguml::t20034::D::d2()", "participant_id": "272777525372220260" }, "name": "c3()", @@ -493,7 +610,6 @@ void B::b4() }, "to": { "activity_id": "2116989777037608337", - "activity_name": "clanguml::t20034::C::c3()", "participant_id": "2153793652884753477" }, "type": "message" @@ -501,7 +617,6 @@ void B::b4() { "from": { "activity_id": "2116989777037608337", - "activity_name": "clanguml::t20034::C::c3()", "participant_id": "2153793652884753477" }, "name": "c2()", @@ -515,7 +630,6 @@ void B::b4() }, "to": { "activity_id": "472904899982022039", - "activity_name": "clanguml::t20034::C::c2()", "participant_id": "2153793652884753477" }, "type": "message" @@ -523,7 +637,6 @@ void B::b4() { "from": { "activity_id": "472904899982022039", - "activity_name": "clanguml::t20034::C::c2()", "participant_id": "2153793652884753477" }, "name": "b2()", @@ -537,7 +650,6 @@ void B::b4() }, "to": { "activity_id": "1034410188120190919", - "activity_name": "clanguml::t20034::B::b2()", "participant_id": "1214895773389400008" }, "type": "message" @@ -545,7 +657,6 @@ void B::b4() { "from": { "activity_id": "1034410188120190919", - "activity_name": "clanguml::t20034::B::b2()", "participant_id": "1214895773389400008" }, "name": "a2()", @@ -559,7 +670,6 @@ void B::b4() }, "to": { "activity_id": "1307188853155365430", - "activity_name": "clanguml::t20034::A::a2()", "participant_id": "1029414747563549012" }, "type": "message" diff --git a/docs/test_cases/t20034_sequence.svg b/docs/test_cases/t20034_sequence.svg index d58a926d..30062dc1 100644 --- a/docs/test_cases/t20034_sequence.svg +++ b/docs/test_cases/t20034_sequence.svg @@ -1,6 +1,6 @@ - + @@ -14,154 +14,154 @@ - - + + D - + D - - + + C - + C - - + + B - + B - - + + A - + A - - + + D::d2()::(lambda t20034.cc:56:18) - + D::d2()::(lambda t20034.cc:56:18) d2() - + c2() - + b2() - + a2() - + d2() - + a2() - + d2() - + operator()() - + a2() - + d2() - + c4() - + b4() - + b2() - + a2() - + d2() - + c1() - + b1() - + a2() - + d2() - + c3() - + c2() - + b2() - + a2() diff --git a/docs/test_cases/t20035.md b/docs/test_cases/t20035.md index 1edc8b2a..a9d791df 100644 --- a/docs/test_cases/t20035.md +++ b/docs/test_cases/t20035.md @@ -15,7 +15,7 @@ diagrams: function: "clanguml::t20035::c(int)"] ``` ## Source code -File t20035.cc +File `tests/t20035/t20035.cc` ```cpp namespace clanguml { namespace t20035 { @@ -43,8 +43,10 @@ int tmain(int argc, char **argv) { return a(argc); } "name": "t20035_sequence", "participants": [ { + "display_name": "tmain(int,char **)", "id": "1380099746477810520", - "name": "clanguml::t20035::tmain(int,char **)", + "name": "tmain", + "namespace": "clanguml::t20035", "source_location": { "column": 5, "file": "t20035.cc", @@ -54,8 +56,10 @@ int tmain(int argc, char **argv) { return a(argc); } "type": "function" }, { + "display_name": "a(int)", "id": "1503144831959453736", - "name": "clanguml::t20035::a(int)", + "name": "a", + "namespace": "clanguml::t20035", "source_location": { "column": 5, "file": "t20035.cc", @@ -65,8 +69,10 @@ int tmain(int argc, char **argv) { return a(argc); } "type": "function" }, { + "display_name": "b1(int)", "id": "440199113909747659", - "name": "clanguml::t20035::b1(int)", + "name": "b1", + "namespace": "clanguml::t20035", "source_location": { "column": 5, "file": "t20035.cc", @@ -76,8 +82,10 @@ int tmain(int argc, char **argv) { return a(argc); } "type": "function" }, { + "display_name": "c(int)", "id": "709102392181022891", - "name": "clanguml::t20035::c(int)", + "name": "c", + "namespace": "clanguml::t20035", "source_location": { "column": 5, "file": "t20035.cc", @@ -105,9 +113,7 @@ int tmain(int argc, char **argv) { return a(argc); } { "from": { "activity_id": "1380099746477810520", - "activity_name": "clanguml::t20035::tmain(int,char **)", - "participant_id": "1380099746477810520", - "participant_name": "clanguml::t20035::tmain(int,char **)" + "participant_id": "1380099746477810520" }, "name": "", "return_type": "int", @@ -120,7 +126,6 @@ int tmain(int argc, char **argv) { return a(argc); } }, "to": { "activity_id": "1503144831959453736", - "activity_name": "clanguml::t20035::a(int)", "participant_id": "1503144831959453736" }, "type": "message" @@ -128,9 +133,7 @@ int tmain(int argc, char **argv) { return a(argc); } { "from": { "activity_id": "1503144831959453736", - "activity_name": "clanguml::t20035::a(int)", - "participant_id": "1503144831959453736", - "participant_name": "clanguml::t20035::a(int)" + "participant_id": "1503144831959453736" }, "name": "", "return_type": "int", @@ -143,7 +146,6 @@ int tmain(int argc, char **argv) { return a(argc); } }, "to": { "activity_id": "440199113909747659", - "activity_name": "clanguml::t20035::b1(int)", "participant_id": "440199113909747659" }, "type": "message" @@ -151,9 +153,7 @@ int tmain(int argc, char **argv) { return a(argc); } { "from": { "activity_id": "440199113909747659", - "activity_name": "clanguml::t20035::b1(int)", - "participant_id": "440199113909747659", - "participant_name": "clanguml::t20035::b1(int)" + "participant_id": "440199113909747659" }, "name": "", "return_type": "int", @@ -166,7 +166,6 @@ int tmain(int argc, char **argv) { return a(argc); } }, "to": { "activity_id": "709102392181022891", - "activity_name": "clanguml::t20035::c(int)", "participant_id": "709102392181022891" }, "type": "message" diff --git a/docs/test_cases/t20035_sequence.svg b/docs/test_cases/t20035_sequence.svg index 2f1a311f..c05bd25e 100644 --- a/docs/test_cases/t20035_sequence.svg +++ b/docs/test_cases/t20035_sequence.svg @@ -1,6 +1,6 @@ - + @@ -13,39 +13,39 @@ - - + + tmain(int,char **) - + tmain(int,char **) - - + + a(int) - + a(int) - - + + b1(int) - + b1(int) - - + + c(int) - + c(int) - + - + - + diff --git a/docs/test_cases/t20036.md b/docs/test_cases/t20036.md index 3c20c1dc..9b3e4dae 100644 --- a/docs/test_cases/t20036.md +++ b/docs/test_cases/t20036.md @@ -14,7 +14,7 @@ diagrams: - function: "clanguml::t20036::A::a2()" ``` ## Source code -File t20036.cc +File `tests/t20036/t20036.cc` ```cpp #include @@ -72,8 +72,64 @@ struct D { "name": "t20036_sequence", "participants": [ { + "activities": [ + { + "display_name": "c1()", + "id": "1742507735898803374", + "name": "c1", + "namespace": "", + "source_location": { + "column": 10, + "file": "t20036.cc", + "line": 20, + "translation_unit": "t20036.cc" + }, + "type": "method" + }, + { + "display_name": "c2()", + "id": "128745191811378037", + "name": "c2", + "namespace": "", + "source_location": { + "column": 10, + "file": "t20036.cc", + "line": 21, + "translation_unit": "t20036.cc" + }, + "type": "method" + }, + { + "display_name": "c4()", + "id": "1735839766717973272", + "name": "c4", + "namespace": "", + "source_location": { + "column": 10, + "file": "t20036.cc", + "line": 30, + "translation_unit": "t20036.cc" + }, + "type": "method" + }, + { + "display_name": "c3()", + "id": "1523531372012294984", + "name": "c3", + "namespace": "", + "source_location": { + "column": 10, + "file": "t20036.cc", + "line": 22, + "translation_unit": "t20036.cc" + }, + "type": "method" + } + ], + "display_name": "C", "id": "589458700000736705", - "name": "clanguml::t20036::C", + "name": "C", + "namespace": "clanguml::t20036", "source_location": { "column": 8, "file": "t20036.cc", @@ -83,8 +139,38 @@ struct D { "type": "class" }, { + "activities": [ + { + "display_name": "b1()", + "id": "203660950902052846", + "name": "b1", + "namespace": "", + "source_location": { + "column": 10, + "file": "t20036.cc", + "line": 12, + "translation_unit": "t20036.cc" + }, + "type": "method" + }, + { + "display_name": "b2()", + "id": "1726094580455938498", + "name": "b2", + "namespace": "", + "source_location": { + "column": 10, + "file": "t20036.cc", + "line": 13, + "translation_unit": "t20036.cc" + }, + "type": "method" + } + ], + "display_name": "B", "id": "607147607288902300", - "name": "clanguml::t20036::B", + "name": "B", + "namespace": "clanguml::t20036", "source_location": { "column": 8, "file": "t20036.cc", @@ -94,8 +180,25 @@ struct D { "type": "class" }, { + "activities": [ + { + "display_name": "a2()", + "id": "2124074228514438863", + "name": "a2", + "namespace": "", + "source_location": { + "column": 10, + "file": "t20036.cc", + "line": 7, + "translation_unit": "t20036.cc" + }, + "type": "method" + } + ], + "display_name": "A", "id": "399722216848214287", - "name": "clanguml::t20036::A", + "name": "A", + "namespace": "clanguml::t20036", "source_location": { "column": 8, "file": "t20036.cc", @@ -105,8 +208,51 @@ struct D { "type": "class" }, { + "activities": [ + { + "display_name": "d1()", + "id": "701488875613014930", + "name": "d1", + "namespace": "", + "source_location": { + "column": 10, + "file": "t20036.cc", + "line": 36, + "translation_unit": "t20036.cc" + }, + "type": "method" + }, + { + "display_name": "d3()", + "id": "1897648539724183065", + "name": "d3", + "namespace": "", + "source_location": { + "column": 10, + "file": "t20036.cc", + "line": 38, + "translation_unit": "t20036.cc" + }, + "type": "method" + }, + { + "display_name": "d2()", + "id": "1534436779969087203", + "name": "d2", + "namespace": "", + "source_location": { + "column": 10, + "file": "t20036.cc", + "line": 37, + "translation_unit": "t20036.cc" + }, + "type": "method" + } + ], + "display_name": "D", "id": "847434467114564641", - "name": "clanguml::t20036::D", + "name": "D", + "namespace": "clanguml::t20036", "source_location": { "column": 8, "file": "t20036.cc", @@ -124,7 +270,6 @@ struct D { { "from": { "activity_id": "1742507735898803374", - "activity_name": "clanguml::t20036::C::c1()", "participant_id": "589458700000736705" }, "name": "b1()", @@ -138,7 +283,6 @@ struct D { }, "to": { "activity_id": "203660950902052846", - "activity_name": "clanguml::t20036::B::b1()", "participant_id": "607147607288902300" }, "type": "message" @@ -146,7 +290,6 @@ struct D { { "from": { "activity_id": "203660950902052846", - "activity_name": "clanguml::t20036::B::b1()", "participant_id": "607147607288902300" }, "name": "a2()", @@ -160,7 +303,6 @@ struct D { }, "to": { "activity_id": "2124074228514438863", - "activity_name": "clanguml::t20036::A::a2()", "participant_id": "399722216848214287" }, "type": "message" @@ -172,7 +314,6 @@ struct D { { "from": { "activity_id": "701488875613014930", - "activity_name": "clanguml::t20036::D::d1()", "participant_id": "847434467114564641" }, "name": "c2()", @@ -186,7 +327,6 @@ struct D { }, "to": { "activity_id": "128745191811378037", - "activity_name": "clanguml::t20036::C::c2()", "participant_id": "589458700000736705" }, "type": "message" @@ -194,7 +334,6 @@ struct D { { "from": { "activity_id": "128745191811378037", - "activity_name": "clanguml::t20036::C::c2()", "participant_id": "589458700000736705" }, "name": "b2()", @@ -208,7 +347,6 @@ struct D { }, "to": { "activity_id": "1726094580455938498", - "activity_name": "clanguml::t20036::B::b2()", "participant_id": "607147607288902300" }, "type": "message" @@ -216,7 +354,6 @@ struct D { { "from": { "activity_id": "1726094580455938498", - "activity_name": "clanguml::t20036::B::b2()", "participant_id": "607147607288902300" }, "name": "a2()", @@ -230,7 +367,6 @@ struct D { }, "to": { "activity_id": "2124074228514438863", - "activity_name": "clanguml::t20036::A::a2()", "participant_id": "399722216848214287" }, "type": "message" @@ -242,7 +378,6 @@ struct D { { "from": { "activity_id": "1897648539724183065", - "activity_name": "clanguml::t20036::D::d3()", "participant_id": "847434467114564641" }, "name": "a2()", @@ -256,7 +391,6 @@ struct D { }, "to": { "activity_id": "2124074228514438863", - "activity_name": "clanguml::t20036::A::a2()", "participant_id": "399722216848214287" }, "type": "message" @@ -268,7 +402,6 @@ struct D { { "from": { "activity_id": "1735839766717973272", - "activity_name": "clanguml::t20036::C::c4()", "participant_id": "589458700000736705" }, "name": "b2()", @@ -282,7 +415,6 @@ struct D { }, "to": { "activity_id": "1726094580455938498", - "activity_name": "clanguml::t20036::B::b2()", "participant_id": "607147607288902300" }, "type": "message" @@ -290,7 +422,6 @@ struct D { { "from": { "activity_id": "1726094580455938498", - "activity_name": "clanguml::t20036::B::b2()", "participant_id": "607147607288902300" }, "name": "a2()", @@ -304,7 +435,6 @@ struct D { }, "to": { "activity_id": "2124074228514438863", - "activity_name": "clanguml::t20036::A::a2()", "participant_id": "399722216848214287" }, "type": "message" @@ -316,7 +446,6 @@ struct D { { "from": { "activity_id": "1523531372012294984", - "activity_name": "clanguml::t20036::C::c3()", "participant_id": "589458700000736705" }, "name": "c2()", @@ -330,7 +459,6 @@ struct D { }, "to": { "activity_id": "128745191811378037", - "activity_name": "clanguml::t20036::C::c2()", "participant_id": "589458700000736705" }, "type": "message" @@ -338,7 +466,6 @@ struct D { { "from": { "activity_id": "128745191811378037", - "activity_name": "clanguml::t20036::C::c2()", "participant_id": "589458700000736705" }, "name": "b2()", @@ -352,7 +479,6 @@ struct D { }, "to": { "activity_id": "1726094580455938498", - "activity_name": "clanguml::t20036::B::b2()", "participant_id": "607147607288902300" }, "type": "message" @@ -360,7 +486,6 @@ struct D { { "from": { "activity_id": "1726094580455938498", - "activity_name": "clanguml::t20036::B::b2()", "participant_id": "607147607288902300" }, "name": "a2()", @@ -374,7 +499,6 @@ struct D { }, "to": { "activity_id": "2124074228514438863", - "activity_name": "clanguml::t20036::A::a2()", "participant_id": "399722216848214287" }, "type": "message" @@ -386,7 +510,6 @@ struct D { { "from": { "activity_id": "1534436779969087203", - "activity_name": "clanguml::t20036::D::d2()", "participant_id": "847434467114564641" }, "name": "c2()", @@ -400,7 +523,6 @@ struct D { }, "to": { "activity_id": "128745191811378037", - "activity_name": "clanguml::t20036::C::c2()", "participant_id": "589458700000736705" }, "type": "message" @@ -408,7 +530,6 @@ struct D { { "from": { "activity_id": "128745191811378037", - "activity_name": "clanguml::t20036::C::c2()", "participant_id": "589458700000736705" }, "name": "b2()", @@ -422,7 +543,6 @@ struct D { }, "to": { "activity_id": "1726094580455938498", - "activity_name": "clanguml::t20036::B::b2()", "participant_id": "607147607288902300" }, "type": "message" @@ -430,7 +550,6 @@ struct D { { "from": { "activity_id": "1726094580455938498", - "activity_name": "clanguml::t20036::B::b2()", "participant_id": "607147607288902300" }, "name": "a2()", @@ -444,7 +563,6 @@ struct D { }, "to": { "activity_id": "2124074228514438863", - "activity_name": "clanguml::t20036::A::a2()", "participant_id": "399722216848214287" }, "type": "message" diff --git a/docs/test_cases/t20036_sequence.svg b/docs/test_cases/t20036_sequence.svg index 2578e324..2872b901 100644 --- a/docs/test_cases/t20036_sequence.svg +++ b/docs/test_cases/t20036_sequence.svg @@ -1,6 +1,6 @@ - + @@ -13,131 +13,131 @@ - - + + C - + C - - + + B - + B - - + + A - + A - - + + D - + D c1() - + b1() - + a2() - + d1() - + c2() - + b2() - + a2() - + d3() - + a2() - + c4() - + b2() - + a2() - + c3() - + c2() - + b2() - + a2() - + d2() - + c2() - + b2() - + a2() diff --git a/docs/test_cases/t20037.md b/docs/test_cases/t20037.md index d2d11cd7..216ef07c 100644 --- a/docs/test_cases/t20037.md +++ b/docs/test_cases/t20037.md @@ -14,7 +14,7 @@ diagrams: - function: "clanguml::t20037::tmain(int,char **)" ``` ## Source code -File t20037.cc +File `tests/t20037/t20037.cc` ```cpp namespace clanguml { namespace t20037 { @@ -66,8 +66,10 @@ void tmain(int argc, char **argv) "name": "t20037_sequence", "participants": [ { + "display_name": "tmain(int,char **)", "id": "1676651465274088148", - "name": "clanguml::t20037::tmain(int,char **)", + "name": "tmain", + "namespace": "clanguml::t20037", "source_location": { "column": 6, "file": "t20037.cc", @@ -77,8 +79,10 @@ void tmain(int argc, char **argv) "type": "function" }, { + "display_name": "a()", "id": "150460916850164805", - "name": "clanguml::t20037::a()", + "name": "a", + "namespace": "clanguml::t20037", "source_location": { "column": 5, "file": "t20037.cc", @@ -88,8 +92,25 @@ void tmain(int argc, char **argv) "type": "function" }, { + "activities": [ + { + "display_name": "A()", + "id": "1135451191676888496", + "name": "A", + "namespace": "", + "source_location": { + "column": 5, + "file": "t20037.cc", + "line": 5, + "translation_unit": "t20037.cc" + }, + "type": "method" + } + ], + "display_name": "A", "id": "1329920824155530080", - "name": "clanguml::t20037::A", + "name": "A", + "namespace": "clanguml::t20037", "source_location": { "column": 8, "file": "t20037.cc", @@ -99,8 +120,10 @@ void tmain(int argc, char **argv) "type": "class" }, { + "display_name": "initb()", "id": "1303264946914255327", - "name": "clanguml::t20037::initb()", + "name": "initb", + "namespace": "clanguml::t20037", "source_location": { "column": 3, "file": "t20037.cc", @@ -110,8 +133,25 @@ void tmain(int argc, char **argv) "type": "function" }, { + "activities": [ + { + "display_name": "get()", + "id": "107877908217538137", + "name": "get", + "namespace": "", + "source_location": { + "column": 9, + "file": "t20037.cc", + "line": 14, + "translation_unit": "t20037.cc" + }, + "type": "method" + } + ], + "display_name": "B", "id": "1746900845528413124", - "name": "clanguml::t20037::B", + "name": "B", + "namespace": "clanguml::t20037", "source_location": { "column": 8, "file": "t20037.cc", @@ -121,8 +161,10 @@ void tmain(int argc, char **argv) "type": "class" }, { + "display_name": "c()", "id": "1349992361928784583", - "name": "clanguml::t20037::c()", + "name": "c", + "namespace": "clanguml::t20037", "source_location": { "column": 5, "file": "t20037.cc", @@ -138,9 +180,7 @@ void tmain(int argc, char **argv) { "from": { "activity_id": "1676651465274088148", - "activity_name": "clanguml::t20037::tmain(int,char **)", - "participant_id": "1676651465274088148", - "participant_name": "clanguml::t20037::tmain(int,char **)" + "participant_id": "1676651465274088148" }, "name": "", "return_type": "int", @@ -153,7 +193,6 @@ void tmain(int argc, char **argv) }, "to": { "activity_id": "150460916850164805", - "activity_name": "clanguml::t20037::a()", "participant_id": "150460916850164805" }, "type": "message" @@ -161,9 +200,7 @@ void tmain(int argc, char **argv) { "from": { "activity_id": "150460916850164805", - "activity_name": "clanguml::t20037::a()", - "participant_id": "150460916850164805", - "participant_name": "clanguml::t20037::a()" + "participant_id": "150460916850164805" }, "name": "A()", "return_type": "void", @@ -176,7 +213,6 @@ void tmain(int argc, char **argv) }, "to": { "activity_id": "1135451191676888496", - "activity_name": "clanguml::t20037::A::A()", "participant_id": "1329920824155530080" }, "type": "message" @@ -184,9 +220,7 @@ void tmain(int argc, char **argv) { "from": { "activity_id": "150460916850164805", - "activity_name": "clanguml::t20037::a()", - "participant_id": "150460916850164805", - "participant_name": "clanguml::t20037::a()" + "participant_id": "150460916850164805" }, "name": "", "return_type": "B", @@ -199,7 +233,6 @@ void tmain(int argc, char **argv) }, "to": { "activity_id": "1303264946914255327", - "activity_name": "clanguml::t20037::initb()", "participant_id": "1303264946914255327" }, "type": "message" @@ -207,9 +240,7 @@ void tmain(int argc, char **argv) { "from": { "activity_id": "150460916850164805", - "activity_name": "clanguml::t20037::a()", - "participant_id": "150460916850164805", - "participant_name": "clanguml::t20037::a()" + "participant_id": "150460916850164805" }, "name": "get()", "return_type": "int", @@ -222,7 +253,6 @@ void tmain(int argc, char **argv) }, "to": { "activity_id": "107877908217538137", - "activity_name": "clanguml::t20037::B::get()", "participant_id": "1746900845528413124" }, "type": "message" @@ -230,9 +260,7 @@ void tmain(int argc, char **argv) { "from": { "activity_id": "150460916850164805", - "activity_name": "clanguml::t20037::a()", - "participant_id": "150460916850164805", - "participant_name": "clanguml::t20037::a()" + "participant_id": "150460916850164805" }, "name": "", "return_type": "int", @@ -245,7 +273,6 @@ void tmain(int argc, char **argv) }, "to": { "activity_id": "1349992361928784583", - "activity_name": "clanguml::t20037::c()", "participant_id": "1349992361928784583" }, "type": "message" @@ -253,9 +280,7 @@ void tmain(int argc, char **argv) { "from": { "activity_id": "1676651465274088148", - "activity_name": "clanguml::t20037::tmain(int,char **)", - "participant_id": "1676651465274088148", - "participant_name": "clanguml::t20037::tmain(int,char **)" + "participant_id": "1676651465274088148" }, "name": "", "return_type": "int", @@ -268,7 +293,6 @@ void tmain(int argc, char **argv) }, "to": { "activity_id": "150460916850164805", - "activity_name": "clanguml::t20037::a()", "participant_id": "150460916850164805" }, "type": "message" @@ -276,9 +300,7 @@ void tmain(int argc, char **argv) { "from": { "activity_id": "1676651465274088148", - "activity_name": "clanguml::t20037::tmain(int,char **)", - "participant_id": "1676651465274088148", - "participant_name": "clanguml::t20037::tmain(int,char **)" + "participant_id": "1676651465274088148" }, "name": "", "return_type": "int", @@ -291,7 +313,6 @@ void tmain(int argc, char **argv) }, "to": { "activity_id": "150460916850164805", - "activity_name": "clanguml::t20037::a()", "participant_id": "150460916850164805" }, "type": "message" diff --git a/docs/test_cases/t20037_sequence.svg b/docs/test_cases/t20037_sequence.svg index 1447837b..c4639fd4 100644 --- a/docs/test_cases/t20037_sequence.svg +++ b/docs/test_cases/t20037_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,95 +9,95 @@ - - - - - - - - - - - - + + + + + + + + + + + + - - + + tmain(int,char **) - + tmain(int,char **) - - + + a() - + a() - - + + A - + A - - + + initb() - + initb() - - + + B - + B - - + + c() - + c() - - - - - - - - - - - - - + + + + + + + + + + + + + - + A() - + - + get() - + @@ -105,18 +105,18 @@ - + - + get() - + @@ -124,18 +124,18 @@ - + - + get() - + diff --git a/docs/test_cases/t20038.md b/docs/test_cases/t20038.md index 577e54dc..f6ffab1e 100644 --- a/docs/test_cases/t20038.md +++ b/docs/test_cases/t20038.md @@ -18,7 +18,7 @@ diagrams: using_namespace: clanguml::t20038 ``` ## Source code -File t20038.cc +File `tests/t20038/t20038.cc` ```cpp #include @@ -112,6 +112,23 @@ int tmain() } } ``` +File `tests/t20038/include/t20038.h` +```cpp +#pragma once + +namespace clanguml { +namespace t20038 { + +template T add_impl(T a, T b) { return a + b; }; + +template T add(T a, T b) +{ + // Invoke 'add' implementation + return add_impl(a, b); +}; +} +} +``` ## Generated PlantUML diagrams ![t20038_sequence](./t20038_sequence.svg "Sequence diagram comment decorator test case") ## Generated Mermaid diagrams @@ -123,8 +140,10 @@ int tmain() "name": "t20038_sequence", "participants": [ { + "display_name": "tmain()", "id": "1013610625329227974", - "name": "clanguml::t20038::tmain()", + "name": "tmain", + "namespace": "clanguml::t20038", "source_location": { "column": 5, "file": "t20038.cc", @@ -134,8 +153,77 @@ int tmain() "type": "function" }, { + "activities": [ + { + "display_name": "b()", + "id": "690314603725772987", + "name": "b", + "namespace": "", + "source_location": { + "column": 9, + "file": "t20038.cc", + "line": 29, + "translation_unit": "t20038.cc" + }, + "type": "method" + }, + { + "display_name": "bbb()", + "id": "1902331999195245434", + "name": "bbb", + "namespace": "", + "source_location": { + "column": 9, + "file": "t20038.cc", + "line": 33, + "translation_unit": "t20038.cc" + }, + "type": "method" + }, + { + "display_name": "bbbb()", + "id": "57189865474209187", + "name": "bbbb", + "namespace": "", + "source_location": { + "column": 9, + "file": "t20038.cc", + "line": 35, + "translation_unit": "t20038.cc" + }, + "type": "method" + }, + { + "display_name": "wrap(int)", + "id": "732774941205637034", + "name": "wrap", + "namespace": "", + "source_location": { + "column": 9, + "file": "t20038.cc", + "line": 39, + "translation_unit": "t20038.cc" + }, + "type": "method" + }, + { + "display_name": "bbbbb()", + "id": "726295067786650864", + "name": "bbbbb", + "namespace": "", + "source_location": { + "column": 9, + "file": "t20038.cc", + "line": 37, + "translation_unit": "t20038.cc" + }, + "type": "method" + } + ], + "display_name": "B", "id": "1040787777721396414", - "name": "clanguml::t20038::B", + "name": "B", + "namespace": "clanguml::t20038", "source_location": { "column": 8, "file": "t20038.cc", @@ -145,8 +233,51 @@ int tmain() "type": "class" }, { + "activities": [ + { + "display_name": "a()", + "id": "1311298747919334371", + "name": "a", + "namespace": "", + "source_location": { + "column": 9, + "file": "t20038.cc", + "line": 9, + "translation_unit": "t20038.cc" + }, + "type": "method" + }, + { + "display_name": "aaa()", + "id": "2157208254318041144", + "name": "aaa", + "namespace": "", + "source_location": { + "column": 9, + "file": "t20038.cc", + "line": 21, + "translation_unit": "t20038.cc" + }, + "type": "method" + }, + { + "display_name": "aaaa()", + "id": "1370854824770046153", + "name": "aaaa", + "namespace": "", + "source_location": { + "column": 9, + "file": "t20038.cc", + "line": 23, + "translation_unit": "t20038.cc" + }, + "type": "method" + } + ], + "display_name": "A", "id": "2022724814881480995", - "name": "clanguml::t20038::A", + "name": "A", + "namespace": "clanguml::t20038", "source_location": { "column": 8, "file": "t20038.cc", @@ -156,8 +287,10 @@ int tmain() "type": "class" }, { + "display_name": "add(int,int)", "id": "2008308445790932614", - "name": "clanguml::t20038::add(int,int)", + "name": "add", + "namespace": "clanguml::t20038", "source_location": { "column": 25, "file": "include/t20038.h", @@ -167,8 +300,10 @@ int tmain() "type": "function_template" }, { + "display_name": "add_impl(int,int)", "id": "1863007445376981099", - "name": "clanguml::t20038::add_impl(int,int)", + "name": "add_impl", + "namespace": "clanguml::t20038", "source_location": { "column": 25, "file": "include/t20038.h", @@ -178,8 +313,10 @@ int tmain() "type": "function_template" }, { + "display_name": "add_impl(double,double)", "id": "1722521509166427875", - "name": "clanguml::t20038::add_impl(double,double)", + "name": "add_impl", + "namespace": "clanguml::t20038", "source_location": { "column": 25, "file": "include/t20038.h", @@ -203,9 +340,7 @@ int tmain() { "from": { "activity_id": "1013610625329227974", - "activity_name": "clanguml::t20038::tmain()", - "participant_id": "1013610625329227974", - "participant_name": "clanguml::t20038::tmain()" + "participant_id": "1013610625329227974" }, "name": "b()", "return_type": "int", @@ -218,7 +353,6 @@ int tmain() }, "to": { "activity_id": "690314603725772987", - "activity_name": "clanguml::t20038::B::b()", "participant_id": "1040787777721396414" }, "type": "message" @@ -226,7 +360,6 @@ int tmain() { "from": { "activity_id": "690314603725772987", - "activity_name": "clanguml::t20038::B::b()", "participant_id": "1040787777721396414" }, "name": "a()", @@ -240,7 +373,6 @@ int tmain() }, "to": { "activity_id": "1311298747919334371", - "activity_name": "clanguml::t20038::A::a()", "participant_id": "2022724814881480995" }, "type": "message" @@ -258,9 +390,7 @@ int tmain() "comment": "... or just once", "from": { "activity_id": "1013610625329227974", - "activity_name": "clanguml::t20038::tmain()", - "participant_id": "1013610625329227974", - "participant_name": "clanguml::t20038::tmain()" + "participant_id": "1013610625329227974" }, "name": "b()", "return_type": "int", @@ -273,7 +403,6 @@ int tmain() }, "to": { "activity_id": "690314603725772987", - "activity_name": "clanguml::t20038::B::b()", "participant_id": "1040787777721396414" }, "type": "message" @@ -288,9 +417,7 @@ int tmain() { "from": { "activity_id": "1013610625329227974", - "activity_name": "clanguml::t20038::tmain()", - "participant_id": "1013610625329227974", - "participant_name": "clanguml::t20038::tmain()" + "participant_id": "1013610625329227974" }, "name": "bbb()", "return_type": "int", @@ -303,7 +430,6 @@ int tmain() }, "to": { "activity_id": "1902331999195245434", - "activity_name": "clanguml::t20038::B::bbb()", "participant_id": "1040787777721396414" }, "type": "message" @@ -311,7 +437,6 @@ int tmain() { "from": { "activity_id": "1902331999195245434", - "activity_name": "clanguml::t20038::B::bbb()", "participant_id": "1040787777721396414" }, "name": "aaa()", @@ -325,7 +450,6 @@ int tmain() }, "to": { "activity_id": "2157208254318041144", - "activity_name": "clanguml::t20038::A::aaa()", "participant_id": "2022724814881480995" }, "type": "message" @@ -333,9 +457,7 @@ int tmain() { "from": { "activity_id": "1013610625329227974", - "activity_name": "clanguml::t20038::tmain()", - "participant_id": "1013610625329227974", - "participant_name": "clanguml::t20038::tmain()" + "participant_id": "1013610625329227974" }, "name": "bbbb()", "return_type": "int", @@ -348,7 +470,6 @@ int tmain() }, "to": { "activity_id": "57189865474209187", - "activity_name": "clanguml::t20038::B::bbbb()", "participant_id": "1040787777721396414" }, "type": "message" @@ -356,7 +477,6 @@ int tmain() { "from": { "activity_id": "57189865474209187", - "activity_name": "clanguml::t20038::B::bbbb()", "participant_id": "1040787777721396414" }, "name": "aaaa()", @@ -370,7 +490,6 @@ int tmain() }, "to": { "activity_id": "1370854824770046153", - "activity_name": "clanguml::t20038::A::aaaa()", "participant_id": "2022724814881480995" }, "type": "message" @@ -378,7 +497,6 @@ int tmain() { "from": { "activity_id": "1370854824770046153", - "activity_name": "clanguml::t20038::A::aaaa()", "participant_id": "2022724814881480995" }, "name": "", @@ -392,7 +510,6 @@ int tmain() }, "to": { "activity_id": "2008308445790932614", - "activity_name": "clanguml::t20038::add(int,int)", "participant_id": "2008308445790932614" }, "type": "message" @@ -401,9 +518,7 @@ int tmain() "comment": "Invoke 'add' implementation", "from": { "activity_id": "2008308445790932614", - "activity_name": "clanguml::t20038::add(int,int)", - "participant_id": "2008308445790932614", - "participant_name": "clanguml::t20038::add(int,int)" + "participant_id": "2008308445790932614" }, "name": "", "return_type": "", @@ -416,7 +531,6 @@ int tmain() }, "to": { "activity_id": "1863007445376981099", - "activity_name": "clanguml::t20038::add_impl(int,int)", "participant_id": "1863007445376981099" }, "type": "message" @@ -425,9 +539,7 @@ int tmain() "comment": "This comment should be rendered only once", "from": { "activity_id": "1013610625329227974", - "activity_name": "clanguml::t20038::tmain()", - "participant_id": "1013610625329227974", - "participant_name": "clanguml::t20038::tmain()" + "participant_id": "1013610625329227974" }, "name": "wrap(int)", "return_type": "int", @@ -440,7 +552,6 @@ int tmain() }, "to": { "activity_id": "732774941205637034", - "activity_name": "clanguml::t20038::B::wrap(int)", "participant_id": "1040787777721396414" }, "type": "message" @@ -449,9 +560,7 @@ int tmain() "comment": "What is 2 + 2?", "from": { "activity_id": "1013610625329227974", - "activity_name": "clanguml::t20038::tmain()", - "participant_id": "1013610625329227974", - "participant_name": "clanguml::t20038::tmain()" + "participant_id": "1013610625329227974" }, "name": "", "return_type": "", @@ -464,7 +573,6 @@ int tmain() }, "to": { "activity_id": "1722521509166427875", - "activity_name": "clanguml::t20038::add_impl(double,double)", "participant_id": "1722521509166427875" }, "type": "message" @@ -473,9 +581,7 @@ int tmain() "comment": "This is a generic comment about calling bbbbb()\n\n\\uml{note:some_other_diagram[] This is specific for some_other_diagram}\n\\uml{note:t20038_sequence[] Calling B::bbbbb()}", "from": { "activity_id": "1013610625329227974", - "activity_name": "clanguml::t20038::tmain()", - "participant_id": "1013610625329227974", - "participant_name": "clanguml::t20038::tmain()" + "participant_id": "1013610625329227974" }, "name": "bbbbb()", "return_type": "int", @@ -488,7 +594,6 @@ int tmain() }, "to": { "activity_id": "726295067786650864", - "activity_name": "clanguml::t20038::B::bbbbb()", "participant_id": "1040787777721396414" }, "type": "message" @@ -496,7 +601,6 @@ int tmain() { "from": { "activity_id": "726295067786650864", - "activity_name": "clanguml::t20038::B::bbbbb()", "participant_id": "1040787777721396414" }, "name": "aaaa()", @@ -510,7 +614,6 @@ int tmain() }, "to": { "activity_id": "1370854824770046153", - "activity_name": "clanguml::t20038::A::aaaa()", "participant_id": "2022724814881480995" }, "type": "message" @@ -523,9 +626,7 @@ int tmain() { "from": { "activity_id": "1013610625329227974", - "activity_name": "clanguml::t20038::tmain()", - "participant_id": "1013610625329227974", - "participant_name": "clanguml::t20038::tmain()" + "participant_id": "1013610625329227974" }, "name": "bbb()", "return_type": "int", @@ -538,7 +639,6 @@ int tmain() }, "to": { "activity_id": "1902331999195245434", - "activity_name": "clanguml::t20038::B::bbb()", "participant_id": "1040787777721396414" }, "type": "message" diff --git a/docs/test_cases/t20038_sequence.svg b/docs/test_cases/t20038_sequence.svg index 4781482e..c606ec70 100644 --- a/docs/test_cases/t20038_sequence.svg +++ b/docs/test_cases/t20038_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,29 +9,29 @@ - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + - + @@ -39,62 +39,62 @@ - - + + tmain() - + tmain() - - + + B - + B - - + + A - + A - - + + add<int>(int,int) - + add<int>(int,int) - - + + add_impl<int>(int,int) - + add_impl<int>(int,int) - - + + add_impl<double>(double,double) - + add_impl<double>(double,double) - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + Nisl purus in mollis nunc sed id semper. Varius vel pharetra vel turpis. Arcu @@ -111,18 +111,18 @@ alt - + Repeat 5 times... loop - + b() - + a() @@ -132,15 +132,15 @@ - + ... or just once - + b() - + a() @@ -149,12 +149,12 @@ - + bbb() - + aaa() @@ -163,24 +163,24 @@ - + bbbb() - + aaaa() - + - + Invoke 'add' implementation - + @@ -192,47 +192,47 @@ - + This comment should be rendered only once - + wrap(int) - + What is 2 + 2? - + - + Calling B::bbbbb() - + bbbbb() - + aaaa() - + - + Invoke 'add' implementation - + @@ -244,20 +244,20 @@ - + This is a conditional operator alt - + [ bbb() ] - + aaa() diff --git a/docs/test_cases/t20039.md b/docs/test_cases/t20039.md new file mode 100644 index 00000000..12a4d2a1 --- /dev/null +++ b/docs/test_cases/t20039.md @@ -0,0 +1,285 @@ +# t20039 - Test case for type aliases config option in sequence diagrams +## Config +```yaml +diagrams: + t20039_sequence: + type: sequence + glob: + - t20039.cc + include: + namespaces: + - clanguml::t20039 + using_namespace: clanguml::t20039 + type_aliases: + "std::vector": int_vec_t + "std::map": int_map_t + from: + - function: "clanguml::t20039::tmain()" +``` +## Source code +File `tests/t20039/t20039.cc` +```cpp +#include +#include +#include + +namespace clanguml { +namespace t20039 { + +template struct A { + std::vector> a(T p) { return {}; } +}; + +struct R { + A a_int; + A> a_intvec; + A> a_intmap; + + void run() + { + a_int.a({}); + a_intvec.a({}); + a_intmap.a({}); + } +}; + +int tmain() +{ + R r; + + r.run(); + + return 0; +} +} +} +``` +## Generated PlantUML diagrams +![t20039_sequence](./t20039_sequence.svg "Test case for type aliases config option in sequence diagrams") +## Generated Mermaid diagrams +![t20039_sequence](./t20039_sequence_mermaid.svg "Test case for type aliases config option in sequence diagrams") +## Generated JSON models +```json +{ + "diagram_type": "sequence", + "name": "t20039_sequence", + "participants": [ + { + "display_name": "tmain()", + "id": "2148451609276010605", + "name": "tmain", + "namespace": "clanguml::t20039", + "source_location": { + "column": 5, + "file": "t20039.cc", + "line": 25, + "translation_unit": "t20039.cc" + }, + "type": "function" + }, + { + "activities": [ + { + "display_name": "run()", + "id": "743095879760855186", + "name": "run", + "namespace": "", + "source_location": { + "column": 10, + "file": "t20039.cc", + "line": 17, + "translation_unit": "t20039.cc" + }, + "type": "method" + } + ], + "display_name": "R", + "id": "911510236910860394", + "name": "R", + "namespace": "clanguml::t20039", + "source_location": { + "column": 8, + "file": "t20039.cc", + "line": 12, + "translation_unit": "t20039.cc" + }, + "type": "class" + }, + { + "activities": [ + { + "display_name": "a(int)", + "id": "1669283381205253105", + "name": "a", + "namespace": "", + "source_location": { + "column": 33, + "file": "t20039.cc", + "line": 9, + "translation_unit": "t20039.cc" + }, + "type": "method" + } + ], + "display_name": "A", + "id": "1909240382008619079", + "name": "A", + "namespace": "clanguml::t20039", + "source_location": { + "column": 30, + "file": "t20039.cc", + "line": 8, + "translation_unit": "t20039.cc" + }, + "type": "class" + }, + { + "activities": [ + { + "display_name": "a(int_vec_t)", + "id": "102043386959871430", + "name": "a", + "namespace": "", + "source_location": { + "column": 33, + "file": "t20039.cc", + "line": 9, + "translation_unit": "t20039.cc" + }, + "type": "method" + } + ], + "display_name": "A", + "id": "2044714081517303079", + "name": "A", + "namespace": "clanguml::t20039", + "source_location": { + "column": 30, + "file": "t20039.cc", + "line": 8, + "translation_unit": "t20039.cc" + }, + "type": "class" + }, + { + "activities": [ + { + "display_name": "a(int_map_t)", + "id": "720393008985738554", + "name": "a", + "namespace": "", + "source_location": { + "column": 33, + "file": "t20039.cc", + "line": 9, + "translation_unit": "t20039.cc" + }, + "type": "method" + } + ], + "display_name": "A", + "id": "1577435969137543418", + "name": "A", + "namespace": "clanguml::t20039", + "source_location": { + "column": 30, + "file": "t20039.cc", + "line": 8, + "translation_unit": "t20039.cc" + }, + "type": "class" + } + ], + "sequences": [ + { + "messages": [ + { + "from": { + "activity_id": "2148451609276010605", + "participant_id": "2148451609276010605" + }, + "name": "run()", + "return_type": "void", + "scope": "normal", + "source_location": { + "column": 5, + "file": "t20039.cc", + "line": 29, + "translation_unit": "t20039.cc" + }, + "to": { + "activity_id": "743095879760855186", + "participant_id": "911510236910860394" + }, + "type": "message" + }, + { + "from": { + "activity_id": "743095879760855186", + "participant_id": "911510236910860394" + }, + "name": "a(int)", + "return_type": "std::vector>", + "scope": "normal", + "source_location": { + "column": 9, + "file": "t20039.cc", + "line": 19, + "translation_unit": "t20039.cc" + }, + "to": { + "activity_id": "1669283381205253105", + "participant_id": "1909240382008619079" + }, + "type": "message" + }, + { + "from": { + "activity_id": "743095879760855186", + "participant_id": "911510236910860394" + }, + "name": "a(int_vec_t)", + "return_type": "std::vector>>>", + "scope": "normal", + "source_location": { + "column": 9, + "file": "t20039.cc", + "line": 20, + "translation_unit": "t20039.cc" + }, + "to": { + "activity_id": "102043386959871430", + "participant_id": "2044714081517303079" + }, + "type": "message" + }, + { + "from": { + "activity_id": "743095879760855186", + "participant_id": "911510236910860394" + }, + "name": "a(int_map_t)", + "return_type": "std::vector,allocator>>>>", + "scope": "normal", + "source_location": { + "column": 9, + "file": "t20039.cc", + "line": 21, + "translation_unit": "t20039.cc" + }, + "to": { + "activity_id": "720393008985738554", + "participant_id": "1577435969137543418" + }, + "type": "message" + } + ], + "start_from": { + "id": 2148451609276010605, + "location": "clanguml::t20039::tmain()" + } + } + ], + "using_namespace": "clanguml::t20039" +} +``` diff --git a/docs/test_cases/t20039_sequence.svg b/docs/test_cases/t20039_sequence.svg new file mode 100644 index 00000000..afe69f1a --- /dev/null +++ b/docs/test_cases/t20039_sequence.svg @@ -0,0 +1,84 @@ + + + + + + + + + + + + + + + + + + + + + + + + tmain() + + tmain() + + + + R + + R + + + + A<int> + + A<int> + + + + A<int_vec_t> + + A<int_vec_t> + + + + A<int_map_t> + + A<int_map_t> + + + + + + + + + + run() + + + + + a(int) + + + + + + + a(int_vec_t) + + + + + + + a(int_map_t) + + + + + diff --git a/docs/test_cases/t20039_sequence_mermaid.svg b/docs/test_cases/t20039_sequence_mermaid.svg new file mode 100644 index 00000000..22f712ae --- /dev/null +++ b/docs/test_cases/t20039_sequence_mermaid.svg @@ -0,0 +1,144 @@ + + + + + A<int_map_t> + + + + + + A<int_vec_t> + + + + + + A<int> + + + + + + R + + + + + + tmain() + + + + + + + + A<int_map_t> + + + + + + + + + A<int_vec_t> + + + + + + + + + A<int> + + + + + + + + + R + + + + + + + + + tmain() + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + run() + + a(int) + + ​ + + a(int_vec_t) + + ​ + + a(int_map_t) + + ​ + + diff --git a/docs/test_cases/t30001.md b/docs/test_cases/t30001.md index b310a418..a827202e 100644 --- a/docs/test_cases/t30001.md +++ b/docs/test_cases/t30001.md @@ -36,7 +36,7 @@ diagrams: ``` ## Source code -File t30001.cc +File `tests/t30001/t30001.cc` ```cpp namespace clanguml { namespace t30001 { @@ -76,48 +76,21 @@ namespace BB { "diagram_type": "package", "elements": [ { - "display_name": "clanguml", - "elements": [ - { - "display_name": "clanguml::t30001", - "id": "1807513669798383046", - "is_deprecated": false, - "name": "t30001", - "source_location": { - "column": 11, - "file": "t30001.cc", - "line": 2, - "translation_unit": "t30001.cc" - }, - "type": "namespace" - } - ], - "id": "2174271399507040339", - "is_deprecated": false, - "name": "clanguml", - "source_location": { - "column": 11, - "file": "t30001.cc", - "line": 1, - "translation_unit": "t30001.cc" - }, - "type": "namespace" - }, - { - "display_name": "clanguml::t30001::A", + "display_name": "A", "elements": [ { "comment": { "formatted": "This is namespace AA in namespace A", "raw": "/// This is namespace AA in namespace A" }, - "display_name": "clanguml::t30001::A::AA", + "display_name": "AA", "elements": [ { - "display_name": "clanguml::t30001::A::AA::AAA", + "display_name": "AAA", "id": "274638237740249424", "is_deprecated": false, "name": "AAA", + "namespace": "clanguml::t30001::A::AA", "source_location": { "column": 11, "file": "t30001.cc", @@ -127,10 +100,11 @@ namespace BB { "type": "namespace" }, { - "display_name": "clanguml::t30001::A::AA::BBB", + "display_name": "BBB", "id": "2129154382024012563", "is_deprecated": false, "name": "BBB", + "namespace": "clanguml::t30001::A::AA", "source_location": { "column": 11, "file": "t30001.cc", @@ -143,6 +117,7 @@ namespace BB { "id": "1528517990989164155", "is_deprecated": false, "name": "AA", + "namespace": "clanguml::t30001::A", "source_location": { "column": 11, "file": "t30001.cc", @@ -152,10 +127,11 @@ namespace BB { "type": "namespace" }, { - "display_name": "clanguml::t30001::A::BB", + "display_name": "BB", "id": "983199564524723281", "is_deprecated": false, "name": "BB", + "namespace": "clanguml::t30001::A", "source_location": { "column": 11, "file": "t30001.cc", @@ -168,6 +144,7 @@ namespace BB { "id": "1184614645531659789", "is_deprecated": false, "name": "A", + "namespace": "clanguml::t30001", "source_location": { "column": 11, "file": "t30001.cc", @@ -177,20 +154,21 @@ namespace BB { "type": "namespace" }, { - "display_name": "clanguml::t30001::B", + "display_name": "B", "elements": [ { "comment": { "formatted": "This is namespace AA in namespace B", "raw": "/// This is namespace AA in namespace B" }, - "display_name": "clanguml::t30001::B::AA", + "display_name": "AA", "elements": [ { - "display_name": "clanguml::t30001::B::AA::AAA", + "display_name": "AAA", "id": "262162485307734028", "is_deprecated": false, "name": "AAA", + "namespace": "clanguml::t30001::B::AA", "source_location": { "column": 11, "file": "t30001.cc", @@ -200,10 +178,11 @@ namespace BB { "type": "namespace" }, { - "display_name": "clanguml::t30001::B::AA::BBB", + "display_name": "BBB", "id": "18542334992237803", "is_deprecated": false, "name": "BBB", + "namespace": "clanguml::t30001::B::AA", "source_location": { "column": 11, "file": "t30001.cc", @@ -216,6 +195,7 @@ namespace BB { "id": "895913707182089871", "is_deprecated": false, "name": "AA", + "namespace": "clanguml::t30001::B", "source_location": { "column": 11, "file": "t30001.cc", @@ -225,10 +205,11 @@ namespace BB { "type": "namespace" }, { - "display_name": "clanguml::t30001::B::BB", + "display_name": "BB", "id": "2230464321696304488", "is_deprecated": false, "name": "BB", + "namespace": "clanguml::t30001::B", "source_location": { "column": 11, "file": "t30001.cc", @@ -241,6 +222,7 @@ namespace BB { "id": "1931735210112054430", "is_deprecated": false, "name": "B", + "namespace": "clanguml::t30001", "source_location": { "column": 11, "file": "t30001.cc", @@ -251,6 +233,7 @@ namespace BB { } ], "name": "t30001_package", + "package_type": "namespace", "relationships": [], "title": "Basic package diagram example", "using_namespace": "clanguml::t30001" diff --git a/docs/test_cases/t30001_package.svg b/docs/test_cases/t30001_package.svg index 7d413858..d3e71fd9 100644 --- a/docs/test_cases/t30001_package.svg +++ b/docs/test_cases/t30001_package.svg @@ -1,6 +1,6 @@ - + @@ -10,67 +10,67 @@ Basic package diagram example - - + + A - - + + AA - - + + B - - + + AA - - + + AAA - - + + BBB - - + + BB - - + + AAA - - + + BBB - - + + BB - + A AAA note... - + This is namespace AA in namespace A - + This is namespace AA in namespace B - - - + + + diff --git a/docs/test_cases/t30002.md b/docs/test_cases/t30002.md index 453879bd..f3e95fdb 100644 --- a/docs/test_cases/t30002.md +++ b/docs/test_cases/t30002.md @@ -18,7 +18,7 @@ diagrams: - "' t30002 test package diagram" ``` ## Source code -File t30002.cc +File `tests/t30002/t30002.cc` ```cpp #include #include @@ -150,44 +150,17 @@ template std::map> cm() "diagram_type": "package", "elements": [ { - "display_name": "clanguml", + "display_name": "A", "elements": [ { - "display_name": "clanguml::t30002", - "id": "1283027613970360489", - "is_deprecated": false, - "name": "t30002", - "source_location": { - "column": 11, - "file": "t30002.cc", - "line": 8, - "translation_unit": "t30002.cc" - }, - "type": "namespace" - } - ], - "id": "2174271399507040339", - "is_deprecated": false, - "name": "clanguml", - "source_location": { - "column": 11, - "file": "t30002.cc", - "line": 7, - "translation_unit": "t30002.cc" - }, - "type": "namespace" - }, - { - "display_name": "clanguml::t30002::A", - "elements": [ - { - "display_name": "clanguml::t30002::A::AA", + "display_name": "AA", "elements": [ { - "display_name": "clanguml::t30002::A::AA::A1", + "display_name": "A1", "id": "1164966689017271053", "is_deprecated": false, "name": "A1", + "namespace": "clanguml::t30002::A::AA", "source_location": { "column": 11, "file": "t30002.cc", @@ -197,10 +170,11 @@ template std::map> cm() "type": "namespace" }, { - "display_name": "clanguml::t30002::A::AA::A2", + "display_name": "A2", "id": "695366113361481509", "is_deprecated": false, "name": "A2", + "namespace": "clanguml::t30002::A::AA", "source_location": { "column": 11, "file": "t30002.cc", @@ -210,10 +184,11 @@ template std::map> cm() "type": "namespace" }, { - "display_name": "clanguml::t30002::A::AA::A3", + "display_name": "A3", "id": "1267709074800873528", "is_deprecated": false, "name": "A3", + "namespace": "clanguml::t30002::A::AA", "source_location": { "column": 11, "file": "t30002.cc", @@ -223,10 +198,11 @@ template std::map> cm() "type": "namespace" }, { - "display_name": "clanguml::t30002::A::AA::A4", + "display_name": "A4", "id": "299262817531370604", "is_deprecated": false, "name": "A4", + "namespace": "clanguml::t30002::A::AA", "source_location": { "column": 11, "file": "t30002.cc", @@ -236,10 +212,11 @@ template std::map> cm() "type": "namespace" }, { - "display_name": "clanguml::t30002::A::AA::A5", + "display_name": "A5", "id": "1207764290216680521", "is_deprecated": false, "name": "A5", + "namespace": "clanguml::t30002::A::AA", "source_location": { "column": 11, "file": "t30002.cc", @@ -249,10 +226,11 @@ template std::map> cm() "type": "namespace" }, { - "display_name": "clanguml::t30002::A::AA::A6", + "display_name": "A6", "id": "899091126727901939", "is_deprecated": false, "name": "A6", + "namespace": "clanguml::t30002::A::AA", "source_location": { "column": 11, "file": "t30002.cc", @@ -262,10 +240,11 @@ template std::map> cm() "type": "namespace" }, { - "display_name": "clanguml::t30002::A::AA::A7", + "display_name": "A7", "id": "563861734550555261", "is_deprecated": false, "name": "A7", + "namespace": "clanguml::t30002::A::AA", "source_location": { "column": 11, "file": "t30002.cc", @@ -275,10 +254,11 @@ template std::map> cm() "type": "namespace" }, { - "display_name": "clanguml::t30002::A::AA::A8", + "display_name": "A8", "id": "839146342143718390", "is_deprecated": false, "name": "A8", + "namespace": "clanguml::t30002::A::AA", "source_location": { "column": 11, "file": "t30002.cc", @@ -288,10 +268,11 @@ template std::map> cm() "type": "namespace" }, { - "display_name": "clanguml::t30002::A::AA::A9", + "display_name": "A9", "id": "1650835159458422245", "is_deprecated": false, "name": "A9", + "namespace": "clanguml::t30002::A::AA", "source_location": { "column": 11, "file": "t30002.cc", @@ -301,10 +282,11 @@ template std::map> cm() "type": "namespace" }, { - "display_name": "clanguml::t30002::A::AA::A10", + "display_name": "A10", "id": "1453242941322376182", "is_deprecated": false, "name": "A10", + "namespace": "clanguml::t30002::A::AA", "source_location": { "column": 11, "file": "t30002.cc", @@ -314,10 +296,11 @@ template std::map> cm() "type": "namespace" }, { - "display_name": "clanguml::t30002::A::AA::A11", + "display_name": "A11", "id": "384833776371876986", "is_deprecated": false, "name": "A11", + "namespace": "clanguml::t30002::A::AA", "source_location": { "column": 11, "file": "t30002.cc", @@ -327,10 +310,11 @@ template std::map> cm() "type": "namespace" }, { - "display_name": "clanguml::t30002::A::AA::A12", + "display_name": "A12", "id": "1199527037490355138", "is_deprecated": false, "name": "A12", + "namespace": "clanguml::t30002::A::AA", "source_location": { "column": 11, "file": "t30002.cc", @@ -340,10 +324,11 @@ template std::map> cm() "type": "namespace" }, { - "display_name": "clanguml::t30002::A::AA::A13", + "display_name": "A13", "id": "620689743711615190", "is_deprecated": false, "name": "A13", + "namespace": "clanguml::t30002::A::AA", "source_location": { "column": 11, "file": "t30002.cc", @@ -353,10 +338,11 @@ template std::map> cm() "type": "namespace" }, { - "display_name": "clanguml::t30002::A::AA::A14", + "display_name": "A14", "id": "301858476377711436", "is_deprecated": false, "name": "A14", + "namespace": "clanguml::t30002::A::AA", "source_location": { "column": 11, "file": "t30002.cc", @@ -366,10 +352,11 @@ template std::map> cm() "type": "namespace" }, { - "display_name": "clanguml::t30002::A::AA::A15", + "display_name": "A15", "id": "561239706327729436", "is_deprecated": false, "name": "A15", + "namespace": "clanguml::t30002::A::AA", "source_location": { "column": 11, "file": "t30002.cc", @@ -379,10 +366,11 @@ template std::map> cm() "type": "namespace" }, { - "display_name": "clanguml::t30002::A::AA::A16", + "display_name": "A16", "id": "1415398383158410524", "is_deprecated": false, "name": "A16", + "namespace": "clanguml::t30002::A::AA", "source_location": { "column": 11, "file": "t30002.cc", @@ -392,10 +380,11 @@ template std::map> cm() "type": "namespace" }, { - "display_name": "clanguml::t30002::A::AA::A17", + "display_name": "A17", "id": "532437874530119999", "is_deprecated": false, "name": "A17", + "namespace": "clanguml::t30002::A::AA", "source_location": { "column": 11, "file": "t30002.cc", @@ -405,10 +394,11 @@ template std::map> cm() "type": "namespace" }, { - "display_name": "clanguml::t30002::A::AA::A18", + "display_name": "A18", "id": "405712335116487393", "is_deprecated": false, "name": "A18", + "namespace": "clanguml::t30002::A::AA", "source_location": { "column": 11, "file": "t30002.cc", @@ -421,6 +411,7 @@ template std::map> cm() "id": "1669745471968085401", "is_deprecated": false, "name": "AA", + "namespace": "clanguml::t30002::A", "source_location": { "column": 14, "file": "t30002.cc", @@ -433,6 +424,7 @@ template std::map> cm() "id": "1543480715632256641", "is_deprecated": false, "name": "A", + "namespace": "clanguml::t30002", "source_location": { "column": 11, "file": "t30002.cc", @@ -442,16 +434,17 @@ template std::map> cm() "type": "namespace" }, { - "display_name": "clanguml::t30002::B", + "display_name": "B", "elements": [ { - "display_name": "clanguml::t30002::B::BB", + "display_name": "BB", "elements": [ { - "display_name": "clanguml::t30002::B::BB::BBB", + "display_name": "BBB", "id": "2255521339657425355", "is_deprecated": false, "name": "BBB", + "namespace": "clanguml::t30002::B::BB", "source_location": { "column": 18, "file": "t30002.cc", @@ -464,6 +457,7 @@ template std::map> cm() "id": "1938861639623819235", "is_deprecated": false, "name": "BB", + "namespace": "clanguml::t30002::B", "source_location": { "column": 14, "file": "t30002.cc", @@ -476,6 +470,7 @@ template std::map> cm() "id": "145302773464360955", "is_deprecated": false, "name": "B", + "namespace": "clanguml::t30002", "source_location": { "column": 11, "file": "t30002.cc", @@ -486,6 +481,7 @@ template std::map> cm() } ], "name": "t30002_package", + "package_type": "namespace", "relationships": [ { "destination": "839146342143718390", diff --git a/docs/test_cases/t30002_package.svg b/docs/test_cases/t30002_package.svg index b2810611..4869506a 100644 --- a/docs/test_cases/t30002_package.svg +++ b/docs/test_cases/t30002_package.svg @@ -1,6 +1,6 @@ - + @@ -9,118 +9,118 @@ - - + + A - - + + AA - - + + B - - + + BB - - + + A1 - - + + A2 - - + + A3 - - + + A4 - - + + A5 - - + + A6 - - + + A7 - - + + A8 - - + + A9 - - + + A10 - - + + A11 - - + + A12 - - + + A13 - - + + A14 - - + + A15 - - + + A16 - - + + A17 - - + + A18 - - + + BBB diff --git a/docs/test_cases/t30003.md b/docs/test_cases/t30003.md index 3d3525d2..87edcc38 100644 --- a/docs/test_cases/t30003.md +++ b/docs/test_cases/t30003.md @@ -15,7 +15,7 @@ diagrams: - "' t30003 test package diagram" ``` ## Source code -File t30003.cc +File `tests/t30003/t30003.cc` ```cpp namespace clanguml { namespace t30003 { @@ -55,41 +55,14 @@ class B : public ns1::ns2::Anon { }; "diagram_type": "package", "elements": [ { - "display_name": "clanguml", + "display_name": "ns1", "elements": [ { - "display_name": "clanguml::t30003", - "id": "1288549465151585544", - "is_deprecated": false, - "name": "t30003", - "source_location": { - "column": 11, - "file": "t30003.cc", - "line": 2, - "translation_unit": "t30003.cc" - }, - "type": "namespace" - } - ], - "id": "2174271399507040339", - "is_deprecated": false, - "name": "clanguml", - "source_location": { - "column": 11, - "file": "t30003.cc", - "line": 1, - "translation_unit": "t30003.cc" - }, - "type": "namespace" - }, - { - "display_name": "clanguml::t30003::ns1", - "elements": [ - { - "display_name": "clanguml::t30003::ns1::ns2_v1_0_0", + "display_name": "ns2_v1_0_0", "id": "647755950450743637", "is_deprecated": false, "name": "ns2_v1_0_0", + "namespace": "clanguml::t30003::ns1", "source_location": { "column": 11, "file": "t30003.cc", @@ -99,10 +72,11 @@ class B : public ns1::ns2::Anon { }; "type": "namespace" }, { - "display_name": "clanguml::t30003::ns1::ns2_v0_9_0", + "display_name": "ns2_v0_9_0", "id": "1013406647495422406", "is_deprecated": true, "name": "ns2_v0_9_0", + "namespace": "clanguml::t30003::ns1", "source_location": { "column": 26, "file": "t30003.cc", @@ -115,6 +89,7 @@ class B : public ns1::ns2::Anon { }; "id": "600452871069546589", "is_deprecated": false, "name": "ns1", + "namespace": "clanguml::t30003", "source_location": { "column": 11, "file": "t30003.cc", @@ -124,16 +99,17 @@ class B : public ns1::ns2::Anon { }; "type": "namespace" }, { - "display_name": "clanguml::t30003::ns3", + "display_name": "ns3", "elements": [ { - "display_name": "clanguml::t30003::ns3::ns1", + "display_name": "ns1", "elements": [ { - "display_name": "clanguml::t30003::ns3::ns1::ns2", + "display_name": "ns2", "id": "820462660523726751", "is_deprecated": false, "name": "ns2", + "namespace": "clanguml::t30003::ns3::ns1", "source_location": { "column": 16, "file": "t30003.cc", @@ -146,6 +122,7 @@ class B : public ns1::ns2::Anon { }; "id": "1209144861141334061", "is_deprecated": false, "name": "ns1", + "namespace": "clanguml::t30003::ns3", "source_location": { "column": 11, "file": "t30003.cc", @@ -158,6 +135,7 @@ class B : public ns1::ns2::Anon { }; "id": "427104404739526818", "is_deprecated": true, "name": "ns3", + "namespace": "clanguml::t30003", "source_location": { "column": 26, "file": "t30003.cc", @@ -168,6 +146,7 @@ class B : public ns1::ns2::Anon { }; } ], "name": "t30003_package", + "package_type": "namespace", "relationships": [ { "destination": "647755950450743637", diff --git a/docs/test_cases/t30003_package.svg b/docs/test_cases/t30003_package.svg index c085f86c..a4840cd2 100644 --- a/docs/test_cases/t30003_package.svg +++ b/docs/test_cases/t30003_package.svg @@ -1,6 +1,6 @@ - + @@ -9,35 +9,35 @@ - - + + ns1 - - + + ns3 «deprecated» - - + + ns1 - - + + ns2_v1_0_0 - - + + ns2_v0_9_0 «deprecated» - - + + ns2 diff --git a/docs/test_cases/t30004.md b/docs/test_cases/t30004.md index d24125f7..19712438 100644 --- a/docs/test_cases/t30004.md +++ b/docs/test_cases/t30004.md @@ -15,7 +15,7 @@ diagrams: - "' t30004 test package diagram" ``` ## Source code -File t30004.cc +File `tests/t30004/t30004.cc` ```cpp namespace clanguml { namespace t30004 { @@ -62,50 +62,23 @@ namespace CCC { { "diagram_type": "package", "elements": [ - { - "display_name": "clanguml", - "elements": [ - { - "display_name": "clanguml::t30004", - "id": "678274068594347618", - "is_deprecated": false, - "name": "t30004", - "source_location": { - "column": 11, - "file": "t30004.cc", - "line": 2, - "translation_unit": "t30004.cc" - }, - "type": "namespace" - } - ], - "id": "2174271399507040339", - "is_deprecated": false, - "name": "clanguml", - "source_location": { - "column": 11, - "file": "t30004.cc", - "line": 1, - "translation_unit": "t30004.cc" - }, - "type": "namespace" - }, { "comment": { "formatted": "@uml{style[#green]}", "raw": "/// @uml{style[#green]}" }, - "display_name": "clanguml::t30004::A", + "display_name": "A", "elements": [ { "comment": { "formatted": "@uml{note[ bottom ] Package AAA.}", "raw": "/// @uml{note[ bottom ] Package AAA.}" }, - "display_name": "clanguml::t30004::A::AAA", + "display_name": "AAA", "id": "1517185300862579159", "is_deprecated": false, "name": "AAA", + "namespace": "clanguml::t30004::A", "source_location": { "column": 11, "file": "t30004.cc", @@ -119,10 +92,11 @@ namespace CCC { "formatted": "\\uml{note[right] Package BBB.}", "raw": "/// \\uml{note[right] Package BBB.}" }, - "display_name": "clanguml::t30004::A::BBB", + "display_name": "BBB", "id": "1982379087062354928", "is_deprecated": false, "name": "BBB", + "namespace": "clanguml::t30004::A", "source_location": { "column": 11, "file": "t30004.cc", @@ -136,10 +110,11 @@ namespace CCC { "formatted": "\n @uml{note:t30004_package[bottom] CCCC package note.}\n This is package CCC.", "raw": "///\n/// @uml{note:t30004_package[bottom] CCCC package note.}\n/// This is package CCC." }, - "display_name": "clanguml::t30004::A::CCC", + "display_name": "CCC", "id": "2304726195556701567", "is_deprecated": false, "name": "CCC", + "namespace": "clanguml::t30004::A", "source_location": { "column": 11, "file": "t30004.cc", @@ -153,10 +128,11 @@ namespace CCC { "formatted": "@uml{style[#pink;line:red;line.bold;text:red]}\n\\uml{note[top] We skipped DDD.}", "raw": "/// @uml{style[#pink;line:red;line.bold;text:red]}\n/// \\uml{note[top] We skipped DDD.}" }, - "display_name": "clanguml::t30004::A::EEE", + "display_name": "EEE", "id": "1084924732216290779", "is_deprecated": false, "name": "EEE", + "namespace": "clanguml::t30004::A", "source_location": { "column": 11, "file": "t30004.cc", @@ -169,6 +145,7 @@ namespace CCC { "id": "33410665874039845", "is_deprecated": false, "name": "A", + "namespace": "clanguml::t30004", "source_location": { "column": 11, "file": "t30004.cc", @@ -179,6 +156,7 @@ namespace CCC { } ], "name": "t30004_package", + "package_type": "namespace", "relationships": [], "using_namespace": "clanguml::t30004" } diff --git a/docs/test_cases/t30004_package.svg b/docs/test_cases/t30004_package.svg index 9cd60c15..749e335c 100644 --- a/docs/test_cases/t30004_package.svg +++ b/docs/test_cases/t30004_package.svg @@ -1,6 +1,6 @@ - + @@ -9,46 +9,46 @@ - - + + A - + Package AAA. - + Package BBB. - + CCCC package note. - + We skipped DDD. - - + + AAA - - + + BBB - - + + CCC - - + + EEE - - - - + + + + diff --git a/docs/test_cases/t30005.md b/docs/test_cases/t30005.md index daf72e72..3fccc9a0 100644 --- a/docs/test_cases/t30005.md +++ b/docs/test_cases/t30005.md @@ -15,7 +15,7 @@ diagrams: - "' t30005 test package diagram" ``` ## Source code -File t30005.cc +File `tests/t30005/t30005.cc` ```cpp namespace clanguml { namespace t30005 { @@ -55,44 +55,17 @@ struct C2 { "diagram_type": "package", "elements": [ { - "display_name": "clanguml", + "display_name": "A", "elements": [ { - "display_name": "clanguml::t30005", - "id": "1344350061092822214", - "is_deprecated": false, - "name": "t30005", - "source_location": { - "column": 11, - "file": "t30005.cc", - "line": 2, - "translation_unit": "t30005.cc" - }, - "type": "namespace" - } - ], - "id": "2174271399507040339", - "is_deprecated": false, - "name": "clanguml", - "source_location": { - "column": 11, - "file": "t30005.cc", - "line": 1, - "translation_unit": "t30005.cc" - }, - "type": "namespace" - }, - { - "display_name": "clanguml::t30005::A", - "elements": [ - { - "display_name": "clanguml::t30005::A::AA", + "display_name": "AA", "elements": [ { - "display_name": "clanguml::t30005::A::AA::AAA", + "display_name": "AAA", "id": "914090901927655181", "is_deprecated": false, "name": "AAA", + "namespace": "clanguml::t30005::A::AA", "source_location": { "column": 18, "file": "t30005.cc", @@ -105,6 +78,7 @@ struct C2 { "id": "1777547159021391040", "is_deprecated": false, "name": "AA", + "namespace": "clanguml::t30005::A", "source_location": { "column": 14, "file": "t30005.cc", @@ -117,6 +91,7 @@ struct C2 { "id": "1768303675686131578", "is_deprecated": false, "name": "A", + "namespace": "clanguml::t30005", "source_location": { "column": 11, "file": "t30005.cc", @@ -126,16 +101,17 @@ struct C2 { "type": "namespace" }, { - "display_name": "clanguml::t30005::B", + "display_name": "B", "elements": [ { - "display_name": "clanguml::t30005::B::BB", + "display_name": "BB", "elements": [ { - "display_name": "clanguml::t30005::B::BB::BBB", + "display_name": "BBB", "id": "1871026935460001668", "is_deprecated": false, "name": "BBB", + "namespace": "clanguml::t30005::B::BB", "source_location": { "column": 18, "file": "t30005.cc", @@ -148,6 +124,7 @@ struct C2 { "id": "1696631362104244809", "is_deprecated": false, "name": "BB", + "namespace": "clanguml::t30005::B", "source_location": { "column": 14, "file": "t30005.cc", @@ -160,6 +137,7 @@ struct C2 { "id": "378529216628023051", "is_deprecated": false, "name": "B", + "namespace": "clanguml::t30005", "source_location": { "column": 11, "file": "t30005.cc", @@ -169,16 +147,17 @@ struct C2 { "type": "namespace" }, { - "display_name": "clanguml::t30005::C", + "display_name": "C", "elements": [ { - "display_name": "clanguml::t30005::C::CC", + "display_name": "CC", "elements": [ { - "display_name": "clanguml::t30005::C::CC::CCC", + "display_name": "CCC", "id": "1763279540133487999", "is_deprecated": false, "name": "CCC", + "namespace": "clanguml::t30005::C::CC", "source_location": { "column": 18, "file": "t30005.cc", @@ -191,6 +170,7 @@ struct C2 { "id": "2134234141727442046", "is_deprecated": false, "name": "CC", + "namespace": "clanguml::t30005::C", "source_location": { "column": 14, "file": "t30005.cc", @@ -203,6 +183,7 @@ struct C2 { "id": "1041076320925403190", "is_deprecated": false, "name": "C", + "namespace": "clanguml::t30005", "source_location": { "column": 11, "file": "t30005.cc", @@ -213,6 +194,7 @@ struct C2 { } ], "name": "t30005_package", + "package_type": "namespace", "relationships": [ { "destination": "914090901927655181", diff --git a/docs/test_cases/t30005_package.svg b/docs/test_cases/t30005_package.svg index 7ed8aa32..6d4942bf 100644 --- a/docs/test_cases/t30005_package.svg +++ b/docs/test_cases/t30005_package.svg @@ -1,6 +1,6 @@ - + @@ -9,48 +9,48 @@ - - + + A - - + + AA - - + + B - - + + BB - - + + C - - + + CC - - + + AAA - - + + BBB - - + + CCC diff --git a/docs/test_cases/t30006.md b/docs/test_cases/t30006.md index 8433eccb..22b46edc 100644 --- a/docs/test_cases/t30006.md +++ b/docs/test_cases/t30006.md @@ -15,7 +15,7 @@ diagrams: - "' t30006 test package diagram" ``` ## Source code -File t30006.cc +File `tests/t30006/t30006.cc` ```cpp namespace clanguml { namespace t30006 { @@ -55,38 +55,11 @@ struct A2 { "diagram_type": "package", "elements": [ { - "display_name": "clanguml", - "elements": [ - { - "display_name": "clanguml::t30006", - "id": "1391231216610531704", - "is_deprecated": false, - "name": "t30006", - "source_location": { - "column": 11, - "file": "t30006.cc", - "line": 2, - "translation_unit": "t30006.cc" - }, - "type": "namespace" - } - ], - "id": "2174271399507040339", - "is_deprecated": false, - "name": "clanguml", - "source_location": { - "column": 11, - "file": "t30006.cc", - "line": 1, - "translation_unit": "t30006.cc" - }, - "type": "namespace" - }, - { - "display_name": "clanguml::t30006::B", + "display_name": "B", "id": "1659090172211944144", "is_deprecated": false, "name": "B", + "namespace": "clanguml::t30006", "source_location": { "column": 11, "file": "t30006.cc", @@ -100,10 +73,11 @@ struct A2 { "formatted": "\\uml{note[top] Top A note.}", "raw": "/// \\uml{note[top] Top A note.}" }, - "display_name": "clanguml::t30006::A", + "display_name": "A", "id": "1499919423527579699", "is_deprecated": false, "name": "A", + "namespace": "clanguml::t30006", "source_location": { "column": 11, "file": "t30006.cc", @@ -113,10 +87,11 @@ struct A2 { "type": "namespace" }, { - "display_name": "clanguml::t30006::C", + "display_name": "C", "id": "1380567463986115369", "is_deprecated": false, "name": "C", + "namespace": "clanguml::t30006", "source_location": { "column": 11, "file": "t30006.cc", @@ -127,6 +102,7 @@ struct A2 { } ], "name": "t30006_package", + "package_type": "namespace", "relationships": [ { "destination": "1659090172211944144", diff --git a/docs/test_cases/t30006_package.svg b/docs/test_cases/t30006_package.svg index 0ce8cd11..717e1645 100644 --- a/docs/test_cases/t30006_package.svg +++ b/docs/test_cases/t30006_package.svg @@ -1,6 +1,6 @@ - + @@ -9,25 +9,25 @@ - - + + B - - + + A - - + + C - + Top A note. - + diff --git a/docs/test_cases/t30007.md b/docs/test_cases/t30007.md index 93579985..4255fa0e 100644 --- a/docs/test_cases/t30007.md +++ b/docs/test_cases/t30007.md @@ -19,7 +19,7 @@ diagrams: - "' t30007 test package diagram" ``` ## Source code -File t30007.cc +File `tests/t30007/t30007.cc` ```cpp namespace clanguml { namespace t30007 { @@ -63,38 +63,11 @@ struct A2 { "diagram_type": "package", "elements": [ { - "display_name": "clanguml", - "elements": [ - { - "display_name": "clanguml::t30007", - "id": "279529588091010017", - "is_deprecated": false, - "name": "t30007", - "source_location": { - "column": 11, - "file": "t30007.cc", - "line": 2, - "translation_unit": "t30007.cc" - }, - "type": "namespace" - } - ], - "id": "2174271399507040339", - "is_deprecated": false, - "name": "clanguml", - "source_location": { - "column": 11, - "file": "t30007.cc", - "line": 1, - "translation_unit": "t30007.cc" - }, - "type": "namespace" - }, - { - "display_name": "clanguml::t30007::B", + "display_name": "B", "id": "1852704221005355550", "is_deprecated": false, "name": "B", + "namespace": "clanguml::t30007", "source_location": { "column": 11, "file": "t30007.cc", @@ -108,13 +81,14 @@ struct A2 { "formatted": "\\uml{note[top] Compare layout with t30006.}", "raw": "/// \\uml{note[top] Compare layout with t30006.}" }, - "display_name": "clanguml::t30007::A", + "display_name": "A", "elements": [ { - "display_name": "clanguml::t30007::A::AA", + "display_name": "AA", "id": "357722505818238170", "is_deprecated": false, "name": "AA", + "namespace": "clanguml::t30007::A", "source_location": { "column": 11, "file": "t30007.cc", @@ -127,6 +101,7 @@ struct A2 { "id": "870874615388866345", "is_deprecated": false, "name": "A", + "namespace": "clanguml::t30007", "source_location": { "column": 11, "file": "t30007.cc", @@ -136,10 +111,11 @@ struct A2 { "type": "namespace" }, { - "display_name": "clanguml::t30007::C", + "display_name": "C", "id": "937791537887318363", "is_deprecated": false, "name": "C", + "namespace": "clanguml::t30007", "source_location": { "column": 11, "file": "t30007.cc", @@ -150,6 +126,7 @@ struct A2 { } ], "name": "t30007_package", + "package_type": "namespace", "relationships": [ { "destination": "1852704221005355550", diff --git a/docs/test_cases/t30007_package.svg b/docs/test_cases/t30007_package.svg index 8e8531de..8993318f 100644 --- a/docs/test_cases/t30007_package.svg +++ b/docs/test_cases/t30007_package.svg @@ -1,6 +1,6 @@ - + @@ -9,30 +9,30 @@ - - + + A - - + + B - - + + AA - - + + C - + Compare layout with t30006. - + diff --git a/docs/test_cases/t30008.md b/docs/test_cases/t30008.md index 8d96d838..dabb9b6b 100644 --- a/docs/test_cases/t30008.md +++ b/docs/test_cases/t30008.md @@ -17,7 +17,7 @@ diagrams: - "' t30008 test package diagram" ``` ## Source code -File t30008.cc +File `tests/t30008/t30008.cc` ```cpp namespace clanguml { namespace t30008 { @@ -73,41 +73,14 @@ struct FF { "diagram_type": "package", "elements": [ { - "display_name": "clanguml", + "display_name": "dependants", "elements": [ { - "display_name": "clanguml::t30008", - "id": "588296309731944574", - "is_deprecated": false, - "name": "t30008", - "source_location": { - "column": 11, - "file": "t30008.cc", - "line": 2, - "translation_unit": "t30008.cc" - }, - "type": "namespace" - } - ], - "id": "2174271399507040339", - "is_deprecated": false, - "name": "clanguml", - "source_location": { - "column": 11, - "file": "t30008.cc", - "line": 1, - "translation_unit": "t30008.cc" - }, - "type": "namespace" - }, - { - "display_name": "clanguml::t30008::dependants", - "elements": [ - { - "display_name": "clanguml::t30008::dependants::A", + "display_name": "A", "id": "2096441629244782012", "is_deprecated": false, "name": "A", + "namespace": "clanguml::t30008::dependants", "source_location": { "column": 11, "file": "t30008.cc", @@ -117,10 +90,11 @@ struct FF { "type": "namespace" }, { - "display_name": "clanguml::t30008::dependants::B", + "display_name": "B", "id": "500208250168931957", "is_deprecated": false, "name": "B", + "namespace": "clanguml::t30008::dependants", "source_location": { "column": 11, "file": "t30008.cc", @@ -130,10 +104,11 @@ struct FF { "type": "namespace" }, { - "display_name": "clanguml::t30008::dependants::C", + "display_name": "C", "id": "1095841247154575825", "is_deprecated": false, "name": "C", + "namespace": "clanguml::t30008::dependants", "source_location": { "column": 11, "file": "t30008.cc", @@ -146,6 +121,7 @@ struct FF { "id": "1601960042765615222", "is_deprecated": false, "name": "dependants", + "namespace": "clanguml::t30008", "source_location": { "column": 11, "file": "t30008.cc", @@ -155,13 +131,14 @@ struct FF { "type": "namespace" }, { - "display_name": "clanguml::t30008::dependencies", + "display_name": "dependencies", "elements": [ { - "display_name": "clanguml::t30008::dependencies::D", + "display_name": "D", "id": "912387297717034254", "is_deprecated": false, "name": "D", + "namespace": "clanguml::t30008::dependencies", "source_location": { "column": 11, "file": "t30008.cc", @@ -171,10 +148,11 @@ struct FF { "type": "namespace" }, { - "display_name": "clanguml::t30008::dependencies::E", + "display_name": "E", "id": "1114997990364518938", "is_deprecated": false, "name": "E", + "namespace": "clanguml::t30008::dependencies", "source_location": { "column": 11, "file": "t30008.cc", @@ -184,10 +162,11 @@ struct FF { "type": "namespace" }, { - "display_name": "clanguml::t30008::dependencies::F", + "display_name": "F", "id": "1062827161678172094", "is_deprecated": false, "name": "F", + "namespace": "clanguml::t30008::dependencies", "source_location": { "column": 11, "file": "t30008.cc", @@ -200,6 +179,7 @@ struct FF { "id": "2103969167872217960", "is_deprecated": false, "name": "dependencies", + "namespace": "clanguml::t30008", "source_location": { "column": 11, "file": "t30008.cc", @@ -210,6 +190,7 @@ struct FF { } ], "name": "t30008_package", + "package_type": "namespace", "relationships": [ { "destination": "2096441629244782012", diff --git a/docs/test_cases/t30008_package.svg b/docs/test_cases/t30008_package.svg index 402a1dfd..6f95b1d2 100644 --- a/docs/test_cases/t30008_package.svg +++ b/docs/test_cases/t30008_package.svg @@ -1,6 +1,6 @@ - + @@ -9,43 +9,43 @@ - - + + dependants - - + + dependencies - - + + A - - + + B - - + + C - - + + D - - + + E - - + + F diff --git a/docs/test_cases/t30009.md b/docs/test_cases/t30009.md index f89777c4..cafa282e 100644 --- a/docs/test_cases/t30009.md +++ b/docs/test_cases/t30009.md @@ -17,7 +17,7 @@ diagrams: - together: [Two::C, Two::D] ``` ## Source code -File t30009.cc +File `tests/t30009/t30009.cc` ```cpp namespace clanguml::t30009 { namespace One { @@ -53,41 +53,14 @@ namespace D { "diagram_type": "package", "elements": [ { - "display_name": "clanguml", + "display_name": "One", "elements": [ { - "display_name": "clanguml::t30009", - "id": "1266799397652663064", - "is_deprecated": false, - "name": "t30009", - "source_location": { - "column": 21, - "file": "t30009.cc", - "line": 1, - "translation_unit": "t30009.cc" - }, - "type": "namespace" - } - ], - "id": "2174271399507040339", - "is_deprecated": false, - "name": "clanguml", - "source_location": { - "column": 11, - "file": "t30009.cc", - "line": 1, - "translation_unit": "t30009.cc" - }, - "type": "namespace" - }, - { - "display_name": "clanguml::t30009::One", - "elements": [ - { - "display_name": "clanguml::t30009::One::A", + "display_name": "A", "id": "1189741240939898414", "is_deprecated": false, "name": "A", + "namespace": "clanguml::t30009::One", "source_location": { "column": 11, "file": "t30009.cc", @@ -97,10 +70,11 @@ namespace D { "type": "namespace" }, { - "display_name": "clanguml::t30009::One::B", + "display_name": "B", "id": "209763670816643341", "is_deprecated": false, "name": "B", + "namespace": "clanguml::t30009::One", "source_location": { "column": 11, "file": "t30009.cc", @@ -110,10 +84,11 @@ namespace D { "type": "namespace" }, { - "display_name": "clanguml::t30009::One::C", + "display_name": "C", "id": "946522260503371974", "is_deprecated": false, "name": "C", + "namespace": "clanguml::t30009::One", "source_location": { "column": 11, "file": "t30009.cc", @@ -123,10 +98,11 @@ namespace D { "type": "namespace" }, { - "display_name": "clanguml::t30009::One::D", + "display_name": "D", "id": "1181245940399690936", "is_deprecated": false, "name": "D", + "namespace": "clanguml::t30009::One", "source_location": { "column": 11, "file": "t30009.cc", @@ -139,6 +115,7 @@ namespace D { "id": "1187941209208108244", "is_deprecated": false, "name": "One", + "namespace": "clanguml::t30009", "source_location": { "column": 11, "file": "t30009.cc", @@ -148,13 +125,14 @@ namespace D { "type": "namespace" }, { - "display_name": "clanguml::t30009::Two", + "display_name": "Two", "elements": [ { - "display_name": "clanguml::t30009::Two::A", + "display_name": "A", "id": "986505573514384282", "is_deprecated": false, "name": "A", + "namespace": "clanguml::t30009::Two", "source_location": { "column": 11, "file": "t30009.cc", @@ -164,10 +142,11 @@ namespace D { "type": "namespace" }, { - "display_name": "clanguml::t30009::Two::B", + "display_name": "B", "id": "2156827588463114203", "is_deprecated": false, "name": "B", + "namespace": "clanguml::t30009::Two", "source_location": { "column": 11, "file": "t30009.cc", @@ -177,10 +156,11 @@ namespace D { "type": "namespace" }, { - "display_name": "clanguml::t30009::Two::C", + "display_name": "C", "id": "1653274432960093632", "is_deprecated": false, "name": "C", + "namespace": "clanguml::t30009::Two", "source_location": { "column": 11, "file": "t30009.cc", @@ -190,10 +170,11 @@ namespace D { "type": "namespace" }, { - "display_name": "clanguml::t30009::Two::D", + "display_name": "D", "id": "263095551354153183", "is_deprecated": false, "name": "D", + "namespace": "clanguml::t30009::Two", "source_location": { "column": 11, "file": "t30009.cc", @@ -206,6 +187,7 @@ namespace D { "id": "1940839474792549233", "is_deprecated": false, "name": "Two", + "namespace": "clanguml::t30009", "source_location": { "column": 11, "file": "t30009.cc", @@ -216,6 +198,7 @@ namespace D { } ], "name": "t30009_package", + "package_type": "namespace", "relationships": [], "using_namespace": "clanguml::t30009" } diff --git a/docs/test_cases/t30009_package.svg b/docs/test_cases/t30009_package.svg index e736667a..dcf4ae6f 100644 --- a/docs/test_cases/t30009_package.svg +++ b/docs/test_cases/t30009_package.svg @@ -1,6 +1,6 @@ - + @@ -9,53 +9,53 @@ - - + + One - - + + Two - - + + B - - + + D - - + + A - - + + C - - + + A - - + + B - - + + C - - + + D diff --git a/docs/test_cases/t30010.md b/docs/test_cases/t30010.md index ffb10e57..c2b5e03a 100644 --- a/docs/test_cases/t30010.md +++ b/docs/test_cases/t30010.md @@ -15,7 +15,7 @@ diagrams: using_namespace: clanguml::t30010 ``` ## Source code -File t30010.cc +File `tests/t30010/t30010.cc` ```cpp #include "app/app.h" @@ -27,6 +27,87 @@ App app; } // namespace t30002 } // namespace clanguml +``` +File `tests/t30010/libraries/lib1/lib1.h` +```cpp +#pragma once + +namespace clanguml { +namespace t30010 { +namespace library1 { + +struct A { }; + +} +} +} +``` +File `tests/t30010/libraries/lib2/lib2.h` +```cpp +#pragma once + +namespace clanguml { +namespace t30010 { +namespace library2 { + +template struct B { + T b; +}; + +} +} +} +``` +File `tests/t30010/libraries/lib3/lib3.h` +```cpp +#pragma once + +namespace clanguml { +namespace t30010 { +namespace library3 { + +enum E { e1, e2, e3 }; + +} +} +} +``` +File `tests/t30010/libraries/lib4/lib4.h` +```cpp +#pragma once + +namespace clanguml { +namespace t30010 { +namespace library4 { + +struct C { }; + +} +} +} +``` +File `tests/t30010/app/app.h` +```cpp +#pragma once + +#include "../libraries/lib1/lib1.h" +#include "../libraries/lib2/lib2.h" +#include "../libraries/lib3/lib3.h" +#include "../libraries/lib4/lib4.h" + +namespace clanguml { +namespace t30010 { + +struct App { + library1::A *a; + library2::B *b; + library3::E e; + + void c(library4::C *) { } +}; + +} +} ``` ## Generated PlantUML diagrams ![t30010_package](./t30010_package.svg "Package diagram with packages from directory structure") @@ -45,74 +126,81 @@ App app; "id": "879212264535378961", "is_deprecated": false, "name": "lib1", + "path": "", "source_location": { "column": 8, "file": "libraries/lib1/lib1.h", "line": 7, "translation_unit": "t30010.cc" }, - "type": "namespace" + "type": "directory" }, { "display_name": "lib2", "id": "1522606219626203424", "is_deprecated": false, "name": "lib2", + "path": "", "source_location": { "column": 30, "file": "libraries/lib2/lib2.h", "line": 7, "translation_unit": "t30010.cc" }, - "type": "namespace" + "type": "directory" }, { "display_name": "lib3", "id": "2263709579652581325", "is_deprecated": false, "name": "lib3", + "path": "", "source_location": { "column": 6, "file": "libraries/lib3/lib3.h", "line": 7, "translation_unit": "t30010.cc" }, - "type": "namespace" + "type": "directory" }, { "display_name": "lib4", "id": "1103453030023410219", "is_deprecated": false, "name": "lib4", + "path": "", "source_location": { "column": 8, "file": "libraries/lib4/lib4.h", "line": 7, "translation_unit": "t30010.cc" }, - "type": "namespace" + "type": "directory" } ], "id": "879401191375500756", "is_deprecated": false, "name": "libraries", - "type": "namespace" + "path": "", + "type": "directory" }, { "display_name": "app", "id": "2001320261642080149", "is_deprecated": false, "name": "app", + "path": "", "source_location": { "column": 8, "file": "app/app.h", "line": 11, "translation_unit": "t30010.cc" }, - "type": "namespace" + "type": "directory" } ], "name": "t30010_package", + "package_type": "directory", "relationships": [ { "destination": "879212264535378961", diff --git a/docs/test_cases/t30010_package.svg b/docs/test_cases/t30010_package.svg index 2517bf98..ec5d993d 100644 --- a/docs/test_cases/t30010_package.svg +++ b/docs/test_cases/t30010_package.svg @@ -1,6 +1,6 @@ - + @@ -9,31 +9,31 @@ - + libraries - - + + lib1 - - + + lib2 - - + + lib3 - - + + lib4 - - + + app diff --git a/docs/test_cases/t30011.md b/docs/test_cases/t30011.md index eb7e87f0..bec2152a 100644 --- a/docs/test_cases/t30011.md +++ b/docs/test_cases/t30011.md @@ -12,12 +12,64 @@ diagrams: - . ``` ## Source code -File t30011.c +File `tests/t30011/t30011.c` ```cpp #include "app/app.h" struct t30011_App app; +``` +File `tests/t30011/libraries/lib1/lib1.h` +```cpp +#pragma once + +struct t30011_A { + int a; +}; + +``` +File `tests/t30011/libraries/lib2/lib2.h` +```cpp +#pragma once + +struct t30011_B { + int b; +}; + +``` +File `tests/t30011/libraries/lib3/lib3.h` +```cpp +#pragma once + +enum t30011_E { e1, e2, e3 }; + +``` +File `tests/t30011/libraries/lib4/lib4.h` +```cpp +#pragma once + +struct t30011_C { + int c; +}; + +``` +File `tests/t30011/app/app.h` +```cpp +#pragma once + +#include "../libraries/lib1/lib1.h" +#include "../libraries/lib2/lib2.h" +#include "../libraries/lib3/lib3.h" +#include "../libraries/lib4/lib4.h" + +struct t30011_App { + struct t30011_A a; + struct t30011_B *b; + enum t30011_E e; +}; + +void c(struct t30011_App *app, struct t30011_C *c) { } + ``` ## Generated PlantUML diagrams ![t30011_package](./t30011_package.svg "Package diagram with packages from directory structure for plain C") @@ -36,74 +88,81 @@ struct t30011_App app; "id": "879212264535378961", "is_deprecated": false, "name": "lib1", + "path": "", "source_location": { "column": 8, "file": "libraries/lib1/lib1.h", "line": 3, "translation_unit": "t30011.c" }, - "type": "namespace" + "type": "directory" }, { "display_name": "lib2", "id": "1522606219626203424", "is_deprecated": false, "name": "lib2", + "path": "", "source_location": { "column": 8, "file": "libraries/lib2/lib2.h", "line": 3, "translation_unit": "t30011.c" }, - "type": "namespace" + "type": "directory" }, { "display_name": "lib3", "id": "2263709579652581325", "is_deprecated": false, "name": "lib3", + "path": "", "source_location": { "column": 6, "file": "libraries/lib3/lib3.h", "line": 3, "translation_unit": "t30011.c" }, - "type": "namespace" + "type": "directory" }, { "display_name": "lib4", "id": "1103453030023410219", "is_deprecated": false, "name": "lib4", + "path": "", "source_location": { "column": 8, "file": "libraries/lib4/lib4.h", "line": 3, "translation_unit": "t30011.c" }, - "type": "namespace" + "type": "directory" } ], "id": "879401191375500756", "is_deprecated": false, "name": "libraries", - "type": "namespace" + "path": "", + "type": "directory" }, { "display_name": "app", "id": "2001320261642080149", "is_deprecated": false, "name": "app", + "path": "", "source_location": { "column": 8, "file": "app/app.h", "line": 8, "translation_unit": "t30011.c" }, - "type": "namespace" + "type": "directory" } ], "name": "t30011_package", + "package_type": "directory", "relationships": [ { "destination": "879212264535378961", diff --git a/docs/test_cases/t30011_package.svg b/docs/test_cases/t30011_package.svg index 61a22fe2..12c18634 100644 --- a/docs/test_cases/t30011_package.svg +++ b/docs/test_cases/t30011_package.svg @@ -1,6 +1,6 @@ - + @@ -9,31 +9,31 @@ - + libraries - - + + lib1 - - + + lib2 - - + + lib3 - - + + lib4 - - + + app diff --git a/docs/test_cases/t30012.md b/docs/test_cases/t30012.md new file mode 100644 index 00000000..30f3695c --- /dev/null +++ b/docs/test_cases/t30012.md @@ -0,0 +1,179 @@ +# t30012 - C++20 modules package diagram test +## Config +```yaml +diagrams: + t30012_package: + type: package + glob: + - t30012.cc + package_type: module + include: + modules: + - t30012 + using_module: t30012 +``` +## Source code +File `tests/t30012/t30012.cc` +```cpp +import t30012.app; +import t30012.app.lib1; +import t30012.app.lib1.mod1; +import t30012.app.lib1.mod2; +import t30012.app.lib2; + +namespace clanguml { +namespace t30012 { +class R { + A *a; + B *b; + C *c; +}; +} +} +``` +File `tests/t30012/src/lib1mod2.cppm` +```cpp +export module t30012.app.lib1.mod2; + +export namespace clanguml::t30012 { +class E { }; +} +``` +File `tests/t30012/src/lib2.cppm` +```cpp +export module t30012.app.lib2; + +export namespace clanguml::t30012 { +class C { }; + +template class CC { + T t; +}; + +namespace detail { +enum class CCC { ccc1, ccc2 }; +} +} +``` +File `tests/t30012/src/lib1.cppm` +```cpp +export module t30012.app.lib1; + +export namespace clanguml::t30012 { +class B { }; + +template class BB { + T t; +}; + +namespace detail { +enum class BBB { bbb1, bbb2 }; +} // namespace detail +} +``` +File `tests/t30012/src/t30012_mod.cppm` +```cpp +export module t30012.app; +export import t30012.app.lib1; +export import t30012.app.lib2; + +export namespace clanguml::t30012 { +class A { + int get() { return a; } + + int a; +}; +} +``` +File `tests/t30012/src/lib1mod1.cppm` +```cpp +export module t30012.app.lib1.mod1; + +export namespace clanguml::t30012 { +class D { }; +} +``` +## Generated PlantUML diagrams +![t30012_package](./t30012_package.svg "C++20 modules package diagram test") +## Generated Mermaid diagrams +![t30012_package](./t30012_package_mermaid.svg "C++20 modules package diagram test") +## Generated JSON models +```json +{ + "diagram_type": "package", + "elements": [ + { + "display_name": "app", + "elements": [ + { + "display_name": "lib1", + "elements": [ + { + "display_name": "mod1", + "id": "1890617159212924206", + "is_deprecated": false, + "name": "mod1", + "namespace": "t30012.app.lib1", + "source_location": { + "column": 7, + "file": "src/lib1mod1.cppm", + "line": 4, + "translation_unit": "t30012.cc" + }, + "type": "module" + }, + { + "display_name": "mod2", + "id": "206451677325228178", + "is_deprecated": false, + "name": "mod2", + "namespace": "t30012.app.lib1", + "source_location": { + "column": 7, + "file": "src/lib1mod2.cppm", + "line": 4, + "translation_unit": "t30012.cc" + }, + "type": "module" + } + ], + "id": "2078388864960203240", + "is_deprecated": false, + "name": "lib1", + "namespace": "t30012.app", + "source_location": { + "column": 7, + "file": "src/lib1.cppm", + "line": 4, + "translation_unit": "t30012.cc" + }, + "type": "module" + }, + { + "display_name": "lib2", + "id": "765684581621927632", + "is_deprecated": false, + "name": "lib2", + "namespace": "t30012.app", + "source_location": { + "column": 7, + "file": "src/lib2.cppm", + "line": 4, + "translation_unit": "t30012.cc" + }, + "type": "module" + } + ], + "id": "381866731754697815", + "is_deprecated": false, + "name": "app", + "namespace": "t30012", + "type": "module" + } + ], + "name": "t30012_package", + "package_type": "module", + "relationships": [], + "using_module": "t30012" +} +``` diff --git a/docs/test_cases/t30012_package.svg b/docs/test_cases/t30012_package.svg new file mode 100644 index 00000000..7239c608 --- /dev/null +++ b/docs/test_cases/t30012_package.svg @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + app + + + + lib1 + + + + + mod1 + + + + + mod2 + + + + + lib2 + + + diff --git a/docs/test_cases/t30012_package_mermaid.svg b/docs/test_cases/t30012_package_mermaid.svg new file mode 100644 index 00000000..62b5da66 --- /dev/null +++ b/docs/test_cases/t30012_package_mermaid.svg @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ app +
+
+
+
+
+ + + + + + + + + +
+ lib1 +
+
+
+
+
+ + + + + + + + +
+ mod1 +
+
+
+
+ + + + + +
+ mod2 +
+
+
+
+
+
+ + + + + +
+ lib2 +
+
+
+
+
+
+
+
+
+
diff --git a/docs/test_cases/t30013.md b/docs/test_cases/t30013.md new file mode 100644 index 00000000..b38523b4 --- /dev/null +++ b/docs/test_cases/t30013.md @@ -0,0 +1,636 @@ +# t30013 - C++20 modules package dependencies diagram test +## Config +```yaml +diagrams: + t30013_package: + type: package + glob: + - t30013.cc + package_type: module + include: + modules: + - t30013 + using_module: t30013 +``` +## Source code +File `tests/t30013/t30013.cc` +```cpp +import t30013.app; +import t30013.mod1; +import t30013.mod2; +import t30013.mod3; +import t30013.mod4; +import t30013.mod5; +import t30013.mod6; +import t30013.mod7; +import t30013.mod8; +import t30013.mod9; +import t30013.mod10; +import t30013.mod11; +import t30013.mod12; +import t30013.mod13; +import t30013.mod14; +import t30013.mod15; +import t30013.mod16; +import t30013.mod17; +import t30013.mod18; + +namespace clanguml::t30013 { +class R { + CBA cba; +}; +} // namespace clanguml::t30013 +``` +File `tests/t30013/src/mod7.cppm` +```cpp +export module t30013.mod7; + +export namespace clanguml::t30013 { +struct CG { }; +} +``` +File `tests/t30013/src/mod11.cppm` +```cpp +export module t30013.mod11; + +export namespace clanguml::t30013 { +struct CK { }; +} +``` +File `tests/t30013/src/mod17.cppm` +```cpp +export module t30013.mod17; + +export namespace clanguml::t30013 { +struct CR { }; +} +``` +File `tests/t30013/src/mod16.cppm` +```cpp +export module t30013.mod16; + +export namespace clanguml::t30013 { +struct CP { }; +} +``` +File `tests/t30013/src/mod10.cppm` +```cpp +export module t30013.mod10; + +export namespace clanguml::t30013 { +struct CJ { }; +} +``` +File `tests/t30013/src/mod4.cppm` +```cpp +export module t30013.mod4; + +export namespace clanguml::t30013 { +struct CD { }; +} +``` +File `tests/t30013/src/mod1.cppm` +```cpp +export module t30013.mod1; + +export namespace clanguml::t30013 { +struct CA { }; +} +``` +File `tests/t30013/src/app.cppm` +```cpp +module; + +#include +#include +#include +#include +#include + +export module t30013.app; + +import t30013.mod1; +import t30013.mod2; +import t30013.mod3; +import t30013.mod4; +import t30013.mod5; +import t30013.mod6; +import t30013.mod7; +import t30013.mod8; +import t30013.mod9; +import t30013.mod10; +import t30013.mod11; +import t30013.mod12; +import t30013.mod13; +import t30013.mod14; +import t30013.mod15; +import t30013.mod16; +import t30013.mod17; +import t30013.mod18; + +export namespace clanguml::t30013 { + +class CBA : public CF { +public: + CA *ca_; + CB cb_; + std::shared_ptr cc_; + std::map> *cd_; + std::array co_; + static CP *cp_; + + CBA() = default; + + CBA(CN *cn) { } + + friend CR; + + template CBA(std::tuple &items) { } + + void ce(const std::vector /*ce_*/) { } + + std::shared_ptr cg() { return {}; } + + template void ch(std::map> &ch_) { } + + template std::map> ci(T * /*t*/) + { + return {}; + } + + S s; +}; + +void cj(std::unique_ptr /*cj_*/) { } + +std::unique_ptr ck() { return {}; } + +template void cl(std::map> & /*ch_*/) { } + +template std::map> cm() { return {}; } + +} // namespace clanguml::t30013 +``` +File `tests/t30013/src/mod13.cppm` +```cpp +export module t30013.mod13; + +export namespace clanguml::t30013 { +struct CM { }; +} +``` +File `tests/t30013/src/mod9.cppm` +```cpp +export module t30013.mod9; + +export namespace clanguml::t30013 { +struct CI { }; +} +``` +File `tests/t30013/src/mod5.cppm` +```cpp +export module t30013.mod5; + +export namespace clanguml::t30013 { +struct CE { }; +} +``` +File `tests/t30013/src/mod18.cppm` +```cpp +export module t30013.mod18; + +export namespace clanguml::t30013 { +enum class S { s1, s2, s3 }; +} +``` +File `tests/t30013/src/mod2.cppm` +```cpp +export module t30013.mod2; + +export namespace clanguml::t30013 { +template struct CB { + T cb; +}; +} +``` +File `tests/t30013/src/mod14.cppm` +```cpp +export module t30013.mod14; + +export namespace clanguml::t30013 { +struct CN { }; +} +``` +File `tests/t30013/src/mod12.cppm` +```cpp +export module t30013.mod12; + +export namespace clanguml::t30013 { +struct CL { }; +} +``` +File `tests/t30013/src/mod6.cppm` +```cpp +export module t30013.mod6; + +export namespace clanguml::t30013 { +struct CF { }; +} +``` +File `tests/t30013/src/mod8.cppm` +```cpp +export module t30013.mod8; + +export namespace clanguml::t30013 { +struct CH { }; +} +``` +File `tests/t30013/src/mod3.cppm` +```cpp +export module t30013.mod3; + +export namespace clanguml::t30013 { +struct CC { }; +} +``` +File `tests/t30013/src/mod15.cppm` +```cpp +export module t30013.mod15; + +export namespace clanguml::t30013 { +struct CO { }; +} +``` +## Generated PlantUML diagrams +![t30013_package](./t30013_package.svg "C++20 modules package dependencies diagram test") +## Generated Mermaid diagrams +![t30013_package](./t30013_package_mermaid.svg "C++20 modules package dependencies diagram test") +## Generated JSON models +```json +{ + "diagram_type": "package", + "elements": [ + { + "display_name": "mod1", + "id": "2044296282469444594", + "is_deprecated": false, + "name": "mod1", + "namespace": "t30013", + "source_location": { + "column": 8, + "file": "src/mod1.cppm", + "line": 4, + "translation_unit": "t30013.cc" + }, + "type": "module" + }, + { + "display_name": "mod2", + "id": "1532747677179216874", + "is_deprecated": false, + "name": "mod2", + "namespace": "t30013", + "source_location": { + "column": 30, + "file": "src/mod2.cppm", + "line": 4, + "translation_unit": "t30013.cc" + }, + "type": "module" + }, + { + "display_name": "mod3", + "id": "2181211985644595508", + "is_deprecated": false, + "name": "mod3", + "namespace": "t30013", + "source_location": { + "column": 8, + "file": "src/mod3.cppm", + "line": 4, + "translation_unit": "t30013.cc" + }, + "type": "module" + }, + { + "display_name": "mod4", + "id": "1994575092781206355", + "is_deprecated": false, + "name": "mod4", + "namespace": "t30013", + "source_location": { + "column": 8, + "file": "src/mod4.cppm", + "line": 4, + "translation_unit": "t30013.cc" + }, + "type": "module" + }, + { + "display_name": "mod5", + "id": "83546849245676714", + "is_deprecated": false, + "name": "mod5", + "namespace": "t30013", + "source_location": { + "column": 8, + "file": "src/mod5.cppm", + "line": 4, + "translation_unit": "t30013.cc" + }, + "type": "module" + }, + { + "display_name": "mod6", + "id": "441620369599169965", + "is_deprecated": false, + "name": "mod6", + "namespace": "t30013", + "source_location": { + "column": 8, + "file": "src/mod6.cppm", + "line": 4, + "translation_unit": "t30013.cc" + }, + "type": "module" + }, + { + "display_name": "mod7", + "id": "836435135277319151", + "is_deprecated": false, + "name": "mod7", + "namespace": "t30013", + "source_location": { + "column": 8, + "file": "src/mod7.cppm", + "line": 4, + "translation_unit": "t30013.cc" + }, + "type": "module" + }, + { + "display_name": "mod8", + "id": "420790450869221512", + "is_deprecated": false, + "name": "mod8", + "namespace": "t30013", + "source_location": { + "column": 8, + "file": "src/mod8.cppm", + "line": 4, + "translation_unit": "t30013.cc" + }, + "type": "module" + }, + { + "display_name": "mod9", + "id": "396495954682989840", + "is_deprecated": false, + "name": "mod9", + "namespace": "t30013", + "source_location": { + "column": 8, + "file": "src/mod9.cppm", + "line": 4, + "translation_unit": "t30013.cc" + }, + "type": "module" + }, + { + "display_name": "mod10", + "id": "2177162846045884064", + "is_deprecated": false, + "name": "mod10", + "namespace": "t30013", + "source_location": { + "column": 8, + "file": "src/mod10.cppm", + "line": 4, + "translation_unit": "t30013.cc" + }, + "type": "module" + }, + { + "display_name": "mod11", + "id": "1414886740502603020", + "is_deprecated": false, + "name": "mod11", + "namespace": "t30013", + "source_location": { + "column": 8, + "file": "src/mod11.cppm", + "line": 4, + "translation_unit": "t30013.cc" + }, + "type": "module" + }, + { + "display_name": "mod12", + "id": "1312439587201843275", + "is_deprecated": false, + "name": "mod12", + "namespace": "t30013", + "source_location": { + "column": 8, + "file": "src/mod12.cppm", + "line": 4, + "translation_unit": "t30013.cc" + }, + "type": "module" + }, + { + "display_name": "mod13", + "id": "1087761784810349022", + "is_deprecated": false, + "name": "mod13", + "namespace": "t30013", + "source_location": { + "column": 8, + "file": "src/mod13.cppm", + "line": 4, + "translation_unit": "t30013.cc" + }, + "type": "module" + }, + { + "display_name": "mod14", + "id": "613410583917815311", + "is_deprecated": false, + "name": "mod14", + "namespace": "t30013", + "source_location": { + "column": 8, + "file": "src/mod14.cppm", + "line": 4, + "translation_unit": "t30013.cc" + }, + "type": "module" + }, + { + "display_name": "mod15", + "id": "1226951305255100636", + "is_deprecated": false, + "name": "mod15", + "namespace": "t30013", + "source_location": { + "column": 8, + "file": "src/mod15.cppm", + "line": 4, + "translation_unit": "t30013.cc" + }, + "type": "module" + }, + { + "display_name": "mod16", + "id": "1931818205177002737", + "is_deprecated": false, + "name": "mod16", + "namespace": "t30013", + "source_location": { + "column": 8, + "file": "src/mod16.cppm", + "line": 4, + "translation_unit": "t30013.cc" + }, + "type": "module" + }, + { + "display_name": "mod17", + "id": "1954698286919808752", + "is_deprecated": false, + "name": "mod17", + "namespace": "t30013", + "source_location": { + "column": 8, + "file": "src/mod17.cppm", + "line": 4, + "translation_unit": "t30013.cc" + }, + "type": "module" + }, + { + "display_name": "mod18", + "id": "984386744169567889", + "is_deprecated": false, + "name": "mod18", + "namespace": "t30013", + "source_location": { + "column": 12, + "file": "src/mod18.cppm", + "line": 4, + "translation_unit": "t30013.cc" + }, + "type": "module" + }, + { + "display_name": "app", + "id": "45223532970498010", + "is_deprecated": false, + "name": "app", + "namespace": "t30013", + "source_location": { + "column": 7, + "file": "src/app.cppm", + "line": 32, + "translation_unit": "t30013.cc" + }, + "type": "module" + } + ], + "name": "t30013_package", + "package_type": "module", + "relationships": [ + { + "destination": "420790450869221512", + "source": "45223532970498010", + "type": "dependency" + }, + { + "destination": "396495954682989840", + "source": "45223532970498010", + "type": "dependency" + }, + { + "destination": "2044296282469444594", + "source": "45223532970498010", + "type": "dependency" + }, + { + "destination": "1532747677179216874", + "source": "45223532970498010", + "type": "dependency" + }, + { + "destination": "2181211985644595508", + "source": "45223532970498010", + "type": "dependency" + }, + { + "destination": "1994575092781206355", + "source": "45223532970498010", + "type": "dependency" + }, + { + "destination": "1226951305255100636", + "source": "45223532970498010", + "type": "dependency" + }, + { + "destination": "984386744169567889", + "source": "45223532970498010", + "type": "dependency" + }, + { + "destination": "1931818205177002737", + "source": "45223532970498010", + "type": "dependency" + }, + { + "destination": "613410583917815311", + "source": "45223532970498010", + "type": "dependency" + }, + { + "destination": "83546849245676714", + "source": "45223532970498010", + "type": "dependency" + }, + { + "destination": "836435135277319151", + "source": "45223532970498010", + "type": "dependency" + }, + { + "destination": "1954698286919808752", + "source": "45223532970498010", + "type": "dependency" + }, + { + "destination": "441620369599169965", + "source": "45223532970498010", + "type": "dependency" + }, + { + "destination": "2177162846045884064", + "source": "45223532970498010", + "type": "dependency" + }, + { + "destination": "1414886740502603020", + "source": "45223532970498010", + "type": "dependency" + }, + { + "destination": "1312439587201843275", + "source": "45223532970498010", + "type": "dependency" + }, + { + "destination": "1087761784810349022", + "source": "45223532970498010", + "type": "dependency" + } + ], + "using_module": "t30013" +} +``` diff --git a/docs/test_cases/t30013_package.svg b/docs/test_cases/t30013_package.svg new file mode 100644 index 00000000..bb9152a3 --- /dev/null +++ b/docs/test_cases/t30013_package.svg @@ -0,0 +1,144 @@ + + + + + + + + + + + + + + + mod1 + + + + + mod2 + + + + + mod3 + + + + + mod4 + + + + + mod5 + + + + + mod6 + + + + + mod7 + + + + + mod8 + + + + + mod9 + + + + + mod10 + + + + + mod11 + + + + + mod12 + + + + + mod13 + + + + + mod14 + + + + + mod15 + + + + + mod16 + + + + + mod17 + + + + + mod18 + + + + + app + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/test_cases/t30013_package_mermaid.svg b/docs/test_cases/t30013_package_mermaid.svg new file mode 100644 index 00000000..ec097879 --- /dev/null +++ b/docs/test_cases/t30013_package_mermaid.svg @@ -0,0 +1,421 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+
+
+ + + +
+ +
+
+
+
+ + + +
+ +
+
+
+
+ + + +
+ +
+
+
+
+ + + +
+ +
+
+
+
+ + + +
+ +
+
+
+
+ + + +
+ +
+
+
+
+ + + +
+ +
+
+
+
+ + + +
+ +
+
+
+
+ + + +
+ +
+
+
+
+ + + +
+ +
+
+
+
+ + + +
+ +
+
+
+
+ + + +
+ +
+
+
+
+ + + +
+ +
+
+
+
+ + + +
+ +
+
+
+
+ + + +
+ +
+
+
+
+ + + +
+ +
+
+
+
+ + + +
+ +
+
+
+
+
+ + + + + + +
+ app +
+
+
+
+ + + + + +
+ mod8 +
+
+
+
+ + + + + +
+ mod9 +
+
+
+
+ + + + + +
+ mod1 +
+
+
+
+ + + + + +
+ mod2 +
+
+
+
+ + + + + +
+ mod3 +
+
+
+
+ + + + + +
+ mod4 +
+
+
+
+ + + + + +
+ mod15 +
+
+
+
+ + + + + +
+ mod18 +
+
+
+
+ + + + + +
+ mod16 +
+
+
+
+ + + + + +
+ mod14 +
+
+
+
+ + + + + +
+ mod5 +
+
+
+
+ + + + + +
+ mod7 +
+
+
+
+ + + + + +
+ mod17 +
+
+
+
+ + + + + +
+ mod6 +
+
+
+
+ + + + + +
+ mod10 +
+
+
+
+ + + + + +
+ mod11 +
+
+
+
+ + + + + +
+ mod12 +
+
+
+
+ + + + + +
+ mod13 +
+
+
+
+
+
+
+
diff --git a/docs/test_cases/t30014.md b/docs/test_cases/t30014.md new file mode 100644 index 00000000..f68feaca --- /dev/null +++ b/docs/test_cases/t30014.md @@ -0,0 +1,161 @@ +# t30014 - C++20 modules package diagram test with partitions +## Config +```yaml +diagrams: + t30014_package: + type: package + glob: + - t30014.cc + package_type: module + include: + modules: + - t30014 + exclude: + modules: + - t30014.app:lib1.mod2 + using_module: t30014 +``` +## Source code +File `tests/t30014/t30014.cc` +```cpp +import t30014.app; + +namespace clanguml { +namespace t30014 { +} +} +``` +File `tests/t30014/src/lib1mod2.cppm` +```cpp +export module t30014.app:lib1.mod2; + +export namespace clanguml::t30014 { +class E { }; +} // namespace clanguml::t30014 +``` +File `tests/t30014/src/t30014_mod.cppm` +```cpp +export module t30014.app; +import :lib1; +import :lib1.mod1; +import :lib1.mod2; +import :lib2; + +export namespace clanguml::t30014 { +class A { + int get() { return a; } + + int a; +}; +} // namespace clanguml::t30014 +``` +File `tests/t30014/src/lib2.cppm` +```cpp +export module t30014.app:lib2; + +export namespace clanguml::t30014 { +class C { }; + +template class CC { + T t; +}; + +namespace detail { +enum class CCC { ccc1, ccc2 }; +} // namespace detail +} // namespace clanguml::t30014 +``` +File `tests/t30014/src/lib1.cppm` +```cpp +export module t30014.app:lib1; + +export namespace clanguml::t30014 { +class B { }; + +template class BB { + T t; +}; + +namespace detail { +enum class BBB { bbb1, bbb2 }; +} // namespace detail +} // namespace clanguml::t30014 +``` +File `tests/t30014/src/lib1mod1.cppm` +```cpp +export module t30014.app:lib1.mod1; + +export namespace clanguml::t30014 { +class D { }; +} // namespace clanguml::t30014 +``` +## Generated PlantUML diagrams +![t30014_package](./t30014_package.svg "C++20 modules package diagram test with partitions") +## Generated Mermaid diagrams +![t30014_package](./t30014_package_mermaid.svg "C++20 modules package diagram test with partitions") +## Generated JSON models +```json +{ + "diagram_type": "package", + "elements": [ + { + "display_name": "app", + "elements": [ + { + "display_name": ":lib1", + "elements": [ + { + "display_name": "mod1", + "id": "2034114360803168801", + "is_deprecated": false, + "name": "mod1", + "namespace": "t30014.app:lib1", + "source_location": { + "column": 7, + "file": "src/lib1mod1.cppm", + "line": 4, + "translation_unit": "t30014.cc" + }, + "type": "module" + } + ], + "id": "1618985722491582169", + "is_deprecated": false, + "name": ":lib1", + "namespace": "t30014.app", + "source_location": { + "column": 7, + "file": "src/lib1.cppm", + "line": 4, + "translation_unit": "t30014.cc" + }, + "type": "module" + }, + { + "display_name": ":lib2", + "id": "1569901875704270760", + "is_deprecated": false, + "name": ":lib2", + "namespace": "t30014.app", + "source_location": { + "column": 7, + "file": "src/lib2.cppm", + "line": 4, + "translation_unit": "t30014.cc" + }, + "type": "module" + } + ], + "id": "1932503454610788726", + "is_deprecated": false, + "name": "app", + "namespace": "t30014", + "type": "module" + } + ], + "name": "t30014_package", + "package_type": "module", + "relationships": [], + "using_module": "t30014" +} +``` diff --git a/docs/test_cases/t30014_package.svg b/docs/test_cases/t30014_package.svg new file mode 100644 index 00000000..6d60e594 --- /dev/null +++ b/docs/test_cases/t30014_package.svg @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + app + + + + :lib1 + + + + + mod1 + + + + + :lib2 + + + diff --git a/docs/test_cases/t30014_package_mermaid.svg b/docs/test_cases/t30014_package_mermaid.svg new file mode 100644 index 00000000..bf069df7 --- /dev/null +++ b/docs/test_cases/t30014_package_mermaid.svg @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ app +
+
+
+
+
+ + + + + + + + + +
+ :lib1 +
+
+
+
+
+ + + + + + + + +
+ mod1 +
+
+
+
+
+
+ + + + + +
+ :lib2 +
+
+
+
+
+
+
+
+
+
diff --git a/docs/test_cases/t30015.md b/docs/test_cases/t30015.md new file mode 100644 index 00000000..d6651ad7 --- /dev/null +++ b/docs/test_cases/t30015.md @@ -0,0 +1,655 @@ +# t30015 - C++20 modules package diagram test with partition dependencies +## Config +```yaml +diagrams: + t30015_package: + type: package + glob: + - t30015.cc + package_type: module + include: + modules: + - t30015 + using_module: t30015 +``` +## Source code +File `tests/t30015/t30015.cc` +```cpp +import t30015.app; + +namespace clanguml { +namespace t30015 { +} +} +``` +File `tests/t30015/src/mod7.cppm` +```cpp +export module t30015.lib1:mod7; + +export namespace clanguml::t30015 { +struct CG { }; +} +``` +File `tests/t30015/src/mod11.cppm` +```cpp +export module t30015.lib1:mod11; + +export namespace clanguml::t30015 { +struct CK { }; +} +``` +File `tests/t30015/src/mod17.cppm` +```cpp +export module t30015.lib1:mod17; + +export namespace clanguml::t30015 { +struct CR { }; +} +``` +File `tests/t30015/src/mod16.cppm` +```cpp +export module t30015.lib1:mod16; + +export namespace clanguml::t30015 { +struct CP { }; +} +``` +File `tests/t30015/src/mod10.cppm` +```cpp +export module t30015.lib1:mod10; + +export namespace clanguml::t30015 { +struct CJ { }; +} +``` +File `tests/t30015/src/mod4.cppm` +```cpp +export module t30015.lib1:mod4; + +export namespace clanguml::t30015 { +struct CD { }; +} +``` +File `tests/t30015/src/mod1.cppm` +```cpp +export module t30015.lib1:mod1; + +export namespace clanguml::t30015 { +struct CA { }; +} +``` +File `tests/t30015/src/app.cppm` +```cpp +module; + +#include +#include +#include +#include +#include + +export module t30015.app; +import t30015.lib1; + +// import t30015.app; +// import t30015.mod2; +// import t30015.mod3; +// import t30015.mod4; +// import t30015.mod5; +// import t30015.mod6; +// import t30015.mod7; +// import t30015.mod8; +// import t30015.mod9; +// import t30015.mod10; +// import t30015.mod11; +// import t30015.mod12; +// import t30015.mod13; +// import t30015.mod14; +// import t30015.mod15; +// import t30015.mod16; +// import t30015.mod17; +// import t30015.mod18; + +export namespace clanguml::t30015 { + +class CBA : public CF { +public: + CA *ca_; + CB cb_; + std::shared_ptr cc_; + std::map> *cd_; + std::array co_; + static CP *cp_; + + CBA() = default; + + CBA(CN *cn) { } + + friend CR; + + template CBA(std::tuple &items) { } + + void ce(const std::vector /*ce_*/) { } + + std::shared_ptr cg() { return {}; } + + template void ch(std::map> &ch_) { } + + template std::map> ci(T * /*t*/) + { + return {}; + } + + S s; +}; + +void cj(std::unique_ptr /*cj_*/) { } + +std::unique_ptr ck() { return {}; } + +template void cl(std::map> & /*ch_*/) { } + +template std::map> cm() { return {}; } + +} // namespace clanguml::t30013 +``` +File `tests/t30015/src/mod13.cppm` +```cpp +export module t30015.lib1:mod13; + +export namespace clanguml::t30015 { +struct CM { }; +} +``` +File `tests/t30015/src/mod9.cppm` +```cpp +export module t30015.lib1:mod9; + +export namespace clanguml::t30015 { +struct CI { }; +} +``` +File `tests/t30015/src/mod5.cppm` +```cpp +export module t30015.lib1:mod5; + +export namespace clanguml::t30015 { +struct CE { }; +} +``` +File `tests/t30015/src/mod18.cppm` +```cpp +export module t30015.lib1:mod18; + +export namespace clanguml::t30015 { +enum class S { s1, s2, s3 }; +} +``` +File `tests/t30015/src/mod2.cppm` +```cpp +export module t30015.lib1:mod2; + +export namespace clanguml::t30015 { +template struct CB { + T cb; +}; +} +``` +File `tests/t30015/src/mod14.cppm` +```cpp +export module t30015.lib1:mod14; + +export namespace clanguml::t30015 { +struct CN { }; +} +``` +File `tests/t30015/src/mod12.cppm` +```cpp +export module t30015.lib1:mod12; + +export namespace clanguml::t30015 { +struct CL { }; +} +``` +File `tests/t30015/src/mod6.cppm` +```cpp +export module t30015.lib1:mod6; + +export namespace clanguml::t30015 { +struct CF { }; +} +``` +File `tests/t30015/src/mod8.cppm` +```cpp +export module t30015.lib1:mod8; + +export namespace clanguml::t30015 { +struct CH { }; +} +``` +File `tests/t30015/src/mod3.cppm` +```cpp +export module t30015.lib1:mod3; + +export namespace clanguml::t30015 { +struct CC { }; +} +``` +File `tests/t30015/src/lib1.cppm` +```cpp +export module t30015.lib1; + +export import :mod1; +export import :mod2; +export import :mod3; +export import :mod4; +export import :mod5; +export import :mod6; +export import :mod7; +export import :mod8; +export import :mod9; +export import :mod10; +export import :mod11; +export import :mod12; +export import :mod13; +export import :mod14; +export import :mod15; +export import :mod16; +export import :mod17; +export import :mod18; + +export namespace clanguml::t30015 { + +} +``` +File `tests/t30015/src/mod15.cppm` +```cpp +export module t30015.lib1:mod15; + +export namespace clanguml::t30015 { +struct CO { }; +} +``` +## Generated PlantUML diagrams +![t30015_package](./t30015_package.svg "C++20 modules package diagram test with partition dependencies") +## Generated Mermaid diagrams +![t30015_package](./t30015_package_mermaid.svg "C++20 modules package diagram test with partition dependencies") +## Generated JSON models +```json +{ + "diagram_type": "package", + "elements": [ + { + "display_name": "lib1", + "elements": [ + { + "display_name": ":mod1", + "id": "2078789731210233181", + "is_deprecated": false, + "name": ":mod1", + "namespace": "t30015.lib1", + "source_location": { + "column": 8, + "file": "src/mod1.cppm", + "line": 4, + "translation_unit": "t30015.cc" + }, + "type": "module" + }, + { + "display_name": ":mod2", + "id": "108157285110421434", + "is_deprecated": false, + "name": ":mod2", + "namespace": "t30015.lib1", + "source_location": { + "column": 30, + "file": "src/mod2.cppm", + "line": 4, + "translation_unit": "t30015.cc" + }, + "type": "module" + }, + { + "display_name": ":mod3", + "id": "1466337333501241721", + "is_deprecated": false, + "name": ":mod3", + "namespace": "t30015.lib1", + "source_location": { + "column": 8, + "file": "src/mod3.cppm", + "line": 4, + "translation_unit": "t30015.cc" + }, + "type": "module" + }, + { + "display_name": ":mod4", + "id": "2181077882404368936", + "is_deprecated": false, + "name": ":mod4", + "namespace": "t30015.lib1", + "source_location": { + "column": 8, + "file": "src/mod4.cppm", + "line": 4, + "translation_unit": "t30015.cc" + }, + "type": "module" + }, + { + "display_name": ":mod5", + "id": "1045004042628075747", + "is_deprecated": false, + "name": ":mod5", + "namespace": "t30015.lib1", + "source_location": { + "column": 8, + "file": "src/mod5.cppm", + "line": 4, + "translation_unit": "t30015.cc" + }, + "type": "module" + }, + { + "display_name": ":mod6", + "id": "536067780214444138", + "is_deprecated": false, + "name": ":mod6", + "namespace": "t30015.lib1", + "source_location": { + "column": 8, + "file": "src/mod6.cppm", + "line": 4, + "translation_unit": "t30015.cc" + }, + "type": "module" + }, + { + "display_name": ":mod7", + "id": "1678616733221858020", + "is_deprecated": false, + "name": ":mod7", + "namespace": "t30015.lib1", + "source_location": { + "column": 8, + "file": "src/mod7.cppm", + "line": 4, + "translation_unit": "t30015.cc" + }, + "type": "module" + }, + { + "display_name": ":mod8", + "id": "240013230569803405", + "is_deprecated": false, + "name": ":mod8", + "namespace": "t30015.lib1", + "source_location": { + "column": 8, + "file": "src/mod8.cppm", + "line": 4, + "translation_unit": "t30015.cc" + }, + "type": "module" + }, + { + "display_name": ":mod9", + "id": "179175577447017767", + "is_deprecated": false, + "name": ":mod9", + "namespace": "t30015.lib1", + "source_location": { + "column": 8, + "file": "src/mod9.cppm", + "line": 4, + "translation_unit": "t30015.cc" + }, + "type": "module" + }, + { + "display_name": ":mod10", + "id": "485628131931062884", + "is_deprecated": false, + "name": ":mod10", + "namespace": "t30015.lib1", + "source_location": { + "column": 8, + "file": "src/mod10.cppm", + "line": 4, + "translation_unit": "t30015.cc" + }, + "type": "module" + }, + { + "display_name": ":mod11", + "id": "791090113373006765", + "is_deprecated": false, + "name": ":mod11", + "namespace": "t30015.lib1", + "source_location": { + "column": 8, + "file": "src/mod11.cppm", + "line": 4, + "translation_unit": "t30015.cc" + }, + "type": "module" + }, + { + "display_name": ":mod12", + "id": "500107934060144677", + "is_deprecated": false, + "name": ":mod12", + "namespace": "t30015.lib1", + "source_location": { + "column": 8, + "file": "src/mod12.cppm", + "line": 4, + "translation_unit": "t30015.cc" + }, + "type": "module" + }, + { + "display_name": ":mod13", + "id": "1195842122299166493", + "is_deprecated": false, + "name": ":mod13", + "namespace": "t30015.lib1", + "source_location": { + "column": 8, + "file": "src/mod13.cppm", + "line": 4, + "translation_unit": "t30015.cc" + }, + "type": "module" + }, + { + "display_name": ":mod14", + "id": "581129920847850526", + "is_deprecated": false, + "name": ":mod14", + "namespace": "t30015.lib1", + "source_location": { + "column": 8, + "file": "src/mod14.cppm", + "line": 4, + "translation_unit": "t30015.cc" + }, + "type": "module" + }, + { + "display_name": ":mod15", + "id": "1715856257738182160", + "is_deprecated": false, + "name": ":mod15", + "namespace": "t30015.lib1", + "source_location": { + "column": 8, + "file": "src/mod15.cppm", + "line": 4, + "translation_unit": "t30015.cc" + }, + "type": "module" + }, + { + "display_name": ":mod16", + "id": "1435303665523039114", + "is_deprecated": false, + "name": ":mod16", + "namespace": "t30015.lib1", + "source_location": { + "column": 8, + "file": "src/mod16.cppm", + "line": 4, + "translation_unit": "t30015.cc" + }, + "type": "module" + }, + { + "display_name": ":mod17", + "id": "1327885001907982070", + "is_deprecated": false, + "name": ":mod17", + "namespace": "t30015.lib1", + "source_location": { + "column": 8, + "file": "src/mod17.cppm", + "line": 4, + "translation_unit": "t30015.cc" + }, + "type": "module" + }, + { + "display_name": ":mod18", + "id": "2193691762152553973", + "is_deprecated": false, + "name": ":mod18", + "namespace": "t30015.lib1", + "source_location": { + "column": 12, + "file": "src/mod18.cppm", + "line": 4, + "translation_unit": "t30015.cc" + }, + "type": "module" + } + ], + "id": "1208975031146850353", + "is_deprecated": false, + "name": "lib1", + "namespace": "t30015", + "type": "module" + }, + { + "display_name": "app", + "id": "1200268042616700255", + "is_deprecated": false, + "name": "app", + "namespace": "t30015", + "source_location": { + "column": 7, + "file": "src/app.cppm", + "line": 33, + "translation_unit": "t30015.cc" + }, + "type": "module" + } + ], + "name": "t30015_package", + "package_type": "module", + "relationships": [ + { + "destination": "240013230569803405", + "source": "1200268042616700255", + "type": "dependency" + }, + { + "destination": "179175577447017767", + "source": "1200268042616700255", + "type": "dependency" + }, + { + "destination": "2078789731210233181", + "source": "1200268042616700255", + "type": "dependency" + }, + { + "destination": "108157285110421434", + "source": "1200268042616700255", + "type": "dependency" + }, + { + "destination": "1466337333501241721", + "source": "1200268042616700255", + "type": "dependency" + }, + { + "destination": "2181077882404368936", + "source": "1200268042616700255", + "type": "dependency" + }, + { + "destination": "1715856257738182160", + "source": "1200268042616700255", + "type": "dependency" + }, + { + "destination": "2193691762152553973", + "source": "1200268042616700255", + "type": "dependency" + }, + { + "destination": "1435303665523039114", + "source": "1200268042616700255", + "type": "dependency" + }, + { + "destination": "581129920847850526", + "source": "1200268042616700255", + "type": "dependency" + }, + { + "destination": "1045004042628075747", + "source": "1200268042616700255", + "type": "dependency" + }, + { + "destination": "1678616733221858020", + "source": "1200268042616700255", + "type": "dependency" + }, + { + "destination": "1327885001907982070", + "source": "1200268042616700255", + "type": "dependency" + }, + { + "destination": "536067780214444138", + "source": "1200268042616700255", + "type": "dependency" + }, + { + "destination": "485628131931062884", + "source": "1200268042616700255", + "type": "dependency" + }, + { + "destination": "791090113373006765", + "source": "1200268042616700255", + "type": "dependency" + }, + { + "destination": "500107934060144677", + "source": "1200268042616700255", + "type": "dependency" + }, + { + "destination": "1195842122299166493", + "source": "1200268042616700255", + "type": "dependency" + } + ], + "using_module": "t30015" +} +``` diff --git a/docs/test_cases/t30015_package.svg b/docs/test_cases/t30015_package.svg new file mode 100644 index 00000000..ba96f0e1 --- /dev/null +++ b/docs/test_cases/t30015_package.svg @@ -0,0 +1,147 @@ + + + + + + + + + + + + + + lib1 + + + + :mod1 + + + + + :mod2 + + + + + :mod3 + + + + + :mod4 + + + + + :mod5 + + + + + :mod6 + + + + + :mod7 + + + + + :mod8 + + + + + :mod9 + + + + + :mod10 + + + + + :mod11 + + + + + :mod12 + + + + + :mod13 + + + + + :mod14 + + + + + :mod15 + + + + + :mod16 + + + + + :mod17 + + + + + :mod18 + + + + + app + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/test_cases/t30015_package_mermaid.svg b/docs/test_cases/t30015_package_mermaid.svg new file mode 100644 index 00000000..b7cd9ad0 --- /dev/null +++ b/docs/test_cases/t30015_package_mermaid.svg @@ -0,0 +1,432 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ lib1 +
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+
+
+ + + +
+ +
+
+
+
+ + + +
+ +
+
+
+
+ + + +
+ +
+
+
+
+ + + +
+ +
+
+
+
+ + + +
+ +
+
+
+
+ + + +
+ +
+
+
+
+ + + +
+ +
+
+
+
+ + + +
+ +
+
+
+
+ + + +
+ +
+
+
+
+ + + +
+ +
+
+
+
+ + + +
+ +
+
+
+
+ + + +
+ +
+
+
+
+ + + +
+ +
+
+
+
+ + + +
+ +
+
+
+
+ + + +
+ +
+
+
+
+ + + +
+ +
+
+
+
+ + + +
+ +
+
+
+
+
+ + + + + + +
+ :mod1 +
+
+
+
+ + + + + +
+ :mod2 +
+
+
+
+ + + + + +
+ :mod3 +
+
+
+
+ + + + + +
+ :mod4 +
+
+
+
+ + + + + +
+ :mod5 +
+
+
+
+ + + + + +
+ :mod6 +
+
+
+
+ + + + + +
+ :mod7 +
+
+
+
+ + + + + +
+ :mod8 +
+
+
+
+ + + + + +
+ :mod9 +
+
+
+
+ + + + + +
+ :mod10 +
+
+
+
+ + + + + +
+ :mod11 +
+
+
+
+ + + + + +
+ :mod12 +
+
+
+
+ + + + + +
+ :mod13 +
+
+
+
+ + + + + +
+ :mod14 +
+
+
+
+ + + + + +
+ :mod15 +
+
+
+
+ + + + + +
+ :mod16 +
+
+
+
+ + + + + +
+ :mod17 +
+
+
+
+ + + + + +
+ :mod18 +
+
+
+
+ + + + + +
+ app +
+
+
+
+
+
+
+
diff --git a/docs/test_cases/t40001.md b/docs/test_cases/t40001.md index c26034af..7edffec9 100644 --- a/docs/test_cases/t40001.md +++ b/docs/test_cases/t40001.md @@ -29,6 +29,47 @@ diagrams: - '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 +#include + +#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 + +#include + +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 @@ -57,6 +98,7 @@ diagrams: "display_name": "string", "file_kind": "header", "id": "1687197357150905926", + "is_system": true, "name": "string", "type": "file" }, @@ -64,6 +106,7 @@ diagrams: "display_name": "vector", "file_kind": "header", "id": "405203884025072971", + "is_system": true, "name": "vector", "type": "file" }, @@ -74,6 +117,7 @@ diagrams: "display_name": "include/t40001_include1.h", "file_kind": "header", "id": "1926692816440595520", + "is_system": false, "name": "t40001_include1.h", "type": "file" }, @@ -84,6 +128,7 @@ diagrams: "display_name": "include/lib1/lib1.h", "file_kind": "header", "id": "2193549214042244690", + "is_system": false, "name": "lib1.h", "type": "file" } @@ -101,6 +146,7 @@ diagrams: "display_name": "yaml-cpp/yaml.h", "file_kind": "header", "id": "1659736894483045485", + "is_system": true, "name": "yaml-cpp/yaml.h", "type": "file" } diff --git a/docs/test_cases/t40001_include.svg b/docs/test_cases/t40001_include.svg index 13fa4d9c..90355077 100644 --- a/docs/test_cases/t40001_include.svg +++ b/docs/test_cases/t40001_include.svg @@ -1,6 +1,6 @@ - + @@ -10,41 +10,41 @@ Basic include diagram example - + src - + include - + lib1 - - + + t40001.cc - - + + t40001_include1.h - + lib1.h - + string - + vector - + yaml-cpp/yaml.h - + This is a lib1 include dir - + This is a t40001_include1.h include file @@ -59,7 +59,7 @@ - - + + diff --git a/docs/test_cases/t40001_include_mermaid.svg b/docs/test_cases/t40001_include_mermaid.svg index 91873c2e..0af13e6f 100644 --- a/docs/test_cases/t40001_include_mermaid.svg +++ b/docs/test_cases/t40001_include_mermaid.svg @@ -138,7 +138,7 @@
- + @@ -151,7 +151,7 @@ - + @@ -164,7 +164,7 @@ - + diff --git a/docs/test_cases/t40002.md b/docs/test_cases/t40002.md index 567dd5e9..37c1c398 100644 --- a/docs/test_cases/t40002.md +++ b/docs/test_cases/t40002.md @@ -23,6 +23,94 @@ diagrams: - "' t40002 test include diagram" ``` ## Source code +File `tests/t40002/src/t40002.cc` +```cpp +#include "../include/lib1/lib1.h" +#include "../include/lib2/lib2.h" + +namespace clanguml::t40002 { + +int foo() { return lib1::foo() + lib2::foo(); } + +} +``` +File `tests/t40002/src/lib1/lib1.cc` +```cpp +#include "../../include/lib1/lib1.h" + +#include + +namespace clanguml::t40002::lib1 { + +int foo0() { return 0; } + +int foo1() { return 1; } + +int foo() { return foo1(); } + +} +``` +File `tests/t40002/src/lib2/lib2.cc` +```cpp +#include "../../include/lib2/lib2.h" +#include "../../include/lib2/lib2_detail.h" + +namespace clanguml::t40002::lib2 { + +int foo0() { return 0; } + +int foo1() { return 1; } + +int foo() { return foo1(); } + +int foo22() { return 22; } + +} // namespace clanguml::t40002::lib2 +``` +File `tests/t40002/include/lib1/lib1.h` +```cpp +#pragma once + +#include "../lib2/lib2.h" + +#include + +namespace clanguml::t40002::lib1 { + +int foo0(); + +int foo1(); + +int foo(); + +} +``` +File `tests/t40002/include/lib2/lib2_detail.h` +```cpp +#pragma once + +namespace clanguml::t40002::lib2::detail { + +int foo22(); + +} +``` +File `tests/t40002/include/lib2/lib2.h` +```cpp +#pragma once + +#include "lib2_detail.h" + +namespace clanguml::t40002::lib2 { + +int foo2(); + +int foo3(); + +int foo(); + +} +``` ## Generated PlantUML diagrams ![t40002_include](./t40002_include.svg "Cyclic include graph diagram test case") ## Generated Mermaid diagrams @@ -87,6 +175,7 @@ diagrams: "display_name": "include/lib1/lib1.h", "file_kind": "header", "id": "2193549214042244690", + "is_system": false, "name": "lib1.h", "type": "file" } @@ -102,6 +191,7 @@ diagrams: "display_name": "include/lib2/lib2.h", "file_kind": "header", "id": "1969674835696841438", + "is_system": false, "name": "lib2.h", "type": "file" } diff --git a/docs/test_cases/t40002_include.svg b/docs/test_cases/t40002_include.svg index 7760b594..5ad5cdd6 100644 --- a/docs/test_cases/t40002_include.svg +++ b/docs/test_cases/t40002_include.svg @@ -1,6 +1,6 @@ - + @@ -9,46 +9,46 @@ - + src - + lib1 - + lib2 - + include - + lib1 - + lib2 - - + + t40002.cc - - + + lib1.cc - - + + lib2.cc - - + + lib1.h - - + + lib2.h diff --git a/docs/test_cases/t40002_include_mermaid.svg b/docs/test_cases/t40002_include_mermaid.svg index b26d81a5..d41801d9 100644 --- a/docs/test_cases/t40002_include_mermaid.svg +++ b/docs/test_cases/t40002_include_mermaid.svg @@ -137,7 +137,7 @@ - + @@ -150,7 +150,7 @@ - + @@ -163,7 +163,7 @@ - + @@ -176,7 +176,7 @@ - + @@ -189,7 +189,7 @@ - + diff --git a/docs/test_cases/t40003.md b/docs/test_cases/t40003.md index 7ec6847c..5b1423ad 100644 --- a/docs/test_cases/t40003.md +++ b/docs/test_cases/t40003.md @@ -22,6 +22,116 @@ diagrams: - "' t40003 test include diagram" ``` ## Source code +File `tests/t40003/src/dependencies/t2.cc` +```cpp +#include "../../include/dependencies/t3.h" +#include "../../include/dependencies/t5.h" + +namespace clanguml::t40003::dependencies { +void t() +{ + t3(); + t5(); +} +} +``` +File `tests/t40003/src/dependants/t1.cc` +```cpp +#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` +```cpp +#pragma once + +#include "t2.h" + +namespace clanguml::t40003::dependencies { +void t3() { t2(); } +} +``` +File `tests/t40003/include/dependencies/t1.h` +```cpp +#pragma once + +namespace clanguml::t40003::dependencies { +void t1() { } +} +``` +File `tests/t40003/include/dependencies/t6.h` +```cpp +#pragma once + +#include "t1.h" + +namespace clanguml::t40003::dependencies { +void t6() { t1(); } +} +``` +File `tests/t40003/include/dependencies/t5.h` +```cpp +#pragma once + +#include "t1.h" + +namespace clanguml::t40003::dependencies { +void t5() { t1(); } +} +``` +File `tests/t40003/include/dependencies/t2.h` +```cpp +#pragma once + +#include "t1.h" + +namespace clanguml::t40003::dependencies { +void t2() { t1(); } +} +``` +File `tests/t40003/include/dependants/t3.h` +```cpp +#pragma once + +#include "t2.h" + +namespace clanguml::t40003::dependants { +void t3() { t2(); } +} +``` +File `tests/t40003/include/dependants/t4.h` +```cpp +#pragma once + +namespace clanguml::t40003::dependants { +void t4() { } +} +``` +File `tests/t40003/include/dependants/t1.h` +```cpp +#pragma once + +namespace clanguml::t40003::dependants { +void t1() { } +} +``` +File `tests/t40003/include/dependants/t2.h` +```cpp +#pragma once + +#include "t1.h" + +namespace clanguml::t40003::dependants { +void t2() { t1(); } +} +``` ## Generated PlantUML diagrams ![t40003_include](./t40003_include.svg "Dependants and dependencies include diagram filter test") ## Generated Mermaid diagrams @@ -79,6 +189,7 @@ diagrams: "display_name": "include/dependants/t3.h", "file_kind": "header", "id": "60001020671836182", + "is_system": false, "name": "t3.h", "type": "file" }, @@ -86,6 +197,7 @@ diagrams: "display_name": "include/dependants/t2.h", "file_kind": "header", "id": "1921842892192045013", + "is_system": false, "name": "t2.h", "type": "file" }, @@ -93,6 +205,7 @@ diagrams: "display_name": "include/dependants/t1.h", "file_kind": "header", "id": "2295271780650013565", + "is_system": false, "name": "t1.h", "type": "file" } @@ -108,6 +221,7 @@ diagrams: "display_name": "include/dependencies/t3.h", "file_kind": "header", "id": "1226843223635488673", + "is_system": false, "name": "t3.h", "type": "file" }, @@ -115,6 +229,7 @@ diagrams: "display_name": "include/dependencies/t2.h", "file_kind": "header", "id": "1849348825646635129", + "is_system": false, "name": "t2.h", "type": "file" }, @@ -122,6 +237,7 @@ diagrams: "display_name": "include/dependencies/t1.h", "file_kind": "header", "id": "1120257488305564427", + "is_system": false, "name": "t1.h", "type": "file" }, @@ -129,6 +245,7 @@ diagrams: "display_name": "include/dependencies/t5.h", "file_kind": "header", "id": "2106129159239499468", + "is_system": false, "name": "t5.h", "type": "file" } diff --git a/docs/test_cases/t40003_include.svg b/docs/test_cases/t40003_include.svg index 46d652d7..61cd20a5 100644 --- a/docs/test_cases/t40003_include.svg +++ b/docs/test_cases/t40003_include.svg @@ -1,6 +1,6 @@ - + @@ -9,62 +9,62 @@ - + src - + dependants - + dependencies - + include - + dependants - + dependencies - - + + t1.cc - - + + t2.cc - - + + t3.h - - + + t2.h - + t1.h - - + + t3.h - - + + t2.h - + t1.h - - + + t5.h diff --git a/docs/test_cases/t40003_include_mermaid.svg b/docs/test_cases/t40003_include_mermaid.svg index 99dc8713..980dacbf 100644 --- a/docs/test_cases/t40003_include_mermaid.svg +++ b/docs/test_cases/t40003_include_mermaid.svg @@ -167,7 +167,7 @@ - + @@ -180,7 +180,7 @@ - + @@ -193,7 +193,7 @@ - + @@ -206,7 +206,7 @@ - + @@ -219,7 +219,7 @@ - + @@ -232,7 +232,7 @@ - + @@ -245,7 +245,7 @@ - + @@ -258,7 +258,7 @@ - + @@ -271,7 +271,7 @@ - + diff --git a/docs/test_cases/t90000.md b/docs/test_cases/t90000.md index bb678889..a91ef19f 100644 --- a/docs/test_cases/t90000.md +++ b/docs/test_cases/t90000.md @@ -34,7 +34,7 @@ diagrams: ``` ## Source code -File t90000.cc +File `tests/t90000/t90000.cc` ```cpp ``` @@ -48,6 +48,7 @@ File t90000.cc "diagram_type": "class", "elements": [], "name": "t90000_class", + "package_type": "namespace", "relationships": [] } ``` diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index e052d584..015fba87 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -27,7 +27,7 @@ target_compile_options(clang-umllib PRIVATE $<$,$>: -Werror -Wall -Wextra -Wno-unused-parameter -Wno-deprecated-declarations ${CUSTOM_COMPILE_OPTIONS}> - $<$:/MP /W1 /bigobj /wd4291 /wd4624 /wd4244>) + $<$:/MP /MD /W1 /bigobj /wd4291 /wd4624 /wd4244>) target_compile_definitions(clang-umllib PRIVATE $<$: -DLLVM_FORCE_USE_OLD_TOOLCHAIN @@ -44,7 +44,7 @@ target_compile_options(clang-uml PRIVATE $<$,$>: -Werror -Wall -Wextra -Wno-unused-parameter -Wno-deprecated-declarations ${CUSTOM_COMPILE_OPTIONS}> - $<$:/MP /W1 /bigobj /wd4291 /wd4624 /wd4244>) + $<$:/MP /MD /W1 /bigobj /wd4291 /wd4624 /wd4244>) target_compile_definitions(clang-uml PRIVATE ${ENABLE_BACKWARD_CPP}) target_link_libraries(clang-uml diff --git a/src/class_diagram/generators/json/class_diagram_generator.cc b/src/class_diagram/generators/json/class_diagram_generator.cc index 53a89c9b..3fe3b00b 100644 --- a/src/class_diagram/generators/json/class_diagram_generator.cc +++ b/src/class_diagram/generators/json/class_diagram_generator.cc @@ -1,7 +1,7 @@ /** * @file rc/class_diagram/generators/json/class_diagram_generator.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,6 +23,14 @@ namespace clanguml::class_diagram::model { using nlohmann::json; +void set_module(nlohmann::json &j, const common::model::element &e) +{ + if (e.module()) { + j["module"]["name"] = e.module().value(); + j["module"]["is_private"] = e.module_private(); + } +} + void to_json(nlohmann::json &j, const class_element &c) { j["name"] = c.name(); @@ -63,6 +71,7 @@ void to_json(nlohmann::json &j, const class_method &c) j["is_noexcept"] = c.is_noexcept(); j["is_constexpr"] = c.is_constexpr(); j["is_consteval"] = c.is_consteval(); + j["is_coroutine"] = c.is_coroutine(); j["is_constructor"] = c.is_constructor(); j["is_move_assignment"] = c.is_move_assignment(); j["is_copy_assignment"] = c.is_copy_assignment(); @@ -93,6 +102,8 @@ void to_json(nlohmann::json &j, const class_ &c) j["methods"] = c.methods(); j["bases"] = c.parents(); + set_module(j, c); + j["template_parameters"] = c.template_params(); } @@ -101,6 +112,8 @@ void to_json(nlohmann::json &j, const enum_ &c) j = dynamic_cast(c); j["is_nested"] = c.is_nested(); j["constants"] = c.constants(); + + set_module(j, c); } void to_json(nlohmann::json &j, const concept_ &c) @@ -108,6 +121,8 @@ void to_json(nlohmann::json &j, const concept_ &c) j = dynamic_cast(c); j["parameters"] = c.requires_parameters(); j["statements"] = c.requires_statements(); + + set_module(j, c); } } // namespace clanguml::class_diagram::model @@ -124,6 +139,11 @@ void generator::generate_diagram(nlohmann::json &parent) const if (config().using_namespace) parent["using_namespace"] = config().using_namespace().to_string(); + if (config().using_module) + parent["using_module"] = config().using_module(); + + if (config().generate_packages.has_value) + parent["package_type"] = to_string(config().package_type()); parent["elements"] = std::vector{}; parent["relationships"] = std::vector{}; @@ -169,13 +189,9 @@ void generator::generate(const package &p, nlohmann::json &parent) const if (!uns.starts_with({p.full_name(false)})) { LOG_DBG("Generating package {}", p.name()); - if (config().package_type() == config::package_type_t::kDirectory) - package_object["type"] = "directory"; - else - package_object["type"] = "namespace"; - + package_object["type"] = to_string(config().package_type()); package_object["name"] = p.name(); - package_object["display_name"] = p.full_name(false); + package_object["display_name"] = p.name(); } } diff --git a/src/class_diagram/generators/json/class_diagram_generator.h b/src/class_diagram/generators/json/class_diagram_generator.h index b1d31d16..d90ba73f 100644 --- a/src/class_diagram/generators/json/class_diagram_generator.h +++ b/src/class_diagram/generators/json/class_diagram_generator.h @@ -1,7 +1,7 @@ /** * @file src/class_diagram/generators/json/class_diagram_generator.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/class_diagram/generators/mermaid/class_diagram_generator.cc b/src/class_diagram/generators/mermaid/class_diagram_generator.cc index 0b115042..eea063ef 100644 --- a/src/class_diagram/generators/mermaid/class_diagram_generator.cc +++ b/src/class_diagram/generators/mermaid/class_diagram_generator.cc @@ -1,7 +1,7 @@ /** * @file src/class_diagram/generators/mermaid/class_diagram_generator.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -251,6 +251,9 @@ void generator::generate_method( if (m.is_consteval()) { method_mods.emplace_back("consteval"); } + if (m.is_coroutine()) { + method_mods.emplace_back("coroutine"); + } if (!method_mods.empty()) { ostr << fmt::format("[{}] ", fmt::join(method_mods, ",")); diff --git a/src/class_diagram/generators/mermaid/class_diagram_generator.h b/src/class_diagram/generators/mermaid/class_diagram_generator.h index 0ec125af..dbde7848 100644 --- a/src/class_diagram/generators/mermaid/class_diagram_generator.h +++ b/src/class_diagram/generators/mermaid/class_diagram_generator.h @@ -1,7 +1,7 @@ /** * @file src/class_diagram/generators/mermaid/class_diagram_generator.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/class_diagram/generators/plantuml/class_diagram_generator.cc b/src/class_diagram/generators/plantuml/class_diagram_generator.cc index afd43db8..451eb552 100644 --- a/src/class_diagram/generators/plantuml/class_diagram_generator.cc +++ b/src/class_diagram/generators/plantuml/class_diagram_generator.cc @@ -1,7 +1,7 @@ /** * @file src/class_diagram/generators/plantuml/class_diagram_generator.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -67,7 +67,7 @@ void generator::generate_alias(const class_ &c, std::ostream &ostr) const class_type = "abstract"; std::string full_name; - if (config().generate_packages()) + if (config().generate_fully_qualified_name()) full_name = c.full_name_no_ns(); else full_name = c.full_name(); @@ -89,7 +89,7 @@ void generator::generate_alias(const enum_ &e, std::ostream &ostr) const { print_debug(e, ostr); - if (config().generate_packages()) + if (config().generate_fully_qualified_name()) ostr << "enum" << " \"" << e.name(); else @@ -106,7 +106,7 @@ void generator::generate_alias(const concept_ &c, std::ostream &ostr) const { print_debug(c, ostr); - if (config().generate_packages()) + if (config().generate_fully_qualified_name()) ostr << "class" << " \"" << c.name(); else @@ -338,6 +338,9 @@ void generator::generate_method( else if (m.is_deleted()) ostr << " = deleted"; + if (m.is_coroutine()) + ostr << " [coroutine]"; + ostr << " : " << type; if (config().generate_links) { diff --git a/src/class_diagram/generators/plantuml/class_diagram_generator.h b/src/class_diagram/generators/plantuml/class_diagram_generator.h index 7e303dc2..0d19eb2e 100644 --- a/src/class_diagram/generators/plantuml/class_diagram_generator.h +++ b/src/class_diagram/generators/plantuml/class_diagram_generator.h @@ -1,7 +1,7 @@ /** * @file src/class_diagram/generators/plantuml/class_diagram_generator.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/class_diagram/model/class.cc b/src/class_diagram/model/class.cc index 90d1025a..8105ee19 100644 --- a/src/class_diagram/model/class.cc +++ b/src/class_diagram/model/class.cc @@ -1,7 +1,7 @@ /** * @file src/class_diagram/model/class.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/class_diagram/model/class.h b/src/class_diagram/model/class.h index dc2aa02e..c3484d43 100644 --- a/src/class_diagram/model/class.h +++ b/src/class_diagram/model/class.h @@ -1,7 +1,7 @@ /** * @file src/class_diagram/model/class.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/class_diagram/model/class_element.cc b/src/class_diagram/model/class_element.cc index 3bdd1527..3a638589 100644 --- a/src/class_diagram/model/class_element.cc +++ b/src/class_diagram/model/class_element.cc @@ -1,7 +1,7 @@ /** * @file src/class_diagram/model/class_element.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/class_diagram/model/class_element.h b/src/class_diagram/model/class_element.h index ec7c50eb..1bc4fa82 100644 --- a/src/class_diagram/model/class_element.h +++ b/src/class_diagram/model/class_element.h @@ -1,7 +1,7 @@ /** * @file src/class_diagram/model/class_element.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/class_diagram/model/class_member.cc b/src/class_diagram/model/class_member.cc index e857e527..8d240cfb 100644 --- a/src/class_diagram/model/class_member.cc +++ b/src/class_diagram/model/class_member.cc @@ -1,7 +1,7 @@ /** * @file src/class_diagram/model/class_member.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/class_diagram/model/class_member.h b/src/class_diagram/model/class_member.h index f68fdeb0..c6184b6d 100644 --- a/src/class_diagram/model/class_member.h +++ b/src/class_diagram/model/class_member.h @@ -1,7 +1,7 @@ /** * @file src/class_diagram/model/class_member.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/class_diagram/model/class_method.cc b/src/class_diagram/model/class_method.cc index d44ab43e..9d2052ea 100644 --- a/src/class_diagram/model/class_method.cc +++ b/src/class_diagram/model/class_method.cc @@ -1,7 +1,7 @@ /** * @file src/class_diagram/model/class_method.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -70,6 +70,13 @@ void class_method::is_consteval(bool is_consteval) is_consteval_ = is_consteval; } +bool class_method::is_coroutine() const { return is_coroutine_; } + +void class_method::is_coroutine(bool is_coroutine) +{ + is_coroutine_ = is_coroutine; +} + bool class_method::is_noexcept() const { return is_noexcept_; } void class_method::is_noexcept(bool is_noexcept) { is_noexcept_ = is_noexcept; } diff --git a/src/class_diagram/model/class_method.h b/src/class_diagram/model/class_method.h index 8f89f5ae..4cf4344b 100644 --- a/src/class_diagram/model/class_method.h +++ b/src/class_diagram/model/class_method.h @@ -1,7 +1,7 @@ /** * @file src/class_diagram/model/class_method.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -152,6 +152,20 @@ public: */ void is_consteval(bool is_consteval); + /** + * @brief Whether the method is a C++20 coroutine. + * + * @return True, if the method is a coroutine + */ + bool is_coroutine() const; + + /** + * @brief Set whether the method is a C++20 coroutine. + * + * @param is_coroutine True, if the method is a coroutine + */ + void is_coroutine(bool is_coroutine); + /** * @brief Whether the method is noexcept. * @@ -262,6 +276,7 @@ private: bool is_noexcept_{false}; bool is_constexpr_{false}; bool is_consteval_{false}; + bool is_coroutine_{false}; bool is_constructor_{false}; bool is_destructor_{false}; bool is_move_assignment_{false}; diff --git a/src/class_diagram/model/class_parent.cc b/src/class_diagram/model/class_parent.cc index f12e84fe..35588082 100644 --- a/src/class_diagram/model/class_parent.cc +++ b/src/class_diagram/model/class_parent.cc @@ -1,7 +1,7 @@ /** * @file src/class_diagram/model/class_parent.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/class_diagram/model/class_parent.h b/src/class_diagram/model/class_parent.h index cf64fb07..1e0521fe 100644 --- a/src/class_diagram/model/class_parent.h +++ b/src/class_diagram/model/class_parent.h @@ -1,7 +1,7 @@ /** * @file src/class_diagram/model/class_parent.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/class_diagram/model/concept.cc b/src/class_diagram/model/concept.cc index a0d4e38b..9bd3702e 100644 --- a/src/class_diagram/model/concept.cc +++ b/src/class_diagram/model/concept.cc @@ -1,7 +1,7 @@ /** * @file src/class_diagram/model/concept.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/class_diagram/model/concept.h b/src/class_diagram/model/concept.h index cde00db7..f40b1c1b 100644 --- a/src/class_diagram/model/concept.h +++ b/src/class_diagram/model/concept.h @@ -1,7 +1,7 @@ /** * @file src/class_diagram/model/concept.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/class_diagram/model/diagram.cc b/src/class_diagram/model/diagram.cc index 64c53dc6..50aa49c6 100644 --- a/src/class_diagram/model/diagram.cc +++ b/src/class_diagram/model/diagram.cc @@ -1,7 +1,7 @@ /** * @file src/class_diagram/model/diagram.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -74,7 +74,7 @@ common::optional_ref diagram::get( } common::optional_ref diagram::get( - const clanguml::common::model::diagram_element::id_t id) const + const clanguml::common::id_t id) const { common::optional_ref res; @@ -116,6 +116,18 @@ bool diagram::add_with_filesystem_path( return add_element(ns, std::move(p)); } +template <> +bool diagram::add_with_module_path( + const common::model::path & /*parent_path*/, + std::unique_ptr &&p) +{ + LOG_DBG("Adding module package: {}, {}", p->name(), p->full_name(true)); + + auto ns = p->get_relative_namespace(); + + return add_element(ns, std::move(p)); +} + void diagram::get_parents( clanguml::common::reference_set &parents) const { @@ -137,8 +149,7 @@ void diagram::get_parents( } } -bool diagram::has_element( - clanguml::common::model::diagram_element::id_t id) const +bool diagram::has_element(clanguml::common::id_t id) const { const auto has_class = std::any_of(classes().begin(), classes().end(), [id](const auto &c) { return c.get().id() == id; }); @@ -156,8 +167,7 @@ bool diagram::has_element( [id](const auto &c) { return c.get().id() == id; }); } -std::string diagram::to_alias( - clanguml::common::model::diagram_element::id_t id) const +std::string diagram::to_alias(clanguml::common::id_t id) const { LOG_DBG("Looking for alias for {}", id); diff --git a/src/class_diagram/model/diagram.h b/src/class_diagram/model/diagram.h index 546bb717..835035a4 100644 --- a/src/class_diagram/model/diagram.h +++ b/src/class_diagram/model/diagram.h @@ -1,7 +1,7 @@ /** * @file src/class_diagram/model/diagram.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -103,7 +103,7 @@ public: * @param id Element id. * @return Optional reference to a diagram element. */ - opt_ref get(diagram_element::id_t id) const override; + opt_ref get(common::id_t id) const override; /** * @brief Get list of references to classes in the diagram model. @@ -172,8 +172,7 @@ public: * @param id Id of the element * @return Optional reference to a diagram element */ - template - opt_ref find(diagram_element::id_t id) const; + template opt_ref find(common::id_t id) const; /** * @brief Get reference to vector of elements of specific type @@ -203,6 +202,10 @@ public: return add_with_namespace_path(std::move(e)); } + if (parent_path.type() == common::model::path_type::kModule) { + return add_with_module_path(parent_path, std::move(e)); + } + return add_with_filesystem_path(parent_path, std::move(e)); } @@ -215,7 +218,7 @@ public: * @param id Id of the diagram element. * @return PlantUML alias. */ - std::string to_alias(diagram_element::id_t id) const; + std::string to_alias(common::id_t id) const; /** * @brief Given an initial set of classes, add all their parents to the @@ -224,8 +227,6 @@ public: */ void get_parents(clanguml::common::reference_set &parents) const; - friend void print_diagram_tree(const diagram &d, int level); - /** * @brief Check if diagram contains element by id. * @@ -234,7 +235,7 @@ public: * @param id Id of the element. * @return True, if diagram contains an element with a specific id. */ - bool has_element(diagram_element::id_t id) const override; + bool has_element(common::id_t id) const override; /** * @brief Remove redundant dependency relationships @@ -252,6 +253,10 @@ private: template bool add_with_namespace_path(std::unique_ptr &&e); + template + bool add_with_module_path( + const common::model::path &parent_path, std::unique_ptr &&e); + template bool add_with_filesystem_path( const common::model::path &parent_path, std::unique_ptr &&e); @@ -317,19 +322,53 @@ bool diagram::add_with_namespace_path(std::unique_ptr &&e) return false; } +template +bool diagram::add_with_module_path( + const common::model::path &parent_path, std::unique_ptr &&e) +{ + const auto element_type = e->type_name(); + + // Make sure all parent modules are already packages in the + // model + for (auto it = parent_path.begin(); it != parent_path.end(); it++) { + auto pkg = std::make_unique( + e->using_namespace(), parent_path.type()); + pkg->set_name(*it); + auto ns = + common::model::path(parent_path.begin(), it, parent_path.type()); + // ns.pop_back(); + pkg->set_namespace(ns); + pkg->set_id(common::to_id(pkg->full_name(false))); + + add(ns, std::move(pkg)); + } + + const auto base_name = e->name(); + const auto full_name = e->full_name(false); + auto &e_ref = *e; + + if (add_element(parent_path, std::move(e))) { + element_view::add(std::ref(e_ref)); + return true; + } + + return false; +} + template bool diagram::add_with_filesystem_path( const common::model::path &parent_path, std::unique_ptr &&e) { const auto element_type = e->type_name(); - // Make sure all parent directories are already packages in the + // Make sure all parent modules are already packages in the // model for (auto it = parent_path.begin(); it != parent_path.end(); it++) { - auto pkg = - std::make_unique(e->using_namespace()); + auto pkg = std::make_unique( + e->using_namespace(), parent_path.type()); pkg->set_name(*it); - auto ns = common::model::path(parent_path.begin(), it); + auto ns = + common::model::path(parent_path.begin(), it, parent_path.type()); // ns.pop_back(); pkg->set_namespace(ns); pkg->set_id(common::to_id(pkg->full_name(false))); @@ -381,7 +420,7 @@ std::vector> diagram::find( } template -opt_ref diagram::find(diagram_element::id_t id) const +opt_ref diagram::find(common::id_t id) const { for (const auto &element : element_view::view()) { if (element.get().id() == id) { @@ -405,6 +444,11 @@ template <> bool diagram::add_with_namespace_path( std::unique_ptr &&p); +template <> +bool diagram::add_with_module_path( + const common::model::path &parent_path, + std::unique_ptr &&p); + template <> bool diagram::add_with_filesystem_path( const common::model::path &parent_path, diff --git a/src/class_diagram/model/enum.cc b/src/class_diagram/model/enum.cc index 878719b6..cff1d99c 100644 --- a/src/class_diagram/model/enum.cc +++ b/src/class_diagram/model/enum.cc @@ -1,7 +1,7 @@ /** * @file src/class_diagram/model/enum.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/class_diagram/model/enum.h b/src/class_diagram/model/enum.h index e69d1e2d..9d0f1bec 100644 --- a/src/class_diagram/model/enum.h +++ b/src/class_diagram/model/enum.h @@ -1,7 +1,7 @@ /** * @file src/class_diagram/model/enum.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/class_diagram/model/method_parameter.cc b/src/class_diagram/model/method_parameter.cc index 13451a5c..aae00c96 100644 --- a/src/class_diagram/model/method_parameter.cc +++ b/src/class_diagram/model/method_parameter.cc @@ -1,7 +1,7 @@ /** * @file src/class_diagram/model/method_parameter.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/class_diagram/model/method_parameter.h b/src/class_diagram/model/method_parameter.h index f6db2529..253a3f8d 100644 --- a/src/class_diagram/model/method_parameter.h +++ b/src/class_diagram/model/method_parameter.h @@ -1,7 +1,7 @@ /** * @file src/class_diagram/model/method_parameter.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/class_diagram/visitor/template_builder.cc b/src/class_diagram/visitor/template_builder.cc index 02de4b8c..ae73733f 100644 --- a/src/class_diagram/visitor/template_builder.cc +++ b/src/class_diagram/visitor/template_builder.cc @@ -1,7 +1,7 @@ /** * @file src/class_diagram/visitor/template_builder.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -216,7 +216,7 @@ std::unique_ptr template_builder::build(const clang::NamedDecl *cls, std::string best_match_full_name{}; auto full_template_name = template_instantiation.full_name(false); int best_match{}; - common::model::diagram_element::id_t best_match_id{0}; + common::id_t best_match_id{0}; for (const auto templ : diagram().classes()) { if (templ.get() == template_instantiation) @@ -318,7 +318,7 @@ template_builder::build_from_class_template_specialization( std::string best_match_full_name{}; auto full_template_name = template_instantiation.full_name(false); int best_match{}; - common::model::diagram_element::id_t best_match_id{0}; + common::id_t best_match_id{0}; for (const auto templ : diagram().classes()) { if (templ.get() == template_instantiation) diff --git a/src/class_diagram/visitor/template_builder.h b/src/class_diagram/visitor/template_builder.h index 0ea8612b..1a2b58ff 100644 --- a/src/class_diagram/visitor/template_builder.h +++ b/src/class_diagram/visitor/template_builder.h @@ -1,7 +1,7 @@ /** * @file src/class_diagram/visitor/template_builder.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -30,9 +30,8 @@ using common::model::namespace_; using common::model::relationship_t; using common::model::template_parameter; -using found_relationships_t = - std::vector>; +using found_relationships_t = std::vector< + std::pair>; class translation_unit_visitor; diff --git a/src/class_diagram/visitor/translation_unit_visitor.cc b/src/class_diagram/visitor/translation_unit_visitor.cc index 2b30b4d5..cac07180 100644 --- a/src/class_diagram/visitor/translation_unit_visitor.cc +++ b/src/class_diagram/visitor/translation_unit_visitor.cc @@ -1,7 +1,7 @@ /** * @file src/class_diagram/visitor/translation_unit_visitor.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -116,7 +116,7 @@ bool translation_unit_visitor::VisitEnumDecl(clang::EnumDecl *enm) const auto *parent = enm->getParent(); - std::optional id_opt; + std::optional id_opt; if (parent != nullptr) { const auto *parent_record_decl = @@ -159,6 +159,7 @@ bool translation_unit_visitor::VisitEnumDecl(clang::EnumDecl *enm) process_comment(*enm, e); set_source_location(*enm, e); + set_owning_module(*enm, e); if (e.skip()) return true; @@ -212,7 +213,7 @@ bool translation_unit_visitor::VisitClassTemplateSpecializationDecl( } if (!template_specialization.template_specialization_found()) { - // Only do this if we haven't found a bettern specialization during + // Only do this if we haven't found a better specialization during // construction of the template specialization const auto maybe_id = id_mapper().get_global_id(cls->getSpecializedTemplate()->getID()); @@ -265,6 +266,7 @@ bool translation_unit_visitor::VisitTypeAliasTemplateDecl( LOG_DBG("Adding class {} with id {}", name, id); set_source_location(*cls, *template_specialization_ptr); + set_owning_module(*cls, *template_specialization_ptr); add_class(std::move(template_specialization_ptr)); } @@ -677,6 +679,9 @@ bool translation_unit_visitor::VisitCXXRecordDecl(clang::CXXRecordDecl *cls) LOG_DBG( "== getQualifiedNameAsString() = {}", cls->getQualifiedNameAsString()); + if (cls->getOwningModule() != nullptr) + LOG_DBG( + "== getOwningModule()->Name = {}", cls->getOwningModule()->Name); LOG_DBG("== getID() = {}", cls->getID()); LOG_DBG("== isTemplateDecl() = {}", cls->isTemplateDecl()); LOG_DBG("== isTemplated() = {}", cls->isTemplated()); @@ -762,6 +767,7 @@ translation_unit_visitor::create_concept_declaration(clang::ConceptDecl *cpt) process_comment(*cpt, concept_model); set_source_location(*cpt, concept_model); + set_owning_module(*cpt, concept_model); if (concept_model.skip()) return {}; @@ -802,6 +808,7 @@ std::unique_ptr translation_unit_visitor::create_record_declaration( process_comment(*rec, record); set_source_location(*rec, record); + set_owning_module(*rec, record); const auto record_full_name = record_ptr->full_name(false); @@ -841,6 +848,7 @@ std::unique_ptr translation_unit_visitor::create_class_declaration( process_comment(*cls, c); set_source_location(*cls, c); + set_owning_module(*cls, c); if (c.skip()) return {}; @@ -855,7 +863,7 @@ void translation_unit_visitor::process_record_parent( { const auto *parent = cls->getParent(); - std::optional id_opt; + std::optional id_opt; auto parent_ns = ns; if (parent != nullptr) { @@ -1369,6 +1377,7 @@ void translation_unit_visitor::process_method_properties( method.is_move_assignment(mf.isMoveAssignmentOperator()); method.is_copy_assignment(mf.isCopyAssignmentOperator()); method.is_noexcept(isNoexceptExceptionSpec(mf.getExceptionSpecType())); + method.is_coroutine(common::is_coroutine(mf)); } void translation_unit_visitor:: @@ -1834,6 +1843,7 @@ translation_unit_visitor::process_template_specialization( process_comment(*cls, template_instantiation); set_source_location(*cls, template_instantiation); + set_owning_module(*cls, template_instantiation); if (template_instantiation.skip()) return {}; @@ -2140,6 +2150,15 @@ void translation_unit_visitor::add_class(std::unique_ptr &&c) diagram().add(p, std::move(c)); } + else if ((config().generate_packages() && + config().package_type() == config::package_type_t::kModule)) { + + const auto module_path = config().make_module_relative(c->module()); + + common::model::path p{module_path, common::model::path_type::kModule}; + + diagram().add(p, std::move(c)); + } else { diagram().add(c->path(), std::move(c)); } @@ -2159,6 +2178,15 @@ void translation_unit_visitor::add_enum(std::unique_ptr &&e) diagram().add(p, std::move(e)); } + else if ((config().generate_packages() && + config().package_type() == config::package_type_t::kModule)) { + + const auto module_path = config().make_module_relative(e->module()); + + common::model::path p{module_path, common::model::path_type::kModule}; + + diagram().add(p, std::move(e)); + } else { diagram().add(e->path(), std::move(e)); } @@ -2178,6 +2206,15 @@ void translation_unit_visitor::add_concept(std::unique_ptr &&c) diagram().add(p, std::move(c)); } + else if ((config().generate_packages() && + config().package_type() == config::package_type_t::kModule)) { + + const auto module_path = config().make_module_relative(c->module()); + + common::model::path p{module_path, common::model::path_type::kModule}; + + diagram().add(p, std::move(c)); + } else { diagram().add(c->path(), std::move(c)); } diff --git a/src/class_diagram/visitor/translation_unit_visitor.h b/src/class_diagram/visitor/translation_unit_visitor.h index addbe3ed..30e7ea65 100644 --- a/src/class_diagram/visitor/translation_unit_visitor.h +++ b/src/class_diagram/visitor/translation_unit_visitor.h @@ -1,7 +1,7 @@ /** * @file src/class_diagram/visitor/translation_unit_visitor.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -477,7 +477,7 @@ private: template_builder template_builder_; - std::map> forward_declarations_; diff --git a/src/cli/cli_handler.cc b/src/cli/cli_handler.cc index 7d65df61..7bc94d21 100644 --- a/src/cli/cli_handler.cc +++ b/src/cli/cli_handler.cc @@ -1,7 +1,7 @@ /** * @file src/options/cli_handler.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -384,14 +384,13 @@ runtime_config cli_handler::get_runtime_config() const cli_flow_t cli_handler::print_version() { - ostr_ << "clang-uml " << clanguml::version::CLANG_UML_VERSION << std::endl; - ostr_ << "Copyright (C) 2021-2023 Bartek Kryza " - << std::endl; - ostr_ << util::get_os_name() << std::endl; + ostr_ << "clang-uml " << clanguml::version::CLANG_UML_VERSION << '\n'; + ostr_ << "Copyright (C) 2021-2024 Bartek Kryza " << '\n'; + ostr_ << util::get_os_name() << '\n'; ostr_ << "Built against LLVM/Clang libraries version: " - << LLVM_VERSION_STRING << std::endl; + << LLVM_VERSION_STRING << '\n'; ostr_ << "Using LLVM/Clang libraries version: " - << clang::getClangFullVersion() << std::endl; + << clang::getClangFullVersion() << '\n'; return cli_flow_t::kExit; } diff --git a/src/cli/cli_handler.h b/src/cli/cli_handler.h index 879c13cb..2aec25a7 100644 --- a/src/cli/cli_handler.h +++ b/src/cli/cli_handler.h @@ -1,7 +1,7 @@ /** * @file src/options/cli_handler.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/common/clang_utils.cc b/src/common/clang_utils.cc index 4f8491ab..83c726b3 100644 --- a/src/common/clang_utils.cc +++ b/src/common/clang_utils.cc @@ -1,7 +1,7 @@ /** * @file src/common/clang_utils.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -887,4 +887,10 @@ clang::RawComment *get_expression_raw_comment(const clang::SourceManager &sm, return {}; } +bool is_coroutine(const clang::FunctionDecl &decl) +{ + const auto *body = decl.getBody(); + return clang::isa_and_nonnull(body); +} + } // namespace clanguml::common diff --git a/src/common/clang_utils.h b/src/common/clang_utils.h index 3dddeeb4..2f1ef2ab 100644 --- a/src/common/clang_utils.h +++ b/src/common/clang_utils.h @@ -1,7 +1,7 @@ /** * @file src/common/clang_utils.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -295,4 +295,12 @@ consume_type_context(clang::QualType type); clang::RawComment *get_expression_raw_comment(const clang::SourceManager &sm, const clang::ASTContext &context, const clang::Stmt *stmt); +/** + * Check if function or method declaration is a C++20 coroutine. + * + * @param decl Function declaration + * @return True, if the function is a C++20 coroutine. + */ +bool is_coroutine(const clang::FunctionDecl &decl); + } // namespace clanguml::common diff --git a/src/common/compilation_database.cc b/src/common/compilation_database.cc index 0e24819e..dc9fe9ec 100644 --- a/src/common/compilation_database.cc +++ b/src/common/compilation_database.cc @@ -1,7 +1,7 @@ /** * @file src/common/compilation_database.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/common/compilation_database.h b/src/common/compilation_database.h index 58b8c670..e1532b87 100644 --- a/src/common/compilation_database.h +++ b/src/common/compilation_database.h @@ -1,7 +1,7 @@ /** * @file src/common/compilation_database.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/common/generators/generator.h b/src/common/generators/generator.h index 116d2770..27b548e1 100644 --- a/src/common/generators/generator.h +++ b/src/common/generators/generator.h @@ -1,7 +1,7 @@ /** * @file src/common/generators/generator.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/common/generators/generators.cc b/src/common/generators/generators.cc index 657a3c98..2a3f1e5b 100644 --- a/src/common/generators/generators.cc +++ b/src/common/generators/generators.cc @@ -1,7 +1,7 @@ /** * @file src/common/generators/generators.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -127,7 +127,7 @@ void generate_diagram_impl(const std::string &name, auto from_values = model->list_from_values(); for (const auto &from : from_values) { - std::cout << from << std::endl; + std::cout << from << '\n'; } return; @@ -136,7 +136,7 @@ void generate_diagram_impl(const std::string &name, auto to_values = model->list_to_values(); for (const auto &to : to_values) { - std::cout << "|" << to << "|" << std::endl; + std::cout << "|" << to << "|" << '\n'; } return; diff --git a/src/common/generators/generators.h b/src/common/generators/generators.h index 79c694c7..d39dd83d 100644 --- a/src/common/generators/generators.h +++ b/src/common/generators/generators.h @@ -1,7 +1,7 @@ /** * @file src/common/generators/generators.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/common/generators/json/generator.cc b/src/common/generators/json/generator.cc index 9bc7de79..e1fa27c5 100644 --- a/src/common/generators/json/generator.cc +++ b/src/common/generators/json/generator.cc @@ -1,7 +1,7 @@ /** * @file src/common/generators/json/generator.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -42,7 +42,7 @@ void to_json(nlohmann::json &j, const element &c) j = json{{"id", std::to_string(c.id())}, {"name", detail::render_name(c.name())}, {"namespace", c.get_namespace().to_string()}, {"type", c.type_name()}, - {"display_name", detail::render_name(c.full_name(false))}}; + {"display_name", detail::render_name(c.full_name(true))}}; if (const auto &comment = c.comment(); comment) j["comment"] = comment.value(); diff --git a/src/common/generators/json/generator.h b/src/common/generators/json/generator.h index ca81e4aa..d76037a0 100644 --- a/src/common/generators/json/generator.h +++ b/src/common/generators/json/generator.h @@ -1,7 +1,7 @@ /** * @file src/common/generators/json/generator.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -35,13 +35,13 @@ namespace clanguml::common::model { using nlohmann::json; -void to_json(nlohmann::json &j, const source_location &sl); +void to_json(json &j, const source_location &sl); -void to_json(nlohmann::json &j, const element &c); +void to_json(json &j, const element &c); -void to_json(nlohmann::json &j, const template_parameter &c); +void to_json(json &j, const template_parameter &c); -void to_json(nlohmann::json &j, const relationship &c); +void to_json(json &j, const relationship &c); } // namespace clanguml::common::model namespace clanguml::common::generators::json { diff --git a/src/common/generators/mermaid/generator.cc b/src/common/generators/mermaid/generator.cc index 355995d4..d9b3a9c0 100644 --- a/src/common/generators/mermaid/generator.cc +++ b/src/common/generators/mermaid/generator.cc @@ -1,7 +1,7 @@ /** * @file src/common/generators/mermaid/generator.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/common/generators/mermaid/generator.h b/src/common/generators/mermaid/generator.h index 0ef19f3b..93bedffc 100644 --- a/src/common/generators/mermaid/generator.h +++ b/src/common/generators/mermaid/generator.h @@ -1,7 +1,7 @@ /** * @file src/common/generators/mermaid/generator.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/common/generators/nested_element_stack.h b/src/common/generators/nested_element_stack.h index bb6679ea..58717530 100644 --- a/src/common/generators/nested_element_stack.h +++ b/src/common/generators/nested_element_stack.h @@ -1,7 +1,7 @@ /** * @file src/common/generators/nested_element_stack.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/common/generators/plantuml/generator.cc b/src/common/generators/plantuml/generator.cc index 2291dafc..c05932d9 100644 --- a/src/common/generators/plantuml/generator.cc +++ b/src/common/generators/plantuml/generator.cc @@ -1,7 +1,7 @@ /** * @file src/common/generators/plantuml/generator.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/common/generators/plantuml/generator.h b/src/common/generators/plantuml/generator.h index dbc560ac..4a2446ee 100644 --- a/src/common/generators/plantuml/generator.h +++ b/src/common/generators/plantuml/generator.h @@ -1,7 +1,7 @@ /** * @file src/common/generators/plantuml/generator.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/common/generators/progress_indicator.cc b/src/common/generators/progress_indicator.cc index 6dbf48f9..5db13a71 100644 --- a/src/common/generators/progress_indicator.cc +++ b/src/common/generators/progress_indicator.cc @@ -1,7 +1,7 @@ /** * @file src/common/generators/progress_indicator.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/common/generators/progress_indicator.h b/src/common/generators/progress_indicator.h index 6bfc655d..0c5a7279 100644 --- a/src/common/generators/progress_indicator.h +++ b/src/common/generators/progress_indicator.h @@ -1,7 +1,7 @@ /** * @file src/common/generators/progress_indicator.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/common/model/decorated_element.cc b/src/common/model/decorated_element.cc index 39951b90..fae18bc7 100644 --- a/src/common/model/decorated_element.cc +++ b/src/common/model/decorated_element.cc @@ -1,7 +1,7 @@ /** * @file src/common/model/decorated_element.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/common/model/decorated_element.h b/src/common/model/decorated_element.h index 57409872..94805be3 100644 --- a/src/common/model/decorated_element.h +++ b/src/common/model/decorated_element.h @@ -1,7 +1,7 @@ /** * @file src/common/model/decorated_element.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/common/model/diagram.cc b/src/common/model/diagram.cc index 22f8e290..b551792d 100644 --- a/src/common/model/diagram.cc +++ b/src/common/model/diagram.cc @@ -1,7 +1,7 @@ /** * @file src/common/model/diagram.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/common/model/diagram.h b/src/common/model/diagram.h index 61b10bde..28f40f47 100644 --- a/src/common/model/diagram.h +++ b/src/common/model/diagram.h @@ -1,7 +1,7 @@ /** * @file src/common/model/diagram.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -65,7 +65,7 @@ public: * @return Optional reference to a diagram element. */ virtual common::optional_ref get( - diagram_element::id_t id) const = 0; + common::id_t id) const = 0; /** * Return optional reference to a diagram_element by name and namespace. @@ -152,10 +152,7 @@ public: // Disallow std::string overload bool should_include(const std::string &s) const = delete; - virtual bool has_element(const diagram_element::id_t /*id*/) const - { - return false; - } + virtual bool has_element(const common::id_t /*id*/) const { return false; } virtual bool should_include( const namespace_ &ns, const std::string &name) const; diff --git a/src/common/model/diagram_element.cc b/src/common/model/diagram_element.cc index 429dc2f2..8e307fc0 100644 --- a/src/common/model/diagram_element.cc +++ b/src/common/model/diagram_element.cc @@ -1,7 +1,7 @@ /** * @file src/common/model/diagram_element.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,16 +26,16 @@ namespace clanguml::common::model { diagram_element::diagram_element() = default; -diagram_element::id_t diagram_element::id() const { return id_; } +common::id_t diagram_element::id() const { return id_; } -void diagram_element::set_id(diagram_element::id_t id) { id_ = id; } +void diagram_element::set_id(common::id_t id) { id_ = id; } std::optional diagram_element::parent_element_id() const { return parent_element_id_; } -void diagram_element::set_parent_element_id(diagram_element::id_t id) +void diagram_element::set_parent_element_id(common::id_t id) { parent_element_id_ = id; } diff --git a/src/common/model/diagram_element.h b/src/common/model/diagram_element.h index 179b6f0d..8aa6264a 100644 --- a/src/common/model/diagram_element.h +++ b/src/common/model/diagram_element.h @@ -1,7 +1,7 @@ /** * src/common/model/diagram_element.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -39,8 +39,6 @@ namespace clanguml::common::model { */ class diagram_element : public decorated_element, public source_location { public: - using id_t = int64_t; - diagram_element(); ~diagram_element() override = default; @@ -55,14 +53,14 @@ public: * * @return Elements id. */ - id_t id() const; + common::id_t id() const; /** * Set elements id. * * @param id Elements id. */ - void set_id(id_t id); + void set_id(common::id_t id); /** * Get elements parent package id. @@ -76,7 +74,7 @@ public: * * @param id Id of parent package. */ - void set_parent_element_id(diagram_element::id_t id); + void set_parent_element_id(id_t id); /** * @brief Return elements' diagram alias. diff --git a/src/common/model/diagram_filter.cc b/src/common/model/diagram_filter.cc index da91b003..a784ed56 100644 --- a/src/common/model/diagram_filter.cc +++ b/src/common/model/diagram_filter.cc @@ -1,7 +1,7 @@ /** * @file src/common/model/diagram_filter.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -285,6 +285,47 @@ tvl::value_t namespace_filter::match(const diagram &d, const element &e) const return result; } +modules_filter::modules_filter( + filter_t type, std::vector modules) + : filter_visitor{type} + , modules_{std::move(modules)} +{ +} + +tvl::value_t modules_filter::match( + const diagram & /*d*/, const element &e) const +{ + if (modules_.empty()) + return {}; + + if (!e.module().has_value()) + return {false}; + + auto module_toks = + path::split(e.module().value(), path_type::kModule); // NOLINT + + if (dynamic_cast(&e) != nullptr && + e.get_namespace().type() == path_type::kModule) { + module_toks.push_back(e.name()); + } + + auto result = tvl::any_of(modules_.begin(), modules_.end(), + [&e, &module_toks](const auto &modit) { + if (std::holds_alternative(modit.value())) { + const auto &modit_str = std::get(modit.value()); + const auto modit_toks = + path::split(modit_str, path_type::kModule); + + return e.module() == modit_str || + util::starts_with(module_toks, modit_toks); + } + + return std::get(modit.value()) %= e.module().value(); + }); + + return result; +} + element_filter::element_filter( filter_t type, std::vector elements) : filter_visitor{type} @@ -534,6 +575,31 @@ tvl::value_t access_filter::match( [&a](const auto &access) { return a == access; }); } +module_access_filter::module_access_filter( + filter_t type, std::vector access) + : filter_visitor{type} + , access_{std::move(access)} +{ +} + +tvl::value_t module_access_filter::match( + const diagram & /*d*/, const element &e) const +{ + if (!e.module().has_value()) + return {}; + + if (access_.empty()) + return {}; + + return tvl::any_of( + access_.begin(), access_.end(), [&e](const auto &access) { + if (access == module_access_t::kPublic) + return !e.module_private(); + + return e.module_private(); + }); +} + context_filter::context_filter( filter_t type, std::vector context) : filter_visitor{type} @@ -887,6 +953,12 @@ void diagram_filter::init_filters(const config::diagram &c) add_inclusive_filter(std::make_unique( filter_t::kInclusive, c.include().namespaces)); + add_inclusive_filter(std::make_unique( + filter_t::kInclusive, c.include().modules)); + + add_inclusive_filter(std::make_unique( + filter_t::kInclusive, c.include().module_access)); + add_inclusive_filter(std::make_unique( filter_t::kInclusive, c.include().relationships)); @@ -997,6 +1069,12 @@ void diagram_filter::init_filters(const config::diagram &c) add_exclusive_filter(std::make_unique( filter_t::kExclusive, c.exclude().namespaces)); + add_exclusive_filter(std::make_unique( + filter_t::kExclusive, c.exclude().modules)); + + add_exclusive_filter(std::make_unique( + filter_t::kExclusive, c.exclude().module_access)); + add_exclusive_filter(std::make_unique( filter_t::kExclusive, c.root_directory(), c.exclude().paths)); diff --git a/src/common/model/diagram_filter.h b/src/common/model/diagram_filter.h index ea51d01b..81cd25b6 100644 --- a/src/common/model/diagram_filter.h +++ b/src/common/model/diagram_filter.h @@ -1,7 +1,7 @@ /** * @file src/common/model/diagram_filter.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -154,6 +154,21 @@ private: std::vector namespaces_; }; +/** + * Match diagram elements to a set of specified modules or + * module regex patterns. + */ +struct modules_filter : public filter_visitor { + modules_filter(filter_t type, std::vector modules); + + ~modules_filter() override = default; + + tvl::value_t match(const diagram &d, const element &e) const override; + +private: + std::vector modules_; +}; + /** * Match element's name to a set of names or regex patterns. */ @@ -442,6 +457,20 @@ private: std::vector access_; }; +/** + * Match diagram elements based on module access (public or private). + */ +struct module_access_filter : public filter_visitor { + module_access_filter(filter_t type, std::vector access); + + ~module_access_filter() override = default; + + tvl::value_t match(const diagram &d, const element &a) const override; + +private: + std::vector access_; +}; + /** * Match diagram elements which are in within a 'radius' distance relationship * to any of the elements specified in context. diff --git a/src/common/model/element.cc b/src/common/model/element.cc index 038e75bb..224ed420 100644 --- a/src/common/model/element.cc +++ b/src/common/model/element.cc @@ -1,7 +1,7 @@ /** * @file src/common/model/element.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,8 +25,9 @@ namespace clanguml::common::model { -element::element(namespace_ using_namespace) - : using_namespace_{std::move(using_namespace)} +element::element(namespace_ using_namespace, path_type pt) + : ns_{pt} + , using_namespace_{std::move(using_namespace)} { } diff --git a/src/common/model/element.h b/src/common/model/element.h index 21626a35..34f1915c 100644 --- a/src/common/model/element.h +++ b/src/common/model/element.h @@ -1,7 +1,7 @@ /** * @file src/common/model/element.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -37,7 +37,7 @@ namespace clanguml::common::model { */ class element : public diagram_element { public: - element(namespace_ using_namespace); + element(namespace_ using_namespace, path_type pt = path_type::kNamespace); ~element() override = default; @@ -87,13 +87,47 @@ public: */ const namespace_ &path() const { return ns_; } + /** + * Set elements owning module. + * + * @param module C++20 module. + */ + void set_module(const std::string &module) { module_ = module; } + + /** + * Return elements owning module, if any. + * + * @return C++20 module. + */ + std::optional module() const { return module_; } + + /** + * Set whether the element is in a private module + * + * @param module C++20 module. + */ + void set_module_private(const bool module_private) + { + module_private_ = module_private; + } + + /** + * Check whether the element is in a private module. + * + * @return C++20 module. + */ + bool module_private() const { return module_private_; } + /** * Return elements full name. * * @return Fully qualified elements name. */ - std::string full_name(bool /*relative*/) const override + std::string full_name(bool relative) const override { + if (relative) + return name(); + return name_and_ns(); } @@ -120,5 +154,7 @@ public: private: namespace_ ns_; namespace_ using_namespace_; + std::optional module_; + bool module_private_{false}; }; } // namespace clanguml::common::model diff --git a/src/common/model/element_view.h b/src/common/model/element_view.h index 8d34f0a4..b7a25c79 100644 --- a/src/common/model/element_view.h +++ b/src/common/model/element_view.h @@ -1,7 +1,7 @@ /** * @file src/common/model/element_view.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -58,8 +58,7 @@ public: * * @return */ - common::optional_ref get( - clanguml::common::model::diagram_element::id_t id) const + common::optional_ref get(clanguml::common::id_t id) const { for (const auto &e : elements_) { if (e.get().id() == id) { diff --git a/src/common/model/enums.cc b/src/common/model/enums.cc index 84e352d0..98e170a6 100644 --- a/src/common/model/enums.cc +++ b/src/common/model/enums.cc @@ -1,7 +1,7 @@ /** * @file src/common/model/enums.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -70,6 +70,19 @@ std::string to_string(access_t a) } } +std::string to_string(module_access_t a) +{ + switch (a) { + case module_access_t::kPublic: + return "public"; + case module_access_t::kPrivate: + return "private"; + default: + assert(false); + return ""; + } +} + std::string to_string(message_t r) { switch (r) { diff --git a/src/common/model/enums.h b/src/common/model/enums.h index e0810c1d..835b8222 100644 --- a/src/common/model/enums.h +++ b/src/common/model/enums.h @@ -1,7 +1,7 @@ /** * @file src/common/model/enums.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,6 +23,7 @@ namespace clanguml::common::model { enum class diagram_t { kClass, kSequence, kPackage, kInclude }; +enum class module_access_t { kPublic, kPrivate }; enum class access_t { kPublic, kProtected, kPrivate, kNone }; enum class relationship_t { @@ -77,6 +78,8 @@ std::string to_string(relationship_t r); std::string to_string(access_t r); +std::string to_string(module_access_t r); + std::string to_string(message_t m); std::string to_string(diagram_t r); diff --git a/src/common/model/namespace.cc b/src/common/model/namespace.cc index dd9edf5c..ae89bc81 100644 --- a/src/common/model/namespace.cc +++ b/src/common/model/namespace.cc @@ -1,7 +1,7 @@ /** * @file src/common/model/namespace.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/common/model/namespace.h b/src/common/model/namespace.h index ae691d6d..32726553 100644 --- a/src/common/model/namespace.h +++ b/src/common/model/namespace.h @@ -1,7 +1,7 @@ /** * @file src/common/model/namespace.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/common/model/nested_trait.h b/src/common/model/nested_trait.h index a7050da3..195cc02d 100644 --- a/src/common/model/nested_trait.h +++ b/src/common/model/nested_trait.h @@ -1,7 +1,7 @@ /** * @file src/common/model/nested_trait.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/common/model/package.cc b/src/common/model/package.cc index 74035dd7..244f2882 100644 --- a/src/common/model/package.cc +++ b/src/common/model/package.cc @@ -1,7 +1,7 @@ /** * @file src/common/model/package.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,8 +21,8 @@ #include namespace clanguml::common::model { -package::package(const common::model::namespace_ &using_namespace) - : element{using_namespace} +package::package(const common::model::namespace_ &using_namespace, path_type pt) + : element{using_namespace, pt} { } diff --git a/src/common/model/package.h b/src/common/model/package.h index 425d6a87..353b5cf1 100644 --- a/src/common/model/package.h +++ b/src/common/model/package.h @@ -1,7 +1,7 @@ /** * @file src/common/model/package.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -41,7 +41,8 @@ class package : public element, public stylable_element, public nested_trait { public: - package(const common::model::path &using_namespace); + package(const common::model::path &using_namespace, + path_type pt = path_type::kNamespace); package(const package &) = delete; package(package &&) = default; diff --git a/src/common/model/path.cc b/src/common/model/path.cc new file mode 100644 index 00000000..e294c4ea --- /dev/null +++ b/src/common/model/path.cc @@ -0,0 +1,38 @@ +/** + * @file src/common/model/path.cc + * + * Copyright (c) 2021-2024 Bartek Kryza + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "path.h" + +namespace clanguml::common::model { + +std::string to_string(const path_type pt) +{ + switch (pt) { + case path_type::kModule: + return "module"; + case path_type::kNamespace: + return "namespace"; + case path_type::kFilesystem: + return "directory"; + default: + assert(false); + return ""; + } +} + +} // namespace clanguml::common::model \ No newline at end of file diff --git a/src/common/model/path.h b/src/common/model/path.h index d9bd4bc8..b81e04a2 100644 --- a/src/common/model/path.h +++ b/src/common/model/path.h @@ -1,7 +1,7 @@ /** * @file src/common/model/path.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -32,10 +32,13 @@ namespace clanguml::common::model { * a nested set of namespaces or nested set of directories. */ enum class path_type { - kNamespace, /*!< Namespace path */ - kFilesystem /*!< Filesystem path */ + kNamespace, /*!< Namespace path */ + kFilesystem, /*!< Filesystem path */ + kModule /*!< Module path */ }; +std::string to_string(path_type pt); + /** * @brief Diagram path * @@ -49,11 +52,13 @@ class path { * * @return Path separator */ - const char *separator() const + static const char *separator(path_type pt) { - switch (path_type_) { + switch (pt) { case path_type::kNamespace: return "::"; + case path_type::kModule: + return "."; case path_type::kFilesystem: #ifdef _WIN32 return "\\"; @@ -65,9 +70,38 @@ class path { return "::"; } + /** + * Returns the path separator based on the type of the instance path. + * + * @return Path separator + */ + const char *separator() const { return separator(path_type_); } + public: using container_type = std::vector; + static container_type split( + const std::string &ns, path_type pt = path_type::kNamespace) + { + container_type result; + if (pt == path_type::kModule) { + auto path_toks = util::split(ns, separator(pt)); + for (const auto &pt : path_toks) { + const auto subtoks = util::split(pt, ":"); + if (subtoks.size() == 2) { + result.push_back(subtoks.at(0)); + result.push_back(fmt::format(":{}", subtoks.at(1))); + } + else + result.push_back(subtoks.at(0)); + } + } + else + result = util::split(ns, separator(pt)); + + return result; + } + path(path_type pt = path_type::kNamespace) : path_type_{pt} { @@ -79,7 +113,7 @@ public: if (ns.empty()) return; - path_ = util::split(ns, separator()); + path_ = split(ns, pt); } virtual ~path() = default; @@ -103,7 +137,8 @@ public: return *this; if (path_type_ != right.path_type_) - throw std::runtime_error(""); + throw std::runtime_error( + "Cannot assign a path to a path with another path type."); path_type_ = right.path_type_; path_ = right.path_; @@ -160,7 +195,14 @@ public: */ std::string to_string() const { - return fmt::format("{}", fmt::join(path_, std::string{separator()})); + auto result = + fmt::format("{}", fmt::join(path_, std::string{separator()})); + + if (path_type_ == path_type::kModule) { + util::replace_all(result, ".:", ":"); + } + + return result; } /** @@ -186,6 +228,7 @@ public: path operator|(const path &right) const { path res{*this}; + res.path_type_ = right.path_type_; res.append(right); return res; } @@ -383,6 +426,8 @@ public: */ path_type type() const { return path_type_; } + const container_type &tokens() const { return path_; } + private: path_type path_type_; container_type path_; diff --git a/src/common/model/relationship.cc b/src/common/model/relationship.cc index 05a2800b..00800c5d 100644 --- a/src/common/model/relationship.cc +++ b/src/common/model/relationship.cc @@ -1,7 +1,7 @@ /** * @file src/common/model/relationship.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/common/model/relationship.h b/src/common/model/relationship.h index 61516487..db282908 100644 --- a/src/common/model/relationship.h +++ b/src/common/model/relationship.h @@ -1,7 +1,7 @@ /** * @file src/common/model/relationship.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/common/model/source_file.cc b/src/common/model/source_file.cc index 3a9b4d1e..292dd7e0 100644 --- a/src/common/model/source_file.cc +++ b/src/common/model/source_file.cc @@ -1,7 +1,7 @@ /** * @file src/common/model/source_file.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/common/model/source_file.h b/src/common/model/source_file.h index 6b8920c8..24cf26d5 100644 --- a/src/common/model/source_file.h +++ b/src/common/model/source_file.h @@ -1,7 +1,7 @@ /** * @file src/common/model/source_file.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -117,6 +117,20 @@ public: */ source_file_t type() const { return type_; } + /** + * Set whether the file is a system header + * + * @param is_system Whether the file is a system header + */ + void set_system_header(bool is_system) { is_system_header_ = is_system; } + + /** + * Is the file a system header? + * + * @return True, if the source file is a system header + */ + bool is_system_header() const { return is_system_header_; } + /** * Get the source file's parent path. * @@ -185,6 +199,7 @@ private: filesystem_path path_{path_type::kFilesystem}; source_file_t type_{source_file_t::kDirectory}; bool is_absolute_{false}; + bool is_system_header_{false}; }; } // namespace clanguml::common::model diff --git a/src/common/model/source_location.cc b/src/common/model/source_location.cc index 89358a08..56b8fd37 100644 --- a/src/common/model/source_location.cc +++ b/src/common/model/source_location.cc @@ -1,7 +1,7 @@ /** * @file src/common/model/source_location.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/common/model/source_location.h b/src/common/model/source_location.h index 2dc98af4..25f2ba29 100644 --- a/src/common/model/source_location.h +++ b/src/common/model/source_location.h @@ -1,7 +1,7 @@ /** * @file src/common/model/source_location.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/common/model/stylable_element.cc b/src/common/model/stylable_element.cc index d9da4c39..ea61d0ba 100644 --- a/src/common/model/stylable_element.cc +++ b/src/common/model/stylable_element.cc @@ -1,7 +1,7 @@ /** * @file src/common/model/stylable_element.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/common/model/stylable_element.h b/src/common/model/stylable_element.h index 2a1c429d..201da800 100644 --- a/src/common/model/stylable_element.h +++ b/src/common/model/stylable_element.h @@ -1,7 +1,7 @@ /** * @file src/common/model/stylable_element.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/common/model/template_parameter.cc b/src/common/model/template_parameter.cc index 90fdaa75..b31270d9 100644 --- a/src/common/model/template_parameter.cc +++ b/src/common/model/template_parameter.cc @@ -1,7 +1,7 @@ /** * @file src/common/model/template_parameter.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/common/model/template_parameter.h b/src/common/model/template_parameter.h index 6334188a..c9d0aecc 100644 --- a/src/common/model/template_parameter.h +++ b/src/common/model/template_parameter.h @@ -1,7 +1,7 @@ /** * @file src/common/model/template_parameter.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/common/model/template_trait.cc b/src/common/model/template_trait.cc index 139d804a..d80830b0 100644 --- a/src/common/model/template_trait.cc +++ b/src/common/model/template_trait.cc @@ -1,7 +1,7 @@ /** * @file src/common/model/template_trait.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/common/model/template_trait.h b/src/common/model/template_trait.h index 24309302..535d3a7f 100644 --- a/src/common/model/template_trait.h +++ b/src/common/model/template_trait.h @@ -1,7 +1,7 @@ /** * @file src/common/model/template_trait.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/common/model/tvl.h b/src/common/model/tvl.h index 9c9bc5e5..b24d51e6 100644 --- a/src/common/model/tvl.h +++ b/src/common/model/tvl.h @@ -1,7 +1,7 @@ /** * @file src/common/model/tvl.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/common/types.cc b/src/common/types.cc index 97719ffe..2fe79d12 100644 --- a/src/common/types.cc +++ b/src/common/types.cc @@ -1,7 +1,7 @@ /** * @file src/common/types.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/common/types.h b/src/common/types.h index 0239824b..7da7ea74 100644 --- a/src/common/types.h +++ b/src/common/types.h @@ -1,7 +1,7 @@ /** * @file src/common/types.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/common/visitor/ast_id_mapper.cc b/src/common/visitor/ast_id_mapper.cc index ba985306..b9d22787 100644 --- a/src/common/visitor/ast_id_mapper.cc +++ b/src/common/visitor/ast_id_mapper.cc @@ -1,7 +1,7 @@ /** * @file src/common/visitor/ast_id_mapper.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/common/visitor/ast_id_mapper.h b/src/common/visitor/ast_id_mapper.h index 033c064a..87a7ef42 100644 --- a/src/common/visitor/ast_id_mapper.h +++ b/src/common/visitor/ast_id_mapper.h @@ -1,7 +1,7 @@ /** * @file src/common/visitor/ast_id_mapper.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -40,7 +40,7 @@ namespace clanguml::common::visitor { */ class ast_id_mapper { public: - using id_t = common::model::diagram_element::id_t; + using id_t = common::id_t; ast_id_mapper() = default; diff --git a/src/common/visitor/comment/clang_visitor.cc b/src/common/visitor/comment/clang_visitor.cc index cff24773..1c80b09e 100644 --- a/src/common/visitor/comment/clang_visitor.cc +++ b/src/common/visitor/comment/clang_visitor.cc @@ -1,7 +1,7 @@ /** * @file src/common/visitor/comment/clang_visitor.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/common/visitor/comment/clang_visitor.h b/src/common/visitor/comment/clang_visitor.h index 6424802f..d2a0c402 100644 --- a/src/common/visitor/comment/clang_visitor.h +++ b/src/common/visitor/comment/clang_visitor.h @@ -1,7 +1,7 @@ /** * @file src/common/visitor/comment/clang_visitor.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/common/visitor/comment/comment_visitor.cc b/src/common/visitor/comment/comment_visitor.cc index 3db2f023..129367dc 100644 --- a/src/common/visitor/comment/comment_visitor.cc +++ b/src/common/visitor/comment/comment_visitor.cc @@ -1,7 +1,7 @@ /** * @file src/common/visitor/comment/comment_visitor.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/common/visitor/comment/comment_visitor.h b/src/common/visitor/comment/comment_visitor.h index 9f331db8..f2a9e51c 100644 --- a/src/common/visitor/comment/comment_visitor.h +++ b/src/common/visitor/comment/comment_visitor.h @@ -1,7 +1,7 @@ /** * @file src/common/visitor/comment/comment_visitor.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/common/visitor/comment/plain_visitor.cc b/src/common/visitor/comment/plain_visitor.cc index 834951ad..b348e22f 100644 --- a/src/common/visitor/comment/plain_visitor.cc +++ b/src/common/visitor/comment/plain_visitor.cc @@ -1,7 +1,7 @@ /** * @file src/common/visitor/comment/plain_visitor.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/common/visitor/comment/plain_visitor.h b/src/common/visitor/comment/plain_visitor.h index 54b2c0a5..1cb90c85 100644 --- a/src/common/visitor/comment/plain_visitor.h +++ b/src/common/visitor/comment/plain_visitor.h @@ -1,7 +1,7 @@ /** * @file src/common/visitor/comment/plain_visitor.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/common/visitor/translation_unit_visitor.cc b/src/common/visitor/translation_unit_visitor.cc index 451959ac..4ac9973b 100644 --- a/src/common/visitor/translation_unit_visitor.cc +++ b/src/common/visitor/translation_unit_visitor.cc @@ -1,7 +1,7 @@ /** * @file src/common/visitor/translation_unit_visitor.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,6 +20,10 @@ #include "comment/clang_visitor.h" #include "comment/plain_visitor.h" +#include "common/clang_utils.h" + +#include +#include namespace clanguml::common::visitor { @@ -161,4 +165,25 @@ void translation_unit_visitor::set_source_location( element.set_location_id(location.getHashValue()); } +void translation_unit_visitor::set_owning_module( + const clang::Decl &decl, clanguml::common::model::element &element) +{ + if (const clang::Module *module = decl.getOwningModule(); + module != nullptr) { + std::string module_name = module->Name; + bool is_private{false}; +#if LLVM_VERSION_MAJOR < 15 + is_private = + module->Kind == clang::Module::ModuleKind::PrivateModuleFragment; +#else + is_private = module->isPrivateModule(); +#endif + if (is_private) { + // Clang just maps private modules names to "" + module_name = module->getTopLevelModule()->Name; + } + element.set_module(module_name); + element.set_module_private(is_private); + } +} } // namespace clanguml::common::visitor \ No newline at end of file diff --git a/src/common/visitor/translation_unit_visitor.h b/src/common/visitor/translation_unit_visitor.h index 22139863..6dfbc762 100644 --- a/src/common/visitor/translation_unit_visitor.h +++ b/src/common/visitor/translation_unit_visitor.h @@ -1,7 +1,7 @@ /** * @file src/common/visitor/translation_unit_visitor.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,9 +18,12 @@ #pragma once #include "comment/comment_visitor.h" +#include "common/model/element.h" +#include "common/model/source_location.h" #include "config/config.h" #include +#include #include #include @@ -31,9 +34,8 @@ namespace clanguml::common::visitor { -using found_relationships_t = - std::vector>; +using found_relationships_t = std::vector< + std::pair>; /** * @brief Diagram translation unit visitor base class @@ -100,6 +102,9 @@ public: void set_source_location(const clang::SourceLocation &location, clanguml::common::model::source_location &element); + void set_owning_module( + const clang::Decl &decl, clanguml::common::model::element &element); + protected: /** * @brief Process comment directives in comment attached to a declaration diff --git a/src/config/config.cc b/src/config/config.cc index ecfd9722..829c1361 100644 --- a/src/config/config.cc +++ b/src/config/config.cc @@ -1,7 +1,7 @@ /** * @file src/config/config.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -147,6 +147,8 @@ std::string to_string(package_type_t pt) return "namespace"; case package_type_t::kDirectory: return "directory"; + case package_type_t::kModule: + return "module"; default: assert(false); return ""; @@ -187,6 +189,7 @@ void inheritable_diagram_options::inherit( { glob.override(parent.glob); using_namespace.override(parent.using_namespace); + using_module.override(parent.using_module); include_relations_also_as_members.override( parent.include_relations_also_as_members); include.override(parent.include); @@ -214,6 +217,7 @@ void inheritable_diagram_options::inherit( parent.generate_condition_statements); debug_mode.override(parent.debug_mode); generate_metadata.override(parent.generate_metadata); + type_aliases.override(parent.type_aliases); } std::string inheritable_diagram_options::simplify_template_type( @@ -229,6 +233,12 @@ std::string inheritable_diagram_options::simplify_template_type( return full_name; } +bool inheritable_diagram_options::generate_fully_qualified_name() const +{ + return generate_packages() && + (package_type() == package_type_t::kNamespace); +} + std::vector diagram::get_translation_units() const { std::vector translation_units{}; @@ -264,6 +274,29 @@ std::filesystem::path diagram::make_path_relative( return relative(p, root_directory()).lexically_normal().string(); } +std::vector diagram::make_module_relative( + const std::optional &maybe_module) const +{ + if (!maybe_module) + return {}; + + auto module_path = common::model::path( + maybe_module.value(), common::model::path_type::kModule) + .tokens(); + + if (using_module.has_value) { + auto using_module_path = common::model::path( + using_module(), common::model::path_type::kModule) + .tokens(); + + if (util::starts_with(module_path, using_module_path)) { + util::remove_prefix(module_path, using_module_path); + } + } + + return module_path; +} + std::optional diagram::get_together_group( const std::string &full_name) const { diff --git a/src/config/config.h b/src/config/config.h index 5c219910..32944fdd 100644 --- a/src/config/config.h +++ b/src/config/config.h @@ -1,7 +1,7 @@ /** * @file src/config/config.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,7 +17,6 @@ */ #pragma once -#include "class_diagram/model/diagram.h" #include "common/model/enums.h" #include "common/types.h" #include "option.h" @@ -87,7 +86,8 @@ std::string to_string(callee_type mt); /*! How packages in diagrams should be generated */ enum class package_type_t { kNamespace, /*!< From namespaces */ - kDirectory /*!< From directories */ + kDirectory, /*!< From directories */ + kModule /*!< From modules */ }; std::string to_string(package_type_t mt); @@ -180,6 +180,35 @@ struct filter { */ std::vector namespaces; + /*! @brief Modules filter + * + * Example: + * + * ```yaml + * include + * modules: + * - app.module1 + * - r: ".*internal.*" + * ``` + */ + std::vector modules; + + /*! @brief Access type filter + * + * This filter allows to filter class members methods based on their access: + * - public + * - private + * + * Example: + * + * ```yaml + * include: + * module_access: + * - public + * ``` + */ + std::vector module_access; + /*! @brief Elements filter * * Example: @@ -231,8 +260,8 @@ struct filter { * * ```yaml * include: - * relationships: - * - inheritance + * access: + * - public * ``` */ std::vector access; @@ -456,6 +485,18 @@ struct inheritable_diagram_options { std::string simplify_template_type(std::string full_name) const; + /** + * @brief Whether the diagram element should be fully qualified in diagram + * + * This method determines whether an elements' name should include + * fully qualified namespace name (however relative to using_namespace), or + * whether it should just contain it's name. This depends on whether the + * diagram has packages and if they are based on namespaces or sth else. + * + * @return True, if element should include it's namespace + */ + bool generate_fully_qualified_name() const; + /** * @brief Get reference to `relative_to` diagram config option * @@ -470,6 +511,7 @@ struct inheritable_diagram_options { option> glob{"glob"}; option using_namespace{"using_namespace"}; + option using_module{"using_module"}; option include_relations_also_as_members{ "include_relations_also_as_members", true}; option include{"include"}; @@ -496,7 +538,8 @@ struct inheritable_diagram_options { option base_directory{"__parent_path"}; option generate_system_headers{"generate_system_headers", false}; option relationship_hints{"relationship_hints"}; - option type_aliases{"type_aliases"}; + option type_aliases{ + "type_aliases", option_inherit_mode::kAppend}; option comment_parser{ "comment_parser", comment_parser_t::plain}; option combine_free_functions_into_file_participants{ @@ -553,6 +596,15 @@ struct diagram : public inheritable_diagram_options { std::filesystem::path make_path_relative( const std::filesystem::path &p) const; + /** + * @brief Make module path relative to `using_module` configuration option + * + * @param p Input path + * @return Relative path + */ + std::vector make_module_relative( + const std::optional &maybe_module) const; + /** * @brief Returns absolute path of the `relative_to` option * diff --git a/src/config/diagram_templates.cc b/src/config/diagram_templates.cc index 9bde28e9..92d0c1f0 100644 --- a/src/config/diagram_templates.cc +++ b/src/config/diagram_templates.cc @@ -1,7 +1,7 @@ /** * @file src/config/diagram_templates.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/config/diagram_templates.h b/src/config/diagram_templates.h index 3721337b..c7b228a2 100644 --- a/src/config/diagram_templates.h +++ b/src/config/diagram_templates.h @@ -1,7 +1,7 @@ /** * @file src/config/diagram_templates.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/config/option.h b/src/config/option.h index ba8ff331..8e6e9076 100644 --- a/src/config/option.h +++ b/src/config/option.h @@ -1,7 +1,7 @@ /** * @file src/config/option.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,14 +17,28 @@ */ #pragma once +#include #include #include +#include namespace clanguml { namespace config { template void append_value(T &l, const T &r) { l = r; } +template +void append_value(std::vector &l, const std::vector &r) +{ + l.insert(std::end(l), r.begin(), r.end()); +} + +template +void append_value(std::map &l, const std::map &r) +{ + l.insert(r.begin(), r.end()); +} + /** * Possible option inheritance methods from top level to diagram level. */ @@ -102,9 +116,7 @@ template struct option { has_value = true; } else if (!is_declared && o.is_declared) { - value = o.value; - is_declared = true; - has_value = true; + set(o.value); } } diff --git a/src/config/schema.h b/src/config/schema.h index 238ce590..b1e05ad7 100644 --- a/src/config/schema.h +++ b/src/config/schema.h @@ -1,7 +1,7 @@ /** * @file src/config/schema.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -58,16 +58,13 @@ types: package_type_t: !variant - namespace - directory + - module member_order_t: !variant - lexical - as_is regex_t: r: string regex_or_string_t: [string, regex_t] - namespaces_filter_t: - namespaces: [regex_or_string_t] - elements_filter_t: - elements: [regex_or_string_t] element_types_filter_t: !variant - class - enum @@ -94,6 +91,9 @@ types: - public - protected - private + module_access_filter_t: !variant + - public + - private method_type_filter_t: !variant - constructor - destructor @@ -121,10 +121,12 @@ types: - context_filter_match_t filter_t: namespaces: !optional [regex_or_string_t] + modules: !optional [regex_or_string_t] elements: !optional [regex_or_string_t] element_types: !optional [element_types_filter_t] relationships: !optional [relationship_filter_t] access: !optional [access_filter_t] + module_access: !optional [module_access_filter_t] subclasses: !optional [regex_or_string_t] parents: !optional [regex_or_string_t] specializations: !optional [regex_or_string_t] @@ -164,6 +166,7 @@ types: cmd: !optional string relative_to: !optional string using_namespace: !optional [string, [string]] + using_module: !optional string generate_metadata: !optional bool title: !optional string # @@ -202,6 +205,7 @@ types: after: !optional [string] cmd: !optional string relative_to: !optional string + type_aliases: !optional map_t using_namespace: !optional [string, [string]] generate_metadata: !optional bool title: !optional string @@ -242,6 +246,7 @@ types: cmd: !optional string relative_to: !optional string using_namespace: !optional [string, [string]] + using_module: !optional string generate_metadata: !optional bool title: !optional string # @@ -321,6 +326,7 @@ root: cmd: !optional string relative_to: !optional string using_namespace: !optional [string, [string]] + using_module: !optional string generate_metadata: !optional bool # # Inheritable custom options @@ -337,6 +343,7 @@ root: package_type: !optional package_type_t generate_template_argument_dependencies: !optional bool skip_redundant_dependencies: !optional bool + type_aliases: !optional map_t )"; } // namespace clanguml::config \ No newline at end of file diff --git a/src/config/yaml_decoders.cc b/src/config/yaml_decoders.cc index 999a3d83..691a7c17 100644 --- a/src/config/yaml_decoders.cc +++ b/src/config/yaml_decoders.cc @@ -1,7 +1,7 @@ /** * @file src/config/yaml_decoders.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -29,6 +29,7 @@ namespace YAML { using clanguml::common::namespace_or_regex; using clanguml::common::string_or_regex; using clanguml::common::model::access_t; +using clanguml::common::model::module_access_t; using clanguml::common::model::relationship_t; using clanguml::config::callee_type; using clanguml::config::class_diagram; @@ -133,6 +134,8 @@ void get_option( option.set(package_type_t::kNamespace); else if (val == "directory") option.set(package_type_t::kDirectory); + else if (val == "module") + option.set(package_type_t::kModule); else throw std::runtime_error( "Invalid generate_method_arguments value: " + val); @@ -239,6 +242,23 @@ template <> struct convert { } }; +// +// config module_access_t decoder +// +template <> struct convert { + static bool decode(const Node &node, module_access_t &rhs) + { + if (node.as() == "public") + rhs = module_access_t::kPublic; + else if (node.as() == "private") + rhs = module_access_t::kPrivate; + else + return false; + + return true; + } +}; + // // config method_type decoder // @@ -475,6 +495,16 @@ template <> struct convert { rhs.namespaces.push_back({ns}); } + if (node["modules"]) { + auto module_list = node["modules"].as(); + for (const auto &ns : module_list) + rhs.modules.push_back({ns}); + } + + if (node["module_access"]) + rhs.module_access = + node["module_access"].as(); + if (node["relationships"]) rhs.relationships = node["relationships"].as(); @@ -567,6 +597,7 @@ template bool decode_diagram(const Node &node, T &rhs) // Decode options common for all diagrams get_option(node, rhs.glob); get_option(node, rhs.using_namespace); + get_option(node, rhs.using_module); get_option(node, rhs.include); get_option(node, rhs.exclude); get_option(node, rhs.puml); @@ -632,6 +663,7 @@ template <> struct convert { get_option(node, rhs.generate_method_arguments); get_option(node, rhs.generate_message_comments); get_option(node, rhs.message_comment_width); + get_option(node, rhs.type_aliases); get_option(node, rhs.get_relative_to()); @@ -781,6 +813,7 @@ template <> struct convert { { get_option(node, rhs.glob); get_option(node, rhs.using_namespace); + get_option(node, rhs.using_module); get_option(node, rhs.output_directory); get_option(node, rhs.compilation_database_dir); get_option(node, rhs.add_compile_flags); @@ -804,6 +837,7 @@ template <> struct convert { get_option(node, rhs.generate_condition_statements); get_option(node, rhs.generate_message_comments); get_option(node, rhs.message_comment_width); + get_option(node, rhs.type_aliases); rhs.base_directory.set(node["__parent_path"].as()); get_option(node, rhs.get_relative_to()); diff --git a/src/config/yaml_emitters.cc b/src/config/yaml_emitters.cc index 200e1df4..35c92595 100644 --- a/src/config/yaml_emitters.cc +++ b/src/config/yaml_emitters.cc @@ -1,7 +1,7 @@ /** * @file src/config/yaml_emitters.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -69,6 +69,12 @@ YAML::Emitter &operator<<(YAML::Emitter &out, const access_t &a) return out; } +YAML::Emitter &operator<<(YAML::Emitter &out, const module_access_t &a) +{ + out << to_string(a); + return out; +} + YAML::Emitter &operator<<(YAML::Emitter &out, const diagram_t &d) { out << to_string(d); @@ -122,6 +128,10 @@ YAML::Emitter &operator<<(YAML::Emitter &out, const filter &f) out << YAML::BeginMap; if (!f.namespaces.empty()) out << YAML::Key << "namespaces" << YAML::Value << f.namespaces; + if (!f.modules.empty()) + out << YAML::Key << "modules" << YAML::Value << f.modules; + if (!f.module_access.empty()) + out << YAML::Key << "module_access" << YAML::Value << f.module_access; if (!f.access.empty()) out << YAML::Key << "access" << YAML::Value << f.access; if (!f.context.empty()) @@ -308,6 +318,7 @@ YAML::Emitter &operator<<( out << c.puml; out << c.relative_to; out << c.using_namespace; + out << c.using_module; out << c.generate_metadata; if (const auto *cd = dynamic_cast(&c); diff --git a/src/decorators/decorators.cc b/src/decorators/decorators.cc index 38c7a63f..0c39d214 100644 --- a/src/decorators/decorators.cc +++ b/src/decorators/decorators.cc @@ -1,7 +1,7 @@ /** * @file src/decorators/decorators.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/decorators/decorators.h b/src/decorators/decorators.h index 2425607d..b745f87a 100644 --- a/src/decorators/decorators.h +++ b/src/decorators/decorators.h @@ -1,7 +1,7 @@ /** * @file src/decorators/decorators.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/docs/architecture.cc b/src/docs/architecture.cc index f4e1b078..9b2ca0e6 100644 --- a/src/docs/architecture.cc +++ b/src/docs/architecture.cc @@ -1,7 +1,7 @@ /** * @file docs/architecture.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/docs/architecture.h b/src/docs/architecture.h index 1478477b..5a8fdfe3 100644 --- a/src/docs/architecture.h +++ b/src/docs/architecture.h @@ -1,7 +1,7 @@ /** * @file docs/architecture.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/include_diagram/generators/json/include_diagram_generator.cc b/src/include_diagram/generators/json/include_diagram_generator.cc index 56ebaa81..a1c6853b 100644 --- a/src/include_diagram/generators/json/include_diagram_generator.cc +++ b/src/include_diagram/generators/json/include_diagram_generator.cc @@ -1,7 +1,7 @@ /** * @file src/include_diagram/generators/json/include_diagram_generator.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -78,6 +78,9 @@ void generator::generate(const source_file &f, nlohmann::json &parent) const j["type"] = "file"; j["file_kind"] = to_string(f.type()); + if (f.type() == common::model::source_file_t::kHeader) { + j["is_system"] = f.is_system_header(); + } parent["elements"].push_back(std::move(j)); } diff --git a/src/include_diagram/generators/json/include_diagram_generator.h b/src/include_diagram/generators/json/include_diagram_generator.h index ad20340f..a3df9b3a 100644 --- a/src/include_diagram/generators/json/include_diagram_generator.h +++ b/src/include_diagram/generators/json/include_diagram_generator.h @@ -1,7 +1,7 @@ /** * @file src/include_diagram/generators/json/include_diagram_generator.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/include_diagram/generators/mermaid/include_diagram_generator.cc b/src/include_diagram/generators/mermaid/include_diagram_generator.cc index 48cf3472..475a7733 100644 --- a/src/include_diagram/generators/mermaid/include_diagram_generator.cc +++ b/src/include_diagram/generators/mermaid/include_diagram_generator.cc @@ -1,7 +1,7 @@ /** * @file src/include_diagram/generators/mermaid/include_diagram_generator.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/include_diagram/generators/mermaid/include_diagram_generator.h b/src/include_diagram/generators/mermaid/include_diagram_generator.h index 4efaf94e..0a530004 100644 --- a/src/include_diagram/generators/mermaid/include_diagram_generator.h +++ b/src/include_diagram/generators/mermaid/include_diagram_generator.h @@ -1,7 +1,7 @@ /** * @file src/include_diagram/generators/mermaid/include_diagram_generator.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/include_diagram/generators/plantuml/include_diagram_generator.cc b/src/include_diagram/generators/plantuml/include_diagram_generator.cc index 79cc663b..9dd04e71 100644 --- a/src/include_diagram/generators/plantuml/include_diagram_generator.cc +++ b/src/include_diagram/generators/plantuml/include_diagram_generator.cc @@ -1,7 +1,7 @@ /** * @file src/include_diagram/generators/plantuml/include_diagram_generator.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/include_diagram/generators/plantuml/include_diagram_generator.h b/src/include_diagram/generators/plantuml/include_diagram_generator.h index 4b9530d2..5ee1fd00 100644 --- a/src/include_diagram/generators/plantuml/include_diagram_generator.h +++ b/src/include_diagram/generators/plantuml/include_diagram_generator.h @@ -1,7 +1,7 @@ /** * @file src/include_diagram/generators/plantuml/include_diagram_generator.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/include_diagram/model/diagram.cc b/src/include_diagram/model/diagram.cc index d21a9f56..9e5b062f 100644 --- a/src/include_diagram/model/diagram.cc +++ b/src/include_diagram/model/diagram.cc @@ -1,7 +1,7 @@ /** * @file src/include_diagram/model/diagram.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -35,7 +35,7 @@ common::optional_ref diagram::get( } common::optional_ref diagram::get( - const common::model::diagram_element::id_t id) const + const common::id_t id) const { return find(id); } diff --git a/src/include_diagram/model/diagram.h b/src/include_diagram/model/diagram.h index 44bbc996..f9b0dabc 100644 --- a/src/include_diagram/model/diagram.h +++ b/src/include_diagram/model/diagram.h @@ -1,7 +1,7 @@ /** * @file src/include_diagram/model/diagram.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -68,7 +68,7 @@ public: * @param id Element id. * @return Optional reference to a diagram element. */ - opt_ref get(diagram_element::id_t id) const override; + opt_ref get(common::id_t id) const override; /** * @brief Add include diagram element, an include file. @@ -100,8 +100,7 @@ public: * @param id Id of the element * @return Optional reference to a diagram element */ - template - opt_ref find(diagram_element::id_t id) const; + template opt_ref find(common::id_t id) const; /** * @brief Convert element id to PlantUML alias. @@ -153,7 +152,7 @@ opt_ref diagram::find(const std::string &name) const } template -opt_ref diagram::find(diagram_element::id_t id) const +opt_ref diagram::find(common::id_t id) const { for (const auto &element : element_view::view()) { if (element.get().id() == id) { diff --git a/src/include_diagram/visitor/translation_unit_visitor.cc b/src/include_diagram/visitor/translation_unit_visitor.cc index cdc24be8..000c213b 100644 --- a/src/include_diagram/visitor/translation_unit_visitor.cc +++ b/src/include_diagram/visitor/translation_unit_visitor.cc @@ -1,7 +1,7 @@ /** * @file src/include_diagram/visitor/translation_unit_visitor.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -147,6 +147,7 @@ void translation_unit_visitor::include_visitor::process_internal_header( include_file.set_file( std::filesystem::absolute(include_path).lexically_normal().string()); include_file.set_line(0); + include_file.set_system_header(is_system); // Add relationship from the currently parsed source file to this // include file @@ -174,6 +175,7 @@ void translation_unit_visitor::include_visitor::process_external_system_header( f->set_name(include_path.string()); f->set_type(common::model::source_file_t::kHeader); f->set_id(common::to_id(include_path)); + f->set_system_header(true); const auto f_id = f->id(); diff --git a/src/include_diagram/visitor/translation_unit_visitor.h b/src/include_diagram/visitor/translation_unit_visitor.h index 68938c5e..d59f258b 100644 --- a/src/include_diagram/visitor/translation_unit_visitor.h +++ b/src/include_diagram/visitor/translation_unit_visitor.h @@ -1,7 +1,7 @@ /** * @file src/include_diagram/visitor/translation_unit_visitor.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main.cc b/src/main.cc index f8814c05..70d16bf7 100644 --- a/src/main.cc +++ b/src/main.cc @@ -1,7 +1,7 @@ /** * @file src/main.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/package_diagram/generators/json/package_diagram_generator.cc b/src/package_diagram/generators/json/package_diagram_generator.cc index 15656634..7fffd3dd 100644 --- a/src/package_diagram/generators/json/package_diagram_generator.cc +++ b/src/package_diagram/generators/json/package_diagram_generator.cc @@ -1,7 +1,7 @@ /** * @file src/package_diagram/generators/json/package_diagram_generator.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -58,38 +58,63 @@ void generator::generate_relationships( void generator::generate(const package &p, nlohmann::json &parent) const { - LOG_DBG("Generating package {}", p.name()); + LOG_DBG("Generating package {}", p.full_name(false)); - nlohmann::json j; - j["id"] = std::to_string(p.id()); - j["name"] = p.name(); - j["type"] = "namespace"; - j["display_name"] = p.full_name(false); - j["is_deprecated"] = p.is_deprecated(); - if (!p.file().empty()) - j["source_location"] = - dynamic_cast(p); - if (const auto &comment = p.comment(); comment) - j["comment"] = comment.value(); + const auto &uns = config().using_namespace(); + if (!uns.starts_with({p.full_name(false)})) { + nlohmann::json j; + j["id"] = std::to_string(p.id()); + j["name"] = p.name(); + j["type"] = to_string(config().package_type()); + j["display_name"] = p.name(); + switch (config().package_type()) { + case config::package_type_t::kNamespace: + j["namespace"] = p.get_namespace().to_string(); + break; + case config::package_type_t::kModule: + j["namespace"] = p.get_namespace().to_string(); + break; + case config::package_type_t::kDirectory: + j["path"] = p.get_namespace().to_string(); + break; + } - for (const auto &subpackage : p) { - auto &pkg = dynamic_cast(*subpackage); - if (model().should_include(pkg)) { - generate(pkg, j); + j["is_deprecated"] = p.is_deprecated(); + if (!p.file().empty()) + j["source_location"] = + dynamic_cast(p); + if (const auto &comment = p.comment(); comment) + j["comment"] = comment.value(); + + for (const auto &subpackage : p) { + auto &pkg = dynamic_cast(*subpackage); + if (model().should_include(pkg)) { + generate(pkg, j); + } + } + + parent["elements"].push_back(std::move(j)); + } + else { + for (const auto &subpackage : p) { + auto &pkg = dynamic_cast(*subpackage); + if (model().should_include(pkg)) { + generate(pkg, parent); + } } } - - parent["elements"].push_back(std::move(j)); } void generator::generate_diagram(nlohmann::json &parent) const { if (config().using_namespace) parent["using_namespace"] = config().using_namespace().to_string(); + if (config().using_module) + parent["using_module"] = config().using_module(); parent["name"] = model().name(); parent["diagram_type"] = "package"; - + parent["package_type"] = to_string(config().package_type()); parent["elements"] = std::vector{}; parent["relationships"] = std::vector{}; diff --git a/src/package_diagram/generators/json/package_diagram_generator.h b/src/package_diagram/generators/json/package_diagram_generator.h index e6a10803..a5881b61 100644 --- a/src/package_diagram/generators/json/package_diagram_generator.h +++ b/src/package_diagram/generators/json/package_diagram_generator.h @@ -1,7 +1,7 @@ /** * @file src/package_diagram/generators/json/package_diagram_generator.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/package_diagram/generators/mermaid/package_diagram_generator.cc b/src/package_diagram/generators/mermaid/package_diagram_generator.cc index de81903c..1962d8c6 100644 --- a/src/package_diagram/generators/mermaid/package_diagram_generator.cc +++ b/src/package_diagram/generators/mermaid/package_diagram_generator.cc @@ -1,7 +1,7 @@ /** * @file src/package_diagram/generators/mermaid/package_diagram_generator.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/package_diagram/generators/mermaid/package_diagram_generator.h b/src/package_diagram/generators/mermaid/package_diagram_generator.h index e17ca55c..b9659fdc 100644 --- a/src/package_diagram/generators/mermaid/package_diagram_generator.h +++ b/src/package_diagram/generators/mermaid/package_diagram_generator.h @@ -1,7 +1,7 @@ /** * @file src/package_diagram/generators/mermaid/package_diagram_generator.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/package_diagram/generators/plantuml/package_diagram_generator.cc b/src/package_diagram/generators/plantuml/package_diagram_generator.cc index b8d3c3d1..a7e90722 100644 --- a/src/package_diagram/generators/plantuml/package_diagram_generator.cc +++ b/src/package_diagram/generators/plantuml/package_diagram_generator.cc @@ -1,7 +1,7 @@ /** * @file src/package_diagram/generators/plantuml/package_diagram_generator.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/package_diagram/generators/plantuml/package_diagram_generator.h b/src/package_diagram/generators/plantuml/package_diagram_generator.h index be74d676..32774fc8 100644 --- a/src/package_diagram/generators/plantuml/package_diagram_generator.h +++ b/src/package_diagram/generators/plantuml/package_diagram_generator.h @@ -1,7 +1,7 @@ /** * @file src/package_diagram/generators/plantuml/package_diagram_generator.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/package_diagram/model/diagram.cc b/src/package_diagram/model/diagram.cc index f6e2d45c..4ba5e6f0 100644 --- a/src/package_diagram/model/diagram.cc +++ b/src/package_diagram/model/diagram.cc @@ -1,7 +1,7 @@ /** * @file src/package_diagram/model/diagram.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -41,13 +41,12 @@ common::optional_ref diagram::get( } common::optional_ref diagram::get( - const clanguml::common::model::diagram_element::id_t id) const + const clanguml::common::id_t id) const { return find(id); } -std::string diagram::to_alias( - const clanguml::common::model::diagram_element::id_t id) const +std::string diagram::to_alias(const clanguml::common::id_t id) const { LOG_DBG("Looking for alias for {}", id); diff --git a/src/package_diagram/model/diagram.h b/src/package_diagram/model/diagram.h index 459e71ea..335a5456 100644 --- a/src/package_diagram/model/diagram.h +++ b/src/package_diagram/model/diagram.h @@ -1,7 +1,7 @@ /** * @file src/package_diagram/model/diagram.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -75,7 +75,7 @@ public: * @param id Element id. * @return Optional reference to a diagram element. */ - opt_ref get(diagram_element::id_t id) const override; + opt_ref get(common::id_t id) const override; /** * @brief Find an element in the diagram by name. @@ -100,8 +100,7 @@ public: * @param id Id of the element * @return Optional reference to a diagram element */ - template - opt_ref find(diagram_element::id_t id) const; + template opt_ref find(common::id_t id) const; /** * @brief Find elements in the diagram by regex pattern. @@ -136,6 +135,10 @@ public: return add_with_namespace_path(std::move(e)); } + if (parent_path.type() == common::model::path_type::kModule) { + return add_with_module_path(parent_path, std::move(e)); + } + return add_with_filesystem_path(parent_path, std::move(e)); } @@ -145,7 +148,7 @@ public: * @param id Id of a package in the diagram * @return PlantUML alias of the element */ - std::string to_alias(diagram_element::id_t id) const; + std::string to_alias(common::id_t id) const; /** * @brief Return the elements JSON context for inja templates. @@ -155,6 +158,17 @@ public: inja::json context() const override; private: + /** + * @brief Add element using module as diagram path + * + * @tparam ElementT Element type + * @param e Element to add + * @return True, if the element was added + */ + template + bool add_with_module_path( + const common::model::path &parent_path, std::unique_ptr &&e); + /** * @brief Add element using namespace as diagram path * @@ -193,7 +207,7 @@ opt_ref diagram::find(const std::string &name) const } template -opt_ref diagram::find(diagram_element::id_t id) const +opt_ref diagram::find(common::id_t id) const { for (const auto &element : element_view::view()) { if (element.get().id() == id) { @@ -237,6 +251,49 @@ bool diagram::add_with_namespace_path(std::unique_ptr &&p) return res; } +template +bool diagram::add_with_module_path( + const common::model::path &parent_path, std::unique_ptr &&p) +{ + LOG_DBG("Adding package: {}, {}, {}, [{}]", p->name(), p->full_name(false), + parent_path.to_string(), p->id()); + + // Make sure all parent modules are already packages in the + // model + auto module_relative_to = path{p->using_namespace()}; + + for (auto it = parent_path.begin(); it != parent_path.end(); it++) { + auto pkg = std::make_unique( + p->using_namespace(), common::model::path_type::kModule); + pkg->set_name(*it); + + auto module_relative_part = common::model::path( + parent_path.begin(), it, common::model::path_type::kModule); + + auto module_absolute_path = module_relative_to | module_relative_part; + pkg->set_module(module_absolute_path.to_string()); + pkg->set_namespace(module_absolute_path); + + auto package_absolute_path = module_absolute_path | pkg->name(); + + pkg->set_id(common::to_id(package_absolute_path.to_string())); + + auto p_ref = std::ref(*pkg); + + auto res = add_element(module_relative_part, std::move(pkg)); + if (res) + element_view::add(p_ref); + } + + auto p_ref = std::ref(*p); + + auto res = add_element(parent_path, std::move(p)); + if (res) + element_view::add(p_ref); + + return res; +} + template bool diagram::add_with_filesystem_path( const common::model::path &parent_path, std::unique_ptr &&p) diff --git a/src/package_diagram/visitor/translation_unit_visitor.cc b/src/package_diagram/visitor/translation_unit_visitor.cc index edabb3d8..1794bee2 100644 --- a/src/package_diagram/visitor/translation_unit_visitor.cc +++ b/src/package_diagram/visitor/translation_unit_visitor.cc @@ -1,7 +1,7 @@ /** * @file src/package_diagram/visitor/translation_unit_visitor.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,6 +21,8 @@ #include "common/clang_utils.h" #include "common/model/namespace.h" +#include "clang/Basic/Module.h" + #include #include @@ -45,7 +47,7 @@ bool translation_unit_visitor::VisitNamespaceDecl(clang::NamespaceDecl *ns) { assert(ns != nullptr); - if (config().package_type() == config::package_type_t::kDirectory) + if (config().package_type() != config::package_type_t::kNamespace) return true; if (ns->isAnonymousNamespace() || ns->isInline()) @@ -237,6 +239,48 @@ void translation_unit_visitor::add_relationships( if (diagram().should_include(*pkg)) diagram().add(parent_path, std::move(pkg)); } + else if (config().package_type() == config::package_type_t::kModule) { + const auto *module = cls->getOwningModule(); + + if (module == nullptr) { + return; + } + + std::string module_path_str = module->Name; +#if LLVM_VERSION_MAJOR < 15 + if (module->Kind == clang::Module::ModuleKind::PrivateModuleFragment) { +#else + if (module->isPrivateModule()) { +#endif + module_path_str = module->getTopLevelModule()->Name; + } + + common::model::path module_path{ + module_path_str, common::model::path_type::kModule}; + module_path.pop_back(); + + auto relative_module = + config().make_module_relative(std::optional{module_path_str}); + + common::model::path parent_path{ + relative_module, common::model::path_type::kModule}; + auto pkg_name = parent_path.name(); + parent_path.pop_back(); + + auto pkg = std::make_unique( + config().using_module(), common::model::path_type::kModule); + + pkg->set_name(pkg_name); + pkg->set_id(get_package_id(cls)); + // This is for diagram filters + pkg->set_module(module_path.to_string()); + // This is for rendering nested package structure + pkg->set_namespace(module_path); + set_source_location(*cls, *pkg); + + if (diagram().should_include(*pkg)) + diagram().add(parent_path, std::move(pkg)); + } auto current_package_id = get_package_id(cls); @@ -248,7 +292,7 @@ void translation_unit_visitor::add_relationships( auto current_package = diagram().get(current_package_id); if (current_package) { - std::vector parent_ids = + std::vector parent_ids = get_parent_package_ids(current_package_id); for (const auto &dependency : relationships) { @@ -271,8 +315,7 @@ void translation_unit_visitor::add_relationships( } } -common::model::diagram_element::id_t translation_unit_visitor::get_package_id( - const clang::Decl *cls) +common::id_t translation_unit_visitor::get_package_id(const clang::Decl *cls) { if (config().package_type() == config::package_type_t::kNamespace) { const auto *namespace_context = @@ -284,6 +327,23 @@ common::model::diagram_element::id_t translation_unit_visitor::get_package_id( return {}; } + else if (config().package_type() == config::package_type_t::kModule) { + const auto *module = cls->getOwningModule(); + if (module != nullptr) { + std::string module_path = module->Name; +#if LLVM_VERSION_MAJOR < 15 + if (module->Kind == + clang::Module::ModuleKind::PrivateModuleFragment) { +#else + if (module->isPrivateModule()) { +#endif + module_path = module->getTopLevelModule()->Name; + } + return common::to_id(module_path); + } + + return {}; + } auto file = source_manager().getFilename(cls->getSourceRange().getBegin()).str(); @@ -578,6 +638,15 @@ bool translation_unit_visitor::find_relationships(const clang::QualType &type, } } } + else if (config().package_type() == + config::package_type_t::kModule) { + const auto *module = cxxrecord_decl->getOwningModule(); + if (module != nullptr) { + const auto target_id = get_package_id(cxxrecord_decl); + relationships.emplace_back(target_id, relationship_hint); + result = true; + } + } else { if (diagram().should_include( namespace_{common::get_qualified_name( @@ -591,8 +660,8 @@ bool translation_unit_visitor::find_relationships(const clang::QualType &type, } else if (const auto *record_decl = type->getAsRecordDecl(); record_decl != nullptr) { - // This is only possible for plain C translation unit, so we don't - // need to consider namespaces here + // This is only possible for plain C translation unit, so we + // don't need to consider namespaces or modules here if (config().package_type() == config::package_type_t::kDirectory) { if (diagram().should_include( namespace_{common::get_qualified_name(*record_decl)})) { @@ -620,12 +689,11 @@ translation_unit_visitor::config() const void translation_unit_visitor::finalize() { } -std::vector -translation_unit_visitor::get_parent_package_ids( - common::model::diagram_element::id_t id) +std::vector translation_unit_visitor::get_parent_package_ids( + common::id_t id) { - std::vector parent_ids; - std::optional parent_id = id; + std::vector parent_ids; + std::optional parent_id = id; while (parent_id.has_value()) { parent_ids.push_back(parent_id.value()); diff --git a/src/package_diagram/visitor/translation_unit_visitor.h b/src/package_diagram/visitor/translation_unit_visitor.h index 239ae924..11d8dc14 100644 --- a/src/package_diagram/visitor/translation_unit_visitor.h +++ b/src/package_diagram/visitor/translation_unit_visitor.h @@ -1,7 +1,7 @@ /** * @file src/package_diagram/visitor/translation_unit_visitor.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -33,9 +33,8 @@ namespace clanguml::package_diagram::visitor { -using found_relationships_t = - std::vector>; +using found_relationships_t = std::vector< + std::pair>; /** * @brief Package diagram translation unit visitor @@ -109,7 +108,7 @@ private: * @param cls C++ entity declaration * @return Id of the package containing that declaration */ - common::model::diagram_element::id_t get_package_id(const clang::Decl *cls); + common::id_t get_package_id(const clang::Decl *cls); /** * @brief Process class declaration @@ -214,8 +213,7 @@ private: void add_relationships( clang::Decl *cls, found_relationships_t &relationships); - std::vector get_parent_package_ids( - common::model::diagram_element::id_t id); + std::vector get_parent_package_ids(common::id_t id); // Reference to the output diagram model clanguml::package_diagram::model::diagram &diagram_; diff --git a/src/sequence_diagram/generators/json/sequence_diagram_generator.cc b/src/sequence_diagram/generators/json/sequence_diagram_generator.cc index 042ab1e3..b23816f5 100644 --- a/src/sequence_diagram/generators/json/sequence_diagram_generator.cc +++ b/src/sequence_diagram/generators/json/sequence_diagram_generator.cc @@ -1,7 +1,7 @@ /** * @file src/sequence_diagram/generators/json/sequence_diagram_generator.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -33,14 +33,12 @@ namespace clanguml::sequence_diagram::model { void to_json(nlohmann::json &j, const participant &c) { - j["name"] = generators::json::render_name(c.full_name(false)); - j["id"] = std::to_string(c.id()); + to_json(j, dynamic_cast(c)); j["type"] = c.type_name(); - if (!c.file().empty()) - j["source_location"] = - dynamic_cast(c); - if (const auto &comment = c.comment(); comment) - j["comment"] = comment.value(); + + if (c.type_name() == "method") { + j["name"] = dynamic_cast(c).method_name(); + } } void to_json(nlohmann::json &j, const activity &c) @@ -105,11 +103,8 @@ void generator::generate_call(const message &m, nlohmann::json &parent) const msg["name"] = message; msg["type"] = "message"; - msg["from"]["activity_name"] = - generators::json::render_name(from.value().full_name(false)); msg["from"]["activity_id"] = std::to_string(from.value().id()); msg["to"]["activity_id"] = std::to_string(to.value().id()); - msg["to"]["activity_name"] = to.value().full_name(false); if (const auto &cmt = m.comment(); cmt.has_value()) msg["comment"] = cmt.value(); @@ -132,7 +127,6 @@ void generator::generate_call(const message &m, nlohmann::json &parent) const } else { msg["from"]["participant_id"] = std::to_string(from.value().id()); - msg["from"]["participant_name"] = from.value().full_name(false); } } else if (from.value().type_name() == "lambda") { @@ -176,8 +170,8 @@ void generator::generate_call(const message &m, nlohmann::json &parent) const m.from(), to, m.to()); } -void generator::generate_activity(const activity &a, - std::vector &visited) const +void generator::generate_activity( + const activity &a, std::vector &visited) const { // Generate calls from this activity to other activities for (const auto &m : a.messages()) { @@ -253,8 +247,8 @@ nlohmann::json &generator::current_block_statement() const return block_statements_stack_.back().get(); } -void generator::process_call_message(const model::message &m, - std::vector &visited) const +void generator::process_call_message( + const model::message &m, std::vector &visited) const { visited.push_back(m.from()); @@ -529,7 +523,7 @@ void generator::generate_participant( } common::id_t generator::generate_participant( - nlohmann::json &parent, common::id_t id, bool force) const + nlohmann::json & /*parent*/, common::id_t id, bool force) const { common::id_t participant_id{0}; @@ -553,43 +547,91 @@ common::id_t generator::generate_participant( const auto &participant = model().get_participant(participant_id).value(); - if (participant.type_name() == "method") { - participant_id = model() - .get_participant(participant_id) - .value() - .class_id(); + const auto participant_type = participant.type_name(); - if (is_participant_generated(participant_id)) - return participant_id; + if (participant_type == "method") { + auto class_participant_id = + model() + .get_participant(participant_id) + .value() + .class_id(); - const auto &class_participant = - model().get_participant(participant_id).value(); + if (!is_participant_generated(class_participant_id)) { + const auto &class_participant = + model() + .get_participant(class_participant_id) + .value(); - parent["participants"].push_back(class_participant); + generated_participants_.emplace(participant_id); + generated_participants_.emplace(class_participant_id); + + json_["participants"].push_back(class_participant); + json_["participants"].back()["activities"].push_back(participant); + + return class_participant_id; + } + + if (!is_participant_generated(participant_id)) { + for (auto &p : json_["participants"]) { + if (p.at("id") == std::to_string(class_participant_id)) { + generated_participants_.emplace(participant_id); + p["activities"].push_back(participant); + return class_participant_id; + } + } + } } - else if ((participant.type_name() == "function" || - participant.type_name() == "function_template") && + else if ((participant_type == "function" || + participant_type == "function_template") && config().combine_free_functions_into_file_participants()) { // Create a single participant for all functions declared in a // single file + // participant_id will become activity_id within a file participant const auto &function_participant = model().get_participant(participant_id).value(); - nlohmann::json j = function_participant; - j["name"] = util::path_to_url( - config().make_path_relative(function_participant.file()).string()); + const auto file_participant_id = + common::to_id(function_participant.file_relative()); - participant_id = common::to_id(function_participant.file_relative()); + if (!is_participant_generated(file_participant_id)) { + nlohmann::json p = function_participant; - if (is_participant_generated(participant_id)) - return participant_id; + const auto file_path = + config().make_path_relative(function_participant.file()); - j["id"] = std::to_string(participant_id); + p["display_name"] = util::path_to_url(file_path.string()); + p["name"] = file_path.filename(); - parent["participants"].push_back(j); + if (is_participant_generated(file_participant_id)) + return participant_id; + + p["id"] = std::to_string(file_participant_id); + p["type"] = "file"; + p.erase("source_location"); + + generated_participants_.emplace(participant_id); + + p["activities"].push_back(participant); + json_["participants"].push_back(p); + + generated_participants_.emplace(file_participant_id); + + return file_participant_id; + } + + if (!is_participant_generated(participant_id)) { + for (auto &p : json_["participants"]) { + if (p.at("id") == std::to_string(file_participant_id)) { + generated_participants_.emplace(participant_id); + p["activities"].push_back(participant); + } + } + } + + return file_participant_id; } else { - parent["participants"].push_back(participant); + json_["participants"].push_back(participant); } generated_participants_.emplace(participant_id); @@ -614,7 +656,7 @@ void generator::generate_diagram(nlohmann::json &parent) const if (config().participants_order.has_value) { for (const auto &p : config().participants_order()) { LOG_DBG("Pregenerating participant {}", p); - generate_participant(parent, p); + generate_participant(json_, p); } } @@ -661,7 +703,7 @@ void generator::generate_diagram(nlohmann::json &parent) const block_statements_stack_.pop_back(); - json_["sequences"].push_back(std::move(sequence)); + parent["sequences"].push_back(std::move(sequence)); } for (const auto &to_location : config().to()) { @@ -697,12 +739,12 @@ void generator::generate_diagram(nlohmann::json &parent) const block_statements_stack_.pop_back(); - json_["sequences"].push_back(std::move(sequence)); + parent["sequences"].push_back(std::move(sequence)); } for (const auto &sf : config().from()) { if (sf.location_type == location_t::function) { - common::model::diagram_element::id_t start_from{0}; + common::id_t start_from{0}; std::string start_from_str; for (const auto &[k, v] : model().sequences()) { const auto &caller = *model().participants().at(v.from()); @@ -722,8 +764,7 @@ void generator::generate_diagram(nlohmann::json &parent) const } // Use this to break out of recurrent loops - std::vector - visited_participants; + std::vector visited_participants; const auto &from = model().get_participant(start_from); @@ -757,7 +798,7 @@ void generator::generate_diagram(nlohmann::json &parent) const sequence["return_type"] = from.value().return_type(); } - json_["sequences"].push_back(std::move(sequence)); + parent["sequences"].push_back(std::move(sequence)); } else { // TODO: Add support for other sequence start location types @@ -765,6 +806,6 @@ void generator::generate_diagram(nlohmann::json &parent) const } } - parent.update(json_); + parent["participants"] = json_["participants"]; } } // namespace clanguml::sequence_diagram::generators::json diff --git a/src/sequence_diagram/generators/json/sequence_diagram_generator.h b/src/sequence_diagram/generators/json/sequence_diagram_generator.h index 985f3dda..bbf45078 100644 --- a/src/sequence_diagram/generators/json/sequence_diagram_generator.h +++ b/src/sequence_diagram/generators/json/sequence_diagram_generator.h @@ -1,7 +1,7 @@ /** * @file src/sequence_diagram/generators/json/sequence_diagram_generator.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -99,7 +99,7 @@ public: * for breaking infinite recursion on recursive calls */ void generate_activity(const sequence_diagram::model::activity &a, - std::vector &visited) const; + std::vector &visited) const; /** * @brief Get reference to the current block statement. @@ -126,8 +126,8 @@ private: * @param m Message model * @param visited List of already visited participants */ - void process_call_message(const model::message &m, - std::vector &visited) const; + void process_call_message( + const model::message &m, std::vector &visited) const; /** * @brief Process `if` statement message @@ -239,6 +239,8 @@ private: mutable std::set generated_participants_; + // Needed to add "participants" array in a temporary object accessible from + // all methods of the generator mutable nlohmann::json json_; mutable std::vector> diff --git a/src/sequence_diagram/generators/mermaid/sequence_diagram_generator.cc b/src/sequence_diagram/generators/mermaid/sequence_diagram_generator.cc index 059fa526..af403651 100644 --- a/src/sequence_diagram/generators/mermaid/sequence_diagram_generator.cc +++ b/src/sequence_diagram/generators/mermaid/sequence_diagram_generator.cc @@ -1,7 +1,7 @@ /** * @file src/sequence_diagram/generators/mermaid/sequence_diagram_generator.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -180,7 +180,7 @@ void generator::generate_return(const message &m, std::ostream &ostr) const } void generator::generate_activity(const activity &a, std::ostream &ostr, - std::vector &visited) const + std::vector &visited) const { for (const auto &m : a.messages()) { if (m.in_static_declaration_context()) { @@ -202,7 +202,7 @@ void generator::generate_activity(const activity &a, std::ostream &ostr, std::string to_alias = generate_alias(to.value()); - ostr << indent(1) << "activate " << to_alias << std::endl; + ostr << indent(1) << "activate " << to_alias << '\n'; if (model().sequences().find(m.to()) != model().sequences().end()) { if (std::find(visited.begin(), visited.end(), m.to()) == @@ -220,7 +220,7 @@ void generator::generate_activity(const activity &a, std::ostream &ostr, generate_return(m, ostr); - ostr << indent(1) << "deactivate " << to_alias << std::endl; + ostr << indent(1) << "deactivate " << to_alias << '\n'; visited.pop_back(); } @@ -495,7 +495,7 @@ void generator::generate_diagram(std::ostream &ostr) const << " " << generate_alias(from.value()) << " : " << from.value().message_name( select_method_arguments_render_mode()) - << std::endl; + << '\n'; } for (const auto &m : mc) { @@ -528,7 +528,7 @@ void generator::generate_diagram(std::ostream &ostr) const << " " << generate_alias(from.value()) << " : " << from.value().message_name( select_method_arguments_render_mode()) - << std::endl; + << '\n'; } for (const auto &m : mc) { @@ -539,7 +539,7 @@ void generator::generate_diagram(std::ostream &ostr) const for (const auto &sf : config().from()) { if (sf.location_type == location_t::function) { - common::model::diagram_element::id_t start_from{0}; + common::id_t start_from{0}; for (const auto &[k, v] : model().sequences()) { const auto &caller = *model().participants().at(v.from()); std::string vfrom = caller.full_name(false); @@ -558,8 +558,7 @@ void generator::generate_diagram(std::ostream &ostr) const } // Use this to break out of recurrent loops - std::vector - visited_participants; + std::vector visited_participants; const auto &from = model().get_participant(start_from); @@ -588,10 +587,10 @@ void generator::generate_diagram(std::ostream &ostr) const << common::generators::mermaid::to_mermaid( message_t::kCall) << " " << from_alias << " : " - << from.value().message_name(render_mode) << std::endl; + << from.value().message_name(render_mode) << '\n'; } - ostr << indent(1) << "activate " << from_alias << std::endl; + ostr << indent(1) << "activate " << from_alias << '\n'; generate_activity( model().get_activity(start_from), ostr, visited_participants); @@ -613,7 +612,7 @@ void generator::generate_diagram(std::ostream &ostr) const } } - ostr << indent(1) << "deactivate " << from_alias << std::endl; + ostr << indent(1) << "deactivate " << from_alias << '\n'; } else { // TODO: Add support for other sequence start location types diff --git a/src/sequence_diagram/generators/mermaid/sequence_diagram_generator.h b/src/sequence_diagram/generators/mermaid/sequence_diagram_generator.h index ef7f60f3..e8446479 100644 --- a/src/sequence_diagram/generators/mermaid/sequence_diagram_generator.h +++ b/src/sequence_diagram/generators/mermaid/sequence_diagram_generator.h @@ -1,7 +1,7 @@ /** * @file src/sequence_diagram/generators/mermaid/sequence_diagram_generator.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -117,8 +117,7 @@ public: * for breaking infinite recursion on recursive calls */ void generate_activity(const clanguml::sequence_diagram::model::activity &a, - std::ostream &ostr, - std::vector &visited) const; + std::ostream &ostr, std::vector &visited) const; private: /** diff --git a/src/sequence_diagram/generators/plantuml/sequence_diagram_generator.cc b/src/sequence_diagram/generators/plantuml/sequence_diagram_generator.cc index 30b28d85..598b0b0f 100644 --- a/src/sequence_diagram/generators/plantuml/sequence_diagram_generator.cc +++ b/src/sequence_diagram/generators/plantuml/sequence_diagram_generator.cc @@ -1,7 +1,7 @@ /** * @file src/sequence_diagram/generators/plantuml/sequence_diagram_generator.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -134,7 +134,7 @@ void generator::generate_return(const message &m, std::ostream &ostr) const } void generator::generate_activity(const activity &a, std::ostream &ostr, - std::vector &visited) const + std::vector &visited) const { for (const auto &m : a.messages()) { if (m.in_static_declaration_context()) { @@ -156,7 +156,7 @@ void generator::generate_activity(const activity &a, std::ostream &ostr, std::string to_alias = generate_alias(to.value()); - ostr << "activate " << to_alias << std::endl; + ostr << "activate " << to_alias << '\n'; if (model().sequences().find(m.to()) != model().sequences().end()) { if (std::find(visited.begin(), visited.end(), m.to()) == @@ -174,7 +174,7 @@ void generator::generate_activity(const activity &a, std::ostream &ostr, generate_return(m, ostr); - ostr << "deactivate " << to_alias << std::endl; + ostr << "deactivate " << to_alias << '\n'; visited.pop_back(); } @@ -498,7 +498,7 @@ void generator::generate_diagram(std::ostream &ostr) const << " " << generate_alias(from.value()) << " : " << from.value().message_name( select_method_arguments_render_mode()) - << std::endl; + << '\n'; } for (const auto &m : mc) { @@ -535,7 +535,7 @@ void generator::generate_diagram(std::ostream &ostr) const << " " << generate_alias(from.value()) << " : " << from.value().message_name( select_method_arguments_render_mode()) - << std::endl; + << '\n'; } for (const auto &m : mc) { @@ -546,7 +546,7 @@ void generator::generate_diagram(std::ostream &ostr) const for (const auto &sf : config().from()) { if (sf.location_type == location_t::function) { - common::model::diagram_element::id_t start_from{0}; + common::id_t start_from{0}; for (const auto &[k, v] : model().sequences()) { const auto &caller = *model().participants().at(v.from()); std::string vfrom = caller.full_name(false); @@ -565,8 +565,7 @@ void generator::generate_diagram(std::ostream &ostr) const } // Use this to break out of recurrent loops - std::vector - visited_participants; + std::vector visited_participants; const auto &from = model().get_participant(start_from); @@ -593,10 +592,10 @@ void generator::generate_diagram(std::ostream &ostr) const config().combine_free_functions_into_file_participants()) { ostr << "[->" << " " << from_alias << " : " - << from.value().message_name(render_mode) << std::endl; + << from.value().message_name(render_mode) << '\n'; } - ostr << "activate " << from_alias << std::endl; + ostr << "activate " << from_alias << '\n'; generate_activity( model().get_activity(start_from), ostr, visited_participants); @@ -615,7 +614,7 @@ void generator::generate_diagram(std::ostream &ostr) const } } - ostr << "deactivate " << from_alias << std::endl; + ostr << "deactivate " << from_alias << '\n'; } else { // TODO: Add support for other sequence start location types diff --git a/src/sequence_diagram/generators/plantuml/sequence_diagram_generator.h b/src/sequence_diagram/generators/plantuml/sequence_diagram_generator.h index 35dc31ba..8d02deec 100644 --- a/src/sequence_diagram/generators/plantuml/sequence_diagram_generator.h +++ b/src/sequence_diagram/generators/plantuml/sequence_diagram_generator.h @@ -1,7 +1,7 @@ /** * @file src/sequence_diagram/generators/plantuml/sequence_diagram_generator.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -111,8 +111,7 @@ public: * for breaking infinite recursion on recursive calls */ void generate_activity(const clanguml::sequence_diagram::model::activity &a, - std::ostream &ostr, - std::vector &visited) const; + std::ostream &ostr, std::vector &visited) const; private: /** diff --git a/src/sequence_diagram/model/activity.cc b/src/sequence_diagram/model/activity.cc index 31313e84..c66ba730 100644 --- a/src/sequence_diagram/model/activity.cc +++ b/src/sequence_diagram/model/activity.cc @@ -1,7 +1,7 @@ /** * @file src/sequence_diagram/model/activity.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,7 +20,7 @@ namespace clanguml::sequence_diagram::model { -activity::activity(common::model::diagram_element::id_t id) +activity::activity(common::id_t id) : from_{id} { } @@ -31,6 +31,6 @@ std::vector &activity::messages() { return messages_; } const std::vector &activity::messages() const { return messages_; } -common::model::diagram_element::id_t activity::from() const { return from_; } +common::id_t activity::from() const { return from_; } } // namespace clanguml::sequence_diagram::model diff --git a/src/sequence_diagram/model/activity.h b/src/sequence_diagram/model/activity.h index 404b09b4..ac0d1592 100644 --- a/src/sequence_diagram/model/activity.h +++ b/src/sequence_diagram/model/activity.h @@ -1,7 +1,7 @@ /** * @file src/sequence_diagram/model/activity.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -35,7 +35,7 @@ public: * * @param id Id of the participant parent for the activity */ - activity(common::model::diagram_element::id_t id); + activity(common::id_t id); /** * @brief Add a message call to the activity @@ -63,10 +63,10 @@ public: * * @return Id of activity participant */ - common::model::diagram_element::id_t from() const; + common::id_t from() const; private: - common::model::diagram_element::id_t from_; + common::id_t from_; std::vector messages_; }; diff --git a/src/sequence_diagram/model/diagram.cc b/src/sequence_diagram/model/diagram.cc index 26215680..45d2f97a 100644 --- a/src/sequence_diagram/model/diagram.cc +++ b/src/sequence_diagram/model/diagram.cc @@ -1,7 +1,7 @@ /** * @file src/sequence_diagram/model/diagram.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -42,7 +42,7 @@ common::optional_ref diagram::get( } common::optional_ref diagram::get( - const common::model::diagram_element::id_t id) const + const common::id_t id) const { if (participants_.find(id) != participants_.end()) return {*participants_.at(id)}; @@ -88,21 +88,17 @@ void diagram::add_participant(std::unique_ptr p) } } -void diagram::add_active_participant(common::model::diagram_element::id_t id) +void diagram::add_active_participant(common::id_t id) { active_participants_.emplace(id); } -const activity &diagram::get_activity( - common::model::diagram_element::id_t id) const +const activity &diagram::get_activity(common::id_t id) const { return sequences_.at(id); } -activity &diagram::get_activity(common::model::diagram_element::id_t id) -{ - return sequences_.at(id); -} +activity &diagram::get_activity(common::id_t id) { return sequences_.at(id); } void diagram::add_message(model::message &&message) { @@ -150,37 +146,30 @@ void diagram::add_case_stmt_message(model::message &&m) } } -std::map &diagram::sequences() +std::map &diagram::sequences() { return sequences_; } + +const std::map &diagram::sequences() const { return sequences_; } -const std::map & -diagram::sequences() const -{ - return sequences_; -} - -std::map> & -diagram::participants() +std::map> &diagram::participants() { return participants_; } -const std::map> & +const std::map> & diagram::participants() const { return participants_; } -std::set &diagram::active_participants() +std::set &diagram::active_participants() { return active_participants_; } -const std::set & -diagram::active_participants() const +const std::set &diagram::active_participants() const { return active_participants_; } @@ -232,10 +221,10 @@ std::vector diagram::list_to_values() const return result; } -common::model::diagram_element::id_t diagram::get_to_activity_id( +common::id_t diagram::get_to_activity_id( const config::source_location &to_location) const { - common::model::diagram_element::id_t to_activity{0}; + common::id_t to_activity{0}; for (const auto &[k, v] : sequences()) { for (const auto &m : v.messages()) { @@ -261,10 +250,10 @@ common::model::diagram_element::id_t diagram::get_to_activity_id( return to_activity; } -common::model::diagram_element::id_t diagram::get_from_activity_id( +common::id_t diagram::get_from_activity_id( const config::source_location &from_location) const { - common::model::diagram_element::id_t from_activity{0}; + common::id_t from_activity{0}; for (const auto &[k, v] : sequences()) { const auto &caller = *participants().at(v.from()); @@ -286,8 +275,7 @@ common::model::diagram_element::id_t diagram::get_from_activity_id( } std::vector diagram::get_all_from_to_message_chains( - const common::model::diagram_element::id_t from_activity, - const common::model::diagram_element::id_t to_activity) const + const common::id_t from_activity, const common::id_t to_activity) const { std::vector message_chains_unique{}; diff --git a/src/sequence_diagram/model/diagram.h b/src/sequence_diagram/model/diagram.h index 4c58e5e1..35f0c465 100644 --- a/src/sequence_diagram/model/diagram.h +++ b/src/sequence_diagram/model/diagram.h @@ -1,7 +1,7 @@ /** * @file src/sequence_diagram/model/diagram.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -67,7 +67,7 @@ public: * @return Optional reference to a diagram element. */ common::optional_ref get( - common::model::diagram_element::id_t id) const override; + common::id_t id) const override; /** * @brief Get participant by id @@ -76,8 +76,7 @@ public: * @return Optional reference to a diagram element. */ template - common::optional_ref get_participant( - common::model::diagram_element::id_t id) const + common::optional_ref get_participant(common::id_t id) const { if (participants_.find(id) == participants_.end()) { return {}; @@ -99,7 +98,7 @@ public: * * @param id Id of participant to activate */ - void add_active_participant(common::model::diagram_element::id_t id); + void add_active_participant(common::id_t id); /** * @brief Get reference to current activity of a participant @@ -107,7 +106,7 @@ public: * @param id Participant id * @return */ - const activity &get_activity(common::model::diagram_element::id_t id) const; + const activity &get_activity(common::id_t id) const; /** * @brief Get reference to current activity of a participant @@ -115,7 +114,7 @@ public: * @param id Participant id * @return */ - activity &get_activity(common::model::diagram_element::id_t id); + activity &get_activity(common::id_t id); /** * @brief Add message to current activity @@ -156,31 +155,28 @@ public: * * @return Map of sequences in the diagram */ - std::map &sequences(); + std::map &sequences(); /** * @brief Get all sequences in the diagram * * @return Map of sequences in the diagram */ - const std::map & - sequences() const; + const std::map &sequences() const; /** * @brief Get map of all participants in the diagram * * @return Map of participants in the diagram */ - std::map> - &participants(); + std::map> &participants(); /** * @brief Get map of all participants in the diagram * * @return Map of participants in the diagram */ - const std::map> & + const std::map> & participants() const; /** @@ -188,15 +184,14 @@ public: * * @return Set of all active participant ids */ - std::set &active_participants(); + std::set &active_participants(); /** * @brief Get all active participants in the diagram * * @return Set of all active participant ids */ - const std::set & - active_participants() const; + const std::set &active_participants() const; /** * @brief Convert element full name to PlantUML alias. @@ -256,8 +251,7 @@ public: * @return List of message chains */ std::vector get_all_from_to_message_chains( - common::model::diagram_element::id_t from_activity, - common::model::diagram_element::id_t to_activity) const; + common::id_t from_activity, common::id_t to_activity) const; /** * @brief Get id of a 'to' activity @@ -265,7 +259,7 @@ public: * @param to_location Target activity * @return Activity id */ - common::model::diagram_element::id_t get_to_activity_id( + common::id_t get_to_activity_id( const config::source_location &to_location) const; /** @@ -274,7 +268,7 @@ public: * @param from_location Source activity * @return Activity id */ - common::model::diagram_element::id_t get_from_activity_id( + common::id_t get_from_activity_id( const config::source_location &from_location) const; /** @@ -328,12 +322,11 @@ private: return block_end_types.count(mt) > 0; }; - std::map sequences_; + std::map sequences_; - std::map> - participants_; + std::map> participants_; - std::set active_participants_; + std::set active_participants_; }; } // namespace clanguml::sequence_diagram::model diff --git a/src/sequence_diagram/model/message.cc b/src/sequence_diagram/model/message.cc index 54c7235c..fad5ca19 100644 --- a/src/sequence_diagram/model/message.cc +++ b/src/sequence_diagram/model/message.cc @@ -1,7 +1,7 @@ /** * @file src/sequence_diagram/model/message.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,8 +20,7 @@ namespace clanguml::sequence_diagram::model { -message::message( - common::model::message_t type, common::model::diagram_element::id_t from) +message::message(common::model::message_t type, common::id_t from) : type_{type} , from_{from} { @@ -39,13 +38,13 @@ void message::set_type(common::model::message_t t) { type_ = t; } common::model::message_t message::type() const { return type_; } -void message::set_from(common::model::diagram_element::id_t f) { from_ = f; } +void message::set_from(common::id_t f) { from_ = f; } -common::model::diagram_element::id_t message::from() const { return from_; } +common::id_t message::from() const { return from_; } -void message::set_to(common::model::diagram_element::id_t t) { to_ = t; } +void message::set_to(common::id_t t) { to_ = t; } -common::model::diagram_element::id_t message::to() const { return to_; } +common::id_t message::to() const { return to_; } void message::set_message_name(std::string name) { diff --git a/src/sequence_diagram/model/message.h b/src/sequence_diagram/model/message.h index 1ca7a145..476b55fa 100644 --- a/src/sequence_diagram/model/message.h +++ b/src/sequence_diagram/model/message.h @@ -1,7 +1,7 @@ /** * @file src/sequence_diagram/model/message.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -38,8 +38,7 @@ public: * @param type Message type * @param from Id of originating sequence */ - message(common::model::message_t type, - common::model::diagram_element::id_t from); + message(common::model::message_t type, common::id_t from); /** * @brief Equality operator @@ -68,28 +67,28 @@ public: * * @param f Id of the participant from which message originates */ - void set_from(common::model::diagram_element::id_t f); + void set_from(common::id_t f); /** * @brief Get the id of source of message * * @return */ - common::model::diagram_element::id_t from() const; + common::id_t from() const; /** * @brief Set the id of the message target * * @param t Id of the message target */ - void set_to(common::model::diagram_element::id_t t); + void set_to(common::id_t t); /** * @brief Get the id of the message target * * @return Id of the message target */ - common::model::diagram_element::id_t to() const; + common::id_t to() const; /** * @brief Set the message label @@ -163,9 +162,9 @@ public: private: common::model::message_t type_{common::model::message_t::kNone}; - common::model::diagram_element::id_t from_{}; + common::id_t from_{}; - common::model::diagram_element::id_t to_{}; + common::id_t to_{}; common::model::message_scope_t scope_{ common::model::message_scope_t::kNormal}; diff --git a/src/sequence_diagram/model/participant.cc b/src/sequence_diagram/model/participant.cc index 5c8f15c8..6e393c7a 100644 --- a/src/sequence_diagram/model/participant.cc +++ b/src/sequence_diagram/model/participant.cc @@ -1,7 +1,7 @@ /** * @file src/sequence_diagram/model/participant.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -69,7 +69,10 @@ std::string class_::full_name(bool relative) const std::ostringstream ostr; - ostr << name_and_ns(); + if (relative) + ostr << name(); + else + ostr << name_and_ns(); render_template_params(ostr, using_namespace(), relative); std::string res; @@ -102,7 +105,7 @@ function::function(const common::model::namespace_ &using_namespace) std::string function::full_name(bool relative) const { - return fmt::format("{}({}){}", element::full_name(relative), + return fmt::format("{}({}){}", participant::full_name(relative), fmt::join(parameters_, ","), is_const() ? " const" : ""); } @@ -186,7 +189,7 @@ void method::is_assignment(bool a) { is_assignment_ = a; } void method::set_method_name(const std::string &name) { method_name_ = name; } -void method::set_class_id(diagram_element::id_t id) { class_id_ = id; } +void method::set_class_id(common::id_t id) { class_id_ = id; } void method::set_class_full_name(const std::string &name) { @@ -195,8 +198,12 @@ void method::set_class_full_name(const std::string &name) const auto &method::class_full_name() const { return class_full_name_; } -std::string method::full_name(bool /*relative*/) const +std::string method::full_name(bool relative) const { + if (relative) + return fmt::format("{}({}){}", method_name(), + fmt::join(parameters(), ","), is_const() ? " const" : ""); + return fmt::format("{}::{}({}){}", class_full_name(), method_name(), fmt::join(parameters(), ","), is_const() ? " const" : ""); } @@ -223,7 +230,7 @@ std::string method::message_name(message_render_mode mode) const fmt::join(parameters(), ","), is_const() ? " const" : "", style); } -class_::diagram_element::id_t method::class_id() const { return class_id_; } +common::id_t method::class_id() const { return class_id_; } std::string method::to_string() const { diff --git a/src/sequence_diagram/model/participant.h b/src/sequence_diagram/model/participant.h index d6f014a3..ff86fa2e 100644 --- a/src/sequence_diagram/model/participant.h +++ b/src/sequence_diagram/model/participant.h @@ -1,7 +1,7 @@ /** * @file src/sequence_diagram/model/participant.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -88,7 +88,13 @@ public: * * @return Type name of the diagram element. */ - std::string type_name() const override { return "class"; } + std::string type_name() const override + { + if (is_lambda()) + return "lambda"; + + return "class"; + } /** * @brief Check if class is a struct. @@ -378,7 +384,7 @@ struct method : public function { * * @param id Id of the class to which this method belongs to */ - void set_class_id(diagram_element::id_t id); + void set_class_id(common::id_t id); /** * @brief Set full qualified name of the class @@ -408,7 +414,7 @@ struct method : public function { * * @return Class id */ - diagram_element::id_t class_id() const; + common::id_t class_id() const; /** * @brief Create a string representation of the participant @@ -460,7 +466,7 @@ struct method : public function { void is_assignment(bool a); private: - diagram_element::id_t class_id_{}; + common::id_t class_id_{}; std::string method_name_; std::string class_full_name_; bool is_constructor_{false}; diff --git a/src/sequence_diagram/visitor/call_expression_context.cc b/src/sequence_diagram/visitor/call_expression_context.cc index 336a2747..403d460f 100644 --- a/src/sequence_diagram/visitor/call_expression_context.cc +++ b/src/sequence_diagram/visitor/call_expression_context.cc @@ -1,7 +1,7 @@ /** * @file src/sequence_diagram/visitor/call_expression_context.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/sequence_diagram/visitor/call_expression_context.h b/src/sequence_diagram/visitor/call_expression_context.h index 41e22647..ba4958f3 100644 --- a/src/sequence_diagram/visitor/call_expression_context.h +++ b/src/sequence_diagram/visitor/call_expression_context.h @@ -1,7 +1,7 @@ /** * @file src/sequence_diagram/visitor/call_expression_context.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/sequence_diagram/visitor/translation_unit_visitor.cc b/src/sequence_diagram/visitor/translation_unit_visitor.cc index c8c320a2..5b02b279 100644 --- a/src/sequence_diagram/visitor/translation_unit_visitor.cc +++ b/src/sequence_diagram/visitor/translation_unit_visitor.cc @@ -1,7 +1,7 @@ /** * @file src/sequence_diagram/visitor/translation_unit_visitor.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -114,8 +114,8 @@ bool translation_unit_visitor::VisitCXXRecordDecl( forward_declarations_.erase(class_id); if (diagram().should_include(class_model)) { - LOG_DBG("Adding class {} with id {}", class_model.full_name(false), - class_model.id()); + LOG_DBG("Adding class participant {} with id {}", + class_model.full_name(false), class_model.id()); assert(class_model.id() == class_id); @@ -166,7 +166,8 @@ bool translation_unit_visitor::VisitClassTemplateDecl( forward_declarations_.erase(id); if (diagram().should_include(*class_model_ptr)) { - LOG_DBG("Adding class template {} with id {}", class_full_name, id); + LOG_DBG("Adding class template participant {} with id {}", + class_full_name, id); context().set_caller_id(id); context().update(declaration); @@ -212,7 +213,8 @@ bool translation_unit_visitor::VisitClassTemplateSpecializationDecl( forward_declarations_.erase(id); if (diagram().should_include(*template_specialization_ptr)) { - LOG_DBG("Adding class template specialization {} with id {}", + LOG_DBG( + "Adding class template specialization participant {} with id {}", class_full_name, id); context().set_caller_id(id); @@ -1083,10 +1085,6 @@ bool translation_unit_visitor::VisitCallExpr(clang::CallExpr *expr) bool translation_unit_visitor::TraverseVarDecl(clang::VarDecl *decl) { - LOG_TRACE("Traversing cxx variable declaration at {} [caller_id = {}]", - decl->getBeginLoc().printToString(source_manager()), - context().caller_id()); - if (decl->isStaticLocal()) within_static_variable_declaration_++; @@ -1458,7 +1456,7 @@ translation_unit_visitor::create_class_model(clang::CXXRecordDecl *cls) // Here we have 2 options, either: // - the parent is a regular C++ class/struct // - the parent is a class template declaration/specialization - std::optional id_opt; + std::optional id_opt; const auto *parent_record_decl = clang::dyn_cast(parent); @@ -1630,15 +1628,15 @@ bool translation_unit_visitor::process_template_parameters( } void translation_unit_visitor::set_unique_id( - int64_t local_id, common::model::diagram_element::id_t global_id) + int64_t local_id, common::id_t global_id) { LOG_TRACE("Setting local element mapping {} --> {}", local_id, global_id); local_ast_id_map_[local_id] = global_id; } -std::optional -translation_unit_visitor::get_unique_id(int64_t local_id) const +std::optional translation_unit_visitor::get_unique_id( + int64_t local_id) const { if (local_ast_id_map_.find(local_id) == local_ast_id_map_.end()) return {}; @@ -2051,12 +2049,12 @@ void translation_unit_visitor::process_template_specialization_argument( argument.set_type(type_name); } - LOG_TRACE("Adding template instantiation argument {}", - argument.to_string(config().using_namespace(), false)); - simplify_system_template( argument, argument.to_string(config().using_namespace(), false)); + LOG_TRACE("Adding template instantiation argument {}", + argument.to_string(config().using_namespace(), false)); + template_instantiation.add_template(std::move(argument)); } else if (argument_kind == clang::TemplateArgument::Integral) { @@ -2232,7 +2230,7 @@ translation_unit_visitor::build_template_instantiation( std::string best_match_full_name{}; auto full_template_name = template_instantiation.full_name(false); int best_match{}; - common::model::diagram_element::id_t best_match_id{0}; + common::id_t best_match_id{0}; for (const auto &[id, c] : diagram().participants()) { const auto *participant_as_class = @@ -2382,7 +2380,7 @@ void translation_unit_visitor::pop_message_to_diagram( void translation_unit_visitor::finalize() { - std::set active_participants_unique; + std::set active_participants_unique; // Change all active participants AST local ids to diagram global ids for (auto id : diagram().active_participants()) { diff --git a/src/sequence_diagram/visitor/translation_unit_visitor.h b/src/sequence_diagram/visitor/translation_unit_visitor.h index 1f0c688b..d1190096 100644 --- a/src/sequence_diagram/visitor/translation_unit_visitor.h +++ b/src/sequence_diagram/visitor/translation_unit_visitor.h @@ -1,7 +1,7 @@ /** * @file src/sequence_diagram/visitor/translation_unit_visitor.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -204,8 +204,7 @@ public: * @return Optional reference to participant diagram element */ template - common::optional_ref get_participant( - const common::model::diagram_element::id_t id) + common::optional_ref get_participant(const common::id_t id) { if (diagram().participants().find(id) == diagram().participants().end()) return {}; @@ -222,8 +221,7 @@ public: * @return Optional reference to participant diagram element */ template - common::optional_ref get_participant( - common::model::diagram_element::id_t id) const + common::optional_ref get_participant(common::id_t id) const { if (diagram().participants().find(id) == diagram().participants().end()) return {}; @@ -241,8 +239,7 @@ public: * @param local_id Local AST element id * @param global_id Globa diagram element id */ - void set_unique_id( - int64_t local_id, common::model::diagram_element::id_t global_id); + void set_unique_id(int64_t local_id, common::id_t global_id); /** * @brief Retrieve the global `clang-uml` entity id based on the Clang @@ -250,8 +247,7 @@ public: * @param local_id AST local element id * @return Global diagram element id */ - std::optional get_unique_id( - int64_t local_id) const; + std::optional get_unique_id(int64_t local_id) const; /** * @brief Finalize diagram model for this translation unit @@ -316,7 +312,7 @@ private: bool should_include(const clang::ClassTemplateDecl *decl) const; /** - * @todo Refactor this group of methods to @ref template_builder + * @todo #227 Refactor this group of methods to @ref template_builder * * @{ */ @@ -531,7 +527,7 @@ private: std::map construct_expr_message_map_; - std::map> forward_declarations_; @@ -539,7 +535,7 @@ private: * @todo Refactor to @ref ast_id_mapper */ std::mapgetID() */ int64_t, - /* global ID based on full name */ common::model::diagram_element::id_t> + /* global ID based on full name */ common::id_t> local_ast_id_map_; std::map + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/util/query_driver_output_extractor.cc b/src/util/query_driver_output_extractor.cc index fd7f3765..12cb8629 100644 --- a/src/util/query_driver_output_extractor.cc +++ b/src/util/query_driver_output_extractor.cc @@ -1,7 +1,7 @@ /** * @file src/util/query_driver_include_extractor.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/util/query_driver_output_extractor.h b/src/util/query_driver_output_extractor.h index dd5377c5..182aeb8b 100644 --- a/src/util/query_driver_output_extractor.h +++ b/src/util/query_driver_output_extractor.h @@ -1,7 +1,7 @@ /** * @file src/util/query_driver_include_extractor.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -76,8 +76,8 @@ public: const std::vector &system_include_paths() const; private: - const std::string command_; - const std::string language_; + std::string command_; + std::string language_; std::string target_; std::vector system_include_paths_; }; diff --git a/src/util/thread_pool_executor.cc b/src/util/thread_pool_executor.cc index 150ab247..577f763c 100644 --- a/src/util/thread_pool_executor.cc +++ b/src/util/thread_pool_executor.cc @@ -1,7 +1,7 @@ /** * @file src/util/thread_pool_executor.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/util/thread_pool_executor.h b/src/util/thread_pool_executor.h index 9e6820e9..16a13c41 100644 --- a/src/util/thread_pool_executor.h +++ b/src/util/thread_pool_executor.h @@ -1,7 +1,7 @@ /** * @file src/util/thread_pool_executor.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/util/util.cc b/src/util/util.cc index 4fa36a65..e8c139db 100644 --- a/src/util/util.cc +++ b/src/util/util.cc @@ -1,7 +1,7 @@ /** * @file src/util/util.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -216,20 +216,29 @@ std::vector split( { std::vector result; - if (!contains(str, delimiter)) - result.push_back(str); + if (!contains(str, delimiter)) { + if (!str.empty()) + result.push_back(std::move(str)); + else if (!skip_empty) + result.push_back(std::move(str)); + } else while (static_cast(!str.empty()) != 0U) { auto index = str.find(delimiter); if (index != std::string::npos) { auto tok = str.substr(0, index); - if (!tok.empty() || !skip_empty) + if (!tok.empty()) result.push_back(std::move(tok)); + else if (!skip_empty) + result.push_back(std::move(tok)); + str = str.substr(index + delimiter.size()); } else { - if (!str.empty() || !skip_empty) - result.push_back(str); + if (!str.empty()) + result.push_back(std::move(str)); + else if (!skip_empty) + result.push_back(std::move(str)); str = ""; } } diff --git a/src/util/util.h b/src/util/util.h index 105485ec..391f5b8c 100644 --- a/src/util/util.h +++ b/src/util/util.h @@ -1,7 +1,7 @@ /** * @file src/util/util.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/version.h.in b/src/version.h.in index 524c6fe4..95dad7e8 100644 --- a/src/version.h.in +++ b/src/version.h.in @@ -18,7 +18,7 @@ #pragma once namespace clanguml::version { -static constexpr auto CLANG_UML_JSON_GENERATOR_SCHEMA_VERSION = 1U; +static constexpr auto CLANG_UML_JSON_GENERATOR_SCHEMA_VERSION = 2U; static constexpr auto CLANG_UML_VERSION = "@GIT_VERSION@"; static constexpr auto CLANG_UML_LIBCLANG_VERSION = "@LIBCLANG_VERSION_STRING@"; } // namespace clanguml::version \ No newline at end of file diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 969967b0..ffc38e33 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,11 +1,31 @@ file(GLOB_RECURSE TEST_CASE_SOURCES t*/*.cc t*/*.c t*/src/*.c) +file(GLOB_RECURSE TEST_CASE_MODULE_SOURCES t*/src/*.cppm) file(GLOB_RECURSE TEST_CASE_CONFIGS t*/.clang-uml) file(GLOB_RECURSE TEST_CONFIG_YMLS test_config_data/*.yml test_compilation_database_data/*.yml test_compilation_database_data/*.json) -set(TEST_CASES_REQUIRING_CXX20 t00056 t00058 t00059 t00065) +set(TEST_CASES_REQUIRING_CXX20 t00056 t00058 t00059 t00065 t00069) +set(TEST_CASES_REQUIRING_CXX20_MODULES t00070 t00071 t00072 + t30012 t30013 t30014 t30015) + +if(ENABLE_CXX_MODULES_TEST_CASES) + foreach(CXX20_MOD_TC ${TEST_CASES_REQUIRING_CXX20_MODULES}) + list(APPEND TEST_CASES_REQUIRING_CXX20 ${CXX20_MOD_TC}) + endforeach() + set(CMAKE_CXX_SCAN_FOR_MODULES ON) +else() + foreach(CXX20_MOD_TC ${TEST_CASES_REQUIRING_CXX20_MODULES}) + list(FILTER TEST_CASE_SOURCES + EXCLUDE + REGEX ".*${CXX20_MOD_TC}.*") + list(FILTER TEST_CASE_CONFIGS + EXCLUDE + REGEX ".*${CXX20_MOD_TC}.*") + + endforeach() +endif(ENABLE_CXX_MODULES_TEST_CASES) set(CLANG_UML_TEST_LIBRARIES clang-umllib @@ -19,6 +39,9 @@ endif(MSVC) list(FIND CMAKE_CXX_COMPILE_FEATURES cxx_std_20 SUPPORTS_CXX_STD_20) +message(STATUS "Enabling C++20 test cases") + +# Remove test cases which require C++20 if they are not supported here if(SUPPORTS_CXX_STD_20 EQUAL -1 OR ${LLVM_PACKAGE_VERSION} VERSION_LESS "14.0") set(ENABLE_CXX_STD_20_TEST_CASES 0) @@ -34,7 +57,14 @@ else() set(ENABLE_CXX_STD_20_TEST_CASES 1) endif() -set(TEST_CASES +if(APPLE) + # On Apple Clang header is not available + list(FILTER TEST_CASE_SOURCES + EXCLUDE + REGEX ".*t00069.*") +endif(APPLE) + +set(TEST_NAMES test_util test_model test_cases @@ -46,22 +76,31 @@ set(TEST_CASES test_thread_pool_executor test_query_driver_output_extractor) -foreach(TEST_NAME ${TEST_CASES}) - add_executable(${TEST_NAME} - ${TEST_NAME}.cc - $<$:${TEST_CASE_SOURCES}> - catch.h) +foreach(TEST_NAME ${TEST_NAMES}) + add_executable(${TEST_NAME}) + if(TEST_NAME STREQUAL "test_cases") + if(ENABLE_CXX_MODULES_TEST_CASES) + target_sources(${TEST_NAME} PUBLIC FILE_SET CXX_MODULES FILES + ${TEST_CASE_MODULE_SOURCES}) + endif(ENABLE_CXX_MODULES_TEST_CASES) + target_sources(${TEST_NAME} PUBLIC ${TEST_NAME}.cc + ${TEST_CASE_SOURCES} catch.h) + else() + target_sources(${TEST_NAME} PUBLIC ${TEST_NAME}.cc catch.h) + endif(TEST_NAME STREQUAL "test_cases") + target_compile_features(${TEST_NAME} PRIVATE $) target_compile_definitions(${TEST_NAME} PRIVATE - $<$:ENABLE_CXX_STD_20_TEST_CASES>) + $<$:ENABLE_CXX_STD_20_TEST_CASES> + $<$:ENABLE_CXX_MODULES_TEST_CASES>) target_compile_options(${TEST_NAME} PRIVATE $<$: $<$,$>: -Wno-unused-parameter -Wno-unused-variable -Wno-attributes -Wno-nonnull -Wno-deprecated-enum-enum-conversion ${CUSTOM_COMPILE_OPTIONS}> - $<$:/W1 /bigobj /wd4624>>) + $<$:/MP /MD /W1 /bigobj /wd4624>>) target_link_libraries(${TEST_NAME} PRIVATE ${CLANG_UML_TEST_LIBRARIES}) endforeach() @@ -89,6 +128,6 @@ foreach(TEST_CONFIG_YML ${TEST_CONFIG_YMLS}) COPYONLY) endforeach() -foreach(TEST_NAME ${TEST_CASES}) +foreach(TEST_NAME ${TEST_NAMES}) add_test(NAME ${TEST_NAME} COMMAND ${TEST_NAME}) endforeach() diff --git a/tests/t00002/test_case.h b/tests/t00002/test_case.h index 8e58d057..ed269e3a 100644 --- a/tests/t00002/test_case.h +++ b/tests/t00002/test_case.h @@ -1,7 +1,7 @@ /** * tests/t00002/test_case.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -93,6 +93,17 @@ TEST_CASE("t00002", "[test-case][class]") using namespace json; + const auto &A = get_element(j, "A"); + + CHECK(A.has_value()); + + CHECK(A.value()["type"] == "class"); + CHECK(A.value()["name"] == "A"); + CHECK(A.value()["display_name"] == "A"); + CHECK(A.value()["namespace"] == "clanguml::t00002"); + CHECK(A.value()["source_location"]["file"] == "t00002.cc"); + CHECK(A.value()["source_location"]["line"] == 7); + REQUIRE(HasTitle(j, "Basic class diagram example")); REQUIRE(IsClass(j, "A")); REQUIRE(IsClass(j, "B")); diff --git a/tests/t00003/test_case.h b/tests/t00003/test_case.h index d58bd6a1..9fc98f5a 100644 --- a/tests/t00003/test_case.h +++ b/tests/t00003/test_case.h @@ -1,7 +1,7 @@ /** * tests/t00003/test_case.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/t00004/test_case.h b/tests/t00004/test_case.h index c0f54989..1cf42b89 100644 --- a/tests/t00004/test_case.h +++ b/tests/t00004/test_case.h @@ -1,7 +1,7 @@ /** * tests/t00004/test_case.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/t00005/test_case.h b/tests/t00005/test_case.h index 7912b25d..b759a51f 100644 --- a/tests/t00005/test_case.h +++ b/tests/t00005/test_case.h @@ -1,7 +1,7 @@ /** * tests/t00005/test_case.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/t00006/test_case.h b/tests/t00006/test_case.h index 2c28e1c1..7757aa7f 100644 --- a/tests/t00006/test_case.h +++ b/tests/t00006/test_case.h @@ -1,7 +1,7 @@ /** * tests/t00006/test_case.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -98,10 +98,9 @@ TEST_CASE("t00006", "[test-case][class]") REQUIRE(IsClass(j, "NN")); REQUIRE(IsClass(j, "NNN")); - REQUIRE(IsAggregation( - j, "R", "custom_container", "e")); - REQUIRE(IsInstantiation( - j, "custom_container", "custom_container")); + REQUIRE(IsAggregation(j, "R", "custom_container", "e")); + REQUIRE( + IsInstantiation(j, "custom_container", "custom_container")); save_json(config.output_directory(), diagram->name + ".json", j); } diff --git a/tests/t00007/test_case.h b/tests/t00007/test_case.h index eaa3102f..98bf9855 100644 --- a/tests/t00007/test_case.h +++ b/tests/t00007/test_case.h @@ -1,7 +1,7 @@ /** * tests/t00007/test_case.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/t00008/test_case.h b/tests/t00008/test_case.h index c0a03a36..480500be 100644 --- a/tests/t00008/test_case.h +++ b/tests/t00008/test_case.h @@ -1,7 +1,7 @@ /** * tests/t00008/test_case.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -63,12 +63,7 @@ TEST_CASE("t00008", "[test-case][class]") using namespace json; -#if LLVM_VERSION_MAJOR >= 16 REQUIRE(IsClassTemplate(j, "A")); -#else - REQUIRE(IsClassTemplate( - j, "A")); -#endif REQUIRE(IsClassTemplate(j, "E::nested_template")); REQUIRE(IsClass(j, "E::nested_template")); diff --git a/tests/t00009/test_case.h b/tests/t00009/test_case.h index 1946f432..c72a3a00 100644 --- a/tests/t00009/test_case.h +++ b/tests/t00009/test_case.h @@ -1,7 +1,7 @@ /** * tests/t00009/test_case.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/t00010/test_case.h b/tests/t00010/test_case.h index cd86ec6a..83dca628 100644 --- a/tests/t00010/test_case.h +++ b/tests/t00010/test_case.h @@ -1,7 +1,7 @@ /** * tests/t00010/test_case.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/t00011/test_case.h b/tests/t00011/test_case.h index a59c6155..a5c7d53a 100644 --- a/tests/t00011/test_case.h +++ b/tests/t00011/test_case.h @@ -1,7 +1,7 @@ /** * tests/t00011/test_case.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/t00012/test_case.h b/tests/t00012/test_case.h index 3145eda6..8b1a9d6a 100644 --- a/tests/t00012/test_case.h +++ b/tests/t00012/test_case.h @@ -1,7 +1,7 @@ /** * tests/t00012/test_case.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/t00013/test_case.h b/tests/t00013/test_case.h index 9dfd2281..f12a999b 100644 --- a/tests/t00013/test_case.h +++ b/tests/t00013/test_case.h @@ -1,7 +1,7 @@ /** * tests/t00013/test_case.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/t00014/test_case.h b/tests/t00014/test_case.h index faec6fa7..0368ba2d 100644 --- a/tests/t00014/test_case.h +++ b/tests/t00014/test_case.h @@ -1,7 +1,7 @@ /** * tests/t00014/test_case.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/t00015/test_case.h b/tests/t00015/test_case.h index 17e930d6..42752d54 100644 --- a/tests/t00015/test_case.h +++ b/tests/t00015/test_case.h @@ -1,7 +1,7 @@ /** * tests/t00015/test_case.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/t00016/test_case.h b/tests/t00016/test_case.h index bbafe446..52b6bc3f 100644 --- a/tests/t00016/test_case.h +++ b/tests/t00016/test_case.h @@ -1,7 +1,7 @@ /** * tests/t00016/test_case.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/t00017/test_case.h b/tests/t00017/test_case.h index f41b6b5a..865764ba 100644 --- a/tests/t00017/test_case.h +++ b/tests/t00017/test_case.h @@ -1,7 +1,7 @@ /** * tests/t00017/test_case.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/t00018/test_case.h b/tests/t00018/test_case.h index 9f3f2f0f..8ca24e0b 100644 --- a/tests/t00018/test_case.h +++ b/tests/t00018/test_case.h @@ -1,7 +1,7 @@ /** * tests/t00018/test_case.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/t00019/test_case.h b/tests/t00019/test_case.h index b8b4dc35..d7bdb746 100644 --- a/tests/t00019/test_case.h +++ b/tests/t00019/test_case.h @@ -1,7 +1,7 @@ /** * tests/t00019/test_case.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/t00020/test_case.h b/tests/t00020/test_case.h index e64a9463..d959b04c 100644 --- a/tests/t00020/test_case.h +++ b/tests/t00020/test_case.h @@ -1,7 +1,7 @@ /** * tests/t00020/test_case.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/t00021/test_case.h b/tests/t00021/test_case.h index 1451d2ec..f916adf3 100644 --- a/tests/t00021/test_case.h +++ b/tests/t00021/test_case.h @@ -1,7 +1,7 @@ /** * tests/t00021/test_case.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/t00022/test_case.h b/tests/t00022/test_case.h index 3294ce30..ab38da8c 100644 --- a/tests/t00022/test_case.h +++ b/tests/t00022/test_case.h @@ -1,7 +1,7 @@ /** * tests/t00022/test_case.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/t00023/test_case.h b/tests/t00023/test_case.h index c76f72eb..a0c74506 100644 --- a/tests/t00023/test_case.h +++ b/tests/t00023/test_case.h @@ -1,7 +1,7 @@ /** * tests/t00023/test_case.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/t00024/test_case.h b/tests/t00024/test_case.h index 1d30537d..7ede8607 100644 --- a/tests/t00024/test_case.h +++ b/tests/t00024/test_case.h @@ -1,7 +1,7 @@ /** * tests/t00024/test_case.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/t00025/test_case.h b/tests/t00025/test_case.h index 061dfb95..c15ba9e9 100644 --- a/tests/t00025/test_case.h +++ b/tests/t00025/test_case.h @@ -1,7 +1,7 @@ /** * tests/t00025/test_case.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -62,8 +62,8 @@ TEST_CASE("t00025", "[test-case][class]") REQUIRE(IsClass(j, "Target1")); REQUIRE(IsClass(j, "Target2")); REQUIRE(IsClassTemplate(j, "Proxy")); - REQUIRE(IsDependency(j, "Proxy", "Target1")); - REQUIRE(IsDependency(j, "Proxy", "Target2")); + REQUIRE(IsDependency(j, "Proxy", "Target1")); + REQUIRE(IsDependency(j, "Proxy", "Target2")); save_json(config.output_directory(), diagram->name + ".json", j); } diff --git a/tests/t00026/test_case.h b/tests/t00026/test_case.h index 4b1ffdc6..3de355c2 100644 --- a/tests/t00026/test_case.h +++ b/tests/t00026/test_case.h @@ -1,7 +1,7 @@ /** * tests/t00026/test_case.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/t00027/test_case.h b/tests/t00027/test_case.h index df0534a6..e9cd07a8 100644 --- a/tests/t00027/test_case.h +++ b/tests/t00027/test_case.h @@ -1,7 +1,7 @@ /** * tests/t00027/test_case.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -67,12 +67,9 @@ TEST_CASE("t00027", "[test-case][class]") REQUIRE(IsAbstractClass(j, "ShapeDecorator")); REQUIRE(IsClassTemplate(j, "Line...>")); - REQUIRE(IsInstantiation( - j, "Line...>", "Line")); - REQUIRE(IsInstantiation(j, "Line...>", - "Line")); - REQUIRE(IsAggregation( - j, "Window", "Text", "description")); + REQUIRE(IsInstantiation(j, "Line...>", "Line")); + REQUIRE(IsInstantiation(j, "Line...>", "Line")); + REQUIRE(IsAggregation(j, "Window", "Text", "description")); save_json(config.output_directory(), diagram->name + ".json", j); } diff --git a/tests/t00028/test_case.h b/tests/t00028/test_case.h index 372a1038..77b8df35 100644 --- a/tests/t00028/test_case.h +++ b/tests/t00028/test_case.h @@ -1,7 +1,7 @@ /** * tests/t00028/test_case.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/t00029/test_case.h b/tests/t00029/test_case.h index de139312..c5ed006b 100644 --- a/tests/t00029/test_case.h +++ b/tests/t00029/test_case.h @@ -1,7 +1,7 @@ /** * tests/t00029/test_case.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/t00030/test_case.h b/tests/t00030/test_case.h index cb4ca72c..bd04683e 100644 --- a/tests/t00030/test_case.h +++ b/tests/t00030/test_case.h @@ -1,7 +1,7 @@ /** * tests/t00030/test_case.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/t00031/test_case.h b/tests/t00031/test_case.h index 921a4293..eb9d8c50 100644 --- a/tests/t00031/test_case.h +++ b/tests/t00031/test_case.h @@ -1,7 +1,7 @@ /** * tests/t00031/test_case.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/t00032/test_case.h b/tests/t00032/test_case.h index b444be75..09dad790 100644 --- a/tests/t00032/test_case.h +++ b/tests/t00032/test_case.h @@ -1,7 +1,7 @@ /** * tests/t00032/test_case.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -69,9 +69,7 @@ TEST_CASE("t00032", "[test-case][class]") using namespace json; - REQUIRE(IsBaseClass(j, "A", - "Overload")); + REQUIRE(IsBaseClass(j, "A", "Overload")); save_json(config.output_directory(), diagram->name + ".json", j); } diff --git a/tests/t00033/test_case.h b/tests/t00033/test_case.h index f07ce69d..4e9a9c61 100644 --- a/tests/t00033/test_case.h +++ b/tests/t00033/test_case.h @@ -1,7 +1,7 @@ /** * tests/t00033/test_case.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -61,13 +61,9 @@ TEST_CASE("t00033", "[test-case][class]") using namespace json; - REQUIRE(IsClass(j, - "A>>>")); - REQUIRE(IsDependency(j, - "A>>>", - "B>>")); + REQUIRE(IsClass(j, "A>>>")); + REQUIRE(IsDependency( + j, "A>>>", "B>>")); save_json(config.output_directory(), diagram->name + ".json", j); } diff --git a/tests/t00034/test_case.h b/tests/t00034/test_case.h index c6894e43..8a6858f7 100644 --- a/tests/t00034/test_case.h +++ b/tests/t00034/test_case.h @@ -1,7 +1,7 @@ /** * tests/t00034/test_case.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/t00035/test_case.h b/tests/t00035/test_case.h index 59b9976b..51018e78 100644 --- a/tests/t00035/test_case.h +++ b/tests/t00035/test_case.h @@ -1,7 +1,7 @@ /** * tests/t00035/test_case.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/t00036/t00036.cc b/tests/t00036/t00036.cc index 7fa9131c..e54e7e48 100644 --- a/tests/t00036/t00036.cc +++ b/tests/t00036/t00036.cc @@ -17,7 +17,7 @@ struct B { A a_int; }; -} +} // namespace ns111 } // namespace ns11 } // namespace ns1 @@ -29,8 +29,8 @@ struct C { }; struct D { }; -} -} +} // namespace ns22 +} // namespace ns2 namespace ns3 { namespace ns33 { diff --git a/tests/t00036/test_case.h b/tests/t00036/test_case.h index 80643126..12c58572 100644 --- a/tests/t00036/test_case.h +++ b/tests/t00036/test_case.h @@ -1,7 +1,7 @@ /** * tests/t00036/test_case.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -55,16 +55,20 @@ TEST_CASE("t00036", "[test-case][class]") auto j = generate_class_json(diagram, *model); using namespace json; + using namespace std::string_literals; REQUIRE(IsClass(j, "ns1::ns11::A")); REQUIRE(IsClass(j, "ns1::ns11::A")); REQUIRE(IsClass(j, "ns1::ns11::ns111::B")); REQUIRE(IsClass(j, "ns2::ns22::C")); REQUIRE(IsEnum(j, "ns1::E")); - REQUIRE(IsPackage(j, "ns1")); - REQUIRE(IsPackage(j, "ns1::ns11")); - REQUIRE(IsPackage(j, "ns1::ns11::ns111")); - REQUIRE(IsPackage(j, "ns2")); + REQUIRE(IsNamespacePackage(j, "ns1"s)); + REQUIRE(IsNamespacePackage(j, "ns1"s, "ns11"s)); + REQUIRE(IsNamespacePackage(j, "ns1"s, "ns11"s, "ns111"s)); + REQUIRE(IsNamespacePackage(j, "ns2"s)); + REQUIRE(IsNamespacePackage(j, "ns2"s, "ns22"s)); + REQUIRE(IsNamespacePackage(j, "ns3"s)); + REQUIRE(IsNamespacePackage(j, "ns3"s, "ns33"s)); save_json(config.output_directory(), diagram->name + ".json", j); } diff --git a/tests/t00037/test_case.h b/tests/t00037/test_case.h index 6742a1d1..e5e62d0f 100644 --- a/tests/t00037/test_case.h +++ b/tests/t00037/test_case.h @@ -1,7 +1,7 @@ /** * tests/t00037/test_case.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/t00038/test_case.h b/tests/t00038/test_case.h index b9d1e47c..38363ddc 100644 --- a/tests/t00038/test_case.h +++ b/tests/t00038/test_case.h @@ -1,7 +1,7 @@ /** * tests/t00038/test_case.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/t00039/test_case.h b/tests/t00039/test_case.h index d5edad61..9e4c562b 100644 --- a/tests/t00039/test_case.h +++ b/tests/t00039/test_case.h @@ -1,7 +1,7 @@ /** * tests/t00039/test_case.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/t00040/test_case.h b/tests/t00040/test_case.h index 8305da37..ec8b0181 100644 --- a/tests/t00040/test_case.h +++ b/tests/t00040/test_case.h @@ -1,7 +1,7 @@ /** * tests/t00040/test_case.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/t00041/test_case.h b/tests/t00041/test_case.h index 5d7f19cd..28fc90e3 100644 --- a/tests/t00041/test_case.h +++ b/tests/t00041/test_case.h @@ -1,7 +1,7 @@ /** * tests/t00041/test_case.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/t00042/test_case.h b/tests/t00042/test_case.h index 008cb13b..795220eb 100644 --- a/tests/t00042/test_case.h +++ b/tests/t00042/test_case.h @@ -1,7 +1,7 @@ /** * tests/t00042/test_case.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/t00043/test_case.h b/tests/t00043/test_case.h index 5355d787..abc539de 100644 --- a/tests/t00043/test_case.h +++ b/tests/t00043/test_case.h @@ -1,7 +1,7 @@ /** * tests/t00043/test_case.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/t00044/test_case.h b/tests/t00044/test_case.h index e20a1e6d..55610f86 100644 --- a/tests/t00044/test_case.h +++ b/tests/t00044/test_case.h @@ -1,7 +1,7 @@ /** * tests/t00044/test_case.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -75,8 +75,7 @@ TEST_CASE("t00044", "[test-case][class]") REQUIRE(IsClassTemplate(j, "signal_handler")); REQUIRE(IsClassTemplate(j, "signal_handler")); REQUIRE(IsClassTemplate(j, "signal_handler")); - REQUIRE(IsClassTemplate( - j, "sink>")); + REQUIRE(IsClassTemplate(j, "sink>")); REQUIRE(IsClass(j, "R")); save_json(config.output_directory(), diagram->name + ".json", j); diff --git a/tests/t00045/test_case.h b/tests/t00045/test_case.h index f2f2e2c5..604308b4 100644 --- a/tests/t00045/test_case.h +++ b/tests/t00045/test_case.h @@ -1,7 +1,7 @@ /** * tests/t00045/test_case.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/t00046/test_case.h b/tests/t00046/test_case.h index 11272ee2..1352f8b5 100644 --- a/tests/t00046/test_case.h +++ b/tests/t00046/test_case.h @@ -1,7 +1,7 @@ /** * tests/t00046/test_case.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/t00047/test_case.h b/tests/t00047/test_case.h index 69d341b8..19854832 100644 --- a/tests/t00047/test_case.h +++ b/tests/t00047/test_case.h @@ -1,7 +1,7 @@ /** * tests/t00047/test_case.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/t00048/test_case.h b/tests/t00048/test_case.h index 3bea43d1..38ecc80b 100644 --- a/tests/t00048/test_case.h +++ b/tests/t00048/test_case.h @@ -1,7 +1,7 @@ /** * tests/t00048/test_case.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/t00049/test_case.h b/tests/t00049/test_case.h index bf2f6474..01494fc3 100644 --- a/tests/t00049/test_case.h +++ b/tests/t00049/test_case.h @@ -1,7 +1,7 @@ /** * tests/t00049/test_case.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/t00050/test_case.h b/tests/t00050/test_case.h index cdb593b8..6a3c50dd 100644 --- a/tests/t00050/test_case.h +++ b/tests/t00050/test_case.h @@ -1,7 +1,7 @@ /** * tests/t00050/test_case.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/t00051/test_case.h b/tests/t00051/test_case.h index ed64654b..c2302184 100644 --- a/tests/t00051/test_case.h +++ b/tests/t00051/test_case.h @@ -1,7 +1,7 @@ /** * tests/t00051/test_case.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/t00052/test_case.h b/tests/t00052/test_case.h index 264bf190..32319443 100644 --- a/tests/t00052/test_case.h +++ b/tests/t00052/test_case.h @@ -1,7 +1,7 @@ /** * tests/t00052/test_case.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/t00053/test_case.h b/tests/t00053/test_case.h index 528b23ff..5cd14eb6 100644 --- a/tests/t00053/test_case.h +++ b/tests/t00053/test_case.h @@ -1,7 +1,7 @@ /** * tests/t00053/test_case.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/t00054/test_case.h b/tests/t00054/test_case.h index 060c4900..7fcf352a 100644 --- a/tests/t00054/test_case.h +++ b/tests/t00054/test_case.h @@ -1,7 +1,7 @@ /** * tests/t00054/test_case.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/t00055/test_case.h b/tests/t00055/test_case.h index 9f238ba7..f349d5bf 100644 --- a/tests/t00055/test_case.h +++ b/tests/t00055/test_case.h @@ -1,7 +1,7 @@ /** * tests/t00055/test_case.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/t00056/test_case.h b/tests/t00056/test_case.h index 418c5079..8d6efee1 100644 --- a/tests/t00056/test_case.h +++ b/tests/t00056/test_case.h @@ -1,7 +1,7 @@ /** * tests/t00056/test_case.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/t00057/test_case.h b/tests/t00057/test_case.h index e033db34..1a7331ea 100644 --- a/tests/t00057/test_case.h +++ b/tests/t00057/test_case.h @@ -1,7 +1,7 @@ /** * tests/t00057/test_case.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/t00058/test_case.h b/tests/t00058/test_case.h index aabb26a5..1a31bb60 100644 --- a/tests/t00058/test_case.h +++ b/tests/t00058/test_case.h @@ -1,7 +1,7 @@ /** * tests/t00058/test_case.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -75,8 +75,7 @@ TEST_CASE("t00058", "[test-case][class]") using namespace json; REQUIRE(IsClass(j, "A")); - REQUIRE(IsClass( - j, "B>")); + REQUIRE(IsClass(j, "B>")); save_json(config.output_directory(), diagram->name + ".json", j); } diff --git a/tests/t00059/test_case.h b/tests/t00059/test_case.h index 8449ca80..3f72389b 100644 --- a/tests/t00059/test_case.h +++ b/tests/t00059/test_case.h @@ -1,7 +1,7 @@ /** * tests/t00059/test_case.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/t00060/test_case.h b/tests/t00060/test_case.h index 3481b8a8..528bfcd4 100644 --- a/tests/t00060/test_case.h +++ b/tests/t00060/test_case.h @@ -1,7 +1,7 @@ /** * tests/t00060/test_case.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/t00061/test_case.h b/tests/t00061/test_case.h index 38df0dd5..64b5fdb1 100644 --- a/tests/t00061/test_case.h +++ b/tests/t00061/test_case.h @@ -1,7 +1,7 @@ /** * tests/t00061/test_case.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/t00062/test_case.h b/tests/t00062/test_case.h index d441f901..afa222c1 100644 --- a/tests/t00062/test_case.h +++ b/tests/t00062/test_case.h @@ -1,7 +1,7 @@ /** * tests/t00062/test_case.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/t00063/test_case.h b/tests/t00063/test_case.h index 3afc52b1..8eac17bc 100644 --- a/tests/t00063/test_case.h +++ b/tests/t00063/test_case.h @@ -1,7 +1,7 @@ /** * tests/t00063/test_case.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/t00064/test_case.h b/tests/t00064/test_case.h index 6cc3dfb8..c813798a 100644 --- a/tests/t00064/test_case.h +++ b/tests/t00064/test_case.h @@ -1,7 +1,7 @@ /** * tests/t00064/test_case.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/t00065/test_case.h b/tests/t00065/test_case.h index 0a1c0fdf..51ccc4c5 100644 --- a/tests/t00065/test_case.h +++ b/tests/t00065/test_case.h @@ -1,7 +1,7 @@ /** * tests/t00065/test_case.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -38,7 +38,7 @@ TEST_CASE("t00065", "[test-case][class]") // Check if all classes exist REQUIRE_THAT(src, IsClass(_A("R"))); REQUIRE_THAT(src, IsClass(_A("A"))); - REQUIRE_THAT(src, IsClass(_A("AImpl"))); + REQUIRE_THAT(src, IsClass(_A("detail::AImpl"))); REQUIRE_THAT(src, IsEnum(_A("XYZ"))); REQUIRE_THAT(src, IsEnum(_A("ABC"))); diff --git a/tests/t00066/test_case.h b/tests/t00066/test_case.h index 8492271c..37765b71 100644 --- a/tests/t00066/test_case.h +++ b/tests/t00066/test_case.h @@ -1,7 +1,7 @@ /** * tests/t00066/test_case.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/t00067/test_case.h b/tests/t00067/test_case.h index 45d77b35..b1142a5b 100644 --- a/tests/t00067/test_case.h +++ b/tests/t00067/test_case.h @@ -1,7 +1,7 @@ /** * tests/t00067/test_case.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/t00068/test_case.h b/tests/t00068/test_case.h index 543f17c5..19836b1b 100644 --- a/tests/t00068/test_case.h +++ b/tests/t00068/test_case.h @@ -1,7 +1,7 @@ /** * tests/t00068/test_case.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/t00069/.clang-uml b/tests/t00069/.clang-uml new file mode 100644 index 00000000..8b8d8450 --- /dev/null +++ b/tests/t00069/.clang-uml @@ -0,0 +1,9 @@ +diagrams: + t00069_class: + type: class + glob: + - t00069.cc + include: + namespaces: + - clanguml::t00069 + using_namespace: clanguml::t00069 \ No newline at end of file diff --git a/tests/t00069/t00069.cc b/tests/t00069/t00069.cc new file mode 100644 index 00000000..606b60b3 --- /dev/null +++ b/tests/t00069/t00069.cc @@ -0,0 +1,63 @@ +#include +#include + +namespace clanguml { +namespace t00069 { + +template struct generator { + struct promise_type; + using handle_type = std::coroutine_handle; + + generator(handle_type h) + : h_(h) + { + } + + ~generator() { h_.destroy(); } + + struct promise_type { + T value_; + std::exception_ptr exception_; + + generator get_return_object() + { + return generator(handle_type::from_promise(*this)); + } + std::suspend_always initial_suspend() { return {}; } + + std::suspend_always final_suspend() noexcept { return {}; } + + void unhandled_exception() { exception_ = std::current_exception(); } + + template From> + std::suspend_always yield_value(From &&from) + { + value_ = std::forward(from); + return {}; + } + + void return_void() { } + }; + + handle_type h_; + +private: + bool full_ = false; +}; + +class A { +public: + generator iota() { co_yield counter_++; } + + generator seed() + { + counter_ = 42; + co_return; + } + +private: + unsigned long counter_; +}; + +} // namespace t00069 +} // namespace clanguml diff --git a/tests/t00069/test_case.h b/tests/t00069/test_case.h new file mode 100644 index 00000000..069803e2 --- /dev/null +++ b/tests/t00069/test_case.h @@ -0,0 +1,87 @@ +/** + * tests/t00069/test_case.h + * + * Copyright (c) 2021-2024 Bartek Kryza + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +TEST_CASE("t00069", "[test-case][class]") +{ + auto [config, db] = load_config("t00069"); + + auto diagram = config.diagrams["t00069_class"]; + + REQUIRE(diagram->name == "t00069_class"); + + auto model = generate_class_diagram(*db, diagram); + + REQUIRE(model->name() == "t00069_class"); + + { + auto src = generate_class_puml(diagram, *model); + AliasMatcher _A(src); + + REQUIRE_THAT(src, StartsWith("@startuml")); + REQUIRE_THAT(src, EndsWith("@enduml\n")); + + // Check if all classes exist + REQUIRE_THAT(src, IsClass(_A("A"))); + + // Check if class templates exist + REQUIRE_THAT(src, IsClassTemplate("generator", "T")); + + // Check if all inner classes exist + REQUIRE_THAT(src, + IsInnerClass(_A("generator"), _A("generator::promise_type"))); + + // Check if all methods exist + REQUIRE_THAT(src, + (IsMethod("iota", "generator"))); + REQUIRE_THAT(src, + (IsMethod("seed", "generator"))); + + // Check if all relationships exist + REQUIRE_THAT( + src, IsDependency(_A("A"), _A("generator"))); + REQUIRE_THAT(src, + IsInstantiation( + _A("generator"), _A("generator"))); + + save_puml(config.output_directory(), diagram->name + ".puml", src); + } + + { + auto j = generate_class_json(diagram, *model); + + using namespace json; + + save_json(config.output_directory(), diagram->name + ".json", j); + } + + { + auto src = generate_class_mermaid(diagram, *model); + + mermaid::AliasMatcher _A(src); + using mermaid::IsClass; + using mermaid::IsMethod; + + REQUIRE_THAT(src, IsClass(_A("A"))); + REQUIRE_THAT(src, + (IsMethod("iota", "generator"))); + REQUIRE_THAT(src, + (IsMethod("seed", "generator"))); + + save_mermaid(config.output_directory(), diagram->name + ".mmd", src); + } +} \ No newline at end of file diff --git a/tests/t00070/.clang-uml b/tests/t00070/.clang-uml new file mode 100644 index 00000000..8a9971a6 --- /dev/null +++ b/tests/t00070/.clang-uml @@ -0,0 +1,14 @@ +diagrams: + t00070_class: + type: class + glob: + - t00070.cc + include: + modules: + - t00070 + exclude: + modules: + - t00070.lib2 + module_access: + - private + using_namespace: clanguml::t00070 \ No newline at end of file diff --git a/tests/t00070/src/common.cppm b/tests/t00070/src/common.cppm new file mode 100644 index 00000000..682316c9 --- /dev/null +++ b/tests/t00070/src/common.cppm @@ -0,0 +1,11 @@ +export module t00070; +export import t00070.lib1; +export import t00070.lib2; + +export namespace clanguml::t00070 { +class A { + int get() { return a; } + + int a; +}; +} \ No newline at end of file diff --git a/tests/t00070/src/lib1.cppm b/tests/t00070/src/lib1.cppm new file mode 100644 index 00000000..4b0530bf --- /dev/null +++ b/tests/t00070/src/lib1.cppm @@ -0,0 +1,16 @@ +export module t00070.lib1; + +export namespace clanguml::t00070 { +class B { }; + +template class BB { + T t; +}; + +enum class BBB { bbb1, bbb2 }; +} + +module :private; +namespace clanguml::t00070 { +class BBBB { }; +} \ No newline at end of file diff --git a/tests/t00070/src/lib2.cppm b/tests/t00070/src/lib2.cppm new file mode 100644 index 00000000..1d2a8cac --- /dev/null +++ b/tests/t00070/src/lib2.cppm @@ -0,0 +1,11 @@ +export module t00070.lib2; + +export namespace clanguml::t00070 { +class C { }; + +template class CC { + T t; +}; + +enum class CCC { ccc1, ccc2 }; +} \ No newline at end of file diff --git a/tests/t00070/t00070.cc b/tests/t00070/t00070.cc new file mode 100644 index 00000000..4035efce --- /dev/null +++ b/tests/t00070/t00070.cc @@ -0,0 +1,15 @@ +import t00070; +import t00070.lib1; +import t00070.lib2; + +namespace clanguml { +namespace t00070 { +int tmain() +{ + B b; + C c; + + return 0; +} +} +} \ No newline at end of file diff --git a/tests/t00070/test_case.h b/tests/t00070/test_case.h new file mode 100644 index 00000000..59227728 --- /dev/null +++ b/tests/t00070/test_case.h @@ -0,0 +1,89 @@ +/** + * tests/t00070/test_case.h + * + * Copyright (c) 2021-2024 Bartek Kryza + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +TEST_CASE("t00070", "[test-case][class]") +{ + auto [config, db] = load_config("t00070"); + + auto diagram = config.diagrams["t00070_class"]; + + REQUIRE(diagram->name == "t00070_class"); + + auto model = generate_class_diagram(*db, diagram); + + REQUIRE(model->name() == "t00070_class"); + + { + auto src = generate_class_puml(diagram, *model); + AliasMatcher _A(src); + + REQUIRE_THAT(src, StartsWith("@startuml")); + REQUIRE_THAT(src, EndsWith("@enduml\n")); + + REQUIRE_THAT(src, IsClass(_A("A"))); + REQUIRE_THAT(src, IsClass(_A("B"))); + REQUIRE_THAT(src, !IsClass(_A("C"))); + + REQUIRE_THAT(src, IsClassTemplate("BB", "T")); + REQUIRE_THAT(src, !IsClassTemplate("CC", "T")); + + REQUIRE_THAT(src, IsEnum(_A("BBB"))); + REQUIRE_THAT(src, !IsClass(_A("BBBB"))); + REQUIRE_THAT(src, !IsEnum(_A("CCC"))); + + save_puml(config.output_directory(), diagram->name + ".puml", src); + } + + { + auto j = generate_class_json(diagram, *model); + + using namespace json; + + REQUIRE(IsClass(j, "A")); + REQUIRE(IsClass(j, "B")); + REQUIRE(!IsClass(j, "C")); + + REQUIRE(InPublicModule(j, "A", "t00070")); + REQUIRE(InPublicModule(j, "B", "t00070.lib1")); + + REQUIRE(!IsClass(j, "BBBB")); + + save_json(config.output_directory(), diagram->name + ".json", j); + } + + { + auto src = generate_class_mermaid(diagram, *model); + + mermaid::AliasMatcher _A(src); + using mermaid::IsClass; + using mermaid::IsEnum; + + REQUIRE_THAT(src, IsClass(_A("A"))); + REQUIRE_THAT(src, IsClass(_A("B"))); + REQUIRE_THAT(src, !IsClass(_A("C"))); + + REQUIRE_THAT(src, IsClass(_A("BB"))); + REQUIRE_THAT(src, !IsClass(_A("CC"))); + + REQUIRE_THAT(src, IsEnum(_A("BBB"))); + REQUIRE_THAT(src, !IsClass(_A("BBBB"))); + REQUIRE_THAT(src, !IsEnum(_A("CCC"))); + + save_mermaid(config.output_directory(), diagram->name + ".mmd", src); + } +} \ No newline at end of file diff --git a/tests/t00071/.clang-uml b/tests/t00071/.clang-uml new file mode 100644 index 00000000..1e063e26 --- /dev/null +++ b/tests/t00071/.clang-uml @@ -0,0 +1,12 @@ +diagrams: + t00071_class: + type: class + glob: + - t00071.cc + include: + namespaces: + - clanguml::t00071 + generate_packages: true + package_type: module + using_namespace: clanguml::t00071 + using_module: t00071 \ No newline at end of file diff --git a/tests/t00071/src/lib1.cppm b/tests/t00071/src/lib1.cppm new file mode 100644 index 00000000..62c833db --- /dev/null +++ b/tests/t00071/src/lib1.cppm @@ -0,0 +1,13 @@ +export module t00071.app.lib1; + +export namespace clanguml::t00071 { +class B { }; + +template class BB { + T t; +}; + +namespace detail { +enum class BBB { bbb1, bbb2 }; +} // namespace detail +} \ No newline at end of file diff --git a/tests/t00071/src/lib1mod1.cppm b/tests/t00071/src/lib1mod1.cppm new file mode 100644 index 00000000..1734e8e7 --- /dev/null +++ b/tests/t00071/src/lib1mod1.cppm @@ -0,0 +1,5 @@ +export module t00071.app.lib1.mod1; + +export namespace clanguml::t00071 { +class D { }; +} \ No newline at end of file diff --git a/tests/t00071/src/lib1mod2.cppm b/tests/t00071/src/lib1mod2.cppm new file mode 100644 index 00000000..7bb97560 --- /dev/null +++ b/tests/t00071/src/lib1mod2.cppm @@ -0,0 +1,5 @@ +export module t00071.app.lib1.mod2; + +export namespace clanguml::t00071 { +class E { }; +} \ No newline at end of file diff --git a/tests/t00071/src/lib2.cppm b/tests/t00071/src/lib2.cppm new file mode 100644 index 00000000..591f15b5 --- /dev/null +++ b/tests/t00071/src/lib2.cppm @@ -0,0 +1,13 @@ +export module t00071.app.lib2; + +export namespace clanguml::t00071 { +class C { }; + +template class CC { + T t; +}; + +namespace detail { +enum class CCC { ccc1, ccc2 }; +} +} \ No newline at end of file diff --git a/tests/t00071/src/t00071_mod.cppm b/tests/t00071/src/t00071_mod.cppm new file mode 100644 index 00000000..0df8e4bb --- /dev/null +++ b/tests/t00071/src/t00071_mod.cppm @@ -0,0 +1,11 @@ +export module t00071.app; +export import t00071.app.lib1; +export import t00071.app.lib2; + +export namespace clanguml::t00071 { +class A { + int get() { return a; } + + int a; +}; +} \ No newline at end of file diff --git a/tests/t00071/t00071.cc b/tests/t00071/t00071.cc new file mode 100644 index 00000000..cfc6f65f --- /dev/null +++ b/tests/t00071/t00071.cc @@ -0,0 +1,15 @@ +import t00071.app; +import t00071.app.lib1; +import t00071.app.lib1.mod1; +import t00071.app.lib1.mod2; +import t00071.app.lib2; + +namespace clanguml { +namespace t00071 { +class R { + A *a; + B *b; + C *c; +}; +} +} \ No newline at end of file diff --git a/tests/t00071/test_case.h b/tests/t00071/test_case.h new file mode 100644 index 00000000..21821d2d --- /dev/null +++ b/tests/t00071/test_case.h @@ -0,0 +1,76 @@ +/** + * tests/t00071/test_case.h + * + * Copyright (c) 2021-2024 Bartek Kryza + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +TEST_CASE("t00071", "[test-case][class]") +{ + auto [config, db] = load_config("t00071"); + + auto diagram = config.diagrams["t00071_class"]; + + REQUIRE(diagram->name == "t00071_class"); + + auto model = generate_class_diagram(*db, diagram); + + REQUIRE(model->name() == "t00071_class"); + + { + auto src = generate_class_puml(diagram, *model); + AliasMatcher _A(src); + + REQUIRE_THAT(src, StartsWith("@startuml")); + REQUIRE_THAT(src, EndsWith("@enduml\n")); + + REQUIRE_THAT(src, IsClass(_A("A"))); + REQUIRE_THAT(src, IsClass(_A("R"))); + + REQUIRE_THAT(src, IsEnum(_A("detail::BBB"))); + REQUIRE_THAT(src, IsEnum(_A("detail::CCC"))); + + save_puml(config.output_directory(), diagram->name + ".puml", src); + } + + { + auto j = generate_class_json(diagram, *model); + + using namespace json; + using namespace std::string_literals; + + REQUIRE(IsModulePackage(j, "app"s)); + REQUIRE(IsModulePackage(j, "app"s, "lib1"s)); + REQUIRE(IsModulePackage(j, "app"s, "lib1"s, "mod1"s)); + REQUIRE(IsModulePackage(j, "app"s, "lib1"s, "mod2"s)); + + save_json(config.output_directory(), diagram->name + ".json", j); + } + + { + auto src = generate_class_mermaid(diagram, *model); + + mermaid::AliasMatcher _A(src); + using mermaid::IsClass; + using mermaid::IsEnum; + + REQUIRE_THAT(src, IsClass(_A("A"))); + REQUIRE_THAT(src, IsClass(_A("R"))); + + REQUIRE_THAT(src, IsEnum(_A("detail::BBB"))); + REQUIRE_THAT(src, IsEnum(_A("detail::CCC"))); + + save_mermaid(config.output_directory(), diagram->name + ".mmd", src); + } +} \ No newline at end of file diff --git a/tests/t00072/.clang-uml b/tests/t00072/.clang-uml new file mode 100644 index 00000000..29b85640 --- /dev/null +++ b/tests/t00072/.clang-uml @@ -0,0 +1,12 @@ +diagrams: + t00072_class: + type: class + glob: + - t00072.cc + generate_packages: true + package_type: module + include: + modules: + - t00072 + using_module: t00072 + using_namespace: clanguml::t00072 \ No newline at end of file diff --git a/tests/t00072/src/lib1.cppm b/tests/t00072/src/lib1.cppm new file mode 100644 index 00000000..8c4cc928 --- /dev/null +++ b/tests/t00072/src/lib1.cppm @@ -0,0 +1,13 @@ +export module t00072.app:lib1; + +export namespace clanguml::t00072 { +class B { }; + +template class BB { + T t; +}; + +namespace detail { +enum class BBB { bbb1, bbb2 }; +} // namespace detail +} \ No newline at end of file diff --git a/tests/t00072/src/lib1mod1.cppm b/tests/t00072/src/lib1mod1.cppm new file mode 100644 index 00000000..106b822e --- /dev/null +++ b/tests/t00072/src/lib1mod1.cppm @@ -0,0 +1,5 @@ +export module t00072.app:lib1.mod1; + +export namespace clanguml::t00072 { +class D { }; +} \ No newline at end of file diff --git a/tests/t00072/src/lib1mod2.cppm b/tests/t00072/src/lib1mod2.cppm new file mode 100644 index 00000000..4cb25b28 --- /dev/null +++ b/tests/t00072/src/lib1mod2.cppm @@ -0,0 +1,5 @@ +export module t00072.app:lib1.mod2; + +export namespace clanguml::t00072 { +class E { }; +} \ No newline at end of file diff --git a/tests/t00072/src/lib2.cppm b/tests/t00072/src/lib2.cppm new file mode 100644 index 00000000..617c545d --- /dev/null +++ b/tests/t00072/src/lib2.cppm @@ -0,0 +1,13 @@ +export module t00072.app:lib2; + +export namespace clanguml::t00072 { +class C { }; + +template class CC { + T t; +}; + +namespace detail { +enum class CCC { ccc1, ccc2 }; +} +} \ No newline at end of file diff --git a/tests/t00072/src/t00072_mod.cppm b/tests/t00072/src/t00072_mod.cppm new file mode 100644 index 00000000..ad905d03 --- /dev/null +++ b/tests/t00072/src/t00072_mod.cppm @@ -0,0 +1,13 @@ +export module t00072.app; +export import :lib1; +export import :lib1.mod1; +export import :lib1.mod2; +export import :lib2; + +export namespace clanguml::t00072 { +class A { + int get() { return a; } + + int a; +}; +} \ No newline at end of file diff --git a/tests/t00072/t00072.cc b/tests/t00072/t00072.cc new file mode 100644 index 00000000..d7dc2f1f --- /dev/null +++ b/tests/t00072/t00072.cc @@ -0,0 +1,6 @@ +import t00072.app; + +namespace clanguml { +namespace t00072 { +} +} \ No newline at end of file diff --git a/tests/t00072/test_case.h b/tests/t00072/test_case.h new file mode 100644 index 00000000..10252aed --- /dev/null +++ b/tests/t00072/test_case.h @@ -0,0 +1,103 @@ +/** + * tests/t00072/test_case.h + * + * Copyright (c) 2021-2024 Bartek Kryza + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +TEST_CASE("t00072", "[test-case][class]") +{ + auto [config, db] = load_config("t00072"); + + auto diagram = config.diagrams["t00072_class"]; + + REQUIRE(diagram->name == "t00072_class"); + + auto model = generate_class_diagram(*db, diagram); + + REQUIRE(model->name() == "t00072_class"); + + { + auto src = generate_class_puml(diagram, *model); + AliasMatcher _A(src); + + REQUIRE_THAT(src, StartsWith("@startuml")); + REQUIRE_THAT(src, EndsWith("@enduml\n")); + + // Check if all classes exist + REQUIRE_THAT(src, IsPackage("app")); + REQUIRE_THAT(src, IsPackage(":lib1")); + REQUIRE_THAT(src, IsPackage(":lib2")); + REQUIRE_THAT(src, IsPackage("mod1")); + REQUIRE_THAT(src, IsPackage("mod2")); + + REQUIRE_THAT(src, IsClass(_A("A"))); + REQUIRE_THAT(src, IsClass(_A("C"))); + REQUIRE_THAT(src, IsClassTemplate("CC", "T")); + REQUIRE_THAT(src, IsEnum(_A("detail::CCC"))); + + REQUIRE_THAT(src, IsClass(_A("B"))); + REQUIRE_THAT(src, IsClassTemplate("BB", "T")); + REQUIRE_THAT(src, IsEnum(_A("detail::BBB"))); + + REQUIRE_THAT(src, IsClass(_A("D"))); + REQUIRE_THAT(src, IsClass(_A("E"))); + + save_puml(config.output_directory(), diagram->name + ".puml", src); + } + + { + auto j = generate_class_json(diagram, *model); + + using namespace json; + using namespace std::string_literals; + + REQUIRE(IsClass(j, "A")); + REQUIRE(IsClass(j, "B")); + REQUIRE(IsClass(j, "C")); + REQUIRE(IsClass(j, "D")); + REQUIRE(IsEnum(j, "detail::CCC")); + REQUIRE(IsEnum(j, "detail::BBB")); + + REQUIRE(IsModulePackage(j, "app"s)); + REQUIRE(IsModulePackage(j, "app"s, ":lib1"s)); + REQUIRE(IsModulePackage(j, "app"s, ":lib1"s, "mod1"s)); + REQUIRE(IsModulePackage(j, "app"s, ":lib1"s, "mod2"s)); + REQUIRE(IsModulePackage(j, "app"s, ":lib2"s)); + + save_json(config.output_directory(), diagram->name + ".json", j); + } + + { + auto src = generate_class_mermaid(diagram, *model); + + mermaid::AliasMatcher _A(src); + using mermaid::IsClass; + using mermaid::IsEnum; + + REQUIRE_THAT(src, IsClass(_A("A"))); + REQUIRE_THAT(src, IsClass(_A("C"))); + REQUIRE_THAT(src, IsClass(_A("CC"))); + REQUIRE_THAT(src, IsEnum(_A("detail::CCC"))); + + REQUIRE_THAT(src, IsClass(_A("B"))); + REQUIRE_THAT(src, IsClass(_A("BB"))); + REQUIRE_THAT(src, IsEnum(_A("detail::BBB"))); + + REQUIRE_THAT(src, IsClass(_A("D"))); + REQUIRE_THAT(src, IsClass(_A("E"))); + + save_mermaid(config.output_directory(), diagram->name + ".mmd", src); + } +} \ No newline at end of file diff --git a/tests/t20001/test_case.h b/tests/t20001/test_case.h index 6f601ad2..f06f150d 100644 --- a/tests/t20001/test_case.h +++ b/tests/t20001/test_case.h @@ -1,7 +1,7 @@ /** * tests/t20001/test_case.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -58,6 +58,28 @@ TEST_CASE("t20001", "[test-case][sequence]") using namespace json; + const auto &A = get_participant(j, "A"); + + CHECK(A.has_value()); + + CHECK(A.value()["type"] == "class"); + CHECK(A.value()["name"] == "A"); + CHECK(A.value()["display_name"] == "A"); + CHECK(A.value()["namespace"] == "clanguml::t20001"); + CHECK(A.value()["source_location"]["file"] == "t20001.cc"); + CHECK(A.value()["source_location"]["line"] == 13); + + const auto &tmain = get_participant(j, "tmain()"); + + CHECK(tmain.has_value()); + + CHECK(tmain.value()["type"] == "function"); + CHECK(tmain.value()["name"] == "tmain"); + CHECK(tmain.value()["display_name"] == "tmain()"); + CHECK(tmain.value()["namespace"] == "clanguml::t20001"); + CHECK(tmain.value()["source_location"]["file"] == "t20001.cc"); + CHECK(tmain.value()["source_location"]["line"] == 61); + REQUIRE(HasTitle(j, "Basic sequence diagram example")); REQUIRE(IsFunctionParticipant(j, "tmain()")); @@ -76,6 +98,7 @@ TEST_CASE("t20001", "[test-case][sequence]") save_json(config.output_directory(), diagram->name + ".json", j); } + { auto src = generate_sequence_mermaid(diagram, *model); mermaid::SequenceDiagramAliasMatcher _A(src); diff --git a/tests/t20002/test_case.h b/tests/t20002/test_case.h index 03986b0c..65b08719 100644 --- a/tests/t20002/test_case.h +++ b/tests/t20002/test_case.h @@ -1,7 +1,7 @@ /** * tests/t20002/test_case.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/t20003/test_case.h b/tests/t20003/test_case.h index 7a5dce25..6d8fbe3c 100644 --- a/tests/t20003/test_case.h +++ b/tests/t20003/test_case.h @@ -1,7 +1,7 @@ /** * tests/t20003/test_case.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/t20004/test_case.h b/tests/t20004/test_case.h index 70747fb6..67b37ed9 100644 --- a/tests/t20004/test_case.h +++ b/tests/t20004/test_case.h @@ -1,7 +1,7 @@ /** * tests/t20004/test_case.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/t20005/test_case.h b/tests/t20005/test_case.h index ac336b83..330bbdb1 100644 --- a/tests/t20005/test_case.h +++ b/tests/t20005/test_case.h @@ -1,7 +1,7 @@ /** * tests/t20005/test_case.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/t20006/test_case.h b/tests/t20006/test_case.h index 65c2bed2..c825244f 100644 --- a/tests/t20006/test_case.h +++ b/tests/t20006/test_case.h @@ -1,7 +1,7 @@ /** * tests/t20006/test_case.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/t20007/test_case.h b/tests/t20007/test_case.h index d6ee8025..97cfa231 100644 --- a/tests/t20007/test_case.h +++ b/tests/t20007/test_case.h @@ -1,7 +1,7 @@ /** * tests/t20007/test_case.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/t20008/test_case.h b/tests/t20008/test_case.h index c6bc3497..0a98e6fd 100644 --- a/tests/t20008/test_case.h +++ b/tests/t20008/test_case.h @@ -1,7 +1,7 @@ /** * tests/t20008/test_case.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/t20009/test_case.h b/tests/t20009/test_case.h index 905d034f..64bc4235 100644 --- a/tests/t20009/test_case.h +++ b/tests/t20009/test_case.h @@ -1,7 +1,7 @@ /** * tests/t20009/test_case.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/t20010/test_case.h b/tests/t20010/test_case.h index 99f842d4..a4e0f76c 100644 --- a/tests/t20010/test_case.h +++ b/tests/t20010/test_case.h @@ -1,7 +1,7 @@ /** * tests/t20010/test_case.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/t20011/test_case.h b/tests/t20011/test_case.h index bda7d30b..e6f4b81a 100644 --- a/tests/t20011/test_case.h +++ b/tests/t20011/test_case.h @@ -1,7 +1,7 @@ /** * tests/t20011/test_case.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/t20012/test_case.h b/tests/t20012/test_case.h index 1212189a..12100f25 100644 --- a/tests/t20012/test_case.h +++ b/tests/t20012/test_case.h @@ -1,7 +1,7 @@ /** * test_case.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/t20013/test_case.h b/tests/t20013/test_case.h index 3f3144d2..733f7e20 100644 --- a/tests/t20013/test_case.h +++ b/tests/t20013/test_case.h @@ -1,7 +1,7 @@ /** * tests/t20013/test_case.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/t20014/test_case.h b/tests/t20014/test_case.h index 6f99d24e..8bb84bbc 100644 --- a/tests/t20014/test_case.h +++ b/tests/t20014/test_case.h @@ -1,7 +1,7 @@ /** * tests/t20014/test_case.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -58,9 +58,8 @@ TEST_CASE("t20014", "[test-case][sequence]") FindMessage(j, "B", "A", "a1(int,int)"), FindMessage(j, "tmain()", "B", "b2(int,int)"), FindMessage(j, "B", "A", "a2(int,int)"), - FindMessage( - j, "tmain()", "C", "c1(int,int)"), - FindMessage(j, "C", "B", "b1(int,int)")}; + FindMessage(j, "tmain()", "C", "c1(int,int)"), + FindMessage(j, "C", "B", "b1(int,int)")}; REQUIRE(std::is_sorted(messages.begin(), messages.end())); diff --git a/tests/t20015/test_case.h b/tests/t20015/test_case.h index c2c50ddc..259cafb7 100644 --- a/tests/t20015/test_case.h +++ b/tests/t20015/test_case.h @@ -1,7 +1,7 @@ /** * tests/t20015/test_case.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/t20016/test_case.h b/tests/t20016/test_case.h index 5110b8fe..b9bf1d12 100644 --- a/tests/t20016/test_case.h +++ b/tests/t20016/test_case.h @@ -1,7 +1,7 @@ /** * tests/t20016/test_case.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/t20017/test_case.h b/tests/t20017/test_case.h index aa72a696..37519ce6 100644 --- a/tests/t20017/test_case.h +++ b/tests/t20017/test_case.h @@ -1,7 +1,7 @@ /** * tests/t20017/test_case.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -57,6 +57,14 @@ TEST_CASE("t20017", "[test-case][sequence]") using namespace json; + const auto &t20017_cc = get_participant(j, "t20017.cc"); + + CHECK(t20017_cc.has_value()); + + CHECK(t20017_cc.value()["type"] == "file"); + CHECK(t20017_cc.value()["name"] == "t20017.cc"); + CHECK(t20017_cc.value()["display_name"] == "t20017.cc"); + std::vector messages = { FindMessage(j, File("t20017.cc"), File("include/t20017_a.h"), "a3(int,int)"), diff --git a/tests/t20018/test_case.h b/tests/t20018/test_case.h index 5a2448f1..ae618cae 100644 --- a/tests/t20018/test_case.h +++ b/tests/t20018/test_case.h @@ -1,7 +1,7 @@ /** * tests/t20018/test_case.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -62,10 +62,9 @@ TEST_CASE("t20018", "[test-case][sequence]") using namespace json; std::vector messages = { - FindMessage(j, "tmain()", - "Answer,120>", "print()"), - FindMessage(j, "Answer,120>", - "Factorial<5>", "print(int)"), + FindMessage(j, "tmain()", "Answer,120>", "print()"), + FindMessage( + j, "Answer,120>", "Factorial<5>", "print(int)"), FindMessage(j, "Factorial<5>", "Factorial<4>", "print(int)"), FindMessage(j, "Factorial<4>", "Factorial<3>", "print(int)"), FindMessage(j, "Factorial<3>", "Factorial<2>", "print(int)"), diff --git a/tests/t20019/test_case.h b/tests/t20019/test_case.h index e7622860..195655ff 100644 --- a/tests/t20019/test_case.h +++ b/tests/t20019/test_case.h @@ -1,7 +1,7 @@ /** * tests/t20019/test_case.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -50,10 +50,10 @@ TEST_CASE("t20019", "[test-case][sequence]") using namespace json; std::vector messages = { - FindMessage(j, "tmain()", "Base", "name()"), - FindMessage(j, "Base", "D1", "impl()"), - FindMessage(j, "tmain()", "Base", "name()"), - FindMessage(j, "Base", "D2", "impl()")}; + FindMessage(j, "tmain()", "Base", "name()"), + FindMessage(j, "Base", "D1", "impl()"), + FindMessage(j, "tmain()", "Base", "name()"), + FindMessage(j, "Base", "D2", "impl()")}; REQUIRE(std::is_sorted(messages.begin(), messages.end())); diff --git a/tests/t20020/test_case.h b/tests/t20020/test_case.h index b68a840d..bc5c2d0d 100644 --- a/tests/t20020/test_case.h +++ b/tests/t20020/test_case.h @@ -1,7 +1,7 @@ /** * tests/t20020/test_case.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/t20021/test_case.h b/tests/t20021/test_case.h index 2eed83c1..afcedf98 100644 --- a/tests/t20021/test_case.h +++ b/tests/t20021/test_case.h @@ -1,7 +1,7 @@ /** * tests/t20021/test_case.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/t20022/test_case.h b/tests/t20022/test_case.h index 19b88900..330e14fa 100644 --- a/tests/t20022/test_case.h +++ b/tests/t20022/test_case.h @@ -1,7 +1,7 @@ /** * tests/t20022/test_case.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/t20023/test_case.h b/tests/t20023/test_case.h index ad50dbb6..130d06b8 100644 --- a/tests/t20023/test_case.h +++ b/tests/t20023/test_case.h @@ -1,7 +1,7 @@ /** * tests/t20023/test_case.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/t20024/test_case.h b/tests/t20024/test_case.h index 00257fe8..46d85a0b 100644 --- a/tests/t20024/test_case.h +++ b/tests/t20024/test_case.h @@ -1,7 +1,7 @@ /** * tests/t20024/test_case.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/t20025/test_case.h b/tests/t20025/test_case.h index 3ece860b..2875c4f7 100644 --- a/tests/t20025/test_case.h +++ b/tests/t20025/test_case.h @@ -1,7 +1,7 @@ /** * tests/t20025/test_case.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/t20026/test_case.h b/tests/t20026/test_case.h index 1151622a..be0bf34d 100644 --- a/tests/t20026/test_case.h +++ b/tests/t20026/test_case.h @@ -1,7 +1,7 @@ /** * tests/t20026/test_case.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/t20027/test_case.h b/tests/t20027/test_case.h index d91b462b..97f42249 100644 --- a/tests/t20027/test_case.h +++ b/tests/t20027/test_case.h @@ -1,7 +1,7 @@ /** * tests/t20027/test_case.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/t20028/test_case.h b/tests/t20028/test_case.h index 48feb7a7..e0947a9f 100644 --- a/tests/t20028/test_case.h +++ b/tests/t20028/test_case.h @@ -1,7 +1,7 @@ /** * tests/t20028/test_case.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/t20029/test_case.h b/tests/t20029/test_case.h index 8ae6262a..cfbfc6c4 100644 --- a/tests/t20029/test_case.h +++ b/tests/t20029/test_case.h @@ -1,7 +1,7 @@ /** * tests/t20029/test_case.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -88,17 +88,12 @@ TEST_CASE("t20029", "[test-case][sequence]") using namespace json; + REQUIRE(!j["participants"].is_null()); + std::vector messages = { FindMessage(j, "tmain()", "ConnectionPool", "connect()"), - FindMessage(j, "tmain()", - "Encoder>", - "send(std::string &&)")/*, - FindMessage(j, - "Encoder>", - "encode_b64(std::string &&)", "encode_b64(std::string &&)"), - FindMessage(j, "Retrier", - "ConnectionPool", "send(const std::string &)")*/}; + FindMessage(j, "tmain()", "Encoder>", + "send(std::string &&)")}; REQUIRE(std::is_sorted(messages.begin(), messages.end())); diff --git a/tests/t20030/test_case.h b/tests/t20030/test_case.h index 38b24cdb..fdda6293 100644 --- a/tests/t20030/test_case.h +++ b/tests/t20030/test_case.h @@ -1,7 +1,7 @@ /** * tests/t20030/test_case.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/t20031/test_case.h b/tests/t20031/test_case.h index f9726b91..f325cb53 100644 --- a/tests/t20031/test_case.h +++ b/tests/t20031/test_case.h @@ -1,7 +1,7 @@ /** * tests/t20031/test_case.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/t20032/test_case.h b/tests/t20032/test_case.h index 5116c4ba..c056ed62 100644 --- a/tests/t20032/test_case.h +++ b/tests/t20032/test_case.h @@ -1,7 +1,7 @@ /** * tests/t20032/test_case.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/t20033/test_case.h b/tests/t20033/test_case.h index 131acc81..f1f10c63 100644 --- a/tests/t20033/test_case.h +++ b/tests/t20033/test_case.h @@ -1,7 +1,7 @@ /** * tests/t20033/test_case.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/t20034/test_case.h b/tests/t20034/test_case.h index c08ef64f..26290368 100644 --- a/tests/t20034/test_case.h +++ b/tests/t20034/test_case.h @@ -1,7 +1,7 @@ /** * tests/t20034/test_case.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -56,20 +56,18 @@ TEST_CASE("t20034", "[test-case][sequence]") using namespace json; REQUIRE(HasMessageChain(j, - {{"D::d2()", "C::c3()", "void"}, {"C::c3()", "C::c2()", "void"}, - {"C::c2()", "B::b2()", "void"}, - {"B::b2()", "A::a2()", "void"}})); + {{"d2()", "c3()", "void"}, {"c3()", "c2()", "void"}, + {"c2()", "b2()", "void"}, {"b2()", "a2()", "void"}})); REQUIRE(HasMessageChain(j, - {{"D::d2()", "C::c4()", "void"}, {"C::c4()", "B::b4()", "void"}, - {"B::b4()", "B::b2()", "void"}, - {"B::b2()", "A::a2()", "void"}})); - REQUIRE(HasMessageChain(j, {{"D::d2()", "A::a2()", "void"}})); + {{"d2()", "c4()", "void"}, {"c4()", "b4()", "void"}, + {"b4()", "b2()", "void"}, {"b2()", "a2()", "void"}})); + REQUIRE(HasMessageChain(j, {{"d2()", "a2()", "void"}})); REQUIRE(HasMessageChain(j, - {{"D::d2()", "C::c1()", "void"}, {"C::c1()", "B::b1()", "void"}, - {"B::b1()", "A::a2()", "void"}})); + {{"d2()", "c1()", "void"}, {"c1()", "b1()", "void"}, + {"b1()", "a2()", "void"}})); REQUIRE(HasMessageChain(j, - {{"D::d2()", "C::c2()", "void"}, {"C::c2()", "B::b2()", "void"}, - {"B::b2()", "A::a2()", "void"}})); + {{"d2()", "c2()", "void"}, {"c2()", "b2()", "void"}, + {"b2()", "a2()", "void"}})); save_json(config.output_directory(), diagram->name + ".json", j); } diff --git a/tests/t20035/test_case.h b/tests/t20035/test_case.h index d4eb26dc..8213597d 100644 --- a/tests/t20035/test_case.h +++ b/tests/t20035/test_case.h @@ -1,7 +1,7 @@ /** * tests/t20035/test_case.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/t20036/test_case.h b/tests/t20036/test_case.h index 3ecf5714..f8da4cd2 100644 --- a/tests/t20036/test_case.h +++ b/tests/t20036/test_case.h @@ -1,7 +1,7 @@ /** * tests/t20036/test_case.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -56,16 +56,16 @@ TEST_CASE("t20036", "[test-case][sequence]") using namespace json; REQUIRE(HasMessageChain(j, - {{"C::c3()", "C::c2()", "void"}, {"C::c2()", "B::b2()", "void"}, - {"B::b2()", "A::a2()", "void"}})); + {{"c3()", "c2()", "void"}, {"c2()", "b2()", "void"}, + {"b2()", "a2()", "void"}})); + REQUIRE(HasMessageChain( + j, {{"c4()", "b2()", "void"}, {"b2()", "a2()", "void"}})); + REQUIRE(HasMessageChain(j, {{"d3()", "a2()", "void"}})); REQUIRE(HasMessageChain(j, - {{"C::c4()", "B::b2()", "void"}, {"B::b2()", "A::a2()", "void"}})); - REQUIRE(HasMessageChain(j, {{"D::d3()", "A::a2()", "void"}})); - REQUIRE(HasMessageChain(j, - {{"D::d1()", "C::c2()", "void"}, {"C::c2()", "B::b2()", "void"}, - {"B::b2()", "A::a2()", "void"}})); - REQUIRE(HasMessageChain(j, - {{"C::c1()", "B::b1()", "void"}, {"B::b1()", "A::a2()", "void"}})); + {{"d1()", "c2()", "void"}, {"c2()", "b2()", "void"}, + {"b2()", "a2()", "void"}})); + REQUIRE(HasMessageChain( + j, {{"c1()", "b1()", "void"}, {"b1()", "a2()", "void"}})); save_json(config.output_directory(), diagram->name + ".json", j); } diff --git a/tests/t20037/test_case.h b/tests/t20037/test_case.h index c4d60600..15f20df3 100644 --- a/tests/t20037/test_case.h +++ b/tests/t20037/test_case.h @@ -1,7 +1,7 @@ /** * tests/t20037/test_case.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/t20038/test_case.h b/tests/t20038/test_case.h index 9765010e..dc0c8be9 100644 --- a/tests/t20038/test_case.h +++ b/tests/t20038/test_case.h @@ -1,7 +1,7 @@ /** * tests/t20038/test_case.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/t20039/.clang-uml b/tests/t20039/.clang-uml new file mode 100644 index 00000000..ff038945 --- /dev/null +++ b/tests/t20039/.clang-uml @@ -0,0 +1,14 @@ +diagrams: + t20039_sequence: + type: sequence + glob: + - t20039.cc + include: + namespaces: + - clanguml::t20039 + using_namespace: clanguml::t20039 + type_aliases: + "std::vector": int_vec_t + "std::map": int_map_t + from: + - function: "clanguml::t20039::tmain()" \ No newline at end of file diff --git a/tests/t20039/t20039.cc b/tests/t20039/t20039.cc new file mode 100644 index 00000000..62804d36 --- /dev/null +++ b/tests/t20039/t20039.cc @@ -0,0 +1,34 @@ +#include +#include +#include + +namespace clanguml { +namespace t20039 { + +template struct A { + std::vector> a(T p) { return {}; } +}; + +struct R { + A a_int; + A> a_intvec; + A> a_intmap; + + void run() + { + a_int.a({}); + a_intvec.a({}); + a_intmap.a({}); + } +}; + +int tmain() +{ + R r; + + r.run(); + + return 0; +} +} +} \ No newline at end of file diff --git a/tests/t20039/test_case.h b/tests/t20039/test_case.h new file mode 100644 index 00000000..5c41852d --- /dev/null +++ b/tests/t20039/test_case.h @@ -0,0 +1,63 @@ +/** + * tests/t20039/test_case.h + * + * Copyright (c) 2021-2024 Bartek Kryza + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +TEST_CASE("t20039", "[test-case][sequence]") +{ + auto [config, db] = load_config("t20039"); + + auto diagram = config.diagrams["t20039_sequence"]; + + REQUIRE(diagram->name == "t20039_sequence"); + + auto model = generate_sequence_diagram(*db, diagram); + + REQUIRE(model->name() == "t20039_sequence"); + + { + auto src = generate_sequence_puml(diagram, *model); + AliasMatcher _A(src); + + REQUIRE_THAT(src, StartsWith("@startuml")); + REQUIRE_THAT(src, EndsWith("@enduml\n")); + + // Check if all calls exist + REQUIRE_THAT(src, HasCall(_A("tmain()"), _A("R"), "run()")); + REQUIRE_THAT(src, HasCall(_A("R"), _A("A"), "a(int)")); + REQUIRE_THAT(src, HasCall(_A("R"), _A("A"), "a(int_vec_t)")); + REQUIRE_THAT(src, HasCall(_A("R"), _A("A"), "a(int_map_t)")); + + save_puml(config.output_directory(), diagram->name + ".puml", src); + } + + { + auto j = generate_sequence_json(diagram, *model); + + using namespace json; + + save_json(config.output_directory(), diagram->name + ".json", j); + } + + { + auto src = generate_sequence_mermaid(diagram, *model); + + mermaid::AliasMatcher _A(src); + using mermaid::IsClass; + + save_mermaid(config.output_directory(), diagram->name + ".mmd", src); + } +} \ No newline at end of file diff --git a/tests/t30001/test_case.h b/tests/t30001/test_case.h index a0118da7..4772e727 100644 --- a/tests/t30001/test_case.h +++ b/tests/t30001/test_case.h @@ -1,7 +1,7 @@ /** * tests/t30001/test_case.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -70,19 +70,19 @@ TEST_CASE("t30001", "[test-case][package]") auto j = generate_package_json(diagram, *model); using namespace json; + using namespace std::string_literals; REQUIRE(HasTitle(j, "Basic package diagram example")); - REQUIRE(IsPackage(j, "A")); - REQUIRE(IsPackage(j, "A::AA")); - REQUIRE(IsPackage(j, "A::AA::AAA")); - REQUIRE(IsPackage(j, "A::AA::BBB")); - REQUIRE(IsPackage(j, "A::BB")); - REQUIRE(IsPackage(j, "B")); - REQUIRE(IsPackage(j, "B::AA")); - REQUIRE(IsPackage(j, "B::AA::AAA")); - REQUIRE(IsPackage(j, "B::AA::BBB")); - REQUIRE(IsPackage(j, "B::BB")); + REQUIRE(!IsNamespacePackage(j, "clanguml"s)); + REQUIRE(!IsNamespacePackage(j, "t30001"s)); + REQUIRE(IsNamespacePackage(j, "A"s)); + REQUIRE(IsNamespacePackage(j, "A"s, "AA"s)); + REQUIRE(IsNamespacePackage(j, "A"s, "AA"s, "AAA"s)); + REQUIRE(IsNamespacePackage(j, "B"s, "AA"s, "AAA"s)); + REQUIRE(IsNamespacePackage(j, "B"s, "AA"s, "BBB"s)); + REQUIRE(IsNamespacePackage(j, "B"s, "BB"s)); + REQUIRE(IsNamespacePackage(j, "B"s)); save_json(config.output_directory(), diagram->name + ".json", j); } diff --git a/tests/t30002/test_case.h b/tests/t30002/test_case.h index 4d8c0df0..908402ae 100644 --- a/tests/t30002/test_case.h +++ b/tests/t30002/test_case.h @@ -1,7 +1,7 @@ /** * tests/t30002/test_case.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -79,45 +79,48 @@ TEST_CASE("t30002", "[test-case][package]") auto j = generate_package_json(diagram, *model); using namespace json; + using namespace std::string_literals; - REQUIRE(IsPackage(j, "A::AA")); - REQUIRE(IsPackage(j, "A::AA::A1")); - REQUIRE(IsPackage(j, "A::AA::A2")); - REQUIRE(IsPackage(j, "A::AA::A3")); - REQUIRE(IsPackage(j, "A::AA::A4")); - REQUIRE(IsPackage(j, "A::AA::A5")); - REQUIRE(IsPackage(j, "A::AA::A6")); - REQUIRE(IsPackage(j, "A::AA::A7")); - REQUIRE(IsPackage(j, "A::AA::A8")); - REQUIRE(IsPackage(j, "A::AA::A9")); - REQUIRE(IsPackage(j, "A::AA::A10")); - REQUIRE(IsPackage(j, "A::AA::A11")); - REQUIRE(IsPackage(j, "A::AA::A12")); - REQUIRE(IsPackage(j, "A::AA::A13")); - REQUIRE(IsPackage(j, "A::AA::A14")); - REQUIRE(IsPackage(j, "A::AA::A15")); - REQUIRE(IsPackage(j, "A::AA::A16")); - REQUIRE(IsPackage(j, "A::AA::A17")); + REQUIRE(IsNamespacePackage(j, "A"s, "AA"s)); + REQUIRE(IsNamespacePackage(j, "A"s, "AA"s, "A1"s)); + REQUIRE(IsNamespacePackage(j, "A"s, "AA"s, "A2"s)); + REQUIRE(IsNamespacePackage(j, "A"s, "AA"s, "A3"s)); + REQUIRE(IsNamespacePackage(j, "A"s, "AA"s, "A4"s)); + REQUIRE(IsNamespacePackage(j, "A"s, "AA"s, "A5"s)); + REQUIRE(IsNamespacePackage(j, "A"s, "AA"s, "A6"s)); + REQUIRE(IsNamespacePackage(j, "A"s, "AA"s, "A7"s)); + REQUIRE(IsNamespacePackage(j, "A"s, "AA"s, "A8"s)); + REQUIRE(IsNamespacePackage(j, "A"s, "AA"s, "A9"s)); + REQUIRE(IsNamespacePackage(j, "A"s, "AA"s, "A10"s)); + REQUIRE(IsNamespacePackage(j, "A"s, "AA"s, "A11"s)); + REQUIRE(IsNamespacePackage(j, "A"s, "AA"s, "A12"s)); + REQUIRE(IsNamespacePackage(j, "A"s, "AA"s, "A13"s)); + REQUIRE(IsNamespacePackage(j, "A"s, "AA"s, "A14"s)); + REQUIRE(IsNamespacePackage(j, "A"s, "AA"s, "A15"s)); + REQUIRE(IsNamespacePackage(j, "A"s, "AA"s, "A16"s)); + REQUIRE(IsNamespacePackage(j, "A"s, "AA"s, "A17"s)); + REQUIRE(IsNamespacePackage(j, "A"s, "AA"s, "A18"s)); - REQUIRE(IsPackage(j, "B::BB::BBB")); + REQUIRE(IsNamespacePackage(j, "B"s, "BB"s, "BBB"s)); - REQUIRE(IsDependency(j, "B::BB::BBB", "A::AA::A1")); - REQUIRE(IsDependency(j, "B::BB::BBB", "A::AA::A2")); - REQUIRE(IsDependency(j, "B::BB::BBB", "A::AA::A3")); - REQUIRE(IsDependency(j, "B::BB::BBB", "A::AA::A4")); - REQUIRE(IsDependency(j, "B::BB::BBB", "A::AA::A5")); - REQUIRE(IsDependency(j, "B::BB::BBB", "A::AA::A6")); - REQUIRE(IsDependency(j, "B::BB::BBB", "A::AA::A7")); - REQUIRE(IsDependency(j, "B::BB::BBB", "A::AA::A8")); - REQUIRE(IsDependency(j, "B::BB::BBB", "A::AA::A9")); - REQUIRE(IsDependency(j, "B::BB::BBB", "A::AA::A10")); - REQUIRE(IsDependency(j, "B::BB::BBB", "A::AA::A11")); - REQUIRE(IsDependency(j, "B::BB::BBB", "A::AA::A12")); - REQUIRE(IsDependency(j, "B::BB::BBB", "A::AA::A13")); - REQUIRE(IsDependency(j, "B::BB::BBB", "A::AA::A14")); - REQUIRE(IsDependency(j, "B::BB::BBB", "A::AA::A15")); - REQUIRE(IsDependency(j, "B::BB::BBB", "A::AA::A16")); - REQUIRE(IsDependency(j, "B::BB::BBB", "A::AA::A17")); + REQUIRE(IsDependency(j, "BBB", "A1")); + REQUIRE(IsDependency(j, "BBB", "A2")); + REQUIRE(IsDependency(j, "BBB", "A3")); + REQUIRE(IsDependency(j, "BBB", "A4")); + REQUIRE(IsDependency(j, "BBB", "A5")); + REQUIRE(IsDependency(j, "BBB", "A6")); + REQUIRE(IsDependency(j, "BBB", "A7")); + REQUIRE(IsDependency(j, "BBB", "A8")); + REQUIRE(IsDependency(j, "BBB", "A9")); + REQUIRE(IsDependency(j, "BBB", "A10")); + REQUIRE(IsDependency(j, "BBB", "A11")); + REQUIRE(IsDependency(j, "BBB", "A12")); + REQUIRE(IsDependency(j, "BBB", "A13")); + REQUIRE(IsDependency(j, "BBB", "A14")); + REQUIRE(IsDependency(j, "BBB", "A15")); + REQUIRE(IsDependency(j, "BBB", "A16")); + REQUIRE(IsDependency(j, "BBB", "A17")); + REQUIRE(IsDependency(j, "BBB", "A18")); save_json(config.output_directory(), diagram->name + ".json", j); } diff --git a/tests/t30003/test_case.h b/tests/t30003/test_case.h index 09082966..4b9f5863 100644 --- a/tests/t30003/test_case.h +++ b/tests/t30003/test_case.h @@ -1,7 +1,7 @@ /** * tests/t30003/test_case.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -50,15 +50,16 @@ TEST_CASE("t30003", "[test-case][package]") auto j = generate_package_json(diagram, *model); using namespace json; + using namespace std::string_literals; - REQUIRE(IsPackage(j, "ns1")); - REQUIRE(IsPackage(j, "ns1::ns2_v1_0_0")); - REQUIRE(IsPackage(j, "ns1::ns2_v0_9_0")); - REQUIRE(IsPackage(j, "ns3")); - REQUIRE(IsPackage(j, "ns3::ns1")); - REQUIRE(IsPackage(j, "ns3::ns1::ns2")); + REQUIRE(IsNamespacePackage(j, "ns1"s)); + REQUIRE(IsNamespacePackage(j, "ns1"s, "ns2_v1_0_0"s)); + REQUIRE(IsNamespacePackage(j, "ns1"s, "ns2_v0_9_0"s)); + REQUIRE(IsNamespacePackage(j, "ns3"s)); + REQUIRE(IsNamespacePackage(j, "ns3"s, "ns1"s)); + REQUIRE(IsNamespacePackage(j, "ns3"s, "ns1"s, "ns2"s)); - REQUIRE(IsDeprecated(j, "ns1::ns2_v0_9_0")); + REQUIRE(IsDeprecated(j, "ns2_v0_9_0")); REQUIRE(IsDeprecated(j, "ns3")); save_json(config.output_directory(), diagram->name + ".json", j); diff --git a/tests/t30004/test_case.h b/tests/t30004/test_case.h index 0eb17be6..bd66c760 100644 --- a/tests/t30004/test_case.h +++ b/tests/t30004/test_case.h @@ -1,7 +1,7 @@ /** * tests/t30004/test_case.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -48,13 +48,14 @@ TEST_CASE("t30004", "[test-case][package]") auto j = generate_package_json(diagram, *model); using namespace json; + using namespace std::string_literals; - REQUIRE(IsPackage(j, "A")); - REQUIRE(IsPackage(j, "A::AAA")); - REQUIRE(IsPackage(j, "A::BBB")); - REQUIRE(IsPackage(j, "A::CCC")); - REQUIRE(!IsPackage(j, "A::DDD")); - REQUIRE(IsPackage(j, "A::EEE")); + REQUIRE(IsNamespacePackage(j, "A"s)); + REQUIRE(IsNamespacePackage(j, "A"s, "AAA"s)); + REQUIRE(IsNamespacePackage(j, "A"s, "BBB"s)); + REQUIRE(IsNamespacePackage(j, "A"s, "CCC"s)); + REQUIRE(!IsNamespacePackage(j, "A"s, "DDD"s)); + REQUIRE(IsNamespacePackage(j, "A"s, "EEE"s)); save_json(config.output_directory(), diagram->name + ".json", j); } diff --git a/tests/t30005/test_case.h b/tests/t30005/test_case.h index 75e5d45c..57248548 100644 --- a/tests/t30005/test_case.h +++ b/tests/t30005/test_case.h @@ -1,7 +1,7 @@ /** * tests/t30005/test_case.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -49,19 +49,20 @@ TEST_CASE("t30005", "[test-case][package]") auto j = generate_package_json(diagram, *model); using namespace json; + using namespace std::string_literals; - REQUIRE(IsPackage(j, "A")); - REQUIRE(IsPackage(j, "A::AA")); - REQUIRE(IsPackage(j, "A::AA::AAA")); - REQUIRE(IsPackage(j, "B")); - REQUIRE(IsPackage(j, "B::BB")); - REQUIRE(IsPackage(j, "B::BB::BBB")); - REQUIRE(IsPackage(j, "C")); - REQUIRE(IsPackage(j, "C::CC")); - REQUIRE(IsPackage(j, "C::CC::CCC")); + REQUIRE(IsNamespacePackage(j, "A"s)); + REQUIRE(IsNamespacePackage(j, "A"s, "AA"s)); + REQUIRE(IsNamespacePackage(j, "A"s, "AA"s, "AAA"s)); + REQUIRE(IsNamespacePackage(j, "B"s)); + REQUIRE(IsNamespacePackage(j, "B"s, "BB"s)); + REQUIRE(IsNamespacePackage(j, "B"s, "BB"s, "BBB"s)); + REQUIRE(IsNamespacePackage(j, "C"s)); + REQUIRE(IsNamespacePackage(j, "C"s, "CC"s)); + REQUIRE(IsNamespacePackage(j, "C"s, "CC"s, "CCC"s)); - REQUIRE(IsDependency(j, "B::BB::BBB", "A::AA::AAA")); - REQUIRE(IsDependency(j, "C::CC::CCC", "A::AA::AAA")); + REQUIRE(IsDependency(j, "BBB", "AAA")); + REQUIRE(IsDependency(j, "CCC", "AAA")); save_json(config.output_directory(), diagram->name + ".json", j); } diff --git a/tests/t30006/test_case.h b/tests/t30006/test_case.h index bed6eeca..6201fa50 100644 --- a/tests/t30006/test_case.h +++ b/tests/t30006/test_case.h @@ -1,7 +1,7 @@ /** * tests/t30006/test_case.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -49,10 +49,11 @@ TEST_CASE("t30006", "[test-case][package]") auto j = generate_package_json(diagram, *model); using namespace json; + using namespace std::string_literals; - REQUIRE(IsPackage(j, "A")); - REQUIRE(IsPackage(j, "B")); - REQUIRE(IsPackage(j, "C")); + REQUIRE(IsNamespacePackage(j, "A"s)); + REQUIRE(IsNamespacePackage(j, "B"s)); + REQUIRE(IsNamespacePackage(j, "C"s)); REQUIRE(IsDependency(j, "A", "B")); REQUIRE(IsDependency(j, "A", "C")); diff --git a/tests/t30007/test_case.h b/tests/t30007/test_case.h index 796f453b..653212db 100644 --- a/tests/t30007/test_case.h +++ b/tests/t30007/test_case.h @@ -1,7 +1,7 @@ /** * tests/t30007/test_case.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -52,14 +52,15 @@ TEST_CASE("t30007", "[test-case][package]") auto j = generate_package_json(diagram, *model); using namespace json; + using namespace std::string_literals; - REQUIRE(IsPackage(j, "A")); - REQUIRE(IsPackage(j, "A::AA")); - REQUIRE(IsPackage(j, "B")); - REQUIRE(IsPackage(j, "C")); + REQUIRE(IsNamespacePackage(j, "A"s)); + REQUIRE(IsNamespacePackage(j, "A"s, "AA"s)); + REQUIRE(IsNamespacePackage(j, "B"s)); + REQUIRE(IsNamespacePackage(j, "C"s)); - REQUIRE(IsDependency(j, "A::AA", "B")); - REQUIRE(IsDependency(j, "A::AA", "C")); + REQUIRE(IsDependency(j, "AA", "B")); + REQUIRE(IsDependency(j, "AA", "C")); save_json(config.output_directory(), diagram->name + ".json", j); } diff --git a/tests/t30008/test_case.h b/tests/t30008/test_case.h index 8d724055..70f52d6a 100644 --- a/tests/t30008/test_case.h +++ b/tests/t30008/test_case.h @@ -1,7 +1,7 @@ /** * tests/t30008/test_case.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -58,22 +58,23 @@ TEST_CASE("t30008", "[test-case][package]") auto j = generate_package_json(diagram, *model); using namespace json; + using namespace std::string_literals; - REQUIRE(IsPackage(j, "dependants::A")); - REQUIRE(IsPackage(j, "dependants::B")); - REQUIRE(IsPackage(j, "dependants::C")); - REQUIRE(!IsPackage(j, "dependants::X")); + REQUIRE(IsNamespacePackage(j, "dependants"s, "A"s)); + REQUIRE(IsNamespacePackage(j, "dependants"s, "B"s)); + REQUIRE(IsNamespacePackage(j, "dependants"s, "C"s)); + REQUIRE(!IsNamespacePackage(j, "dependants"s, "X"s)); - REQUIRE(IsDependency(j, "dependants::B", "dependants::A")); - REQUIRE(IsDependency(j, "dependants::C", "dependants::B")); + REQUIRE(IsDependency(j, "B", "A")); + REQUIRE(IsDependency(j, "C", "B")); - REQUIRE(IsPackage(j, "dependencies::D")); - REQUIRE(IsPackage(j, "dependencies::E")); - REQUIRE(IsPackage(j, "dependencies::F")); - REQUIRE(!IsPackage(j, "dependencies::Y")); + REQUIRE(IsNamespacePackage(j, "dependencies"s, "D"s)); + REQUIRE(IsNamespacePackage(j, "dependencies"s, "E"s)); + REQUIRE(IsNamespacePackage(j, "dependencies"s, "F"s)); + REQUIRE(!IsNamespacePackage(j, "dependencies"s, "Y"s)); - REQUIRE(IsDependency(j, "dependencies::E", "dependencies::D")); - REQUIRE(IsDependency(j, "dependencies::F", "dependencies::E")); + REQUIRE(IsDependency(j, "E", "D")); + REQUIRE(IsDependency(j, "F", "E")); save_json(config.output_directory(), diagram->name + ".json", j); } diff --git a/tests/t30009/test_case.h b/tests/t30009/test_case.h index efb4902d..84600695 100644 --- a/tests/t30009/test_case.h +++ b/tests/t30009/test_case.h @@ -1,7 +1,7 @@ /** * tests/t30009/test_case.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -50,17 +50,18 @@ TEST_CASE("t30009", "[test-case][package]") auto j = generate_package_json(diagram, *model); using namespace json; + using namespace std::string_literals; - REQUIRE(IsPackage(j, "One")); - REQUIRE(IsPackage(j, "Two")); - REQUIRE(IsPackage(j, "One::A")); - REQUIRE(IsPackage(j, "One::B")); - REQUIRE(IsPackage(j, "One::C")); - REQUIRE(IsPackage(j, "One::D")); - REQUIRE(IsPackage(j, "Two::A")); - REQUIRE(IsPackage(j, "Two::B")); - REQUIRE(IsPackage(j, "Two::C")); - REQUIRE(IsPackage(j, "Two::D")); + REQUIRE(IsNamespacePackage(j, "One"s)); + REQUIRE(IsNamespacePackage(j, "Two"s)); + REQUIRE(IsNamespacePackage(j, "One"s, "A"s)); + REQUIRE(IsNamespacePackage(j, "One"s, "B"s)); + REQUIRE(IsNamespacePackage(j, "One"s, "C"s)); + REQUIRE(IsNamespacePackage(j, "One"s, "D"s)); + REQUIRE(IsNamespacePackage(j, "Two"s, "A"s)); + REQUIRE(IsNamespacePackage(j, "Two"s, "B"s)); + REQUIRE(IsNamespacePackage(j, "Two"s, "C"s)); + REQUIRE(IsNamespacePackage(j, "Two"s, "D"s)); save_json(config.output_directory(), diagram->name + ".json", j); } diff --git a/tests/t30010/test_case.h b/tests/t30010/test_case.h index 03a1e1ca..19d06edf 100644 --- a/tests/t30010/test_case.h +++ b/tests/t30010/test_case.h @@ -1,7 +1,7 @@ /** * tests/t30010/test_case.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -54,6 +54,13 @@ TEST_CASE("t30010", "[test-case][package]") auto j = generate_package_json(diagram, *model); using namespace json; + using namespace std::string_literals; + + REQUIRE(IsDirectoryPackage(j, "app"s)); + REQUIRE(IsDirectoryPackage(j, "libraries"s, "lib1"s)); + REQUIRE(IsDirectoryPackage(j, "libraries"s, "lib2"s)); + REQUIRE(IsDirectoryPackage(j, "libraries"s, "lib3"s)); + REQUIRE(IsDirectoryPackage(j, "libraries"s, "lib4"s)); save_json(config.output_directory(), diagram->name + ".json", j); } diff --git a/tests/t30011/test_case.h b/tests/t30011/test_case.h index ac66a448..a8adfd0a 100644 --- a/tests/t30011/test_case.h +++ b/tests/t30011/test_case.h @@ -1,7 +1,7 @@ /** * tests/t30011/test_case.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -54,6 +54,18 @@ TEST_CASE("t30011", "[test-case][package]") auto j = generate_package_json(diagram, *model); using namespace json; + using namespace std::string_literals; + + REQUIRE(IsDirectoryPackage(j, "app"s)); + REQUIRE(IsDirectoryPackage(j, "libraries"s, "lib1"s)); + REQUIRE(IsDirectoryPackage(j, "libraries"s, "lib2"s)); + REQUIRE(IsDirectoryPackage(j, "libraries"s, "lib3"s)); + REQUIRE(IsDirectoryPackage(j, "libraries"s, "lib4"s)); + + REQUIRE(IsDependency(j, "app"s, "lib1"s)); + REQUIRE(IsDependency(j, "app"s, "lib2"s)); + REQUIRE(IsDependency(j, "app"s, "lib3"s)); + REQUIRE(IsDependency(j, "app"s, "lib4"s)); save_json(config.output_directory(), diagram->name + ".json", j); } diff --git a/tests/t30012/.clang-uml b/tests/t30012/.clang-uml new file mode 100644 index 00000000..7335486c --- /dev/null +++ b/tests/t30012/.clang-uml @@ -0,0 +1,10 @@ +diagrams: + t30012_package: + type: package + glob: + - t30012.cc + package_type: module + include: + modules: + - t30012 + using_module: t30012 \ No newline at end of file diff --git a/tests/t30012/src/lib1.cppm b/tests/t30012/src/lib1.cppm new file mode 100644 index 00000000..6835aa09 --- /dev/null +++ b/tests/t30012/src/lib1.cppm @@ -0,0 +1,13 @@ +export module t30012.app.lib1; + +export namespace clanguml::t30012 { +class B { }; + +template class BB { + T t; +}; + +namespace detail { +enum class BBB { bbb1, bbb2 }; +} // namespace detail +} \ No newline at end of file diff --git a/tests/t30012/src/lib1mod1.cppm b/tests/t30012/src/lib1mod1.cppm new file mode 100644 index 00000000..c3601405 --- /dev/null +++ b/tests/t30012/src/lib1mod1.cppm @@ -0,0 +1,5 @@ +export module t30012.app.lib1.mod1; + +export namespace clanguml::t30012 { +class D { }; +} \ No newline at end of file diff --git a/tests/t30012/src/lib1mod2.cppm b/tests/t30012/src/lib1mod2.cppm new file mode 100644 index 00000000..d393ea64 --- /dev/null +++ b/tests/t30012/src/lib1mod2.cppm @@ -0,0 +1,5 @@ +export module t30012.app.lib1.mod2; + +export namespace clanguml::t30012 { +class E { }; +} \ No newline at end of file diff --git a/tests/t30012/src/lib2.cppm b/tests/t30012/src/lib2.cppm new file mode 100644 index 00000000..99e1c94b --- /dev/null +++ b/tests/t30012/src/lib2.cppm @@ -0,0 +1,13 @@ +export module t30012.app.lib2; + +export namespace clanguml::t30012 { +class C { }; + +template class CC { + T t; +}; + +namespace detail { +enum class CCC { ccc1, ccc2 }; +} +} \ No newline at end of file diff --git a/tests/t30012/src/t30012_mod.cppm b/tests/t30012/src/t30012_mod.cppm new file mode 100644 index 00000000..9bcbd77a --- /dev/null +++ b/tests/t30012/src/t30012_mod.cppm @@ -0,0 +1,11 @@ +export module t30012.app; +export import t30012.app.lib1; +export import t30012.app.lib2; + +export namespace clanguml::t30012 { +class A { + int get() { return a; } + + int a; +}; +} \ No newline at end of file diff --git a/tests/t30012/t30012.cc b/tests/t30012/t30012.cc new file mode 100644 index 00000000..89f09ca1 --- /dev/null +++ b/tests/t30012/t30012.cc @@ -0,0 +1,15 @@ +import t30012.app; +import t30012.app.lib1; +import t30012.app.lib1.mod1; +import t30012.app.lib1.mod2; +import t30012.app.lib2; + +namespace clanguml { +namespace t30012 { +class R { + A *a; + B *b; + C *c; +}; +} +} \ No newline at end of file diff --git a/tests/t30012/test_case.h b/tests/t30012/test_case.h new file mode 100644 index 00000000..1e841adb --- /dev/null +++ b/tests/t30012/test_case.h @@ -0,0 +1,77 @@ +/** + * tests/t30012/test_case.h + * + * Copyright (c) 2021-2024 Bartek Kryza + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +TEST_CASE("t30012", "[test-case][package]") +{ + auto [config, db] = load_config("t30012"); + + auto diagram = config.diagrams["t30012_package"]; + + REQUIRE(diagram->name == "t30012_package"); + + auto model = generate_package_diagram(*db, diagram); + + REQUIRE(model->name() == "t30012_package"); + + { + auto src = generate_package_puml(diagram, *model); + AliasMatcher _A(src); + + REQUIRE_THAT(src, StartsWith("@startuml")); + REQUIRE_THAT(src, EndsWith("@enduml\n")); + + // Check if all packages exist + REQUIRE_THAT(src, IsPackage("app")); + REQUIRE_THAT(src, IsPackage("lib1")); + REQUIRE_THAT(src, IsPackage("lib2")); + REQUIRE_THAT(src, IsPackage("mod1")); + REQUIRE_THAT(src, IsPackage("mod2")); + + save_puml(config.output_directory(), diagram->name + ".puml", src); + } + + { + auto j = generate_package_json(diagram, *model); + + using namespace json; + using namespace std::string_literals; + + REQUIRE(IsModulePackage(j, "app"s)); + REQUIRE(IsModulePackage(j, "app"s, "lib1"s)); + REQUIRE(IsModulePackage(j, "app"s, "lib1"s, "mod1"s)); + REQUIRE(IsModulePackage(j, "app"s, "lib1"s, "mod2"s)); + REQUIRE(IsModulePackage(j, "app"s, "lib2"s)); + + save_json(config.output_directory(), diagram->name + ".json", j); + } + + { + auto src = generate_package_mermaid(diagram, *model); + + mermaid::AliasMatcher _A(src); + using mermaid::IsPackage; + + REQUIRE_THAT(src, IsPackage(_A("app"))); + REQUIRE_THAT(src, IsPackage(_A("lib1"))); + REQUIRE_THAT(src, IsPackage(_A("lib2"))); + REQUIRE_THAT(src, IsPackage(_A("mod1"))); + REQUIRE_THAT(src, IsPackage(_A("mod2"))); + + save_mermaid(config.output_directory(), diagram->name + ".mmd", src); + } +} \ No newline at end of file diff --git a/tests/t30013/.clang-uml b/tests/t30013/.clang-uml new file mode 100644 index 00000000..9eb52e03 --- /dev/null +++ b/tests/t30013/.clang-uml @@ -0,0 +1,10 @@ +diagrams: + t30013_package: + type: package + glob: + - t30013.cc + package_type: module + include: + modules: + - t30013 + using_module: t30013 \ No newline at end of file diff --git a/tests/t30013/src/app.cppm b/tests/t30013/src/app.cppm new file mode 100644 index 00000000..1793bf79 --- /dev/null +++ b/tests/t30013/src/app.cppm @@ -0,0 +1,71 @@ +module; + +#include +#include +#include +#include +#include + +export module t30013.app; + +import t30013.mod1; +import t30013.mod2; +import t30013.mod3; +import t30013.mod4; +import t30013.mod5; +import t30013.mod6; +import t30013.mod7; +import t30013.mod8; +import t30013.mod9; +import t30013.mod10; +import t30013.mod11; +import t30013.mod12; +import t30013.mod13; +import t30013.mod14; +import t30013.mod15; +import t30013.mod16; +import t30013.mod17; +import t30013.mod18; + +export namespace clanguml::t30013 { + +class CBA : public CF { +public: + CA *ca_; + CB cb_; + std::shared_ptr cc_; + std::map> *cd_; + std::array co_; + static CP *cp_; + + CBA() = default; + + CBA(CN *cn) { } + + friend CR; + + template CBA(std::tuple &items) { } + + void ce(const std::vector /*ce_*/) { } + + std::shared_ptr cg() { return {}; } + + template void ch(std::map> &ch_) { } + + template std::map> ci(T * /*t*/) + { + return {}; + } + + S s; +}; + +void cj(std::unique_ptr /*cj_*/) { } + +std::unique_ptr ck() { return {}; } + +template void cl(std::map> & /*ch_*/) { } + +template std::map> cm() { return {}; } + +} // namespace clanguml::t30013 \ No newline at end of file diff --git a/tests/t30013/src/mod1.cppm b/tests/t30013/src/mod1.cppm new file mode 100644 index 00000000..b8f44f18 --- /dev/null +++ b/tests/t30013/src/mod1.cppm @@ -0,0 +1,5 @@ +export module t30013.mod1; + +export namespace clanguml::t30013 { +struct CA { }; +} \ No newline at end of file diff --git a/tests/t30013/src/mod10.cppm b/tests/t30013/src/mod10.cppm new file mode 100644 index 00000000..4d3618e2 --- /dev/null +++ b/tests/t30013/src/mod10.cppm @@ -0,0 +1,5 @@ +export module t30013.mod10; + +export namespace clanguml::t30013 { +struct CJ { }; +} \ No newline at end of file diff --git a/tests/t30013/src/mod11.cppm b/tests/t30013/src/mod11.cppm new file mode 100644 index 00000000..d3fe42e2 --- /dev/null +++ b/tests/t30013/src/mod11.cppm @@ -0,0 +1,5 @@ +export module t30013.mod11; + +export namespace clanguml::t30013 { +struct CK { }; +} \ No newline at end of file diff --git a/tests/t30013/src/mod12.cppm b/tests/t30013/src/mod12.cppm new file mode 100644 index 00000000..0075f864 --- /dev/null +++ b/tests/t30013/src/mod12.cppm @@ -0,0 +1,5 @@ +export module t30013.mod12; + +export namespace clanguml::t30013 { +struct CL { }; +} \ No newline at end of file diff --git a/tests/t30013/src/mod13.cppm b/tests/t30013/src/mod13.cppm new file mode 100644 index 00000000..ffff01c3 --- /dev/null +++ b/tests/t30013/src/mod13.cppm @@ -0,0 +1,5 @@ +export module t30013.mod13; + +export namespace clanguml::t30013 { +struct CM { }; +} \ No newline at end of file diff --git a/tests/t30013/src/mod14.cppm b/tests/t30013/src/mod14.cppm new file mode 100644 index 00000000..aaeac2bc --- /dev/null +++ b/tests/t30013/src/mod14.cppm @@ -0,0 +1,5 @@ +export module t30013.mod14; + +export namespace clanguml::t30013 { +struct CN { }; +} \ No newline at end of file diff --git a/tests/t30013/src/mod15.cppm b/tests/t30013/src/mod15.cppm new file mode 100644 index 00000000..8c0bf8d0 --- /dev/null +++ b/tests/t30013/src/mod15.cppm @@ -0,0 +1,5 @@ +export module t30013.mod15; + +export namespace clanguml::t30013 { +struct CO { }; +} \ No newline at end of file diff --git a/tests/t30013/src/mod16.cppm b/tests/t30013/src/mod16.cppm new file mode 100644 index 00000000..2dfb91c1 --- /dev/null +++ b/tests/t30013/src/mod16.cppm @@ -0,0 +1,5 @@ +export module t30013.mod16; + +export namespace clanguml::t30013 { +struct CP { }; +} \ No newline at end of file diff --git a/tests/t30013/src/mod17.cppm b/tests/t30013/src/mod17.cppm new file mode 100644 index 00000000..89d291b2 --- /dev/null +++ b/tests/t30013/src/mod17.cppm @@ -0,0 +1,5 @@ +export module t30013.mod17; + +export namespace clanguml::t30013 { +struct CR { }; +} \ No newline at end of file diff --git a/tests/t30013/src/mod18.cppm b/tests/t30013/src/mod18.cppm new file mode 100644 index 00000000..9897e8c0 --- /dev/null +++ b/tests/t30013/src/mod18.cppm @@ -0,0 +1,5 @@ +export module t30013.mod18; + +export namespace clanguml::t30013 { +enum class S { s1, s2, s3 }; +} \ No newline at end of file diff --git a/tests/t30013/src/mod2.cppm b/tests/t30013/src/mod2.cppm new file mode 100644 index 00000000..d8beca54 --- /dev/null +++ b/tests/t30013/src/mod2.cppm @@ -0,0 +1,7 @@ +export module t30013.mod2; + +export namespace clanguml::t30013 { +template struct CB { + T cb; +}; +} \ No newline at end of file diff --git a/tests/t30013/src/mod3.cppm b/tests/t30013/src/mod3.cppm new file mode 100644 index 00000000..0260cd39 --- /dev/null +++ b/tests/t30013/src/mod3.cppm @@ -0,0 +1,5 @@ +export module t30013.mod3; + +export namespace clanguml::t30013 { +struct CC { }; +} \ No newline at end of file diff --git a/tests/t30013/src/mod4.cppm b/tests/t30013/src/mod4.cppm new file mode 100644 index 00000000..a15f917a --- /dev/null +++ b/tests/t30013/src/mod4.cppm @@ -0,0 +1,5 @@ +export module t30013.mod4; + +export namespace clanguml::t30013 { +struct CD { }; +} \ No newline at end of file diff --git a/tests/t30013/src/mod5.cppm b/tests/t30013/src/mod5.cppm new file mode 100644 index 00000000..09abf480 --- /dev/null +++ b/tests/t30013/src/mod5.cppm @@ -0,0 +1,5 @@ +export module t30013.mod5; + +export namespace clanguml::t30013 { +struct CE { }; +} \ No newline at end of file diff --git a/tests/t30013/src/mod6.cppm b/tests/t30013/src/mod6.cppm new file mode 100644 index 00000000..3d39d392 --- /dev/null +++ b/tests/t30013/src/mod6.cppm @@ -0,0 +1,5 @@ +export module t30013.mod6; + +export namespace clanguml::t30013 { +struct CF { }; +} \ No newline at end of file diff --git a/tests/t30013/src/mod7.cppm b/tests/t30013/src/mod7.cppm new file mode 100644 index 00000000..5a2eb8a4 --- /dev/null +++ b/tests/t30013/src/mod7.cppm @@ -0,0 +1,5 @@ +export module t30013.mod7; + +export namespace clanguml::t30013 { +struct CG { }; +} \ No newline at end of file diff --git a/tests/t30013/src/mod8.cppm b/tests/t30013/src/mod8.cppm new file mode 100644 index 00000000..870cb975 --- /dev/null +++ b/tests/t30013/src/mod8.cppm @@ -0,0 +1,5 @@ +export module t30013.mod8; + +export namespace clanguml::t30013 { +struct CH { }; +} \ No newline at end of file diff --git a/tests/t30013/src/mod9.cppm b/tests/t30013/src/mod9.cppm new file mode 100644 index 00000000..9cce4809 --- /dev/null +++ b/tests/t30013/src/mod9.cppm @@ -0,0 +1,5 @@ +export module t30013.mod9; + +export namespace clanguml::t30013 { +struct CI { }; +} \ No newline at end of file diff --git a/tests/t30013/t30013.cc b/tests/t30013/t30013.cc new file mode 100644 index 00000000..75dcd332 --- /dev/null +++ b/tests/t30013/t30013.cc @@ -0,0 +1,25 @@ +import t30013.app; +import t30013.mod1; +import t30013.mod2; +import t30013.mod3; +import t30013.mod4; +import t30013.mod5; +import t30013.mod6; +import t30013.mod7; +import t30013.mod8; +import t30013.mod9; +import t30013.mod10; +import t30013.mod11; +import t30013.mod12; +import t30013.mod13; +import t30013.mod14; +import t30013.mod15; +import t30013.mod16; +import t30013.mod17; +import t30013.mod18; + +namespace clanguml::t30013 { +class R { + CBA cba; +}; +} // namespace clanguml::t30013 \ No newline at end of file diff --git a/tests/t30013/test_case.h b/tests/t30013/test_case.h new file mode 100644 index 00000000..44b9024f --- /dev/null +++ b/tests/t30013/test_case.h @@ -0,0 +1,157 @@ +/** + * tests/t30013/test_case.h + * + * Copyright (c) 2021-2024 Bartek Kryza + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +TEST_CASE("t30013", "[test-case][package]") +{ + auto [config, db] = load_config("t30013"); + + auto diagram = config.diagrams["t30013_package"]; + + REQUIRE(diagram->name == "t30013_package"); + + auto model = generate_package_diagram(*db, diagram); + + REQUIRE(model->name() == "t30013_package"); + + { + auto src = generate_package_puml(diagram, *model); + AliasMatcher _A(src); + + REQUIRE_THAT(src, StartsWith("@startuml")); + REQUIRE_THAT(src, EndsWith("@enduml\n")); + + // Check if all packages exist + REQUIRE_THAT(src, IsPackage("app")); + REQUIRE_THAT(src, IsPackage("mod1")); + REQUIRE_THAT(src, IsPackage("mod2")); + REQUIRE_THAT(src, IsPackage("mod3")); + REQUIRE_THAT(src, IsPackage("mod4")); + REQUIRE_THAT(src, IsPackage("mod5")); + REQUIRE_THAT(src, IsPackage("mod6")); + REQUIRE_THAT(src, IsPackage("mod7")); + REQUIRE_THAT(src, IsPackage("mod8")); + REQUIRE_THAT(src, IsPackage("mod9")); + REQUIRE_THAT(src, IsPackage("mod10")); + REQUIRE_THAT(src, IsPackage("mod11")); + REQUIRE_THAT(src, IsPackage("mod12")); + REQUIRE_THAT(src, IsPackage("mod13")); + REQUIRE_THAT(src, IsPackage("mod14")); + REQUIRE_THAT(src, IsPackage("mod15")); + REQUIRE_THAT(src, IsPackage("mod16")); + REQUIRE_THAT(src, IsPackage("mod17")); + REQUIRE_THAT(src, IsPackage("mod18")); + + REQUIRE_THAT(src, IsDependency(_A("app"), _A("mod1"))); + REQUIRE_THAT(src, IsDependency(_A("app"), _A("mod2"))); + REQUIRE_THAT(src, IsDependency(_A("app"), _A("mod3"))); + REQUIRE_THAT(src, IsDependency(_A("app"), _A("mod4"))); + REQUIRE_THAT(src, IsDependency(_A("app"), _A("mod5"))); + REQUIRE_THAT(src, IsDependency(_A("app"), _A("mod6"))); + REQUIRE_THAT(src, IsDependency(_A("app"), _A("mod7"))); + REQUIRE_THAT(src, IsDependency(_A("app"), _A("mod8"))); + REQUIRE_THAT(src, IsDependency(_A("app"), _A("mod9"))); + REQUIRE_THAT(src, IsDependency(_A("app"), _A("mod10"))); + REQUIRE_THAT(src, IsDependency(_A("app"), _A("mod11"))); + REQUIRE_THAT(src, IsDependency(_A("app"), _A("mod12"))); + REQUIRE_THAT(src, IsDependency(_A("app"), _A("mod13"))); + REQUIRE_THAT(src, IsDependency(_A("app"), _A("mod14"))); + REQUIRE_THAT(src, IsDependency(_A("app"), _A("mod15"))); + REQUIRE_THAT(src, IsDependency(_A("app"), _A("mod16"))); + REQUIRE_THAT(src, IsDependency(_A("app"), _A("mod17"))); + REQUIRE_THAT(src, IsDependency(_A("app"), _A("mod18"))); + + save_puml(config.output_directory(), diagram->name + ".puml", src); + } + + { + auto j = generate_package_json(diagram, *model); + + using namespace json; + using namespace std::string_literals; + REQUIRE(IsModulePackage(j, "app"s)); + REQUIRE(IsModulePackage(j, "mod1"s)); + REQUIRE(IsModulePackage(j, "mod2"s)); + REQUIRE(IsModulePackage(j, "mod3"s)); + REQUIRE(IsModulePackage(j, "mod4"s)); + REQUIRE(IsModulePackage(j, "mod5"s)); + REQUIRE(IsModulePackage(j, "mod6"s)); + REQUIRE(IsModulePackage(j, "mod7"s)); + REQUIRE(IsModulePackage(j, "mod8"s)); + REQUIRE(IsModulePackage(j, "mod9"s)); + REQUIRE(IsModulePackage(j, "mod10"s)); + REQUIRE(IsModulePackage(j, "mod11"s)); + REQUIRE(IsModulePackage(j, "mod12"s)); + REQUIRE(IsModulePackage(j, "mod13"s)); + REQUIRE(IsModulePackage(j, "mod14"s)); + REQUIRE(IsModulePackage(j, "mod15"s)); + REQUIRE(IsModulePackage(j, "mod16"s)); + REQUIRE(IsModulePackage(j, "mod17"s)); + REQUIRE(IsModulePackage(j, "mod18"s)); + + save_json(config.output_directory(), diagram->name + ".json", j); + } + + { + auto src = generate_package_mermaid(diagram, *model); + + mermaid::AliasMatcher _A(src); + using mermaid::IsPackage; + using mermaid::IsPackageDependency; + + REQUIRE_THAT(src, IsPackage(_A("app"))); + REQUIRE_THAT(src, IsPackage(_A("mod1"))); + REQUIRE_THAT(src, IsPackage(_A("mod2"))); + REQUIRE_THAT(src, IsPackage(_A("mod3"))); + REQUIRE_THAT(src, IsPackage(_A("mod4"))); + REQUIRE_THAT(src, IsPackage(_A("mod5"))); + REQUIRE_THAT(src, IsPackage(_A("mod6"))); + REQUIRE_THAT(src, IsPackage(_A("mod7"))); + REQUIRE_THAT(src, IsPackage(_A("mod8"))); + REQUIRE_THAT(src, IsPackage(_A("mod9"))); + REQUIRE_THAT(src, IsPackage(_A("mod10"))); + REQUIRE_THAT(src, IsPackage(_A("mod11"))); + REQUIRE_THAT(src, IsPackage(_A("mod12"))); + REQUIRE_THAT(src, IsPackage(_A("mod13"))); + REQUIRE_THAT(src, IsPackage(_A("mod14"))); + REQUIRE_THAT(src, IsPackage(_A("mod15"))); + REQUIRE_THAT(src, IsPackage(_A("mod16"))); + REQUIRE_THAT(src, IsPackage(_A("mod17"))); + REQUIRE_THAT(src, IsPackage(_A("mod18"))); + + REQUIRE_THAT(src, IsPackageDependency(_A("app"), _A("mod1"))); + REQUIRE_THAT(src, IsPackageDependency(_A("app"), _A("mod2"))); + REQUIRE_THAT(src, IsPackageDependency(_A("app"), _A("mod3"))); + REQUIRE_THAT(src, IsPackageDependency(_A("app"), _A("mod4"))); + REQUIRE_THAT(src, IsPackageDependency(_A("app"), _A("mod5"))); + REQUIRE_THAT(src, IsPackageDependency(_A("app"), _A("mod6"))); + REQUIRE_THAT(src, IsPackageDependency(_A("app"), _A("mod7"))); + REQUIRE_THAT(src, IsPackageDependency(_A("app"), _A("mod8"))); + REQUIRE_THAT(src, IsPackageDependency(_A("app"), _A("mod9"))); + REQUIRE_THAT(src, IsPackageDependency(_A("app"), _A("mod10"))); + REQUIRE_THAT(src, IsPackageDependency(_A("app"), _A("mod11"))); + REQUIRE_THAT(src, IsPackageDependency(_A("app"), _A("mod12"))); + REQUIRE_THAT(src, IsPackageDependency(_A("app"), _A("mod13"))); + REQUIRE_THAT(src, IsPackageDependency(_A("app"), _A("mod14"))); + REQUIRE_THAT(src, IsPackageDependency(_A("app"), _A("mod15"))); + REQUIRE_THAT(src, IsPackageDependency(_A("app"), _A("mod16"))); + REQUIRE_THAT(src, IsPackageDependency(_A("app"), _A("mod17"))); + REQUIRE_THAT(src, IsPackageDependency(_A("app"), _A("mod18"))); + + save_mermaid(config.output_directory(), diagram->name + ".mmd", src); + } +} \ No newline at end of file diff --git a/tests/t30014/.clang-uml b/tests/t30014/.clang-uml new file mode 100644 index 00000000..9eed5c76 --- /dev/null +++ b/tests/t30014/.clang-uml @@ -0,0 +1,13 @@ +diagrams: + t30014_package: + type: package + glob: + - t30014.cc + package_type: module + include: + modules: + - t30014 + exclude: + modules: + - t30014.app:lib1.mod2 + using_module: t30014 \ No newline at end of file diff --git a/tests/t30014/src/lib1.cppm b/tests/t30014/src/lib1.cppm new file mode 100644 index 00000000..8df1bab0 --- /dev/null +++ b/tests/t30014/src/lib1.cppm @@ -0,0 +1,13 @@ +export module t30014.app:lib1; + +export namespace clanguml::t30014 { +class B { }; + +template class BB { + T t; +}; + +namespace detail { +enum class BBB { bbb1, bbb2 }; +} // namespace detail +} // namespace clanguml::t30014 \ No newline at end of file diff --git a/tests/t30014/src/lib1mod1.cppm b/tests/t30014/src/lib1mod1.cppm new file mode 100644 index 00000000..e0449519 --- /dev/null +++ b/tests/t30014/src/lib1mod1.cppm @@ -0,0 +1,5 @@ +export module t30014.app:lib1.mod1; + +export namespace clanguml::t30014 { +class D { }; +} // namespace clanguml::t30014 \ No newline at end of file diff --git a/tests/t30014/src/lib1mod2.cppm b/tests/t30014/src/lib1mod2.cppm new file mode 100644 index 00000000..51d3f5a0 --- /dev/null +++ b/tests/t30014/src/lib1mod2.cppm @@ -0,0 +1,5 @@ +export module t30014.app:lib1.mod2; + +export namespace clanguml::t30014 { +class E { }; +} // namespace clanguml::t30014 \ No newline at end of file diff --git a/tests/t30014/src/lib2.cppm b/tests/t30014/src/lib2.cppm new file mode 100644 index 00000000..d213f45b --- /dev/null +++ b/tests/t30014/src/lib2.cppm @@ -0,0 +1,13 @@ +export module t30014.app:lib2; + +export namespace clanguml::t30014 { +class C { }; + +template class CC { + T t; +}; + +namespace detail { +enum class CCC { ccc1, ccc2 }; +} // namespace detail +} // namespace clanguml::t30014 \ No newline at end of file diff --git a/tests/t30014/src/t30014_mod.cppm b/tests/t30014/src/t30014_mod.cppm new file mode 100644 index 00000000..1c2f1390 --- /dev/null +++ b/tests/t30014/src/t30014_mod.cppm @@ -0,0 +1,13 @@ +export module t30014.app; +import :lib1; +import :lib1.mod1; +import :lib1.mod2; +import :lib2; + +export namespace clanguml::t30014 { +class A { + int get() { return a; } + + int a; +}; +} // namespace clanguml::t30014 \ No newline at end of file diff --git a/tests/t30014/t30014.cc b/tests/t30014/t30014.cc new file mode 100644 index 00000000..67822f28 --- /dev/null +++ b/tests/t30014/t30014.cc @@ -0,0 +1,6 @@ +import t30014.app; + +namespace clanguml { +namespace t30014 { +} +} \ No newline at end of file diff --git a/tests/t30014/test_case.h b/tests/t30014/test_case.h new file mode 100644 index 00000000..06c30eed --- /dev/null +++ b/tests/t30014/test_case.h @@ -0,0 +1,76 @@ +/** + * tests/t30014/test_case.h + * + * Copyright (c) 2021-2024 Bartek Kryza + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +TEST_CASE("t30014", "[test-case][package]") +{ + auto [config, db] = load_config("t30014"); + + auto diagram = config.diagrams["t30014_package"]; + + REQUIRE(diagram->name == "t30014_package"); + + auto model = generate_package_diagram(*db, diagram); + + REQUIRE(model->name() == "t30014_package"); + + { + auto src = generate_package_puml(diagram, *model); + AliasMatcher _A(src); + + REQUIRE_THAT(src, StartsWith("@startuml")); + REQUIRE_THAT(src, EndsWith("@enduml\n")); + + // Check if all packages exist + REQUIRE_THAT(src, IsPackage("app")); + REQUIRE_THAT(src, IsPackage(":lib1")); + REQUIRE_THAT(src, IsPackage(":lib2")); + REQUIRE_THAT(src, IsPackage("mod1")); + REQUIRE_THAT(src, !IsPackage("mod2")); + + save_puml(config.output_directory(), diagram->name + ".puml", src); + } + + { + auto j = generate_package_json(diagram, *model); + + using namespace json; + using namespace std::string_literals; + + REQUIRE(IsModulePackage(j, "app"s)); + REQUIRE(IsModulePackage(j, "app"s, ":lib1"s)); + REQUIRE(IsModulePackage(j, "app"s, ":lib2"s)); + REQUIRE(IsModulePackage(j, "app"s, ":lib1"s, "mod1"s)); + REQUIRE(!IsModulePackage(j, "app"s, ":lib1"s, "mod2"s)); + + save_json(config.output_directory(), diagram->name + ".json", j); + } + + { + auto src = generate_package_mermaid(diagram, *model); + + mermaid::AliasMatcher _A(src); + using mermaid::IsPackage; + + REQUIRE_THAT(src, IsPackage(_A("app"))); + REQUIRE_THAT(src, IsPackage(_A(":lib1"))); + REQUIRE_THAT(src, IsPackage(_A(":lib2"))); + REQUIRE_THAT(src, IsPackage(_A("mod1"))); + + save_mermaid(config.output_directory(), diagram->name + ".mmd", src); + } +} \ No newline at end of file diff --git a/tests/t30015/.clang-uml b/tests/t30015/.clang-uml new file mode 100644 index 00000000..1be20718 --- /dev/null +++ b/tests/t30015/.clang-uml @@ -0,0 +1,10 @@ +diagrams: + t30015_package: + type: package + glob: + - t30015.cc + package_type: module + include: + modules: + - t30015 + using_module: t30015 \ No newline at end of file diff --git a/tests/t30015/src/app.cppm b/tests/t30015/src/app.cppm new file mode 100644 index 00000000..22da8d4e --- /dev/null +++ b/tests/t30015/src/app.cppm @@ -0,0 +1,72 @@ +module; + +#include +#include +#include +#include +#include + +export module t30015.app; +import t30015.lib1; + +// import t30015.app; +// import t30015.mod2; +// import t30015.mod3; +// import t30015.mod4; +// import t30015.mod5; +// import t30015.mod6; +// import t30015.mod7; +// import t30015.mod8; +// import t30015.mod9; +// import t30015.mod10; +// import t30015.mod11; +// import t30015.mod12; +// import t30015.mod13; +// import t30015.mod14; +// import t30015.mod15; +// import t30015.mod16; +// import t30015.mod17; +// import t30015.mod18; + +export namespace clanguml::t30015 { + +class CBA : public CF { +public: + CA *ca_; + CB cb_; + std::shared_ptr cc_; + std::map> *cd_; + std::array co_; + static CP *cp_; + + CBA() = default; + + CBA(CN *cn) { } + + friend CR; + + template CBA(std::tuple &items) { } + + void ce(const std::vector /*ce_*/) { } + + std::shared_ptr cg() { return {}; } + + template void ch(std::map> &ch_) { } + + template std::map> ci(T * /*t*/) + { + return {}; + } + + S s; +}; + +void cj(std::unique_ptr /*cj_*/) { } + +std::unique_ptr ck() { return {}; } + +template void cl(std::map> & /*ch_*/) { } + +template std::map> cm() { return {}; } + +} // namespace clanguml::t30013 \ No newline at end of file diff --git a/tests/t30015/src/lib1.cppm b/tests/t30015/src/lib1.cppm new file mode 100644 index 00000000..3877d626 --- /dev/null +++ b/tests/t30015/src/lib1.cppm @@ -0,0 +1,24 @@ +export module t30015.lib1; + +export import :mod1; +export import :mod2; +export import :mod3; +export import :mod4; +export import :mod5; +export import :mod6; +export import :mod7; +export import :mod8; +export import :mod9; +export import :mod10; +export import :mod11; +export import :mod12; +export import :mod13; +export import :mod14; +export import :mod15; +export import :mod16; +export import :mod17; +export import :mod18; + +export namespace clanguml::t30015 { + +} \ No newline at end of file diff --git a/tests/t30015/src/mod1.cppm b/tests/t30015/src/mod1.cppm new file mode 100644 index 00000000..5b561d48 --- /dev/null +++ b/tests/t30015/src/mod1.cppm @@ -0,0 +1,5 @@ +export module t30015.lib1:mod1; + +export namespace clanguml::t30015 { +struct CA { }; +} \ No newline at end of file diff --git a/tests/t30015/src/mod10.cppm b/tests/t30015/src/mod10.cppm new file mode 100644 index 00000000..c52c9f28 --- /dev/null +++ b/tests/t30015/src/mod10.cppm @@ -0,0 +1,5 @@ +export module t30015.lib1:mod10; + +export namespace clanguml::t30015 { +struct CJ { }; +} \ No newline at end of file diff --git a/tests/t30015/src/mod11.cppm b/tests/t30015/src/mod11.cppm new file mode 100644 index 00000000..756088b6 --- /dev/null +++ b/tests/t30015/src/mod11.cppm @@ -0,0 +1,5 @@ +export module t30015.lib1:mod11; + +export namespace clanguml::t30015 { +struct CK { }; +} \ No newline at end of file diff --git a/tests/t30015/src/mod12.cppm b/tests/t30015/src/mod12.cppm new file mode 100644 index 00000000..33513171 --- /dev/null +++ b/tests/t30015/src/mod12.cppm @@ -0,0 +1,5 @@ +export module t30015.lib1:mod12; + +export namespace clanguml::t30015 { +struct CL { }; +} \ No newline at end of file diff --git a/tests/t30015/src/mod13.cppm b/tests/t30015/src/mod13.cppm new file mode 100644 index 00000000..fcac26ef --- /dev/null +++ b/tests/t30015/src/mod13.cppm @@ -0,0 +1,5 @@ +export module t30015.lib1:mod13; + +export namespace clanguml::t30015 { +struct CM { }; +} \ No newline at end of file diff --git a/tests/t30015/src/mod14.cppm b/tests/t30015/src/mod14.cppm new file mode 100644 index 00000000..89d748d9 --- /dev/null +++ b/tests/t30015/src/mod14.cppm @@ -0,0 +1,5 @@ +export module t30015.lib1:mod14; + +export namespace clanguml::t30015 { +struct CN { }; +} \ No newline at end of file diff --git a/tests/t30015/src/mod15.cppm b/tests/t30015/src/mod15.cppm new file mode 100644 index 00000000..49d8c63a --- /dev/null +++ b/tests/t30015/src/mod15.cppm @@ -0,0 +1,5 @@ +export module t30015.lib1:mod15; + +export namespace clanguml::t30015 { +struct CO { }; +} \ No newline at end of file diff --git a/tests/t30015/src/mod16.cppm b/tests/t30015/src/mod16.cppm new file mode 100644 index 00000000..6ea292f3 --- /dev/null +++ b/tests/t30015/src/mod16.cppm @@ -0,0 +1,5 @@ +export module t30015.lib1:mod16; + +export namespace clanguml::t30015 { +struct CP { }; +} \ No newline at end of file diff --git a/tests/t30015/src/mod17.cppm b/tests/t30015/src/mod17.cppm new file mode 100644 index 00000000..b2e6979b --- /dev/null +++ b/tests/t30015/src/mod17.cppm @@ -0,0 +1,5 @@ +export module t30015.lib1:mod17; + +export namespace clanguml::t30015 { +struct CR { }; +} \ No newline at end of file diff --git a/tests/t30015/src/mod18.cppm b/tests/t30015/src/mod18.cppm new file mode 100644 index 00000000..8b452b1d --- /dev/null +++ b/tests/t30015/src/mod18.cppm @@ -0,0 +1,5 @@ +export module t30015.lib1:mod18; + +export namespace clanguml::t30015 { +enum class S { s1, s2, s3 }; +} \ No newline at end of file diff --git a/tests/t30015/src/mod2.cppm b/tests/t30015/src/mod2.cppm new file mode 100644 index 00000000..5ddfa19d --- /dev/null +++ b/tests/t30015/src/mod2.cppm @@ -0,0 +1,7 @@ +export module t30015.lib1:mod2; + +export namespace clanguml::t30015 { +template struct CB { + T cb; +}; +} \ No newline at end of file diff --git a/tests/t30015/src/mod3.cppm b/tests/t30015/src/mod3.cppm new file mode 100644 index 00000000..7711abd6 --- /dev/null +++ b/tests/t30015/src/mod3.cppm @@ -0,0 +1,5 @@ +export module t30015.lib1:mod3; + +export namespace clanguml::t30015 { +struct CC { }; +} \ No newline at end of file diff --git a/tests/t30015/src/mod4.cppm b/tests/t30015/src/mod4.cppm new file mode 100644 index 00000000..4d07765b --- /dev/null +++ b/tests/t30015/src/mod4.cppm @@ -0,0 +1,5 @@ +export module t30015.lib1:mod4; + +export namespace clanguml::t30015 { +struct CD { }; +} \ No newline at end of file diff --git a/tests/t30015/src/mod5.cppm b/tests/t30015/src/mod5.cppm new file mode 100644 index 00000000..31ab043c --- /dev/null +++ b/tests/t30015/src/mod5.cppm @@ -0,0 +1,5 @@ +export module t30015.lib1:mod5; + +export namespace clanguml::t30015 { +struct CE { }; +} \ No newline at end of file diff --git a/tests/t30015/src/mod6.cppm b/tests/t30015/src/mod6.cppm new file mode 100644 index 00000000..6c9de47d --- /dev/null +++ b/tests/t30015/src/mod6.cppm @@ -0,0 +1,5 @@ +export module t30015.lib1:mod6; + +export namespace clanguml::t30015 { +struct CF { }; +} \ No newline at end of file diff --git a/tests/t30015/src/mod7.cppm b/tests/t30015/src/mod7.cppm new file mode 100644 index 00000000..9e8bda51 --- /dev/null +++ b/tests/t30015/src/mod7.cppm @@ -0,0 +1,5 @@ +export module t30015.lib1:mod7; + +export namespace clanguml::t30015 { +struct CG { }; +} \ No newline at end of file diff --git a/tests/t30015/src/mod8.cppm b/tests/t30015/src/mod8.cppm new file mode 100644 index 00000000..ca717b6f --- /dev/null +++ b/tests/t30015/src/mod8.cppm @@ -0,0 +1,5 @@ +export module t30015.lib1:mod8; + +export namespace clanguml::t30015 { +struct CH { }; +} \ No newline at end of file diff --git a/tests/t30015/src/mod9.cppm b/tests/t30015/src/mod9.cppm new file mode 100644 index 00000000..f9a139b9 --- /dev/null +++ b/tests/t30015/src/mod9.cppm @@ -0,0 +1,5 @@ +export module t30015.lib1:mod9; + +export namespace clanguml::t30015 { +struct CI { }; +} \ No newline at end of file diff --git a/tests/t30015/t30015.cc b/tests/t30015/t30015.cc new file mode 100644 index 00000000..edc3de2d --- /dev/null +++ b/tests/t30015/t30015.cc @@ -0,0 +1,6 @@ +import t30015.app; + +namespace clanguml { +namespace t30015 { +} +} \ No newline at end of file diff --git a/tests/t30015/test_case.h b/tests/t30015/test_case.h new file mode 100644 index 00000000..85dc7eab --- /dev/null +++ b/tests/t30015/test_case.h @@ -0,0 +1,161 @@ +/** + * tests/t30015/test_case.h + * + * Copyright (c) 2021-2024 Bartek Kryza + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +TEST_CASE("t30015", "[test-case][package]") +{ + auto [config, db] = load_config("t30015"); + + auto diagram = config.diagrams["t30015_package"]; + + REQUIRE(diagram->name == "t30015_package"); + + auto model = generate_package_diagram(*db, diagram); + + REQUIRE(model->name() == "t30015_package"); + + { + auto src = generate_package_puml(diagram, *model); + AliasMatcher _A(src); + + REQUIRE_THAT(src, StartsWith("@startuml")); + REQUIRE_THAT(src, EndsWith("@enduml\n")); + + // Check if all packages exist + REQUIRE_THAT(src, IsPackage("app")); + REQUIRE_THAT(src, IsPackage("lib1")); + REQUIRE_THAT(src, IsPackage(":mod1")); + REQUIRE_THAT(src, IsPackage(":mod2")); + REQUIRE_THAT(src, IsPackage(":mod3")); + REQUIRE_THAT(src, IsPackage(":mod4")); + REQUIRE_THAT(src, IsPackage(":mod5")); + REQUIRE_THAT(src, IsPackage(":mod6")); + REQUIRE_THAT(src, IsPackage(":mod7")); + REQUIRE_THAT(src, IsPackage(":mod8")); + REQUIRE_THAT(src, IsPackage(":mod9")); + REQUIRE_THAT(src, IsPackage(":mod10")); + REQUIRE_THAT(src, IsPackage(":mod11")); + REQUIRE_THAT(src, IsPackage(":mod12")); + REQUIRE_THAT(src, IsPackage(":mod13")); + REQUIRE_THAT(src, IsPackage(":mod14")); + REQUIRE_THAT(src, IsPackage(":mod15")); + REQUIRE_THAT(src, IsPackage(":mod16")); + REQUIRE_THAT(src, IsPackage(":mod17")); + REQUIRE_THAT(src, IsPackage(":mod18")); + + REQUIRE_THAT(src, IsDependency(_A("app"), _A(":mod1"))); + REQUIRE_THAT(src, IsDependency(_A("app"), _A(":mod2"))); + REQUIRE_THAT(src, IsDependency(_A("app"), _A(":mod3"))); + REQUIRE_THAT(src, IsDependency(_A("app"), _A(":mod4"))); + REQUIRE_THAT(src, IsDependency(_A("app"), _A(":mod5"))); + REQUIRE_THAT(src, IsDependency(_A("app"), _A(":mod6"))); + REQUIRE_THAT(src, IsDependency(_A("app"), _A(":mod7"))); + REQUIRE_THAT(src, IsDependency(_A("app"), _A(":mod8"))); + REQUIRE_THAT(src, IsDependency(_A("app"), _A(":mod9"))); + REQUIRE_THAT(src, IsDependency(_A("app"), _A(":mod10"))); + REQUIRE_THAT(src, IsDependency(_A("app"), _A(":mod11"))); + REQUIRE_THAT(src, IsDependency(_A("app"), _A(":mod12"))); + REQUIRE_THAT(src, IsDependency(_A("app"), _A(":mod13"))); + REQUIRE_THAT(src, IsDependency(_A("app"), _A(":mod14"))); + REQUIRE_THAT(src, IsDependency(_A("app"), _A(":mod15"))); + REQUIRE_THAT(src, IsDependency(_A("app"), _A(":mod16"))); + REQUIRE_THAT(src, IsDependency(_A("app"), _A(":mod17"))); + REQUIRE_THAT(src, IsDependency(_A("app"), _A(":mod18"))); + + save_puml(config.output_directory(), diagram->name + ".puml", src); + } + + { + auto j = generate_package_json(diagram, *model); + + using namespace json; + using namespace std::string_literals; + + REQUIRE(IsModulePackage(j, "app"s)); + REQUIRE(IsModulePackage(j, "lib1"s)); + REQUIRE(IsModulePackage(j, "lib1"s, ":mod1"s)); + REQUIRE(IsModulePackage(j, "lib1"s, ":mod2"s)); + REQUIRE(IsModulePackage(j, "lib1"s, ":mod3"s)); + REQUIRE(IsModulePackage(j, "lib1"s, ":mod4"s)); + REQUIRE(IsModulePackage(j, "lib1"s, ":mod5"s)); + REQUIRE(IsModulePackage(j, "lib1"s, ":mod6"s)); + REQUIRE(IsModulePackage(j, "lib1"s, ":mod7"s)); + REQUIRE(IsModulePackage(j, "lib1"s, ":mod8"s)); + REQUIRE(IsModulePackage(j, "lib1"s, ":mod9"s)); + REQUIRE(IsModulePackage(j, "lib1"s, ":mod10"s)); + REQUIRE(IsModulePackage(j, "lib1"s, ":mod11"s)); + REQUIRE(IsModulePackage(j, "lib1"s, ":mod12"s)); + REQUIRE(IsModulePackage(j, "lib1"s, ":mod13"s)); + REQUIRE(IsModulePackage(j, "lib1"s, ":mod14"s)); + REQUIRE(IsModulePackage(j, "lib1"s, ":mod15"s)); + REQUIRE(IsModulePackage(j, "lib1"s, ":mod16"s)); + REQUIRE(IsModulePackage(j, "lib1"s, ":mod17"s)); + REQUIRE(IsModulePackage(j, "lib1"s, ":mod18"s)); + + save_json(config.output_directory(), diagram->name + ".json", j); + } + + { + auto src = generate_package_mermaid(diagram, *model); + + mermaid::AliasMatcher _A(src); + using mermaid::IsPackage; + using mermaid::IsPackageDependency; + + REQUIRE_THAT(src, IsPackage(_A("app"))); + REQUIRE_THAT(src, IsPackage(_A("lib1"))); + REQUIRE_THAT(src, IsPackage(_A(":mod1"))); + REQUIRE_THAT(src, IsPackage(_A(":mod2"))); + REQUIRE_THAT(src, IsPackage(_A(":mod3"))); + REQUIRE_THAT(src, IsPackage(_A(":mod4"))); + REQUIRE_THAT(src, IsPackage(_A(":mod5"))); + REQUIRE_THAT(src, IsPackage(_A(":mod6"))); + REQUIRE_THAT(src, IsPackage(_A(":mod7"))); + REQUIRE_THAT(src, IsPackage(_A(":mod8"))); + REQUIRE_THAT(src, IsPackage(_A(":mod9"))); + REQUIRE_THAT(src, IsPackage(_A(":mod10"))); + REQUIRE_THAT(src, IsPackage(_A(":mod11"))); + REQUIRE_THAT(src, IsPackage(_A(":mod12"))); + REQUIRE_THAT(src, IsPackage(_A(":mod13"))); + REQUIRE_THAT(src, IsPackage(_A(":mod14"))); + REQUIRE_THAT(src, IsPackage(_A(":mod15"))); + REQUIRE_THAT(src, IsPackage(_A(":mod16"))); + REQUIRE_THAT(src, IsPackage(_A(":mod17"))); + REQUIRE_THAT(src, IsPackage(_A(":mod18"))); + + REQUIRE_THAT(src, IsPackageDependency(_A("app"), _A(":mod1"))); + REQUIRE_THAT(src, IsPackageDependency(_A("app"), _A(":mod2"))); + REQUIRE_THAT(src, IsPackageDependency(_A("app"), _A(":mod3"))); + REQUIRE_THAT(src, IsPackageDependency(_A("app"), _A(":mod4"))); + REQUIRE_THAT(src, IsPackageDependency(_A("app"), _A(":mod5"))); + REQUIRE_THAT(src, IsPackageDependency(_A("app"), _A(":mod6"))); + REQUIRE_THAT(src, IsPackageDependency(_A("app"), _A(":mod7"))); + REQUIRE_THAT(src, IsPackageDependency(_A("app"), _A(":mod8"))); + REQUIRE_THAT(src, IsPackageDependency(_A("app"), _A(":mod9"))); + REQUIRE_THAT(src, IsPackageDependency(_A("app"), _A(":mod10"))); + REQUIRE_THAT(src, IsPackageDependency(_A("app"), _A(":mod11"))); + REQUIRE_THAT(src, IsPackageDependency(_A("app"), _A(":mod12"))); + REQUIRE_THAT(src, IsPackageDependency(_A("app"), _A(":mod13"))); + REQUIRE_THAT(src, IsPackageDependency(_A("app"), _A(":mod14"))); + REQUIRE_THAT(src, IsPackageDependency(_A("app"), _A(":mod15"))); + REQUIRE_THAT(src, IsPackageDependency(_A("app"), _A(":mod16"))); + REQUIRE_THAT(src, IsPackageDependency(_A("app"), _A(":mod17"))); + REQUIRE_THAT(src, IsPackageDependency(_A("app"), _A(":mod18"))); + + save_mermaid(config.output_directory(), diagram->name + ".mmd", src); + } +} \ No newline at end of file diff --git a/tests/t40001/test_case.h b/tests/t40001/test_case.h index 360352de..1bdef77c 100644 --- a/tests/t40001/test_case.h +++ b/tests/t40001/test_case.h @@ -1,7 +1,7 @@ /** * tests/t40001/test_case.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -67,10 +67,10 @@ TEST_CASE("t40001", "[test-case][include]") REQUIRE(IsFolder(j, "include/lib1")); REQUIRE(IsFolder(j, "src")); - REQUIRE(IsFile(j, "include/lib1/lib1.h")); - REQUIRE(IsFile(j, "include/t40001_include1.h")); + REQUIRE(IsHeader(j, "include/lib1/lib1.h")); + REQUIRE(IsHeader(j, "include/t40001_include1.h")); REQUIRE(IsFile(j, "src/t40001.cc")); - REQUIRE(IsFile(j, "yaml-cpp/yaml.h")); + REQUIRE(IsSystemHeader(j, "yaml-cpp/yaml.h")); REQUIRE(IsFile(j, "string")); diff --git a/tests/t40002/test_case.h b/tests/t40002/test_case.h index 5a6e451c..bf09cb1d 100644 --- a/tests/t40002/test_case.h +++ b/tests/t40002/test_case.h @@ -1,7 +1,7 @@ /** * tests/t40002/test_case.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/t40003/test_case.h b/tests/t40003/test_case.h index 88bb5bf7..5b44ae41 100644 --- a/tests/t40003/test_case.h +++ b/tests/t40003/test_case.h @@ -1,7 +1,7 @@ /** * tests/t40003/test_case.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/t90000/test_case.h b/tests/t90000/test_case.h index 84d50e58..a517f474 100644 --- a/tests/t90000/test_case.h +++ b/tests/t90000/test_case.h @@ -1,7 +1,7 @@ /** * tests/t90000/test_case.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/test_cases.cc b/tests/test_cases.cc index 6a2a672b..93a02baa 100644 --- a/tests/test_cases.cc +++ b/tests/test_cases.cc @@ -1,7 +1,7 @@ /** * @file tests/test_cases.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -404,6 +404,16 @@ using namespace clanguml::test::matchers; #include "t00066/test_case.h" #include "t00067/test_case.h" #include "t00068/test_case.h" +#if defined(ENABLE_CXX_STD_20_TEST_CASES) +#if __has_include() +#include "t00069/test_case.h" +#endif +#endif +#if defined(ENABLE_CXX_MODULES_TEST_CASES) +#include "t00070/test_case.h" +#include "t00071/test_case.h" +#include "t00072/test_case.h" +#endif /// /// Sequence diagram tests @@ -450,6 +460,7 @@ using namespace clanguml::test::matchers; #include "t20036/test_case.h" #include "t20037/test_case.h" #include "t20038/test_case.h" +#include "t20039/test_case.h" /// /// Package diagram tests @@ -465,7 +476,12 @@ using namespace clanguml::test::matchers; #include "t30009/test_case.h" #include "t30010/test_case.h" #include "t30011/test_case.h" - +#if defined(ENABLE_CXX_MODULES_TEST_CASES) +#include "t30012/test_case.h" +#include "t30013/test_case.h" +#include "t30014/test_case.h" +#include "t30015/test_case.h" +#endif /// /// Include diagram tests /// diff --git a/tests/test_cases.h b/tests/test_cases.h index 0e3a9c99..c6662815 100644 --- a/tests/test_cases.h +++ b/tests/test_cases.h @@ -1,7 +1,7 @@ /** * @file tests/test_cases.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -108,6 +108,8 @@ struct Constexpr { }; struct Consteval { }; +struct Coroutine { }; + struct Noexcept { }; struct Default { }; @@ -962,6 +964,9 @@ ContainsMatcher IsMethod(std::string const &name, if constexpr (has_type()) pattern += " = deleted"; + if constexpr (has_type()) + pattern += " [coroutine]"; + pattern += " : " + type; return ContainsMatcher(CasedString(pattern, caseSensitivity)); @@ -995,6 +1000,8 @@ ContainsMatcher IsMethod(std::string const &name, std::string type = "void", method_mods.push_back("constexpr"); if constexpr (has_type()) method_mods.push_back("consteval"); + if constexpr (has_type()) + method_mods.push_back("coroutine"); pattern += " : "; @@ -1203,7 +1210,8 @@ std::optional get_element( if (e["display_name"] == name) return {e}; - if (e["type"] == "namespace" || e["type"] == "folder") { + if (e["type"] == "namespace" || e["type"] == "folder" || + e["type"] == "directory" || e["type"] == "module") { auto maybe_e = get_element(e, name); if (maybe_e) return maybe_e; @@ -1219,8 +1227,8 @@ std::optional get_participant( if (!j.contains("participants")) return {}; - for (const nlohmann::json &e : j["participants"]) { - if (e["name"] == name) + for (const nlohmann::json &e : j.at("participants")) { + if (e["display_name"] == name) return {e}; } @@ -1251,13 +1259,7 @@ auto get_relationship(const nlohmann::json &j, const std::string &from, std::string expand_name(const nlohmann::json &j, const std::string &name) { - if (!j.contains("using_namespace")) - return name; - - if (name.find("::") == 0) - return name; - - return fmt::format("{}::{}", j["using_namespace"].get(), name); + return name; } bool HasTitle(const nlohmann::json &j, const std::string &title) @@ -1271,6 +1273,22 @@ bool IsClass(const nlohmann::json &j, const std::string &name) return e && e->at("type") == "class"; } +bool InPublicModule(const nlohmann::json &j, const std::string &element, + const std::string &module) +{ + auto e = get_element(j, expand_name(j, element)); + return e && e->contains("module") && e->at("module")["name"] == module && + !e->at("module")["is_private"]; +} + +bool InPrivateModule(const nlohmann::json &j, const std::string &element, + const std::string &module) +{ + auto e = get_element(j, expand_name(j, element)); + return e && e->contains("module") && e->at("module")["name"] == module && + e->at("module")["is_private"]; +} + bool IsAbstractClass(const nlohmann::json &j, const std::string &name) { auto e = get_element(j, expand_name(j, name)); @@ -1295,10 +1313,70 @@ bool IsEnum(const nlohmann::json &j, const std::string &name) return e && e->at("type") == "enum"; } -bool IsPackage(const nlohmann::json &j, const std::string &name) +bool IsPackage(const nlohmann::json &j, const std::string &name, + const std::string &type = "namespace") { auto e = get_element(j, expand_name(j, name)); - return e && e->at("type") == "namespace"; + return e && e->at("type") == type; +} + +struct NamespacePackage { }; +struct ModulePackage { }; +struct DirectoryPackage { }; + +template std::string package_type_name(); + +template <> std::string package_type_name() +{ + return "namespace"; +} + +template <> std::string package_type_name() { return "module"; } + +template <> std::string package_type_name() +{ + return "directory"; +} + +template +bool IsPackagePath( + const nlohmann::json &j, const std::string &head, Args... args) +{ + if constexpr (sizeof...(Args) == 0) { + auto e = get_element(j, expand_name(j, head)); + + return e && e->at("type") == package_type_name(); + } + else { + auto e = get_element(j, head); + if (!e.has_value()) + return false; + + return IsPackagePath(*e, args...); + } +} + +template +bool IsNamespacePackage( + const nlohmann::json &j, const std::string &head, Args... args) +{ + return IsPackagePath( + j, head, std::forward(args)...); +} + +template +bool IsDirectoryPackage( + const nlohmann::json &j, const std::string &head, Args... args) +{ + return IsPackagePath( + j, head, std::forward(args)...); +} + +template +bool IsModulePackage( + const nlohmann::json &j, const std::string &head, Args... args) +{ + return IsPackagePath(j, head, std::forward(args)...); } bool IsFolder(const nlohmann::json &j, const std::string &name) @@ -1313,6 +1391,20 @@ bool IsFile(const nlohmann::json &j, const std::string &name) return e && e->at("type") == "file"; } +bool IsSystemHeader(const nlohmann::json &j, const std::string &name) +{ + auto e = get_element(j, name); + return e && e->at("type") == "file" && e->at("file_kind") == "header" && + e->at("is_system"); +} + +bool IsHeader(const nlohmann::json &j, const std::string &name) +{ + auto e = get_element(j, name); + return e && e->at("type") == "file" && e->at("file_kind") == "header" && + !e->at("is_system"); +} + bool IsDeprecated(const nlohmann::json &j, const std::string &name) { auto e = get_element(j, expand_name(j, name)); @@ -1575,11 +1667,30 @@ struct message_test_spec_t { void from_json(const nlohmann::json &j, message_test_spec_t &p) { - j.at("from").at("activity_name").get_to(p.from); - j.at("to").at("activity_name").get_to(p.to); + j.at("from").at("activity_id").get_to(p.from); + j.at("to").at("activity_id").get_to(p.to); j.at("return_type").get_to(p.return_type); } +std::string get_activity_id( + const nlohmann::json &j, const std::string &display_name) +{ + for (const auto &p : j["participants"]) { + if (p.contains("activities")) { + for (const auto &a : p["activities"]) { + if (a["display_name"] == display_name) { + return a["id"]; + } + } + } + else if (p["display_name"] == display_name) { + return p["id"]; + } + } + + return {}; +} + bool HasMessageChain( const nlohmann::json &j, std::vector msgs) { @@ -1588,8 +1699,8 @@ bool HasMessageChain( std::back_inserter(full_name_messages), [&j](const message_test_spec_t &m) { auto res = m; - res.from = expand_name(j, m.from); - res.to = expand_name(j, m.to); + res.from = get_activity_id(j, m.from); + res.to = get_activity_id(j, m.to); return res; }); diff --git a/tests/test_cases.yaml b/tests/test_cases.yaml index 7b7c584e..5bc0fba0 100644 --- a/tests/test_cases.yaml +++ b/tests/test_cases.yaml @@ -201,6 +201,18 @@ test_cases: - name: t00068 title: Context filter radius parameter test case description: + - name: t00069 + title: Coroutine methods in class diagrams + description: + - name: t00070 + title: Diagram filter based on C++20 modules + description: + - name: t00071 + title: Class diagram with C++20 modules generated as packages + description: + - name: t00072 + title: Class diagram with C++20 module partitions generated as packages + description: Sequence diagrams: - name: t20001 title: Basic sequence diagram test case @@ -316,6 +328,9 @@ test_cases: - name: t20038 title: Sequence diagram comment decorator test case description: + - name: t20039 + title: Test case for type aliases config option in sequence diagrams + description: Package diagrams: - name: t30001 title: Basic package diagram test case @@ -350,6 +365,18 @@ test_cases: - name: t30011 title: Package diagram with packages from directory structure for plain C description: + - name: t30012 + title: C++20 modules package diagram test + description: + - name: t30013 + title: C++20 modules package dependencies diagram test + description: + - name: t30014 + title: C++20 modules package diagram test with partitions + description: + - name: t30015 + title: C++20 modules package diagram test with partition dependencies + description: Include diagrams: - name: t40001 title: Basic include graph diagram test case diff --git a/tests/test_cli_handler.cc b/tests/test_cli_handler.cc index 763e811b..1eaf8658 100644 --- a/tests/test_cli_handler.cc +++ b/tests/test_cli_handler.cc @@ -1,7 +1,7 @@ /** * @file tests/test_cli_handler.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/test_compilation_database.cc b/tests/test_compilation_database.cc index d52bdd39..928dd6bc 100644 --- a/tests/test_compilation_database.cc +++ b/tests/test_compilation_database.cc @@ -1,7 +1,7 @@ /** * @file tests/test_compilation_database.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/test_config.cc b/tests/test_config.cc index 53d052c5..c31872c2 100644 --- a/tests/test_config.cc +++ b/tests/test_config.cc @@ -1,7 +1,7 @@ /** * @file tests/test_config.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -377,6 +377,31 @@ TEST_CASE("Test config relative paths handling", "[unit-test]") "{}/test_config_data", std::filesystem::current_path().string())); } +TEST_CASE("Test using_module relative to", "[unit-test]") +{ + auto cfg = clanguml::config::load("./test_config_data/using_module.yml"); + + CHECK(cfg.diagrams.size() == 2); + auto &def = *cfg.diagrams["class1"]; + CHECK(def.make_module_relative(std::make_optional( + "mod1.mod2.mod3")) == std::vector{std::string{"mod3"}}); + CHECK(def.make_module_relative(std::make_optional( + "mod1.mod2")) == std::vector{}); + CHECK(def.make_module_relative( + std::make_optional("modA.modB.modC")) == + std::vector{ + std::string{"modA"}, std::string{"modB"}, std::string{"modC"}}); + + def = *cfg.diagrams["class2"]; + CHECK(def.make_module_relative( + std::make_optional("mod1.mod2.mod3")) == + std::vector{std::string{"mod2"}, std::string{"mod3"}}); + CHECK(def.make_module_relative( + std::make_optional("modA.modB.modC")) == + std::vector{ + std::string{"modA"}, std::string{"modB"}, std::string{"modC"}}); +} + TEST_CASE("Test config full clang uml dump", "[unit-test]") { auto cfg = @@ -385,6 +410,37 @@ TEST_CASE("Test config full clang uml dump", "[unit-test]") CHECK(cfg.diagrams.size() == 32); } +TEST_CASE("Test config type aliases", "[unit-test]") +{ + auto cfg = clanguml::config::load("./test_config_data/type_aliases.yml"); + + CHECK(cfg.diagrams.size() == 2); + auto &def = *cfg.diagrams["class_diagram"]; + CHECK( + def.simplify_template_type( + "ns1::ns2::container") == "custom_map_t"); + CHECK(def.simplify_template_type( + "ns1::ns2::container") == + "string_map_t"); + CHECK( + def.simplify_template_type("std::basic_string") == "std::string"); + CHECK(def.simplify_template_type("std::basic_string") == + "unicode_t"); + + def = *cfg.diagrams["sequence_diagram"]; + CHECK( + def.simplify_template_type( + "ns1::ns2::container") == "custom_map_t"); + CHECK(def.simplify_template_type( + "ns1::ns2::Object::iterator " + "*,std::vector,std::allocator>>>") == "ObjectPtrIt"); + CHECK( + def.simplify_template_type("std::basic_string") == "std::string"); + CHECK(def.simplify_template_type("std::vector>") == + "std::vector"); +} + /// /// Main test function /// diff --git a/tests/test_config_data/type_aliases.yml b/tests/test_config_data/type_aliases.yml new file mode 100644 index 00000000..75775618 --- /dev/null +++ b/tests/test_config_data/type_aliases.yml @@ -0,0 +1,17 @@ +type_aliases: + "ns1::ns2::container": custom_map_t +diagrams: + class_diagram: + type: class + glob: + - test.cc + type_aliases: + "ns1::ns2::container": string_map_t + "std::basic_string": unicode_t + sequence_diagram: + type: class + relative_to: . + glob: + - test.cc + type_aliases: + "ns1::ns2::Object::iterator *,std::vector,std::allocator>>>": "ObjectPtrIt" diff --git a/tests/test_config_data/using_module.yml b/tests/test_config_data/using_module.yml new file mode 100644 index 00000000..490a65b9 --- /dev/null +++ b/tests/test_config_data/using_module.yml @@ -0,0 +1,12 @@ +diagrams: + class1: + type: class + glob: + - test.cc + using_module: mod1.mod2 + class2: + type: class + relative_to: . + glob: + - test.cc + using_module: mod1 diff --git a/tests/test_decorator_parser.cc b/tests/test_decorator_parser.cc index 0a9fb9e0..5ef6b19a 100644 --- a/tests/test_decorator_parser.cc +++ b/tests/test_decorator_parser.cc @@ -1,7 +1,7 @@ /** * @file tests/test_decorator_parser.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/test_filters.cc b/tests/test_filters.cc index 97c6f4b6..3590d331 100644 --- a/tests/test_filters.cc +++ b/tests/test_filters.cc @@ -1,7 +1,7 @@ /** * @file tests/test_filters.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/test_model.cc b/tests/test_model.cc index d61c45d5..e9fc4cf9 100644 --- a/tests/test_model.cc +++ b/tests/test_model.cc @@ -1,7 +1,7 @@ /** * @file tests/test_model.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,6 +21,7 @@ #include "class_diagram/model/class.h" #include "common/model/namespace.h" +#include "common/model/package.h" #include "common/model/template_parameter.h" TEST_CASE("Test namespace_", "[unit-test]") @@ -407,3 +408,65 @@ TEST_CASE( CHECK(tp1.calculate_specialization_match(tp2) == 0); } } + +TEST_CASE("Test common::model::package full_name", "[unit-test]") +{ + using clanguml::common::model::package; + using clanguml::common::model::path; + using clanguml::common::model::path_type; + + { + auto using_namespace = path{"A::B::C"}; + auto pkg = package(using_namespace); + pkg.set_name("G"); + pkg.set_namespace(path{"A::B::C::D::E::F"}); + + CHECK(pkg.full_name(false) == "A::B::C::D::E::F::G"); + CHECK(pkg.full_name(true) == "D::E::F::G"); + + CHECK(pkg.doxygen_link().value() == + "namespaceA_1_1B_1_1C_1_1D_1_1E_1_1F_1_1G.html"); + } + +#if !defined(_MSC_VER) + { + auto using_namespace = path{"/A/B/C", path_type::kFilesystem}; + auto pkg = package(using_namespace, path_type::kFilesystem); + pkg.set_name("G"); + pkg.set_namespace(path{"/A/B/C/D/E/F", path_type::kFilesystem}); + + CHECK(pkg.full_name(false) == "A/B/C/D/E/F/G"); + CHECK(pkg.full_name(true) == "D/E/F/G"); + } +#else + { + auto using_namespace = path{"A\\B\\C", path_type::kFilesystem}; + auto pkg = package(using_namespace, path_type::kFilesystem); + pkg.set_name("G"); + pkg.set_namespace(path{"A\\B\\C\\D\\E\\F", path_type::kFilesystem}); + + CHECK(pkg.full_name(false) == "A\\B\\C\\D\\E\\F\\G"); + CHECK(pkg.full_name(true) == "D\\E\\F\\G"); + } +#endif + + { + auto using_namespace = path{"A.B.C", path_type::kModule}; + auto pkg = package(using_namespace, path_type::kModule); + pkg.set_name("G"); + pkg.set_namespace(path{"A.B.C.D:E.F", path_type::kModule}); + + CHECK(pkg.full_name(false) == "A.B.C.D:E.F.G"); + CHECK(pkg.full_name(true) == "D:E.F.G"); + } + + { + auto using_namespace = path{"A.B.C", path_type::kModule}; + auto pkg = package(using_namespace, path_type::kModule); + pkg.set_name(":D"); + pkg.set_namespace(path{"A.B.C", path_type::kModule}); + + CHECK(pkg.full_name(false) == "A.B.C:D"); + CHECK(pkg.full_name(true) == ":D"); + } +} \ No newline at end of file diff --git a/tests/test_query_driver_output_extractor.cc b/tests/test_query_driver_output_extractor.cc index 016cb998..ff35ac6f 100644 --- a/tests/test_query_driver_output_extractor.cc +++ b/tests/test_query_driver_output_extractor.cc @@ -1,7 +1,7 @@ /** * @file tests/test_query_driver_output_extractor.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/test_thread_pool_executor.cc b/tests/test_thread_pool_executor.cc index d5d9fbd1..369b70a6 100644 --- a/tests/test_thread_pool_executor.cc +++ b/tests/test_thread_pool_executor.cc @@ -1,7 +1,7 @@ /** * @file tests/test_thread_pool_executor.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/test_util.cc b/tests/test_util.cc index 2658cbcb..0442e4c9 100644 --- a/tests/test_util.cc +++ b/tests/test_util.cc @@ -1,7 +1,7 @@ /** * @file tests/test_util.cc * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -31,7 +31,8 @@ TEST_CASE("Test split", "[unit-test]") const C empty{}; - CHECK(split("", " ") == C{""}); + CHECK(split("", " ") == C{}); + CHECK(split("", ".") == C{}); CHECK(split("ABCD", " ") == C{"ABCD"}); CHECK(split("::A", "::") == C{"A"}); CHECK(split("::", "::") == C{}); diff --git a/util/generate_test_cases_docs.py b/util/generate_test_cases_docs.py index 9504a0f9..0de123d8 100755 --- a/util/generate_test_cases_docs.py +++ b/util/generate_test_cases_docs.py @@ -58,14 +58,17 @@ with open(r'tests/test_cases.yaml') as f: tc.write(config) tc.write("\n```\n") tc.write("## Source code\n") - for source_file in os.listdir(f'tests/{name}/'): - if source_file.endswith(".h") or source_file.endswith(".cc") or source_file.endswith(".c"): - if source_file == "test_case.h": - continue - tc.write(f'File {source_file}\n') - tc.write("```cpp\n") - tc.write(open(f'tests/{name}/{source_file}', 'r').read()) - tc.write("\n```\n") + for root, dirs, files in os.walk(f'tests/{name}/'): + for source_file in files: + if source_file.endswith((".h", ".cc", ".c", ".cppm")): + if source_file == "test_case.h": + continue + file_path = os.path.join(root, source_file) + tc.write(f'File `{file_path}`\n') + tc.write("```cpp\n") + with open(file_path, 'r') as file: + tc.write(file.read()) + tc.write("\n```\n") # Copy and link the diagram image config_dict = yaml.full_load(config) diff --git a/util/templates/test_cases/test_case.h b/util/templates/test_cases/test_case.h index 17d2e3d2..13a7c6c9 100644 --- a/util/templates/test_cases/test_case.h +++ b/util/templates/test_cases/test_case.h @@ -1,7 +1,7 @@ /** * tests/{{ name }}/test_case.h * - * Copyright (c) 2021-2023 Bartek Kryza + * Copyright (c) 2021-2024 Bartek Kryza * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -50,7 +50,7 @@ TEST_CASE("{{ name }}", "[test-case][{{ type }}]") } { - auto src = generate_class_mermaid(diagram, *model); + auto src = generate_{{ type }}_mermaid(diagram, *model); mermaid::AliasMatcher _A(src); using mermaid::IsClass;