diff --git a/.gitignore b/.gitignore index de6d13d3f..910efee8f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +/tmp .gdb_history CMakeLists.txt.user CMakeCache.txt @@ -43,3 +44,6 @@ result cmake-build- cmake-build-* .run/ + +# VSCode +/.vscode/ \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 4aa189c67..6b0a152fa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # CHANGELOG + * Added regular expression support to glob patterns (#299) + * Enabled relative link patterns in generate_links option (#297) + * Added advanced diagram filter config with anyof and allof operators (#289) + * Added CLANG_UML_ENABLE_BACKTRACE CMake option (#292) + ### 0.5.3 * Added context filter direction and relationships options (#274) * Improved test coverage (#287) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4bb17ec8a..4d229ccb0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -202,6 +202,9 @@ option(ENABLE_CUDA_TEST_CASES "" OFF) if(ENABLE_CUDA_TEST_CASES) include(CheckLanguage) check_language(CUDA) + set(CMAKE_CUDA_STANDARD 17) + set(CMAKE_CUDA_ARCHITECTURES 75) + enable_language(CUDA) endif(ENABLE_CUDA_TEST_CASES) if(BUILD_TESTS) diff --git a/docs/common_options.md b/docs/common_options.md index 563730e94..175295829 100644 --- a/docs/common_options.md +++ b/docs/common_options.md @@ -71,6 +71,7 @@ configuration file as follows: glob: - src/dir1/*.cc - src/dir3/*.cc + - r: ".*test.*cpp$" ``` The glob patterns only need to match the translation units, which are also in @@ -79,6 +80,13 @@ but are not in `compile_commands.json` will be ignored. In case the `glob` pattern set does not match any translation units an error will be printed on the standard output. +For more advanced control over the `glob` pattern, instead of simple glob style +pattern, a full regular expression can be provided as an object with a single +key `r`. In such case, the pattern will not be checked against file system at +all but will only filter the compile commands database entries. This can +significantly improve performance on projects with tens of thousands of +translation units. + For small projects, the `glob` property can be omitted, which will result in `clang-uml` parsing all translation units from `compile_commands.json` for the diagram. However, for large projects, constraining the number of translation diff --git a/docs/configuration_file.md b/docs/configuration_file.md index 657a3c23c..574c3db5d 100644 --- a/docs/configuration_file.md +++ b/docs/configuration_file.md @@ -95,12 +95,14 @@ diagrams: # Generate packages from the namespaces generate_packages: true package_type: namespace # or 'directory' to generate from projects subdirectories - # Limiting the number of files to include can significantly + # Limiting the number of files to include can significantly improve + # diagram generation times glob: - src/common/model/*.h - src/common/model/*.cc - src/class_diagram/model/*.h - src/class_diagram/model/*.cc + - r: ".*test.*\\.cpp$ include: # Only include entities from the following namespaces namespaces: diff --git a/docs/diagram_filters.md b/docs/diagram_filters.md index 339b41d53..8f9f8704a 100644 --- a/docs/diagram_filters.md +++ b/docs/diagram_filters.md @@ -20,6 +20,8 @@ * [method_types](#method_types) * [callee_types](#callee_types) * [dependants and dependencies](#dependants-and-dependencies) +* [anyof](#anyof) +* [allof](#allof) @@ -72,11 +74,13 @@ The following table specifies the values allowed in each filter: | `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``` | +| `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``` | +| `anyof` | Match any of the nested filters | Logical operator, which returns true if any of its nested filters match (requires `filter_mode: advanced` option) | +| `allof` | Match all of the nested filters | Logical operator, which returns true if all of its nested filters match (requires `filter_mode: advanced` option) | The following filters are available: @@ -385,3 +389,58 @@ and the following filter: results in the following diagram: ![t00043_class](./test_cases/t00043_class.svg) + +## anyof + +> Requires setting `filter_mode: advanced` in diagram config + +This filter is in fact a logical operator, which allows to gain more control +over how the specific diagram filters are combined. Consider for instance a +case where you want to include all elements from a specific namespace, as well +as some other elements from another namespace. With basic filter this is not +possible, as the `namespaces` filter will only allow elements from the +namespaces lister. However when using `anyof` it's possible to specify them +as an alternative, i.e. any element matching any of the `anyof` subfilters +will be included. For example: + +```yaml + include: + anyof: + subclasses: + - ns1::nsA::A1 + namespaces: + - ns2::nsB + context: + - ns3::nsC::B3 +``` + +will include all subclasses of `ns1::nsA::A1`, all elements in the `ns2::nsB` +namespace as well as all elements in the context of element `ns3::nsC::B3`. + +For more examples of this checkout test cases +[t00082](./test_cases/t00082_class.md) and +[t00083](./test_cases/t00083_class.md). + +## allof + +> Requires setting `filter_mode: advanced` in diagram config + +This filter logical operator is complementary to the `anyof`. It matches all +diagram elements, which match all of it's subfilters. For instance the following +filter: + +```yaml + include: + allof: + namespaces: + - clanguml + - std + context: + - match: + radius: 2 + pattern: clanguml::A +``` + +which will include all elements that are in the context of element `clanguml::A` +not farther than 2 relationships away and also they belong to either `clanguml` +or `std` namespace. diff --git a/docs/test_cases.md b/docs/test_cases.md index 337c40d03..693e9339c 100644 --- a/docs/test_cases.md +++ b/docs/test_cases.md @@ -84,6 +84,10 @@ * [t00077](./test_cases/t00077.md) - Test case for context diagram with outward direction flag * [t00078](./test_cases/t00078.md) - Test case for context diagram with relationships option * [t00079](./test_cases/t00079.md) - Test case for context diagram exclude filter with relationships option + * [t00080](./test_cases/t00080.md) - Test case for including elements from system headers + * [t00081](./test_cases/t00081.md) - Test case for class members relationships to std types + * [t00082](./test_cases/t00082.md) - Test case for advanced diagram filter inclusion test with subclasses and namespaces + * [t00083](./test_cases/t00083.md) - Test case for advanced diagram filter exclusion test with subclasses and namespaces ## Sequence diagrams * [t20001](./test_cases/t20001.md) - Basic sequence diagram test case * [t20002](./test_cases/t20002.md) - Free function sequence diagram test case @@ -139,6 +143,7 @@ * [t20052](./test_cases/t20052.md) - Test case for inlining lambda operator calls * [t20053](./test_cases/t20053.md) - Test case for inlining nested lambda operator calls * [t20054](./test_cases/t20054.md) - Test case for sequence diagram with nested classes + * [t20055](./test_cases/t20055.md) - Test case for advanced filter in sequence diagram ## Package diagrams * [t30001](./test_cases/t30001.md) - Basic package diagram test case * [t30002](./test_cases/t30002.md) - Package dependency test case diff --git a/docs/test_cases/t00002_class.svg b/docs/test_cases/t00002_class.svg index 78bbc50f1..0049cd0f0 100644 --- a/docs/test_cases/t00002_class.svg +++ b/docs/test_cases/t00002_class.svg @@ -1,157 +1,183 @@ - + - - - - - - - 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 - which is a little like B - and a little like C - - - - - - - - - as - - - - - - - - as - - - - + 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 + which is a little like B + and a little like C +   + + + + + + + + + + + + + + as + + + + + + + + + + + + + + as + + + + + + + + + diff --git a/docs/test_cases/t00002_class_mermaid.svg b/docs/test_cases/t00002_class_mermaid.svg index ee5685fe6..d6405b38b 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_class.svg b/docs/test_cases/t00003_class.svg index 679cf9c0a..258930664 100644 --- a/docs/test_cases/t00003_class.svg +++ b/docs/test_cases/t00003_class.svg @@ -1,236 +1,232 @@ - + - - - - - - - - - - - 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 + + + + + + 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 5aeb3ed4e..e35b2a3a0 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_class.svg b/docs/test_cases/t00004_class.svg index 877ca3154..5188f663a 100644 --- a/docs/test_cases/t00004_class.svg +++ b/docs/test_cases/t00004_class.svg @@ -1,289 +1,349 @@ - + - - - - - - - - - - - Color - - Red - Green - Blue - - - - - - - B - - - - - - - - - aa : AA - - - - - - - color : Color * - - - - - - B::AA - - AA_1 - AA_2 - AA_3 - - - - - - - A - - - - - - - - foo() const : void - - - - - - - foo2() const : void - - - - - - - A::AA - - - - - - - - A::AA::Lights - - Green - Yellow - Red - - - - - - - A::AA::AAA - - - - - - - - - lights : Lights - - - - - - C::B - - int - - - - - - - - C - - T - - - - - - - - - b_int : B<int> - - - - - - - t : T - - - - - - C::AA - - - - - - - - C::AA::AAA - - - - - - - - C::AA::CCC - - CCC_1 - CCC_2 - - - - - - - C::B - - V - - - - - - - - - b : V - - - - - - C::CC - - CC_1 - CC_2 - - - - - - - detail::D - - - - - - - - detail::D::AA - - AA_1 - AA_2 - AA_3 - - - - - - - detail::D::DD - - - - - - - aa - - - - - - - - color - - - - - - - - - - - - - - - - lights - - - - - - b_int - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + Color + + Red + Green + Blue + + + + + + + + + B + + + + + + + + aa : AA + + + + + + + color : Color * + + + + + + + + + B::AA + + AA_1 + AA_2 + AA_3 + + + + + + + + + A + + + + + + + foo() const : void + + + + + + + foo2() const : void + + + + + + + + + + A::AA + + + + + + + + + + A::AA::Lights + + Green + Yellow + Red + + + + + + + + + A::AA::AAA + + + + + + + + lights : Lights + + + + + + + + + C::B + + int + + + + + + + + + + C + + T + + + + + + + + b_int : B<int> + + + + + + + t : T + + + + + + + + + C::AA + + + + + + + + + + C::AA::AAA + + + + + + + + + + C::AA::CCC + + CCC_1 + CCC_2 + + + + + + + + + C::B + + V + + + + + + + + b : V + + + + + + + + + C::CC + + CC_1 + CC_2 + + + + + + + + + detail::D + + + + + + + + + + detail::D::AA + + AA_1 + AA_2 + AA_3 + + + + + + + + + detail::D::DD + + + + + + + + + aa + + + + + + + + + + + + color + + + + + + + + + + + + + + + + + + + + + + + + lights + + + + + + + + + + b_int + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/test_cases/t00004_class_mermaid.svg b/docs/test_cases/t00004_class_mermaid.svg index 47b1bc8ed..0ebcd9930 100644 --- a/docs/test_cases/t00004_class_mermaid.svg +++ b/docs/test_cases/t00004_class_mermaid.svg @@ -246,7 +246,7 @@ - + @@ -280,7 +280,7 @@ - + @@ -309,7 +309,7 @@ - + @@ -343,7 +343,7 @@ - + @@ -372,7 +372,7 @@ - + @@ -391,7 +391,7 @@ - + @@ -425,7 +425,7 @@ - + @@ -449,7 +449,7 @@ - + @@ -468,7 +468,7 @@ - + @@ -497,7 +497,7 @@ - + @@ -516,7 +516,7 @@ - + @@ -535,7 +535,7 @@ - + @@ -564,7 +564,7 @@ - + @@ -588,7 +588,7 @@ - + @@ -617,7 +617,7 @@ - + @@ -636,7 +636,7 @@ - + @@ -670,7 +670,7 @@ - + diff --git a/docs/test_cases/t00005_class.svg b/docs/test_cases/t00005_class.svg index a6b6071d0..8832e5456 100644 --- a/docs/test_cases/t00005_class.svg +++ b/docs/test_cases/t00005_class.svg @@ -1,247 +1,287 @@ - + - - - - - - - - - - - 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 & - - - - +a - - - +b - - - +c - - - +d - - - +e - - - +f - - - +g - - - +h - - - +i - - - +j - - - +k + + + + + + 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 & + + + + + + + +a + + + + + +b + + + + + +c + + + + + +d + + + + + +e + + + + + +f + + + + + +g + + + + + +h + + + + + +i + + + + + +j + + + + + +k + diff --git a/docs/test_cases/t00005_class_mermaid.svg b/docs/test_cases/t00005_class_mermaid.svg index 4ea942a9c..f98fee15a 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_class.svg b/docs/test_cases/t00006_class.svg index c7cf0e6b4..e956ea1f7 100644 --- a/docs/test_cases/t00006_class.svg +++ b/docs/test_cases/t00006_class.svg @@ -1,326 +1,394 @@ - + - - - - - - - - - - - A - - - - - - - - B - - - - - - - - C - - - - - - - - D - - - - - - - - E - - - - - - - - F - - - - - - - - G - - - - - - - - H - - - - - - - - I - - - - - - - - J - - - - - - - - K - - - - - - - - L - - - - - - - - M - - - - - - - - N - - - - - - - - NN - - - - - - - - NNN - - - - - - - - custom_container - - T - - - - - - - - - data : std::vector<T> - - - - - - custom_container - - E - - - - - - - - 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> - - - - - - - - +a - - - +b - - - +c - - - +d - - - +e - - - +f - - - +g - - - +h - - - +i - - - +j - 10 - - - +k - 20 - - - - lm - - - - lm - - - - ns - - - - ns - - - - ns + + + + + + A + + + + + + + + + + B + + + + + + + + + + C + + + + + + + + + + D + + + + + + + + + + E + + + + + + + + + + F + + + + + + + + + + G + + + + + + + + + + H + + + + + + + + + + I + + + + + + + + + + J + + + + + + + + + + K + + + + + + + + + + L + + + + + + + + + + M + + + + + + + + + + N + + + + + + + + + + NN + + + + + + + + + + NNN + + + + + + + + + + custom_container + + T + + + + + + + + data : std::vector<T> + + + + + + + + + custom_container + + E + + + + + + + + + + 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> + + + + + + + + + + + + + + + +a + + + + + +b + + + + + +c + + + + + +d + + + + + +e + + + + + +f + + + + + +g + + + + + +h + + + + + +i + + + + + +j + 10 + + + + + +k + 20 + + + + + + lm + + + + + + lm + + + + + + ns + + + + + + ns + + + + + + ns + diff --git a/docs/test_cases/t00006_class_mermaid.svg b/docs/test_cases/t00006_class_mermaid.svg index 1714abb19..cd56c5de8 100644 --- a/docs/test_cases/t00006_class_mermaid.svg +++ b/docs/test_cases/t00006_class_mermaid.svg @@ -286,7 +286,7 @@ - + @@ -305,7 +305,7 @@ - + @@ -324,7 +324,7 @@ - + @@ -343,7 +343,7 @@ - + @@ -362,7 +362,7 @@ - + @@ -381,7 +381,7 @@ - + @@ -400,7 +400,7 @@ - + @@ -419,7 +419,7 @@ - + @@ -438,7 +438,7 @@ - + @@ -457,7 +457,7 @@ - + @@ -476,7 +476,7 @@ - + @@ -495,7 +495,7 @@ - + @@ -514,7 +514,7 @@ - + @@ -533,7 +533,7 @@ - + @@ -552,7 +552,7 @@ - + @@ -571,7 +571,7 @@ - + @@ -590,7 +590,7 @@ - + @@ -614,7 +614,7 @@ - + @@ -633,7 +633,7 @@ - + diff --git a/docs/test_cases/t00007_class.svg b/docs/test_cases/t00007_class.svg index a947b3eb0..3f851bff5 100644 --- a/docs/test_cases/t00007_class.svg +++ b/docs/test_cases/t00007_class.svg @@ -1,75 +1,83 @@ - + - - - - - - - - - - - A - - + + + + + + A + + + - - - - - B - - + + + + + + B + + + - - - - - C - - + + + + + + C + + + - - - - - R - - + + + + + + R + + + + + + + + a : std::unique_ptr<A> + + + + + + + b : std::shared_ptr<B> + + + + + + + c : std::weak_ptr<C> + + - - - - - - a : std::unique_ptr<A> - - - - - - - b : std::shared_ptr<B> - - - - - - - c : std::weak_ptr<C> - - - - +a - - - +b - - - +c + + + + +a + + + + + +b + + + + + +c + diff --git a/docs/test_cases/t00007_class_mermaid.svg b/docs/test_cases/t00007_class_mermaid.svg index 7cacf5e5a..60f425e19 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_class.svg b/docs/test_cases/t00008_class.svg index 7ad331894..0da69d0f3 100644 --- a/docs/test_cases/t00008_class.svg +++ b/docs/test_cases/t00008_class.svg @@ -1,192 +1,212 @@ - + - - - - - - - - - - - A - - T,P=T,CMP=nullptr,int N=3 - - - - - - - - - comparator : CMP - - - - - - - ints : std::array<int,N> - - - - - - - pointer : T * - - - - - - - reference : T & - - - - - - - value : T - - - - - - - values : std::vector<P> - - - - - - Vector - - T - - - - - - - - - values : std::vector<T> - - - - - - B - - T,C<> - - - - - - - - - template_template : C<T> - - - - - - B - - int,Vector - - - - - - - - D - - - D<Items...>(std::tuple<Items...> *) : void - - - - - - - - add(int i) : void - - - - - - - - ints : B<int,Vector> - - - - - - E - - - - - - - - E::nested_template - - ET - - - - - - - - get(ET * d) : DT * - - - - - - - E::nested_template - - char - - - - - - - - getDecl(char * c) : DeclType * - - - - - - - - ints - - - - - - - - - - + + + + + + A + + T,P=T,CMP=nullptr,int N=3 + + + + + + + + comparator : CMP + + + + + + + ints : std::array<int,N> + + + + + + + pointer : T * + + + + + + + reference : T & + + + + + + + value : T + + + + + + + values : std::vector<P> + + + + + + + + + Vector + + T + + + + + + + + values : std::vector<T> + + + + + + + + + B + + T,C<> + + + + + + + + template_template : C<T> + + + + + + + + + B + + int,Vector + + + + + + + + + + D + + + D<Items...>(std::tuple<Items...> *) : void + + + + + + + add(int i) : void + + + + + + + + ints : B<int,Vector> + + + + + + + + + E + + + + + + + + + + E::nested_template + + ET + + + + + + + get(ET * d) : DT * + + + + + + + + + + E::nested_template + + char + + + + + + + getDecl(char * c) : DeclType * + + + + + + + + + + + + + ints + + + + + + + + + + + + + + + + + diff --git a/docs/test_cases/t00008_class_mermaid.svg b/docs/test_cases/t00008_class_mermaid.svg index 3c0a5046a..357b183ce 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_class.svg b/docs/test_cases/t00009_class.svg index 71a39806e..26f422bd3 100644 --- a/docs/test_cases/t00009_class.svg +++ b/docs/test_cases/t00009_class.svg @@ -1,110 +1,135 @@ - + - - - - - - - - - - - A - - T - - + + + + + + A + + T + + + + + + + + value : T + + - - - + + + + + + A + + int + + + - - value : T + + + + + + A + + std::string + + + - - - - - A - - int - - + + + + + + A + + std::vector<std::string> + + + - - - - - A - - std::string - - + + + + + + B + + + + + + + + aint : A<int> + + + + + + + astring : A<std::string> * + + + + + + + avector : A<std::vector<std::string>> & + + - - - - - A - - std::vector<std::string> - - - - - - - - B - - - - - - - - - aint : A<int> - - - - - - - astring : A<std::string> * - - - - - - - avector : A<std::vector<std::string>> & - - - - - - - - - - aint - - - astring - - - astring - - - avector - - - avector + + + + + + + + + + + + + + + + + aint + + + + + + astring + + + + + + astring + + + + + + avector + + + + + + avector + diff --git a/docs/test_cases/t00009_class_mermaid.svg b/docs/test_cases/t00009_class_mermaid.svg index 9a90963cc..b308c55b1 100644 --- a/docs/test_cases/t00009_class_mermaid.svg +++ b/docs/test_cases/t00009_class_mermaid.svg @@ -150,7 +150,7 @@ - + @@ -174,7 +174,7 @@ - + @@ -193,7 +193,7 @@ - + @@ -212,7 +212,7 @@ - + @@ -231,7 +231,7 @@ - + diff --git a/docs/test_cases/t00010_class.svg b/docs/test_cases/t00010_class.svg index 9390ac758..ba536021a 100644 --- a/docs/test_cases/t00010_class.svg +++ b/docs/test_cases/t00010_class.svg @@ -1,101 +1,113 @@ - + - - - - - - - - - - - A - - T,P - - + + + + + + A + + T,P + + + + + + + + first : T + + + + + + + second : P + + - - - + + + + + + A + + T,std::string + + + - - first : T + + + + + + B + + T + + + + + + + + astring : A<T,std::string> + + - - - + + + + + + B + + int + + + - - second : P + + + + + + C + + + + + + + + aintstring : B<int> + + - - - - - A - - T,std::string - - - - - - - - B - - T - - - - - - - - - astring : A<T,std::string> - - - - - - B - - int - - - - - - - - C - - - - - - - - - aintstring : B<int> - - - - - - - astring - - - - - - aintstring + + + + + + + + + astring + + + + + + + + + + aintstring + diff --git a/docs/test_cases/t00010_class_mermaid.svg b/docs/test_cases/t00010_class_mermaid.svg index 45dce0863..fb1f89ec9 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_class.svg b/docs/test_cases/t00011_class.svg index 4e003b526..94b324fbd 100644 --- a/docs/test_cases/t00011_class.svg +++ b/docs/test_cases/t00011_class.svg @@ -1,75 +1,79 @@ - + - - - - - - - - - - - D - - T - - + + + + + + D + + T + + + + + + + + value : T + + - - - + + + + + + A + + + + + + + foo() : void + + + - - value : T + + + + + + B + + + + + + + foo() : void + + + + + + + + m_a : A * + + - - - - - A - - - - - - - - foo() : void - - - - - - - B - - - - - - - - foo() : void - - - - - - - - m_a : A * - - - - - «friend» - - - - m_a + + + + + «friend» + + + + + + m_a + diff --git a/docs/test_cases/t00011_class_mermaid.svg b/docs/test_cases/t00011_class_mermaid.svg index 161886138..ddffe7384 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_class.svg b/docs/test_cases/t00012_class.svg index 6d1e86d63..7aabca2a8 100644 --- a/docs/test_cases/t00012_class.svg +++ b/docs/test_cases/t00012_class.svg @@ -1,197 +1,231 @@ - + - - - - - - - - - - - A - - T,Ts... - - - - - - - - - value : T - - - - - - - values : std::variant<Ts...> - - - - - - B - - int... Is - - - - - - - - - ints : std::array<int,sizeof...(Is)> - - - - - - C - - T,int... Is - - - - - - - - - ints : std::array<T,sizeof...(Is)> - - - - - - A - - int,std::string,float - - - - - - - - A - - int,std::string,bool - - - - - - - - B - - 3,2,1 - - - - - - - - B - - 1,1,1,1 - - - - - - - - C - - std::map<int,std::vector<std::vector<std::vector<std::string>>>>,3,3,3 - - - - - - - - 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 - - - - - - - - - - - - - - a1 - - - - a2 - - - - b1 - - - - b2 - - - - c1 + + + + + + A + + T,Ts... + + + + + + + + value : T + + + + + + + values : std::variant<Ts...> + + + + + + + + + B + + int... Is + + + + + + + + ints : std::array<int,sizeof...(Is)> + + + + + + + + + C + + T,int... Is + + + + + + + + ints : std::array<T,sizeof...(Is)> + + + + + + + + + A + + int,std::string,float + + + + + + + + + + A + + int,std::string,bool + + + + + + + + + + B + + 3,2,1 + + + + + + + + + + B + + 1,1,1,1 + + + + + + + + + + C + + std::map<int,std::vector<std::vector<std::vector<std::string>>>>,3,3,3 + + + + + + + + + + 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 + + + + + + + + + + + + + + + + + + + + + + + + + + a1 + + + + + + a2 + + + + + + b1 + + + + + + b2 + + + + + + c1 + diff --git a/docs/test_cases/t00012_class_mermaid.svg b/docs/test_cases/t00012_class_mermaid.svg index b1a4d6a50..d392977b8 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_class.svg b/docs/test_cases/t00013_class.svg index e48cab467..c336c9b5d 100644 --- a/docs/test_cases/t00013_class.svg +++ b/docs/test_cases/t00013_class.svg @@ -1,301 +1,349 @@ - + - - - - - - - - - - - ABCD::F - - T - - - - - - - - - f : T - - - - - - ABCD::F - - int - - - - - - - - A - - - - - - - - - a : int - - - - - - B - - - - - - - - - b : int - - - - - - C - - - - - - - - - c : int - - - - - - D - - - - - - - - print(R * r) : void - - - - - - - - d : int - - - - - - E - - T - - - - - - - - - e : T - - - - - - G - - T,Args... - - - - - - - - - args : std::tuple<Args...> - - - - - - - g : T - - - - - - E - - int - - - - - - - - G - - int,float,std::string - - - - - - - - E - - std::string - - - - - - - - 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> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - gintstring - - - - estring + + + + + + ABCD::F + + T + + + + + + + + f : T + + + + + + + + + ABCD::F + + int + + + + + + + + + + A + + + + + + + + a : int + + + + + + + + + B + + + + + + + + b : int + + + + + + + + + C + + + + + + + + c : int + + + + + + + + + D + + + + + + + print(R * r) : void + + + + + + + + d : int + + + + + + + + + E + + T + + + + + + + + e : T + + + + + + + + + G + + T,Args... + + + + + + + + args : std::tuple<Args...> + + + + + + + g : T + + + + + + + + + E + + int + + + + + + + + + + G + + int,float,std::string + + + + + + + + + + E + + std::string + + + + + + + + + + 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> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + gintstring + + + + + + estring + diff --git a/docs/test_cases/t00013_class_mermaid.svg b/docs/test_cases/t00013_class_mermaid.svg index 19217b269..ffa488439 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_class.svg b/docs/test_cases/t00014_class.svg index 46415c191..52d52546c 100644 --- a/docs/test_cases/t00014_class.svg +++ b/docs/test_cases/t00014_class.svg @@ -1,426 +1,526 @@ - + - - - - - - - - - - - A - - T,P - - - - - - - - - p : P - - - - - - - t : T - - - - - - B - - - - - - - - - value : std::string - - - - - - A - - T,std::string - - - - - - - - A - - T,std::unique_ptr<std::string> - - - - - - - - A - - long,T - - - - - - - - A - - double,T - - - - - - - - A - - long,U - - - - - - - - A - - long,bool - - - - - - - - A - - double,bool - - - - - - - - A - - long,float - - - - - - - - A - - double,float - - - - - - - - A - - bool,std::string - - - - - - - - A - - float,std::unique_ptr<std::string> - - - - - - - - A - - int,std::string - - - - - - - - A - - std::string,std::string - - - - - - - A - - char,std::string - - - - - - A - - wchar_t,std::string - - - - - - - R - - T - - - - - - - - - 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> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - bapair - - - - bs - - - - bs2 - - - - vps - - - - bapair - - - - abool - - - - aboolfloat - - - - aboolfloat - - - - atfloat - - - - afloat - - - - boolstring - - - - floatstring - - - - intstring - - - - stringstring - - - - bstringstring - - - - atfloat - - - - - - cb - - - - - - gcb + + + + + + A + + T,P + + + + + + + + p : P + + + + + + + t : T + + + + + + + + + B + + + + + + + + value : std::string + + + + + + + + + A + + T,std::string + + + + + + + + + + A + + T,std::unique_ptr<std::string> + + + + + + + + + + A + + long,T + + + + + + + + + + A + + double,T + + + + + + + + + + A + + long,U + + + + + + + + + + A + + long,bool + + + + + + + + + + A + + double,bool + + + + + + + + + + A + + long,float + + + + + + + + + + A + + double,float + + + + + + + + + + A + + bool,std::string + + + + + + + + + + A + + float,std::unique_ptr<std::string> + + + + + + + + + + A + + int,std::string + + + + + + + + + + A + + std::string,std::string + + + + + + + + + A + + char,std::string + + + + + + + + A + + wchar_t,std::string + + + + + + + + + R + + T + + + + + + + + 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> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + bapair + + + + + + bs + + + + + + bs2 + + + + + + vps + + + + + + bapair + + + + + + abool + + + + + + aboolfloat + + + + + + aboolfloat + + + + + + atfloat + + + + + + afloat + + + + + + boolstring + + + + + + floatstring + + + + + + intstring + + + + + + stringstring + + + + + + bstringstring + + + + + + atfloat + + + + + + + + + + cb + + + + + + + + + + gcb + diff --git a/docs/test_cases/t00014_class_mermaid.svg b/docs/test_cases/t00014_class_mermaid.svg index f3403f8f8..343473ee3 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,45 +774,41 @@ - - - - - - - -
- -
-
- -
- A<char,std::string> -
-
-
+ + + + + + +
+ +
+
+ +
+ A<char,std::string> +
+
-
- - - - - - - -
- -
-
- -
- A<wchar_t,std::string> -
-
-
+
+ + + + + + +
+ +
+
+ +
+ A<wchar_t,std::string> +
+
-
- + + diff --git a/docs/test_cases/t00015_class.svg b/docs/test_cases/t00015_class.svg index f3bbddb19..25e1cbc1d 100644 --- a/docs/test_cases/t00015_class.svg +++ b/docs/test_cases/t00015_class.svg @@ -1,59 +1,69 @@ - + - - - - - - - - - - - ns1::A - - + + + + + + ns1::A + + + - - - - - ns1::ns2_v0_9_0::A - - + + + + + + ns1::ns2_v0_9_0::A + + + - - - - - ns1::Anon - - + + + + + + ns1::Anon + + + - - - - - ns3::ns1::ns2::Anon - - + + + + + + ns3::ns1::ns2::Anon + + + - - - - - ns3::B - - + + + + + + ns3::B + + + - - - - - - + + + + + + + + + + + + diff --git a/docs/test_cases/t00015_class_mermaid.svg b/docs/test_cases/t00015_class_mermaid.svg index 655d5b28f..e176e8990 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_class.svg b/docs/test_cases/t00016_class.svg index 879f0bd88..3155d7330 100644 --- a/docs/test_cases/t00016_class.svg +++ b/docs/test_cases/t00016_class.svg @@ -1,95 +1,111 @@ - + - - - - - - - - - - - is_numeric - - typename - - - - value : enum + + + + + + is_numeric + + typename + + + + value : enum + - - - - - is_numeric - - float - - - - value : enum + + + + + + is_numeric + + float + + + + value : enum + - - - - - is_numeric - - char - - - - value : enum + + + + + + is_numeric + + char + + + + value : enum + - - - - - is_numeric - - unsigned int - - - - value : enum + + + + + + is_numeric + + unsigned int + + + + value : enum + - - - - - is_numeric - - int - - - - value : enum + + + + + + is_numeric + + int + + + + value : enum + - - - - - is_numeric - - bool - - - - value : enum + + + + + + is_numeric + + bool + + + + value : enum + - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + diff --git a/docs/test_cases/t00016_class_mermaid.svg b/docs/test_cases/t00016_class_mermaid.svg index 6291274d2..c483a07f9 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_class.svg b/docs/test_cases/t00017_class.svg index d6e290332..51141eb37 100644 --- a/docs/test_cases/t00017_class.svg +++ b/docs/test_cases/t00017_class.svg @@ -1,177 +1,217 @@ - + - - - - - - - - - - - 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 & - - - - -a - - - -b - - - -c - - - -d - - - -e - - - -f - - - -g - - - -h - - - -i - - - -j - - - -k + + + + + + 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 & + + + + + + + -a + + + + + -b + + + + + -c + + + + + -d + + + + + -e + + + + + -f + + + + + -g + + + + + -h + + + + + -i + + + + + -j + + + + + -k + diff --git a/docs/test_cases/t00017_class_mermaid.svg b/docs/test_cases/t00017_class_mermaid.svg index 3cfbe8f44..debccf96e 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_class.svg b/docs/test_cases/t00018_class.svg index 978551716..78b5b9a2b 100644 --- a/docs/test_cases/t00018_class.svg +++ b/docs/test_cases/t00018_class.svg @@ -1,136 +1,138 @@ - + - - - - - - - - - - - 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> - - - - - - - pImpl + + + + + + 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> + + + + + + + + + + + + pImpl + diff --git a/docs/test_cases/t00018_class_mermaid.svg b/docs/test_cases/t00018_class_mermaid.svg index 07e1fa81b..df06970e0 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_class.svg b/docs/test_cases/t00019_class.svg index 8f0330d11..d774e16c6 100644 --- a/docs/test_cases/t00019_class.svg +++ b/docs/test_cases/t00019_class.svg @@ -1,198 +1,222 @@ - + - - - - - - - - - - - Base - - - - - - - - Base() = default : void - - - - - - - ~Base() constexpr = default : void - - - - - - - - m1() : int - - - - - - - m2() : std::string - - - - - - - Layer1 - - LowerLayer - - - - - - - - m1() : int - - - - - - - m2() : std::string - - - - - - - Layer2 - - LowerLayer - - - - - - - - all_calls_count() const : int - - - - - - - Layer3 - - LowerLayer - - - - - - - - m1() : int - - - - - - - m1_calls() const : int - - - - - - - m2() : std::string - - - - - - - m2_calls() const : int - - - - - - - - m_m1_calls : int - - - - - - - m_m2_calls : int - - - - - Layer3 - - Base - - - - - - Layer2 - - Layer3<Base> - - - - - - Layer1 - - Layer2<Layer3<Base>> - - - - - - - A - - - - - - - - - layers : std::unique_ptr<Layer1<Layer2<Layer3<Base>>>> - - - - - - - - - - - - - - - - - layers + + + + + + Base + + + + + + + Base() = default : void + + + + + + + ~Base() constexpr = default : void + + + + + + + + m1() : int + + + + + + + m2() : std::string + + + + + + + + + + Layer1 + + LowerLayer + + + + + + + m1() : int + + + + + + + m2() : std::string + + + + + + + + + + Layer2 + + LowerLayer + + + + + + + all_calls_count() const : int + + + + + + + + + + Layer3 + + LowerLayer + + + + + + + m1() : int + + + + + + + m1_calls() const : int + + + + + + + m2() : std::string + + + + + + + m2_calls() const : int + + + + + + + + m_m1_calls : int + + + + + + + m_m2_calls : int + + + + + + + + Layer3 + + Base + + + + + + + + Layer2 + + Layer3<Base> + + + + + + + + Layer1 + + Layer2<Layer3<Base>> + + + + + + + + + A + + + + + + + + layers : std::unique_ptr<Layer1<Layer2<Layer3<Base>>>> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + layers + diff --git a/docs/test_cases/t00019_class_mermaid.svg b/docs/test_cases/t00019_class_mermaid.svg index e47f63904..ecc3f8f63 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,64 +273,58 @@ - - - - - - - -
- -
-
- -
- Layer3<Base> -
-
-
+ + + + + + +
+ +
+
+ +
+ Layer3<Base> +
+
-
- - - - - - - -
- -
-
- -
- Layer2<Layer3<Base>> -
-
-
+
+ + + + + + +
+ +
+
+ +
+ Layer2<Layer3<Base>> +
+
-
- - - - - - - -
- -
-
- -
- Layer1<Layer2<Layer3<Base>>> -
-
-
+
+ + + + + + +
+ +
+
+ +
+ Layer1<Layer2<Layer3<Base>>> +
+
-
- + + diff --git a/docs/test_cases/t00020_class.svg b/docs/test_cases/t00020_class.svg index 40d4137d2..9d3628672 100644 --- a/docs/test_cases/t00020_class.svg +++ b/docs/test_cases/t00020_class.svg @@ -1,217 +1,261 @@ - + - - - - - - - - - - - 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> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + 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 2c8a9bdb7..3c2685c3f 100644 --- a/docs/test_cases/t00020_class_mermaid.svg +++ b/docs/test_cases/t00020_class_mermaid.svg @@ -226,7 +226,7 @@ - + @@ -255,7 +255,7 @@ - + @@ -279,7 +279,7 @@ - + @@ -303,7 +303,7 @@ - + @@ -332,7 +332,7 @@ - + @@ -356,7 +356,7 @@ - + @@ -380,7 +380,7 @@ - + @@ -409,7 +409,7 @@ - + @@ -438,7 +438,7 @@ - + diff --git a/docs/test_cases/t00021_class.svg b/docs/test_cases/t00021_class.svg index a10687d2a..4372ee197 100644 --- a/docs/test_cases/t00021_class.svg +++ b/docs/test_cases/t00021_class.svg @@ -1,194 +1,234 @@ - + - - - - - - - - - - - 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 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + 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 ac47aba15..e7aed9eea 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_class.svg b/docs/test_cases/t00022_class.svg index 4bfa1d3a3..f4b4e15e3 100644 --- a/docs/test_cases/t00022_class.svg +++ b/docs/test_cases/t00022_class.svg @@ -1,90 +1,94 @@ - + - - - - - - - - - - - A - - - - - - - - method1() = 0 : void - - - - - - - method2() = 0 : void - - - - - - - template_method() : void - - - - - - - A1 - - - - - - - - method1() : void - - - - - - - method2() : void - - - - - - - A2 - - - - - - - - method1() : void - - - - - - - method2() : void - - - - - - + + + + + + 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 abd4faad6..a60df7227 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_class.svg b/docs/test_cases/t00023_class.svg index bd1381e90..d08bfea69 100644 --- a/docs/test_cases/t00023_class.svg +++ b/docs/test_cases/t00023_class.svg @@ -1,121 +1,133 @@ - + - - - - - - - - - - - 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> - - - - - - - - - - - m_strategy + + + + + + 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> + + + + + + + + + + + + + + + + + + + + m_strategy + diff --git a/docs/test_cases/t00023_class_mermaid.svg b/docs/test_cases/t00023_class_mermaid.svg index de8685177..675f08ae8 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_class.svg b/docs/test_cases/t00024_class.svg index 7a1a145ca..93280d539 100644 --- a/docs/test_cases/t00024_class.svg +++ b/docs/test_cases/t00024_class.svg @@ -1,134 +1,144 @@ - + - - - - - - - - - - - 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> - - - - - - - - - m_target - - + + + + + + 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> + + + + + + + + + + + + + + + + m_target + + + + + diff --git a/docs/test_cases/t00024_class_mermaid.svg b/docs/test_cases/t00024_class_mermaid.svg index b65fe4fd2..788b7032f 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_class.svg b/docs/test_cases/t00025_class.svg index 5546a9e96..35534124b 100644 --- a/docs/test_cases/t00025_class.svg +++ b/docs/test_cases/t00025_class.svg @@ -1,154 +1,172 @@ - + - - - - - - - - - - - Target1 - - - - - - - - m1() : void - - - - - - - m2() : void - - - - - - - Target2 - - - - - - - - m1() : void - - - - - - - m2() : void - - - - - - - Proxy - - T - - - - - - - - Proxy(std::shared_ptr<T> target) : void - - - - - - - - m1() : void - - - - - - - m2() : void - - - - - - - - m_target : std::shared_ptr<T> - - - - - - Proxy - - Target1 - - - - - - - - Proxy - - Target2 - - - - - - - - ProxyHolder - - - - - - - - - proxy1 : Proxy<Target1> - - - - - - - proxy2 : Proxy<Target2> - - - - - - - - - - - - - proxy1 - - - - proxy2 + + + + + + Target1 + + + + + + + m1() : void + + + + + + + m2() : void + + + + + + + + + + Target2 + + + + + + + m1() : void + + + + + + + m2() : void + + + + + + + + + + Proxy + + T + + + + + + + Proxy(std::shared_ptr<T> target) : void + + + + + + + + m1() : void + + + + + + + m2() : void + + + + + + + + m_target : std::shared_ptr<T> + + + + + + + + + Proxy + + Target1 + + + + + + + + + + Proxy + + Target2 + + + + + + + + + + ProxyHolder + + + + + + + + proxy1 : Proxy<Target1> + + + + + + + proxy2 : Proxy<Target2> + + + + + + + + + + + + + + + + + + + + + + + + proxy1 + + + + + + proxy2 + diff --git a/docs/test_cases/t00025_class_mermaid.svg b/docs/test_cases/t00025_class_mermaid.svg index bdfa80f4e..f11a5e1a4 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_class.svg b/docs/test_cases/t00026_class.svg index 945d6b0c2..b34406a69 100644 --- a/docs/test_cases/t00026_class.svg +++ b/docs/test_cases/t00026_class.svg @@ -1,189 +1,207 @@ - + - - - - - - - - - - - Memento - - T - - - - - - - - Memento(T && v) : void - - - - - - - - value() const : T - - - - - - - - m_value : T - - - - - - Originator - - 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 - - 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 - - std::string - - - - - - - - Originator - - std::string - - - - - - - - StringMemento - - - - - - - - - caretaker : Caretaker<std::string> - - - - - - - originator : Originator<std::string> - - - - - - - m_mementos - - - - - - - - caretaker - - - - originator + + + + + + Memento + + T + + + + + + + Memento(T && v) : void + + + + + + + + value() const : T + + + + + + + + m_value : T + + + + + + + + + Originator + + 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 + + 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 + + std::string + + + + + + + + + + Originator + + std::string + + + + + + + + + + StringMemento + + + + + + + + caretaker : Caretaker<std::string> + + + + + + + originator : Originator<std::string> + + + + + + + + + + + + m_mementos + + + + + + + + + + + + + + caretaker + + + + + + originator + diff --git a/docs/test_cases/t00026_class_mermaid.svg b/docs/test_cases/t00026_class_mermaid.svg index 7f81741be..b313cc644 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_class.svg b/docs/test_cases/t00027_class.svg index e31077246..d6666b899 100644 --- a/docs/test_cases/t00027_class.svg +++ b/docs/test_cases/t00027_class.svg @@ -1,243 +1,287 @@ - + - - - - - - - - - - - Shape - - - - - - - - ~Shape() constexpr = default : void - - - - - - - - display() = 0 : void - - - - - - - Line - - - - - - - - Line - - T<>... - - - - - - - - display() : void - - - - - - - Text - - - - - - - - Text - - T<>... - - - - - - - - display() : void - - - - - - - ShapeDecorator - - - - - - - - display() = 0 : void - - - - - - - Color - - T - - - - - - - - display() : void - - - - - - - Weight - - T - - - - - - - - display() : void - - - - - - - Line - - Color,Weight - - - - - - - - Line - - Color - - - - - - - - Text - - Color,Weight - - - - - - - - Text - - Color - - - - - - - - Window - - - - - - - - - border : Line<Color,Weight> - - - - - - - description : Text<Color> - - - - - - - divider : Line<Color> - - - - - - - title : Text<Color,Weight> - - - - - - - - - - - - - - - - - - - - - border - - - - divider - - - - title - - - - description + + + + + + Shape + + + + + + + ~Shape() constexpr = default : void + + + + + + + + display() = 0 : void + + + + + + + + + + Line + + + + + + + + + + Line + + T<>... + + + + + + + display() : void + + + + + + + + + + Text + + + + + + + + + + Text + + T<>... + + + + + + + display() : void + + + + + + + + + + ShapeDecorator + + + + + + + display() = 0 : void + + + + + + + + + + Color + + T + + + + + + + display() : void + + + + + + + + + + Weight + + T + + + + + + + display() : void + + + + + + + + + + Line + + Color,Weight + + + + + + + + + + Line + + Color + + + + + + + + + + Text + + Color,Weight + + + + + + + + + + Text + + Color + + + + + + + + + + Window + + + + + + + + border : Line<Color,Weight> + + + + + + + description : Text<Color> + + + + + + + divider : Line<Color> + + + + + + + title : Text<Color,Weight> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + border + + + + + + divider + + + + + + title + + + + + + description + diff --git a/docs/test_cases/t00027_class_mermaid.svg b/docs/test_cases/t00027_class_mermaid.svg index 3ef4480cb..ef89fff70 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_class.svg b/docs/test_cases/t00028_class.svg index e2b16dd4f..168eb742c 100644 --- a/docs/test_cases/t00028_class.svg +++ b/docs/test_cases/t00028_class.svg @@ -1,203 +1,243 @@ - + - - - - - - - - - - - A - - - - - - A class note. - - - - - B - - - - - - B class note. - - - - - C - - - - - - C class note. - - - - - D - - - - - - D - class - note. - - - - - E - - T - - - - - - - - - param : T - - - - E template class note. - - - - - G - - - - - - - - F - - one - two - three - - - - - F enum note. - - - - - E - - int - - - - - - - - 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. - - - - - - aaa - - - - bbb - - - - ccc - - - - ddd - - - - eee - - - - ggg + + + + + + A + + + + + + + + A class note. + + + + + + + B + + + + + + + + B class note. + + + + + + + C + + + + + + + + C class note. + + + + + + + D + + + + + + + + D + class + note. + + + + + + + E + + T + + + + + + + + param : T + + + + + + + E template class note. + + + + + + + G + + + + + + + + + + F + + one + two + three + + + + + + + F enum note. + + + + + + + E + + int + + + + + + + + + + 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. + + + + + + + + + aaa + + + + + + bbb + + + + + + ccc + + + + + + ddd + + + + + + eee + + + + + + ggg + diff --git a/docs/test_cases/t00028_class_mermaid.svg b/docs/test_cases/t00028_class_mermaid.svg index 9d31699cf..8c76bede8 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_class.svg b/docs/test_cases/t00029_class.svg index 39fbbd342..f01a14a73 100644 --- a/docs/test_cases/t00029_class.svg +++ b/docs/test_cases/t00029_class.svg @@ -1,133 +1,149 @@ - + - - - - - - - - - - - A - - - - - - - - C - - T - - - - - - - - - param : T - - - - - - D - - - - - - - - - param : T - - - - - - E - - one - two - three - - - - - - - G1 - - - - - - - - G2 - - - - - - - - G3 - - - - - - - - G4 - - - - - - - - R - - - - - - - - - g1 : G1 - - - - - - - g3 : G3 & - - - - - - - g4 : std::shared_ptr<G4> - - - - - g1 - - - - g4 + + + + + + A + + + + + + + + + + C + + T + + + + + + + + param : T + + + + + + + + + D + + + + + + + + param : T + + + + + + + + + E + + one + two + three + + + + + + + + + G1 + + + + + + + + + + G2 + + + + + + + + + + G3 + + + + + + + + + + G4 + + + + + + + + + + R + + + + + + + + g1 : G1 + + + + + + + g3 : G3 & + + + + + + + g4 : std::shared_ptr<G4> + + + + + + + + g1 + + + + + + g4 + diff --git a/docs/test_cases/t00029_class_mermaid.svg b/docs/test_cases/t00029_class_mermaid.svg index b0a69878f..a00244618 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_class.svg b/docs/test_cases/t00030_class.svg index 246287de8..7504c3334 100644 --- a/docs/test_cases/t00030_class.svg +++ b/docs/test_cases/t00030_class.svg @@ -1,122 +1,138 @@ - + - - - - - - - - - - - A - - - - - - - - B - - - - - - - - C - - - - - - - - D - - - - - - - - E - - - - - - - - R - - - - - - - - - aaa : A - - - - - - - bbb : std::vector<B> - - - - - - - ccc : std::vector<C> - - - - - - - ddd : D - - - - - - - eee : E * - - - - - aaa - - - - bbb - 0..1 - 1..* - - - - ccc - 0..1 - 1..5 - - - - ddd - 1 - - - - eee - 1 + + + + + + A + + + + + + + + + + B + + + + + + + + + + C + + + + + + + + + + D + + + + + + + + + + E + + + + + + + + + + R + + + + + + + + aaa : A + + + + + + + bbb : std::vector<B> + + + + + + + ccc : std::vector<C> + + + + + + + ddd : D + + + + + + + eee : E * + + + + + + + + aaa + + + + + + bbb + 0..1 + 1..* + + + + + + ccc + 0..1 + 1..5 + + + + + + ddd + 1 + + + + + + eee + 1 + diff --git a/docs/test_cases/t00030_class_mermaid.svg b/docs/test_cases/t00030_class_mermaid.svg index 89a217c46..15330910a 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_class.svg b/docs/test_cases/t00031_class.svg index e97fe3344..f614cb43b 100644 --- a/docs/test_cases/t00031_class.svg +++ b/docs/test_cases/t00031_class.svg @@ -1,140 +1,159 @@ - + - + - - - - - - - + - - - - - - A - - - - - - - - B - - one - two - three - - - - - - - - C - - T - - - - - - - - - ttt : T - - - - - - D - - - - - - - - C - - int - - - - - - - - R - - - - - - - - add_b(B b) : void - - - - - - - - aaa : A * - - - - - - - bbb : std::vector<B> - - - - - - - ccc : C<int> - - - - - - - ddd : D * - - - - - - - - - bbb - - - - aaa - - - - ccc - - - - ddd + + + + + + + + + A + + + + + + + + + + B + + one + two + three + + + + + + + + + C + + T + + + + + + + + ttt : T + + + + + + + + + D + + + + + + + + + + C + + int + + + + + + + + + + R + + + + + + + add_b(B b) : void + + + + + + + + aaa : A * + + + + + + + bbb : std::vector<B> + + + + + + + ccc : C<int> + + + + + + + ddd : D * + + + + + + + + + + + + + + + + bbb + + + + + + aaa + + + + + + ccc + + + + + + ddd + diff --git a/docs/test_cases/t00031_class_mermaid.svg b/docs/test_cases/t00031_class_mermaid.svg index b7a0e6c1e..b4f6d247f 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_class.svg b/docs/test_cases/t00032_class.svg index aea683f93..ec0805526 100644 --- a/docs/test_cases/t00032_class.svg +++ b/docs/test_cases/t00032_class.svg @@ -1,132 +1,156 @@ - + - - - - - - - - - - - Base - - - - - - - - TBase - - - - - - - - A - - - - - - - - operator()() : void - - - - - - - B - - - - - - - - operator()() : void - - - - - - - C - - - - - - - - operator()() : void - - - - - - - Overload - - T,L,Ts... - - - - - - - - - counter : L - - - - - - Overload - - TBase,int,A,B,C - - - - - - - - R - - - - - - - - - overload : Overload<TBase,int,A,B,C> - - - - - - - - - - - - - - - - - overload + + + + + + Base + + + + + + + + + + TBase + + + + + + + + + + A + + + + + + + operator()() : void + + + + + + + + + + B + + + + + + + operator()() : void + + + + + + + + + + C + + + + + + + operator()() : void + + + + + + + + + + Overload + + T,L,Ts... + + + + + + + + counter : L + + + + + + + + + Overload + + TBase,int,A,B,C + + + + + + + + + + R + + + + + + + + overload : Overload<TBase,int,A,B,C> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + overload + diff --git a/docs/test_cases/t00032_class_mermaid.svg b/docs/test_cases/t00032_class_mermaid.svg index af46c7a4f..877140a8f 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_class.svg b/docs/test_cases/t00033_class.svg index 0c1c5a3fa..f555373b5 100644 --- a/docs/test_cases/t00033_class.svg +++ b/docs/test_cases/t00033_class.svg @@ -1,140 +1,164 @@ - + - - - - - - - - - - - A - - T - - - - - - - - - aaa : T - - - - - - B - - T - - - - - - - - - bbb : T - - - - - - C - - T - - - - - - - - - ccc : T - - - - - - D - - - - - - - - - ddd : int - - - - - - C - - D - - - - - - - - B - - std::unique_ptr<C<D>> - - - - - - - - A - - B<std::unique_ptr<C<D>>> - - - - - - - - R - - - - - - - - - abc : A<B<std::unique_ptr<C<D>>>> - - - - - - - - - - - - - - - - - abc + + + + + + A + + T + + + + + + + + aaa : T + + + + + + + + + B + + T + + + + + + + + bbb : T + + + + + + + + + C + + T + + + + + + + + ccc : T + + + + + + + + + D + + + + + + + + ddd : int + + + + + + + + + C + + D + + + + + + + + + + B + + std::unique_ptr<C<D>> + + + + + + + + + + A + + B<std::unique_ptr<C<D>>> + + + + + + + + + + R + + + + + + + + abc : A<B<std::unique_ptr<C<D>>>> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + abc + diff --git a/docs/test_cases/t00033_class_mermaid.svg b/docs/test_cases/t00033_class_mermaid.svg index 950fddfa3..a40217b5e 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_class.svg b/docs/test_cases/t00034_class.svg index 1da19fd48..7635a56c6 100644 --- a/docs/test_cases/t00034_class.svg +++ b/docs/test_cases/t00034_class.svg @@ -1,119 +1,137 @@ - + - - - - - - - - - - - Void - + + + + + + Void + + + + + + + operator!=(const Void &) constexpr const : bool + + + + + + + operator==(const Void &) constexpr const : bool + + + - - - + + + + + + lift_void + + T + + + - - operator!=(const Void &) constexpr const : bool + + + + + + lift_void + + void + + + - - - + + + + + + drop_void + + T + + + - - operator==(const Void &) constexpr const : bool + + + + + + drop_void + + Void + + + - - - - - - lift_void - - T - - + + + + + + A + + + - - - - - lift_void - - void - - + + + + + + R + + + + + + + + la : lift_void_t<A> * + + + + + + + lv : lift_void_t<void> * + + - - - - - drop_void - - T - - - - - - - - drop_void - - Void - - - - - - - - A - - - - - - - - R - - - - - - - - - la : lift_void_t<A> * - - - - - - - lv : lift_void_t<void> * - - - - - - - - - - - la - - - - la + + + + + + + + + + + + + + + + + la + + + + + + la + diff --git a/docs/test_cases/t00034_class_mermaid.svg b/docs/test_cases/t00034_class_mermaid.svg index ae863ab63..7c7acc4af 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_class.svg b/docs/test_cases/t00035_class.svg index 07a0163f2..29352da03 100644 --- a/docs/test_cases/t00035_class.svg +++ b/docs/test_cases/t00035_class.svg @@ -1,53 +1,57 @@ - + - - - - - - - - - - - Top - - + + + + + + Top + + + - - - - - Left - - + + + + + + Left + + + - - - - - Center - - + + + + + + Center + + + - - - - - Bottom - - + + + + + + Bottom + + + - - - - - Right - - + + + + + + Right + + + diff --git a/docs/test_cases/t00035_class_mermaid.svg b/docs/test_cases/t00035_class_mermaid.svg index 4f773395d..a9099c211 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_class.svg b/docs/test_cases/t00036_class.svg index bc9e1a7b6..67d72a32d 100644 --- a/docs/test_cases/t00036_class.svg +++ b/docs/test_cases/t00036_class.svg @@ -1,94 +1,112 @@ - + - - - - - - - - - ns1 - - - ns11 - - - ns111 - - - ns2 - - - ns22 - - - - - E - - blue - yellow - + + + + ns1 + + + + + ns11 + + + + + ns111 + + + + + ns2 + + + + + ns22 + + + + + + + E + + blue + yellow + + - - - - - A - - T - - + + + + + + A + + T + + + + + + + + a : T + + - - - + + + + + + A + + int + + + - - a : T + + + + + + B + + + + + + + + a_int : A<int> + + - - - - - A - - int - - + + + + + + C + + + - - - - - B - - - - - - - - - a_int : A<int> - - - - - - C - - - - - - - a_int - - + + + + + a_int + + + + + diff --git a/docs/test_cases/t00036_class_mermaid.svg b/docs/test_cases/t00036_class_mermaid.svg index d5545a601..20a78db8b 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_class.svg b/docs/test_cases/t00037_class.svg index c98a3d599..c506e1013 100644 --- a/docs/test_cases/t00037_class.svg +++ b/docs/test_cases/t00037_class.svg @@ -1,194 +1,210 @@ - + - - - - - - - - - - - S - - - - - - - - - x : double - - - - - - - y : double - - - - - - ST - - - - - - - - - bars : ST::(bars)[10] - - - - - - - dimensions : ST::(dimensions) - - - - - - - s : S[4][3][2] - - - - - - - units : ST::(units) - - - - - - ST::(dimensions) - - - - - - - - - t : double - - - - - - - x : double - - - - - - - y : double - - - - - - - z : double - - - - - - ST::(bars) - - - - - - - - - flags : int - - - - - - - len : int - - - - - - ST::(units) - - - - - - - - - c : double - - - - - - - h : double - - - - - - A - - - - - - - - A() : void - - - - - - - - st : ST - - - - -s - 24 - - - - dimensions - - - - bars - 10 - - - - units - - - - st + + + + + + S + + + + + + + + x : double + + + + + + + y : double + + + + + + + + + ST + + + + + + + + bars : ST::(bars)[10] + + + + + + + dimensions : ST::(dimensions) + + + + + + + s : S[4][3][2] + + + + + + + units : ST::(units) + + + + + + + + + ST::(dimensions) + + + + + + + + t : double + + + + + + + x : double + + + + + + + y : double + + + + + + + z : double + + + + + + + + + ST::(bars) + + + + + + + + flags : int + + + + + + + len : int + + + + + + + + + ST::(units) + + + + + + + + c : double + + + + + + + h : double + + + + + + + + + A + + + + + + + A() : void + + + + + + + + st : ST + + + + + + + -s + 24 + + + + + + dimensions + + + + + + bars + 10 + + + + + + units + + + + + + st + diff --git a/docs/test_cases/t00037_class_mermaid.svg b/docs/test_cases/t00037_class_mermaid.svg index c22f29709..f498c1fc0 100644 --- a/docs/test_cases/t00037_class_mermaid.svg +++ b/docs/test_cases/t00037_class_mermaid.svg @@ -130,7 +130,7 @@ - + @@ -159,7 +159,7 @@ - + @@ -198,7 +198,7 @@ - + @@ -237,7 +237,7 @@ - + @@ -266,7 +266,7 @@ - + @@ -295,7 +295,7 @@ - + diff --git a/docs/test_cases/t00038_class.svg b/docs/test_cases/t00038_class.svg index 49364ab0a..b39620ebb 100644 --- a/docs/test_cases/t00038_class.svg +++ b/docs/test_cases/t00038_class.svg @@ -1,158 +1,202 @@ - + - - - - - - - - - - - thirdparty::ns1::color_t - - red - green - blue - + + + + + + thirdparty::ns1::color_t + + red + green + blue + + - - - - - thirdparty::ns1::E - - + + + + + + thirdparty::ns1::E + + + - - - - - property_t - - property_a - property_b - property_c - + + + + + + property_t + + property_a + property_b + property_c + + - - - - - A - - + + + + + + A + + + - - - - - B - - + + + + + + B + + + - - - - - C - - + + + + + + C + + + - - - - - key_t - - + + + + + + key_t + + + + + + + + key : std::string + + - - - + + + + + + map + + T + + + - - key : std::string + + + + + + map + + std::integral_constant<thirdparty::ns1::color_t,thirdparty::ns1::color_t::red> + + + - - - - - map - - T - - + + + + + + map + + std::integral_constant<property_t,property_t::property_a> + + + - - - - - map - - std::integral_constant<thirdparty::ns1::color_t,thirdparty::ns1::color_t::red> - - + + + + + + map + + std::vector<std::integral_constant<property_t,property_t::property_b>> + + + - - - - - map - - std::integral_constant<property_t,property_t::property_a> - - + + + + + + map + + std::map<key_t,std::vector<std::integral_constant<property_t,property_t::property_c>>> + + + - - - - - map - - std::vector<std::integral_constant<property_t,property_t::property_b>> - - - - - - - - map - - std::map<key_t,std::vector<std::integral_constant<property_t,property_t::property_c>>> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/test_cases/t00038_class_mermaid.svg b/docs/test_cases/t00038_class_mermaid.svg index 7b9eb872f..34b78c9f0 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_class.svg b/docs/test_cases/t00039_class.svg index 3a78fc8af..74c9b369e 100644 --- a/docs/test_cases/t00039_class.svg +++ b/docs/test_cases/t00039_class.svg @@ -1,194 +1,242 @@ - + - - - - - - - - - - - C - - - - - - - - D - - - - - - - - E - - - - - - - - CD - - - - - - - - DE - - - - - - - - CDE - - - - - - - - A - - - - - - - - AA - - - - - - - - AAA - - - - - - - - - b : B * - - - - - - ns2::AAAA - - - - - - - - ns3::F - - T - - - - - - - - - t : T * - - - - - - ns3::FF - - T,M - - - - - - - - - m : M * - - - - - - ns3::FE - - T,M - - - - - - - - - m : M * - - - - - - ns3::FFF - - T,M,N - - - - - - - - - n : N * - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + C + + + + + + + + + + D + + + + + + + + + + E + + + + + + + + + + CD + + + + + + + + + + DE + + + + + + + + + + CDE + + + + + + + + + + A + + + + + + + + + + AA + + + + + + + + + + AAA + + + + + + + + b : B * + + + + + + + + + ns2::AAAA + + + + + + + + + + ns3::F + + T + + + + + + + + t : T * + + + + + + + + + ns3::FF + + T,M + + + + + + + + m : M * + + + + + + + + + ns3::FE + + T,M + + + + + + + + m : M * + + + + + + + + + ns3::FFF + + T,M,N + + + + + + + + n : N * + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/test_cases/t00039_class_mermaid.svg b/docs/test_cases/t00039_class_mermaid.svg index b1419f4ac..d5e45b796 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 f3a08b9a6..607fc891e 100644 --- a/docs/test_cases/t00040.md +++ b/docs/test_cases/t00040.md @@ -90,18 +90,6 @@ struct R { "translation_unit": "t00040.cc" }, "type": "int" - }, - { - "access": "private", - "is_static": false, - "name": "hidden_a_", - "source_location": { - "column": 9, - "file": "t00040.cc", - "line": 15, - "translation_unit": "t00040.cc" - }, - "type": "int" } ], "methods": [ @@ -202,18 +190,6 @@ struct R { "translation_unit": "t00040.cc" }, "type": "B *" - }, - { - "access": "private", - "is_static": false, - "name": "hidden_aaa_", - "source_location": { - "column": 9, - "file": "t00040.cc", - "line": 28, - "translation_unit": "t00040.cc" - }, - "type": "int" } ], "methods": [ diff --git a/docs/test_cases/t00040_class.svg b/docs/test_cases/t00040_class.svg index 9cb045d25..261a68540 100644 --- a/docs/test_cases/t00040_class.svg +++ b/docs/test_cases/t00040_class.svg @@ -1,84 +1,90 @@ - + - - - - - - - - - - - A - + + + + + + A + + + + + + + get_a() : int + + + + + + + + ii_ : int + + - - - + + + + + + AA + + + - - get_a() : int + + + + + + AAA + + + + + + + get_aaa() : int + + + + + + + + b : B * + + - - - - + + + + + + R + + + + + + + foo(A * a) : void + + + - - 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 6d3ebaeb3..9dec581bb 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_class.svg b/docs/test_cases/t00041_class.svg index 805e55a58..fd33ea47e 100644 --- a/docs/test_cases/t00041_class.svg +++ b/docs/test_cases/t00041_class.svg @@ -1,224 +1,270 @@ - + - - - - - - - - - - - R - - + + + + + + R + + + - - - - - D - - + + + + + + D + + + + + + + + rr : RR * + + - - - + + + + + + E + + + - - rr : RR * + + + + + + F + + + - - - - - E - - + + + + + + RR + + + + + + + foo(H * h) : void + + + + + + + + e : E * + + + + + + + f : F * + + + + + + + g : detail::G * + + + + + + + k : K + + - - - - - F - - + + + + + + RR::K + + One + Two + Three + + - - - - - RR - + + + + + + RRR + + + - - - + + + + + + ns1::N + + + - - foo(H * h) : void + + + + + + ns1::NN + + + - - - - + + + + + + ns1::NM + + + - - e : E * + + + + + + Color + + Red + Green + Blue + + - - - + + + + + + S + + + + + + + + c : Color + + - - f : F * + + + + + + T + + + + + + + + d : Direction + + - - - + + + + + + T::Direction + + Left + Right + + - - g : detail::G * - - - - - - - k : K - - - - - - RR::K - - One - Two - Three - - - - - - - RRR - - - - - - - - ns1::N - - - - - - - - ns1::NN - - - - - - - - ns1::NM - - - - - - - - Color - - Red - Green - Blue - - - - - - - S - - - - - - - - - c : Color - - - - - - T - - - - - - - - - d : Direction - - - - - - T::Direction - - Left - Right - - - - - - rr - - - +e - - - +f - - - +k - - - - - - - - - - - - - - - +c - - - +d - - - - + + + + + rr + + + + + +e + + + + + +f + + + + + +k + + + + + + + + + + + + + + + + + + + + + + + + + + + +c + + + + + +d + + + + + + + diff --git a/docs/test_cases/t00041_class_mermaid.svg b/docs/test_cases/t00041_class_mermaid.svg index 11f443119..fc992bfc9 100644 --- a/docs/test_cases/t00041_class_mermaid.svg +++ b/docs/test_cases/t00041_class_mermaid.svg @@ -190,7 +190,7 @@ - + @@ -209,7 +209,7 @@ - + @@ -233,7 +233,7 @@ - + @@ -252,7 +252,7 @@ - + @@ -271,7 +271,7 @@ - + @@ -315,7 +315,7 @@ - + @@ -349,7 +349,7 @@ - + @@ -368,7 +368,7 @@ - + @@ -387,7 +387,7 @@ - + @@ -406,7 +406,7 @@ - + @@ -425,7 +425,7 @@ - + @@ -459,7 +459,7 @@ - + @@ -483,7 +483,7 @@ - + @@ -507,7 +507,7 @@ - + diff --git a/docs/test_cases/t00042_class.svg b/docs/test_cases/t00042_class.svg index 686d8b035..b3b9d5a8f 100644 --- a/docs/test_cases/t00042_class.svg +++ b/docs/test_cases/t00042_class.svg @@ -1,109 +1,123 @@ - + - - - - - - - - - - - A - - T - - + + + + + + A + + T + + + + + + + + a : T + + - - - + + + + + + A + + void + + + + + + + + a : void * + + - - a : T + + + + + + B + + T,K + + + + + + + + b : T + + + + + + + bb : K + + - - - - - A - - void - - + + + + + + A + + double + + + - - - + + + + + + A + + std::string + + + - - a : void * + + + + + + B + + int,float + + + - - - - - B - - T,K - - - - - - - - - b : T - - - - - - - bb : K - - - - - - A - - double - - - - - - - - A - - std::string - - - - - - - - B - - int,float - - - - - - - - - - - + + + + + + + + + + + + + + + + diff --git a/docs/test_cases/t00042_class_mermaid.svg b/docs/test_cases/t00042_class_mermaid.svg index cc29bf36f..1e7eb6d39 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 905449600..41dc28c72 100644 --- a/docs/test_cases/t00043.md +++ b/docs/test_cases/t00043.md @@ -797,12 +797,6 @@ struct J { "destination": "779380350157922875", "source": "11988240344851504088", "type": "dependency" - }, - { - "access": "public", - "destination": "1112226203938309888", - "source": "11988240344851504088", - "type": "dependency" } ], "using_namespace": "clanguml::t00043" diff --git a/docs/test_cases/t00043_class.svg b/docs/test_cases/t00043_class.svg index 2378765b2..074c010d0 100644 --- a/docs/test_cases/t00043_class.svg +++ b/docs/test_cases/t00043_class.svg @@ -1,204 +1,244 @@ - + - - - - - - - - - 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 - - - - - - - ii(II * ii) : void - - - - - - - - - - - - - - - - - - - - - - + + + + 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 + + + + + + + ii(II * ii) : void + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/test_cases/t00043_class_mermaid.svg b/docs/test_cases/t00043_class_mermaid.svg index 3f1524f78..6e6dfb020 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_class.svg b/docs/test_cases/t00044_class.svg index 01a983cb1..edb45166a 100644 --- a/docs/test_cases/t00044_class.svg +++ b/docs/test_cases/t00044_class.svg @@ -1,127 +1,151 @@ - + - - - - - - - - - - - signal_handler - - Ret(Args...),A - - + + + + + + signal_handler + + Ret(Args...),A + + + - - - - - sink - - signal_handler<Ret(Args...),A> - + + + + + + sink + + signal_handler<Ret(Args...),A> + + + + + + + sink(signal_t & sh) : void + + + + get_signal<CastTo>() : CastTo * + + + + + + + signal : signal_t * + + - - - + + + + + + signal_handler + + void(int),bool + + + - - sink(signal_t & sh) : void + + + + + + sink + + signal_handler<void(int),bool> + + + - - - get_signal<CastTo>() : CastTo * - - - - + + + + + + R + + + + + + + + sink1 : sink<signal_handler<void (int),bool>> + + - - signal : signal_t * + + + + + + signal_handler + + T,A + + + - - - - - signal_handler - - void(int),bool - - + + + + + + sink + + T + + + - - - - - sink - - signal_handler<void(int),bool> - - - - - - - - R - - - - - - - - - sink1 : sink<signal_handler<void (int),bool>> - - - - - - signal_handler - - T,A - - - - - - - - sink - - T - - - - - - - - - signal - - - - signal - - - - - - - - - - - - sink1 + + + + + + + + + signal + + + + + + signal + + + + + + + + + + + + + + + + + + + + + + sink1 + diff --git a/docs/test_cases/t00044_class_mermaid.svg b/docs/test_cases/t00044_class_mermaid.svg index 0fc66fc24..85a52b52e 100644 --- a/docs/test_cases/t00044_class_mermaid.svg +++ b/docs/test_cases/t00044_class_mermaid.svg @@ -150,7 +150,7 @@ - + @@ -169,7 +169,7 @@ - + @@ -203,7 +203,7 @@ - + @@ -222,7 +222,7 @@ - + @@ -241,7 +241,7 @@ - + @@ -265,7 +265,7 @@ - + @@ -284,7 +284,7 @@ - + diff --git a/docs/test_cases/t00045_class.svg b/docs/test_cases/t00045_class.svg index b06527ef3..68ac795d2 100644 --- a/docs/test_cases/t00045_class.svg +++ b/docs/test_cases/t00045_class.svg @@ -1,182 +1,220 @@ - + - - - - - - - - - - - A - - - - - - - - AA - - - - - - - - AAA - - - - - - - - AAAA - - T - - - - - - - - - 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 * - - - - - - - - - - - - - - +a - - - - ns1_ns2_a - - - - ns1_a - - - - root_a - - - - «friend» + + + + + + A + + + + + + + + + + AA + + + + + + + + + + AAA + + + + + + + + + + AAAA + + T + + + + + + + + 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 * + + + + + + + + + + + + + + + + + + + + + + + + + + + +a + + + + + + ns1_ns2_a + + + + + + ns1_a + + + + + + root_a + + + + + + «friend» + diff --git a/docs/test_cases/t00045_class_mermaid.svg b/docs/test_cases/t00045_class_mermaid.svg index 74a9a1019..ad2e3b307 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_class.svg b/docs/test_cases/t00046_class.svg index b27d2c1c9..e4febc7b0 100644 --- a/docs/test_cases/t00046_class.svg +++ b/docs/test_cases/t00046_class.svg @@ -1,158 +1,192 @@ - + - - - - - - - - - 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 - - - - - - - - - - - - - - - - +a - - - - ns1_ns2_a - - - - ns1_a - - - - root_a + + + + 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 + + + + + + + + + + + + + + + + + + + + + + + + + + + + +a + + + + + + ns1_ns2_a + + + + + + ns1_a + + + + + + root_a + diff --git a/docs/test_cases/t00046_class_mermaid.svg b/docs/test_cases/t00046_class_mermaid.svg index bbf84bb8f..fc0c82c8f 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_class.svg b/docs/test_cases/t00047_class.svg index 1c08d0dd0..10b474341 100644 --- a/docs/test_cases/t00047_class.svg +++ b/docs/test_cases/t00047_class.svg @@ -1,59 +1,67 @@ - + - - - - - - - - - - - conditional_t - - Else - - + + + + + + conditional_t + + Else + + + - - - - - conditional_t - - std::true_type,Result,Tail... - - + + + + + + conditional_t + + std::true_type,Result,Tail... + + + - - - - - conditional_t - - std::false_type,Result,Tail... - - + + + + + + conditional_t + + std::false_type,Result,Tail... + + + - - - - - conditional_t - - Ts... - - + + + + + + conditional_t + + Ts... + + + - - - - - - + + + + + + + + + + + + diff --git a/docs/test_cases/t00047_class_mermaid.svg b/docs/test_cases/t00047_class_mermaid.svg index 89b43ad3d..83da6cad5 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_class.svg b/docs/test_cases/t00048_class.svg index a3fd9004a..befd00d67 100644 --- a/docs/test_cases/t00048_class.svg +++ b/docs/test_cases/t00048_class.svg @@ -1,159 +1,173 @@ - + - - - - - - - - - - - Base - - - - - - - - foo() = 0 : void - - - - - - - - base : int - - - - - - BaseTemplate - - T - - - - - - - - foo() = 0 : void - - - - - - - - base : T - - - - - - B - - - - - - - - foo() : void - - - - - - - - b : int - - - - - - BTemplate - - T - - - - - - - - foo() : void - - - - - - - - b : T - - - - - - A - - - - - - - - foo() : void - - - - - - - - a : int - - - - - - ATemplate - - T - - - - - - - - foo() : void - - - - - - - - a : T - - - - - - - - - + + + + + + Base + + + + + + + foo() = 0 : void + + + + + + + + base : int + + + + + + + + + BaseTemplate + + T + + + + + + + foo() = 0 : void + + + + + + + + base : T + + + + + + + + + B + + + + + + + foo() : void + + + + + + + + b : int + + + + + + + + + BTemplate + + T + + + + + + + foo() : void + + + + + + + + b : T + + + + + + + + + A + + + + + + + foo() : void + + + + + + + + a : int + + + + + + + + + ATemplate + + T + + + + + + + foo() : void + + + + + + + + a : T + + + + + + + + + + + + + + + + + + + diff --git a/docs/test_cases/t00048_class_mermaid.svg b/docs/test_cases/t00048_class_mermaid.svg index 1c0a4abbf..a9ff05421 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_class.svg b/docs/test_cases/t00049_class.svg index a9b53d83d..01eb3db8d 100644 --- a/docs/test_cases/t00049_class.svg +++ b/docs/test_cases/t00049_class.svg @@ -1,130 +1,148 @@ - + - - - - - - - - - - - A - - T - - - - - - - - get_a() : T & - - - - - - - - a : T - - - - - - A - - intmap - - - - - - - - A - - thestring - - - - - - - - A - - string_vector - - - - - - - - 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> - - - - - - - - - - - - - a_string - - - - a_vector_string - - - - a_int_map + + + + + + A + + T + + + + + + + get_a() : T & + + + + + + + + a : T + + + + + + + + + A + + intmap + + + + + + + + + + A + + thestring + + + + + + + + + + A + + string_vector + + + + + + + + + + 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> + + + + + + + + + + + + + + + + + + + + + + + + a_string + + + + + + a_vector_string + + + + + + a_int_map + diff --git a/docs/test_cases/t00049_class_mermaid.svg b/docs/test_cases/t00049_class_mermaid.svg index ce6577ecd..66b2f420f 100644 --- a/docs/test_cases/t00049_class_mermaid.svg +++ b/docs/test_cases/t00049_class_mermaid.svg @@ -138,7 +138,7 @@ - + @@ -167,7 +167,7 @@ - + @@ -186,7 +186,7 @@ - + @@ -205,7 +205,7 @@ - + @@ -224,7 +224,7 @@ - + diff --git a/docs/test_cases/t00050_class.svg b/docs/test_cases/t00050_class.svg index c997190b4..3cdc755e3 100644 --- a/docs/test_cases/t00050_class.svg +++ b/docs/test_cases/t00050_class.svg @@ -1,193 +1,233 @@ - + - - - - - - - - - - - A - - + + + + + + A + + + - - - - - B - - + + + + + + B + + + - - - - - C - - + + + + + + C + + + - - - - - utils::D - - + + + + + + utils::D + + + - - - - - E - - E1 - E2 - E3 - + + + + + + E + + E1 + E2 + E3 + + - - - - - F - - T,V,int N - + + + + + + F + + T,V,int N + + + + + + + set_value(V v_) const : V + + + + + + + + t : T[] + + + + + + + v : V + + - - - + + + + + + G + + + - - set_value(V v_) const : V + + + + + + NoComment + + + - - - - - - - t : T[] - - - - - - - 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. - Phasellus ante pellentesque erat cum risus consequat imperdiet aliquam, - integer placerat et turpis mi eros nec lobortis taciti, vehicula nisl litora - tellus ligula porttitor metus. - - Vivamus integer non suscipit taciti mus etiam at primis tempor sagittis sit, - euismod libero facilisi aptent elementum felis blandit cursus gravida sociis - erat ante, eleifend lectus nullam dapibus netus feugiat curae curabitur est - ad. Massa curae fringilla porttitor quam sollicitudin iaculis aptent leo - ligula euismod dictumst, orci penatibus mauris eros etiam praesent erat - volutpat posuere hac. Metus fringilla nec ullamcorper odio aliquam lacinia - conubia mauris tempor, etiam ultricies proin quisque lectus sociis id - tristique, integer phasellus taciti pretium adipiscing tortor sagittis - ligula. - - Mollis pretium lorem primis senectus habitasse lectus scelerisque - donec, ultricies tortor suspendisse adipiscing fusce morbi volutpat - pellentesque, consectetur mi risus molestie curae malesuada cum. Dignissim - lacus convallis massa mauris enim ad mattis magnis senectus montes, mollis - taciti phasellus accumsan bibendum semper blandit suspendisse faucibus nibh - est, metus lobortis morbi cras magna vivamus per risus fermentum. Dapibus - 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 - - T - Type of array elements. - - V - Type of regular element. - - N - Size of T array. - - + + + + 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. + Phasellus ante pellentesque erat cum risus consequat imperdiet aliquam, + integer placerat et turpis mi eros nec lobortis taciti, vehicula nisl litora + tellus ligula porttitor metus. +   + Vivamus integer non suscipit taciti mus etiam at primis tempor sagittis sit, + euismod libero facilisi aptent elementum felis blandit cursus gravida sociis + erat ante, eleifend lectus nullam dapibus netus feugiat curae curabitur est + ad. Massa curae fringilla porttitor quam sollicitudin iaculis aptent leo + ligula euismod dictumst, orci penatibus mauris eros etiam praesent erat + volutpat posuere hac. Metus fringilla nec ullamcorper odio aliquam lacinia + conubia mauris tempor, etiam ultricies proin quisque lectus sociis id + tristique, integer phasellus taciti pretium adipiscing tortor sagittis + ligula. +   + Mollis pretium lorem primis senectus habitasse lectus scelerisque + donec, ultricies tortor suspendisse adipiscing fusce morbi volutpat + pellentesque, consectetur mi risus molestie curae malesuada cum. Dignissim + lacus convallis massa mauris enim ad mattis magnis senectus montes, mollis + taciti phasellus accumsan bibendum semper blandit suspendisse faucibus nibh + est, metus lobortis morbi cras magna vivamus per risus fermentum. Dapibus + 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 +   + T + Type of array elements. +   + V + Type of regular element. +   + N + Size of T array. +   + + + + diff --git a/docs/test_cases/t00050_class_mermaid.svg b/docs/test_cases/t00050_class_mermaid.svg index 2973b63ca..a8e752018 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 @@ - + @@ -328,7 +328,7 @@ - + @@ -347,7 +347,7 @@ - + diff --git a/docs/test_cases/t00051_class.svg b/docs/test_cases/t00051_class.svg index ca7703298..4b5a15c8d 100644 --- a/docs/test_cases/t00051_class.svg +++ b/docs/test_cases/t00051_class.svg @@ -1,182 +1,198 @@ - + - - - - - - - - - - - B - - F,FF=F - - - - - - - - B(F && f, FF && ff) : void - - - - - - - - f() : void - - - - - - - ff() : void - - - - - - - - f_ : F - - - - - - - ff_ : FF - - - - - - B - - (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 - - - custom_thread1<Function,Args...>(Function && f, Args &&... args) : void - - - - - - - A::custom_thread2 - - - - - - - - thread((lambda at t00051.cc:59:27) &&) : void - - - - - - - - - - - - - - - - - - + + + + + + B + + F,FF=F + + + + + + + B(F && f, FF && ff) : void + + + + + + + + f() : void + + + + + + + ff() : void + + + + + + + + f_ : F + + + + + + + ff_ : FF + + + + + + + + + B + + (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 + + + 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 0f80c1e85..c3400879b 100644 --- a/docs/test_cases/t00051_class_mermaid.svg +++ b/docs/test_cases/t00051_class_mermaid.svg @@ -126,7 +126,7 @@ - + @@ -170,7 +170,7 @@ - + @@ -214,7 +214,7 @@ - + @@ -253,7 +253,7 @@ - + @@ -277,7 +277,7 @@ - + diff --git a/docs/test_cases/t00052_class.svg b/docs/test_cases/t00052_class.svg index eeca633e9..6f318059d 100644 --- a/docs/test_cases/t00052_class.svg +++ b/docs/test_cases/t00052_class.svg @@ -1,118 +1,134 @@ - + - - - - - - - - - - - A - - - a<T>(T p) : T - - aa<F,Q>(F && f, Q q) : void - + + + + + + A + + + a<T>(T p) : T + + aa<F,Q>(F && f, Q q) : void + + - - - - - B - - T - + + + + + + B + + T + + + + + + + b(T t) : T + + + bb<F>(F && f, T t) : T + + - - - + + + + + + C + + T + + + c<P>(P p) : T + + - - b(T t) : T + + + + + + B + + int + + + - - bb<F>(F && f, T t) : T - - - - - - C - - T - - - c<P>(P p) : T - + + + + + + C + + int + + + - - - - - B - - int - - + + + + + + R + + + + + + + + a : A + + + + + + + b : B<int> + + + + + + + c : C<int> + + - - - - - C - - int - - - - - - - - R - - - - - - - - - a : A - - - - - - - b : B<int> - - - - - - - c : C<int> - - - - - - - - +a - - - +b - - - +c + + + + + + + + + + + + +a + + + + + +b + + + + + +c + diff --git a/docs/test_cases/t00052_class_mermaid.svg b/docs/test_cases/t00052_class_mermaid.svg index 1a8492746..06b2c20f8 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_class.svg b/docs/test_cases/t00053_class.svg index 9401afc2d..9dd6c6b4e 100644 --- a/docs/test_cases/t00053_class.svg +++ b/docs/test_cases/t00053_class.svg @@ -1,152 +1,180 @@ - + - - - - - - - - - - - A - - - - - - - - C - - - - - - - - E - - - - - - - - F - - - - - - - - a - - - - - - - - c - - - - - - - - e - - - - - - - - f - - - - - - - - h - - hhh - - - - - - - j - - jjj - - - - - - - b - - - - - - - - d - - - - - - - - g - - - - - - - - B - - - - - - - - D - - - - - - - - G - - - - - - - - i - - iii - + + + + + + b + + + + + + + + + + d + + + + + + + + + + g + + + + + + + + + + B + + + + + + + + + + D + + + + + + + + + + G + + + + + + + + + + i + + iii + + + + + + + + + A + + + + + + + + + + C + + + + + + + + + + E + + + + + + + + + + F + + + + + + + + + + a + + + + + + + + + + c + + + + + + + + + + e + + + + + + + + + + f + + + + + + + + + + h + + hhh + + + + + + + + + j + + jjj + + diff --git a/docs/test_cases/t00053_class_mermaid.svg b/docs/test_cases/t00053_class_mermaid.svg index 079b12cc9..07926df43 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_class.svg b/docs/test_cases/t00054_class.svg index 7d1e3b20d..dff354e0f 100644 --- a/docs/test_cases/t00054_class.svg +++ b/docs/test_cases/t00054_class.svg @@ -1,183 +1,393 @@ - + - - - - - - - - - detail - - - detail2 - - - detail3 - - - detail4 - - - - - d - - - - - - - - a - - - - - - - - - - - c - - - - - - - - - - - e - - - - - - - - - - - C - - - - - - - - F - - - - - - - - D - - - - - - - - E - - - - - - - - A - - - - - - - - - - B - - - - - - - - - - f - - - - - - - - - - G - - - - - - - - - h - - hhh - hhh - - - - - - - i - - iii - iii - - - - - - - j - - jjj - jjj - - - - - - - b - - - - - - - - g - - + + + + detail + + + + + detail2 + + + + + detail3 + + + + + detail4 + + + + + + + d + + + + + + + + + + a + + + + + + + + + + c + + + + + + + + + + e + + + + + + + + + + C + + + + + + + + + + F + + + + + + + + + + A + + + + + + + + + + B + + + + + + + + + + a + + + + + + + + + + f + + + + + + + + + + c + + + + + + + + + + e + + + + + + + + + + D + + + + + + + + + + E + + + + + + + + + + A + + + + + + + + + + B + + + + + + + + + + G + + + + + + + + + + a + + + + + + + + + + f + + + + + + + + + + h + + hhh + + + + + + + + + i + + iii + + + + + + + + + j + + jjj + + + + + + + + + c + + + + + + + + + + e + + + + + + + + + + b + + + + + + + + + + g + + + + + + + + + + A + + + + + + + + + + B + + + + + + + + + + G + + + + + + + + + + a + + + + + + + + + + f + + + + + + + + + + h + + hhh + + + + + + + + + i + + iii + + + + + + + + + j + + jjj + + + + + + + + + c + + + + + + + + + + e + + + diff --git a/docs/test_cases/t00054_class_mermaid.svg b/docs/test_cases/t00054_class_mermaid.svg index fe0ff5fe0..9e12803f6 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_class.svg b/docs/test_cases/t00055_class.svg index 18dd77d73..42663f46b 100644 --- a/docs/test_cases/t00055_class.svg +++ b/docs/test_cases/t00055_class.svg @@ -1,93 +1,107 @@ - + - - - - - - - - - - - A - - + + + + + + A + + + - - - - - B - - + + + + + + B + + + - - - - - C - - + + + + + + C + + + - - - - - D - - + + + + + + D + + + - - - - - E - - + + + + + + E + + + - - - - - F - - + + + + + + F + + + - - - - - G - - + + + + + + G + + + - - - - - H - - + + + + + + H + + + - - - - - I - - + + + + + + I + + + - - - - - J - - + + + + + + J + + + diff --git a/docs/test_cases/t00055_class_mermaid.svg b/docs/test_cases/t00055_class_mermaid.svg index 4de309bce..815865e1c 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_class.svg b/docs/test_cases/t00056_class.svg index 61f573c1e..9b9b2043a 100644 --- a/docs/test_cases/t00056_class.svg +++ b/docs/test_cases/t00056_class.svg @@ -1,277 +1,327 @@ - + - - - - - - - - - - - «concept» - greater_than_simple - - T,L - - - - - - - - «concept» - greater_than_with_requires - - T,P - - (T l,P r) - - sizeof (l) > sizeof (r) - - - - - - «concept» - max_four_bytes - - T - - - - - - - - «concept» - iterable - - T - - (T container) - - container.begin() - container.end() - - - - - - «concept» - has_value_type - - T - - () - - typename T::value_type - - - - - - «concept» - convertible_to_string - - T - - (T s) - - std::string{s} - {std::to_string(s)} noexcept - {std::to_string(s)} -> std::same_as<std::string> - - - - - - «concept» - iterable_with_value_type - - T - - - - - - - - «concept» - iterable_or_small_value_type - - T - - - - - - - - A - - max_four_bytes T - - - - - - - - - a : T - - - - - - B - - T - - - - - - - - - b : T - - - - - - C - - convertible_to_string T - - - - - - - - - c : T - - - - - - D - - iterable T1,T2,iterable T3,T4,T5 - - - - - - - - E - - T1,T2,T3 - - - - - - - - - e1 : T1 - - - - - - - e2 : T2 - - - - - - - e3 : T3 - - - - - - F - - T1,T2,T3 - - - - - - - - - f1 : T1 - - - - - - - f2 : T2 - - - - - - - f3 : T3 - - - - T - - - T - - - T - - - T - - - T - - - T - - - T - - - T - - - T1 - - - T3 - - - T2 - - - T5 - - - T1,T3 - - - T1,T3 + + + + + + «concept» + greater_than_simple + + T,L + + + + + + + + + + «concept» + greater_than_with_requires + + T,P + + (T l,P r) + + sizeof (l) > sizeof (r) + + + + + + + + «concept» + max_four_bytes + + T + + + + + + + + + + «concept» + iterable + + T + + (T container) + + container.begin() + container.end() + + + + + + + + «concept» + has_value_type + + T + + () + + typename T::value_type + + + + + + + + «concept» + convertible_to_string + + T + + (T s) + + std::string{s} + {std::to_string(s)} noexcept + {std::to_string(s)} -> std::same_as<std::string> + + + + + + + + «concept» + iterable_with_value_type + + T + + + + + + + + + + «concept» + iterable_or_small_value_type + + T + + + + + + + + + + A + + max_four_bytes T + + + + + + + + a : T + + + + + + + + + B + + T + + + + + + + + b : T + + + + + + + + + C + + convertible_to_string T + + + + + + + + c : T + + + + + + + + + D + + iterable T1,T2,iterable T3,T4,T5 + + + + + + + + + + E + + T1,T2,T3 + + + + + + + + e1 : T1 + + + + + + + e2 : T2 + + + + + + + e3 : T3 + + + + + + + + + F + + T1,T2,T3 + + + + + + + + f1 : T1 + + + + + + + f2 : T2 + + + + + + + f3 : T3 + + + + + + + T + + + + + T + + + + + T + + + + + T + + + + + T + + + + + T + + + + + T + + + + + T + + + + + T1 + + + + + T3 + + + + + T2 + + + + + T5 + + + + + T1,T3 + + + + + T1,T3 + diff --git a/docs/test_cases/t00056_class_mermaid.svg b/docs/test_cases/t00056_class_mermaid.svg index 33103416b..196e3a6d7 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_class.svg b/docs/test_cases/t00057_class.svg index 5cbaa651b..c3533a62d 100644 --- a/docs/test_cases/t00057_class.svg +++ b/docs/test_cases/t00057_class.svg @@ -1,271 +1,303 @@ - + - - - - - - - - - - - t00057_A - - - - - - - - - a1 : int - - - - - - t00057_B - - - - - - - - - b1 : int - - - - - - t00057_C - - - - - - - - - c1 : int - - - - - - «union» - t00057_D - - - - - - - - - d1 : int - - - - - - - d2 : float - - - - - - t00057_E - - - - - - - - - coordinates : t00057_E::(coordinates) - - - - - - - e : int - - - - - - - height : t00057_E::(height) - - - - - - t00057_E::(coordinates) - - - - - - - - - x : int - - - - - - - y : int - - - - - - «union» - t00057_E::(height) - - - - - - - - - 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 - - - - - coordinates - - - - height - - - +a - - - +b - - - +c - - - +d - - - +e - - - +f - - - +g + + + + + + t00057_A + + + + + + + + a1 : int + + + + + + + + + t00057_B + + + + + + + + b1 : int + + + + + + + + + t00057_C + + + + + + + + c1 : int + + + + + + + + + «union» + t00057_D + + + + + + + + d1 : int + + + + + + + d2 : float + + + + + + + + + t00057_E + + + + + + + + coordinates : t00057_E::(coordinates) + + + + + + + e : int + + + + + + + height : t00057_E::(height) + + + + + + + + + t00057_E::(coordinates) + + + + + + + + x : int + + + + + + + y : int + + + + + + + + + «union» + t00057_E::(height) + + + + + + + + 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 + + + + + + + + coordinates + + + + + + height + + + + + +a + + + + + +b + + + + + +c + + + + + +d + + + + + +e + + + + + +f + + + + + +g + diff --git a/docs/test_cases/t00057_class_mermaid.svg b/docs/test_cases/t00057_class_mermaid.svg index 60e197cce..59724a331 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_class.svg b/docs/test_cases/t00058_class.svg index 3021e7170..56dc0be3a 100644 --- a/docs/test_cases/t00058_class.svg +++ b/docs/test_cases/t00058_class.svg @@ -1,151 +1,179 @@ - + - - - - - - - - - - - first_type - - T,Args... - - - - - - - - «concept» - same_as_first_type - - T,Args... - - - - - - - - A - - T,Args... - - - - - - - - - a : std::vector<T> - - - - - - B - - T,P,Args... - - - - - - - - - b : std::vector<T> - - - - - - - bb : P - - - - - - A - - int,int,double,std::string - - - - - - - - A - - int,int - - - - - - - - B - - int,std::string,int,double,A<int,int> - - - - - - - - R - - - - - - - - - aa : A<int,int,double,std::string> - - - - - - - bb : B<int,std::string,int,double,A<int,int>> - - - - T,Args... - - - T,Args... - - - - - - - - - - - - aa - - - - bb - - + + + + + + first_type + + T,Args... + + + + + + + + + + «concept» + same_as_first_type + + T,Args... + + + + + + + + + + A + + T,Args... + + + + + + + + a : std::vector<T> + + + + + + + + + B + + T,P,Args... + + + + + + + + b : std::vector<T> + + + + + + + bb : P + + + + + + + + + A + + int,int,double,std::string + + + + + + + + + + A + + int,int + + + + + + + + + + B + + int,std::string,int,double,A<int,int> + + + + + + + + + + R + + + + + + + + aa : A<int,int,double,std::string> + + + + + + + bb : B<int,std::string,int,double,A<int,int>> + + + + + + + T,Args... + + + + + T,Args... + + + + + + + + + + + + + + + + + + + + + + aa + + + + + + bb + + + + + diff --git a/docs/test_cases/t00058_class_mermaid.svg b/docs/test_cases/t00058_class_mermaid.svg index fe6b21493..e54a94610 100644 --- a/docs/test_cases/t00058_class_mermaid.svg +++ b/docs/test_cases/t00058_class_mermaid.svg @@ -160,7 +160,7 @@ - + @@ -179,7 +179,7 @@ - + @@ -198,7 +198,7 @@ - + @@ -222,7 +222,7 @@ - + @@ -251,7 +251,7 @@ - + @@ -270,7 +270,7 @@ - + @@ -289,7 +289,7 @@ - + @@ -308,7 +308,7 @@ - + diff --git a/docs/test_cases/t00059_class.svg b/docs/test_cases/t00059_class.svg index 9f2c5560f..6bb33a233 100644 --- a/docs/test_cases/t00059_class.svg +++ b/docs/test_cases/t00059_class.svg @@ -1,237 +1,279 @@ - + - - - - - - - - - - - «concept» - fruit_c - - T - - (T t) - - T{} - t.get_name() - - - - - - «concept» - apple_c - - T - - (T t) - - t.get_sweetness() - - - - - - «concept» - orange_c - - T - - (T t) - - 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 - - apple_c TA,orange_c TO - - - - - - - - create_apple() const : TA - - - - - - - create_orange() const : TO - - - - - - - fruit_factory - - gala_apple,valencia_orange - - - - - - - - fruit_factory - - empire_apple,lima_orange - - - - - - - - R - - - - - - - - - factory_1 : fruit_factory_1 - - - - - - - factory_2 : fruit_factory_2 - - - - T - - - T - - - TA - - - TO - - - - - - - - - - - - - - - factory_1 - - - factory_2 + + + + + + «concept» + fruit_c + + T + + (T t) + + T{} + t.get_name() + + + + + + + + «concept» + apple_c + + T + + (T t) + + t.get_sweetness() + + + + + + + + «concept» + orange_c + + T + + (T t) + + 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 + + apple_c TA,orange_c TO + + + + + + + create_apple() const : TA + + + + + + + create_orange() const : TO + + + + + + + + + + fruit_factory + + gala_apple,valencia_orange + + + + + + + + + + fruit_factory + + empire_apple,lima_orange + + + + + + + + + + R + + + + + + + + factory_1 : fruit_factory_1 + + + + + + + factory_2 : fruit_factory_2 + + + + + + + T + + + + + T + + + + + TA + + + + + TO + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + factory_1 + + + + + + factory_2 + diff --git a/docs/test_cases/t00059_class_mermaid.svg b/docs/test_cases/t00059_class_mermaid.svg index 3b624c405..27a574ce1 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_class.svg b/docs/test_cases/t00060_class.svg index 75d859a01..754c48b57 100644 --- a/docs/test_cases/t00060_class.svg +++ b/docs/test_cases/t00060_class.svg @@ -1,99 +1,117 @@ - + - - - - - - - - - - - A - - + + + + + + A + + + - - - - - B - - + + + + + + B + + + - - - - - C - - + + + + + + C + + + - - - - - D - - + + + + + + D + + + - - - - - G - - T - - + + + + + + G + + T + + + + + + + + g : T + + - - - + + + + + + H + + T,P + + + + + + + + h : G<T> + + + + + + + hh : P + + - - g : T - - - - - - H - - T,P - - - - - - - - - h : G<T> - - - - - - - hh : P - - - - - - - - - - - - +h - - + + + + + + + + + + + + + + + + + + + + +h + + + + + diff --git a/docs/test_cases/t00060_class_mermaid.svg b/docs/test_cases/t00060_class_mermaid.svg index 07f211e9b..aae549316 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_class.svg b/docs/test_cases/t00061_class.svg index 1317541b1..0e684cd9e 100644 --- a/docs/test_cases/t00061_class.svg +++ b/docs/test_cases/t00061_class.svg @@ -1,21 +1,17 @@ - + - - - - - - - - - - - A - - + + + + + + A + + + diff --git a/docs/test_cases/t00061_class_mermaid.svg b/docs/test_cases/t00061_class_mermaid.svg index 4c8b08c6f..af859007a 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_class.svg b/docs/test_cases/t00062_class.svg index 0e046fdcc..2e7ed4a0c 100644 --- a/docs/test_cases/t00062_class.svg +++ b/docs/test_cases/t00062_class.svg @@ -1,464 +1,544 @@ - + - - - - - - - - - - - A - - U & - - - - - - - - - u : U & - - - - - - A - - std::map<std::string,U> & - - - - - - - - - u : U & - - - - - - A - - std::map<std::string,std::map<std::string,std::string>> & - - - - - - - - A - - U * * - - - - - - - - - u : U ** - - - - - - A - - U * * const* - - - - - - - - - u : U *** - - - - - - A - - U const volatile* const volatile - - - - - - - - - u : U *** - - - - - - A - - U && - - - - - - - - - u : U && - - - - - - A - - U const& - - - - - - - - - u : const U & - - - - - - A - - M C::* - - - - - - - - - c : C & - - - - - - - m : M C::* - - - - - - A - - M C::* && - - - - - - - - - c : C && - - - - - - - m : M C::* - - - - - - A - - M (C::*)(Arg) - - - - - - - - - c : C & - - - - - - - m : M C::* - - - - - - A - - int (C::*)(bool) - - - - - - - - - c : C & - - - - - - A - - M (C::*)(Arg) && - - - - - - - - - c : C && - - - - - - - m : M C::* - - - - - - A - - float (C::*)(int) && - - - - - - - - - c : C && - - - - - - - mf : float C::* - - - - - - A - - M (C::*)(Arg1,Arg2,Arg3) - - - - - - - - - c : C & - - - - - - - m : M C::* - - - - - - A - - char[N] - - - - - - - - - n : char[] - - - - - - A - - char[1000] - - - - - - - - - n : std::vector<char> - - - - - - A - - char[M][L][K] - - - - - - - - - klm : char[][][] - - - - - - A - - U(...) - - - - - - - - - u : bool - - - - - - A - - C<T> - - - - - - - - - c : C<T> - - - - - - A - - C<T,Args...> - - - - - - - - - args : std::tuple<Args...> - - - - - - - c : C<T> - - - - - - A - - T - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + A + + U & + + + + + + + + u : U & + + + + + + + + + A + + std::map<std::string,U> & + + + + + + + + u : U & + + + + + + + + + A + + std::map<std::string,std::map<std::string,std::string>> & + + + + + + + + + + A + + U * * + + + + + + + + u : U ** + + + + + + + + + A + + U * * const* + + + + + + + + u : U *** + + + + + + + + + A + + U const volatile* const volatile + + + + + + + + u : U *** + + + + + + + + + A + + U && + + + + + + + + u : U && + + + + + + + + + A + + U const& + + + + + + + + u : const U & + + + + + + + + + A + + M C::* + + + + + + + + c : C & + + + + + + + m : M C::* + + + + + + + + + A + + M C::* && + + + + + + + + c : C && + + + + + + + m : M C::* + + + + + + + + + A + + M (C::*)(Arg) + + + + + + + + c : C & + + + + + + + m : M C::* + + + + + + + + + A + + int (C::*)(bool) + + + + + + + + c : C & + + + + + + + + + A + + M (C::*)(Arg) && + + + + + + + + c : C && + + + + + + + m : M C::* + + + + + + + + + A + + float (C::*)(int) && + + + + + + + + c : C && + + + + + + + mf : float C::* + + + + + + + + + A + + M (C::*)(Arg1,Arg2,Arg3) + + + + + + + + c : C & + + + + + + + m : M C::* + + + + + + + + + A + + char[N] + + + + + + + + n : char[] + + + + + + + + + A + + char[1000] + + + + + + + + n : std::vector<char> + + + + + + + + + A + + char[M][L][K] + + + + + + + + klm : char[][][] + + + + + + + + + A + + U(...) + + + + + + + + u : bool + + + + + + + + + A + + C<T> + + + + + + + + c : C<T> + + + + + + + + + A + + C<T,Args...> + + + + + + + + args : std::tuple<Args...> + + + + + + + c : C<T> + + + + + + + + + A + + T + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/test_cases/t00062_class_mermaid.svg b/docs/test_cases/t00062_class_mermaid.svg index b6394f49f..2d1362ba2 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_class.svg b/docs/test_cases/t00063_class.svg index 7bed81c51..78beaae3f 100644 --- a/docs/test_cases/t00063_class.svg +++ b/docs/test_cases/t00063_class.svg @@ -1,21 +1,17 @@ - + - - - - - - - - - - - A - - + + + + + + A + + + diff --git a/docs/test_cases/t00063_class_mermaid.svg b/docs/test_cases/t00063_class_mermaid.svg index 31180504b..91e4a55af 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_class.svg b/docs/test_cases/t00064_class.svg index 5525391c0..6b72afd45 100644 --- a/docs/test_cases/t00064_class.svg +++ b/docs/test_cases/t00064_class.svg @@ -1,339 +1,437 @@ - + - - - - - - - - - - - type_list - - Ts... - - - - - - - - type_list - - Ret(Arg &&),Ts... - - - - - - - - type_list - - T const,Ts... - - - - - - - - type_list - - Head,Tail... - - - - - - - - head - - type_list<Head,Tail...> - - - - - - - - type_list - - Type... - - - - - - - - type_list - - First... - - - - - - - - type_list - - Second... - - - - - - - - type_group_pair - - type_list<First...>,type_list<Second...> - - - - - - - - - size : const size_t - - - - - - optional_ref - - T - - - - - - - - optional_ref - - type_group_pair_it<It,type_list<First...>,type_list<Second...>>::value_type - - - - - - - - type_group_pair_it - - 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 - - A,bool,int - - - - - - - - type_list - - float,double - - - - - - - - type_list - - A,B,C - - - - - - - - type_group_pair - - type_list<float,double>,type_list<A,B,C> - - - - - - - - R - - - - - - - - - abc : type_group_pair<type_list<float,double>,type_list<A,B,C>> - - - - - - - aboolint : type_list<A,bool,int> - - - - - - type_group_pair - - typename,typename - - - - - - - - type_group_pair_it - - typename,typename,typename - - - - - - - - head - - typename - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - aboolint - - - - abc + + + + + + type_list + + Ts... + + + + + + + + + + type_list + + Ret(Arg &&),Ts... + + + + + + + + + + type_list + + T const,Ts... + + + + + + + + + + type_list + + Head,Tail... + + + + + + + + + + head + + type_list<Head,Tail...> + + + + + + + + + + type_list + + Type... + + + + + + + + + + type_list + + First... + + + + + + + + + + type_list + + Second... + + + + + + + + + + type_group_pair + + type_list<First...>,type_list<Second...> + + + + + + + + size : const size_t + + + + + + + + + optional_ref + + T + + + + + + + + + + optional_ref + + type_group_pair_it<It,type_list<First...>,type_list<Second...>>::value_type + + + + + + + + + + type_group_pair_it + + 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 + + A,bool,int + + + + + + + + + + type_list + + float,double + + + + + + + + + + type_list + + A,B,C + + + + + + + + + + type_group_pair + + type_list<float,double>,type_list<A,B,C> + + + + + + + + + + R + + + + + + + + abc : type_group_pair<type_list<float,double>,type_list<A,B,C>> + + + + + + + aboolint : type_list<A,bool,int> + + + + + + + + + type_group_pair + + typename,typename + + + + + + + + + + type_group_pair_it + + typename,typename,typename + + + + + + + + + + head + + typename + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + aboolint + + + + + + abc + diff --git a/docs/test_cases/t00064_class_mermaid.svg b/docs/test_cases/t00064_class_mermaid.svg index 12ff9a3dd..f9ed1edca 100644 --- a/docs/test_cases/t00064_class_mermaid.svg +++ b/docs/test_cases/t00064_class_mermaid.svg @@ -402,7 +402,7 @@ - + @@ -421,7 +421,7 @@ - + @@ -440,7 +440,7 @@ - + @@ -459,7 +459,7 @@ - + @@ -478,7 +478,7 @@ - + @@ -497,7 +497,7 @@ - + @@ -516,7 +516,7 @@ - + @@ -535,7 +535,7 @@ - + @@ -554,7 +554,7 @@ - + @@ -578,7 +578,7 @@ - + @@ -597,7 +597,7 @@ - + @@ -616,7 +616,7 @@ - + @@ -650,7 +650,7 @@ - + @@ -669,7 +669,7 @@ - + @@ -688,7 +688,7 @@ - + @@ -707,7 +707,7 @@ - + @@ -726,7 +726,7 @@ - + @@ -745,7 +745,7 @@ - + @@ -764,7 +764,7 @@ - + @@ -783,7 +783,7 @@ - + @@ -812,7 +812,7 @@ - + @@ -831,7 +831,7 @@ - + @@ -850,7 +850,7 @@ - + diff --git a/docs/test_cases/t00065_class.svg b/docs/test_cases/t00065_class.svg index 1c7c854ab..62fbe4f91 100644 --- a/docs/test_cases/t00065_class.svg +++ b/docs/test_cases/t00065_class.svg @@ -1,258 +1,310 @@ - + - - - - - - - - - module1 - - - submodule1a - - - module2 - - - concepts - - - - - ABC - - a - b - c - - - - - - - XYZ - - x - y - z - - - - - - - A - - - - - - - - - abc : ABC - - - - - - - pimpl : detail::AImpl * - - - - - - - xyz : XYZ - - - - - - AImpl - - - - - - - - B - - - - - - - - B() = default : void - - - - - - - - b() : void - - - - - - - C - - T - - - - - - - - - t : T * - - - - - - C - - int - - - - - - - - D - - bconcept T - - - - - - - - - c : C<int> - - - - - - - t : T - - - - - - C - - B - - - - - - - - D - - B - - - - - - - - «concept» - bconcept - - T - - (T t) - - T{} - t.b() - - - - - - R - - - - - - - - - a : A * - - - - - - - c : C<B> - - - - - - - d : D<B> - - - - - abc - - - - xyz - - - - pimpl - - - - - T - - - +c - - - - - - - - - - - +a - - - +c - - - +d + + + + module1 + + + + + submodule1a + + + + + module2 + + + + + concepts + + + + + + + ABC + + a + b + c + + + + + + + + + XYZ + + x + y + z + + + + + + + + + A + + + + + + + + abc : ABC + + + + + + + pimpl : detail::AImpl * + + + + + + + xyz : XYZ + + + + + + + + + AImpl + + + + + + + + + + B + + + + + + + B() = default : void + + + + + + + + b() : void + + + + + + + + + + C + + T + + + + + + + + t : T * + + + + + + + + + C + + int + + + + + + + + + + D + + bconcept T + + + + + + + + c : C<int> + + + + + + + t : T + + + + + + + + + C + + B + + + + + + + + + + D + + B + + + + + + + + + + «concept» + bconcept + + T + + (T t) + + T{} + t.b() + + + + + + + + R + + + + + + + + a : A * + + + + + + + c : C<B> + + + + + + + d : D<B> + + + + + + + + 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 17b4c3058..727094886 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_class.svg b/docs/test_cases/t00066_class.svg index f104d97a0..344639fd1 100644 --- a/docs/test_cases/t00066_class.svg +++ b/docs/test_cases/t00066_class.svg @@ -1,231 +1,227 @@ - + - - - - - - - - - - - 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)> + + + + + + 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 144efa541..088f7c9b6 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_class.svg b/docs/test_cases/t00067_class.svg index 26627b299..0cd5b4ed9 100644 --- a/docs/test_cases/t00067_class.svg +++ b/docs/test_cases/t00067_class.svg @@ -1,161 +1,157 @@ - + - - - - - - - - - - - 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 + + + + + + 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 1974f1897..5721d47c2 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 2f09a8905..1ba872471 100644 --- a/docs/test_cases/t00068.md +++ b/docs/test_cases/t00068.md @@ -92,14 +92,7 @@ struct RR { "diagram_type": "class", "elements": [ { - "bases": [ - { - "access": "public", - "id": "4623850284883436621", - "is_virtual": false, - "name": "clanguml::t00068::AA" - } - ], + "bases": [], "display_name": "AAA", "id": "11878554252076959348", "is_abstract": false, @@ -148,28 +141,7 @@ struct RR { ], "name": "t00068_r0_class", "package_type": "namespace", - "relationships": [ - { - "access": "public", - "destination": "11421192930710045248", - "label": "bb", - "source": "11878554252076959348", - "type": "association" - }, - { - "access": "public", - "destination": "15107428292598946277", - "label": "akind", - "source": "11878554252076959348", - "type": "aggregation" - }, - { - "access": "public", - "destination": "4623850284883436621", - "source": "11878554252076959348", - "type": "extension" - } - ], + "relationships": [], "title": "AAA context of radius 0", "using_namespace": "clanguml::t00068" } @@ -233,14 +205,7 @@ struct RR { "type": "enum" }, { - "bases": [ - { - "access": "public", - "id": "10379518537157600457", - "is_virtual": false, - "name": "clanguml::t00068::A" - } - ], + "bases": [], "display_name": "AA", "id": "4623850284883436621", "is_abstract": false, @@ -354,19 +319,6 @@ struct RR { "name": "t00068_r1_class", "package_type": "namespace", "relationships": [ - { - "access": "public", - "destination": "2873470995533754050", - "label": "b", - "source": "11421192930710045248", - "type": "aggregation" - }, - { - "access": "public", - "destination": "10379518537157600457", - "source": "4623850284883436621", - "type": "extension" - }, { "access": "public", "destination": "11421192930710045248", diff --git a/docs/test_cases/t00068_r0_class.svg b/docs/test_cases/t00068_r0_class.svg index 38eec8798..3d024372f 100644 --- a/docs/test_cases/t00068_r0_class.svg +++ b/docs/test_cases/t00068_r0_class.svg @@ -1,36 +1,32 @@ - + - - - - - - - AAA context of radius 0 - - - - - AAA - - - - - - - - - akind : AKind - - - - - - - bb : BB * + 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 50d5a6714..cd1a0d3f7 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 43858d767..f82331586 100644 --- a/docs/test_cases/t00068_r1_class.svg +++ b/docs/test_cases/t00068_r1_class.svg @@ -1,99 +1,111 @@ - + - - - - - - - AAA context of radius 1 - - - - - BB - - + AAA context of radius 1 + + + + + + BB + + + + + + + + b : std::vector<B> + + - - - + + + + + + AKind + + OneA + TwoA + ThreeA + + - - b : std::vector<B> + + + + + + AA + + + - - - - - AKind - - OneA - TwoA - ThreeA - + + + + + + AAA + + + + + + + + akind : AKind + + + + + + + bb : BB * + + - - - - - AA - - + + + + + + R + + + + + + + + aaa : AAA * + + - - - - - AAA - - - - - - - - - akind : AKind - - - - - - - bb : BB * - - - - - - R - - - - - - - - - aaa : AAA * - - - - - bb - - - - akind - - - - - - aaa + + + + + bb + + + + + + akind + + + + + + + + + + aaa + diff --git a/docs/test_cases/t00068_r1_class_mermaid.svg b/docs/test_cases/t00068_r1_class_mermaid.svg index b4c01515e..ac4d71623 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 971e4898f..50c196fde 100644 --- a/docs/test_cases/t00068_r2_class.svg +++ b/docs/test_cases/t00068_r2_class.svg @@ -1,138 +1,162 @@ - + - - - - - - - AAA context of radius 2 - - - - - B - - - - - - - - BB - - - - - - - - - b : std::vector<B> - - - - - - AKind - - OneA - TwoA - ThreeA - - - - - - - A - - - - - - - - AA - - - - - - - - AAA - - - - - - - - - akind : AKind - - - - - - - bb : BB * - - - - - - R - - - - - - - - - aaa : AAA * - - - - - - RR - - - - - - - - - r : std::shared_ptr<R> - - - - +b - - - - - - bb - - - - akind - - - - - - aaa - - - +r + AAA context of radius 2 + + + + + + B + + + + + + + + + + BB + + + + + + + + b : std::vector<B> + + + + + + + + + AKind + + OneA + TwoA + ThreeA + + + + + + + + + A + + + + + + + + + + AA + + + + + + + + + + AAA + + + + + + + + akind : AKind + + + + + + + bb : BB * + + + + + + + + + R + + + + + + + + aaa : AAA * + + + + + + + + + RR + + + + + + + + r : std::shared_ptr<R> + + + + + + + +b + + + + + + + + + + bb + + + + + + akind + + + + + + + + + + aaa + + + + + +r + diff --git a/docs/test_cases/t00068_r2_class_mermaid.svg b/docs/test_cases/t00068_r2_class_mermaid.svg index 266ce7031..13f7610b3 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_class.svg b/docs/test_cases/t00069_class.svg index 64c928eec..58ca2de8b 100644 --- a/docs/test_cases/t00069_class.svg +++ b/docs/test_cases/t00069_class.svg @@ -1,163 +1,175 @@ - + - - - - - - - - - - - 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 - - - - - h_ - - - - - - - - - - + + + + + + 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 + + + + + + + + h_ + + + + + + + + + + + + + + + + + + + diff --git a/docs/test_cases/t00069_class_mermaid.svg b/docs/test_cases/t00069_class_mermaid.svg index e3f754edb..da3e61b87 100644 --- a/docs/test_cases/t00069_class_mermaid.svg +++ b/docs/test_cases/t00069_class_mermaid.svg @@ -114,7 +114,7 @@ - + @@ -153,7 +153,7 @@ - + @@ -212,7 +212,7 @@ - + @@ -231,7 +231,7 @@ - + diff --git a/docs/test_cases/t00070_class.svg b/docs/test_cases/t00070_class.svg index 1140709c1..561829dab 100644 --- a/docs/test_cases/t00070_class.svg +++ b/docs/test_cases/t00070_class.svg @@ -1,70 +1,72 @@ - + - - - - - - - - - - - B - - + + + + + + B + + + - - - - - BB - - T - - + + + + + + BB + + T + + + + + + + + t : T + + - - - + + + + + + BBB + + bbb1 + bbb2 + + - - t : T - - - - - - BBB - - bbb1 - bbb2 - - - - - - - A - - - - - - - - get() : int - - - - - - - - a : int + + + + + + A + + + + + + + get() : int + + + + + + + + a : int + + diff --git a/docs/test_cases/t00070_class_mermaid.svg b/docs/test_cases/t00070_class_mermaid.svg index 8a8013504..2b4345cb9 100644 --- a/docs/test_cases/t00070_class_mermaid.svg +++ b/docs/test_cases/t00070_class_mermaid.svg @@ -52,7 +52,7 @@ - + @@ -71,7 +71,7 @@ - + @@ -95,7 +95,7 @@ - + @@ -124,7 +124,7 @@ - + diff --git a/docs/test_cases/t00071_class.svg b/docs/test_cases/t00071_class.svg index 7aa346d8d..55cec0880 100644 --- a/docs/test_cases/t00071_class.svg +++ b/docs/test_cases/t00071_class.svg @@ -1,174 +1,204 @@ - + - - - - - - - - - app - - - lib1 - - - mod1 - - - mod2 - - - lib2 - - - - - A - - - - - - - - get() : int - - - - - - - - a : int - - - - - - B - - - - - - - - BB - - T - - - - - - - - - t : T - - - - - - BBB - - bbb1 - bbb2 - - - - - - - D - - - - - - - - E - - - - - - - - C - - - - - - - - CC - - T - - - - - - - - - t : T - - - - - - CCC - - ccc1 - ccc2 - - - - - - - R - - - - - - - - - a : A * - - - - - - - b : B * - - - - - - - c : C * - - - - -a - - - -b - - - -c + + + + app + + + + + lib1 + + + + + mod1 + + + + + mod2 + + + + + lib2 + + + + + + + A + + + + + + + get() : int + + + + + + + + a : int + + + + + + + + + B + + + + + + + + + + BB + + T + + + + + + + + t : T + + + + + + + + + BBB + + bbb1 + bbb2 + + + + + + + + + D + + + + + + + + + + E + + + + + + + + + + C + + + + + + + + + + CC + + T + + + + + + + + t : T + + + + + + + + + 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 index 228e21fa1..22c1eaaca 100644 --- a/docs/test_cases/t00071_class_mermaid.svg +++ b/docs/test_cases/t00071_class_mermaid.svg @@ -90,7 +90,7 @@ - + @@ -109,7 +109,7 @@ - + @@ -133,7 +133,7 @@ - + @@ -162,7 +162,7 @@ - + @@ -181,7 +181,7 @@ - + @@ -200,7 +200,7 @@ - + @@ -219,7 +219,7 @@ - + @@ -243,7 +243,7 @@ - + @@ -272,7 +272,7 @@ - + @@ -301,7 +301,7 @@ - + diff --git a/docs/test_cases/t00072_class.svg b/docs/test_cases/t00072_class.svg index d45ec7a7b..aee13f7a7 100644 --- a/docs/test_cases/t00072_class.svg +++ b/docs/test_cases/t00072_class.svg @@ -1,136 +1,158 @@ - + - - - - - - - - - app - - - :lib1 - - - mod1 - - - mod2 - - - :lib2 - - - - - A - - - - - - - - get() : int - - - - - - - - a : int - - - - - - B - - - - - - - - BB - - T - - - - - - - - - t : T - - - - - - BBB - - bbb1 - bbb2 - - - - - - - D - - - - - - - - E - - - - - - - - C - - - - - - - - CC - - T - - - - - - - - - t : T - - - - - - CCC - - ccc1 - ccc2 - + + + + app + + + + + :lib1 + + + + + mod1 + + + + + mod2 + + + + + :lib2 + + + + + + + A + + + + + + + get() : int + + + + + + + + a : int + + + + + + + + + B + + + + + + + + + + BB + + T + + + + + + + + t : T + + + + + + + + + BBB + + bbb1 + bbb2 + + + + + + + + + D + + + + + + + + + + E + + + + + + + + + + C + + + + + + + + + + CC + + T + + + + + + + + t : T + + + + + + + + + CCC + + ccc1 + ccc2 + + diff --git a/docs/test_cases/t00072_class_mermaid.svg b/docs/test_cases/t00072_class_mermaid.svg index 9a047ebf4..4ed66a302 100644 --- a/docs/test_cases/t00072_class_mermaid.svg +++ b/docs/test_cases/t00072_class_mermaid.svg @@ -52,7 +52,7 @@ - + @@ -71,7 +71,7 @@ - + @@ -95,7 +95,7 @@ - + @@ -124,7 +124,7 @@ - + @@ -143,7 +143,7 @@ - + @@ -162,7 +162,7 @@ - + @@ -181,7 +181,7 @@ - + @@ -205,7 +205,7 @@ - + @@ -234,7 +234,7 @@ - + diff --git a/docs/test_cases/t00073_class.svg b/docs/test_cases/t00073_class.svg index baf64200f..fe7a24839 100644 --- a/docs/test_cases/t00073_class.svg +++ b/docs/test_cases/t00073_class.svg @@ -1,124 +1,144 @@ - + - - - - - - - - - - - A - - - - - - - - AHandler - - - - - - - - operator()(A & a) const : void - - - - - - - - handle(A & a) const : void - - - - - - - B - - - - - - - - BHandler - - - - - - - - operator()(B & b) const : void - - - - - - - - handle(B & b) const : void - - - - - - - Overload - - Bases... - - - - - - - - Overload - - AHandler,BHandler - - - - - - - - R - - - - - - - - - dispatch : Overload<AHandler,BHandler> - - - - - - - - - - - - - - - dispatch + + + + + + A + + + + + + + + + + AHandler + + + + + + + operator()(A & a) const : void + + + + + + + + handle(A & a) const : void + + + + + + + + + + B + + + + + + + + + + BHandler + + + + + + + operator()(B & b) const : void + + + + + + + + handle(B & b) const : void + + + + + + + + + + Overload + + Bases... + + + + + + + + + + Overload + + AHandler,BHandler + + + + + + + + + + R + + + + + + + + dispatch : Overload<AHandler,BHandler> + + + + + + + + + + + + + + + + + + + + + + + + + + + + dispatch + diff --git a/docs/test_cases/t00073_class_mermaid.svg b/docs/test_cases/t00073_class_mermaid.svg index 798eef305..4b8233cd4 100644 --- a/docs/test_cases/t00073_class_mermaid.svg +++ b/docs/test_cases/t00073_class_mermaid.svg @@ -122,7 +122,7 @@ - + @@ -141,7 +141,7 @@ - + @@ -170,7 +170,7 @@ - + @@ -189,7 +189,7 @@ - + @@ -218,7 +218,7 @@ - + @@ -237,7 +237,7 @@ - + @@ -256,7 +256,7 @@ - + diff --git a/docs/test_cases/t00074_class.svg b/docs/test_cases/t00074_class.svg index e31e47f4e..5be4570e3 100644 --- a/docs/test_cases/t00074_class.svg +++ b/docs/test_cases/t00074_class.svg @@ -1,52 +1,56 @@ - + - - - - - - - - - - - «concept» - fruit_c - - T - - + + + + + + «concept» + fruit_c + + T + + + - - - - - «concept» - apple_c - - T - - + + + + + + «concept» + apple_c + + T + + + - - - - - «concept» - orange_c - - T - - + + + + + + «concept» + orange_c + + T + + + - - - T - - - T + + + + T + + + + + T + diff --git a/docs/test_cases/t00074_class_mermaid.svg b/docs/test_cases/t00074_class_mermaid.svg index 1612f203a..e726867a4 100644 --- a/docs/test_cases/t00074_class_mermaid.svg +++ b/docs/test_cases/t00074_class_mermaid.svg @@ -78,7 +78,7 @@ - + @@ -97,7 +97,7 @@ - + @@ -116,7 +116,7 @@ - + diff --git a/docs/test_cases/t00075_class.svg b/docs/test_cases/t00075_class.svg index 1e2340e1f..8850067c3 100644 --- a/docs/test_cases/t00075_class.svg +++ b/docs/test_cases/t00075_class.svg @@ -1,160 +1,185 @@ - + - - - - - - - - - ns1 - - - ns2 - - - - - - «concept» - C - - T - - (T t) - - T{} - t.e() - - - - - - E - - k1 - k2 - - - - - - - - A - - - - - - - - e() const : E - - - - - - - - B - - - - - - - - e() const : E - - - - - - - - ABE - - ns1::ns2::C T - - - - - - - - - a_or_b : T - - - - - - - ABE - - ns1::ns2::A - - - - - - - - - ABE - - ns1::ns2::B - - - - - - - - - R - - - - - - - - - a : ABE<A> - - - - - - - b : ABE<B> - - - - - - - - T - - - - - - - - - - - +a - - - +b + + + + ns1 + + + + + ns2 + + + + + + + «concept» + C + + T + + (T t) + + T{} + t.e() + + + + + + + + E + + k1 + k2 + + + + + + + + + A + + + + + + + e() const : E + + + + + + + + + + B + + + + + + + e() const : E + + + + + + + + + + ABE + + ns1::ns2::C T + + + + + + + + a_or_b : T + + + + + + + + + ABE + + ns1::ns2::A + + + + + + + + + + ABE + + ns1::ns2::B + + + + + + + + + + R + + + + + + + + a : ABE<A> + + + + + + + b : ABE<B> + + + + + + + + + + + + + + + T + + + + + + + + + + + + + + + + + + + + + +a + + + + + +b + diff --git a/docs/test_cases/t00075_class_mermaid.svg b/docs/test_cases/t00075_class_mermaid.svg index 9f474cdbb..6207ea269 100644 --- a/docs/test_cases/t00075_class_mermaid.svg +++ b/docs/test_cases/t00075_class_mermaid.svg @@ -162,7 +162,7 @@ - + @@ -196,7 +196,7 @@ - + @@ -225,7 +225,7 @@ - + @@ -249,7 +249,7 @@ - + @@ -273,7 +273,7 @@ - + @@ -297,7 +297,7 @@ - + @@ -316,7 +316,7 @@ - + @@ -335,7 +335,7 @@ - + diff --git a/docs/test_cases/t00076.md b/docs/test_cases/t00076.md index 4cbd568eb..74f24d58f 100644 --- a/docs/test_cases/t00076.md +++ b/docs/test_cases/t00076.md @@ -182,14 +182,7 @@ struct I { "type": "class" }, { - "bases": [ - { - "access": "public", - "id": "14151717565203342260", - "is_virtual": false, - "name": "clanguml::t00076::A" - } - ], + "bases": [], "display_name": "B", "id": "17401388407958641079", "is_abstract": false, @@ -538,19 +531,6 @@ struct I { "source": "14155804895193829672", "type": "aggregation" }, - { - "access": "public", - "destination": "8045105059193364232", - "source": "17401388407958641079", - "type": "dependency" - }, - { - "access": "public", - "destination": "4095144754042414379", - "label": "f", - "source": "17401388407958641079", - "type": "association" - }, { "access": "public", "destination": "1357160052467496131", @@ -581,12 +561,6 @@ struct I { "source": "17401388407958641079", "type": "association" }, - { - "access": "public", - "destination": "14151717565203342260", - "source": "17401388407958641079", - "type": "extension" - }, { "access": "public", "destination": "17401388407958641079", @@ -612,13 +586,6 @@ struct I { "source": "17377451137994128435", "type": "association" }, - { - "access": "public", - "destination": "15384080308608873696", - "label": "ee", - "source": "17377451137994128435", - "type": "association" - }, { "access": "public", "destination": "17377451137994128435", diff --git a/docs/test_cases/t00076_class.svg b/docs/test_cases/t00076_class.svg index 6fd4736b7..3fb20168d 100644 --- a/docs/test_cases/t00076_class.svg +++ b/docs/test_cases/t00076_class.svg @@ -1,216 +1,254 @@ - + - - - - - - - - - - - Color - - red - green - blue - - - - - - - GG - - - - - - - - G - - - - - - - - - gg : GG - - - - - - J - - - - - - - - B - - - - - - - - a(H * h) : void - - - - - - - - bb : BB * - - - - - - - c : Color - - - - - - - f : F * - - - - - - - g : G - - - - - - - j : J - - - - - - B::BB - - - - - - - - C - - - - - - - - D - - - - - - - - E - - - - - - - - - b : B * - - - - - - - ee : EE * - - - - - - EEE - - - - - - - - - e : E * - - - - - - I - - - - - - - - i(B * b) : void - - - - - - gg - - - +c - - - +g - - - +j - 0..1 - 1..* - - - - bb - - - - - - - - - - - +b - - - +e - - + + + + + + Color + + red + green + blue + + + + + + + + + GG + + + + + + + + + + G + + + + + + + + gg : GG + + + + + + + + + J + + + + + + + + + + B + + + + + + + a(H * h) : void + + + + + + + + bb : BB * + + + + + + + c : Color + + + + + + + f : F * + + + + + + + g : G + + + + + + + j : J + + + + + + + + + B::BB + + + + + + + + + + C + + + + + + + + + + D + + + + + + + + + + E + + + + + + + + b : B * + + + + + + + ee : EE * + + + + + + + + + EEE + + + + + + + + e : E * + + + + + + + + + I + + + + + + + i(B * b) : void + + + + + + + + + gg + + + + + +c + + + + + +g + + + + + +j + 0..1 + 1..* + + + + + + bb + + + + + + + + + + + + + + + + + + + +b + + + + + +e + + + + + diff --git a/docs/test_cases/t00076_class_mermaid.svg b/docs/test_cases/t00076_class_mermaid.svg index ab3f6daa9..025da1db6 100644 --- a/docs/test_cases/t00076_class_mermaid.svg +++ b/docs/test_cases/t00076_class_mermaid.svg @@ -199,7 +199,7 @@ - + @@ -233,7 +233,7 @@ - + @@ -252,7 +252,7 @@ - + @@ -276,7 +276,7 @@ - + @@ -295,7 +295,7 @@ - + @@ -344,7 +344,7 @@ - + @@ -363,7 +363,7 @@ - + @@ -382,7 +382,7 @@ - + @@ -401,7 +401,7 @@ - + @@ -430,7 +430,7 @@ - + @@ -454,7 +454,7 @@ - + diff --git a/docs/test_cases/t00077.md b/docs/test_cases/t00077.md index 39ff95715..4a82adb1f 100644 --- a/docs/test_cases/t00077.md +++ b/docs/test_cases/t00077.md @@ -449,29 +449,6 @@ struct KK { "source": "611485414721657062", "type": "association" }, - { - "access": "public", - "destination": "13808657890485968392", - "label": "c", - "source": "611485414721657062", - "type": "aggregation" - }, - { - "access": "public", - "destination": "14499052668890138637", - "label": "g", - "source": "611485414721657062", - "type": "aggregation" - }, - { - "access": "public", - "destination": "8461727026638237611", - "label": "j", - "multiplicity_destination": "1..*", - "multiplicity_source": "0..1", - "source": "611485414721657062", - "type": "composition" - }, { "access": "public", "destination": "11110555698388355337", @@ -492,13 +469,6 @@ struct KK { "source": "2855344937087077573", "type": "aggregation" }, - { - "access": "public", - "destination": "15983793244020940633", - "label": "kkk", - "source": "2855344937087077573", - "type": "aggregation" - }, { "access": "public", "destination": "2855344937087077573", diff --git a/docs/test_cases/t00077_class.svg b/docs/test_cases/t00077_class.svg index 71b62ae42..749f9a984 100644 --- a/docs/test_cases/t00077_class.svg +++ b/docs/test_cases/t00077_class.svg @@ -1,159 +1,183 @@ - + - - - - - - - - - - - H - - - - - - - - Base - - - - - - - - A - - - - - - - - B - - - - - - - - a(H * h) : void - - - - - - - - c : Color - - - - - - - f : F * - - - - - - - g : G - - - - - - - j : J - - - - - - FF - - - - - - - - F - - - - - - - - - ff : FF * - - - - - - K - - - - - - - - - b : B - - - - - - - kkk : KKK - - - - - - KK - - - - - - - - - k : K - - - - - - - - +f - - - - - - ff - - - +b - - - +k + + + + + + H + + + + + + + + + + Base + + + + + + + + + + A + + + + + + + + + + B + + + + + + + a(H * h) : void + + + + + + + + c : Color + + + + + + + f : F * + + + + + + + g : G + + + + + + + j : J + + + + + + + + + FF + + + + + + + + + + F + + + + + + + + ff : FF * + + + + + + + + + K + + + + + + + + b : B + + + + + + + kkk : KKK + + + + + + + + + KK + + + + + + + + k : K + + + + + + + + + + + + + + + +f + + + + + + + + + + ff + + + + + +b + + + + + +k + diff --git a/docs/test_cases/t00077_class_mermaid.svg b/docs/test_cases/t00077_class_mermaid.svg index 98350647b..8d05381e2 100644 --- a/docs/test_cases/t00077_class_mermaid.svg +++ b/docs/test_cases/t00077_class_mermaid.svg @@ -134,7 +134,7 @@ - + @@ -153,7 +153,7 @@ - + @@ -172,7 +172,7 @@ - + @@ -191,7 +191,7 @@ - + @@ -235,7 +235,7 @@ - + @@ -254,7 +254,7 @@ - + @@ -278,7 +278,7 @@ - + @@ -307,7 +307,7 @@ - + diff --git a/docs/test_cases/t00078.md b/docs/test_cases/t00078.md index ca17fc83e..f0faf23c3 100644 --- a/docs/test_cases/t00078.md +++ b/docs/test_cases/t00078.md @@ -197,13 +197,6 @@ struct C { "source": "2648609453195038561", "type": "aggregation" }, - { - "access": "public", - "destination": "13336639887154812399", - "label": "e", - "source": "2648609453195038561", - "type": "association" - }, { "access": "public", "destination": "8530329873091241519", diff --git a/docs/test_cases/t00078_class.svg b/docs/test_cases/t00078_class.svg index d95748e65..fdc5bbfe0 100644 --- a/docs/test_cases/t00078_class.svg +++ b/docs/test_cases/t00078_class.svg @@ -1,74 +1,82 @@ - + - - - - - - - - - - - Base - - + + + + + + Base + + + - - - - - D - - + + + + + + D + + + - - - - - A - - + + + + + + A + + + + + + + + d : D + + + + + + + e : E * + + - - - + + + + + + C + + + + + + + + a : A + + - - d : D - - - - - - - e : E * - - - - - - C - - - - - - - - - a : A - - - - +d - - - - - +a + + + + +d + + + + + + + + + +a + diff --git a/docs/test_cases/t00078_class_mermaid.svg b/docs/test_cases/t00078_class_mermaid.svg index 64016b984..4fdabf486 100644 --- a/docs/test_cases/t00078_class_mermaid.svg +++ b/docs/test_cases/t00078_class_mermaid.svg @@ -88,7 +88,7 @@ - + @@ -107,7 +107,7 @@ - + @@ -126,7 +126,7 @@ - + @@ -155,7 +155,7 @@ - + diff --git a/docs/test_cases/t00079.md b/docs/test_cases/t00079.md index e52b84443..5f361140c 100644 --- a/docs/test_cases/t00079.md +++ b/docs/test_cases/t00079.md @@ -114,15 +114,7 @@ struct C { ], "name": "t00079_class", "package_type": "namespace", - "relationships": [ - { - "access": "public", - "destination": "8374063247524690299", - "label": "a", - "source": "17719745761779016384", - "type": "association" - } - ], + "relationships": [], "using_namespace": "clanguml::t00079" } ``` diff --git a/docs/test_cases/t00079_class.svg b/docs/test_cases/t00079_class.svg index 48d01c9b1..cd4bf5efc 100644 --- a/docs/test_cases/t00079_class.svg +++ b/docs/test_cases/t00079_class.svg @@ -1,36 +1,34 @@ - + - - - - - - - - - - - E - - + + + + + + E + + + - - - - - B - - - - - - - - - a : A * + + + + + + B + + + + + + + + a : A * + + diff --git a/docs/test_cases/t00079_class_mermaid.svg b/docs/test_cases/t00079_class_mermaid.svg index 705c37aaf..ed29763b7 100644 --- a/docs/test_cases/t00079_class_mermaid.svg +++ b/docs/test_cases/t00079_class_mermaid.svg @@ -52,7 +52,7 @@ - + @@ -71,7 +71,7 @@ - + diff --git a/docs/test_cases/t00080.md b/docs/test_cases/t00080.md new file mode 100644 index 000000000..2f5585af9 --- /dev/null +++ b/docs/test_cases/t00080.md @@ -0,0 +1,716 @@ +# t00080 - Test case for including elements from system headers +## Config +```yaml +diagrams: + t00080_class: + type: class + filter_mode: advanced + comment_parser: clang + include_system_headers: true + glob: + - t00080.cc + include: + anyof: + namespaces: + - clanguml::t00080 + elements: + - std::thread + using_namespace: clanguml::t00080 +``` +## Source code +File `tests/t00080/t00080.cc` +```cpp +#include + +namespace clanguml { +namespace t00080 { + +class Worker : public std::thread { +public: + using std::thread::thread; + + ~Worker() + { + if (this->joinable()) { + this->join(); + } + } + + void start(int delay) { } +}; + +struct R { + Worker *w; +}; +} +} +``` +## Generated PlantUML diagrams +![t00080_class](./t00080_class.svg "Test case for including elements from system headers") +## Generated Mermaid diagrams +![t00080_class](./t00080_class_mermaid.svg "Test case for including elements from system headers") +## Generated JSON models +```json +{ + "diagram_type": "class", + "elements": [ + { + "bases": [], + "display_name": "std::thread", + "id": "15292512913378933439", + "is_abstract": false, + "is_nested": false, + "is_struct": false, + "is_template": false, + "is_union": false, + "members": [ + { + "access": "private", + "is_static": false, + "name": "_M_id", + "source_location": { + "column": 11, + "file": "", + "line": 132, + "translation_unit": "t00080.cc" + }, + "type": "id" + } + ], + "methods": [ + { + "access": "public", + "display_name": "thread", + "is_const": false, + "is_consteval": false, + "is_constexpr": false, + "is_constructor": true, + "is_copy_assignment": false, + "is_coroutine": false, + "is_defaulted": true, + "is_deleted": false, + "is_move_assignment": false, + "is_noexcept": true, + "is_operator": false, + "is_pure_virtual": false, + "is_static": false, + "is_virtual": false, + "name": "thread", + "parameters": [], + "source_location": { + "column": 5, + "file": "", + "line": 141, + "translation_unit": "t00080.cc" + }, + "template_parameters": [], + "type": "void" + }, + { + "access": "public", + "display_name": "~thread", + "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": "~thread", + "parameters": [], + "source_location": { + "column": 5, + "file": "", + "line": 169, + "translation_unit": "t00080.cc" + }, + "template_parameters": [], + "type": "void" + }, + { + "access": "public", + "display_name": "thread", + "is_const": false, + "is_consteval": false, + "is_constexpr": false, + "is_constructor": true, + "is_copy_assignment": false, + "is_coroutine": false, + "is_defaulted": false, + "is_deleted": true, + "is_move_assignment": false, + "is_noexcept": false, + "is_operator": false, + "is_pure_virtual": false, + "is_static": false, + "is_virtual": false, + "name": "thread", + "parameters": [ + { + "name": "", + "type": "const thread &" + } + ], + "source_location": { + "column": 5, + "file": "", + "line": 175, + "translation_unit": "t00080.cc" + }, + "template_parameters": [], + "type": "void" + }, + { + "access": "public", + "display_name": "thread", + "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": true, + "is_operator": false, + "is_pure_virtual": false, + "is_static": false, + "is_virtual": false, + "name": "thread", + "parameters": [ + { + "name": "__t", + "type": "thread &&" + } + ], + "source_location": { + "column": 5, + "file": "", + "line": 177, + "translation_unit": "t00080.cc" + }, + "template_parameters": [], + "type": "void" + }, + { + "access": "public", + "display_name": "operator=", + "is_const": false, + "is_consteval": false, + "is_constexpr": false, + "is_constructor": false, + "is_copy_assignment": true, + "is_coroutine": false, + "is_defaulted": false, + "is_deleted": true, + "is_move_assignment": false, + "is_noexcept": false, + "is_operator": true, + "is_pure_virtual": false, + "is_static": false, + "is_virtual": false, + "name": "operator=", + "parameters": [ + { + "name": "", + "type": "const thread &" + } + ], + "source_location": { + "column": 13, + "file": "", + "line": 180, + "translation_unit": "t00080.cc" + }, + "template_parameters": [], + "type": "thread &" + }, + { + "access": "public", + "display_name": "operator=", + "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": true, + "is_noexcept": true, + "is_operator": true, + "is_pure_virtual": false, + "is_static": false, + "is_virtual": false, + "name": "operator=", + "parameters": [ + { + "name": "__t", + "type": "thread &&" + } + ], + "source_location": { + "column": 13, + "file": "", + "line": 182, + "translation_unit": "t00080.cc" + }, + "template_parameters": [], + "type": "thread &" + }, + { + "access": "public", + "display_name": "swap", + "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": "swap", + "parameters": [ + { + "name": "__t", + "type": "thread &" + } + ], + "source_location": { + "column": 5, + "file": "", + "line": 191, + "translation_unit": "t00080.cc" + }, + "template_parameters": [], + "type": "void" + }, + { + "access": "public", + "display_name": "joinable", + "is_const": true, + "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": "joinable", + "parameters": [], + "source_location": { + "column": 5, + "file": "", + "line": 195, + "translation_unit": "t00080.cc" + }, + "template_parameters": [], + "type": "bool" + }, + { + "access": "public", + "display_name": "join", + "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": "join", + "parameters": [], + "source_location": { + "column": 5, + "file": "", + "line": 199, + "translation_unit": "t00080.cc" + }, + "template_parameters": [], + "type": "void" + }, + { + "access": "public", + "display_name": "detach", + "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": "detach", + "parameters": [], + "source_location": { + "column": 5, + "file": "", + "line": 202, + "translation_unit": "t00080.cc" + }, + "template_parameters": [], + "type": "void" + }, + { + "access": "public", + "display_name": "get_id", + "is_const": true, + "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": "get_id", + "parameters": [], + "source_location": { + "column": 5, + "file": "", + "line": 205, + "translation_unit": "t00080.cc" + }, + "template_parameters": [], + "type": "id" + }, + { + "access": "public", + "display_name": "native_handle", + "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": "native_handle", + "parameters": [], + "source_location": { + "column": 5, + "file": "", + "line": 211, + "translation_unit": "t00080.cc" + }, + "template_parameters": [], + "type": "native_handle_type" + }, + { + "access": "public", + "display_name": "hardware_concurrency", + "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": true, + "is_virtual": false, + "name": "hardware_concurrency", + "parameters": [], + "source_location": { + "column": 5, + "file": "", + "line": 216, + "translation_unit": "t00080.cc" + }, + "template_parameters": [], + "type": "unsigned int" + }, + { + "access": "private", + "display_name": "_M_start_thread", + "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": "_M_start_thread", + "parameters": [ + { + "name": "", + "type": "_State_ptr" + }, + { + "name": "", + "type": "void (*)()" + } + ], + "source_location": { + "column": 5, + "file": "", + "line": 235, + "translation_unit": "t00080.cc" + }, + "template_parameters": [], + "type": "void" + }, + { + "access": "public", + "display_name": "thread<_Callable,_Args...,typename=_Require<__not_same<_Callable> >>", + "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": "thread", + "parameters": [ + { + "name": "__f", + "type": "_Callable &&" + }, + { + "name": "__args", + "type": "_Args &&..." + } + ], + "template_parameters": [ + { + "is_variadic": false, + "kind": "template_type", + "name": "_Callable", + "template_parameters": [] + }, + { + "is_variadic": true, + "kind": "template_type", + "name": "_Args...", + "template_parameters": [] + }, + { + "default": "_Require<__not_same<_Callable> >", + "is_variadic": false, + "kind": "template_type", + "name": "typename", + "template_parameters": [] + } + ], + "type": "void" + } + ], + "name": "thread", + "namespace": "std", + "source_location": { + "column": 9, + "file": "", + "line": 78, + "translation_unit": "t00080.cc" + }, + "template_parameters": [], + "type": "class" + }, + { + "bases": [ + { + "access": "public", + "id": "15292512913378933439", + "is_virtual": false, + "name": "std::thread" + } + ], + "display_name": "Worker", + "id": "9784607930441346007", + "is_abstract": false, + "is_nested": false, + "is_struct": false, + "is_template": false, + "is_union": false, + "members": [], + "methods": [ + { + "access": "public", + "display_name": "~Worker", + "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": "~Worker", + "parameters": [], + "source_location": { + "column": 5, + "file": "t00080.cc", + "line": 10, + "translation_unit": "t00080.cc" + }, + "template_parameters": [], + "type": "void" + }, + { + "access": "public", + "display_name": "start", + "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": "start", + "parameters": [ + { + "name": "delay", + "type": "int" + } + ], + "source_location": { + "column": 10, + "file": "t00080.cc", + "line": 17, + "translation_unit": "t00080.cc" + }, + "template_parameters": [], + "type": "void" + } + ], + "name": "Worker", + "namespace": "clanguml::t00080", + "source_location": { + "column": 7, + "file": "t00080.cc", + "line": 6, + "translation_unit": "t00080.cc" + }, + "template_parameters": [], + "type": "class" + }, + { + "bases": [], + "display_name": "R", + "id": "12172460947490041262", + "is_abstract": false, + "is_nested": false, + "is_struct": true, + "is_template": false, + "is_union": false, + "members": [ + { + "access": "public", + "is_static": false, + "name": "w", + "source_location": { + "column": 13, + "file": "t00080.cc", + "line": 21, + "translation_unit": "t00080.cc" + }, + "type": "Worker *" + } + ], + "methods": [], + "name": "R", + "namespace": "clanguml::t00080", + "source_location": { + "column": 8, + "file": "t00080.cc", + "line": 20, + "translation_unit": "t00080.cc" + }, + "template_parameters": [], + "type": "class" + } + ], + "name": "t00080_class", + "package_type": "namespace", + "relationships": [ + { + "access": "public", + "destination": "15292512913378933439", + "source": "9784607930441346007", + "type": "extension" + }, + { + "access": "public", + "destination": "9784607930441346007", + "label": "w", + "source": "12172460947490041262", + "type": "association" + } + ], + "using_namespace": "clanguml::t00080" +} +``` diff --git a/docs/test_cases/t00080_class.svg b/docs/test_cases/t00080_class.svg new file mode 100644 index 000000000..8c46c406d --- /dev/null +++ b/docs/test_cases/t00080_class.svg @@ -0,0 +1,100 @@ + + + + + + + + + + std::thread + + + thread() noexcept = default : void + + thread(const thread &) = deleted : void + + thread(thread && __t) noexcept : void + + thread<_Callable,_Args...,typename=_Require<__not_same<_Callable> >>(_Callable && __f, _Args &&... __args) : void + + ~thread() : void + + + operator=(const thread &) = deleted : thread & + + operator=(thread && __t) noexcept : thread & + + + _M_start_thread(_State_ptr, void (*)()) : void + + detach() : void + + get_id() const noexcept : id + + hardware_concurrency() noexcept : unsigned int + + join() : void + + joinable() const noexcept : bool + + native_handle() : native_handle_type + + swap(thread & __t) noexcept : void + + + _M_id : id + + + + + + + Worker + + + + + + + ~Worker() : void + + + + + + + + start(int delay) : void + + + + + + + + + + R + + + + + + + + w : Worker * + + + + + + + + + + + +w + + + diff --git a/docs/test_cases/t00080_class_mermaid.svg b/docs/test_cases/t00080_class_mermaid.svg new file mode 100644 index 000000000..cff44953d --- /dev/null +++ b/docs/test_cases/t00080_class_mermaid.svg @@ -0,0 +1,232 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+
+
+ + + +
+ + +w + +
+
+
+
+
+ + + + + + + +
+ +
+
+ +
+ std::thread +
+
+ +
+ -_M_id : id +
+
+ +
+ +thread() : [default] void +
+
+ +
+ +thread(const thread &) : void +
+
+ +
+ +thread(thread && __t) : void +
+
+ +
+ +thread<_Callable,_Args...,typename=_Require<__not_same<_Callable> >>(_Callable && __f, _Args &&... __args) : void +
+
+ +
+ +~thread() : void +
+
+ +
+ +operator=(const thread &) : thread & +
+
+ +
+ +operator=(thread && __t) : thread & +
+
+ +
+ -_M_start_thread(_State_ptr, void (*) : )) : void +
+
+ +
+ +detach() : void +
+
+ +
+ +get_id() : [const] id +
+
+ +
+ +hardware_concurrency() : unsigned int +
+
+ +
+ +join() : void +
+
+ +
+ +joinable() : [const] bool +
+
+ +
+ +native_handle() : native_handle_type +
+
+ +
+ +swap(thread & __t) : void +
+
+
+
+ + + + + + + +
+ +
+
+ +
+ Worker +
+
+ +
+ +~Worker() : void +
+
+ +
+ +start(int delay) : void +
+
+
+
+
+ + + + + + + +
+ +
+
+ +
+ R +
+
+ +
+ +w : Worker +
+
+
+
+
+
+
+
+
diff --git a/docs/test_cases/t00081.md b/docs/test_cases/t00081.md new file mode 100644 index 000000000..24f5a4c4f --- /dev/null +++ b/docs/test_cases/t00081.md @@ -0,0 +1,350 @@ +# t00081 - Test case for class members relationships to std types +## Config +```yaml +diagrams: + t00081_class: + type: class + glob: + - t00081.cc + filter_mode: advanced + include_system_headers: true + include: + allof: + namespaces: + - clanguml::t00081 + - std + context: + - match: + radius: 2 + pattern: clanguml::t00081::A + exclude: + anyof: + access: + - private + - public + - protected + relationships: + - dependency + using_namespace: clanguml::t00081 +``` +## Source code +File `tests/t00081/t00081.cc` +```cpp +#include +#include +#include + +namespace clanguml { +namespace t00081_detail { +struct C { }; +} // namespace t00081_detail +namespace t00081 { +struct A { + std::vector as; + std::string s; + std::map ms; + + t00081_detail::C *c; +}; +} // namespace t00081 +} // namespace clanguml +``` +## Generated PlantUML diagrams +![t00081_class](./t00081_class.svg "Test case for class members relationships to std types") +## Generated Mermaid diagrams +![t00081_class](./t00081_class_mermaid.svg "Test case for class members relationships to std types") +## Generated JSON models +```json +{ + "diagram_type": "class", + "elements": [ + { + "bases": [], + "display_name": "std::map<_Key,_Tp,_Compare=std::less<_Key>,_Alloc=std::allocator >>", + "id": "7797286525545490827", + "is_abstract": false, + "is_nested": false, + "is_struct": false, + "is_template": true, + "is_union": false, + "members": [], + "methods": [], + "name": "map", + "namespace": "std", + "source_location": { + "column": 11, + "file": "", + "line": 100, + "translation_unit": "t00081.cc" + }, + "template_parameters": [ + { + "is_variadic": false, + "kind": "template_type", + "name": "_Key", + "template_parameters": [] + }, + { + "is_variadic": false, + "kind": "template_type", + "name": "_Tp", + "template_parameters": [] + }, + { + "default": "std::less<_Key>", + "is_variadic": false, + "kind": "template_type", + "name": "_Compare", + "template_parameters": [] + }, + { + "default": "std::allocator >", + "is_variadic": false, + "kind": "template_type", + "name": "_Alloc", + "template_parameters": [] + } + ], + "type": "class" + }, + { + "bases": [], + "display_name": "std::basic_string<_CharT,_Traits=char_traits<_CharT>,_Alloc=allocator<_CharT>>", + "id": "3849619530221140051", + "is_abstract": false, + "is_nested": false, + "is_struct": false, + "is_template": true, + "is_union": false, + "members": [], + "methods": [], + "name": "basic_string", + "namespace": "std", + "source_location": { + "column": 11, + "file": "", + "line": 85, + "translation_unit": "t00081.cc" + }, + "template_parameters": [ + { + "is_variadic": false, + "kind": "template_type", + "name": "_CharT", + "template_parameters": [] + }, + { + "default": "char_traits<_CharT>", + "is_variadic": false, + "kind": "template_type", + "name": "_Traits", + "template_parameters": [] + }, + { + "default": "allocator<_CharT>", + "is_variadic": false, + "kind": "template_type", + "name": "_Alloc", + "template_parameters": [] + } + ], + "type": "class" + }, + { + "bases": [], + "display_name": "std::string", + "id": "1275076681856179721", + "is_abstract": false, + "is_nested": false, + "is_struct": false, + "is_template": true, + "is_union": false, + "members": [], + "methods": [], + "name": "basic_string", + "namespace": "std", + "source_location": { + "column": 12, + "file": "", + "line": 4243, + "translation_unit": "t00081.cc" + }, + "template_parameters": [ + { + "is_variadic": false, + "kind": "argument", + "template_parameters": [], + "type": "char" + } + ], + "type": "class" + }, + { + "bases": [], + "display_name": "std::vector<_Tp,_Alloc=std::allocator<_Tp>>", + "id": "5805017087195686008", + "is_abstract": false, + "is_nested": false, + "is_struct": false, + "is_template": true, + "is_union": false, + "members": [], + "methods": [], + "name": "vector", + "namespace": "std", + "source_location": { + "column": 11, + "file": "", + "line": 423, + "translation_unit": "t00081.cc" + }, + "template_parameters": [ + { + "is_variadic": false, + "kind": "template_type", + "name": "_Tp", + "template_parameters": [] + }, + { + "default": "std::allocator<_Tp>", + "is_variadic": false, + "kind": "template_type", + "name": "_Alloc", + "template_parameters": [] + } + ], + "type": "class" + }, + { + "bases": [], + "display_name": "std::vector", + "id": "1347152004389415025", + "is_abstract": false, + "is_nested": false, + "is_struct": false, + "is_template": true, + "is_union": false, + "members": [], + "methods": [], + "name": "vector", + "namespace": "std", + "source_location": { + "column": 11, + "file": "", + "line": 423, + "translation_unit": "t00081.cc" + }, + "template_parameters": [ + { + "is_variadic": false, + "kind": "argument", + "template_parameters": [], + "type": "std::string" + } + ], + "type": "class" + }, + { + "bases": [], + "display_name": "std::map", + "id": "12004170049756060246", + "is_abstract": false, + "is_nested": false, + "is_struct": false, + "is_template": true, + "is_union": false, + "members": [], + "methods": [], + "name": "map", + "namespace": "std", + "source_location": { + "column": 11, + "file": "", + "line": 70, + "translation_unit": "t00081.cc" + }, + "template_parameters": [ + { + "is_variadic": false, + "kind": "argument", + "template_parameters": [], + "type": "std::string" + }, + { + "is_variadic": false, + "kind": "argument", + "template_parameters": [], + "type": "std::string" + } + ], + "type": "class" + }, + { + "bases": [], + "display_name": "A", + "id": "9134013995454363483", + "is_abstract": false, + "is_nested": false, + "is_struct": true, + "is_template": false, + "is_union": false, + "members": [], + "methods": [], + "name": "A", + "namespace": "clanguml::t00081", + "source_location": { + "column": 8, + "file": "t00081.cc", + "line": 10, + "translation_unit": "t00081.cc" + }, + "template_parameters": [], + "type": "class" + } + ], + "name": "t00081_class", + "package_type": "namespace", + "relationships": [ + { + "access": "public", + "destination": "3849619530221140051", + "source": "1275076681856179721", + "type": "instantiation" + }, + { + "access": "public", + "destination": "5805017087195686008", + "source": "1347152004389415025", + "type": "instantiation" + }, + { + "access": "public", + "destination": "7797286525545490827", + "source": "12004170049756060246", + "type": "instantiation" + }, + { + "access": "public", + "destination": "1347152004389415025", + "label": "as", + "source": "9134013995454363483", + "type": "aggregation" + }, + { + "access": "public", + "destination": "1275076681856179721", + "label": "s", + "source": "9134013995454363483", + "type": "aggregation" + }, + { + "access": "public", + "destination": "12004170049756060246", + "label": "ms", + "source": "9134013995454363483", + "type": "aggregation" + } + ], + "using_namespace": "clanguml::t00081" +} +``` diff --git a/docs/test_cases/t00081_class.svg b/docs/test_cases/t00081_class.svg new file mode 100644 index 000000000..32021c69f --- /dev/null +++ b/docs/test_cases/t00081_class.svg @@ -0,0 +1,104 @@ + + + + + + + + + + std::map + + _Key,_Tp,_Compare=std::less<_Key>,_Alloc=std::allocator<std::pair<const _Key, _Tp> > + + + + + + + + std::basic_string + + _CharT,_Traits=char_traits<_CharT>,_Alloc=allocator<_CharT> + + + + + + + + std::string + + + + + + + + std::vector + + _Tp,_Alloc=std::allocator<_Tp> + + + + + + + + std::vector + + std::string + + + + + + + + std::map + + std::string,std::string + + + + + + + + + A + + + + + + + + + + + + + + + + + + + + + as + + + + + +s + + + + + + ms + + + diff --git a/docs/test_cases/t00081_class_mermaid.svg b/docs/test_cases/t00081_class_mermaid.svg new file mode 100644 index 000000000..d064c8ad0 --- /dev/null +++ b/docs/test_cases/t00081_class_mermaid.svg @@ -0,0 +1,253 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+
+
+
+ + + +
+ + + +
+
+
+
+ + + +
+ + + +
+
+
+
+ + + +
+ + +as + +
+
+
+
+ + + +
+ + +s + +
+
+
+
+ + + +
+ + +ms + +
+
+
+
+
+ + + + + + + +
+ +
+
+ +
+ std::map<_Key,_Tp,_Compare=std::less<_Key>,_Alloc=std::allocator<std::pair<const _Key, _Tp> >> +
+
+
+
+ + + + + + +
+ +
+
+ +
+ std::basic_string<_CharT,_Traits=char_traits<_CharT>,_Alloc=allocator<_CharT>> +
+
+
+
+ + + + + + +
+ +
+
+ +
+ std::string +
+
+
+
+ + + + + + +
+ +
+
+ +
+ std::vector<_Tp,_Alloc=std::allocator<_Tp>> +
+
+
+
+ + + + + + +
+ +
+
+ +
+ std::vector<std::string> +
+
+
+
+ + + + + + +
+ +
+
+ +
+ std::map<std::string,std::string> +
+
+
+
+ + + + + + + +
+ +
+
+ +
+ A +
+
+
+
+
+
+
+
+
diff --git a/docs/test_cases/t00082.md b/docs/test_cases/t00082.md new file mode 100644 index 000000000..96748bbe2 --- /dev/null +++ b/docs/test_cases/t00082.md @@ -0,0 +1,358 @@ +# t00082 - Test case for advanced diagram filter inclusion test with subclasses and namespaces +## Config +```yaml +diagrams: + t00082_class: + type: class + glob: + - t00082.cc + generate_packages: true + filter_mode: advanced + include: + anyof: + subclasses: + - clanguml::t00082::ns1::nsA::A1 + namespaces: + - clanguml::t00082::ns2::nsB + context: + - clanguml::t00082::ns3::nsC::B3 + exclude: + allof: + elements: + - clanguml::t00082::ns1::nsA::A1 + using_namespace: clanguml::t00082 +``` +## Source code +File `tests/t00082/t00082.cc` +```cpp +namespace clanguml::t00082 { +namespace ns1 { +namespace nsA { +struct A1 { }; +struct B1 : public A1 { }; +struct C1 : public B1 { }; +struct D1 { }; +} +} +namespace ns2 { +namespace nsB { +struct A2 { }; +struct B2 : public A2 { }; +struct C2 : public B2 { }; +} +} +namespace ns3 { +namespace nsC { +struct A3 { }; +struct B3 : public A3 { }; +struct C3 : public B3 { }; +struct D3 { }; +} +} +namespace ns4 { +namespace nsD { +struct A4 { }; +} +} +} +``` +## Generated PlantUML diagrams +![t00082_class](./t00082_class.svg "Test case for advanced diagram filter inclusion test with subclasses and namespaces") +## Generated Mermaid diagrams +![t00082_class](./t00082_class_mermaid.svg "Test case for advanced diagram filter inclusion test with subclasses and namespaces") +## Generated JSON models +```json +{ + "diagram_type": "class", + "elements": [ + { + "display_name": "ns1", + "elements": [ + { + "display_name": "nsA", + "elements": [ + { + "bases": [], + "display_name": "B1", + "id": "15596320250571206658", + "is_abstract": false, + "is_nested": false, + "is_struct": true, + "is_template": false, + "is_union": false, + "members": [], + "methods": [], + "name": "B1", + "namespace": "clanguml::t00082::ns1::nsA", + "source_location": { + "column": 8, + "file": "t00082.cc", + "line": 5, + "translation_unit": "t00082.cc" + }, + "template_parameters": [], + "type": "class" + }, + { + "bases": [ + { + "access": "public", + "id": "15596320250571206658", + "is_virtual": false, + "name": "clanguml::t00082::ns1::nsA::B1" + } + ], + "display_name": "C1", + "id": "1635220505473283595", + "is_abstract": false, + "is_nested": false, + "is_struct": true, + "is_template": false, + "is_union": false, + "members": [], + "methods": [], + "name": "C1", + "namespace": "clanguml::t00082::ns1::nsA", + "source_location": { + "column": 8, + "file": "t00082.cc", + "line": 6, + "translation_unit": "t00082.cc" + }, + "template_parameters": [], + "type": "class" + } + ], + "name": "nsA", + "type": "namespace" + } + ], + "name": "ns1", + "type": "namespace" + }, + { + "display_name": "ns2", + "elements": [ + { + "display_name": "nsB", + "elements": [ + { + "bases": [], + "display_name": "A2", + "id": "16760820400747278589", + "is_abstract": false, + "is_nested": false, + "is_struct": true, + "is_template": false, + "is_union": false, + "members": [], + "methods": [], + "name": "A2", + "namespace": "clanguml::t00082::ns2::nsB", + "source_location": { + "column": 8, + "file": "t00082.cc", + "line": 12, + "translation_unit": "t00082.cc" + }, + "template_parameters": [], + "type": "class" + }, + { + "bases": [ + { + "access": "public", + "id": "16760820400747278589", + "is_virtual": false, + "name": "clanguml::t00082::ns2::nsB::A2" + } + ], + "display_name": "B2", + "id": "15689724057597125831", + "is_abstract": false, + "is_nested": false, + "is_struct": true, + "is_template": false, + "is_union": false, + "members": [], + "methods": [], + "name": "B2", + "namespace": "clanguml::t00082::ns2::nsB", + "source_location": { + "column": 8, + "file": "t00082.cc", + "line": 13, + "translation_unit": "t00082.cc" + }, + "template_parameters": [], + "type": "class" + }, + { + "bases": [ + { + "access": "public", + "id": "15689724057597125831", + "is_virtual": false, + "name": "clanguml::t00082::ns2::nsB::B2" + } + ], + "display_name": "C2", + "id": "600480210374819483", + "is_abstract": false, + "is_nested": false, + "is_struct": true, + "is_template": false, + "is_union": false, + "members": [], + "methods": [], + "name": "C2", + "namespace": "clanguml::t00082::ns2::nsB", + "source_location": { + "column": 8, + "file": "t00082.cc", + "line": 14, + "translation_unit": "t00082.cc" + }, + "template_parameters": [], + "type": "class" + } + ], + "name": "nsB", + "type": "namespace" + } + ], + "name": "ns2", + "type": "namespace" + }, + { + "display_name": "ns3", + "elements": [ + { + "display_name": "nsC", + "elements": [ + { + "bases": [], + "display_name": "A3", + "id": "3338977750360426719", + "is_abstract": false, + "is_nested": false, + "is_struct": true, + "is_template": false, + "is_union": false, + "members": [], + "methods": [], + "name": "A3", + "namespace": "clanguml::t00082::ns3::nsC", + "source_location": { + "column": 8, + "file": "t00082.cc", + "line": 19, + "translation_unit": "t00082.cc" + }, + "template_parameters": [], + "type": "class" + }, + { + "bases": [ + { + "access": "public", + "id": "3338977750360426719", + "is_virtual": false, + "name": "clanguml::t00082::ns3::nsC::A3" + } + ], + "display_name": "B3", + "id": "16268840963729643490", + "is_abstract": false, + "is_nested": false, + "is_struct": true, + "is_template": false, + "is_union": false, + "members": [], + "methods": [], + "name": "B3", + "namespace": "clanguml::t00082::ns3::nsC", + "source_location": { + "column": 8, + "file": "t00082.cc", + "line": 20, + "translation_unit": "t00082.cc" + }, + "template_parameters": [], + "type": "class" + }, + { + "bases": [ + { + "access": "public", + "id": "16268840963729643490", + "is_virtual": false, + "name": "clanguml::t00082::ns3::nsC::B3" + } + ], + "display_name": "C3", + "id": "6275205058551246711", + "is_abstract": false, + "is_nested": false, + "is_struct": true, + "is_template": false, + "is_union": false, + "members": [], + "methods": [], + "name": "C3", + "namespace": "clanguml::t00082::ns3::nsC", + "source_location": { + "column": 8, + "file": "t00082.cc", + "line": 21, + "translation_unit": "t00082.cc" + }, + "template_parameters": [], + "type": "class" + } + ], + "name": "nsC", + "type": "namespace" + } + ], + "name": "ns3", + "type": "namespace" + } + ], + "name": "t00082_class", + "package_type": "namespace", + "relationships": [ + { + "access": "public", + "destination": "15596320250571206658", + "source": "1635220505473283595", + "type": "extension" + }, + { + "access": "public", + "destination": "16760820400747278589", + "source": "15689724057597125831", + "type": "extension" + }, + { + "access": "public", + "destination": "15689724057597125831", + "source": "600480210374819483", + "type": "extension" + }, + { + "access": "public", + "destination": "3338977750360426719", + "source": "16268840963729643490", + "type": "extension" + }, + { + "access": "public", + "destination": "16268840963729643490", + "source": "6275205058551246711", + "type": "extension" + } + ], + "using_namespace": "clanguml::t00082" +} +``` diff --git a/docs/test_cases/t00082_class.svg b/docs/test_cases/t00082_class.svg new file mode 100644 index 000000000..ec6674395 --- /dev/null +++ b/docs/test_cases/t00082_class.svg @@ -0,0 +1,137 @@ + + + + + + + + + ns1 + + + + + nsA + + + + + ns2 + + + + + nsB + + + + + ns3 + + + + + nsC + + + + + + + B1 + + + + + + + + + + C1 + + + + + + + + + + A2 + + + + + + + + + + B2 + + + + + + + + + + C2 + + + + + + + + + + A3 + + + + + + + + + + B3 + + + + + + + + + + C3 + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/test_cases/t00082_class_mermaid.svg b/docs/test_cases/t00082_class_mermaid.svg new file mode 100644 index 000000000..6db71b66b --- /dev/null +++ b/docs/test_cases/t00082_class_mermaid.svg @@ -0,0 +1,262 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+
+
+ + + +
+ +
+
+
+
+ + + +
+ +
+
+
+
+ + + +
+ +
+
+
+
+ + + +
+ +
+
+
+
+
+ + + + + + + + +
+ +
+
+ +
+ ns1::nsA::B1 +
+
+
+
+
+ + + + + + + +
+ +
+
+ +
+ ns1::nsA::C1 +
+
+
+
+
+ + + + + + + +
+ +
+
+ +
+ ns2::nsB::A2 +
+
+
+
+
+ + + + + + + +
+ +
+
+ +
+ ns2::nsB::B2 +
+
+
+
+
+ + + + + + + +
+ +
+
+ +
+ ns2::nsB::C2 +
+
+
+
+
+ + + + + + + +
+ +
+
+ +
+ ns3::nsC::A3 +
+
+
+
+
+ + + + + + + +
+ +
+
+ +
+ ns3::nsC::B3 +
+
+
+
+
+ + + + + + + +
+ +
+
+ +
+ ns3::nsC::C3 +
+
+
+
+
+
+
+
+
diff --git a/docs/test_cases/t00083.md b/docs/test_cases/t00083.md new file mode 100644 index 000000000..1cfc57eb1 --- /dev/null +++ b/docs/test_cases/t00083.md @@ -0,0 +1,178 @@ +# t00083 - Test case for advanced diagram filter exclusion test with subclasses and namespaces +## Config +```yaml +diagrams: + t00083_class: + type: class + glob: + - t00083.cc + generate_packages: true + filter_mode: advanced + exclude: + anyof: + subclasses: + - clanguml::t00083::ns1::nsA::A1 + namespaces: + - clanguml::t00083::ns2::nsB + context: + - clanguml::t00083::ns3::nsC::B3 + using_namespace: clanguml::t00083 +``` +## Source code +File `tests/t00083/t00083.cc` +```cpp +namespace clanguml::t00083 { +namespace ns1 { +namespace nsA { +struct A1 { }; +struct B1 : public A1 { }; +struct C1 : public B1 { }; +struct D1 { }; +} +} +namespace ns2 { +namespace nsB { +struct A2 { }; +struct B2 : public A2 { }; +struct C2 : public B2 { }; +} +} +namespace ns3 { +namespace nsC { +struct A3 { }; +struct B3 : public A3 { }; +struct C3 : public B3 { }; +struct D3 { }; +} +} +namespace ns4 { +namespace nsD { +struct A4 { }; +} +} +} +``` +## Generated PlantUML diagrams +![t00083_class](./t00083_class.svg "Test case for advanced diagram filter exclusion test with subclasses and namespaces") +## Generated Mermaid diagrams +![t00083_class](./t00083_class_mermaid.svg "Test case for advanced diagram filter exclusion test with subclasses and namespaces") +## Generated JSON models +```json +{ + "diagram_type": "class", + "elements": [ + { + "display_name": "ns1", + "elements": [ + { + "display_name": "nsA", + "elements": [ + { + "bases": [], + "display_name": "D1", + "id": "9216071282257341209", + "is_abstract": false, + "is_nested": false, + "is_struct": true, + "is_template": false, + "is_union": false, + "members": [], + "methods": [], + "name": "D1", + "namespace": "clanguml::t00083::ns1::nsA", + "source_location": { + "column": 8, + "file": "t00083.cc", + "line": 7, + "translation_unit": "t00083.cc" + }, + "template_parameters": [], + "type": "class" + } + ], + "name": "nsA", + "type": "namespace" + } + ], + "name": "ns1", + "type": "namespace" + }, + { + "display_name": "ns3", + "elements": [ + { + "display_name": "nsC", + "elements": [ + { + "bases": [], + "display_name": "D3", + "id": "1839346342710251347", + "is_abstract": false, + "is_nested": false, + "is_struct": true, + "is_template": false, + "is_union": false, + "members": [], + "methods": [], + "name": "D3", + "namespace": "clanguml::t00083::ns3::nsC", + "source_location": { + "column": 8, + "file": "t00083.cc", + "line": 22, + "translation_unit": "t00083.cc" + }, + "template_parameters": [], + "type": "class" + } + ], + "name": "nsC", + "type": "namespace" + } + ], + "name": "ns3", + "type": "namespace" + }, + { + "display_name": "ns4", + "elements": [ + { + "display_name": "nsD", + "elements": [ + { + "bases": [], + "display_name": "A4", + "id": "14002387352924575666", + "is_abstract": false, + "is_nested": false, + "is_struct": true, + "is_template": false, + "is_union": false, + "members": [], + "methods": [], + "name": "A4", + "namespace": "clanguml::t00083::ns4::nsD", + "source_location": { + "column": 8, + "file": "t00083.cc", + "line": 27, + "translation_unit": "t00083.cc" + }, + "template_parameters": [], + "type": "class" + } + ], + "name": "nsD", + "type": "namespace" + } + ], + "name": "ns4", + "type": "namespace" + } + ], + "name": "t00083_class", + "package_type": "namespace", + "relationships": [], + "using_namespace": "clanguml::t00083" +} +``` diff --git a/docs/test_cases/t00083_class.svg b/docs/test_cases/t00083_class.svg new file mode 100644 index 000000000..3c20b65e7 --- /dev/null +++ b/docs/test_cases/t00083_class.svg @@ -0,0 +1,67 @@ + + + + + + + + + ns1 + + + + + nsA + + + + + ns3 + + + + + nsC + + + + + ns4 + + + + + nsD + + + + + + + D1 + + + + + + + + + + D3 + + + + + + + + + + A4 + + + + + + diff --git a/docs/test_cases/t00083_class_mermaid.svg b/docs/test_cases/t00083_class_mermaid.svg new file mode 100644 index 000000000..785995835 --- /dev/null +++ b/docs/test_cases/t00083_class_mermaid.svg @@ -0,0 +1,115 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+ +
+ ns1::nsA::D1 +
+
+
+
+
+ + + + + + + +
+ +
+
+ +
+ ns3::nsC::D3 +
+
+
+
+
+ + + + + + + +
+ +
+
+ +
+ ns4::nsD::A4 +
+
+
+
+
+
+
+
+
diff --git a/docs/test_cases/t20001.md b/docs/test_cases/t20001.md index 56035514b..c0521939c 100644 --- a/docs/test_cases/t20001.md +++ b/docs/test_cases/t20001.md @@ -139,7 +139,7 @@ int tmain() "full_name": "clanguml::t20001::A::A()", "id": "2202827688275505167", "name": "A", - "namespace": "", + "namespace": "clanguml::t20001", "source_location": { "column": 5, "file": "t20001.cc", @@ -153,7 +153,7 @@ int tmain() "full_name": "clanguml::t20001::A::add(int,int)", "id": "9052399461707163220", "name": "add", - "namespace": "", + "namespace": "clanguml::t20001", "source_location": { "column": 9, "file": "t20001.cc", @@ -167,7 +167,7 @@ int tmain() "full_name": "clanguml::t20001::A::add3(int,int,int)", "id": "16723493083595356745", "name": "add3", - "namespace": "", + "namespace": "clanguml::t20001", "source_location": { "column": 9, "file": "t20001.cc", @@ -181,7 +181,7 @@ int tmain() "full_name": "clanguml::t20001::A::log_result(int)", "id": "9647581054471616782", "name": "log_result", - "namespace": "", + "namespace": "clanguml::t20001", "source_location": { "column": 17, "file": "t20001.cc", @@ -211,7 +211,7 @@ int tmain() "full_name": "clanguml::t20001::B::B(A &)", "id": "17883821270364000003", "name": "B", - "namespace": "", + "namespace": "clanguml::t20001", "source_location": { "column": 5, "file": "t20001.cc", @@ -225,7 +225,7 @@ int tmain() "full_name": "clanguml::t20001::B::wrap_add3(int,int,int)", "id": "5140401210585671495", "name": "wrap_add3", - "namespace": "", + "namespace": "clanguml::t20001", "source_location": { "column": 9, "file": "t20001.cc", diff --git a/docs/test_cases/t20001_sequence.svg b/docs/test_cases/t20001_sequence.svg index ff7126618..ef766111b 100644 --- a/docs/test_cases/t20001_sequence.svg +++ b/docs/test_cases/t20001_sequence.svg @@ -1,116 +1,110 @@ - + - - - - - - - Basic sequence diagram example - - - - - - - - - - - - - - - tmain() - - tmain() + Basic sequence diagram example + + + + + + + + + + + + + + + tmain() + + tmain() - - - A - - A + + + A + + A - - - B - - B + + + B + + B - - - - - - - - - - - - - A() + + + + + + + + + + + + + A() - - - - B(A &) + + + + B(A &) - - - Just add 2 numbers - - - - add(int,int) + + + Just add 2 numbers + + + + add(int,int) - - - - - And now add another 2 - - - - wrap_add3(int,int,int) + + + + + And now add another 2 + + + + wrap_add3(int,int,int) - - - - add3(int,int,int) + + + + add3(int,int,int) - - - - - - add(int,int) + + + + + + add(int,int) - - - - - - - - - - log_result(int) + + + + + + + + + + log_result(int) - - - - - - log_result(int) + + + + + + log_result(int) - - - - - Main test function + + + + + Main test function diff --git a/docs/test_cases/t20002.md b/docs/test_cases/t20002.md index dd9dac2e0..a2c99b467 100644 --- a/docs/test_cases/t20002.md +++ b/docs/test_cases/t20002.md @@ -17,10 +17,6 @@ diagrams: ## Source code File `tests/t20002/t20002.cc` ```cpp -#include -#include -#include - namespace clanguml { namespace t20002 { @@ -54,7 +50,7 @@ void m1() { m2(); } "source_location": { "column": 6, "file": "t20002.cc", - "line": 14, + "line": 10, "translation_unit": "t20002.cc" }, "type": "function" @@ -68,7 +64,7 @@ void m1() { m2(); } "source_location": { "column": 6, "file": "t20002.cc", - "line": 12, + "line": 8, "translation_unit": "t20002.cc" }, "type": "function" @@ -82,7 +78,7 @@ void m1() { m2(); } "source_location": { "column": 6, "file": "t20002.cc", - "line": 10, + "line": 6, "translation_unit": "t20002.cc" }, "type": "function" @@ -96,7 +92,7 @@ void m1() { m2(); } "source_location": { "column": 6, "file": "t20002.cc", - "line": 8, + "line": 4, "translation_unit": "t20002.cc" }, "type": "function" @@ -116,7 +112,7 @@ void m1() { m2(); } "source_location": { "column": 13, "file": "t20002.cc", - "line": 14, + "line": 10, "translation_unit": "t20002.cc" }, "to": { @@ -136,7 +132,7 @@ void m1() { m2(); } "source_location": { "column": 13, "file": "t20002.cc", - "line": 12, + "line": 8, "translation_unit": "t20002.cc" }, "to": { @@ -156,7 +152,7 @@ void m1() { m2(); } "source_location": { "column": 13, "file": "t20002.cc", - "line": 10, + "line": 6, "translation_unit": "t20002.cc" }, "to": { diff --git a/docs/test_cases/t20002_sequence.svg b/docs/test_cases/t20002_sequence.svg index b34b9618d..dcb90bdee 100644 --- a/docs/test_cases/t20002_sequence.svg +++ b/docs/test_cases/t20002_sequence.svg @@ -1,61 +1,55 @@ - + - - - - - - - - - - - - - - - - - m1() - - m1() + + + + + + + + + + + m1() + + m1() - - - m2() - - m2() + + + m2() + + m2() - - - m3() - - m3() + + + m3() + + m3() - - - m4() - - m4() + + + m4() + + m4() - - - - - - - + + + + + + + - - - + + + - - - + + + diff --git a/docs/test_cases/t20003_sequence.svg b/docs/test_cases/t20003_sequence.svg index fa81d6f60..026970a92 100644 --- a/docs/test_cases/t20003_sequence.svg +++ b/docs/test_cases/t20003_sequence.svg @@ -1,61 +1,55 @@ - + - - - - - - - - - - - - - - - - - m1<T>(T) - - m1<T>(T) + + + + + + + + + + + m1<T>(T) + + m1<T>(T) - - - m2<T>(T) - - m2<T>(T) + + + m2<T>(T) + + m2<T>(T) - - - m3<T>(T) - - m3<T>(T) + + + m3<T>(T) + + m3<T>(T) - - - m4<T>(T) - - m4<T>(T) + + + m4<T>(T) + + m4<T>(T) - - - - - - - + + + + + + + - - - + + + - - - + + + diff --git a/docs/test_cases/t20004_sequence.svg b/docs/test_cases/t20004_sequence.svg index b12c7030d..a4dd88c97 100644 --- a/docs/test_cases/t20004_sequence.svg +++ b/docs/test_cases/t20004_sequence.svg @@ -1,157 +1,151 @@ - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + 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) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/test_cases/t20005.md b/docs/test_cases/t20005.md index 0fd88dafe..6749b62ce 100644 --- a/docs/test_cases/t20005.md +++ b/docs/test_cases/t20005.md @@ -55,7 +55,7 @@ template struct C { "full_name": "clanguml::t20005::C::c(T)", "id": "4629750983723239790", "name": "c", - "namespace": "", + "namespace": "clanguml::t20005", "source_location": { "column": 7, "file": "t20005.cc", @@ -85,7 +85,7 @@ template struct C { "full_name": "clanguml::t20005::B::b(T)", "id": "6963731975199456942", "name": "b", - "namespace": "", + "namespace": "clanguml::t20005", "source_location": { "column": 7, "file": "t20005.cc", @@ -115,7 +115,7 @@ template struct C { "full_name": "clanguml::t20005::A::a(T)", "id": "998827646515229964", "name": "a", - "namespace": "", + "namespace": "clanguml::t20005", "source_location": { "column": 7, "file": "t20005.cc", diff --git a/docs/test_cases/t20005_sequence.svg b/docs/test_cases/t20005_sequence.svg index 7a7c61dfa..06e117e4b 100644 --- a/docs/test_cases/t20005_sequence.svg +++ b/docs/test_cases/t20005_sequence.svg @@ -1,59 +1,53 @@ - + - - - - - - - - - - - - - - - C<T> - - C<T> + + + + + + + + + C<T> + + C<T> - - - B<T> - - B<T> + + + B<T> + + B<T> - - - A<T> - - A<T> + + + A<T> + + A<T> - - - - - - c(T) - - - - b(T) + + + + + + c(T) + + + + b(T) - - - - a(T) + + + + a(T) - - - - - - + + + + + + diff --git a/docs/test_cases/t20006.md b/docs/test_cases/t20006.md index 242410327..1e9c93175 100644 --- a/docs/test_cases/t20006.md +++ b/docs/test_cases/t20006.md @@ -127,7 +127,7 @@ void tmain() "full_name": "clanguml::t20006::B::b(int)", "id": "2001977743110748701", "name": "b", - "namespace": "", + "namespace": "clanguml::t20006", "source_location": { "column": 7, "file": "t20006.cc", @@ -157,7 +157,7 @@ void tmain() "full_name": "clanguml::t20006::A::a1(int)", "id": "1571123903899165357", "name": "a1", - "namespace": "", + "namespace": "clanguml::t20006", "source_location": { "column": 7, "file": "t20006.cc", @@ -187,7 +187,7 @@ void tmain() "full_name": "clanguml::t20006::B::b(std::string)", "id": "104397060422969259", "name": "b", - "namespace": "", + "namespace": "clanguml::t20006::B::a2(std::string)", "id": "94100708992903256", "name": "a2", - "namespace": "", + "namespace": "clanguml::t20006::A::BB(AA *)", "id": "3053863014462091843", "name": "BB", - "namespace": "", + "namespace": "clanguml::t20006::BB::bb1(int,std::string)", "id": "8502992045696113005", "name": "bb1", - "namespace": "", + "namespace": "clanguml::t20006::BB::bb2(int,std::string)", "id": "6301641519958225878", "name": "bb2", - "namespace": "", + "namespace": "clanguml::t20006::BB::BB(AA &)", "id": "8408105624578590737", "name": "BB", - "namespace": "", + "namespace": "clanguml::t20006", "source_location": { "column": 5, "file": "t20006.cc", @@ -319,7 +319,7 @@ void tmain() "full_name": "clanguml::t20006::BB::bb1(int,float)", "id": "11705510764579885710", "name": "bb1", - "namespace": "", + "namespace": "clanguml::t20006", "source_location": { "column": 10, "file": "t20006.cc", @@ -333,7 +333,7 @@ void tmain() "full_name": "clanguml::t20006::BB::bb2(int,float)", "id": "5858901370635215228", "name": "bb2", - "namespace": "", + "namespace": "clanguml::t20006", "source_location": { "column": 10, "file": "t20006.cc", @@ -363,7 +363,7 @@ void tmain() "full_name": "clanguml::t20006::BB::bb1(int,int)", "id": "9710920974634781233", "name": "bb1", - "namespace": "", + "namespace": "clanguml::t20006", "source_location": { "column": 10, "file": "t20006.cc", @@ -377,7 +377,7 @@ void tmain() "full_name": "clanguml::t20006::BB::bb2(int,int)", "id": "2893200991334342837", "name": "bb2", - "namespace": "", + "namespace": "clanguml::t20006", "source_location": { "column": 10, "file": "t20006.cc", @@ -407,7 +407,7 @@ void tmain() "full_name": "clanguml::t20006::AA::aa1(int)", "id": "9883425311925361535", "name": "aa1", - "namespace": "", + "namespace": "clanguml::t20006", "source_location": { "column": 10, "file": "t20006.cc", @@ -421,7 +421,7 @@ void tmain() "full_name": "clanguml::t20006::AA::aa2(int)", "id": "4656782618682138323", "name": "aa2", - "namespace": "", + "namespace": "clanguml::t20006", "source_location": { "column": 10, "file": "t20006.cc", diff --git a/docs/test_cases/t20006_sequence.svg b/docs/test_cases/t20006_sequence.svg index e89558788..fcef88bd9 100644 --- a/docs/test_cases/t20006_sequence.svg +++ b/docs/test_cases/t20006_sequence.svg @@ -1,207 +1,201 @@ - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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) - - - - - - - - - b(std::string) - - - - - a2(std::string) - - - - - - - - - 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) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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) + + + + + + + + + b(std::string) + + + + + a2(std::string) + + + + + + + + + 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 504fbe1d6..0e6f3181c 100644 --- a/docs/test_cases/t20007.md +++ b/docs/test_cases/t20007.md @@ -73,7 +73,7 @@ void tmain() "full_name": "clanguml::t20007::Adder::add(int &&,int &&)", "id": "3505069753658152525", "name": "add", - "namespace": "", + "namespace": "clanguml::t20007", "source_location": { "column": 11, "file": "t20007.cc", @@ -103,7 +103,7 @@ void tmain() "full_name": "clanguml::t20007::Adder::add(int &&,float &&,double &&)", "id": "76181798141510966", "name": "add", - "namespace": "", + "namespace": "clanguml::t20007", "source_location": { "column": 11, "file": "t20007.cc", @@ -133,7 +133,7 @@ void tmain() "full_name": "clanguml::t20007::Adder::add(std::string &&,std::string &&,std::string &&)", "id": "3078933128343531840", "name": "add", - "namespace": "", + "namespace": "clanguml::t20007::Adder, std::basic_string, std", "source_location": { "column": 11, "file": "t20007.cc", diff --git a/docs/test_cases/t20007_sequence.svg b/docs/test_cases/t20007_sequence.svg index d7c4191e7..2c59aed49 100644 --- a/docs/test_cases/t20007_sequence.svg +++ b/docs/test_cases/t20007_sequence.svg @@ -1,70 +1,64 @@ - + - - - - - - - - - - - - - - - - - tmain() - - tmain() + + + + + + + + + + + tmain() + + tmain() - - - Adder<int,int> - - Adder<int,int> + + + Adder<int,int> + + Adder<int,int> - - - Adder<int,float,double> - - Adder<int,float,double> + + + Adder<int,float,double> + + Adder<int,float,double> - - - Adder<std::string,std::string,std::string> - - Adder<std::string,std::string,std::string> + + + Adder<std::string,std::string,std::string> + + Adder<std::string,std::string,std::string> - - - - - - - - add(int &&,int &&) + + + + + + + + add(int &&,int &&) - - - - - - add(int &&,float &&,double &&) + + + + + + add(int &&,float &&,double &&) - - - - - - add(std::string &&,std::string &&,std::string &&) + + + + + + add(std::string &&,std::string &&,std::string &&) - - + + diff --git a/docs/test_cases/t20008.md b/docs/test_cases/t20008.md index df4394c2a..a0e14f913 100644 --- a/docs/test_cases/t20008.md +++ b/docs/test_cases/t20008.md @@ -91,7 +91,7 @@ void tmain() "full_name": "clanguml::t20008::B::b(int)", "id": "3038801163496409516", "name": "b", - "namespace": "", + "namespace": "clanguml::t20008", "source_location": { "column": 10, "file": "t20008.cc", @@ -121,7 +121,7 @@ void tmain() "full_name": "clanguml::t20008::A::a1(int)", "id": "16530909041397157752", "name": "a1", - "namespace": "", + "namespace": "clanguml::t20008", "source_location": { "column": 10, "file": "t20008.cc", @@ -151,7 +151,7 @@ void tmain() "full_name": "clanguml::t20008::B::b(const char *)", "id": "10777300187853102245", "name": "b", - "namespace": "", + "namespace": "clanguml::t20008", "source_location": { "column": 10, "file": "t20008.cc", @@ -181,7 +181,7 @@ void tmain() "full_name": "clanguml::t20008::A::a2(const char *)", "id": "5749206679698204640", "name": "a2", - "namespace": "", + "namespace": "clanguml::t20008", "source_location": { "column": 10, "file": "t20008.cc", @@ -211,7 +211,7 @@ void tmain() "full_name": "clanguml::t20008::B::b(std::string)", "id": "10291287573335610033", "name": "b", - "namespace": "", + "namespace": "clanguml::t20008::B::a3(std::string)", "id": "11236753976809109901", "name": "a3", - "namespace": "", + "namespace": "clanguml::t20008::A + - - - - - - - - - - - - - - - - - - - - - - - tmain() - - tmain() + + + + + + + + + + + + + + + + + tmain() + + tmain() - - - B<int> - - B<int> + + + B<int> + + B<int> - - - A<int> - - A<int> + + + A<int> + + A<int> - - - B<const char *> - - B<const char *> + + + B<const char *> + + B<const char *> - - - A<const char *> - - A<const char *> + + + A<const char *> + + A<const char *> - - - B<std::string> - - B<std::string> + + + B<std::string> + + B<std::string> - - - A<std::string> - - A<std::string> + + + A<std::string> + + A<std::string> - - - - - - - - - - - b(int) + + + + + + + + + + + b(int) - - - - a1(int) + + + + a1(int) - - - - b(const char *) + + + + b(const char *) - - - - a2(const char *) + + + + a2(const char *) - - - - b(std::string) + + + + b(std::string) - - - - a3(std::string) + + + + a3(std::string) diff --git a/docs/test_cases/t20009.md b/docs/test_cases/t20009.md index 4343a636e..cee5e7c1f 100644 --- a/docs/test_cases/t20009.md +++ b/docs/test_cases/t20009.md @@ -77,7 +77,7 @@ void tmain() "full_name": "clanguml::t20009::B::b(std::string)", "id": "15682131055272727033", "name": "b", - "namespace": "", + "namespace": "clanguml::t20009::B::a(std::string)", "id": "13734206775742090288", "name": "a", - "namespace": "", + "namespace": "clanguml::t20009::A::b(int)", "id": "5284463427193629079", "name": "b", - "namespace": "", + "namespace": "clanguml::t20009", "source_location": { "column": 10, "file": "t20009.cc", @@ -167,7 +167,7 @@ void tmain() "full_name": "clanguml::t20009::A::a(int)", "id": "16245035638486440742", "name": "a", - "namespace": "", + "namespace": "clanguml::t20009", "source_location": { "column": 10, "file": "t20009.cc", @@ -197,7 +197,7 @@ void tmain() "full_name": "clanguml::t20009::B::b(float)", "id": "2942441305084666258", "name": "b", - "namespace": "", + "namespace": "clanguml::t20009", "source_location": { "column": 10, "file": "t20009.cc", @@ -227,7 +227,7 @@ void tmain() "full_name": "clanguml::t20009::A::a(float)", "id": "13149871291924650350", "name": "a", - "namespace": "", + "namespace": "clanguml::t20009", "source_location": { "column": 10, "file": "t20009.cc", diff --git a/docs/test_cases/t20009_sequence.svg b/docs/test_cases/t20009_sequence.svg index 637606049..93bca68ff 100644 --- a/docs/test_cases/t20009_sequence.svg +++ b/docs/test_cases/t20009_sequence.svg @@ -1,106 +1,100 @@ - + - - - - - - - - - - - - - - - - - - - - - - - tmain() - - tmain() + + + + + + + + + + + + + + + + + tmain() + + tmain() - - - B<std::string> - - B<std::string> + + + B<std::string> + + B<std::string> - - - A<std::string> - - A<std::string> + + + A<std::string> + + A<std::string> - - - B<int> - - B<int> + + + B<int> + + B<int> - - - A<int> - - A<int> + + + A<int> + + A<int> - - - B<float> - - B<float> + + + B<float> + + B<float> - - - A<float> - - A<float> + + + A<float> + + A<float> - - - - - - - - - - - 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) diff --git a/docs/test_cases/t20010.md b/docs/test_cases/t20010.md index a75435e93..3906a9ad7 100644 --- a/docs/test_cases/t20010.md +++ b/docs/test_cases/t20010.md @@ -87,7 +87,7 @@ void tmain() "full_name": "clanguml::t20010::B::b1()", "id": "2749008487419934688", "name": "b1", - "namespace": "", + "namespace": "clanguml::t20010", "source_location": { "column": 10, "file": "t20010.cc", @@ -101,7 +101,7 @@ void tmain() "full_name": "clanguml::t20010::B::b2()", "id": "13064248908824496351", "name": "b2", - "namespace": "", + "namespace": "clanguml::t20010", "source_location": { "column": 10, "file": "t20010.cc", @@ -115,7 +115,7 @@ void tmain() "full_name": "clanguml::t20010::B::b3()", "id": "6289748349234477538", "name": "b3", - "namespace": "", + "namespace": "clanguml::t20010", "source_location": { "column": 10, "file": "t20010.cc", @@ -129,7 +129,7 @@ void tmain() "full_name": "clanguml::t20010::B::b4()", "id": "14928551723181621328", "name": "b4", - "namespace": "", + "namespace": "clanguml::t20010", "source_location": { "column": 10, "file": "t20010.cc", @@ -159,7 +159,7 @@ void tmain() "full_name": "clanguml::t20010::A::a1()", "id": "7849477454619758807", "name": "a1", - "namespace": "", + "namespace": "clanguml::t20010", "source_location": { "column": 10, "file": "t20010.cc", @@ -173,7 +173,7 @@ void tmain() "full_name": "clanguml::t20010::A::a2()", "id": "5314967045057172736", "name": "a2", - "namespace": "", + "namespace": "clanguml::t20010", "source_location": { "column": 10, "file": "t20010.cc", @@ -187,7 +187,7 @@ void tmain() "full_name": "clanguml::t20010::A::a3()", "id": "17165914358584127192", "name": "a3", - "namespace": "", + "namespace": "clanguml::t20010", "source_location": { "column": 10, "file": "t20010.cc", @@ -201,7 +201,7 @@ void tmain() "full_name": "clanguml::t20010::A::a4()", "id": "9799491886675206575", "name": "a4", - "namespace": "", + "namespace": "clanguml::t20010", "source_location": { "column": 10, "file": "t20010.cc", diff --git a/docs/test_cases/t20010_sequence.svg b/docs/test_cases/t20010_sequence.svg index c93d0c71a..e8ada750e 100644 --- a/docs/test_cases/t20010_sequence.svg +++ b/docs/test_cases/t20010_sequence.svg @@ -1,92 +1,86 @@ - + - - - - - - - - - - - - - - - - - - - - - tmain() - - tmain() + + + + + + + + + + + + + + + tmain() + + tmain() - - - B<int> - - B<int> + + + B<int> + + B<int> - - - A - - A + + + A + + A - - - - - - - - - - - - - b1() + + + + + + + + + + + + + b1() - - - - a1() + + + + a1() - - - - b2() + + + + b2() - - - - a2() + + + + a2() - - - - b3() + + + + b3() - - - - a3() + + + + a3() - - - - b4() + + + + b4() - - - - a4() + + + + a4() diff --git a/docs/test_cases/t20011.md b/docs/test_cases/t20011.md index 2b51a4fd8..bebd49555 100644 --- a/docs/test_cases/t20011.md +++ b/docs/test_cases/t20011.md @@ -79,7 +79,7 @@ void tmain() "full_name": "clanguml::t20011::A::a(int)", "id": "13180626094721633652", "name": "a", - "namespace": "", + "namespace": "clanguml::t20011", "source_location": { "column": 10, "file": "t20011.cc", @@ -93,7 +93,7 @@ void tmain() "full_name": "clanguml::t20011::A::b(int)", "id": "2443649406551003360", "name": "b", - "namespace": "", + "namespace": "clanguml::t20011", "source_location": { "column": 10, "file": "t20011.cc", @@ -107,7 +107,7 @@ void tmain() "full_name": "clanguml::t20011::A::c(int)", "id": "7706149376639209694", "name": "c", - "namespace": "", + "namespace": "clanguml::t20011", "source_location": { "column": 10, "file": "t20011.cc", @@ -121,7 +121,7 @@ void tmain() "full_name": "clanguml::t20011::A::d(int)", "id": "14994494098144009100", "name": "d", - "namespace": "", + "namespace": "clanguml::t20011", "source_location": { "column": 10, "file": "t20011.cc", diff --git a/docs/test_cases/t20011_sequence.svg b/docs/test_cases/t20011_sequence.svg index c496717d1..88e5d7f87 100644 --- a/docs/test_cases/t20011_sequence.svg +++ b/docs/test_cases/t20011_sequence.svg @@ -1,109 +1,103 @@ - + - - - - - - - - - - - - - - - - - - - - - - - tmain() - - tmain() + + + + + + + + + + + + + + + + + tmain() + + tmain() - - - A - - A + + + A + + A - - - - - - - - - - - - - a(int) + + + + + + + + + + + + + a(int) - - - alt - - - - - - a(int) + + + alt + + + + + + a(int) - - - - b(int) + + + + b(int) - - - - - - c(int) + + + + + + c(int) - - - - - - d(int) + + + + + + d(int) - - - alt - - - - - - b(int) + + + alt + + + + + + b(int) - - - - - - a(int) + + + + + + a(int) - - - alt - - - - - - a(int) + + + alt + + + + + + a(int) diff --git a/docs/test_cases/t20012.md b/docs/test_cases/t20012.md index 66af06a15..8801f65e9 100644 --- a/docs/test_cases/t20012.md +++ b/docs/test_cases/t20012.md @@ -154,7 +154,7 @@ void tmain() "full_name": "clanguml::t20012::tmain()::(lambda t20012.cc:67:20)::operator()() const", "id": "6759540437739180205", "name": "operator()", - "namespace": "", + "namespace": "clanguml::t20012::tmain()", "type": "method" } ], @@ -178,7 +178,7 @@ void tmain() "full_name": "clanguml::t20012::A::a()", "id": "14971463461955991809", "name": "a", - "namespace": "", + "namespace": "clanguml::t20012", "source_location": { "column": 10, "file": "t20012.cc", @@ -192,7 +192,7 @@ void tmain() "full_name": "clanguml::t20012::A::aa()", "id": "8807464314831012313", "name": "aa", - "namespace": "", + "namespace": "clanguml::t20012", "source_location": { "column": 10, "file": "t20012.cc", @@ -206,7 +206,7 @@ void tmain() "full_name": "clanguml::t20012::A::aaa()", "id": "7533089486589535184", "name": "aaa", - "namespace": "", + "namespace": "clanguml::t20012", "source_location": { "column": 10, "file": "t20012.cc", @@ -236,7 +236,7 @@ void tmain() "full_name": "clanguml::t20012::B::b()", "id": "17141579283082165068", "name": "b", - "namespace": "", + "namespace": "clanguml::t20012", "source_location": { "column": 10, "file": "t20012.cc", @@ -250,7 +250,7 @@ void tmain() "full_name": "clanguml::t20012::B::bb()", "id": "7789746726279450510", "name": "bb", - "namespace": "", + "namespace": "clanguml::t20012", "source_location": { "column": 10, "file": "t20012.cc", @@ -264,7 +264,7 @@ void tmain() "full_name": "clanguml::t20012::B::bbb()", "id": "1566308232035027228", "name": "bbb", - "namespace": "", + "namespace": "clanguml::t20012", "source_location": { "column": 10, "file": "t20012.cc", @@ -294,7 +294,7 @@ void tmain() "full_name": "clanguml::t20012::tmain()::(lambda t20012.cc:80:20)::operator()() const", "id": "16646942837642819925", "name": "operator()", - "namespace": "", + "namespace": "clanguml::t20012::tmain()", "type": "method" } ], @@ -318,7 +318,7 @@ void tmain() "full_name": "clanguml::t20012::C::c()", "id": "5402955322545804857", "name": "c", - "namespace": "", + "namespace": "clanguml::t20012", "source_location": { "column": 10, "file": "t20012.cc", @@ -332,7 +332,7 @@ void tmain() "full_name": "clanguml::t20012::C::cc()", "id": "11614573634522688457", "name": "cc", - "namespace": "", + "namespace": "clanguml::t20012", "source_location": { "column": 10, "file": "t20012.cc", @@ -346,7 +346,7 @@ void tmain() "full_name": "clanguml::t20012::C::ccc()", "id": "15649131270396803681", "name": "ccc", - "namespace": "", + "namespace": "clanguml::t20012", "source_location": { "column": 10, "file": "t20012.cc", @@ -376,7 +376,7 @@ void tmain() "full_name": "clanguml::t20012::R<(lambda at t20012.cc:86:9)>::R((lambda at t20012.cc:86:9) &&)", "id": "15809459607902663419", "name": "R", - "namespace": "", + "namespace": "clanguml::t20012", "source_location": { "column": 5, "file": "t20012.cc", @@ -390,7 +390,7 @@ void tmain() "full_name": "clanguml::t20012::R<(lambda at t20012.cc:86:9)>::r()", "id": "13023711539577727870", "name": "r", - "namespace": "", + "namespace": "clanguml::t20012", "source_location": { "column": 10, "file": "t20012.cc", @@ -420,7 +420,7 @@ void tmain() "full_name": "clanguml::t20012::tmain()::(lambda t20012.cc:86:9)::operator()() const", "id": "7980939503032938975", "name": "operator()", - "namespace": "", + "namespace": "clanguml::t20012::tmain()", "type": "method" } ], @@ -444,7 +444,7 @@ void tmain() "full_name": "clanguml::t20012::tmain()::(lambda t20012.cc:94:9)::operator()(auto) const", "id": "13006452698713945708", "name": "operator()", - "namespace": "", + "namespace": "clanguml::t20012::tmain()", "type": "method" } ], @@ -468,7 +468,7 @@ void tmain() "full_name": "clanguml::t20012::D::add5(int) const", "id": "3032548472559015070", "name": "add5", - "namespace": "", + "namespace": "clanguml::t20012", "source_location": { "column": 9, "file": "t20012.cc", diff --git a/docs/test_cases/t20012_sequence.svg b/docs/test_cases/t20012_sequence.svg index 6fe3e948c..7cd1e73a6 100644 --- a/docs/test_cases/t20012_sequence.svg +++ b/docs/test_cases/t20012_sequence.svg @@ -1,295 +1,289 @@ - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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<(lambda at t20012.cc:86:9)> - - R<(lambda at t20012.cc:86:9)> - - - - tmain()::(lambda t20012.cc:86:9) - - tmain()::(lambda t20012.cc:86:9) - - - - tmain()::(lambda t20012.cc:94:9) - - tmain()::(lambda t20012.cc:94:9) - - - - D - - D - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - operator()() const - - - - - a() - - - - - - - aa() - - - - - - - aaa() - - - - - b() - - - - - - - bb() - - - - - - - bbb() - - - - - operator()() const - - - - - c() - - - - - - - cc() - - - - - - - ccc() - - - - - operator()() const - - - - - a() - - - - - - - aa() - - - - - - - aaa() - - - - - b() - - - - - - - bb() - - - - - - - bbb() - - - - - R((lambda at t20012.cc:86:9) &&) - - - - - r() - - - - - operator()() const - - - - - c() - - - - - - - cc() - - - - - - - ccc() - - - - - operator()(auto) const - - - - - add5(int) const - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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<(lambda at t20012.cc:86:9)> + + R<(lambda at t20012.cc:86:9)> + + + + tmain()::(lambda t20012.cc:86:9) + + tmain()::(lambda t20012.cc:86:9) + + + + tmain()::(lambda t20012.cc:94:9) + + tmain()::(lambda t20012.cc:94:9) + + + + D + + D + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + operator()() const + + + + + a() + + + + + + + aa() + + + + + + + aaa() + + + + + b() + + + + + + + bb() + + + + + + + bbb() + + + + + operator()() const + + + + + c() + + + + + + + cc() + + + + + + + ccc() + + + + + operator()() const + + + + + a() + + + + + + + aa() + + + + + + + aaa() + + + + + b() + + + + + + + bb() + + + + + + + bbb() + + + + + R((lambda at t20012.cc:86:9) &&) + + + + + r() + + + + + operator()() const + + + + + c() + + + + + + + cc() + + + + + + + ccc() + + + + + operator()(auto) const + + + + + add5(int) const + + + + + diff --git a/docs/test_cases/t20013.md b/docs/test_cases/t20013.md index 3f89af6e6..adcbb1d6a 100644 --- a/docs/test_cases/t20013.md +++ b/docs/test_cases/t20013.md @@ -75,7 +75,7 @@ void tmain(int argc, char **argv) "full_name": "clanguml::t20013::B::b(int)", "id": "17158432866189463946", "name": "b", - "namespace": "", + "namespace": "clanguml::t20013", "source_location": { "column": 9, "file": "t20013.cc", @@ -89,7 +89,7 @@ void tmain(int argc, char **argv) "full_name": "clanguml::t20013::B::b(double)", "id": "5125983075889322302", "name": "b", - "namespace": "", + "namespace": "clanguml::t20013", "source_location": { "column": 12, "file": "t20013.cc", @@ -103,7 +103,7 @@ void tmain(int argc, char **argv) "full_name": "clanguml::t20013::B::b(const char *)", "id": "8535486994915273137", "name": "b", - "namespace": "", + "namespace": "clanguml::t20013", "source_location": { "column": 17, "file": "t20013.cc", @@ -133,7 +133,7 @@ void tmain(int argc, char **argv) "full_name": "clanguml::t20013::A::a1(int)", "id": "8272218263536264033", "name": "a1", - "namespace": "", + "namespace": "clanguml::t20013", "source_location": { "column": 9, "file": "t20013.cc", @@ -147,7 +147,7 @@ void tmain(int argc, char **argv) "full_name": "clanguml::t20013::A::a2(double)", "id": "3152427199126511320", "name": "a2", - "namespace": "", + "namespace": "clanguml::t20013", "source_location": { "column": 12, "file": "t20013.cc", @@ -161,7 +161,7 @@ void tmain(int argc, char **argv) "full_name": "clanguml::t20013::A::a3(const char *)", "id": "14729914571966940889", "name": "a3", - "namespace": "", + "namespace": "clanguml::t20013", "source_location": { "column": 17, "file": "t20013.cc", diff --git a/docs/test_cases/t20013_sequence.svg b/docs/test_cases/t20013_sequence.svg index e840fbb88..86cc18a4f 100644 --- a/docs/test_cases/t20013_sequence.svg +++ b/docs/test_cases/t20013_sequence.svg @@ -1,90 +1,84 @@ - + - - - - - - - - - - - - - - - - - - - tmain(int,char **) - - tmain(int,char **) + + + + + + + + + + + + + tmain(int,char **) + + tmain(int,char **) - - - B - - B + + + B + + B - - - A - - A + + + A + + A - - - - - - - - - - - b(int) + + + + + + + + + + + b(int) - - - - a1(int) + + + + a1(int) - - - - - - - - b(double) + + + + + + + + b(double) - - - - a2(double) + + + + a2(double) - - - - - - - - b(const char *) + + + + + + + + b(const char *) - - - - a3(const char *) + + + + a3(const char *) - - - - + + + + diff --git a/docs/test_cases/t20014.md b/docs/test_cases/t20014.md index d736ffcc9..f875ab3cd 100644 --- a/docs/test_cases/t20014.md +++ b/docs/test_cases/t20014.md @@ -174,7 +174,7 @@ struct A { "full_name": "clanguml::t20014::B::b1(int,int)", "id": "10013068573692627454", "name": "b1", - "namespace": "", + "namespace": "clanguml::t20014", "source_location": { "column": 9, "file": "include/t20014_b.h", @@ -188,7 +188,7 @@ struct A { "full_name": "clanguml::t20014::B::b2(int,int)", "id": "6142647733715039933", "name": "b2", - "namespace": "", + "namespace": "clanguml::t20014", "source_location": { "column": 9, "file": "include/t20014_b.h", @@ -218,7 +218,7 @@ struct A { "full_name": "clanguml::t20014::A::a1(int,int)", "id": "14029463584885676935", "name": "a1", - "namespace": "", + "namespace": "clanguml::t20014", "source_location": { "column": 9, "file": "include/t20014_a.h", @@ -232,7 +232,7 @@ struct A { "full_name": "clanguml::t20014::A::a2(int,int)", "id": "15547896709391301559", "name": "a2", - "namespace": "", + "namespace": "clanguml::t20014", "source_location": { "column": 9, "file": "include/t20014_a.h", @@ -262,7 +262,7 @@ struct A { "full_name": "clanguml::t20014::C::c1(int,int)", "id": "3260472307220511850", "name": "c1", - "namespace": "", + "namespace": "clanguml::t20014::C + - - - - - - - - - - - - - - - - - - - - - tmain() - - tmain() + + + + + + + + + + + + + + + tmain() + + tmain() - - - B - - B + + + B + + B - - - A - - A + + + A + + A - - - C<B,int> - - C<B,int> + + + C<B,int> + + C<B,int> - - - - - - - - - - - - b1(int,int) + + + + + + + + + + + + b1(int,int) - - - - a1(int,int) + + + + a1(int,int) - - - - - - - - b2(int,int) + + + + + + + + b2(int,int) - - - - a2(int,int) + + + + a2(int,int) - - - - - - - - c1(int,int) + + + + + + + + c1(int,int) - - - - b1(int,int) + + + + b1(int,int) - - - - a1(int,int) + + + + a1(int,int) - - - - - - + + + + + + diff --git a/docs/test_cases/t20015.md b/docs/test_cases/t20015.md index 56a234229..d8793658c 100644 --- a/docs/test_cases/t20015.md +++ b/docs/test_cases/t20015.md @@ -91,7 +91,7 @@ void tmain() "full_name": "clanguml::t20015::B::setup_a(std::shared_ptr &)", "id": "3452606179190376485", "name": "setup_a", - "namespace": "", + "namespace": "clanguml::t20015", "source_location": { "column": 10, "file": "t20015.cc", diff --git a/docs/test_cases/t20015_sequence.svg b/docs/test_cases/t20015_sequence.svg index 8441ed95d..4ee62ea18 100644 --- a/docs/test_cases/t20015_sequence.svg +++ b/docs/test_cases/t20015_sequence.svg @@ -1,36 +1,30 @@ - + - - - - - - - - - - - - - tmain() - - tmain() + + + + + + + tmain() + + tmain() - - - B - - B + + + B + + B - - - - - - setup_a(std::shared_ptr<detail::A> &) + + + + + + setup_a(std::shared_ptr<detail::A> &) diff --git a/docs/test_cases/t20016.md b/docs/test_cases/t20016.md index b241db63d..8c86edec7 100644 --- a/docs/test_cases/t20016.md +++ b/docs/test_cases/t20016.md @@ -73,7 +73,7 @@ void tmain() "full_name": "clanguml::t20016::B::b1(long)", "id": "16514117681429778095", "name": "b1", - "namespace": "", + "namespace": "clanguml::t20016", "source_location": { "column": 10, "file": "t20016.cc", @@ -87,7 +87,7 @@ void tmain() "full_name": "clanguml::t20016::B::b2(long)", "id": "1627049121504654829", "name": "b2", - "namespace": "", + "namespace": "clanguml::t20016", "source_location": { "column": 29, "file": "t20016.cc", @@ -117,7 +117,7 @@ void tmain() "full_name": "clanguml::t20016::A::a1(int)", "id": "9586968971391540342", "name": "a1", - "namespace": "", + "namespace": "clanguml::t20016", "source_location": { "column": 10, "file": "t20016.cc", @@ -131,7 +131,7 @@ void tmain() "full_name": "clanguml::t20016::A::a2(const long &)", "id": "9670277356243041331", "name": "a2", - "namespace": "", + "namespace": "clanguml::t20016", "source_location": { "column": 29, "file": "t20016.cc", diff --git a/docs/test_cases/t20016_sequence.svg b/docs/test_cases/t20016_sequence.svg index 98522234a..7f0f384f9 100644 --- a/docs/test_cases/t20016_sequence.svg +++ b/docs/test_cases/t20016_sequence.svg @@ -1,68 +1,62 @@ - + - - - - - - - - - - - - - - - - - tmain() - - tmain() + + + + + + + + + + + tmain() + + tmain() - - - B<long> - - B<long> + + + B<long> + + B<long> - - - A - - A + + + A + + A - - - - - - - - - b1(long) + + + + + + + + + b1(long) - - - - a1(int) + + + + a1(int) - - - - b2(long) + + + + b2(long) - - - - a2(const long &) + + + + a2(const long &) - - - - + + + + diff --git a/docs/test_cases/t20017_sequence.svg b/docs/test_cases/t20017_sequence.svg index 15be414f8..f6e23cf48 100644 --- a/docs/test_cases/t20017_sequence.svg +++ b/docs/test_cases/t20017_sequence.svg @@ -1,80 +1,74 @@ - + - - - - - - - - - - - - - - - - - t20017.cc - - t20017.cc - - include/t20017_a.h - - include/t20017_a.h - - include/t20017_b.h - - include/t20017_b.h - - - - - - - - - tmain() - - - - a3(int,int) + + + + + + + + + + + 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) + + + + + + b1(int,int) - - - - - - a2(int,int) + + + + + + a2(int,int) - - - - - - a1(int,int) + + + + + + a1(int,int) - - - - - - b2<int>(int,int) + + + + + + b2<int>(int,int) - - - - + + + + diff --git a/docs/test_cases/t20018.md b/docs/test_cases/t20018.md index a7d1b3526..9fde91b98 100644 --- a/docs/test_cases/t20018.md +++ b/docs/test_cases/t20018.md @@ -75,7 +75,7 @@ void tmain() { Answer>::print(); } "full_name": "clanguml::t20018::Answer,120>::print()", "id": "9486166129914439617", "name": "print", - "namespace": "", + "namespace": "clanguml::t20018::Answer>::print(); } "full_name": "clanguml::t20018::Factorial<5>::print(int)", "id": "6664807107626395688", "name": "print", - "namespace": "", + "namespace": "clanguml::t20018", "source_location": { "column": 17, "file": "t20018.cc", @@ -135,7 +135,7 @@ void tmain() { Answer>::print(); } "full_name": "clanguml::t20018::Factorial<4>::print(int)", "id": "14260693150511929978", "name": "print", - "namespace": "", + "namespace": "clanguml::t20018", "source_location": { "column": 17, "file": "t20018.cc", @@ -165,7 +165,7 @@ void tmain() { Answer>::print(); } "full_name": "clanguml::t20018::Factorial<3>::print(int)", "id": "9904624228765893427", "name": "print", - "namespace": "", + "namespace": "clanguml::t20018", "source_location": { "column": 17, "file": "t20018.cc", @@ -195,7 +195,7 @@ void tmain() { Answer>::print(); } "full_name": "clanguml::t20018::Factorial<2>::print(int)", "id": "17306167603803814242", "name": "print", - "namespace": "", + "namespace": "clanguml::t20018", "source_location": { "column": 17, "file": "t20018.cc", @@ -225,7 +225,7 @@ void tmain() { Answer>::print(); } "full_name": "clanguml::t20018::Factorial<1>::print(int)", "id": "4009328130607501361", "name": "print", - "namespace": "", + "namespace": "clanguml::t20018", "source_location": { "column": 17, "file": "t20018.cc", @@ -255,7 +255,7 @@ void tmain() { Answer>::print(); } "full_name": "clanguml::t20018::Factorial<0>::print(int)", "id": "4617862618819132358", "name": "print", - "namespace": "", + "namespace": "clanguml::t20018", "source_location": { "column": 17, "file": "t20018.cc", diff --git a/docs/test_cases/t20018_sequence.svg b/docs/test_cases/t20018_sequence.svg index 25a6a9f55..9563772e9 100644 --- a/docs/test_cases/t20018_sequence.svg +++ b/docs/test_cases/t20018_sequence.svg @@ -1,120 +1,114 @@ - + - - - - - - - - - - - - - - - - - - - - - - - - - tmain() - - tmain() + + + + + + + + + + + + + + + + + + + tmain() + + tmain() - - - Answer<Factorial<5>,120> - - Answer<Factorial<5>,120> + + + Answer<Factorial<5>,120> + + Answer<Factorial<5>,120> - - - Factorial<5> - - Factorial<5> + + + Factorial<5> + + Factorial<5> - - - Factorial<4> - - Factorial<4> + + + Factorial<4> + + Factorial<4> - - - Factorial<3> - - Factorial<3> + + + Factorial<3> + + Factorial<3> - - - Factorial<2> - - Factorial<2> + + + Factorial<2> + + Factorial<2> - - - Factorial<1> - - Factorial<1> + + + Factorial<1> + + Factorial<1> - - - Factorial<0> - - Factorial<0> + + + Factorial<0> + + Factorial<0> - - - - - - - - - - - - print() + + + + + + + + + + + + print() - - - - print(int) + + + + print(int) - - - - print(int) + + + + print(int) - - - - print(int) + + + + print(int) - - - - 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 c0eefe21d..b6835793e 100644 --- a/docs/test_cases/t20019.md +++ b/docs/test_cases/t20019.md @@ -82,7 +82,7 @@ void tmain() "full_name": "clanguml::t20019::Base::name()", "id": "8310828377091739211", "name": "name", - "namespace": "", + "namespace": "clanguml::t20019::Base::name()", "id": "15349383653409402924", "name": "name", - "namespace": "", + "namespace": "clanguml::t20019::Base + - - - - - - - - - - - - - - - - - - - - - - - tmain() - - tmain() + + + + + + + + + + + + + + + + + tmain() + + tmain() - - - Base<D1> - - Base<D1> + + + Base<D1> + + Base<D1> - - - D1 - - D1 + + + D1 + + D1 - - - Base<D2> - - Base<D2> + + + Base<D2> + + Base<D2> - - - D2 - - D2 + + + D2 + + D2 - - - - - - - - - - - - - name() + + + + + + + + + + + + + name() - - - - impl() + + + + impl() - - - - name() + + + + name() - - - - impl() + + + + impl() - - - - name() + + + + name() - - - - impl() + + + + impl() - - - - name() + + + + name() - - - - impl() + + + + impl() diff --git a/docs/test_cases/t20020.md b/docs/test_cases/t20020.md index e636fe449..af8401b0e 100644 --- a/docs/test_cases/t20020.md +++ b/docs/test_cases/t20020.md @@ -138,7 +138,7 @@ int tmain() "full_name": "clanguml::t20020::A::a1()", "id": "351429406124277608", "name": "a1", - "namespace": "", + "namespace": "clanguml::t20020", "source_location": { "column": 9, "file": "t20020.cc", @@ -152,7 +152,7 @@ int tmain() "full_name": "clanguml::t20020::A::a5()", "id": "12907657969785462610", "name": "a5", - "namespace": "", + "namespace": "clanguml::t20020", "source_location": { "column": 9, "file": "t20020.cc", @@ -166,7 +166,7 @@ int tmain() "full_name": "clanguml::t20020::A::a2()", "id": "10317962018325505121", "name": "a2", - "namespace": "", + "namespace": "clanguml::t20020", "source_location": { "column": 9, "file": "t20020.cc", @@ -180,7 +180,7 @@ int tmain() "full_name": "clanguml::t20020::A::a3()", "id": "15869285436437359185", "name": "a3", - "namespace": "", + "namespace": "clanguml::t20020", "source_location": { "column": 9, "file": "t20020.cc", @@ -194,7 +194,7 @@ int tmain() "full_name": "clanguml::t20020::A::a4()", "id": "164585591999830934", "name": "a4", - "namespace": "", + "namespace": "clanguml::t20020", "source_location": { "column": 9, "file": "t20020.cc", @@ -224,7 +224,7 @@ int tmain() "full_name": "clanguml::t20020::C::c3(int)", "id": "10427510278737569612", "name": "c3", - "namespace": "", + "namespace": "clanguml::t20020", "source_location": { "column": 9, "file": "t20020.cc", @@ -238,7 +238,7 @@ int tmain() "full_name": "clanguml::t20020::C::c1() const", "id": "11788172907238269228", "name": "c1", - "namespace": "", + "namespace": "clanguml::t20020", "source_location": { "column": 10, "file": "t20020.cc", @@ -252,7 +252,7 @@ int tmain() "full_name": "clanguml::t20020::C::c2() const", "id": "14312931061803887318", "name": "c2", - "namespace": "", + "namespace": "clanguml::t20020", "source_location": { "column": 10, "file": "t20020.cc", @@ -266,7 +266,7 @@ int tmain() "full_name": "clanguml::t20020::C::log() const", "id": "5086244200172581365", "name": "log", - "namespace": "", + "namespace": "clanguml::t20020", "source_location": { "column": 10, "file": "t20020.cc", @@ -296,7 +296,7 @@ int tmain() "full_name": "clanguml::t20020::B::b1()", "id": "4337572658684858744", "name": "b1", - "namespace": "", + "namespace": "clanguml::t20020", "source_location": { "column": 9, "file": "t20020.cc", @@ -310,7 +310,7 @@ int tmain() "full_name": "clanguml::t20020::B::b2()", "id": "4046081895713433497", "name": "b2", - "namespace": "", + "namespace": "clanguml::t20020", "source_location": { "column": 9, "file": "t20020.cc", @@ -324,7 +324,7 @@ int tmain() "full_name": "clanguml::t20020::B::log()", "id": "11490006309633640210", "name": "log", - "namespace": "", + "namespace": "clanguml::t20020", "source_location": { "column": 10, "file": "t20020.cc", @@ -354,7 +354,7 @@ int tmain() "full_name": "clanguml::t20020::D::d1(int,int)", "id": "14240016080422742133", "name": "d1", - "namespace": "", + "namespace": "clanguml::t20020", "source_location": { "column": 7, "file": "t20020.cc", diff --git a/docs/test_cases/t20020_sequence.svg b/docs/test_cases/t20020_sequence.svg index 40d5385be..411d4b664 100644 --- a/docs/test_cases/t20020_sequence.svg +++ b/docs/test_cases/t20020_sequence.svg @@ -1,203 +1,193 @@ - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - tmain() - - tmain() - - - - A - - A - - - - C - - C - - - - B - - B - - - - D<int> - - D<int> - - - - - - - - - - - - - - - - - - alt - - - - a1() - - - - - - - - a5() - - - - - - - alt - - - - [ - a2() - ] - - - - - - - [ - c3(int) - ] - - - - - - - b1() - - - - - - - - [ - a3() - ] - - - - - - - b2() - - - - - - - - a4() - - - - - - - log() - - - - alt - - - - c1() const - - - - alt - - - - - - [ - c2() const - ] - - - - - - - - - - - log() const - - - - alt - - - - d1(int,int) - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + tmain() + + tmain() + + + + A + + A + + + + C + + C + + + + B + + B + + + + D<int> + + D<int> + + + + + + + + + + + + + + + + + + alt + + + + a1() + + + + + + + + a5() + + + + + + + alt + + + + [ + a2() + ] + + + + + + + [ + c3(int) + ] + + + + + + + b1() + + + + + + + + [ + a3() + ] + + + + + + + b2() + + + + + + + + a4() + + + + + + + log() + + + + alt + + + + c1() const + + + + alt + + + + + + [ + c2() const + ] + + + + + + + + + + + log() const + + + + alt + + + + d1(int,int) + + + diff --git a/docs/test_cases/t20021.md b/docs/test_cases/t20021.md index 9dfba4248..b09d0f5c2 100644 --- a/docs/test_cases/t20021.md +++ b/docs/test_cases/t20021.md @@ -105,7 +105,7 @@ int tmain() "full_name": "clanguml::t20021::C::c4()", "id": "999423020978569411", "name": "c4", - "namespace": "", + "namespace": "clanguml::t20021", "source_location": { "column": 9, "file": "t20021.cc", @@ -119,7 +119,7 @@ int tmain() "full_name": "clanguml::t20021::C::c5()", "id": "10605765713438469028", "name": "c5", - "namespace": "", + "namespace": "clanguml::t20021", "source_location": { "column": 9, "file": "t20021.cc", @@ -133,7 +133,7 @@ int tmain() "full_name": "clanguml::t20021::C::c1()", "id": "17150117920578586424", "name": "c1", - "namespace": "", + "namespace": "clanguml::t20021", "source_location": { "column": 9, "file": "t20021.cc", @@ -147,7 +147,7 @@ int tmain() "full_name": "clanguml::t20021::C::c2()", "id": "13661547835268008141", "name": "c2", - "namespace": "", + "namespace": "clanguml::t20021", "source_location": { "column": 9, "file": "t20021.cc", @@ -161,7 +161,7 @@ int tmain() "full_name": "clanguml::t20021::C::c3()", "id": "10423142025974403121", "name": "c3", - "namespace": "", + "namespace": "clanguml::t20021", "source_location": { "column": 9, "file": "t20021.cc", @@ -175,7 +175,7 @@ int tmain() "full_name": "clanguml::t20021::C::contents()", "id": "6515241731085583713", "name": "contents", - "namespace": "", + "namespace": "clanguml::t20021", "source_location": { "column": 23, "file": "t20021.cc", @@ -205,7 +205,7 @@ int tmain() "full_name": "clanguml::t20021::A::a3()", "id": "14943641868999129521", "name": "a3", - "namespace": "", + "namespace": "clanguml::t20021", "source_location": { "column": 9, "file": "t20021.cc", @@ -219,7 +219,7 @@ int tmain() "full_name": "clanguml::t20021::A::a2()", "id": "9114358382067320148", "name": "a2", - "namespace": "", + "namespace": "clanguml::t20021", "source_location": { "column": 9, "file": "t20021.cc", @@ -233,7 +233,7 @@ int tmain() "full_name": "clanguml::t20021::A::a1()", "id": "13275908397574487940", "name": "a1", - "namespace": "", + "namespace": "clanguml::t20021", "source_location": { "column": 9, "file": "t20021.cc", @@ -263,7 +263,7 @@ int tmain() "full_name": "clanguml::t20021::B::b2() const", "id": "12488327994212504617", "name": "b2", - "namespace": "", + "namespace": "clanguml::t20021", "source_location": { "column": 9, "file": "t20021.cc", diff --git a/docs/test_cases/t20021_sequence.svg b/docs/test_cases/t20021_sequence.svg index 8db393f73..de3117803 100644 --- a/docs/test_cases/t20021_sequence.svg +++ b/docs/test_cases/t20021_sequence.svg @@ -1,178 +1,172 @@ - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - tmain() - - tmain() + + + + + + + + + + + + + + + + + + + + + + + + tmain() + + tmain() - - - C - - C + + + C + + C - - - A - - A + + + A + + A - - - B - - B + + + B + + B - - - - - - - - - - - - - - - loop - - - - [ - c4() - ] + + + + + + + + + + + + + + + loop + + + + [ + c4() + ] - - - - - - c5() + + + + + + c5() - - - - - - - - - - a3() + + + + + + + + + + a3() - - - - - loop - - - loop - - - - [ - a2() - ] + + + + + loop + + + loop + + + + [ + a2() + ] - - - - - - [ - c1() - ] + + + + + + [ + c1() + ] - - - - - - [ - c2() - ] + + + + + + [ + c2() + ] - - - - - - a1() + + + + + + a1() - - - - - - [ - c3() - ] + + + + + + [ + c3() + ] - - - - - loop - - - - b2() const + + + + + loop + + + + b2() const - - - - - loop - - - - [ - contents() - ] + + + + + loop + + + + [ + contents() + ] - - - - - - b2() const + + + + + + b2() const - - + + diff --git a/docs/test_cases/t20022.md b/docs/test_cases/t20022.md index b44f3c4e5..2e9fbe29c 100644 --- a/docs/test_cases/t20022.md +++ b/docs/test_cases/t20022.md @@ -85,7 +85,7 @@ int tmain() "full_name": "clanguml::t20022::A::A(std::unique_ptr
)", "id": "9812554452457661061", "name": "A", - "namespace": "", + "namespace": "clanguml::t20022", "source_location": { "column": 4, "file": "t20022.cc", @@ -99,7 +99,7 @@ int tmain() "full_name": "clanguml::t20022::A::a()", "id": "9270597613070491528", "name": "a", - "namespace": "", + "namespace": "clanguml::t20022", "source_location": { "column": 9, "file": "t20022.cc", @@ -129,7 +129,7 @@ int tmain() "full_name": "clanguml::t20022::B::b()", "id": "16913783748607946332", "name": "b", - "namespace": "", + "namespace": "clanguml::t20022", "source_location": { "column": 10, "file": "t20022.cc", diff --git a/docs/test_cases/t20022_sequence.svg b/docs/test_cases/t20022_sequence.svg index 39f6f804e..228970549 100644 --- a/docs/test_cases/t20022_sequence.svg +++ b/docs/test_cases/t20022_sequence.svg @@ -1,58 +1,52 @@ - + - - - - - - - - - - - - - - - - tmain() - - tmain() + + + + + + + + + + tmain() + + tmain() - - - A - - A + + + A + + A - - - B - - B + + + B + + B - - - - - - - - A(std::unique_ptr - ) + + + + + + + + A(std::unique_ptr + ) - - - - a() + + + + a() - - - - b() + + + + b() diff --git a/docs/test_cases/t20023.md b/docs/test_cases/t20023.md index d2f291a42..f6295bb68 100644 --- a/docs/test_cases/t20023.md +++ b/docs/test_cases/t20023.md @@ -88,7 +88,7 @@ int tmain() "full_name": "clanguml::t20023::A::a()", "id": "4245210562217509581", "name": "a", - "namespace": "", + "namespace": "clanguml::t20023", "source_location": { "column": 9, "file": "t20023.cc", @@ -102,7 +102,7 @@ int tmain() "full_name": "clanguml::t20023::A::a1()", "id": "753080911460153665", "name": "a1", - "namespace": "", + "namespace": "clanguml::t20023", "source_location": { "column": 9, "file": "t20023.cc", @@ -116,7 +116,7 @@ int tmain() "full_name": "clanguml::t20023::A::a2()", "id": "16483505431192115726", "name": "a2", - "namespace": "", + "namespace": "clanguml::t20023", "source_location": { "column": 9, "file": "t20023.cc", @@ -130,7 +130,7 @@ int tmain() "full_name": "clanguml::t20023::A::a3()", "id": "14215418076972824143", "name": "a3", - "namespace": "", + "namespace": "clanguml::t20023", "source_location": { "column": 9, "file": "t20023.cc", @@ -144,7 +144,7 @@ int tmain() "full_name": "clanguml::t20023::A::a4()", "id": "8660701586993990509", "name": "a4", - "namespace": "", + "namespace": "clanguml::t20023", "source_location": { "column": 9, "file": "t20023.cc", diff --git a/docs/test_cases/t20023_sequence.svg b/docs/test_cases/t20023_sequence.svg index 198909cdf..19cb0b471 100644 --- a/docs/test_cases/t20023_sequence.svg +++ b/docs/test_cases/t20023_sequence.svg @@ -1,103 +1,94 @@ - + - - - - - - - - - - - - - - - - - - - - - tmain() - - tmain() + + + + + + + + + + + + tmain() + + tmain() - - - A - - A + + + A + + A - - - - - - - - - - a() + + + + + + + + + + a() - - - try - - - - - - a1() + + + try + + + + + + a1() - - - - - - [std::runtime_error &] - - - - - - a2() + + + + + + [std::runtime_error &] + + + + + + a2() - - - - - - [std::logic_error &] - - - - - - a3() + + + + + + [std::logic_error &] + + + + + + a3() - - - - - - [...] - - - - - - a4() + + + + + + [...] + + + + + + a4() - - - - - - + + + + + + diff --git a/docs/test_cases/t20024.md b/docs/test_cases/t20024.md index fd4b7bab8..785351890 100644 --- a/docs/test_cases/t20024.md +++ b/docs/test_cases/t20024.md @@ -113,7 +113,7 @@ int tmain() "full_name": "clanguml::t20024::A::select(enum_a)", "id": "9604696381608255214", "name": "select", - "namespace": "", + "namespace": "clanguml::t20024", "source_location": { "column": 9, "file": "t20024.cc", @@ -127,7 +127,7 @@ int tmain() "full_name": "clanguml::t20024::A::a0()", "id": "14876916645134393248", "name": "a0", - "namespace": "", + "namespace": "clanguml::t20024", "source_location": { "column": 9, "file": "t20024.cc", @@ -141,7 +141,7 @@ int tmain() "full_name": "clanguml::t20024::A::a1()", "id": "4012791523639291685", "name": "a1", - "namespace": "", + "namespace": "clanguml::t20024", "source_location": { "column": 9, "file": "t20024.cc", @@ -155,7 +155,7 @@ int tmain() "full_name": "clanguml::t20024::A::a2()", "id": "13590932329390026727", "name": "a2", - "namespace": "", + "namespace": "clanguml::t20024", "source_location": { "column": 9, "file": "t20024.cc", @@ -169,7 +169,7 @@ int tmain() "full_name": "clanguml::t20024::A::a3()", "id": "3923011508415666073", "name": "a3", - "namespace": "", + "namespace": "clanguml::t20024", "source_location": { "column": 9, "file": "t20024.cc", @@ -199,7 +199,7 @@ int tmain() "full_name": "clanguml::t20024::B::select(colors)", "id": "2288865745255819378", "name": "select", - "namespace": "", + "namespace": "clanguml::t20024", "source_location": { "column": 10, "file": "t20024.cc", @@ -213,7 +213,7 @@ int tmain() "full_name": "clanguml::t20024::B::red()", "id": "896116505648675742", "name": "red", - "namespace": "", + "namespace": "clanguml::t20024", "source_location": { "column": 10, "file": "t20024.cc", @@ -227,7 +227,7 @@ int tmain() "full_name": "clanguml::t20024::B::orange()", "id": "17782585891988041480", "name": "orange", - "namespace": "", + "namespace": "clanguml::t20024", "source_location": { "column": 10, "file": "t20024.cc", @@ -241,7 +241,7 @@ int tmain() "full_name": "clanguml::t20024::B::green()", "id": "4152173789765267015", "name": "green", - "namespace": "", + "namespace": "clanguml::t20024", "source_location": { "column": 10, "file": "t20024.cc", @@ -255,7 +255,7 @@ int tmain() "full_name": "clanguml::t20024::B::grey()", "id": "14508461375028357896", "name": "grey", - "namespace": "", + "namespace": "clanguml::t20024", "source_location": { "column": 10, "file": "t20024.cc", diff --git a/docs/test_cases/t20024_sequence.svg b/docs/test_cases/t20024_sequence.svg index de5bc231f..a71485941 100644 --- a/docs/test_cases/t20024_sequence.svg +++ b/docs/test_cases/t20024_sequence.svg @@ -1,172 +1,158 @@ - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - tmain() - - tmain() + + + + + + + + + + + + + + + + + + + tmain() + + tmain() - - - A - - A + + + A + + A - - - B - - B + + + B + + B - - - - - - - - - - - - - - - select(enum_a) + + + + + + + + + + + + + + + select(enum_a) - - - switch - - [zero] - - - - - - a0() + + + switch + + [zero] + + + + + + a0() - - - - - - [one] - - - - - - a1() + + + + + + [one] + + + + + + a1() - - - - - - [two] - - - - - - a2() + + + + + + [two] + + + + + + a2() - - - - - - [default] - - - - - - a3() + + + + + + [default] + + + + + + a3() - - - - - - - - - - select(colors) + + + + + + + + + + select(colors) - - - switch - - [enum colors::red] - - - - - - red() + + + switch + + [enum colors::red] + + + + + + red() - - [enum colors::orange] - - - - - - orange() + + [enum colors::orange] + + + + + + orange() - - [enum colors::green] - - - - - - green() + + [enum colors::green] + + + + + + green() - - [default] - - - - - - grey() + + [default] + + + + + + grey() diff --git a/docs/test_cases/t20025.md b/docs/test_cases/t20025.md index 09dd532f9..488200fba 100644 --- a/docs/test_cases/t20025.md +++ b/docs/test_cases/t20025.md @@ -93,7 +93,7 @@ int tmain() "full_name": "clanguml::t20025::A::a()", "id": "8958640839954172672", "name": "a", - "namespace": "", + "namespace": "clanguml::t20025", "source_location": { "column": 9, "file": "t20025.cc", diff --git a/docs/test_cases/t20025_sequence.svg b/docs/test_cases/t20025_sequence.svg index 1c9f7c183..db568940c 100644 --- a/docs/test_cases/t20025_sequence.svg +++ b/docs/test_cases/t20025_sequence.svg @@ -1,53 +1,47 @@ - + - - - - - - - - - - - - - - - tmain() - - tmain() + + + + + + + + + tmain() + + tmain() - - - A - - A + + + A + + A - - - add(int,int) - - add(int,int) + + + add(int,int) + + add(int,int) - - - - - - - a() + + + + + + + a() - - - - - + + + + + - - + + diff --git a/docs/test_cases/t20026.md b/docs/test_cases/t20026.md index e177a93ab..60adb7968 100644 --- a/docs/test_cases/t20026.md +++ b/docs/test_cases/t20026.md @@ -73,7 +73,7 @@ int tmain() "full_name": "clanguml::t20026::A::a()", "id": "4804726163345182918", "name": "a", - "namespace": "", + "namespace": "clanguml::t20026", "source_location": { "column": 18, "file": "t20026.cc", diff --git a/docs/test_cases/t20026_sequence.svg b/docs/test_cases/t20026_sequence.svg index 3446162b4..5b577b2c7 100644 --- a/docs/test_cases/t20026_sequence.svg +++ b/docs/test_cases/t20026_sequence.svg @@ -1,36 +1,30 @@ - + - - - - - - - - - - - - - tmain() - - tmain() + + + + + + + tmain() + + tmain() - - - A - - A + + + A + + A - - - - - - a() + + + + + + a() diff --git a/docs/test_cases/t20027.md b/docs/test_cases/t20027.md index 08dc33a1b..a468c68ec 100644 --- a/docs/test_cases/t20027.md +++ b/docs/test_cases/t20027.md @@ -72,7 +72,7 @@ void tmain() "full_name": "clanguml::t20027::A::a()", "id": "7284119742289621739", "name": "a", - "namespace": "", + "namespace": "clanguml::t20027", "source_location": { "column": 10, "file": "t20027.cc", diff --git a/docs/test_cases/t20027_sequence.svg b/docs/test_cases/t20027_sequence.svg index 191b40e16..6375a2380 100644 --- a/docs/test_cases/t20027_sequence.svg +++ b/docs/test_cases/t20027_sequence.svg @@ -1,36 +1,30 @@ - + - - - - - - - - - - - - - tmain() - - tmain() + + + + + + + tmain() + + tmain() - - - A - - A + + + A + + A - - - - - - a() + + + + + + a() diff --git a/docs/test_cases/t20028.md b/docs/test_cases/t20028.md index 0d46d6ada..e79638069 100644 --- a/docs/test_cases/t20028.md +++ b/docs/test_cases/t20028.md @@ -82,7 +82,7 @@ int tmain() "full_name": "clanguml::t20028::A::a()", "id": "5329686679215526252", "name": "a", - "namespace": "", + "namespace": "clanguml::t20028", "source_location": { "column": 9, "file": "t20028.cc", @@ -96,7 +96,7 @@ int tmain() "full_name": "clanguml::t20028::A::b()", "id": "6350347713472302364", "name": "b", - "namespace": "", + "namespace": "clanguml::t20028", "source_location": { "column": 9, "file": "t20028.cc", @@ -110,7 +110,7 @@ int tmain() "full_name": "clanguml::t20028::A::c()", "id": "12657220541584880625", "name": "c", - "namespace": "", + "namespace": "clanguml::t20028", "source_location": { "column": 9, "file": "t20028.cc", @@ -124,7 +124,7 @@ int tmain() "full_name": "clanguml::t20028::A::d()", "id": "9426149503611941573", "name": "d", - "namespace": "", + "namespace": "clanguml::t20028", "source_location": { "column": 9, "file": "t20028.cc", diff --git a/docs/test_cases/t20028_sequence.svg b/docs/test_cases/t20028_sequence.svg index 5970b08ba..a79970ae7 100644 --- a/docs/test_cases/t20028_sequence.svg +++ b/docs/test_cases/t20028_sequence.svg @@ -1,73 +1,66 @@ - + - - - - - - - - - - - - - - - - - - tmain() - - tmain() + + + + + + + + + + + tmain() + + tmain() - - - A - - A + + + A + + A - - - - - - - - alt - - - - [ - a() - ] + + + + + + + + alt + + + + [ + a() + ] - - - - - - b() + + + + + + b() - - - - - - c() + + + + + + c() - - - - - - - d() + + + + + + + d() - - + + diff --git a/docs/test_cases/t20029.md b/docs/test_cases/t20029.md index 1f83d5c10..9bb9e7ddc 100644 --- a/docs/test_cases/t20029.md +++ b/docs/test_cases/t20029.md @@ -135,7 +135,7 @@ int tmain() "full_name": "clanguml::t20029::Encoder>::send(std::string &&)", "id": "16214110912047834185", "name": "send", - "namespace": "", + "namespace": "clanguml::t20029::Encoder>::encode(std::string &&)", "id": "11746066155731846187", "name": "encode", - "namespace": "", + "namespace": "clanguml::t20029::Encoder::send(std::string &&)", "id": "244127771882890417", "name": "send", - "namespace": "", + "namespace": "clanguml::t20029::Retrier + - - - - - - - - - - - - - - - - - - - - - - - - - tmain() - - tmain() + + + + + + + + + + + + + + + + + + + tmain() + + tmain() - - - Encoder<Retrier<ConnectionPool>> - - Encoder<Retrier<ConnectionPool>> + + + Encoder<Retrier<ConnectionPool>> + + Encoder<Retrier<ConnectionPool>> - - - Retrier<ConnectionPool> - - Retrier<ConnectionPool> + + + Retrier<ConnectionPool> + + Retrier<ConnectionPool> - - - ConnectionPool - - ConnectionPool + + + ConnectionPool + + ConnectionPool - - - encode_b64(std::string &&) - - encode_b64(std::string &&) + + + encode_b64(std::string &&) + + encode_b64(std::string &&) - - - - - - - - - - Establish connection to the - remote server synchronously - - - - connect() + + + + + + + + + + Establish connection to the + remote server synchronously + + + + connect() - - - Repeat for each line in the - input stream - - - loop - - - alt - - - - [ - send(std::string &&) - ] + + + Repeat for each line in the + input stream + + + loop + + + alt + + + + [ + send(std::string &&) + ] - - - Encode the message using - Base64 encoding and pass - it to the next layer - - - - - - encode(std::string &&) + + + Encode the message using + Base64 encoding and pass + it to the next layer + + + + + + encode(std::string &&) - - - + + + - - - - - - - - - - send(std::string &&) + + + + + + + + + + send(std::string &&) - - - Repeat until send() succeeds - or retry count is exceeded - - - loop - - - alt - - - - [ - send(const std::string &) - ] + + + Repeat until send() succeeds + or retry count is exceeded + + + loop + + + alt + + + + [ + send(const std::string &) + ] - - - - - - + + + + + + diff --git a/docs/test_cases/t20030.md b/docs/test_cases/t20030.md index 1a7faf365..8b0d66095 100644 --- a/docs/test_cases/t20030.md +++ b/docs/test_cases/t20030.md @@ -114,7 +114,7 @@ int tmain(bool f, int a) "full_name": "clanguml::t20030::A::A(int)", "id": "17538385349139019117", "name": "A", - "namespace": "", + "namespace": "clanguml::t20030", "source_location": { "column": 5, "file": "t20030.cc", @@ -128,7 +128,7 @@ int tmain(bool f, int a) "full_name": "clanguml::t20030::A::operator+=(int)", "id": "16257343976980384640", "name": "operator+=", - "namespace": "", + "namespace": "clanguml::t20030", "source_location": { "column": 8, "file": "t20030.cc", @@ -142,7 +142,7 @@ int tmain(bool f, int a) "full_name": "clanguml::t20030::A::add(int)", "id": "17398619456540928995", "name": "add", - "namespace": "", + "namespace": "clanguml::t20030", "source_location": { "column": 10, "file": "t20030.cc", @@ -156,7 +156,7 @@ int tmain(bool f, int a) "full_name": "clanguml::t20030::A::A()", "id": "257479330359087325", "name": "A", - "namespace": "", + "namespace": "clanguml::t20030", "source_location": { "column": 5, "file": "t20030.cc", @@ -170,7 +170,7 @@ int tmain(bool f, int a) "full_name": "clanguml::t20030::A::create()", "id": "7124624800553113510", "name": "create", - "namespace": "", + "namespace": "clanguml::t20030", "source_location": { "column": 10, "file": "t20030.cc", @@ -184,7 +184,7 @@ int tmain(bool f, int a) "full_name": "clanguml::t20030::A::operator=(const A &)", "id": "14370429480709603169", "name": "operator=", - "namespace": "", + "namespace": "clanguml::t20030", "source_location": { "column": 8, "file": "t20030.cc", @@ -198,7 +198,7 @@ int tmain(bool f, int a) "full_name": "clanguml::t20030::A::set(int)", "id": "17703828086209787307", "name": "set", - "namespace": "", + "namespace": "clanguml::t20030", "source_location": { "column": 10, "file": "t20030.cc", @@ -212,7 +212,7 @@ int tmain(bool f, int a) "full_name": "clanguml::t20030::A::value() const", "id": "14039658723010215747", "name": "value", - "namespace": "", + "namespace": "clanguml::t20030", "source_location": { "column": 9, "file": "t20030.cc", diff --git a/docs/test_cases/t20030_sequence.svg b/docs/test_cases/t20030_sequence.svg index fe4f09324..8cf6c4a45 100644 --- a/docs/test_cases/t20030_sequence.svg +++ b/docs/test_cases/t20030_sequence.svg @@ -1,155 +1,149 @@ - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - tmain(int) - - tmain(int) - - - - magic() - - magic() - - - - A - - A - - - - tmain(bool,int) - - tmain(bool,int) - - - - - - - - - - - - - - - - - - - - - - - - - - A(int) - - - - - operator+=(int) - - - - - - - add(int) - - - - - - - A() - - - - - - - create() - - - - - A() - - - - - - - create() - - - - - operator+=(int) - - - - - - - add(int) - - - - - - - operator=(const A &) - - - - - - - set(int) - - - - - - - value() const - - - + + + + + + + + + + + + + + + + + + + + + + tmain(int) + + tmain(int) + + + + magic() + + magic() + + + + A + + A + + + + tmain(bool,int) + + tmain(bool,int) + + + + + + + + + + + + + + + + + + + + + + + + + + A(int) + + + + + operator+=(int) + + + + + + + add(int) + + + + + + + A() + + + + + + + create() + + + + + A() + + + + + + + create() + + + + + operator+=(int) + + + + + + + add(int) + + + + + + + operator=(const A &) + + + + + + + set(int) + + + + + + + value() const + + + diff --git a/docs/test_cases/t20031.md b/docs/test_cases/t20031.md index b96e68cb8..21d3adffc 100644 --- a/docs/test_cases/t20031.md +++ b/docs/test_cases/t20031.md @@ -158,7 +158,7 @@ int tmain(bool f, int a) "full_name": "clanguml::t20031::A::value() const", "id": "8714227449246538789", "name": "value", - "namespace": "", + "namespace": "clanguml::t20031", "source_location": { "column": 9, "file": "t20031.cc", diff --git a/docs/test_cases/t20031_sequence.svg b/docs/test_cases/t20031_sequence.svg index ee451ffa0..40e21a861 100644 --- a/docs/test_cases/t20031_sequence.svg +++ b/docs/test_cases/t20031_sequence.svg @@ -1,77 +1,71 @@ - + - - - - - - - - - - - - - - - - - - - tmain(int) - - tmain(int) + + + + + + + + + + + + + tmain(int) + + tmain(int) - - - magic() - - magic() + + + magic() + + magic() - - - tmain(bool,int) - - tmain(bool,int) + + + tmain(bool,int) + + tmain(bool,int) - - - execute(std::function<int ()>) - - execute(std::function<int ()>) + + + execute(std::function<int ()>) + + execute(std::function<int ()>) - - - A - - A + + + A + + A - - - - - - - - + + + + + + + + - - - - - + + + + + - - - - - - value() const + + + + + + value() const - - + + diff --git a/docs/test_cases/t20032.md b/docs/test_cases/t20032.md index b945485ff..7709a4bca 100644 --- a/docs/test_cases/t20032.md +++ b/docs/test_cases/t20032.md @@ -76,7 +76,7 @@ void tmain(int argc, char **argv) "full_name": "clanguml::t20032::B::b(int)", "id": "14205823402195775593", "name": "b", - "namespace": "", + "namespace": "clanguml::t20032", "source_location": { "column": 9, "file": "t20032.cc", @@ -90,7 +90,7 @@ void tmain(int argc, char **argv) "full_name": "clanguml::t20032::B::b(double)", "id": "3233785808741200494", "name": "b", - "namespace": "", + "namespace": "clanguml::t20032", "source_location": { "column": 12, "file": "t20032.cc", @@ -104,7 +104,7 @@ void tmain(int argc, char **argv) "full_name": "clanguml::t20032::B::b(const char *)", "id": "13413475867177145332", "name": "b", - "namespace": "", + "namespace": "clanguml::t20032", "source_location": { "column": 17, "file": "t20032.cc", @@ -134,7 +134,7 @@ void tmain(int argc, char **argv) "full_name": "clanguml::t20032::A::a1(int)", "id": "7310739551461754840", "name": "a1", - "namespace": "", + "namespace": "clanguml::t20032", "source_location": { "column": 9, "file": "t20032.cc", @@ -148,7 +148,7 @@ void tmain(int argc, char **argv) "full_name": "clanguml::t20032::A::a2(double)", "id": "10344913365400303821", "name": "a2", - "namespace": "", + "namespace": "clanguml::t20032", "source_location": { "column": 12, "file": "t20032.cc", @@ -162,7 +162,7 @@ void tmain(int argc, char **argv) "full_name": "clanguml::t20032::A::a3(const char *)", "id": "16798572194908074206", "name": "a3", - "namespace": "", + "namespace": "clanguml::t20032", "source_location": { "column": 17, "file": "t20032.cc", diff --git a/docs/test_cases/t20032_sequence.svg b/docs/test_cases/t20032_sequence.svg index d61dfcf16..348c3f4f0 100644 --- a/docs/test_cases/t20032_sequence.svg +++ b/docs/test_cases/t20032_sequence.svg @@ -1,96 +1,90 @@ - + - - - - - - - - - - - - - - - - - - - tmain(int,char **) - - tmain(int,char **) + + + + + + + + + + + + + tmain(int,char **) + + tmain(int,char **) - - - B - - B + + + B + + B - - - A - - A + + + A + + A - - - - - - - - - - - b(int) + + + + + + + + + + + b(int) - - - - a1(int) + + + + a1(int) - - - int - - - int - - - - b(double) + + + int + + + int + + + + b(double) - - - - a2(double) + + + + a2(double) - - - double - - - double - - - - b(const char *) + + + double + + + double + + + + b(const char *) - - - - a3(const char *) + + + + a3(const char *) - - - const char * - - - const char * + + + const char * + + + const char * diff --git a/docs/test_cases/t20033.md b/docs/test_cases/t20033.md index 293aad63c..4367a9513 100644 --- a/docs/test_cases/t20033.md +++ b/docs/test_cases/t20033.md @@ -114,7 +114,7 @@ int tmain() "full_name": "clanguml::t20033::A::a1()", "id": "4471084021965072922", "name": "a1", - "namespace": "", + "namespace": "clanguml::t20033", "source_location": { "column": 9, "file": "t20033.cc", @@ -128,7 +128,7 @@ int tmain() "full_name": "clanguml::t20033::A::a2()", "id": "5988023579812894353", "name": "a2", - "namespace": "", + "namespace": "clanguml::t20033", "source_location": { "column": 9, "file": "t20033.cc", @@ -142,7 +142,7 @@ int tmain() "full_name": "clanguml::t20033::A::a3()", "id": "447227086513966713", "name": "a3", - "namespace": "", + "namespace": "clanguml::t20033", "source_location": { "column": 9, "file": "t20033.cc", @@ -156,7 +156,7 @@ int tmain() "full_name": "clanguml::t20033::A::a4()", "id": "13491411810715548635", "name": "a4", - "namespace": "", + "namespace": "clanguml::t20033", "source_location": { "column": 9, "file": "t20033.cc", diff --git a/docs/test_cases/t20033_sequence.svg b/docs/test_cases/t20033_sequence.svg index 111eddf11..7680e314b 100644 --- a/docs/test_cases/t20033_sequence.svg +++ b/docs/test_cases/t20033_sequence.svg @@ -1,233 +1,222 @@ - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - tmain() - - tmain() - - - - A - - A - - - - - - - - - - - - - - - - - - - - - alt - [false] - - [reinterpret_cast<uint64_t>(&a) % 100 == 0ULL] - - - - a1() - - - - - [reinterpret_cast<uint64_t>(&a) % 64 == 0ULL] - - - - a2() - - - - - [a.a2() == 2 && a.a3() == 3] - - - - [ - a2() - ] - - - - - - - [ - a3() - ] - - - - - - - a3() - - - - - - - - a4() - - - - - - alt - [int i = a.a2(); i != 2] - - - - [ - a2() - ] - - - - - - - a3() - - - - - - loop - [int i = 0; i < a.a2(); i++] - - - - [ - a2() - ] - - - - - - - a3() - - - - - - - a3() - - - - - - loop - [retry_count--] - - - - a2() - - - - - - loop - [retry_count++ < a.a3()] - - - - a4() - - - - - - - [ - a3() - ] - - - - - - alt - [a.a4() % 6] - - - - [ - a4() - ] - - - - - - - loop - [ints] - - - - a4() - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + tmain() + + tmain() + + + + A + + A + + + + + + + + + + + + + + + + + + + + + alt + [false] + + [reinterpret_cast<uint64_t>(&a) % 100 == 0ULL] + + + + a1() + + + + + [reinterpret_cast<uint64_t>(&a) % 64 == 0ULL] + + + + a2() + + + + + [a.a2() == 2 && a.a3() == 3] + + + + [ + a2() + ] + + + + + + + [ + a3() + ] + + + + + + + a3() + + + + + + + + a4() + + + + + + alt + [int i = a.a2(); i != 2] + + + + [ + a2() + ] + + + + + + + a3() + + + + + + loop + [int i = 0; i < a.a2(); i++] + + + + [ + a2() + ] + + + + + + + a3() + + + + + + + a3() + + + + + + loop + [retry_count--] + + + + a2() + + + + + + loop + [retry_count++ < a.a3()] + + + + a4() + + + + + + + [ + a3() + ] + + + + + + alt + [a.a4() % 6] + + + + [ + a4() + ] + + + + + + + loop + [ints] + + + + a4() + + + diff --git a/docs/test_cases/t20034.md b/docs/test_cases/t20034.md index 8b3630def..5eed0406b 100644 --- a/docs/test_cases/t20034.md +++ b/docs/test_cases/t20034.md @@ -106,7 +106,7 @@ void B::b4() "full_name": "clanguml::t20034::D::d2()", "id": "13660113429811813907", "name": "d2", - "namespace": "", + "namespace": "clanguml::t20034", "source_location": { "column": 10, "file": "t20034.cc", @@ -136,7 +136,7 @@ void B::b4() "full_name": "clanguml::t20034::C::c2()", "id": "3783239199856176312", "name": "c2", - "namespace": "", + "namespace": "clanguml::t20034", "source_location": { "column": 10, "file": "t20034.cc", @@ -150,7 +150,7 @@ void B::b4() "full_name": "clanguml::t20034::C::c4()", "id": "3165764275552501026", "name": "c4", - "namespace": "", + "namespace": "clanguml::t20034", "source_location": { "column": 10, "file": "t20034.cc", @@ -164,7 +164,7 @@ void B::b4() "full_name": "clanguml::t20034::C::c1()", "id": "1188244067079669689", "name": "c1", - "namespace": "", + "namespace": "clanguml::t20034", "source_location": { "column": 10, "file": "t20034.cc", @@ -178,7 +178,7 @@ void B::b4() "full_name": "clanguml::t20034::C::c3()", "id": "16935918216300866700", "name": "c3", - "namespace": "", + "namespace": "clanguml::t20034", "source_location": { "column": 10, "file": "t20034.cc", @@ -208,7 +208,7 @@ void B::b4() "full_name": "clanguml::t20034::B::b2()", "id": "8275281504961527352", "name": "b2", - "namespace": "", + "namespace": "clanguml::t20034", "source_location": { "column": 10, "file": "t20034.cc", @@ -222,7 +222,7 @@ void B::b4() "full_name": "clanguml::t20034::B::b4()", "id": "14193242232576810025", "name": "b4", - "namespace": "", + "namespace": "clanguml::t20034", "source_location": { "column": 9, "file": "t20034.cc", @@ -236,7 +236,7 @@ void B::b4() "full_name": "clanguml::t20034::B::b1()", "id": "2319196135872470285", "name": "b1", - "namespace": "", + "namespace": "clanguml::t20034", "source_location": { "column": 10, "file": "t20034.cc", @@ -266,7 +266,7 @@ void B::b4() "full_name": "clanguml::t20034::A::a2()", "id": "10457510825242923440", "name": "a2", - "namespace": "", + "namespace": "clanguml::t20034", "source_location": { "column": 10, "file": "t20034.cc", @@ -296,7 +296,7 @@ void B::b4() "full_name": "clanguml::t20034::D::d2()::(lambda t20034.cc:56:18)::operator()() const", "id": "12275451594579367626", "name": "operator()", - "namespace": "", + "namespace": "clanguml::t20034::D::d2()", "type": "method" } ], diff --git a/docs/test_cases/t20034_sequence.svg b/docs/test_cases/t20034_sequence.svg index 5e95c2bbf..bc46bb365 100644 --- a/docs/test_cases/t20034_sequence.svg +++ b/docs/test_cases/t20034_sequence.svg @@ -1,170 +1,164 @@ - + - - - - - - - - - - - - - - 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() - - - - operator()() const - - - - - a2() - - - - - - - d2() - - - - a2() - - - - - - - d2() - - - - c4() - - - - - b4() - - - - - - - b2() - - - - - a2() - - - - - - - d2() - - - - c1() - - - - - b1() - - - - - a2() - - - - - - - d2() - - - - c3() - - - - - - - c2() - - - - - b2() - - - - - a2() + + + + + + + + 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() + + + + operator()() const + + + + + a2() + + + + + + + d2() + + + + a2() + + + + + + + d2() + + + + c4() + + + + + b4() + + + + + + + b2() + + + + + a2() + + + + + + + d2() + + + + c1() + + + + + b1() + + + + + a2() + + + + + + + d2() + + + + c3() + + + + + + + c2() + + + + + b2() + + + + + a2() diff --git a/docs/test_cases/t20035_sequence.svg b/docs/test_cases/t20035_sequence.svg index e714f15d7..c3478f4da 100644 --- a/docs/test_cases/t20035_sequence.svg +++ b/docs/test_cases/t20035_sequence.svg @@ -1,53 +1,47 @@ - + - - - - - - - - - - - - - tmain(int,char **) - - tmain(int,char **) + + + + + + + tmain(int,char **) + + tmain(int,char **) - - - a(int) - - a(int) + + + a(int) + + a(int) - - - b1(int) - - b1(int) + + + b1(int) + + b1(int) - - - c(int) - - c(int) + + + c(int) + + c(int) - - - + + + - - - + + + - - - + + + diff --git a/docs/test_cases/t20036.md b/docs/test_cases/t20036.md index 967cd52d3..282c9aa9b 100644 --- a/docs/test_cases/t20036.md +++ b/docs/test_cases/t20036.md @@ -78,7 +78,7 @@ struct D { "full_name": "clanguml::t20036::C::c1()", "id": "13940061887190426992", "name": "c1", - "namespace": "", + "namespace": "clanguml::t20036", "source_location": { "column": 10, "file": "t20036.cc", @@ -92,7 +92,7 @@ struct D { "full_name": "clanguml::t20036::C::c2()", "id": "1029961534491024303", "name": "c2", - "namespace": "", + "namespace": "clanguml::t20036", "source_location": { "column": 10, "file": "t20036.cc", @@ -106,7 +106,7 @@ struct D { "full_name": "clanguml::t20036::C::c4()", "id": "13886718133743786177", "name": "c4", - "namespace": "", + "namespace": "clanguml::t20036", "source_location": { "column": 10, "file": "t20036.cc", @@ -120,7 +120,7 @@ struct D { "full_name": "clanguml::t20036::C::c3()", "id": "12188250976098359876", "name": "c3", - "namespace": "", + "namespace": "clanguml::t20036", "source_location": { "column": 10, "file": "t20036.cc", @@ -150,7 +150,7 @@ struct D { "full_name": "clanguml::t20036::B::b1()", "id": "1629287607216422771", "name": "b1", - "namespace": "", + "namespace": "clanguml::t20036", "source_location": { "column": 10, "file": "t20036.cc", @@ -164,7 +164,7 @@ struct D { "full_name": "clanguml::t20036::B::b2()", "id": "13808756643647507988", "name": "b2", - "namespace": "", + "namespace": "clanguml::t20036", "source_location": { "column": 10, "file": "t20036.cc", @@ -194,7 +194,7 @@ struct D { "full_name": "clanguml::t20036::A::a2()", "id": "16992593828115510908", "name": "a2", - "namespace": "", + "namespace": "clanguml::t20036", "source_location": { "column": 10, "file": "t20036.cc", @@ -224,7 +224,7 @@ struct D { "full_name": "clanguml::t20036::D::d1()", "id": "5611911004904119444", "name": "d1", - "namespace": "", + "namespace": "clanguml::t20036", "source_location": { "column": 10, "file": "t20036.cc", @@ -238,7 +238,7 @@ struct D { "full_name": "clanguml::t20036::D::d3()", "id": "15181188317793464520", "name": "d3", - "namespace": "", + "namespace": "clanguml::t20036", "source_location": { "column": 10, "file": "t20036.cc", @@ -252,7 +252,7 @@ struct D { "full_name": "clanguml::t20036::D::d2()", "id": "12275494239752697631", "name": "d2", - "namespace": "", + "namespace": "clanguml::t20036", "source_location": { "column": 10, "file": "t20036.cc", diff --git a/docs/test_cases/t20036_sequence.svg b/docs/test_cases/t20036_sequence.svg index c6c29c71f..564d73ac9 100644 --- a/docs/test_cases/t20036_sequence.svg +++ b/docs/test_cases/t20036_sequence.svg @@ -1,146 +1,140 @@ - + - - - - - - - - - - - - - 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() + + + + + + + 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 1a112952e..60a175bc4 100644 --- a/docs/test_cases/t20037.md +++ b/docs/test_cases/t20037.md @@ -100,7 +100,7 @@ void tmain(int argc, char **argv) "full_name": "clanguml::t20037::A::A()", "id": "9083609533415107973", "name": "A", - "namespace": "", + "namespace": "clanguml::t20037", "source_location": { "column": 5, "file": "t20037.cc", @@ -144,7 +144,7 @@ void tmain(int argc, char **argv) "full_name": "clanguml::t20037::B::get()", "id": "863023265740305101", "name": "get", - "namespace": "", + "namespace": "clanguml::t20037", "source_location": { "column": 9, "file": "t20037.cc", diff --git a/docs/test_cases/t20037_sequence.svg b/docs/test_cases/t20037_sequence.svg index f1c282be7..8fd522175 100644 --- a/docs/test_cases/t20037_sequence.svg +++ b/docs/test_cases/t20037_sequence.svg @@ -1,147 +1,141 @@ - + - - - - - - - - - - - - - - - - - - - - - - - - - - - tmain(int,char **) - - tmain(int,char **) - - - - a() - - a() - - - - A - - A - - - - initb() - - initb() - - - - B - - B - - - - c() - - c() - - - - - - - - - - - - - - - - - - - - - A() - - - - - - - - - - - get() - - - - - - - - - - - - - - - - - - - get() - - - - - - - - - - - - - - - - - - - get() - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + tmain(int,char **) + + tmain(int,char **) + + + + a() + + a() + + + + A + + A + + + + initb() + + initb() + + + + B + + B + + + + c() + + c() + + + + + + + + + + + + + + + + + + + + + A() + + + + + + + + + + + get() + + + + + + + + + + + + + + + + + + + get() + + + + + + + + + + + + + + + + + + + get() + + + + + + + + + + + diff --git a/docs/test_cases/t20038.md b/docs/test_cases/t20038.md index 7233f33a7..1e6bd2530 100644 --- a/docs/test_cases/t20038.md +++ b/docs/test_cases/t20038.md @@ -160,7 +160,7 @@ template T add(T a, T b) "full_name": "clanguml::t20038::B::b()", "id": "5522516829806183901", "name": "b", - "namespace": "", + "namespace": "clanguml::t20038", "source_location": { "column": 9, "file": "t20038.cc", @@ -174,7 +174,7 @@ template T add(T a, T b) "full_name": "clanguml::t20038::B::bbb()", "id": "15218655993561963475", "name": "bbb", - "namespace": "", + "namespace": "clanguml::t20038", "source_location": { "column": 9, "file": "t20038.cc", @@ -188,7 +188,7 @@ template T add(T a, T b) "full_name": "clanguml::t20038::B::bbbb()", "id": "457518923793673502", "name": "bbbb", - "namespace": "", + "namespace": "clanguml::t20038", "source_location": { "column": 9, "file": "t20038.cc", @@ -202,7 +202,7 @@ template T add(T a, T b) "full_name": "clanguml::t20038::B::wrap(int)", "id": "5862199529645096278", "name": "wrap", - "namespace": "", + "namespace": "clanguml::t20038", "source_location": { "column": 9, "file": "t20038.cc", @@ -216,7 +216,7 @@ template T add(T a, T b) "full_name": "clanguml::t20038::B::bbbbb()", "id": "5810360542293206912", "name": "bbbbb", - "namespace": "", + "namespace": "clanguml::t20038", "source_location": { "column": 9, "file": "t20038.cc", @@ -246,7 +246,7 @@ template T add(T a, T b) "full_name": "clanguml::t20038::A::a()", "id": "10490389983354674971", "name": "a", - "namespace": "", + "namespace": "clanguml::t20038", "source_location": { "column": 9, "file": "t20038.cc", @@ -260,7 +260,7 @@ template T add(T a, T b) "full_name": "clanguml::t20038::A::aaa()", "id": "17257666034544329159", "name": "aaa", - "namespace": "", + "namespace": "clanguml::t20038", "source_location": { "column": 9, "file": "t20038.cc", @@ -274,7 +274,7 @@ template T add(T a, T b) "full_name": "clanguml::t20038::A::aaaa()", "id": "10966838598160369228", "name": "aaaa", - "namespace": "", + "namespace": "clanguml::t20038", "source_location": { "column": 9, "file": "t20038.cc", diff --git a/docs/test_cases/t20038_sequence.svg b/docs/test_cases/t20038_sequence.svg index 0ed780d52..c0ef6636e 100644 --- a/docs/test_cases/t20038_sequence.svg +++ b/docs/test_cases/t20038_sequence.svg @@ -1,268 +1,260 @@ - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - tmain() - - tmain() + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + tmain() + + tmain() - - - B - - B + + + B + + B - - - A - - A + + + A + + A - - - add<int>(int,int) - - add<int>(int,int) + + + add<int>(int,int) + + add<int>(int,int) - - - add_impl<int>(int,int) - - add_impl<int>(int,int) + + + add_impl<int>(int,int) + + add_impl<int>(int,int) - - - add_impl<double>(double,double) - - add_impl<double>(double,double) + + + add_impl<double>(double,double) + + add_impl<double>(double,double) - - - - - - - - - - - - - - - - - - - - - - Nisl purus in mollis nunc sed id semper. - Varius vel pharetra vel turpis. Arcu - cursus vitae congue mauris rhoncus. - Risus feugiat in ante metus dictum - at tempor. Lacus vel facilisis volutpat - est. Auctor urna nunc id cursus metus - aliquam. Diam sit amet nisl suscipit - adipiscing. Potenti nullam ac tortor - vitae purus faucibus ornare suspendisse - sed. Lobortis feugiat vivamus at augue - eget arcu dictum varius. Non tellus - orci ac auctor. - - - alt - - - Repeat 5 times... - - - loop - - - - b() + + + + + + + + + + + + + + + + + + + + + + Nisl purus in mollis nunc sed id semper. + Varius vel pharetra vel turpis. Arcu + cursus vitae congue mauris rhoncus. + Risus feugiat in ante metus dictum + at tempor. Lacus vel facilisis volutpat + est. Auctor urna nunc id cursus metus + aliquam. Diam sit amet nisl suscipit + adipiscing. Potenti nullam ac tortor + vitae purus faucibus ornare suspendisse + sed. Lobortis feugiat vivamus at augue + eget arcu dictum varius. Non tellus + orci ac auctor. + + + alt + + + Repeat 5 times... + + + loop + + + + b() - - - - a() + + + + a() - - - - - - - - ... or just once - - - - b() + + + + + + + + ... or just once + + + + b() - - - - a() + + + + a() - - - - - - - - bbb() + + + + + + + + bbb() - - - - aaa() + + + + aaa() - - - - - - - - bbbb() + + + + + + + + bbbb() - - - - aaaa() + + + + aaaa() - - - + + + - - - + + + - - - - - - - - - - - This comment should be rendered only - once - - - - wrap(int) + + + + + + + + + + + This comment should be rendered only + once + + + + wrap(int) - - - - - What is 2 + 2? - - - + + + + + What is 2 + 2? + + + - - - - - Calling B::bbbbb() - - - - bbbbb() + + + + + Calling B::bbbbb() + + + + bbbbb() - - - - aaaa() + + + + aaaa() - - - + + + - - - + + + - - - - - - - - - - - This is a conditional operator - - - alt - - - This is a conditional operator - - - - [ - bbb() - ] + + + + + + + + + + + This is a conditional operator + + + alt + + + This is a conditional operator + + + + [ + bbb() + ] - - - - aaa() + + + + aaa() - - - - - + + + + + diff --git a/docs/test_cases/t20039.md b/docs/test_cases/t20039.md index 2e452ae00..55037618a 100644 --- a/docs/test_cases/t20039.md +++ b/docs/test_cases/t20039.md @@ -91,7 +91,7 @@ int tmain() "full_name": "clanguml::t20039::R::run()", "id": "5944767038086841495", "name": "run", - "namespace": "", + "namespace": "clanguml::t20039", "source_location": { "column": 10, "file": "t20039.cc", @@ -121,7 +121,7 @@ int tmain() "full_name": "clanguml::t20039::A::a(int)", "id": "13354267049642024843", "name": "a", - "namespace": "", + "namespace": "clanguml::t20039", "source_location": { "column": 33, "file": "t20039.cc", @@ -151,7 +151,7 @@ int tmain() "full_name": "clanguml::t20039::A::a(int_vec_t)", "id": "816347095678971446", "name": "a", - "namespace": "", + "namespace": "clanguml::t20039::A::a(string_vec_t)", "id": "7019007324169913734", "name": "a", - "namespace": "", + "namespace": "clanguml::t20039::A::a(int_map_t)", "id": "5763144071885908438", "name": "a", - "namespace": "", + "namespace": "clanguml::t20039::A::a(string_map_t)", "id": "9829494101227432821", "name": "a", - "namespace": "", + "namespace": "clanguml::t20039::A, std", "source_location": { "column": 33, "file": "t20039.cc", diff --git a/docs/test_cases/t20039_sequence.svg b/docs/test_cases/t20039_sequence.svg index 4e2b79e44..bea60b35f 100644 --- a/docs/test_cases/t20039_sequence.svg +++ b/docs/test_cases/t20039_sequence.svg @@ -1,116 +1,110 @@ - + - - - - - - - - - - - - - - - - - - - - - - - tmain() - - tmain() + + + + + + + + + + + + + + + + + tmain() + + tmain() - - - R - - R + + + R + + R - - - A<int> - - A<int> + + + A<int> + + A<int> - - - A<int_vec_t> - - A<int_vec_t> + + + A<int_vec_t> + + A<int_vec_t> - - - A<string_vec_t> - - A<string_vec_t> + + + A<string_vec_t> + + A<string_vec_t> - - - A<int_map_t> - - A<int_map_t> + + + A<int_map_t> + + A<int_map_t> - - - A<string_map_t> - - A<string_map_t> + + + A<string_map_t> + + A<string_map_t> - - - - - - - - - - - run() + + + + + + + + + + + run() - - - - a(int) + + + + a(int) - - - - - - a(int_vec_t) + + + + + + a(int_vec_t) - - - - - - a(string_vec_t) + + + + + + a(string_vec_t) - - - - - - a(int_map_t) + + + + + + a(int_map_t) - - - - - - a(string_map_t) + + + + + + a(string_map_t) - - + + diff --git a/docs/test_cases/t20040_sequence.svg b/docs/test_cases/t20040_sequence.svg index baf3fb864..31aa8d251 100644 --- a/docs/test_cases/t20040_sequence.svg +++ b/docs/test_cases/t20040_sequence.svg @@ -1,119 +1,113 @@ - + - - - - - - - - - - - - - - - - - - - - - - - - - - tmain() - - tmain() - - - - print<int,double,std::string>(int,double,std::string) - - print<int,double,std::string>(int,double,std::string) - - - - print<double,std::string>(double,std::string) - - print<double,std::string>(double,std::string) - - - - print<std::string>(std::string) - - print<std::string>(std::string) - - - - print() - - print() - - - - doublePrint<std::string,int>(std::string,int) - - doublePrint<std::string,int>(std::string,int) - - - - print<std::string,int>(std::string,int) - - print<std::string,int>(std::string,int) - - - - print<int>(int) - - print<int>(int) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + tmain() + + tmain() + + + + print<int,double,std::string>(int,double,std::string) + + print<int,double,std::string>(int,double,std::string) + + + + print<double,std::string>(double,std::string) + + print<double,std::string>(double,std::string) + + + + print<std::string>(std::string) + + print<std::string>(std::string) + + + + print() + + print() + + + + doublePrint<std::string,int>(std::string,int) + + doublePrint<std::string,int>(std::string,int) + + + + print<std::string,int>(std::string,int) + + print<std::string,int>(std::string,int) + + + + print<int>(int) + + print<int>(int) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/test_cases/t20041.md b/docs/test_cases/t20041.md index 2a9733e06..7fcce43d1 100644 --- a/docs/test_cases/t20041.md +++ b/docs/test_cases/t20041.md @@ -79,7 +79,7 @@ void tmain() "full_name": "clanguml::t20041::A::print(int,double,std::string)", "id": "4256000304507433832", "name": "print", - "namespace": "", + "namespace": "clanguml::t20041::A::print(double,std::string)", "id": "11231699227660181036", "name": "print", - "namespace": "", + "namespace": "clanguml::t20041::A::print(std::string)", "id": "13267835320386864470", "name": "print", - "namespace": "", + "namespace": "clanguml::t20041::A + - - - - - - - - - - - - - - - - - - - tmain() - - tmain() + + + + + + + + + + + + + tmain() + + tmain() - - - A<int,double,std::string> - - A<int,double,std::string> + + + A<int,double,std::string> + + A<int,double,std::string> - - - A<double,std::string> - - A<double,std::string> + + + A<double,std::string> + + A<double,std::string> - - - A<std::string> - - A<std::string> + + + A<std::string> + + A<std::string> - - - A - - A + + + A + + A - - - - - - - - - print(int,double,std::string) + + + + + + + + + print(int,double,std::string) - - - - print(double,std::string) + + + + print(double,std::string) - - - - print(std::string) + + + + print(std::string) - - - - print() + + + + print() diff --git a/docs/test_cases/t20042.md b/docs/test_cases/t20042.md index 777ed1e04..d1d1d5749 100644 --- a/docs/test_cases/t20042.md +++ b/docs/test_cases/t20042.md @@ -78,7 +78,7 @@ void tmain() "full_name": "clanguml::t20042::AHandler::operator()(A &) const", "id": "14425206953366503609", "name": "operator()", - "namespace": "", + "namespace": "clanguml::t20042", "source_location": { "column": 10, "file": "t20042.cc", @@ -92,7 +92,7 @@ void tmain() "full_name": "clanguml::t20042::AHandler::handle(A &) const", "id": "4047351664821657638", "name": "handle", - "namespace": "", + "namespace": "clanguml::t20042", "source_location": { "column": 10, "file": "t20042.cc", @@ -122,7 +122,7 @@ void tmain() "full_name": "clanguml::t20042::BHandler::operator()(B &) const", "id": "13084092043583426233", "name": "operator()", - "namespace": "", + "namespace": "clanguml::t20042", "source_location": { "column": 10, "file": "t20042.cc", @@ -136,7 +136,7 @@ void tmain() "full_name": "clanguml::t20042::BHandler::handle(B &) const", "id": "6955354293189168883", "name": "handle", - "namespace": "", + "namespace": "clanguml::t20042", "source_location": { "column": 10, "file": "t20042.cc", diff --git a/docs/test_cases/t20042_sequence.svg b/docs/test_cases/t20042_sequence.svg index 5bf19bdd9..175f1ad24 100644 --- a/docs/test_cases/t20042_sequence.svg +++ b/docs/test_cases/t20042_sequence.svg @@ -1,68 +1,62 @@ - + - - - - - - - - - - - - - - - - - tmain() - - tmain() + + + + + + + + + + + tmain() + + tmain() - - - AHandler - - AHandler + + + AHandler + + AHandler - - - BHandler - - BHandler + + + BHandler + + BHandler - - - - - - - - - operator()(A &) const + + + + + + + + + operator()(A &) const - - - - - - handle(A &) const + + + + + + handle(A &) const - - - - operator()(B &) const + + + + operator()(B &) const - - - - - - handle(B &) const + + + + + + handle(B &) const diff --git a/docs/test_cases/t20043.md b/docs/test_cases/t20043.md index 24708a304..5e48a3a6e 100644 --- a/docs/test_cases/t20043.md +++ b/docs/test_cases/t20043.md @@ -102,7 +102,7 @@ int tmain() "full_name": "clanguml::t20043::D::d()", "id": "483035147691830839", "name": "d", - "namespace": "", + "namespace": "clanguml::t20043", "source_location": { "column": 9, "file": "t20043.cc", @@ -132,7 +132,7 @@ int tmain() "full_name": "clanguml::t20043::C::c()", "id": "7990950214723894643", "name": "c", - "namespace": "", + "namespace": "clanguml::t20043", "source_location": { "column": 9, "file": "t20043.cc", diff --git a/docs/test_cases/t20043_sequence.svg b/docs/test_cases/t20043_sequence.svg index abc4cb049..bf398eeab 100644 --- a/docs/test_cases/t20043_sequence.svg +++ b/docs/test_cases/t20043_sequence.svg @@ -1,54 +1,48 @@ - + - - - - - - - - - - - - - - - tmain() - - tmain() + + + + + + + + + tmain() + + tmain() - - - D - - D + + + D + + D - - - C - - C + + + C + + C - - - - - - - d() + + + + + + + d() - - - - c() + + + + c() - - - - + + + + diff --git a/docs/test_cases/t20044.md b/docs/test_cases/t20044.md index 5b41d1af8..6fb17bbe1 100644 --- a/docs/test_cases/t20044.md +++ b/docs/test_cases/t20044.md @@ -156,7 +156,7 @@ int tmain() "full_name": "clanguml::t20044::R::R((lambda at t20044.cc:74:9) &&)", "id": "16975594751449851498", "name": "R", - "namespace": "", + "namespace": "clanguml::t20044", "source_location": { "column": 27, "file": "t20044.cc", @@ -186,7 +186,7 @@ int tmain() "full_name": "clanguml::t20044::tmain()::(lambda t20044.cc:74:9)::operator()() const", "id": "6546857217762918655", "name": "operator()", - "namespace": "", + "namespace": "clanguml::t20044::tmain()", "type": "method" } ], @@ -210,7 +210,7 @@ int tmain() "full_name": "clanguml::t20044::A::a() const", "id": "6831600594577796197", "name": "a", - "namespace": "", + "namespace": "clanguml::t20044", "source_location": { "column": 10, "file": "t20044.cc", @@ -224,7 +224,7 @@ int tmain() "full_name": "clanguml::t20044::A::a5()", "id": "13949529316163085262", "name": "a5", - "namespace": "", + "namespace": "clanguml::t20044", "source_location": { "column": 10, "file": "t20044.cc", @@ -238,7 +238,7 @@ int tmain() "full_name": "clanguml::t20044::A::a1() const", "id": "5611193800300214809", "name": "a1", - "namespace": "", + "namespace": "clanguml::t20044", "source_location": { "column": 10, "file": "t20044.cc", @@ -252,7 +252,7 @@ int tmain() "full_name": "clanguml::t20044::A::a2(int) const", "id": "681156560065952195", "name": "a2", - "namespace": "", + "namespace": "clanguml::t20044", "source_location": { "column": 10, "file": "t20044.cc", @@ -282,7 +282,7 @@ int tmain() "full_name": "clanguml::t20044::tmain()::(lambda t20044.cc:84:18)::operator()() const", "id": "3488770978421009441", "name": "operator()", - "namespace": "", + "namespace": "clanguml::t20044::tmain()", "type": "method" } ], @@ -306,7 +306,7 @@ int tmain() "full_name": "clanguml::t20044::detail::expected::expected(int)", "id": "12315729204979881038", "name": "expected", - "namespace": "", + "namespace": "clanguml::t20044::detail::expected::and_then((lambda at t20044.cc:90:19) &&)", "id": "3016587988242138783", "name": "and_then", - "namespace": "", + "namespace": "clanguml::t20044::detail::expected::and_then(result_t (&)(int))", "id": "15799134065214219790", "name": "and_then", - "namespace": "", + "namespace": "clanguml::t20044::detail::expected::and_then(std::function &)", "id": "9828960440669252853", "name": "and_then", - "namespace": "", + "namespace": "clanguml::t20044::detail::expected::value() const", "id": "7638437815753644849", "name": "value", - "namespace": "", + "namespace": "clanguml::t20044::detail::expected + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - tmain() - - tmain() - - - - R - - R - - - - tmain()::(lambda t20044.cc:74:9) - - tmain()::(lambda t20044.cc:74:9) - - - - A - - A - - - - tmain()::(lambda t20044.cc:84:18) - - tmain()::(lambda t20044.cc:84:18) - - - - result_t - - result_t - - - - tmain()::(lambda t20044.cc:90:19) - - tmain()::(lambda t20044.cc:90:19) - - - - - - - - - - - - - - - - - - - - R((lambda at t20044.cc:74:9) &&) - - - - - operator()() const - - - - Call to template constructor - with callable parameter and - lambda expression as argument - - - - a() const - - - - - operator()() const - - - - The message to detail2::run() - is skipped due to exclude - filter, however the call - to lambda and A::a5() is - rendered TODO: Add some marker - to highlight that this is - not a direct call - - - - a5() - - - - - a1() const - - - - - expected(int) - - - - - - - and_then((lambda at t20044.cc:90:19) &&) - - - - alt - - - - operator()(auto &&) const - - - - Call to a template method - accepting a callable with - lambda expression as argument, - fully tracked showing method's - activity and - - - - a2(int) const - - - - - expected(int) - - - - - - - - - - - and_then(result_t (&)(int)) - - - - - - - and_then(std::function<result_t (int)> &) - - - - - - - value() const - - - + + + + + + + + + + + + + + + + + + + + + + + + + + tmain() + + tmain() + + + + R + + R + + + + tmain()::(lambda t20044.cc:74:9) + + tmain()::(lambda t20044.cc:74:9) + + + + A + + A + + + + tmain()::(lambda t20044.cc:84:18) + + tmain()::(lambda t20044.cc:84:18) + + + + result_t + + result_t + + + + tmain()::(lambda t20044.cc:90:19) + + tmain()::(lambda t20044.cc:90:19) + + + + + + + + + + + + + + + + + + + + R((lambda at t20044.cc:74:9) &&) + + + + + operator()() const + + + + Call to template constructor + with callable parameter and + lambda expression as argument + + + + a() const + + + + + operator()() const + + + + The message to detail2::run() + is skipped due to exclude + filter, however the call + to lambda and A::a5() is + rendered TODO: Add some marker + to highlight that this is + not a direct call + + + + a5() + + + + + a1() const + + + + + expected(int) + + + + + + + and_then((lambda at t20044.cc:90:19) &&) + + + + alt + + + + operator()(auto &&) const + + + + Call to a template method + accepting a callable with + lambda expression as argument, + fully tracked showing method's + activity and + + + + a2(int) const + + + + + expected(int) + + + + + + + + + + + and_then(result_t (&)(int)) + + + + + + + and_then(std::function<result_t (int)> &) + + + + + + + value() const + + + diff --git a/docs/test_cases/t20045.md b/docs/test_cases/t20045.md index 4a5de42f6..3116df463 100644 --- a/docs/test_cases/t20045.md +++ b/docs/test_cases/t20045.md @@ -125,7 +125,7 @@ int tmain() "full_name": "clanguml::t20045::tmain()::(lambda t20045.cc:35:18)::operator()(auto &&) const", "id": "11363928895219585509", "name": "operator()", - "namespace": "", + "namespace": "clanguml::t20045::tmain()", "type": "method" } ], @@ -177,7 +177,7 @@ int tmain() "full_name": "clanguml::t20045::tmain()::(lambda t20045.cc:37:18)::operator()(auto &&) const", "id": "15961739097072089156", "name": "operator()", - "namespace": "", + "namespace": "clanguml::t20045::tmain()", "type": "method" } ], @@ -201,7 +201,7 @@ int tmain() "full_name": "clanguml::t20045::B::b1(int)", "id": "6563501167989525913", "name": "b1", - "namespace": "", + "namespace": "clanguml::t20045", "source_location": { "column": 9, "file": "t20045.cc", @@ -245,7 +245,7 @@ int tmain() "full_name": "clanguml::t20045::tmain()::(lambda t20045.cc:39:18)::operator()(auto &&) const", "id": "6294930768372487717", "name": "operator()", - "namespace": "", + "namespace": "clanguml::t20045::tmain()", "type": "method" } ], @@ -269,7 +269,7 @@ int tmain() "full_name": "clanguml::t20045::C::get_x() const", "id": "4566523073322446011", "name": "get_x", - "namespace": "", + "namespace": "clanguml::t20045", "source_location": { "column": 9, "file": "t20045.cc", diff --git a/docs/test_cases/t20045_sequence.svg b/docs/test_cases/t20045_sequence.svg index 2ee97a3a5..7d62758ad 100644 --- a/docs/test_cases/t20045_sequence.svg +++ b/docs/test_cases/t20045_sequence.svg @@ -1,177 +1,171 @@ - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - tmain() - - tmain() - - - - a2(int) - - a2(int) - - - - a1<(lambda at t20045.cc:35:18)>((lambda at t20045.cc:35:18) &&) - - a1<(lambda at t20045.cc:35:18)>((lambda at t20045.cc:35:18) &&) - - - - tmain()::(lambda t20045.cc:35:18) - - tmain()::(lambda t20045.cc:35:18) - - - - a3(int) - - a3(int) - - - - a1<(lambda at t20045.cc:37:18)>((lambda at t20045.cc:37:18) &&) - - a1<(lambda at t20045.cc:37:18)>((lambda at t20045.cc:37:18) &&) - - - - tmain()::(lambda t20045.cc:37:18) - - tmain()::(lambda t20045.cc:37:18) - - - - B - - B - - - - a1<(lambda at t20045.cc:39:18)>((lambda at t20045.cc:39:18) &&) - - a1<(lambda at t20045.cc:39:18)>((lambda at t20045.cc:39:18) &&) - - - - tmain()::(lambda t20045.cc:39:18) - - tmain()::(lambda t20045.cc:39:18) - - - - C - - C - - - - - - - - - - - - - - - - - - - - - - - - - - operator()(auto &&) const - - - - - - - - - - - - - - - - - - - operator()(auto &&) const - - - - - b1(int) - - - - - - - - - - - - - - - operator()(auto &&) const - - - - - get_x() const - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + tmain() + + tmain() + + + + a2(int) + + a2(int) + + + + a1<(lambda at t20045.cc:35:18)>((lambda at t20045.cc:35:18) &&) + + a1<(lambda at t20045.cc:35:18)>((lambda at t20045.cc:35:18) &&) + + + + tmain()::(lambda t20045.cc:35:18) + + tmain()::(lambda t20045.cc:35:18) + + + + a3(int) + + a3(int) + + + + a1<(lambda at t20045.cc:37:18)>((lambda at t20045.cc:37:18) &&) + + a1<(lambda at t20045.cc:37:18)>((lambda at t20045.cc:37:18) &&) + + + + tmain()::(lambda t20045.cc:37:18) + + tmain()::(lambda t20045.cc:37:18) + + + + B + + B + + + + a1<(lambda at t20045.cc:39:18)>((lambda at t20045.cc:39:18) &&) + + a1<(lambda at t20045.cc:39:18)>((lambda at t20045.cc:39:18) &&) + + + + tmain()::(lambda t20045.cc:39:18) + + tmain()::(lambda t20045.cc:39:18) + + + + C + + C + + + + + + + + + + + + + + + + + + + + + + + + + + operator()(auto &&) const + + + + + + + + + + + + + + + + + + + operator()(auto &&) const + + + + + b1(int) + + + + + + + + + + + + + + + operator()(auto &&) const + + + + + get_x() const + + + + + + + diff --git a/docs/test_cases/t20046.md b/docs/test_cases/t20046.md index a71159fab..d1e362d04 100644 --- a/docs/test_cases/t20046.md +++ b/docs/test_cases/t20046.md @@ -74,7 +74,7 @@ int tmain() "full_name": "clanguml::t20046::tmain()::(lambda t20046.cc:13:15)::operator()(auto &&) const", "id": "1399981358254574182", "name": "operator()", - "namespace": "", + "namespace": "clanguml::t20046::tmain()", "type": "method" } ], @@ -98,7 +98,7 @@ int tmain() "full_name": "clanguml::t20046::clanguml::t20046::tmain()::(lambda t20046.cc:13:15)::(lambda t20046.cc:14:16)::operator()(auto &&) const", "id": "6170983257636432660", "name": "operator()", - "namespace": "", + "namespace": "clanguml::t20046::tmain()::(anonymous class)::operator()(auto &&)", "type": "method" } ], @@ -150,7 +150,7 @@ int tmain() "full_name": "clanguml::t20046::tmain()::(lambda t20046.cc:19:9)::operator()(auto &&) const", "id": "2611972639173990319", "name": "operator()", - "namespace": "", + "namespace": "clanguml::t20046::tmain()", "type": "method" } ], @@ -174,7 +174,7 @@ int tmain() "full_name": "clanguml::t20046::clanguml::t20046::tmain()::(lambda t20046.cc:19:9)::(lambda t20046.cc:19:34)::operator()(auto &&) const", "id": "8748747764292125090", "name": "operator()", - "namespace": "", + "namespace": "clanguml::t20046::tmain()::(anonymous class)::operator()(auto &&)", "type": "method" } ], diff --git a/docs/test_cases/t20046_sequence.svg b/docs/test_cases/t20046_sequence.svg index fe6d2841b..ad01265f7 100644 --- a/docs/test_cases/t20046_sequence.svg +++ b/docs/test_cases/t20046_sequence.svg @@ -1,131 +1,125 @@ - + - - - - - - - - - - - - - - - - - - - - - - - - - tmain() - - tmain() + + + + + + + + + + + + + + + + + + + tmain() + + tmain() - - - tmain()::(lambda t20046.cc:13:15) - - tmain()::(lambda t20046.cc:13:15) + + + tmain()::(lambda t20046.cc:13:15) + + tmain()::(lambda t20046.cc:13:15) - - - tmain()::(lambda t20046.cc:13:15)::(lambda t20046.cc:14:16) - - tmain()::(lambda t20046.cc:13:15)::(lambda t20046.cc:14:16) + + + tmain()::(lambda t20046.cc:13:15)::(lambda t20046.cc:14:16) + + tmain()::(lambda t20046.cc:13:15)::(lambda t20046.cc:14:16) - - - a2(int) - - a2(int) + + + a2(int) + + a2(int) - - - a1<(lambda at t20046.cc:19:9)>((lambda at t20046.cc:19:9) &&) - - a1<(lambda at t20046.cc:19:9)>((lambda at t20046.cc:19:9) &&) + + + a1<(lambda at t20046.cc:19:9)>((lambda at t20046.cc:19:9) &&) + + a1<(lambda at t20046.cc:19:9)>((lambda at t20046.cc:19:9) &&) - - - tmain()::(lambda t20046.cc:19:9) - - tmain()::(lambda t20046.cc:19:9) + + + tmain()::(lambda t20046.cc:19:9) + + tmain()::(lambda t20046.cc:19:9) - - - tmain()::(lambda t20046.cc:19:9)::(lambda t20046.cc:19:34) - - tmain()::(lambda t20046.cc:19:9)::(lambda t20046.cc:19:34) + + + tmain()::(lambda t20046.cc:19:9)::(lambda t20046.cc:19:34) + + tmain()::(lambda t20046.cc:19:9)::(lambda t20046.cc:19:34) - - - a3(int) - - a3(int) + + + a3(int) + + a3(int) - - - - - - - - - - - - operator()(auto &&) const + + + + + + + + + + + + operator()(auto &&) const - - - - operator()(auto &&) const + + + + operator()(auto &&) const - - - + + + - - - - - - - - - + + + + + + + + + - - - - operator()(auto &&) const + + + + operator()(auto &&) const - - - - operator()(auto &&) const + + + + operator()(auto &&) const - - - + + + - - - - - - - - + + + + + + + + diff --git a/docs/test_cases/t20047_sequence.svg b/docs/test_cases/t20047_sequence.svg index fc2bd521e..fe921479c 100644 --- a/docs/test_cases/t20047_sequence.svg +++ b/docs/test_cases/t20047_sequence.svg @@ -1,112 +1,106 @@ - + - - - - - - - - - - - - - - - - - - - - - - - tmain() - - tmain() + + + + + + + + + + + + + + + + + tmain() + + tmain() - - - a1(int) - - a1(int) + + + a1(int) + + a1(int) - - - a2(int) - - a2(int) + + + a2(int) + + a2(int) - - - a3(int) - - a3(int) + + + a3(int) + + a3(int) - - - a4(int) - - a4(int) + + + a4(int) + + a4(int) - - - a5(int) - - a5(int) + + + a5(int) + + a5(int) - - - a6(int) - - a6(int) + + + a6(int) + + a6(int) - - - - - - - - - - + + + + + + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - + + diff --git a/docs/test_cases/t20048.md b/docs/test_cases/t20048.md index d50755b31..bc7e03f35 100644 --- a/docs/test_cases/t20048.md +++ b/docs/test_cases/t20048.md @@ -133,7 +133,7 @@ int tmain() "full_name": "clanguml::t20048::tmain()::(lambda t20048.cc:26:11)::operator()(auto &&) const", "id": "10177712496399063540", "name": "operator()", - "namespace": "", + "namespace": "clanguml::t20048::tmain()", "type": "method" } ], diff --git a/docs/test_cases/t20048_sequence.svg b/docs/test_cases/t20048_sequence.svg index 6b629298c..fb189d8cf 100644 --- a/docs/test_cases/t20048_sequence.svg +++ b/docs/test_cases/t20048_sequence.svg @@ -1,161 +1,155 @@ - + - - - - - - - - - - - - - - - - - - - - - - - - - - - tmain() - - tmain() - - - - a3(int) - - a3(int) - - - - a2(int) - - a2(int) - - - - a1(int) - - a1(int) - - - - tmain()::(lambda t20048.cc:26:11) - - tmain()::(lambda t20048.cc:26:11) - - - - a4(int) - - a4(int) - - - - a6(int) - - a6(int) - - - - a5(int) - - a5(int) - - - - a7(int) - - a7(int) - - - - - - - - - - - - - - - - - - - - - - - - - a1() adds `1` to the result - of a2() - - - - - - - - - This lambda calls a4() which - adds `4` to it's argument - - - - operator()(auto &&) const - - - - - - - - - - - - a6() adds `1` to its argument - - - - - - - - - a5() adds `1` to the result - of a6() - - - - - - - - - a7() is called via add std::async - - - - - - + + + + + + + + + + + + + + + + + + + + + tmain() + + tmain() + + + + a3(int) + + a3(int) + + + + a2(int) + + a2(int) + + + + a1(int) + + a1(int) + + + + tmain()::(lambda t20048.cc:26:11) + + tmain()::(lambda t20048.cc:26:11) + + + + a4(int) + + a4(int) + + + + a6(int) + + a6(int) + + + + a5(int) + + a5(int) + + + + a7(int) + + a7(int) + + + + + + + + + + + + + + + + + + + + + + + + + a1() adds `1` to the result + of a2() + + + + + + + + + This lambda calls a4() which + adds `4` to it's argument + + + + operator()(auto &&) const + + + + + + + + + + + + a6() adds `1` to its argument + + + + + + + + + a5() adds `1` to the result + of a6() + + + + + + + + + a7() is called via add std::async + + + + + + diff --git a/docs/test_cases/t20049.md b/docs/test_cases/t20049.md index 142b6cf5b..885cab030 100644 --- a/docs/test_cases/t20049.md +++ b/docs/test_cases/t20049.md @@ -5,7 +5,7 @@ diagrams: t20049_sequence: type: sequence glob: - - t20049.cu + - r: ".*t20049.cu$" include: namespaces: - clanguml::t20049 diff --git a/docs/test_cases/t20049_sequence.svg b/docs/test_cases/t20049_sequence.svg index 3ce7fd2ad..857ef66fb 100644 --- a/docs/test_cases/t20049_sequence.svg +++ b/docs/test_cases/t20049_sequence.svg @@ -1,83 +1,77 @@ - + - - - - - - - - - - - - - - - - - - - tmain() - - tmain() + + + + + + + + + + + + + tmain() + + tmain() - - - «CUDA Kernel» - vector_square_add(float *,float *,float *,int) - - «CUDA Kernel» - vector_square_add(float *,float *,float *,int) + + + «CUDA Kernel» + vector_square_add(float *,float *,float *,int) + + «CUDA Kernel» + vector_square_add(float *,float *,float *,int) - - - «CUDA Device» - square(float) - - «CUDA Device» - square(float) + + + «CUDA Device» + square(float) + + «CUDA Device» + square(float) - - - «CUDA Device» - add<float>(float,float) - - «CUDA Device» - add<float>(float,float) + + + «CUDA Device» + add<float>(float,float) + + «CUDA Device» + add<float>(float,float) - - - - - - - - + + + + + + + + - - - loop - - - + + + loop + + + - - - - - + + + + + - - - - - + + + + + - - + + diff --git a/docs/test_cases/t20050_sequence.svg b/docs/test_cases/t20050_sequence.svg index bd7661931..6986a1be0 100644 --- a/docs/test_cases/t20050_sequence.svg +++ b/docs/test_cases/t20050_sequence.svg @@ -1,81 +1,75 @@ - + - - - - - - - - - - - - - - - t20050.cu - - t20050.cu - - - - - - - - tmain() - - - - - - << CUDA Kernel >> - vector_square_add(float *,float *,float *,int) + + + + + + + + + t20050.cu + + t20050.cu + + + + + + + + tmain() + + + + + + «CUDA Kernel» + vector_square_add(float *,float *,float *,int) - - - loop - - - - - - << CUDA Device >> - square(float) + + + loop + + + + + + «CUDA Device» + square(float) - - - - - - - - - - << CUDA Device >> - square(float) + + + + + + + + + + «CUDA Device» + square(float) - - - - - - - - - - << CUDA Device >> - add<float>(float,float) + + + + + + + + + + «CUDA Device» + add<float>(float,float) - - - - - - + + + + + + diff --git a/docs/test_cases/t20051_sequence.svg b/docs/test_cases/t20051_sequence.svg index 9828639d5..eed44133c 100644 --- a/docs/test_cases/t20051_sequence.svg +++ b/docs/test_cases/t20051_sequence.svg @@ -1,37 +1,31 @@ - + - - - - - - - - - - - - - tmain() - - tmain() + + + + + + + tmain() + + tmain() - - - «CUDA Kernel» - vector_square_add(float *,float *,float *,int) - - «CUDA Kernel» - vector_square_add(float *,float *,float *,int) + + + «CUDA Kernel» + vector_square_add(float *,float *,float *,int) + + «CUDA Kernel» + vector_square_add(float *,float *,float *,int) - - - - - + + + + + diff --git a/docs/test_cases/t20052.md b/docs/test_cases/t20052.md index fb2b970f7..24c000eb1 100644 --- a/docs/test_cases/t20052.md +++ b/docs/test_cases/t20052.md @@ -154,7 +154,7 @@ void tmain() "full_name": "clanguml::t20052::A::a()", "id": "9812288086881147823", "name": "a", - "namespace": "", + "namespace": "clanguml::t20052", "source_location": { "column": 10, "file": "t20052.cc", @@ -168,7 +168,7 @@ void tmain() "full_name": "clanguml::t20052::A::aa()", "id": "1219182608592065706", "name": "aa", - "namespace": "", + "namespace": "clanguml::t20052", "source_location": { "column": 10, "file": "t20052.cc", @@ -182,7 +182,7 @@ void tmain() "full_name": "clanguml::t20052::A::aaa()", "id": "10702433226446089600", "name": "aaa", - "namespace": "", + "namespace": "clanguml::t20052", "source_location": { "column": 10, "file": "t20052.cc", @@ -212,7 +212,7 @@ void tmain() "full_name": "clanguml::t20052::B::b()", "id": "2556125950244593078", "name": "b", - "namespace": "", + "namespace": "clanguml::t20052", "source_location": { "column": 10, "file": "t20052.cc", @@ -226,7 +226,7 @@ void tmain() "full_name": "clanguml::t20052::B::bb()", "id": "5176546195294219959", "name": "bb", - "namespace": "", + "namespace": "clanguml::t20052", "source_location": { "column": 10, "file": "t20052.cc", @@ -240,7 +240,7 @@ void tmain() "full_name": "clanguml::t20052::B::bbb()", "id": "6794990482409299371", "name": "bbb", - "namespace": "", + "namespace": "clanguml::t20052", "source_location": { "column": 10, "file": "t20052.cc", @@ -270,7 +270,7 @@ void tmain() "full_name": "clanguml::t20052::C::c()", "id": "2293882177893545884", "name": "c", - "namespace": "", + "namespace": "clanguml::t20052", "source_location": { "column": 10, "file": "t20052.cc", @@ -284,7 +284,7 @@ void tmain() "full_name": "clanguml::t20052::C::cc()", "id": "7418624241505725736", "name": "cc", - "namespace": "", + "namespace": "clanguml::t20052", "source_location": { "column": 10, "file": "t20052.cc", @@ -298,7 +298,7 @@ void tmain() "full_name": "clanguml::t20052::C::ccc()", "id": "5866393105513762844", "name": "ccc", - "namespace": "", + "namespace": "clanguml::t20052", "source_location": { "column": 10, "file": "t20052.cc", @@ -328,7 +328,7 @@ void tmain() "full_name": "clanguml::t20052::R<(lambda at t20052.cc:86:9)>::R((lambda at t20052.cc:86:9) &&)", "id": "14175291084158731020", "name": "R", - "namespace": "", + "namespace": "clanguml::t20052", "source_location": { "column": 5, "file": "t20052.cc", @@ -342,7 +342,7 @@ void tmain() "full_name": "clanguml::t20052::R<(lambda at t20052.cc:86:9)>::r()", "id": "13147751979125455669", "name": "r", - "namespace": "", + "namespace": "clanguml::t20052", "source_location": { "column": 10, "file": "t20052.cc", @@ -372,7 +372,7 @@ void tmain() "full_name": "clanguml::t20052::D::add5(int) const", "id": "16796556393892277847", "name": "add5", - "namespace": "", + "namespace": "clanguml::t20052", "source_location": { "column": 9, "file": "t20052.cc", diff --git a/docs/test_cases/t20052_sequence.svg b/docs/test_cases/t20052_sequence.svg index 55eaa4ce1..30bb5e6a7 100644 --- a/docs/test_cases/t20052_sequence.svg +++ b/docs/test_cases/t20052_sequence.svg @@ -1,230 +1,224 @@ - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - tmain() - - tmain() - - - - A - - A - - - - B - - B - - - - C - - C - - - - R<(lambda at t20052.cc:86:9)> - - R<(lambda at t20052.cc:86:9)> - - - - D - - D - - - - - - - - - - - - - - - - - - - - - - - - - - - a() - - - - - - - aa() - - - - - - - aaa() - - - - - b() - - - - - - - bb() - - - - - - - bbb() - - - - - c() - - - - - - - cc() - - - - - - - ccc() - - - - - a() - - - - - - - aa() - - - - - - - aaa() - - - - - b() - - - - - - - bb() - - - - - - - bbb() - - - - - R((lambda at t20052.cc:86:9) &&) - - - - - r() - - - - - c() - - - - - - - cc() - - - - - - - ccc() - - - - - add5(int) const - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + tmain() + + tmain() + + + + A + + A + + + + B + + B + + + + C + + C + + + + R<(lambda at t20052.cc:86:9)> + + R<(lambda at t20052.cc:86:9)> + + + + D + + D + + + + + + + + + + + + + + + + + + + + + + + + + + + a() + + + + + + + aa() + + + + + + + aaa() + + + + + b() + + + + + + + bb() + + + + + + + bbb() + + + + + c() + + + + + + + cc() + + + + + + + ccc() + + + + + a() + + + + + + + aa() + + + + + + + aaa() + + + + + b() + + + + + + + bb() + + + + + + + bbb() + + + + + R((lambda at t20052.cc:86:9) &&) + + + + + r() + + + + + c() + + + + + + + cc() + + + + + + + ccc() + + + + + add5(int) const + + + diff --git a/docs/test_cases/t20053_sequence.svg b/docs/test_cases/t20053_sequence.svg index 5ef617da7..3e76e4196 100644 --- a/docs/test_cases/t20053_sequence.svg +++ b/docs/test_cases/t20053_sequence.svg @@ -1,67 +1,61 @@ - + - - - - - - - - - - - - - - - - - tmain() - - tmain() + + + + + + + + + + + tmain() + + tmain() - - - a2(int) - - a2(int) + + + a2(int) + + a2(int) - - - a1<(lambda at t20053.cc:23:9)>((lambda at t20053.cc:23:9) &&) - - a1<(lambda at t20053.cc:23:9)>((lambda at t20053.cc:23:9) &&) + + + a1<(lambda at t20053.cc:23:9)>((lambda at t20053.cc:23:9) &&) + + a1<(lambda at t20053.cc:23:9)>((lambda at t20053.cc:23:9) &&) - - - a3(int) - - a3(int) + + + a3(int) + + a3(int) - - - - - - - + + + + + + + - - - - - + + + + + - - - + + + - - - - + + + + diff --git a/docs/test_cases/t20054.md b/docs/test_cases/t20054.md index 5199476be..bded3da11 100644 --- a/docs/test_cases/t20054.md +++ b/docs/test_cases/t20054.md @@ -84,7 +84,7 @@ void tmain() "full_name": "clanguml::t20054::A::a()", "id": "1698987340403449834", "name": "a", - "namespace": "", + "namespace": "clanguml::t20054", "source_location": { "column": 10, "file": "t20054.cc", @@ -114,7 +114,7 @@ void tmain() "full_name": "clanguml::t20054::A::AA::aa()", "id": "2773833107878981483", "name": "aa", - "namespace": "", + "namespace": "clanguml::t20054::A", "source_location": { "column": 13, "file": "t20054.cc", @@ -128,7 +128,7 @@ void tmain() "full_name": "clanguml::t20054::A::AA::bb()", "id": "11517263835285279", "name": "bb", - "namespace": "", + "namespace": "clanguml::t20054::A", "source_location": { "column": 13, "file": "t20054.cc", @@ -158,7 +158,7 @@ void tmain() "full_name": "clanguml::t20054::A::AA::AAA::aaa()", "id": "18440523953211239190", "name": "aaa", - "namespace": "", + "namespace": "clanguml::t20054::A::AA", "source_location": { "column": 17, "file": "t20054.cc", @@ -188,7 +188,7 @@ void tmain() "full_name": "clanguml::t20054::A::AA::BBB::bbb()", "id": "14647351109927833443", "name": "bbb", - "namespace": "", + "namespace": "clanguml::t20054::A::AA", "source_location": { "column": 17, "file": "t20054.cc", diff --git a/docs/test_cases/t20054_sequence.svg b/docs/test_cases/t20054_sequence.svg index 290e75f9c..1355dc160 100644 --- a/docs/test_cases/t20054_sequence.svg +++ b/docs/test_cases/t20054_sequence.svg @@ -1,91 +1,85 @@ - + - - - - - - - - - - - - - - - - - - - - tmain() - - tmain() + + + + + + + + + + + + + + tmain() + + tmain() - - - A - - A + + + A + + A - - - A::AA - - A::AA + + + A::AA + + A::AA - - - A::AA::AAA - - A::AA::AAA + + + A::AA::AAA + + A::AA::AAA - - - A::AA::BBB - - A::AA::BBB + + + A::AA::BBB + + A::AA::BBB - - - - - - - - - - a() + + + + + + + + + + a() - - - - aa() + + + + aa() - - - - aaa() + + + + aaa() - - - - - - - bb() - - - - bbb() + + + + + + + bb() + + + + bbb() - - - - + + + + diff --git a/docs/test_cases/t20055.md b/docs/test_cases/t20055.md new file mode 100644 index 000000000..cf110edc3 --- /dev/null +++ b/docs/test_cases/t20055.md @@ -0,0 +1,270 @@ +# t20055 - Test case for advanced filter in sequence diagram +## Config +```yaml +diagrams: + t20055_sequence: + type: sequence + filter_mode: advanced + glob: + - t20055.cc + include: + anyof: + namespaces: + - clanguml::t20055::ns2 + elements: + - clanguml::t20055::ns1::B + - clanguml::t20055::ns1::d() + using_namespace: clanguml::t20055 + from: + - function: "clanguml::t20055::ns2::tmain()" +``` +## Source code +File `tests/t20055/t20055.cc` +```cpp +namespace clanguml { +namespace t20055 { +namespace ns1 { + +void d() { } + +struct A { + void a() { } +}; + +struct B { + A a; + void b() + { + a.a(); + d(); + } +}; + +} // namespace ns1 +namespace ns2 { +void f() { } +struct C { + ns1::B b; + void c() + { + b.b(); + f(); + } +}; + +void tmain() +{ + C c; + c.c(); +} + +} // namespace ns2 +} +} +``` +## Generated PlantUML diagrams +![t20055_sequence](./t20055_sequence.svg "Test case for advanced filter in sequence diagram") +## Generated Mermaid diagrams +![t20055_sequence](./t20055_sequence_mermaid.svg "Test case for advanced filter in sequence diagram") +## Generated JSON models +```json +{ + "diagram_type": "sequence", + "name": "t20055_sequence", + "participants": [ + { + "display_name": "tmain()", + "full_name": "clanguml::t20055::ns2::tmain()", + "id": "5694173189272636379", + "name": "tmain", + "namespace": "clanguml::t20055::ns2", + "source_location": { + "column": 6, + "file": "t20055.cc", + "line": 32, + "translation_unit": "t20055.cc" + }, + "type": "function" + }, + { + "activities": [ + { + "display_name": "c()", + "full_name": "clanguml::t20055::ns2::C::c()", + "id": "10990692099772640575", + "name": "c", + "namespace": "clanguml::t20055::ns2", + "source_location": { + "column": 10, + "file": "t20055.cc", + "line": 25, + "translation_unit": "t20055.cc" + }, + "type": "method" + } + ], + "display_name": "ns2::C", + "full_name": "clanguml::t20055::ns2::C", + "id": "1420290765769466590", + "name": "C", + "namespace": "clanguml::t20055::ns2", + "source_location": { + "column": 8, + "file": "t20055.cc", + "line": 23, + "translation_unit": "t20055.cc" + }, + "type": "class" + }, + { + "activities": [ + { + "display_name": "b()", + "full_name": "clanguml::t20055::ns1::B::b()", + "id": "10964116862137631577", + "name": "b", + "namespace": "clanguml::t20055::ns1", + "source_location": { + "column": 10, + "file": "t20055.cc", + "line": 13, + "translation_unit": "t20055.cc" + }, + "type": "method" + } + ], + "display_name": "ns1::B", + "full_name": "clanguml::t20055::ns1::B", + "id": "805503604450527441", + "name": "B", + "namespace": "clanguml::t20055::ns1", + "source_location": { + "column": 8, + "file": "t20055.cc", + "line": 11, + "translation_unit": "t20055.cc" + }, + "type": "class" + }, + { + "display_name": "d()", + "full_name": "clanguml::t20055::ns1::d()", + "id": "16751186802686619072", + "name": "d", + "namespace": "clanguml::t20055::ns1", + "source_location": { + "column": 6, + "file": "t20055.cc", + "line": 5, + "translation_unit": "t20055.cc" + }, + "type": "function" + }, + { + "display_name": "f()", + "full_name": "clanguml::t20055::ns2::f()", + "id": "13923933757393811605", + "name": "f", + "namespace": "clanguml::t20055::ns2", + "source_location": { + "column": 6, + "file": "t20055.cc", + "line": 22, + "translation_unit": "t20055.cc" + }, + "type": "function" + } + ], + "sequences": [ + { + "messages": [ + { + "from": { + "activity_id": "5694173189272636379", + "participant_id": "5694173189272636379" + }, + "name": "c()", + "return_type": "void", + "scope": "normal", + "source_location": { + "column": 5, + "file": "t20055.cc", + "line": 35, + "translation_unit": "t20055.cc" + }, + "to": { + "activity_id": "10990692099772640575", + "participant_id": "1420290765769466590" + }, + "type": "message" + }, + { + "from": { + "activity_id": "10990692099772640575", + "participant_id": "1420290765769466590" + }, + "name": "b()", + "return_type": "void", + "scope": "normal", + "source_location": { + "column": 9, + "file": "t20055.cc", + "line": 27, + "translation_unit": "t20055.cc" + }, + "to": { + "activity_id": "10964116862137631577", + "participant_id": "805503604450527441" + }, + "type": "message" + }, + { + "from": { + "activity_id": "10964116862137631577", + "participant_id": "805503604450527441" + }, + "name": "", + "return_type": "void", + "scope": "normal", + "source_location": { + "column": 9, + "file": "t20055.cc", + "line": 16, + "translation_unit": "t20055.cc" + }, + "to": { + "activity_id": "16751186802686619072", + "participant_id": "16751186802686619072" + }, + "type": "message" + }, + { + "from": { + "activity_id": "10990692099772640575", + "participant_id": "1420290765769466590" + }, + "name": "", + "return_type": "void", + "scope": "normal", + "source_location": { + "column": 9, + "file": "t20055.cc", + "line": 28, + "translation_unit": "t20055.cc" + }, + "to": { + "activity_id": "13923933757393811605", + "participant_id": "13923933757393811605" + }, + "type": "message" + } + ], + "start_from": { + "id": "5694173189272636379", + "location": "clanguml::t20055::ns2::tmain()" + } + } + ], + "using_namespace": "clanguml::t20055" +} +``` diff --git a/docs/test_cases/t20055_sequence.svg b/docs/test_cases/t20055_sequence.svg new file mode 100644 index 000000000..0c2158760 --- /dev/null +++ b/docs/test_cases/t20055_sequence.svg @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + + + ns2::tmain() + + ns2::tmain() + + + + ns2::C + + ns2::C + + + + ns1::B + + ns1::B + + + + ns1::d() + + ns1::d() + + + + ns2::f() + + ns2::f() + + + + + + + + + + c() + + + + + b() + + + + + + + + + + + diff --git a/docs/test_cases/t20055_sequence_mermaid.svg b/docs/test_cases/t20055_sequence_mermaid.svg new file mode 100644 index 000000000..a97adacb9 --- /dev/null +++ b/docs/test_cases/t20055_sequence_mermaid.svg @@ -0,0 +1,138 @@ + + + + + ns2::f() + + + + + + ns1::d() + + + + + + ns1::B + + + + + + ns2::C + + + + + + ns2::tmain() + + + + + + + + ns2::f() + + + + + + + + + ns1::d() + + + + + + + + + ns1::B + + + + + + + + + ns2::C + + + + + + + + + ns2::tmain() + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + c() + + b() + + + + + + diff --git a/docs/test_cases/t30001_package.svg b/docs/test_cases/t30001_package.svg index 1125c6c0b..092d63b43 100644 --- a/docs/test_cases/t30001_package.svg +++ b/docs/test_cases/t30001_package.svg @@ -1,76 +1,87 @@ - + - - - - - - - Basic package diagram example - - - - A + Basic package diagram example + + + + + A + + + + + + + AA + + + + + + + B + + + + + + + AA + + + + + + AAA - - - - AA + + + + BBB - - - - B + + + + BB - - - - AA + + + + AAA - - - - AAA + + + + BBB - - - - BBB + + + + BB - - - - BB - - - - - AAA - - - - - BBB - - - - - BB - - - - A AAA note... - - - This is namespace AA in namespace A - - - This is namespace AA in namespace B - - - + + + + A AAA note... + + + + + This is namespace AA in namespace A + + + + + This is namespace AA in namespace B + + + + + + + diff --git a/docs/test_cases/t30002_package.svg b/docs/test_cases/t30002_package.svg index 111aeae90..110eb2bdc 100644 --- a/docs/test_cases/t30002_package.svg +++ b/docs/test_cases/t30002_package.svg @@ -1,164 +1,202 @@ - + - - - - - - - - - - A - - - - - AA - - - - - B - - - - - BB - - - - - A1 - - - - - A2 - - - - - A3 - - - - - A4 - - - - - A5 - - - - - A6 - - - - - A7 - - - - - A8 - - - - - A9 - - - - - A10 - - - - - A11 - - - - - A12 - - - - - A13 - - - - - A14 - - - - - A15 - - - - - A16 - - - - - A17 - - - - - A18 - - - - - BBB - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + 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_package.svg b/docs/test_cases/t30003_package.svg index a78005b1a..59ece3495 100644 --- a/docs/test_cases/t30003_package.svg +++ b/docs/test_cases/t30003_package.svg @@ -1,47 +1,49 @@ - + - - - - - - - - - - ns1 + + + + + ns1 + + + + + + + ns3 + «deprecated» + + + + + + + ns1 + + + + + + ns2_v1_0_0 - - - - ns3 - «deprecated» + + + + ns2_v0_9_0 + «deprecated» - - - - ns1 + + + + ns2 - - - - ns2_v1_0_0 - - - - - ns2_v0_9_0 - «deprecated» - - - - - ns2 - - - + + + + diff --git a/docs/test_cases/t30004_package.svg b/docs/test_cases/t30004_package.svg index 58ee9ec5d..e26df1d17 100644 --- a/docs/test_cases/t30004_package.svg +++ b/docs/test_cases/t30004_package.svg @@ -1,54 +1,54 @@ - + - - - - - - - - - - A + + + + + A + + + + + + Package AAA. + + + + + Package BBB. + + + + + CCCC package note. + + + + + We skipped DDD. + + + + + AAA - - - Package AAA. - - - Package BBB. - - - CCCC package note. - - - We skipped DDD. - - - - AAA + + + + BBB - - - - BBB + + + + CCC - - - - CCC + + + + EEE - - - - EEE - - - - - diff --git a/docs/test_cases/t30005_package.svg b/docs/test_cases/t30005_package.svg index 2a6ae5a49..ec44a8f3a 100644 --- a/docs/test_cases/t30005_package.svg +++ b/docs/test_cases/t30005_package.svg @@ -1,62 +1,72 @@ - + - - - - - - - - - - A + + + + + A + + + + + + + AA + + + + + + + B + + + + + + + BB + + + + + + + C + + + + + + + CC + + + + + + AAA - - - - AA + + + + BBB - - - - B + + + + CCC - - - - BB - - - - - C - - - - - CC - - - - - AAA - - - - - BBB - - - - - CCC - - - - - + + + + + + + + diff --git a/docs/test_cases/t30006_package.svg b/docs/test_cases/t30006_package.svg index 39df0c501..ea31a4a4f 100644 --- a/docs/test_cases/t30006_package.svg +++ b/docs/test_cases/t30006_package.svg @@ -1,36 +1,35 @@ - + - - - - - - - - - - B + + + + B - - - - A + + + + A - - - - C + + + + C - - - Top A note. - - - - - + + + + Top A note. + + + + + + + + + diff --git a/docs/test_cases/t30007_package.svg b/docs/test_cases/t30007_package.svg index 345370618..8fcd748dc 100644 --- a/docs/test_cases/t30007_package.svg +++ b/docs/test_cases/t30007_package.svg @@ -1,41 +1,45 @@ - + - - - - - - - - - - A + + + + + A + + + + + + B - - - - B + + + + AA - - - - AA + + + + C - - - - C - - - - Compare layout with t30006. - - - - - + + + + Compare layout with t30006. + + + + + + + + + + + + diff --git a/docs/test_cases/t30008_package.svg b/docs/test_cases/t30008_package.svg index a3ea6dfeb..6e8a07aa4 100644 --- a/docs/test_cases/t30008_package.svg +++ b/docs/test_cases/t30008_package.svg @@ -1,61 +1,67 @@ - + - - - - - - - - - - dependants + + + + + dependants + + + + + + + dependencies + + + + + + A - - - - dependencies + + + + B - - - - A + + + + C - - - - B + + + + D - - - - C + + + + E - - - - D + + + + F - - - - E - - - - - F - - - - - - - - - + + + + + + + + + + + + + + + + diff --git a/docs/test_cases/t30009_package.svg b/docs/test_cases/t30009_package.svg index df337da37..117c017d7 100644 --- a/docs/test_cases/t30009_package.svg +++ b/docs/test_cases/t30009_package.svg @@ -1,63 +1,61 @@ - + - - - - - - - - - - One - - - - - Two - - - - - B - - - - - D - - - - - A - - - - - C - - - - - A - - - - - B - - - - - C - - - - - D + + + + + One + + + + + + + Two + + + + + + B + + + + + D + + + + + A + + + + + C + + + + + A + + + + + B + + + + + C + + + + + D diff --git a/docs/test_cases/t30010_package.svg b/docs/test_cases/t30010_package.svg index 992037668..016e2771c 100644 --- a/docs/test_cases/t30010_package.svg +++ b/docs/test_cases/t30010_package.svg @@ -1,49 +1,53 @@ - + - - - - - - - - - libraries - - - - lib1 + + + + libraries + + + + + lib1 - - - - lib2 + + + + lib2 - - - - lib3 + + + + lib3 - - - - lib4 + + + + lib4 - - - - app + + + + app - - - - - - - - + + + + + + + + + + + + + + + + diff --git a/docs/test_cases/t30011_package.svg b/docs/test_cases/t30011_package.svg index 681bc9d06..7ce24d682 100644 --- a/docs/test_cases/t30011_package.svg +++ b/docs/test_cases/t30011_package.svg @@ -1,49 +1,53 @@ - + - - - - - - - - - libraries - - - - lib1 + + + + libraries + + + + + lib1 - - - - lib2 + + + + lib2 - - - - lib3 + + + + lib3 - - - - lib4 + + + + lib4 - - - - app + + + + app - - - - - - - - + + + + + + + + + + + + + + + + diff --git a/docs/test_cases/t30012_package.svg b/docs/test_cases/t30012_package.svg index 18b5bbd4b..0eae61655 100644 --- a/docs/test_cases/t30012_package.svg +++ b/docs/test_cases/t30012_package.svg @@ -1,36 +1,34 @@ - + - - - - - - - - - app - - - - lib1 + + + + app + + + + + + lib1 + + + + + + mod1 - - - - mod1 + + + + mod2 - - - - mod2 - - - - - lib2 + + + + lib2 diff --git a/docs/test_cases/t30013_package.svg b/docs/test_cases/t30013_package.svg index ac061c21d..9390f7dce 100644 --- a/docs/test_cases/t30013_package.svg +++ b/docs/test_cases/t30013_package.svg @@ -1,144 +1,174 @@ - + - - - - - - - - - - mod1 - - - - - mod2 - - - - - mod3 - - - - - mod4 - - - - - mod5 - - - - - mod6 - - - - - mod7 - - - - - mod8 - - - - - mod9 - - - - - mod10 - - - - - mod11 - - - - - mod12 - - - - - mod13 - - - - - mod14 - - - - - mod15 - - - - - mod16 - - - - - mod17 - - - - - mod18 - - - - - app - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + 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/t30014_package.svg b/docs/test_cases/t30014_package.svg index 0ad1869e7..4e0e42613 100644 --- a/docs/test_cases/t30014_package.svg +++ b/docs/test_cases/t30014_package.svg @@ -1,31 +1,29 @@ - + - - - - - - - - - app - - - - :lib1 + + + + app + + + + + + :lib1 + + + + + + mod1 - - - - mod1 - - - - - :lib2 + + + + :lib2 diff --git a/docs/test_cases/t30015.md b/docs/test_cases/t30015.md index 21b7fb0cd..216c01428 100644 --- a/docs/test_cases/t30015.md +++ b/docs/test_cases/t30015.md @@ -91,25 +91,6 @@ module; 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 { @@ -550,7 +531,7 @@ struct CO { }; "source_location": { "column": 7, "file": "src/app.cppm", - "line": 33, + "line": 14, "translation_unit": "t30015.cc" }, "type": "module" diff --git a/docs/test_cases/t30015_package.svg b/docs/test_cases/t30015_package.svg index c392fee5f..c2550710c 100644 --- a/docs/test_cases/t30015_package.svg +++ b/docs/test_cases/t30015_package.svg @@ -1,147 +1,179 @@ - + - - - - - - - - - lib1 - - - - :mod1 - - - - - :mod2 - - - - - :mod3 - - - - - :mod4 - - - - - :mod5 - - - - - :mod6 - - - - - :mod7 - - - - - :mod8 - - - - - :mod9 - - - - - :mod10 - - - - - :mod11 - - - - - :mod12 - - - - - :mod13 - - - - - :mod14 - - - - - :mod15 - - - - - :mod16 - - - - - :mod17 - - - - - :mod18 - - - - - app - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + 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_include.svg b/docs/test_cases/t40001_include.svg index 612203417..6656dbade 100644 --- a/docs/test_cases/t40001_include.svg +++ b/docs/test_cases/t40001_include.svg @@ -1,65 +1,97 @@ - + - - - - - - - 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 - - - - - - - - - - - - - - + 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 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/test_cases/t40001_include_mermaid.svg b/docs/test_cases/t40001_include_mermaid.svg index 67b15800c..4af87fea0 100644 --- a/docs/test_cases/t40001_include_mermaid.svg +++ b/docs/test_cases/t40001_include_mermaid.svg @@ -138,7 +138,7 @@ - + @@ -151,20 +151,18 @@ - - - - - - -
- lib1.h -
-
-
+ + + + + +
+ lib1.h +
+
-
- +
+ diff --git a/docs/test_cases/t40002_include.svg b/docs/test_cases/t40002_include.svg index 18db7fd33..1ac197b8a 100644 --- a/docs/test_cases/t40002_include.svg +++ b/docs/test_cases/t40002_include.svg @@ -1,66 +1,92 @@ - + - - - - - - - - - src - - - lib1 - - - lib2 - - - include - - - lib1 - - - lib2 - - - - t40002.cc - - - - - lib1.cc - - - - - lib2.cc - - - - - lib1.h - - - - - lib2.h - - - - - - - - - - - + + + + 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 de6291016..ef35d96f1 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 be508764d..b0742f56b 100644 --- a/docs/test_cases/t40003.md +++ b/docs/test_cases/t40003.md @@ -318,11 +318,6 @@ void t2() { t1(); } "source": "9722595473477539496", "type": "association" }, - { - "destination": "15063527289428202824", - "source": "9722595473477539496", - "type": "association" - }, { "destination": "9814745789083909391", "source": "17726793412846848469", @@ -357,16 +352,6 @@ void t2() { t1(); } "destination": "8962059906444515418", "source": "16849033273915995749", "type": "association" - }, - { - "destination": "15065692964616746228", - "source": "16849033273915995749", - "type": "association" - }, - { - "destination": "7559120824700944250", - "source": "15065692964616746228", - "type": "association" } ] } diff --git a/docs/test_cases/t40003_include.svg b/docs/test_cases/t40003_include.svg index 1e7fe2fa8..95f883076 100644 --- a/docs/test_cases/t40003_include.svg +++ b/docs/test_cases/t40003_include.svg @@ -1,88 +1,128 @@ - + - - - - - - - - - src - - - dependants - - - dependencies - - - include - - - dependants - - - dependencies - - - - t1.cc - - - - - t2.cc - - - - - t3.h - - - - - t2.h - - - - t1.h - - - - t3.h - - - - - t2.h - - - - t1.h - - - - t5.h - - - - - - - - - - - - - - - - - + + + + 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 b6b5692e8..f7924af67 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,20 +193,18 @@ - - - - - - -
- t1.h -
-
-
+ + + + + +
+ t1.h +
+
-
- +
+ @@ -219,7 +217,7 @@ - + @@ -232,7 +230,7 @@ - + @@ -245,20 +243,18 @@ - - - - - - -
- t1.h -
-
-
+ + + + + +
+ t1.h +
+
-
- +
+ @@ -271,7 +267,7 @@ - + diff --git a/docs/test_cases/t90000.md b/docs/test_cases/t90000.md index 8bdae2890..7a834e2e1 100644 --- a/docs/test_cases/t90000.md +++ b/docs/test_cases/t90000.md @@ -5,6 +5,8 @@ allow_empty_diagrams: true diagrams: t90000_class: type: class + glob: + - NONE plantuml: before: - 'class "Foo" as C_001' diff --git a/docs/test_cases/t90000_class.svg b/docs/test_cases/t90000_class.svg index 64b6d9629..39a6ebd54 100644 --- a/docs/test_cases/t90000_class.svg +++ b/docs/test_cases/t90000_class.svg @@ -1,48 +1,60 @@ - + - - - - - - - - - - Foo - - - int value - - - - - ArrayList - - - - - This is a very important class. - - - This is a - floating note - - - This note is connected - to several objects. - - - - Boo - - - - - - + + + + + Foo + + + int value + + + + + + + ArrayList + + + + + + + This is a very important class. + + + + + This is a + floating note + + + + + This note is connected + to several objects. + + + + + + Boo + + + + + + + + + + + + + diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md index 858b78da2..801798f36 100644 --- a/docs/troubleshooting.md +++ b/docs/troubleshooting.md @@ -12,6 +12,7 @@ * [YAML anchors and aliases are not fully supported](#yaml-anchors-and-aliases-are-not-fully-supported) * [Schema validation error is thrown, but the configuration file is correct](#schema-validation-error-is-thrown-but-the-configuration-file-is-correct) * ["fatal error: 'stddef.h' file not found"](#fatal-error-stddefh-file-not-found) + * ["error: unknown pragma ignored"](#error-unknown-pragma-ignored) * [Class diagrams](#class-diagrams) * [How can I generate class diagram of my entire project](#how-can-i-generate-class-diagram-of-my-entire-project) * [Cannot generate classes for 'std' namespace](#cannot-generate-classes-for-std-namespace) @@ -144,6 +145,14 @@ remove_compile_flags: - -Wshadow ``` +If you don't care about warnings in general during the diagram generation, a +more convenient option is to ignore all warnings: + +```yaml +add_compile_flags: + - -Wno-unknown-warning-option +``` + ### Errors with C++20 modules and LLVM 18 When running `clang-uml` on code using C++20 modules, the LLVM version used to @@ -283,6 +292,17 @@ clang-uml --add-compile-flag -I/opt/my_toolchain/include \ Also see [here](./md_docs_2common__options.html#resolving-include-path-and-compiler-flags-issues). +### "error: unknown pragma ignored" +If your code bases uses some non-standard pragmas declarations or you +are using older LLVM version, which does not yet support a specific pragma, the +warning can be ignore by adding the following compilation flag in the `.clang-uml` +config: + +```yaml +add_compile_flags: + - -Wno-unknown-pragmas +``` + ## Class diagrams ### How can I generate class diagram of my entire project diff --git a/src/class_diagram/generators/json/class_diagram_generator.cc b/src/class_diagram/generators/json/class_diagram_generator.cc index 464b87726..df4807ce4 100644 --- a/src/class_diagram/generators/json/class_diagram_generator.cc +++ b/src/class_diagram/generators/json/class_diagram_generator.cc @@ -158,26 +158,17 @@ void generator::generate_top_level_elements(nlohmann::json &parent) const { for (const auto &p : model()) { if (auto *pkg = dynamic_cast(p.get()); pkg) { - if (!pkg->is_empty() && - !pkg->all_of([this](const common::model::element &e) { - return !model().should_include(e); - })) + if (!pkg->is_empty()) generate(*pkg, parent); } else if (auto *cls = dynamic_cast(p.get()); cls) { - if (model().should_include(*cls)) { - generate(*cls, parent); - } + generate(*cls, parent); } else if (auto *enm = dynamic_cast(p.get()); enm) { - if (model().should_include(*enm)) { - generate(*enm, parent); - } + generate(*enm, parent); } else if (auto *cpt = dynamic_cast(p.get()); cpt) { - if (model().should_include(*cpt)) { - generate(*cpt, parent); - } + generate(*cpt, parent); } } } @@ -203,10 +194,7 @@ void generator::generate(const package &p, nlohmann::json &parent) const for (const auto &subpackage : p) { if (dynamic_cast(subpackage.get()) != nullptr) { const auto &sp = dynamic_cast(*subpackage); - if (!sp.is_empty() && - !sp.all_of([this](const common::model::element &e) { - return !model().should_include(e); - })) { + if (!sp.is_empty()) { if (config().generate_packages()) generate(sp, package_object); else @@ -214,28 +202,22 @@ void generator::generate(const package &p, nlohmann::json &parent) const } } else if (auto *cls = dynamic_cast(subpackage.get()); cls) { - if (model().should_include(*cls)) { - if (config().generate_packages()) - generate(*cls, package_object); - else - generate(*cls, parent); - } + if (config().generate_packages()) + generate(*cls, package_object); + else + generate(*cls, parent); } else if (auto *enm = dynamic_cast(subpackage.get()); enm) { - if (model().should_include(*enm)) { - if (config().generate_packages()) - generate(*enm, package_object); - else - generate(*enm, parent); - } + if (config().generate_packages()) + generate(*enm, package_object); + else + generate(*enm, parent); } else if (auto *cpt = dynamic_cast(subpackage.get()); cpt) { - if (model().should_include(*cpt)) { - if (config().generate_packages()) - generate(*cpt, package_object); - else - generate(*cpt, parent); - } + if (config().generate_packages()) + generate(*cpt, package_object); + else + generate(*cpt, parent); } } @@ -253,6 +235,9 @@ void generator::generate(const class_ &c, nlohmann::json &parent) const object["display_name"] = common::generators::json::render_name(c.full_name_no_ns()); + object["display_name"] = + config().simplify_template_type(object["display_name"]); + for (auto &tp : object["template_parameters"]) { if (tp.contains("type") && tp.at("type").is_string()) { tp["type"] = config().using_namespace().relative(tp.at("type")); @@ -298,19 +283,13 @@ void generator::generate_relationships(nlohmann::json &parent) const generate_relationships(*pkg, parent); } else if (auto *cls = dynamic_cast(p.get()); cls) { - if (model().should_include(*cls)) { - generate_relationships(*cls, parent); - } + generate_relationships(*cls, parent); } else if (auto *enm = dynamic_cast(p.get()); enm) { - if (model().should_include(*enm)) { - generate_relationships(*enm, parent); - } + generate_relationships(*enm, parent); } else if (auto *cpt = dynamic_cast(p.get()); cpt) { - if (model().should_include(*cpt)) { - generate_relationships(*cpt, parent); - } + generate_relationships(*cpt, parent); } } } @@ -319,9 +298,6 @@ void generator::generate_relationships( const class_ &c, nlohmann::json &parent) const { for (const auto &r : c.relationships()) { - if (!model().should_include(r)) - continue; - auto target_element = model().get(r.destination()); if (!target_element.has_value()) { LOG_DBG("Skipping {} relation from {} to {} due " @@ -350,9 +326,6 @@ void generator::generate_relationships( const enum_ &c, nlohmann::json &parent) const { for (const auto &r : c.relationships()) { - if (!model().should_include(r)) - continue; - auto target_element = model().get(r.destination()); if (!target_element.has_value()) { LOG_DBG("Skipping {} relation from {} to {} due " @@ -371,9 +344,6 @@ void generator::generate_relationships( const concept_ &c, nlohmann::json &parent) const { for (const auto &r : c.relationships()) { - if (!model().should_include(r)) - continue; - auto target_element = model().get(r.destination()); if (!target_element.has_value()) { LOG_DBG("Skipping {} relation from {} to {} due " diff --git a/src/class_diagram/generators/mermaid/class_diagram_generator.cc b/src/class_diagram/generators/mermaid/class_diagram_generator.cc index 5af414d06..a7a3cd253 100644 --- a/src/class_diagram/generators/mermaid/class_diagram_generator.cc +++ b/src/class_diagram/generators/mermaid/class_diagram_generator.cc @@ -25,6 +25,7 @@ namespace clanguml::class_diagram::generators::mermaid { using clanguml::common::eid_t; +using clanguml::common::generators::mermaid::escape_name; using clanguml::common::generators::mermaid::indent; using clanguml::common::generators::mermaid::render_name; @@ -50,8 +51,8 @@ void generator::generate_alias( auto class_label = config().simplify_template_type(render_name(full_name)); - ostr << indent(1) << "class " << c.alias() << "[\"" << class_label - << "\"]\n"; + ostr << indent(1) << "class " << c.alias() << "[\"" + << escape_name(class_label) << "\"]\n"; // Register the added alias m_generated_aliases.emplace(c.alias()); @@ -88,9 +89,6 @@ void generator::generate(const class_ &c, std::ostream &ostr) const std::stringstream all_relations_str; for (const auto &r : c.relationships()) { - if (!model().should_include(r.type())) - continue; - try { generate_relationship(r, rendered_relations); } @@ -110,9 +108,6 @@ void generator::generate(const class_ &c, std::ostream &ostr) const sort_class_elements(members); for (const auto &m : members) { - if (!model().should_include(m)) - continue; - if (!config().include_relations_also_as_members() && rendered_relations.find(m.name()) != rendered_relations.end()) continue; @@ -155,11 +150,7 @@ void generator::generate_methods( sort_class_elements(sorted_methods); for (const auto &m : sorted_methods) { - if (!model().should_include(m)) - continue; - generate_method(m, ostr); - ostr << '\n'; } } @@ -169,17 +160,11 @@ generator::method_groups_t generator::group_methods( { std::map> result; - // First get rid of methods which don't pass the filters - std::vector filtered_methods; - std::copy_if(methods.cbegin(), methods.cend(), - std::back_inserter(filtered_methods), - [this](auto &m) { return model().should_include(m); }); - for (const auto &g : method_groups_) { result[g] = {}; } - for (const auto &m : filtered_methods) { + for (const auto &m : methods) { if (m.is_constructor() || m.is_destructor()) { result["constructors"].push_back(m); } @@ -257,7 +242,7 @@ void generator::generate_method( ostr << fmt::format("[{}] ", fmt::join(method_mods, ",")); } - ostr << render_name(type); + ostr << escape_name(render_name(type)); if (m.is_pure_virtual()) ostr << "*"; @@ -276,8 +261,8 @@ void generator::generate_member( ostr << indent(2) << mermaid_common::to_mermaid(m.access()) << m.name() << " : " - << render_name( - uns.relative(config().simplify_template_type(m.type()))); + << escape_name(uns.relative( + config().simplify_template_type(render_name(m.type())))); } void generator::generate(const concept_ &c, std::ostream &ostr) const @@ -294,7 +279,7 @@ void generator::generate(const concept_ &c, std::ostream &ostr) const parameters.reserve(c.requires_parameters().size()); for (const auto &p : c.requires_parameters()) { parameters.emplace_back( - render_name(p.to_string(config().using_namespace()))); + escape_name(p.to_string(config().using_namespace()))); } ostr << indent(2) @@ -302,7 +287,7 @@ void generator::generate(const concept_ &c, std::ostream &ostr) const for (const auto &req : c.requires_statements()) { ostr << indent(2) - << fmt::format("\"{}\"\n", render_name(req, false)); + << fmt::format("\"{}\"\n", escape_name(req, false)); } } @@ -332,19 +317,13 @@ void generator::generate_relationships(std::ostream &ostr) const generate_relationships(*pkg, ostr); } else if (auto *cls = dynamic_cast(p.get()); cls) { - if (model().should_include(*cls)) { - generate_relationships(*cls, ostr); - } + generate_relationships(*cls, ostr); } else if (auto *enm = dynamic_cast(p.get()); enm) { - if (model().should_include(*enm)) { - generate_relationships(*enm, ostr); - } + generate_relationships(*enm, ostr); } else if (auto *cpt = dynamic_cast(p.get()); cpt) { - if (model().should_include(*cpt)) { - generate_relationships(*cpt, ostr); - } + generate_relationships(*cpt, ostr); } } } @@ -400,9 +379,6 @@ void generator::generate_relationships( std::set unique_relations; for (const auto &r : c.relationships()) { - if (!model().should_include(r.type())) - continue; - LOG_DBG("== Processing relationship {}", to_string(r.type())); std::stringstream relstr; @@ -508,9 +484,6 @@ void generator::generate_relationships( std::set unique_relations; for (const auto &r : c.relationships()) { - if (!model().should_include(r.type())) - continue; - LOG_DBG("== Processing relationship {}", to_string(r.type())); std::stringstream relstr; @@ -582,9 +555,6 @@ void generator::generate_relationships( void generator::generate_relationships(const enum_ &e, std::ostream &ostr) const { for (const auto &r : e.relationships()) { - if (!model().should_include(r.type())) - continue; - eid_t destination{}; std::stringstream relstr; try { @@ -717,10 +687,7 @@ void generator::generate_relationships( // packages which do not contain anything but other // packages are skipped const auto &sp = dynamic_cast(*subpackage); - if (!sp.is_empty() && - !sp.all_of([this](const common::model::element &e) { - return !model().should_include(e); - })) + if (!sp.is_empty()) generate_relationships(sp, ostr); } else if (dynamic_cast(subpackage.get()) != nullptr) { @@ -757,52 +724,43 @@ void generator::generate_top_level_elements(std::ostream &ostr) const { for (const auto &p : model()) { if (auto *pkg = dynamic_cast(p.get()); pkg) { - if (!pkg->is_empty() && - !pkg->all_of([this](const common::model::element &e) { - return !model().should_include(e); - })) + if (!pkg->is_empty()) generate(*pkg, ostr); } else if (auto *cls = dynamic_cast(p.get()); cls) { - if (model().should_include(*cls)) { - auto together_group = - config().get_together_group(cls->full_name(false)); - if (together_group) { - together_group_stack_.group_together( - together_group.value(), cls); - } - else { - generate_alias(*cls, ostr); - generate(*cls, ostr); - } + auto together_group = + config().get_together_group(cls->full_name(false)); + if (together_group) { + together_group_stack_.group_together( + together_group.value(), cls); + } + else { + generate_alias(*cls, ostr); + generate(*cls, ostr); } } else if (auto *enm = dynamic_cast(p.get()); enm) { - if (model().should_include(*enm)) { - auto together_group = - config().get_together_group(enm->full_name(false)); - if (together_group) { - together_group_stack_.group_together( - together_group.value(), enm); - } - else { - generate_alias(*enm, ostr); - generate(*enm, ostr); - } + auto together_group = + config().get_together_group(enm->full_name(false)); + if (together_group) { + together_group_stack_.group_together( + together_group.value(), enm); + } + else { + generate_alias(*enm, ostr); + generate(*enm, ostr); } } else if (auto *cpt = dynamic_cast(p.get()); cpt) { - if (model().should_include(*cpt)) { - auto together_group = - config().get_together_group(cpt->full_name(false)); - if (together_group) { - together_group_stack_.group_together( - together_group.value(), cpt); - } - else { - generate_alias(*cpt, ostr); - generate(*cpt, ostr); - } + auto together_group = + config().get_together_group(cpt->full_name(false)); + if (together_group) { + together_group_stack_.group_together( + together_group.value(), cpt); + } + else { + generate_alias(*cpt, ostr); + generate(*cpt, ostr); } } } diff --git a/src/class_diagram/generators/plantuml/class_diagram_generator.cc b/src/class_diagram/generators/plantuml/class_diagram_generator.cc index 8a11ca2e2..4d6d3f1b7 100644 --- a/src/class_diagram/generators/plantuml/class_diagram_generator.cc +++ b/src/class_diagram/generators/plantuml/class_diagram_generator.cc @@ -38,16 +38,24 @@ void generator::generate_link( auto context = element_context(e); - if (!config().generate_links().link.empty()) { + auto maybe_link_pattern = get_link_pattern(e); + if (maybe_link_pattern) { + const auto &[link_prefix, link_pattern] = *maybe_link_pattern; + auto ec = element_context(e); + common::generators::make_context_source_relative(ec, link_prefix); + ostr << " [[["; - ostr << env().render( - std::string_view{config().generate_links().link}, context); + ostr << env().render(std::string_view{link_pattern}, context); } - if (!config().generate_links().tooltip.empty()) { + auto maybe_tooltip_pattern = get_tooltip_pattern(e); + + if (maybe_tooltip_pattern) { + const auto &[tooltip_prefix, tooltip_pattern] = *maybe_tooltip_pattern; + auto ec = element_context(e); + common::generators::make_context_source_relative(ec, tooltip_prefix); ostr << "{"; - ostr << env().render( - std::string_view{config().generate_links().tooltip}, context); + ostr << env().render(std::string_view{tooltip_pattern}, ec); ostr << "}"; } ostr << "]]]"; @@ -157,9 +165,6 @@ void generator::generate(const class_ &c, std::ostream &ostr) const std::stringstream all_relations_str; for (const auto &r : c.relationships()) { - if (!model().should_include(r.type())) - continue; - try { generate_relationship(r, rendered_relations); } @@ -182,9 +187,6 @@ void generator::generate(const class_ &c, std::ostream &ostr) const ostr << "__\n"; for (const auto &m : members) { - if (!model().should_include(m)) - continue; - if (!config().include_relations_also_as_members() && rendered_relations.find(m.name()) != rendered_relations.end()) continue; @@ -228,11 +230,7 @@ void generator::generate_methods( sort_class_elements(sorted_methods); for (const auto &m : sorted_methods) { - if (!model().should_include(m)) - continue; - generate_method(m, ostr); - ostr << '\n'; } } @@ -242,17 +240,11 @@ generator::method_groups_t generator::group_methods( { std::map> result; - // First get rid of methods which don't pass the filters - std::vector filtered_methods; - std::copy_if(methods.cbegin(), methods.cend(), - std::back_inserter(filtered_methods), - [this](auto &m) { return model().should_include(m); }); - for (const auto &g : method_groups_) { result[g] = {}; } - for (const auto &m : filtered_methods) { + for (const auto &m : methods) { if (m.is_constructor() || m.is_destructor()) { result["constructors"].push_back(m); } @@ -417,19 +409,13 @@ void generator::generate_relationships(std::ostream &ostr) const generate_relationships(*pkg, ostr); } else if (auto *cls = dynamic_cast(p.get()); cls) { - if (model().should_include(*cls)) { - generate_relationships(*cls, ostr); - } + generate_relationships(*cls, ostr); } else if (auto *enm = dynamic_cast(p.get()); enm) { - if (model().should_include(*enm)) { - generate_relationships(*enm, ostr); - } + generate_relationships(*enm, ostr); } else if (auto *cpt = dynamic_cast(p.get()); cpt) { - if (model().should_include(*cpt)) { - generate_relationships(*cpt, ostr); - } + generate_relationships(*cpt, ostr); } } } @@ -481,9 +467,6 @@ void generator::generate_relationships( std::set unique_relations; for (const auto &r : c.relationships()) { - if (!model().should_include(r.type())) - continue; - LOG_DBG("== Processing relationship {}", plantuml_common::to_plantuml(r, config())); @@ -661,9 +644,6 @@ void generator::generate(const enum_ &e, std::ostream &ostr) const void generator::generate_relationships(const enum_ &e, std::ostream &ostr) const { for (const auto &r : e.relationships()) { - if (!model().should_include(r.type())) - continue; - eid_t destination{}; std::stringstream relstr; try { @@ -724,10 +704,7 @@ void generator::generate(const package &p, std::ostream &ostr) const if (dynamic_cast(subpackage.get()) != nullptr) { // TODO: add option - generate_empty_packages const auto &sp = dynamic_cast(*subpackage); - if (!sp.is_empty() && - !sp.all_of([this](const common::model::element &e) { - return !model().should_include(e); - })) { + if (!sp.is_empty()) { together_group_stack_.enter(); generate(sp, ostr); @@ -822,10 +799,7 @@ void generator::generate_relationships( // packages which do not contain anything but other // packages are skipped const auto &sp = dynamic_cast(*subpackage); - if (!sp.is_empty() && - !sp.all_of([this](const common::model::element &e) { - return !model().should_include(e); - })) + if (!sp.is_empty()) generate_relationships(sp, ostr); } else if (dynamic_cast(subpackage.get()) != nullptr) { @@ -864,52 +838,43 @@ void generator::generate_top_level_elements(std::ostream &ostr) const { for (const auto &p : model()) { if (auto *pkg = dynamic_cast(p.get()); pkg) { - if (!pkg->is_empty() && - !pkg->all_of([this](const common::model::element &e) { - return !model().should_include(e); - })) + if (!pkg->is_empty()) generate(*pkg, ostr); } else if (auto *cls = dynamic_cast(p.get()); cls) { - if (model().should_include(*cls)) { - auto together_group = - config().get_together_group(cls->full_name(false)); - if (together_group) { - together_group_stack_.group_together( - together_group.value(), cls); - } - else { - generate_alias(*cls, ostr); - generate(*cls, ostr); - } + auto together_group = + config().get_together_group(cls->full_name(false)); + if (together_group) { + together_group_stack_.group_together( + together_group.value(), cls); + } + else { + generate_alias(*cls, ostr); + generate(*cls, ostr); } } else if (auto *enm = dynamic_cast(p.get()); enm) { - if (model().should_include(*enm)) { - auto together_group = - config().get_together_group(enm->full_name(false)); - if (together_group) { - together_group_stack_.group_together( - together_group.value(), enm); - } - else { - generate_alias(*enm, ostr); - generate(*enm, ostr); - } + auto together_group = + config().get_together_group(enm->full_name(false)); + if (together_group) { + together_group_stack_.group_together( + together_group.value(), enm); + } + else { + generate_alias(*enm, ostr); + generate(*enm, ostr); } } else if (auto *cpt = dynamic_cast(p.get()); cpt) { - if (model().should_include(*cpt)) { - auto together_group = - config().get_together_group(cpt->full_name(false)); - if (together_group) { - together_group_stack_.group_together( - together_group.value(), cpt); - } - else { - generate_alias(*cpt, ostr); - generate(*cpt, ostr); - } + auto together_group = + config().get_together_group(cpt->full_name(false)); + if (together_group) { + together_group_stack_.group_together( + together_group.value(), cpt); + } + else { + generate_alias(*cpt, ostr); + generate(*cpt, ostr); } } } diff --git a/src/class_diagram/model/class.cc b/src/class_diagram/model/class.cc index 4dc8c0fc5..f2d9f8765 100644 --- a/src/class_diagram/model/class.cc +++ b/src/class_diagram/model/class.cc @@ -18,6 +18,7 @@ #include "class.h" +#include "common/model/filters/diagram_filter.h" #include "util/util.h" #include @@ -63,6 +64,7 @@ const std::vector &class_::members() const { return members_; } const std::vector &class_::methods() const { return methods_; } const std::vector &class_::parents() const { return bases_; } +std::vector &class_::parents() { return bases_; } bool operator==(const class_ &l, const class_ &r) { return l.id() == r.id(); } @@ -111,6 +113,21 @@ bool class_::is_abstract() const [](const auto &method) { return method.is_pure_virtual(); }); } +void class_::apply_filter( + const common::model::diagram_filter &filter, const std::set &removed) +{ + diagram_element::apply_filter(filter, removed); + + common::model::apply_filter(members_, filter); + common::model::apply_filter(methods_, filter); + + // Remove class bases which are no longer in the diagram + parents().erase( + std::remove_if(parents().begin(), parents().end(), + [&removed](auto &&p) { return removed.count(p.id()) > 0; }), + parents().end()); +} + std::optional class_::doxygen_link() const { const auto *type = is_struct() ? "struct" : "class"; diff --git a/src/class_diagram/model/class.h b/src/class_diagram/model/class.h index 414ec45e6..2e248c956 100644 --- a/src/class_diagram/model/class.h +++ b/src/class_diagram/model/class.h @@ -30,6 +30,10 @@ #include #include +namespace clanguml::common::model { +class diagram_filter; +} + namespace clanguml::class_diagram::model { /** @@ -126,6 +130,7 @@ class class_ : public common::model::template_element, * @return Reference to class parents. */ const std::vector &parents() const; + std::vector &parents(); /** * @brief Get class full name. @@ -166,6 +171,9 @@ class class_ : public common::model::template_element, */ std::optional doxygen_link() const override; + void apply_filter(const common::model::diagram_filter &filter, + const std::set &removed) override; + private: bool is_struct_{false}; bool is_union_{false}; diff --git a/src/class_diagram/model/diagram.cc b/src/class_diagram/model/diagram.cc index 910b760d8..135d4ca88 100644 --- a/src/class_diagram/model/diagram.cc +++ b/src/class_diagram/model/diagram.cc @@ -18,7 +18,7 @@ #include "diagram.h" -#include "common/model/diagram_filter.h" +#include "common/model/filters/diagram_filter.h" #include "util/error.h" #include "util/util.h" @@ -256,6 +256,39 @@ void diagram::remove_redundant_dependencies() } } +void diagram::apply_filter() +{ + // First find all element ids which should be removed + std::set to_remove; + + for (const auto &c : element_view::view()) + if (!filter().should_include(c.get())) + to_remove.emplace(c.get().id()); + + for (const auto &e : element_view::view()) + if (!filter().should_include(e.get())) + to_remove.emplace(e.get().id()); + + for (const auto &c : element_view::view()) + if (!filter().should_include(c.get())) + to_remove.emplace(c.get().id()); + + element_view::remove(to_remove); + element_view::remove(to_remove); + element_view::remove(to_remove); + + nested_trait_ns::remove(to_remove); + + for (auto &c : element_view::view()) + c.get().apply_filter(filter(), to_remove); + + for (auto &e : element_view::view()) + e.get().apply_filter(filter(), to_remove); + + for (auto &c : element_view::view()) + c.get().apply_filter(filter(), to_remove); +} + bool diagram::is_empty() const { return element_view::is_empty() && diff --git a/src/class_diagram/model/diagram.h b/src/class_diagram/model/diagram.h index d5402fdb6..cc550f071 100644 --- a/src/class_diagram/model/diagram.h +++ b/src/class_diagram/model/diagram.h @@ -256,6 +256,8 @@ class diagram : public common::model::diagram, */ bool is_empty() const override; + void apply_filter() override; + private: template bool add_with_namespace_path(std::unique_ptr &&e); diff --git a/src/class_diagram/visitor/translation_unit_visitor.cc b/src/class_diagram/visitor/translation_unit_visitor.cc index f474eed4e..3aaf03a3b 100644 --- a/src/class_diagram/visitor/translation_unit_visitor.cc +++ b/src/class_diagram/visitor/translation_unit_visitor.cc @@ -76,7 +76,8 @@ bool translation_unit_visitor::VisitNamespaceDecl(clang::NamespaceDecl *ns) p->set_id(common::to_id(*ns)); id_mapper().add(ns->getID(), p->id()); - if (diagram().should_include(*p) && !diagram().get(p->id())) { + if (config().filter_mode() == config::filter_mode_t::advanced || + (diagram().should_include(*p) && !diagram().get(p->id()))) { process_comment(*ns, *p); set_source_location(*ns, *p); @@ -667,10 +668,6 @@ void translation_unit_visitor::process_concept_specialization_relationships( bool translation_unit_visitor::VisitCXXRecordDecl(clang::CXXRecordDecl *cls) { - // Skip system headers - if (source_manager().isInSystemHeader(cls->getSourceRange().getBegin())) - return true; - if (!should_include(cls)) return true; diff --git a/src/common/clang_utils.cc b/src/common/clang_utils.cc index 85fee0aab..6f87c2812 100644 --- a/src/common/clang_utils.cc +++ b/src/common/clang_utils.cc @@ -941,12 +941,27 @@ bool parse_source_location(const std::string &location_str, std::string &file, clang::RawComment *get_expression_raw_comment(const clang::SourceManager &sm, const clang::ASTContext &context, const clang::Stmt *stmt) { - // First get the first line of the expression - auto expr_begin = stmt->getSourceRange().getBegin(); + return get_raw_comment(sm, context, stmt->getSourceRange()); +} + +clang::RawComment *get_declaration_raw_comment(const clang::SourceManager &sm, + const clang::ASTContext &context, const clang::Decl *decl) +{ + return get_raw_comment(sm, context, decl->getSourceRange()); +} + +clang::RawComment *get_raw_comment(const clang::SourceManager &sm, + const clang::ASTContext &context, const clang::SourceRange &source_range) +{ + auto expr_begin = source_range.getBegin(); const auto expr_begin_line = sm.getSpellingLineNumber(expr_begin); + std::string file_Path = sm.getFilename(expr_begin).str(); + + auto file_id = sm.getFileID(expr_begin); + if (!context.Comments.empty() && - context.Comments.getCommentsInFile(sm.getFileID(expr_begin)) != nullptr) + context.Comments.getCommentsInFile(file_id) != nullptr) { for (const auto [offset, raw_comment] : *context.Comments.getCommentsInFile(sm.getFileID(expr_begin))) { const auto comment_end_line = sm.getSpellingLineNumber( @@ -956,6 +971,7 @@ clang::RawComment *get_expression_raw_comment(const clang::SourceManager &sm, expr_begin_line == comment_end_line + 1) return raw_comment; } + } return {}; } diff --git a/src/common/clang_utils.h b/src/common/clang_utils.h index b6df132c0..8a4cc0b7c 100644 --- a/src/common/clang_utils.h +++ b/src/common/clang_utils.h @@ -299,6 +299,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); +clang::RawComment *get_declaration_raw_comment(const clang::SourceManager &sm, + const clang::ASTContext &context, const clang::Decl *decl); + +clang::RawComment *get_raw_comment(const clang::SourceManager &sm, + const clang::ASTContext &context, const clang::SourceRange &source_range); + /** * Check if function or method declaration is a C++20 coroutine. * diff --git a/src/common/compilation_database.cc b/src/common/compilation_database.cc index 5553b36df..6e34fa5d5 100644 --- a/src/common/compilation_database.cc +++ b/src/common/compilation_database.cc @@ -96,8 +96,12 @@ long compilation_database::count_matching_commands( auto commands = base().getAllCompileCommands(); for (const auto &command : commands) { - result += std::count_if(files.begin(), files.end(), - [&command](const auto &file) { return command.Filename == file; }); + result += std::count_if( + files.begin(), files.end(), [&command](const auto &file) { + return (command.Filename == file) || + (std::filesystem::weakly_canonical(command.Filename) + .string() == file); + }); } return result; diff --git a/src/common/generators/generator.h b/src/common/generators/generator.h index 27b548e15..708ca50aa 100644 --- a/src/common/generators/generator.h +++ b/src/common/generators/generator.h @@ -17,10 +17,22 @@ */ #pragma once +#include "common/model/source_location.h" +#include "util/error.h" +#include "util/util.h" + +#include + +#include #include +#include +#include namespace clanguml::common::generators { +void make_context_source_relative( + inja::json &context, const std::string &prefix); + /** * @brief Common diagram generator interface * @@ -38,6 +50,8 @@ template class generator { : config_{config} , model_{model} { + init_context(); + init_env(); } virtual ~generator() = default; @@ -68,9 +82,253 @@ template class generator { */ const DiagramType &model() const { return model_; } + template inja::json element_context(const E &e) const; + + std::optional> get_link_pattern( + const common::model::source_location &sl) const; + + std::optional> get_tooltip_pattern( + const common::model::source_location &sl) const; + + /** + * @brief Initialize diagram Jinja context + */ + void init_context(); + + /** + * @brief Update diagram Jinja context + * + * This method updates the diagram context with models properties + * which can be used to render Jinja templates in the diagram (e.g. + * in notes or links) + */ + void update_context() const; + + void init_env(); + + const inja::json &context() const; + + inja::Environment &env() const; + +protected: + mutable inja::json m_context; + mutable inja::Environment m_env; + private: ConfigType &config_; DiagramType &model_; }; +template void generator::init_context() +{ + const auto &config = generators::generator::config(); + + if (config.git) { + m_context["git"]["branch"] = config.git().branch; + m_context["git"]["revision"] = config.git().revision; + m_context["git"]["commit"] = config.git().commit; + m_context["git"]["toplevel"] = config.git().toplevel; + } +} + +template void generator::update_context() const +{ + m_context["diagram"] = model().context(); +} + +template +const inja::json &generator::context() const +{ + return m_context; +} + +template +inja::Environment &generator::env() const +{ + return m_env; +} + +template void generator::init_env() +{ + const auto &model = generators::generator::model(); + const auto &config = generators::generator::config(); + + // + // Add basic string functions to inja environment + // + + // Check if string is empty + m_env.add_callback("empty", 1, [](inja::Arguments &args) { + return args.at(0)->get().empty(); + }); + + // Remove spaces from the left of a string + m_env.add_callback("ltrim", 1, [](inja::Arguments &args) { + return util::ltrim(args.at(0)->get()); + }); + + // Remove trailing spaces from a string + m_env.add_callback("rtrim", 1, [](inja::Arguments &args) { + return util::rtrim(args.at(0)->get()); + }); + + // Remove spaces before and after a string + m_env.add_callback("trim", 1, [](inja::Arguments &args) { + return util::trim(args.at(0)->get()); + }); + + // Make a string shorted with a limit to + m_env.add_callback("abbrv", 2, [](inja::Arguments &args) { + return util::abbreviate( + args.at(0)->get(), args.at(1)->get()); + }); + + m_env.add_callback("replace", 3, [](inja::Arguments &args) { + std::string result = args[0]->get(); + std::regex pattern(args[1]->get()); + return std::regex_replace(result, pattern, args[2]->get()); + }); + + m_env.add_callback("split", 2, [](inja::Arguments &args) { + return util::split( + args[0]->get(), args[1]->get()); + }); + + // + // Add PlantUML specific functions + // + + // Return the entire element JSON context based on element name + // e.g.: + // {{ element("clanguml::t00050::A").comment }} + // + m_env.add_callback("element", 1, [&model, &config](inja::Arguments &args) { + inja::json res{}; + auto element_opt = model.get_with_namespace( + args[0]->get(), config.using_namespace()); + + if (element_opt.has_value()) + res = element_opt.value().context(); + + return res; + }); + + // Convert C++ entity to PlantUML alias, e.g. + // "note left of {{ alias("A") }}: This is a note" + // Shortcut to: + // {{ element("A").alias }} + // + m_env.add_callback("alias", 1, [&model, &config](inja::Arguments &args) { + auto element_opt = model.get_with_namespace( + args[0]->get(), config.using_namespace()); + + if (!element_opt.has_value()) + throw clanguml::error::uml_alias_missing( + args[0]->get()); + + return element_opt.value().alias(); + }); + + // Get elements' comment: + // "note left of {{ alias("A") }}: {{ comment("A") }}" + // Shortcut to: + // {{ element("A").comment }} + // + m_env.add_callback("comment", 1, [&model, &config](inja::Arguments &args) { + inja::json res{}; + auto element_opt = model.get_with_namespace( + args[0]->get(), config.using_namespace()); + + if (!element_opt.has_value()) + throw clanguml::error::uml_alias_missing( + args[0]->get()); + + auto comment = element_opt.value().comment(); + + if (comment.has_value()) { + assert(comment.value().is_object()); + res = comment.value(); + } + + return res; + }); +} + +template +template +inja::json generator::element_context(const E &e) const +{ + const auto &diagram_context = context(); + + inja::json ctx; + ctx["element"] = e.context(); +#if _MSC_VER + if (ctx.contains("git")) { +#else + if (diagram_context.template contains("git")) { +#endif + ctx["git"] = diagram_context["git"]; + } + + if (!e.file().empty()) { + std::filesystem::path file{e.file()}; + std::string git_relative_path = file.string(); + if (!e.file_relative().empty()) { +#if _MSC_VER + if (file.is_absolute() && ctx.contains("git")) { +#else + if (file.is_absolute() && + diagram_context.template contains("git")) { +#endif + git_relative_path = std::filesystem::relative( + file, diagram_context["git"]["toplevel"]) + .string(); + ctx["element"]["source"]["path"] = + util::path_to_url(git_relative_path); + } + else { + ctx["element"]["source"]["path"] = e.file(); + } + } + else { + git_relative_path = ""; + ctx["element"]["source"]["path"] = e.file(); + } + + ctx["element"]["source"]["full_path"] = file.string(); + ctx["element"]["source"]["name"] = file.filename().string(); + ctx["element"]["source"]["line"] = e.line(); + } + + const auto &maybe_comment = e.comment(); + if (maybe_comment) { + ctx["element"]["comment"] = maybe_comment.value(); + } + + return ctx; +} + +template +std::optional> +generator::get_link_pattern( + const common::model::source_location &sl) const +{ + if (sl.file_relative().empty()) { + return config().generate_links().get_link_pattern(sl.file()); + } + + return config().generate_links().get_link_pattern(sl.file_relative()); +} + +template +std::optional> +generator::get_tooltip_pattern( + const common::model::source_location &sl) const +{ + if (sl.file_relative().empty()) { + return config().generate_links().get_tooltip_pattern(sl.file()); + } + + return config().generate_links().get_tooltip_pattern(sl.file_relative()); +} } // namespace clanguml::common::generators \ No newline at end of file diff --git a/src/common/generators/generators.cc b/src/common/generators/generators.cc index 592c6c31a..376024f01 100644 --- a/src/common/generators/generators.cc +++ b/src/common/generators/generators.cc @@ -21,6 +21,28 @@ #include "progress_indicator.h" namespace clanguml::common::generators { +void make_context_source_relative( + inja::json &context, const std::string &prefix) +{ + if (!context.contains("element")) + return; + + if (!context["element"].contains("source")) + return; + + auto &source = context["element"]["source"]; + + if (source.at("path").empty()) + return; + + auto path = std::filesystem::path(source.at("path")); + auto prefix_path = std::filesystem::path(prefix); + if (path.is_absolute() && util::is_relative_to(path, prefix_path)) { + source["path"] = relative(path, prefix_path); + return; + } +} + void find_translation_units_for_diagrams( const std::vector &diagram_names, clanguml::config::config &config, @@ -33,27 +55,11 @@ void find_translation_units_for_diagrams( if (!diagram_names.empty() && !util::contains(diagram_names, name)) continue; - // If glob is not defined use all translation units from the - // compilation database - if (!diagram->glob.has_value) { - translation_units_map[name] = compilation_database_files; - } - // Otherwise, get all translation units matching the glob from diagram - // configuration - else { - const std::vector translation_units = - diagram->get_translation_units(); - - std::vector valid_translation_units{}; - std::copy_if(compilation_database_files.begin(), - compilation_database_files.end(), - std::back_inserter(valid_translation_units), - [&translation_units](const auto &tu) { - return util::contains(translation_units, tu); - }); - - translation_units_map[name] = std::move(valid_translation_units); - } + translation_units_map[name] = + diagram->glob_translation_units(compilation_database_files); + + LOG_DBG("Found {} translation units for diagram {}", + translation_units_map.at(name).size(), name); } } @@ -232,7 +238,13 @@ void generate_diagrams(const std::vector &diagram_names, const auto &valid_translation_units = translation_units_map.at(name); - if (valid_translation_units.empty()) { + LOG_DBG("Found {} valid translation units for diagram {}", + valid_translation_units.size(), name); + + const auto matching_commands_count = + db->count_matching_commands(valid_translation_units); + + if (matching_commands_count == 0) { if (indicator) { indicator->add_progress_bar( name, 0, diagram_type_to_color(diagram->type())); @@ -248,8 +260,8 @@ void generate_diagrams(const std::vector &diagram_names, continue; } - const auto matching_commands_count = - db->count_matching_commands(valid_translation_units); + LOG_DBG("Found {} matching translation unit commands for diagram {}", + matching_commands_count, name); auto generator = [&name = name, &diagram = diagram, &indicator, db = std::ref(*db), matching_commands_count, diff --git a/src/common/generators/generators.h b/src/common/generators/generators.h index 7f3d38b6e..8382f337f 100644 --- a/src/common/generators/generators.h +++ b/src/common/generators/generators.h @@ -22,7 +22,7 @@ #include "class_diagram/generators/plantuml/class_diagram_generator.h" #include "cli/cli_handler.h" #include "common/compilation_database.h" -#include "common/model/diagram_filter.h" +#include "common/model/filters/diagram_filter_factory.h" #include "config/config.h" #include "include_diagram/generators/json/include_diagram_generator.h" #include "include_diagram/generators/mermaid/include_diagram_generator.h" @@ -369,7 +369,7 @@ std::unique_ptr generate(const common::compilation_database &db, auto diagram = std::make_unique(); diagram->set_name(name); diagram->set_filter( - std::make_unique(*diagram, config)); + model::diagram_filter_factory::create(*diagram, config)); LOG_DBG("Found translation units for diagram {}: {}", name, fmt::join(translation_units, ", ")); diff --git a/src/common/generators/json/generator.h b/src/common/generators/json/generator.h index 3554b8f57..22737d9aa 100644 --- a/src/common/generators/json/generator.h +++ b/src/common/generators/json/generator.h @@ -18,7 +18,7 @@ #pragma once #include "common/generators/generator.h" -#include "common/model/diagram_filter.h" +#include "common/model/filters/diagram_filter.h" #include "config/config.h" #include "util/error.h" #include "util/util.h" diff --git a/src/common/generators/mermaid/generator.cc b/src/common/generators/mermaid/generator.cc index 9ceb68777..2496f5bc8 100644 --- a/src/common/generators/mermaid/generator.cc +++ b/src/common/generators/mermaid/generator.cc @@ -78,7 +78,14 @@ std::string indent(const unsigned level) return std::string(level * kIndentWidth, ' '); // NOLINT } -std::string render_name(std::string name, bool round_brackets) +std::string render_name(std::string name) +{ + util::replace_all(name, "##", "::"); + + return name; +} + +std::string escape_name(std::string name, bool round_brackets) { util::replace_all(name, "<", "<"); util::replace_all(name, ">", ">"); @@ -86,7 +93,6 @@ std::string render_name(std::string name, bool round_brackets) util::replace_all(name, "(", "("); util::replace_all(name, ")", ")"); } - util::replace_all(name, "##", "::"); util::replace_all(name, "{", "{"); util::replace_all(name, "}", "}"); diff --git a/src/common/generators/mermaid/generator.h b/src/common/generators/mermaid/generator.h index 2fc676620..98bfe937d 100644 --- a/src/common/generators/mermaid/generator.h +++ b/src/common/generators/mermaid/generator.h @@ -18,7 +18,7 @@ #pragma once #include "common/generators/generator.h" -#include "common/model/diagram_filter.h" +#include "common/model/filters/diagram_filter.h" #include "config/config.h" #include "util/error.h" #include "util/util.h" @@ -44,7 +44,8 @@ std::string to_mermaid(message_t r); std::string indent(unsigned level); -std::string render_name(std::string name, bool round_brackets = true); +std::string render_name(std::string name); +std::string escape_name(std::string name, bool round_brackets = true); /** * @brief Base class for diagram generators @@ -66,8 +67,6 @@ class generator : clanguml::common::generators::generator{ config, model} { - init_context(); - init_env(); } ~generator() override = default; @@ -168,84 +167,11 @@ class generator */ void print_debug( const common::model::source_location &e, std::ostream &ostr) const; - /** - * @brief Update diagram Jinja context - * - * This method updates the diagram context with models properties - * which can be used to render Jinja templates in the diagram (e.g. - * in notes or links) - */ - void update_context() const; - -protected: - const inja::json &context() const; - - inja::Environment &env() const; - - template inja::json element_context(const E &e) const; - -private: - void init_context(); - - void init_env(); protected: mutable std::set m_generated_aliases; - mutable inja::json m_context; - mutable inja::Environment m_env; }; -template -const inja::json &generator::context() const -{ - return m_context; -} - -template -inja::Environment &generator::env() const -{ - return m_env; -} - -template -template -inja::json generator::element_context(const E &e) const -{ - auto ctx = context(); - - ctx["element"] = e.context(); - - if (!e.file().empty()) { - std::filesystem::path file{e.file()}; - std::string git_relative_path = file.string(); - if (!e.file_relative().empty()) { -#if _MSC_VER - if (file.is_absolute() && ctx.contains("git")) -#else - if (file.is_absolute() && ctx.template contains("git")) -#endif - git_relative_path = - std::filesystem::relative(file, ctx["git"]["toplevel"]) - .string(); - } - else { - git_relative_path = ""; - } - - ctx["element"]["source"]["path"] = util::path_to_url(git_relative_path); - ctx["element"]["source"]["full_path"] = file.string(); - ctx["element"]["source"]["name"] = file.filename().string(); - ctx["element"]["source"]["line"] = e.line(); - } - - const auto maybe_comment = e.comment(); - if (maybe_comment) { - ctx["element"]["comment"] = maybe_comment.value(); - } - - return ctx; -} - template void generator::generate(std::ostream &ostr) const { @@ -258,7 +184,7 @@ void generator::generate(std::ostream &ostr) const "Diagram configuration resulted in empty diagram."}; } - update_context(); + generators::generator::update_context(); generate_title(ostr); @@ -277,59 +203,71 @@ template template void generator::generate_link(std::ostream &ostr, const E &e) const { - const auto &config = generators::generator::config(); - - if (e.file().empty()) + if (e.file().empty() && e.file_relative().empty()) return; - if (config.generate_links().link.empty() && - config.generate_links().tooltip.empty()) + auto maybe_link_pattern = generators::generator::get_link_pattern(e); + + if (!maybe_link_pattern) return; + const auto &[link_prefix, link_pattern] = *maybe_link_pattern; + ostr << indent(1) << "click " << e.alias() << " href \""; try { + auto ec = generators::generator::element_context(e); + common::generators::make_context_source_relative(ec, link_prefix); std::string link{}; - if (!config.generate_links().link.empty()) { - link = env().render(std::string_view{config.generate_links().link}, - element_context(e)); + if (!link_pattern.empty()) { + link = generators::generator::env().render( + std::string_view{link_pattern}, ec); } if (link.empty()) link = " "; ostr << link; } catch (const inja::json::parse_error &e) { - LOG_ERROR( - "Failed to parse Jinja template: {}", config.generate_links().link); + LOG_ERROR("Failed to parse Jinja template: {}", link_pattern); ostr << " "; } catch (const inja::json::exception &e) { LOG_ERROR("Failed to render comment directive: \n{}\n due to: {}", - config.generate_links().link, e.what()); + link_pattern, e.what()); ostr << " "; } ostr << "\""; - if (!config.generate_links().tooltip.empty()) { - ostr << " \""; - try { - auto tooltip_text = - env().render(std::string_view{config.generate_links().tooltip}, - element_context(e)); - util::replace_all(tooltip_text, "\"", "„"); - ostr << tooltip_text; - } - catch (const inja::json::parse_error &e) { - LOG_ERROR("Failed to parse Jinja template: {}", - config.generate_links().link); - ostr << " "; - } - catch (const inja::json::exception &e) { - LOG_ERROR("Failed to render PlantUML directive: \n{}\n due to: {}", - config.generate_links().link, e.what()); - ostr << " "; - } + auto maybe_tooltip_pattern = + generators::generator::get_tooltip_pattern(e); + + if (maybe_tooltip_pattern) { + const auto &[tooltip_prefix, tooltip_pattern] = *maybe_tooltip_pattern; + + if (!tooltip_pattern.empty()) { + ostr << " \""; + try { + auto ec = generators::generator::element_context(e); + common::generators::make_context_source_relative( + ec, tooltip_prefix); + auto tooltip_text = generators::generator::env().render( + std::string_view{tooltip_pattern}, ec); + util::replace_all(tooltip_text, "\"", "„"); + ostr << tooltip_text; + } + catch (const inja::json::parse_error &e) { + LOG_ERROR( + "Failed to parse Jinja template: {}", tooltip_pattern); + ostr << " "; + } + catch (const inja::json::exception &e) { + LOG_ERROR( + "Failed to render PlantUML directive: \n{}\n due to: {}", + tooltip_pattern, e.what()); + ostr << " "; + } - ostr << "\""; + ostr << "\""; + } } ostr << "\n"; } @@ -347,7 +285,8 @@ void generator::generate_mermaid_directives( for (const auto &d : directives) { try { // Render the directive with template engine first - std::string directive{env().render(std::string_view{d}, context())}; + std::string directive{generators::generator::env().render( + std::string_view{d}, generators::generator::context())}; // Now search for alias `@A()` directives in the text // (this is deprecated) @@ -452,127 +391,4 @@ std::ostream &operator<<( g.generate(os); return os; } - -template void generator::init_context() -{ - const auto &config = generators::generator::config(); - - if (config.git) { - m_context["git"]["branch"] = config.git().branch; - m_context["git"]["revision"] = config.git().revision; - m_context["git"]["commit"] = config.git().commit; - m_context["git"]["toplevel"] = config.git().toplevel; - } -} - -template void generator::update_context() const -{ - m_context["diagram"] = generators::generator::model().context(); -} - -template void generator::init_env() -{ - const auto &model = generators::generator::model(); - const auto &config = generators::generator::config(); - - // - // Add basic string functions to inja environment - // - - // Check if string is empty - m_env.add_callback("empty", 1, [](inja::Arguments &args) { - return args.at(0)->get().empty(); - }); - - // Remove spaces from the left of a string - m_env.add_callback("ltrim", 1, [](inja::Arguments &args) { - return util::ltrim(args.at(0)->get()); - }); - - // Remove trailing spaces from a string - m_env.add_callback("rtrim", 1, [](inja::Arguments &args) { - return util::rtrim(args.at(0)->get()); - }); - - // Remove spaces before and after a string - m_env.add_callback("trim", 1, [](inja::Arguments &args) { - return util::trim(args.at(0)->get()); - }); - - // Make a string shorted with a limit to - m_env.add_callback("abbrv", 2, [](inja::Arguments &args) { - return util::abbreviate( - args.at(0)->get(), args.at(1)->get()); - }); - - m_env.add_callback("replace", 3, [](inja::Arguments &args) { - std::string result = args[0]->get(); - std::regex pattern(args[1]->get()); - return std::regex_replace(result, pattern, args[2]->get()); - }); - - m_env.add_callback("split", 2, [](inja::Arguments &args) { - return util::split( - args[0]->get(), args[1]->get()); - }); - - // - // Add MermaidJS specific functions - // - - // Return the entire element JSON context based on element name - // e.g.: - // {{ element("clanguml::t00050::A").comment }} - // - m_env.add_callback("element", 1, [&model, &config](inja::Arguments &args) { - inja::json res{}; - auto element_opt = model.get_with_namespace( - args[0]->get(), config.using_namespace()); - - if (element_opt.has_value()) - res = element_opt.value().context(); - - return res; - }); - - // Convert C++ entity to MermaidJS alias, e.g. - // "note left of {{ alias("A") }}: This is a note" - // Shortcut to: - // {{ element("A").alias }} - // - m_env.add_callback("alias", 1, [&model, &config](inja::Arguments &args) { - auto element_opt = model.get_with_namespace( - args[0]->get(), config.using_namespace()); - - if (!element_opt.has_value()) - throw clanguml::error::uml_alias_missing( - args[0]->get()); - - return element_opt.value().alias(); - }); - - // Get elements' comment: - // "note left of {{ alias("A") }}: {{ comment("A") }}" - // Shortcut to: - // {{ element("A").comment }} - // - m_env.add_callback("comment", 1, [&model, &config](inja::Arguments &args) { - inja::json res{}; - auto element_opt = model.get_with_namespace( - args[0]->get(), config.using_namespace()); - - if (!element_opt.has_value()) - throw clanguml::error::uml_alias_missing( - args[0]->get()); - - auto comment = element_opt.value().comment(); - - if (comment.has_value()) { - assert(comment.value().is_object()); - res = comment.value(); - } - - return res; - }); -} } // namespace clanguml::common::generators::mermaid \ No newline at end of file diff --git a/src/common/generators/plantuml/generator.h b/src/common/generators/plantuml/generator.h index dc29cbba8..8717d46af 100644 --- a/src/common/generators/plantuml/generator.h +++ b/src/common/generators/plantuml/generator.h @@ -18,10 +18,9 @@ #pragma once #include "common/generators/generator.h" -#include "common/model/diagram_filter.h" +#include "common/model/filters/diagram_filter.h" #include "common/model/relationship.h" #include "config/config.h" -#include "util/error.h" #include "util/util.h" #include "version.h" @@ -63,8 +62,6 @@ class generator : clanguml::common::generators::generator{ config, model} { - init_context(); - init_env(); } ~generator() override = default; @@ -177,21 +174,6 @@ class generator */ void print_debug( const common::model::source_location &e, std::ostream &ostr) const; - /** - * @brief Update diagram Jinja context - * - * This method updates the diagram context with models properties - * which can be used to render Jinja templates in the diagram (e.g. - * in notes or links) - */ - void update_context() const; - -protected: - const inja::json &context() const; - - inja::Environment &env() const; - - template inja::json element_context(const E &e) const; private: void generate_row_column_hints(std::ostream &ostr, @@ -200,74 +182,17 @@ class generator void generate_position_hints(std::ostream &ostr, const std::string &entity_name, const config::layout_hint &hint) const; - void init_context(); - - void init_env(); - protected: mutable std::set m_generated_aliases; - mutable inja::json m_context; - mutable inja::Environment m_env; }; -template -const inja::json &generator::context() const -{ - return m_context; -} - -template -inja::Environment &generator::env() const -{ - return m_env; -} - -template -template -inja::json generator::element_context(const E &e) const -{ - auto ctx = context(); - - ctx["element"] = e.context(); - - if (!e.file().empty()) { - std::filesystem::path file{e.file()}; - std::string git_relative_path = file.string(); - if (!e.file_relative().empty()) { -#if _MSC_VER - if (file.is_absolute() && ctx.contains("git")) -#else - if (file.is_absolute() && ctx.template contains("git")) -#endif - git_relative_path = - std::filesystem::relative(file, ctx["git"]["toplevel"]) - .string(); - } - else { - git_relative_path = ""; - } - - ctx["element"]["source"]["path"] = util::path_to_url(git_relative_path); - ctx["element"]["source"]["full_path"] = file.string(); - ctx["element"]["source"]["name"] = file.filename().string(); - ctx["element"]["source"]["line"] = e.line(); - } - - const auto &maybe_comment = e.comment(); - if (maybe_comment) { - ctx["element"]["comment"] = maybe_comment.value(); - } - - return ctx; -} - template void generator::generate(std::ostream &ostr) const { const auto &config = generators::generator::config(); const auto &model = generators::generator::model(); - update_context(); + generators::generator::update_context(); if (!config.allow_empty_diagrams() && model.is_empty() && config.puml().before.empty() && config.puml().after.empty()) { @@ -413,7 +338,8 @@ void generator::generate_plantuml_directives( for (const auto &d : directives) { try { // Render the directive with template engine first - std::string directive{env().render(std::string_view{d}, context())}; + std::string directive{generators::generator::env().render( + std::string_view{d}, generators::generator::context())}; // Now search for alias `@A()` directives in the text // (this is deprecated) @@ -519,45 +445,59 @@ template template void generator::generate_link(std::ostream &ostr, const E &e) const { - const auto &config = generators::generator::config(); + if (e.file().empty() && e.file_relative().empty()) + return; - if (e.file_relative().empty()) + auto maybe_link_pattern = generators::generator::get_link_pattern(e); + + if (!maybe_link_pattern) { return; + } + + const auto &[link_prefix, link_pattern] = *maybe_link_pattern; ostr << " [["; try { - if (!config.generate_links().link.empty()) { - ostr << env().render(std::string_view{config.generate_links().link}, - element_context(e)); + if (!link_pattern.empty()) { + auto ec = generators::generator::element_context(e); + common::generators::make_context_source_relative(ec, link_prefix); + ostr << generators::generator::env().render( + std::string_view{link_pattern}, ec); } } catch (const inja::json::parse_error &e) { - LOG_ERROR( - "Failed to parse Jinja template: {}", config.generate_links().link); + LOG_ERROR("Failed to parse Jinja template: {}", link_pattern); } - catch (const inja::json::exception &e) { + catch (const std::exception &e) { LOG_ERROR("Failed to render PlantUML directive: \n{}\n due to: {}", - config.generate_links().link, e.what()); + link_pattern, e.what()); } - ostr << "{"; - try { - if (!config.generate_links().tooltip.empty()) { - ostr << env().render( - std::string_view{config.generate_links().tooltip}, - element_context(e)); + auto maybe_tooltip_pattern = + generators::generator::get_tooltip_pattern(e); + + if (maybe_tooltip_pattern) { + const auto &[tooltip_prefix, tooltip_pattern] = *maybe_tooltip_pattern; + + ostr << "{"; + try { + auto ec = generators::generator::element_context(e); + common::generators::make_context_source_relative( + ec, tooltip_prefix); + if (!tooltip_pattern.empty()) { + ostr << generators::generator::env().render( + std::string_view{tooltip_pattern}, ec); + } } + catch (const inja::json::parse_error &e) { + LOG_ERROR("Failed to parse Jinja template: {}", tooltip_pattern); + } + catch (const std::exception &e) { + LOG_ERROR("Failed to render PlantUML directive: \n{}\n due to: {}", + tooltip_pattern, e.what()); + } + ostr << "}"; } - catch (const inja::json::parse_error &e) { - LOG_ERROR( - "Failed to parse Jinja template: {}", config.generate_links().link); - } - catch (const inja::json::exception &e) { - LOG_ERROR("Failed to render PlantUML directive: \n{}\n due to: {}", - config.generate_links().link, e.what()); - } - - ostr << "}"; ostr << "]]"; } @@ -579,126 +519,4 @@ std::ostream &operator<<( return os; } -template void generator::init_context() -{ - const auto &config = generators::generator::config(); - - if (config.git) { - m_context["git"]["branch"] = config.git().branch; - m_context["git"]["revision"] = config.git().revision; - m_context["git"]["commit"] = config.git().commit; - m_context["git"]["toplevel"] = config.git().toplevel; - } -} - -template void generator::update_context() const -{ - m_context["diagram"] = generators::generator::model().context(); -} - -template void generator::init_env() -{ - const auto &model = generators::generator::model(); - const auto &config = generators::generator::config(); - - // - // Add basic string functions to inja environment - // - - // Check if string is empty - m_env.add_callback("empty", 1, [](inja::Arguments &args) { - return args.at(0)->get().empty(); - }); - - // Remove spaces from the left of a string - m_env.add_callback("ltrim", 1, [](inja::Arguments &args) { - return util::ltrim(args.at(0)->get()); - }); - - // Remove trailing spaces from a string - m_env.add_callback("rtrim", 1, [](inja::Arguments &args) { - return util::rtrim(args.at(0)->get()); - }); - - // Remove spaces before and after a string - m_env.add_callback("trim", 1, [](inja::Arguments &args) { - return util::trim(args.at(0)->get()); - }); - - // Make a string shorted with a limit to - m_env.add_callback("abbrv", 2, [](inja::Arguments &args) { - return util::abbreviate( - args.at(0)->get(), args.at(1)->get()); - }); - - m_env.add_callback("replace", 3, [](inja::Arguments &args) { - std::string result = args[0]->get(); - std::regex pattern(args[1]->get()); - return std::regex_replace(result, pattern, args[2]->get()); - }); - - m_env.add_callback("split", 2, [](inja::Arguments &args) { - return util::split( - args[0]->get(), args[1]->get()); - }); - - // - // Add PlantUML specific functions - // - - // Return the entire element JSON context based on element name - // e.g.: - // {{ element("clanguml::t00050::A").comment }} - // - m_env.add_callback("element", 1, [&model, &config](inja::Arguments &args) { - inja::json res{}; - auto element_opt = model.get_with_namespace( - args[0]->get(), config.using_namespace()); - - if (element_opt.has_value()) - res = element_opt.value().context(); - - return res; - }); - - // Convert C++ entity to PlantUML alias, e.g. - // "note left of {{ alias("A") }}: This is a note" - // Shortcut to: - // {{ element("A").alias }} - // - m_env.add_callback("alias", 1, [&model, &config](inja::Arguments &args) { - auto element_opt = model.get_with_namespace( - args[0]->get(), config.using_namespace()); - - if (!element_opt.has_value()) - throw clanguml::error::uml_alias_missing( - args[0]->get()); - - return element_opt.value().alias(); - }); - - // Get elements' comment: - // "note left of {{ alias("A") }}: {{ comment("A") }}" - // Shortcut to: - // {{ element("A").comment }} - // - m_env.add_callback("comment", 1, [&model, &config](inja::Arguments &args) { - inja::json res{}; - auto element_opt = model.get_with_namespace( - args[0]->get(), config.using_namespace()); - - if (!element_opt.has_value()) - throw clanguml::error::uml_alias_missing( - args[0]->get()); - - auto comment = element_opt.value().comment(); - - if (comment.has_value()) { - assert(comment.value().is_object()); - res = comment.value(); - } - - return res; - }); -} } // namespace clanguml::common::generators::plantuml \ No newline at end of file diff --git a/src/common/model/diagram.cc b/src/common/model/diagram.cc index 39168e27e..9831ec6e4 100644 --- a/src/common/model/diagram.cc +++ b/src/common/model/diagram.cc @@ -18,7 +18,7 @@ #include "diagram.h" -#include "diagram_filter.h" +#include "filters/diagram_filter.h" #include "namespace.h" namespace clanguml::common::model { @@ -59,19 +59,35 @@ void diagram::set_complete(bool complete) { complete_ = complete; } bool diagram::complete() const { return complete_; } -void diagram::finalize() { } +void diagram::finalize() +{ + // Remove elements that do not match the filter + apply_filter(); + filtered_ = true; +} bool diagram::should_include(const element &e) const { + if (filtered_) + return true; + if (filter_.get() == nullptr) return true; + if (!complete()) { + return filter_->should_include( + dynamic_cast(e)); + } + return filter_->should_include(e) && filter_->should_include(dynamic_cast(e)); } bool diagram::should_include(const namespace_ &ns) const { + if (filtered_) + return true; + if (filter_.get() == nullptr) return true; diff --git a/src/common/model/diagram.h b/src/common/model/diagram.h index 0cd8568f5..b1fe4e03d 100644 --- a/src/common/model/diagram.h +++ b/src/common/model/diagram.h @@ -171,10 +171,13 @@ class diagram { */ virtual bool is_empty() const = 0; + virtual void apply_filter() { } + private: std::string name_; std::unique_ptr filter_; bool complete_{false}; + bool filtered_{false}; }; template bool check_diagram_type(diagram_t t); diff --git a/src/common/model/diagram_element.cc b/src/common/model/diagram_element.cc index 98824181a..b6bb682ee 100644 --- a/src/common/model/diagram_element.cc +++ b/src/common/model/diagram_element.cc @@ -18,6 +18,7 @@ #include "diagram_element.h" +#include "common/model/filters/diagram_filter.h" #include "util/util.h" #include @@ -102,6 +103,19 @@ bool diagram_element::complete() const { return complete_; } void diagram_element::complete(bool completed) { complete_ = completed; } +void diagram_element::apply_filter( + const diagram_filter &filter, const std::set &removed) +{ + common::model::apply_filter(relationships(), filter); + + auto &rels = relationships(); + rels.erase(std::remove_if(std::begin(rels), std::end(rels), + [&removed](auto &&r) { + return removed.count(r.destination()) > 0; + }), + std::end(rels)); +} + bool operator==(const diagram_element &l, const diagram_element &r) { return l.id() == r.id(); diff --git a/src/common/model/diagram_element.h b/src/common/model/diagram_element.h index 50b18297e..cef1a5464 100644 --- a/src/common/model/diagram_element.h +++ b/src/common/model/diagram_element.h @@ -26,11 +26,14 @@ #include #include +#include #include #include namespace clanguml::common::model { +class diagram_filter; + /** * @brief Base class for standalone diagram elements. * @@ -184,6 +187,9 @@ class diagram_element : public decorated_element, public source_location { */ void complete(bool completed); + virtual void apply_filter( + const diagram_filter &filter, const std::set &removed); + private: eid_t id_{}; std::optional parent_element_id_{}; diff --git a/src/common/model/element_view.h b/src/common/model/element_view.h index bf7da9ea3..dd3d14a0d 100644 --- a/src/common/model/element_view.h +++ b/src/common/model/element_view.h @@ -78,6 +78,15 @@ template class element_view { */ bool is_empty() const { return elements_.empty(); } + void remove(const std::set &element_ids) + { + elements_.erase(std::remove_if(elements_.begin(), elements_.end(), + [&element_ids](auto &&e) { + return element_ids.count(e.get().id()) > 0; + }), + elements_.end()); + } + private: reference_vector elements_; }; diff --git a/src/common/model/diagram_filter.cc b/src/common/model/filters/diagram_filter.cc similarity index 72% rename from src/common/model/diagram_filter.cc rename to src/common/model/filters/diagram_filter.cc index a01125a79..d712cd478 100644 --- a/src/common/model/diagram_filter.cc +++ b/src/common/model/filters/diagram_filter.cc @@ -99,6 +99,12 @@ tvl::value_t filter_visitor::match( return {}; } +tvl::value_t filter_visitor::match( + const diagram &d, const common::model::relationship &r) const +{ + return match(d, r.type()); +} + tvl::value_t filter_visitor::match( const diagram & /*d*/, const common::model::relationship_t & /*r*/) const { @@ -159,6 +165,10 @@ bool filter_visitor::is_exclusive() const filter_t filter_visitor::type() const { return type_; } +filter_mode_t filter_visitor::mode() const { return mode_; } + +void filter_visitor::set_mode(filter_mode_t mode) { mode_ = mode; } + anyof_filter::anyof_filter( filter_t type, std::vector> filters) : filter_visitor{type} @@ -169,22 +179,116 @@ anyof_filter::anyof_filter( tvl::value_t anyof_filter::match( const diagram &d, const common::model::element &e) const { - return tvl::any_of(filters_.begin(), filters_.end(), - [&d, &e](const auto &f) { return f->match(d, e); }); + return match_anyof(d, e); } tvl::value_t anyof_filter::match( - const diagram &d, const sequence_diagram::model::participant &p) const + const diagram &d, const common::model::relationship_t &r) const +{ + return match_anyof(d, r); +} + +tvl::value_t anyof_filter::match( + const diagram &d, const common::model::access_t &a) const +{ + return match_anyof(d, a); +} + +tvl::value_t anyof_filter::match( + const diagram &d, const common::model::namespace_ &ns) const +{ + return match_anyof(d, ns); +} + +tvl::value_t anyof_filter::match( + const diagram &d, const common::model::source_file &f) const +{ + return match_anyof(d, f); +} + +tvl::value_t anyof_filter::match( + const diagram &d, const common::model::source_location &f) const +{ + return match_anyof(d, f); +} + +tvl::value_t anyof_filter::match( + const diagram &d, const class_diagram::model::class_method &m) const { - return tvl::any_of(filters_.begin(), filters_.end(), - [&d, &p](const auto &f) { return f->match(d, p); }); + return match_anyof(d, m); } tvl::value_t anyof_filter::match( - const diagram &d, const common::model::source_file &e) const + const diagram &d, const class_diagram::model::class_member &m) const +{ + return match_anyof(d, m); +} + +tvl::value_t anyof_filter::match( + const diagram &d, const sequence_diagram::model::participant &p) const +{ + return match_anyof(d, p); +} + +allof_filter::allof_filter( + filter_t type, std::vector> filters) + : filter_visitor{type} + , filters_{std::move(filters)} +{ +} + +tvl::value_t allof_filter::match( + const diagram &d, const common::model::element &e) const +{ + return match_allof(d, e); +} + +tvl::value_t allof_filter::match( + const diagram &d, const common::model::relationship_t &r) const +{ + return match_allof(d, r); +} + +tvl::value_t allof_filter::match( + const diagram &d, const common::model::access_t &a) const +{ + return match_allof(d, a); +} + +tvl::value_t allof_filter::match( + const diagram &d, const common::model::namespace_ &ns) const +{ + return match_allof(d, ns); +} + +tvl::value_t allof_filter::match( + const diagram &d, const common::model::source_file &f) const +{ + return match_allof(d, f); +} + +tvl::value_t allof_filter::match( + const diagram &d, const common::model::source_location &f) const +{ + return match_allof(d, f); +} + +tvl::value_t allof_filter::match( + const diagram &d, const class_diagram::model::class_method &m) const { - return tvl::any_of(filters_.begin(), filters_.end(), - [&d, &e](const auto &f) { return f->match(d, e); }); + return match_allof(d, m); +} + +tvl::value_t allof_filter::match( + const diagram &d, const class_diagram::model::class_member &m) const +{ + return match_allof(d, m); +} + +tvl::value_t allof_filter::match( + const diagram &d, const sequence_diagram::model::participant &p) const +{ + return match_allof(d, p); } namespace_filter::namespace_filter( @@ -285,6 +389,12 @@ tvl::value_t namespace_filter::match(const diagram &d, const element &e) const return result; } +tvl::value_t namespace_filter::match( + const diagram &d, const sequence_diagram::model::participant &p) const +{ + return match(d, dynamic_cast(p)); +} + modules_filter::modules_filter( filter_t type, std::vector modules) : filter_visitor{type} @@ -845,8 +955,8 @@ bool context_filter::is_outward(relationship_t r) const return r != relationship_t::kAssociation; } -paths_filter::paths_filter(filter_t type, const std::filesystem::path &root, - const std::vector &p) +paths_filter::paths_filter(filter_t type, const std::vector &p, + const std::filesystem::path &root) : filter_visitor{type} , root_{root} { @@ -899,7 +1009,7 @@ tvl::value_t paths_filter::match( return {}; } - // Matching source paths doesn't make sens if they are not absolute + // Matching source paths doesn't make sense if they are not absolute if (!p.is_absolute()) { return {}; } @@ -972,11 +1082,19 @@ tvl::value_t class_member_filter::match( return access_filter_->match(d, m.access()); } -diagram_filter::diagram_filter( - const common::model::diagram &d, const config::diagram &c) +diagram_filter::diagram_filter(const common::model::diagram &d, + const config::diagram & /*c*/, private_constructor_tag_t /*unused*/) : diagram_{d} { - init_filters(c); +} + +void diagram_filter::add_filter( + filter_t filter_type, std::unique_ptr fv) +{ + if (filter_type == filter_t::kInclusive) + add_inclusive_filter(std::move(fv)); + else + add_exclusive_filter(std::move(fv)); } void diagram_filter::add_inclusive_filter(std::unique_ptr fv) @@ -1003,254 +1121,6 @@ bool diagram_filter::should_include( return false; } -void diagram_filter::init_filters(const config::diagram &c) -{ - using specializations_filter_t = - edge_traversal_filter; - - using class_dependants_filter_t = - edge_traversal_filter; - using class_dependencies_filter_t = - edge_traversal_filter; - - using package_dependants_filter_t = - edge_traversal_filter; - using package_dependencies_filter_t = - edge_traversal_filter; - - using source_file_dependency_filter_t = - edge_traversal_filter; - - // Process inclusive filters - if (c.include) { - 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)); - - add_inclusive_filter(std::make_unique( - filter_t::kInclusive, c.include().access)); - - add_inclusive_filter(std::make_unique( - filter_t::kInclusive, c.root_directory(), c.include().paths)); - - add_inclusive_filter( - std::make_unique(filter_t::kInclusive, - std::make_unique( - filter_t::kInclusive, c.include().access), - std::make_unique( - filter_t::kInclusive, c.include().method_types))); - - add_inclusive_filter( - std::make_unique(filter_t::kInclusive, - std::make_unique( - filter_t::kInclusive, c.include().access))); - - // Include any of these matches even if one them does not match - std::vector> element_filters; - - element_filters.emplace_back(std::make_unique( - filter_t::kInclusive, c.include().elements)); - - element_filters.emplace_back(std::make_unique( - filter_t::kInclusive, c.include().element_types)); - - if (c.type() == diagram_t::kClass) { - element_filters.emplace_back(std::make_unique( - filter_t::kInclusive, c.include().subclasses)); - - element_filters.emplace_back(std::make_unique( - filter_t::kInclusive, c.include().parents)); - - element_filters.emplace_back( - std::make_unique(filter_t::kInclusive, - relationship_t::kInstantiation, - c.include().specializations)); - - element_filters.emplace_back( - std::make_unique( - filter_t::kInclusive, relationship_t::kDependency, - c.include().dependants)); - - element_filters.emplace_back( - std::make_unique( - filter_t::kInclusive, relationship_t::kDependency, - c.include().dependencies, true)); - } - else if (c.type() == diagram_t::kSequence) { - element_filters.emplace_back(std::make_unique( - filter_t::kInclusive, c.include().callee_types)); - } - else if (c.type() == diagram_t::kPackage) { - element_filters.emplace_back( - std::make_unique( - filter_t::kInclusive, relationship_t::kDependency, - c.include().dependants)); - - element_filters.emplace_back( - std::make_unique( - filter_t::kInclusive, relationship_t::kDependency, - c.include().dependencies, true)); - } - else if (c.type() == diagram_t::kInclude) { - std::vector dependants; - std::vector dependencies; - - for (auto &&path : c.include().dependants) { - if (auto p = path.get(); p.has_value()) { - const std::filesystem::path dep_path{*p}; - dependants.emplace_back( - dep_path.lexically_normal().string()); - } - } - - for (auto &&path : c.include().dependencies) { - if (auto p = path.get(); p.has_value()) { - const std::filesystem::path dep_path{*p}; - dependencies.emplace_back( - dep_path.lexically_normal().string()); - } - } - - element_filters.emplace_back( - std::make_unique( - filter_t::kInclusive, relationship_t::kAssociation, - dependants, false)); - - element_filters.emplace_back( - std::make_unique( - filter_t::kInclusive, relationship_t::kAssociation, - dependencies, true)); - } - - element_filters.emplace_back(std::make_unique( - filter_t::kInclusive, c.include().context)); - - add_inclusive_filter(std::make_unique( - filter_t::kInclusive, std::move(element_filters))); - } - - // Process exclusive filters - if (c.exclude) { - 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)); - - add_exclusive_filter(std::make_unique( - filter_t::kExclusive, c.exclude().elements)); - - add_exclusive_filter(std::make_unique( - filter_t::kExclusive, c.exclude().element_types)); - - add_exclusive_filter(std::make_unique( - filter_t::kExclusive, c.exclude().relationships)); - - add_exclusive_filter(std::make_unique( - filter_t::kExclusive, c.exclude().access)); - - add_exclusive_filter( - std::make_unique(filter_t::kExclusive, - std::make_unique( - filter_t::kExclusive, c.exclude().access), - std::make_unique( - filter_t::kExclusive, c.exclude().method_types))); - - add_exclusive_filter( - std::make_unique(filter_t::kExclusive, - std::make_unique( - filter_t::kExclusive, c.exclude().access))); - - add_exclusive_filter(std::make_unique( - filter_t::kExclusive, c.exclude().subclasses)); - - add_exclusive_filter(std::make_unique( - filter_t::kExclusive, c.exclude().parents)); - - add_exclusive_filter( - std::make_unique(filter_t::kExclusive, - relationship_t::kInstantiation, c.exclude().specializations)); - - if (c.type() == diagram_t::kClass) { - add_exclusive_filter(std::make_unique( - filter_t::kExclusive, relationship_t::kDependency, - c.exclude().dependants)); - - add_exclusive_filter(std::make_unique( - filter_t::kExclusive, relationship_t::kDependency, - c.exclude().dependencies, true)); - } - else if (c.type() == diagram_t::kSequence) { - add_exclusive_filter(std::make_unique( - filter_t::kExclusive, c.exclude().callee_types)); - } - else if (c.type() == diagram_t::kPackage) { - add_exclusive_filter( - std::make_unique( - filter_t::kExclusive, relationship_t::kDependency, - c.exclude().dependencies, true)); - - add_exclusive_filter(std::make_unique( - filter_t::kExclusive, relationship_t::kDependency, - c.exclude().dependants)); - } - else if (c.type() == diagram_t::kInclude) { - std::vector dependants; - std::vector dependencies; - - for (auto &&path : c.exclude().dependants) { - if (auto p = path.get(); p.has_value()) { - std::filesystem::path dep_path{*p}; - dependants.emplace_back( - dep_path.lexically_normal().string()); - } - } - - for (auto &&path : c.exclude().dependencies) { - if (auto p = path.get(); p.has_value()) { - std::filesystem::path dep_path{*p}; - dependencies.emplace_back( - dep_path.lexically_normal().string()); - } - } - - add_exclusive_filter( - std::make_unique( - filter_t::kExclusive, relationship_t::kAssociation, - dependants, false)); - - add_exclusive_filter( - std::make_unique( - filter_t::kExclusive, relationship_t::kAssociation, - dependencies, true)); - } - - add_exclusive_filter(std::make_unique( - filter_t::kExclusive, c.exclude().context)); - } -} - template <> bool diagram_filter::should_include(const std::string &name) const { diff --git a/src/common/model/diagram_filter.h b/src/common/model/filters/diagram_filter.h similarity index 84% rename from src/common/model/diagram_filter.h rename to src/common/model/filters/diagram_filter.h index fb2e144c2..3768bc13f 100644 --- a/src/common/model/diagram_filter.h +++ b/src/common/model/filters/diagram_filter.h @@ -1,5 +1,5 @@ /** - * @file src/common/model/diagram_filter.h + * @file src/common/model/filters/diagram_filter.h * * Copyright (c) 2021-2024 Bartek Kryza * @@ -25,19 +25,21 @@ #include "common/model/element.h" #include "common/model/enums.h" #include "common/model/namespace.h" +#include "common/model/source_file.h" +#include "common/model/tvl.h" #include "config/config.h" -#include "diagram.h" #include "include_diagram/model/diagram.h" #include "sequence_diagram/model/participant.h" -#include "source_file.h" -#include "tvl.h" #include #include namespace clanguml::common::model { +class diagram_filter_factory; + using clanguml::common::eid_t; +using clanguml::config::filter_mode_t; /** * Diagram filters can be add in 2 modes: @@ -84,6 +86,9 @@ class filter_visitor { virtual tvl::value_t match( const diagram &d, const common::model::element &e) const; + virtual tvl::value_t match( + const diagram &d, const common::model::relationship &r) const; + virtual tvl::value_t match( const diagram &d, const common::model::relationship_t &r) const; @@ -112,9 +117,12 @@ class filter_visitor { bool is_exclusive() const; filter_t type() const; + filter_mode_t mode() const; + void set_mode(filter_mode_t mode); private: filter_t type_; + filter_mode_t mode_{filter_mode_t::basic}; }; struct anyof_filter : public filter_visitor { @@ -126,13 +134,87 @@ struct anyof_filter : public filter_visitor { tvl::value_t match( const diagram &d, const common::model::element &e) const override; + tvl::value_t match(const diagram &d, + const common::model::relationship_t &r) const override; + + tvl::value_t match( + const diagram &d, const common::model::access_t &a) const override; + + tvl::value_t match( + const diagram &d, const common::model::namespace_ &ns) const override; + + tvl::value_t match( + const diagram &d, const common::model::source_file &f) const override; + + tvl::value_t match(const diagram &d, + const common::model::source_location &f) const override; + + tvl::value_t match(const diagram &d, + const class_diagram::model::class_method &m) const override; + + tvl::value_t match(const diagram &d, + const class_diagram::model::class_member &m) const override; + tvl::value_t match(const diagram &d, const sequence_diagram::model::participant &p) const override; +private: + template + tvl::value_t match_anyof(const diagram &d, const E &element) const + { + auto result = tvl::any_of(filters_.begin(), filters_.end(), + [&d, &element](const auto &f) { return f->match(d, element); }); + + if (mode() == filter_mode_t::advanced && !d.complete()) + return type() == filter_t::kInclusive; + + return result; + } + + std::vector> filters_; +}; + +struct allof_filter : public filter_visitor { + allof_filter( + filter_t type, std::vector> filters); + + ~allof_filter() override = default; + tvl::value_t match( - const diagram &d, const common::model::source_file &e) const override; + const diagram &d, const common::model::element &e) const override; + + tvl::value_t match(const diagram &d, + const common::model::relationship_t &r) const override; + + tvl::value_t match( + const diagram &d, const common::model::access_t &a) const override; + + tvl::value_t match( + const diagram &d, const common::model::namespace_ &ns) const override; + + tvl::value_t match( + const diagram &d, const common::model::source_file &f) const override; + + tvl::value_t match(const diagram &d, + const common::model::source_location &f) const override; + + tvl::value_t match(const diagram &d, + const class_diagram::model::class_method &m) const override; + + tvl::value_t match(const diagram &d, + const class_diagram::model::class_member &m) const override; + + tvl::value_t match(const diagram &d, + const sequence_diagram::model::participant &p) const override; private: + template + tvl::value_t match_allof(const diagram &d, const E &element) const + { + return tvl::all_of(filters_.begin(), filters_.end(), + [&d, &element](const auto &f) { return f->match(d, element); }); + } + std::vector> filters_; }; @@ -150,6 +232,9 @@ struct namespace_filter : public filter_visitor { tvl::value_t match(const diagram &d, const element &e) const override; + tvl::value_t match(const diagram &d, + const sequence_diagram::model::participant &p) const override; + private: std::vector namespaces_; }; @@ -280,8 +365,8 @@ template struct edge_traversal_filter : public filter_visitor { - edge_traversal_filter(filter_t type, relationship_t relationship, - std::vector roots, bool forward = false) + edge_traversal_filter(filter_t type, std::vector roots, + relationship_t relationship, bool forward = false) : filter_visitor{type} , roots_{std::move(roots)} , relationship_{relationship} @@ -612,8 +697,8 @@ struct context_filter : public filter_visitor { * a specified file paths. */ struct paths_filter : public filter_visitor { - paths_filter(filter_t type, const std::filesystem::path &root, - const std::vector &p); + paths_filter(filter_t type, const std::vector &p, + const std::filesystem::path &root); ~paths_filter() override = default; @@ -660,6 +745,8 @@ struct class_member_filter : public filter_visitor { std::unique_ptr access_filter_; }; +class diagram_filter_factory; + /** * @brief Composite of all diagrams filters. * @@ -671,8 +758,14 @@ struct class_member_filter : public filter_visitor { * @see clanguml::common::model::filter_visitor */ class diagram_filter { +private: + struct private_constructor_tag_t { }; + public: - diagram_filter(const common::model::diagram &d, const config::diagram &c); + diagram_filter(const common::model::diagram &d, const config::diagram &c, + private_constructor_tag_t unused); + + void add_filter(filter_t filter_type, std::unique_ptr fv); /** * Add inclusive filter. @@ -725,16 +818,9 @@ class diagram_filter { return static_cast(tvl::is_undefined(inc) || tvl::is_true(inc)); } -private: - /** - * @brief Initialize filters. - * - * Some filters require initialization. - * - * @param c Diagram config. - */ - void init_filters(const config::diagram &c); + friend class diagram_filter_factory; +private: /*! List of inclusive filters */ std::vector> inclusive_; @@ -745,6 +831,27 @@ class diagram_filter { const common::model::diagram &diagram_; }; +template +void apply_filter(Collection &col, const diagram_filter &filter) +{ + col.erase(std::remove_if(col.begin(), col.end(), + [&filter](auto &&element) { + return !filter.should_include(element); + }), + col.end()); +} + +template +void apply_filter( + std::vector> &col, const diagram_filter &filter) +{ + col.erase(std::remove_if(col.begin(), col.end(), + [&filter](auto &&element) { + return !filter.should_include(element.get()); + }), + col.end()); +} + template <> bool diagram_filter::should_include(const std::string &name) const; } // namespace clanguml::common::model \ No newline at end of file diff --git a/src/common/model/filters/diagram_filter_factory.cc b/src/common/model/filters/diagram_filter_factory.cc new file mode 100644 index 000000000..d728852a4 --- /dev/null +++ b/src/common/model/filters/diagram_filter_factory.cc @@ -0,0 +1,366 @@ +/** + * @file src/common/model/filters/diagram_filter_factory.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 "diagram_filter_factory.h" + +namespace clanguml::common::model { + +void basic_diagram_filter_initializer::initialize() +{ + // Process inclusive filters + if (diagram_config.include) { + df.add_inclusive_filter(std::make_unique( + filter_t::kInclusive, diagram_config.include().namespaces)); + + df.add_inclusive_filter(std::make_unique( + filter_t::kInclusive, diagram_config.include().modules)); + + df.add_inclusive_filter(std::make_unique( + filter_t::kInclusive, diagram_config.include().module_access)); + + df.add_inclusive_filter(std::make_unique( + filter_t::kInclusive, diagram_config.include().relationships)); + + df.add_inclusive_filter(std::make_unique( + filter_t::kInclusive, diagram_config.include().access)); + + df.add_inclusive_filter(std::make_unique( + filter_t::kInclusive, diagram_config.include().paths, + diagram_config.root_directory())); + + df.add_inclusive_filter( + std::make_unique(filter_t::kInclusive, + std::make_unique( + filter_t::kInclusive, diagram_config.include().access), + std::make_unique(filter_t::kInclusive, + diagram_config.include().method_types))); + + df.add_inclusive_filter( + std::make_unique(filter_t::kInclusive, + std::make_unique( + filter_t::kInclusive, diagram_config.include().access))); + + // Include any of these matches even if one them does not match + std::vector> element_filters; + + element_filters.emplace_back(std::make_unique( + filter_t::kInclusive, diagram_config.include().elements)); + + element_filters.emplace_back(std::make_unique( + filter_t::kInclusive, diagram_config.include().element_types)); + + if (diagram_config.type() == diagram_t::kClass) { + element_filters.emplace_back(std::make_unique( + filter_t::kInclusive, diagram_config.include().subclasses)); + + element_filters.emplace_back(std::make_unique( + filter_t::kInclusive, diagram_config.include().parents)); + + element_filters.emplace_back( + std::make_unique(filter_t::kInclusive, + diagram_config.include().specializations, + relationship_t::kInstantiation)); + + element_filters.emplace_back( + std::make_unique( + filter_t::kInclusive, diagram_config.include().dependants, + relationship_t::kDependency)); + + element_filters.emplace_back( + std::make_unique( + filter_t::kInclusive, diagram_config.include().dependencies, + relationship_t::kDependency, true)); + } + else if (diagram_config.type() == diagram_t::kSequence) { + element_filters.emplace_back(std::make_unique( + filter_t::kInclusive, diagram_config.include().callee_types)); + } + else if (diagram_config.type() == diagram_t::kPackage) { + element_filters.emplace_back( + std::make_unique( + filter_t::kInclusive, diagram_config.include().dependants, + relationship_t::kDependency)); + + element_filters.emplace_back( + std::make_unique( + filter_t::kInclusive, diagram_config.include().dependencies, + relationship_t::kDependency, true)); + } + else if (diagram_config.type() == diagram_t::kInclude) { + std::vector dependants; + std::vector dependencies; + + for (auto &&path : diagram_config.include().dependants) { + if (auto p = path.get(); p.has_value()) { + const std::filesystem::path dep_path{*p}; + dependants.emplace_back( + dep_path.lexically_normal().string()); + } + } + + for (auto &&path : diagram_config.include().dependencies) { + if (auto p = path.get(); p.has_value()) { + const std::filesystem::path dep_path{*p}; + dependencies.emplace_back( + dep_path.lexically_normal().string()); + } + } + + element_filters.emplace_back( + std::make_unique( + filter_t::kInclusive, dependants, + relationship_t::kAssociation, false)); + + element_filters.emplace_back( + std::make_unique( + filter_t::kInclusive, dependencies, + relationship_t::kAssociation, true)); + } + + element_filters.emplace_back(std::make_unique( + filter_t::kInclusive, diagram_config.include().context)); + + df.add_inclusive_filter(std::make_unique( + filter_t::kInclusive, std::move(element_filters))); + } + + // Process exclusive filters + if (diagram_config.exclude) { + df.add_exclusive_filter(std::make_unique( + filter_t::kExclusive, diagram_config.exclude().namespaces)); + + df.add_exclusive_filter(std::make_unique( + filter_t::kExclusive, diagram_config.exclude().modules)); + + df.add_exclusive_filter(std::make_unique( + filter_t::kExclusive, diagram_config.exclude().module_access)); + + df.add_exclusive_filter(std::make_unique( + filter_t::kExclusive, diagram_config.exclude().paths, + diagram_config.root_directory())); + + df.add_exclusive_filter(std::make_unique( + filter_t::kExclusive, diagram_config.exclude().elements)); + + df.add_exclusive_filter(std::make_unique( + filter_t::kExclusive, diagram_config.exclude().element_types)); + + df.add_exclusive_filter(std::make_unique( + filter_t::kExclusive, diagram_config.exclude().relationships)); + + df.add_exclusive_filter(std::make_unique( + filter_t::kExclusive, diagram_config.exclude().access)); + + df.add_exclusive_filter( + std::make_unique(filter_t::kExclusive, + std::make_unique( + filter_t::kExclusive, diagram_config.exclude().access), + std::make_unique(filter_t::kExclusive, + diagram_config.exclude().method_types))); + + df.add_exclusive_filter( + std::make_unique(filter_t::kExclusive, + std::make_unique( + filter_t::kExclusive, diagram_config.exclude().access))); + + df.add_exclusive_filter(std::make_unique( + filter_t::kExclusive, diagram_config.exclude().subclasses)); + + df.add_exclusive_filter(std::make_unique( + filter_t::kExclusive, diagram_config.exclude().parents)); + + df.add_exclusive_filter(std::make_unique( + filter_t::kExclusive, diagram_config.exclude().specializations, + relationship_t::kInstantiation)); + + if (diagram_config.type() == diagram_t::kClass) { + df.add_exclusive_filter(std::make_unique( + filter_t::kExclusive, diagram_config.exclude().dependants, + relationship_t::kDependency)); + + df.add_exclusive_filter( + std::make_unique( + filter_t::kExclusive, diagram_config.exclude().dependencies, + relationship_t::kDependency, true)); + } + else if (diagram_config.type() == diagram_t::kSequence) { + df.add_exclusive_filter(std::make_unique( + filter_t::kExclusive, diagram_config.exclude().callee_types)); + } + else if (diagram_config.type() == diagram_t::kPackage) { + df.add_exclusive_filter( + std::make_unique( + filter_t::kExclusive, diagram_config.exclude().dependencies, + relationship_t::kDependency, true)); + + df.add_exclusive_filter( + std::make_unique( + filter_t::kExclusive, diagram_config.exclude().dependants, + relationship_t::kDependency)); + } + else if (diagram_config.type() == diagram_t::kInclude) { + std::vector dependants; + std::vector dependencies; + + for (auto &&path : diagram_config.exclude().dependants) { + if (auto p = path.get(); p.has_value()) { + std::filesystem::path dep_path{*p}; + dependants.emplace_back( + dep_path.lexically_normal().string()); + } + } + + for (auto &&path : diagram_config.exclude().dependencies) { + if (auto p = path.get(); p.has_value()) { + std::filesystem::path dep_path{*p}; + dependencies.emplace_back( + dep_path.lexically_normal().string()); + } + } + + df.add_exclusive_filter( + std::make_unique( + filter_t::kExclusive, dependants, + relationship_t::kAssociation, false)); + + df.add_exclusive_filter( + std::make_unique( + filter_t::kExclusive, dependencies, + relationship_t::kAssociation, true)); + } + + df.add_exclusive_filter(std::make_unique( + filter_t::kExclusive, diagram_config.exclude().context)); + } +} + +template <> +void advanced_diagram_filter_initializer::add_filter< + source_file_dependency_filter_t>(const filter_t &filter_type, + const std::vector &filter_config, + std::vector> &result, + relationship_t &&rt, // NOLINT + bool &&direction // NOLINT +) +{ + std::vector deps; + for (auto &&path : filter_config) { + if (auto p = path.get(); p.has_value()) { + const std::filesystem::path dep_path{*p}; + deps.emplace_back(dep_path.lexically_normal().string()); + } + } + + result.emplace_back(std::make_unique( + filter_type, deps, rt, direction)); +} + +std::vector> +advanced_diagram_filter_initializer::build( + filter_t filter_type, const config::filter &filter_config) +{ + std::vector> result; + + // At any level, only allof, anyof, or a set of other non-operator + // filters can be present + if (filter_config.allof) { + std::vector> allof_filters = + build(filter_type, *filter_config.allof); + + auto allof_filter = std::make_unique( + filter_type, std::move(allof_filters)); + + result.emplace_back(std::move(allof_filter)); + } + + if (filter_config.anyof) { + std::vector> anyof_filters = + build(filter_type, *filter_config.anyof); + + auto anyof_filter = std::make_unique( + filter_type, std::move(anyof_filters)); + + result.emplace_back(std::move(anyof_filter)); + } + + add_filter(filter_type, filter_config.namespaces, result); + add_filter(filter_type, filter_config.modules, result); + add_filter( + filter_type, filter_config.module_access, result); + add_filter( + filter_type, filter_config.relationships, result); + add_filter(filter_type, filter_config.access, result); + add_filter( + filter_type, filter_config.method_types, result); + + add_filter(filter_type, filter_config.paths, result, + diagram_config.root_directory()); + + add_filter(filter_type, filter_config.elements, result); + add_filter( + filter_type, filter_config.element_types, result); + add_filter(filter_type, filter_config.subclasses, result); + add_filter(filter_type, filter_config.parents, result); + + add_filter(filter_type, + filter_config.specializations, result, relationship_t::kInstantiation, + false); + add_filter(filter_type, filter_config.dependants, + result, relationship_t::kDependency, false); + add_filter(filter_type, + filter_config.dependencies, result, relationship_t::kDependency, true); + + add_filter(filter_type, filter_config.callee_types, result); + + add_filter(filter_type, + filter_config.dependants, result, relationship_t::kDependency, false); + add_filter(filter_type, + filter_config.dependencies, result, relationship_t::kDependency, true); + + add_filter(filter_type, filter_config.context, result); + + if (diagram_config.type() == diagram_t::kInclude) { + add_filter(filter_type, + filter_config.dependants, result, relationship_t::kAssociation, + false); + add_filter(filter_type, + filter_config.dependencies, result, relationship_t::kAssociation, + true); + } + + return result; +} + +void advanced_diagram_filter_initializer::initialize() +{ + if (diagram_config.include) { + auto inclusive_filter = + build(filter_t::kInclusive, diagram_config.include()); + for (auto &f : inclusive_filter) + df.add_filter(filter_t::kInclusive, std::move(f)); + } + + if (diagram_config.exclude) { + auto exclusive_filter = + build(filter_t::kExclusive, diagram_config.exclude()); + for (auto &f : exclusive_filter) + df.add_filter(filter_t::kExclusive, std::move(f)); + } +} + +} // namespace clanguml::common::model diff --git a/src/common/model/filters/diagram_filter_factory.h b/src/common/model/filters/diagram_filter_factory.h new file mode 100644 index 000000000..8c80e4aa4 --- /dev/null +++ b/src/common/model/filters/diagram_filter_factory.h @@ -0,0 +1,126 @@ +/** + * @file src/common/model/filters/diagram_filter_factory.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. + */ +#pragma once + +#include "diagram_filter.h" +#include "package_diagram/model/diagram.h" + +namespace clanguml::common::model { +using specializations_filter_t = + edge_traversal_filter; + +using class_dependants_filter_t = + edge_traversal_filter; +using class_dependencies_filter_t = + edge_traversal_filter; + +using package_dependants_filter_t = + edge_traversal_filter; +using package_dependencies_filter_t = + edge_traversal_filter; + +using source_file_dependency_filter_t = + edge_traversal_filter; + +class diagram_filter_initializer { +public: + diagram_filter_initializer(const config::diagram &c, diagram_filter &filter) + : diagram_config{c} + , df{filter} + { + } + + virtual ~diagram_filter_initializer() = default; + + virtual void initialize() = 0; + +protected: + const config::diagram &diagram_config; + diagram_filter &df; +}; + +class basic_diagram_filter_initializer : public diagram_filter_initializer { +public: + using diagram_filter_initializer::diagram_filter_initializer; + + ~basic_diagram_filter_initializer() override = default; + + void initialize() override; +}; + +class advanced_diagram_filter_initializer : public diagram_filter_initializer { +public: + using diagram_filter_initializer::diagram_filter_initializer; + + ~advanced_diagram_filter_initializer() override = default; + + void initialize() override; + +private: + std::vector> build( + filter_t filter_type, const config::filter &filter_config); + + template + void add_filter(const filter_t &filter_type, + const std::vector &filter_config, + std::vector> &result, Args &&...args) + { + if (!filter_config.empty()) { + auto filter = std::make_unique( + filter_type, filter_config, std::forward(args)...); + filter->set_mode(filter_mode_t::advanced); + result.emplace_back(std::move(filter)); + } + } +}; + +template <> +void advanced_diagram_filter_initializer::add_filter< + source_file_dependency_filter_t>(const filter_t &filter_type, + const std::vector &filter_config, + std::vector> &result, relationship_t &&rt, + bool &&direction); + +class diagram_filter_factory { +public: + static std::unique_ptr create( + const common::model::diagram &d, const config::diagram &c) + { + auto filter = std::make_unique( + d, c, diagram_filter::private_constructor_tag_t{}); + + if (c.filter_mode() == config::filter_mode_t::basic) { + basic_diagram_filter_initializer init{c, *filter}; + init.initialize(); + } + else { + advanced_diagram_filter_initializer init{c, *filter}; + init.initialize(); + } + + return filter; + } +}; + +} // namespace clanguml::common::model \ No newline at end of file diff --git a/src/common/model/nested_trait.h b/src/common/model/nested_trait.h index 195cc02dd..0d3cb06a2 100644 --- a/src/common/model/nested_trait.h +++ b/src/common/model/nested_trait.h @@ -21,6 +21,7 @@ #include #include +#include #include #include @@ -245,6 +246,23 @@ template class nested_trait { } } + void remove(const std::set &element_ids) + { + // First remove all matching elements on this level + elements_.erase(std::remove_if(elements_.begin(), elements_.end(), + [&element_ids](auto &&e) { + return element_ids.count(e->id()) > 0; + }), + elements_.end()); + + // Now recurse to any packages on this level + for (auto &p : elements_) { + if (dynamic_cast *>(p.get())) + dynamic_cast *>(p.get())->remove( + element_ids); + } + } + private: std::vector> elements_; }; diff --git a/src/common/types.h b/src/common/types.h index 53c203e8e..4a065644a 100644 --- a/src/common/types.h +++ b/src/common/types.h @@ -329,6 +329,8 @@ template struct or_regex { const std::variant &value() const { return value_; } + bool is_regex() const { return std::holds_alternative(value_); } + private: std::variant value_; }; diff --git a/src/common/visitor/template_builder.h b/src/common/visitor/template_builder.h index d670aa814..3191d800f 100644 --- a/src/common/visitor/template_builder.h +++ b/src/common/visitor/template_builder.h @@ -601,6 +601,9 @@ template bool template_builder::simplify_system_template( template_parameter &ct, const std::string &full_name) const { + if (ct.kind() == model::template_parameter_kind_t::template_type) + return false; + auto simplified = config().simplify_template_type(full_name); if (simplified != full_name) { diff --git a/src/common/visitor/translation_unit_visitor.h b/src/common/visitor/translation_unit_visitor.h index 9593ba8f6..824a5c548 100644 --- a/src/common/visitor/translation_unit_visitor.h +++ b/src/common/visitor/translation_unit_visitor.h @@ -253,8 +253,7 @@ template class translation_unit_visitor { comment_visitor_->visit(decl, e); - const auto *comment = - decl.getASTContext().getRawCommentForDeclNoCache(&decl); + auto *comment = decl.getASTContext().getRawCommentForDeclNoCache(&decl); process_comment(comment, decl.getASTContext().getDiagnostics(), e); } @@ -290,21 +289,30 @@ template class translation_unit_visitor { return stripped_comment; } + bool skip_system_header_decl(const clang::NamedDecl *decl) const + { + return !config().include_system_headers() && + source_manager().isInSystemHeader( + decl->getSourceRange().getBegin()); + } + /** * @brief Check if the diagram should include a declaration. * * @param decl Clang declaration. * @return True, if the entity should be included in the diagram. */ - bool should_include(const clang::NamedDecl *decl) + bool should_include(const clang::NamedDecl *decl) const { if (decl == nullptr) return false; - if (source_manager().isInSystemHeader( - decl->getSourceRange().getBegin())) + if (skip_system_header_decl(decl)) return false; + if (config().filter_mode() == config::filter_mode_t::advanced) + return true; + auto should_include_namespace = diagram().should_include( common::model::namespace_{decl->getQualifiedNameAsString()}); diff --git a/src/config/config.cc b/src/config/config.cc index b02b72571..aa073cec2 100644 --- a/src/config/config.cc +++ b/src/config/config.cc @@ -186,6 +186,19 @@ std::string to_string(context_direction_t cd) } } +std::string to_string(filter_mode_t fm) +{ + switch (fm) { + case filter_mode_t::basic: + return "basic"; + case filter_mode_t::advanced: + return "advanced"; + default: + assert(false); + return ""; + } +} + std::optional plantuml::get_style( const common::model::relationship_t relationship_type) const { @@ -228,6 +241,8 @@ void inheritable_diagram_options::inherit( using_module.override(parent.using_module); include_relations_also_as_members.override( parent.include_relations_also_as_members); + filter_mode.override(parent.filter_mode); + include_system_headers.override(parent.include_system_headers); include.override(parent.include); exclude.override(parent.exclude); puml.override(parent.puml); @@ -286,34 +301,59 @@ bool inheritable_diagram_options::generate_fully_qualified_name() const !generate_packages(); } -std::vector diagram::get_translation_units() const +std::vector diagram::glob_translation_units( + const std::vector &compilation_database_files) const { - std::vector translation_units{}; + // If glob is not defined use all translation units from the + // compilation database + if (!glob.has_value) { + return compilation_database_files; + } + + // Otherwise, get all translation units matching the glob from diagram + // configuration + std::vector result{}; LOG_DBG("Looking for translation units in {}", root_directory().string()); for (const auto &g : glob()) { - std::filesystem::path absolute_glob_path{g}; + if (g.is_regex()) { + LOG_DBG("Searching glob regex {}", g.to_string()); + + std::regex regex_pattern( + g.to_string(), std::regex_constants::optimize); + + std::copy_if(compilation_database_files.begin(), + compilation_database_files.end(), std::back_inserter(result), + [®ex_pattern](const auto &tu) { + std::smatch m; + return std::regex_search(tu, m, regex_pattern); + }); + } + else { + std::filesystem::path absolute_glob_path{g.to_string()}; #ifdef _MSC_VER - if (!absolute_glob_path.has_root_name()) + if (!absolute_glob_path.has_root_name()) #else - if (!absolute_glob_path.is_absolute()) + if (!absolute_glob_path.is_absolute()) #endif - absolute_glob_path = root_directory() / absolute_glob_path; + absolute_glob_path = root_directory() / absolute_glob_path; + + LOG_DBG("Searching glob path {}", absolute_glob_path.string()); - LOG_DBG("Searching glob path {}", absolute_glob_path.string()); + auto matches = glob::glob(absolute_glob_path.string(), true, false); - auto matches = glob::glob(absolute_glob_path.string(), true, false); + for (const auto &match : matches) { + const auto path = + std::filesystem::canonical(root_directory() / match); - for (const auto &match : matches) { - const auto path = - std::filesystem::canonical(root_directory() / match); - translation_units.emplace_back(path.string()); + result.emplace_back(path.string()); + } } } - return translation_units; + return result; } std::filesystem::path diagram::root_directory() const diff --git a/src/config/config.h b/src/config/config.h index 230d62713..94b9a77ac 100644 --- a/src/config/config.h +++ b/src/config/config.h @@ -116,6 +116,13 @@ struct plantuml_keyword_mapping_t { relationships; }; +enum class filter_mode_t { + basic, /*!< Default filter structure without logical operators */ + advanced /*!< Advanced filter config with logical operators */ +}; + +std::string to_string(filter_mode_t cp); + /** * @brief PlantUML diagram config section * @@ -187,6 +194,9 @@ struct diagram_template { }; struct filter { + std::shared_ptr anyof; + std::shared_ptr allof; + /*! @brief Namespaces filter * * Example: @@ -445,8 +455,20 @@ struct layout_hint { using layout_hints = std::map>; struct generate_links_config { - std::string link; - std::string tooltip; + std::map link; + std::map tooltip; + + std::optional> get_link_pattern( + const std::string &path) const + { + return util::find_entry_by_path_prefix(link, path); + } + + std::optional> get_tooltip_pattern( + const std::string &path) const + { + return util::find_entry_by_path_prefix(tooltip, path); + } }; struct git_config { @@ -539,11 +561,13 @@ struct inheritable_diagram_options { */ option &get_relative_to() { return relative_to; } - option> glob{"glob"}; + 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 filter_mode{"filter_mode", filter_mode_t::basic}; + option include_system_headers{"include_system_headers", false}; option include{"include"}; option exclude{"exclude"}; option puml{"plantuml", option_inherit_mode::kAppend}; @@ -615,11 +639,12 @@ struct diagram : public inheritable_diagram_options { virtual common::model::diagram_t type() const = 0; /** - * @brief Returns list of translation unit paths + * @brief Filter translation units based on glob patterns * * @return List of translation unit paths */ - std::vector get_translation_units() const; + std::vector glob_translation_units( + const std::vector &compilation_database_files) const; /** * @brief Make path relative to the `relative_to` config option diff --git a/src/config/schema.h b/src/config/schema.h index f1e880f65..a90f7cdbd 100644 --- a/src/config/schema.h +++ b/src/config/schema.h @@ -37,8 +37,8 @@ const std::string schema_str = R"( - abbreviated - none generate_links_t: - link: string - tooltip: string + link: !optional [string, map_t] + tooltip: !optional [string, map_t] git_t: branch: string revision: [string, int] @@ -156,6 +156,8 @@ const std::string schema_str = R"( paths: !optional [string] method_types: !optional [method_type_filter_t] callee_types: !optional [callee_type_filter_t] + anyof: !optional filter_t + allof: !optional filter_t function_location_t: function: string marker_location_t: @@ -163,6 +165,9 @@ const std::string schema_str = R"( source_location_t: - function_location_t - marker_location_t + filter_mode_t: !variant + - basic + - advanced class_diagram_t: type: !variant [class] # @@ -171,10 +176,12 @@ const std::string schema_str = R"( __parent_path: !optional string comment_parser: !optional comment_parser_t debug_mode: !optional bool + filter_mode: !optional filter_mode_t + include_system_headers: !optional bool exclude: !optional filter_t generate_links: !optional generate_links_t git: !optional git_t - glob: !optional [string] + glob: !optional [regex_or_string_t] include: !optional filter_t plantuml: !optional before: !optional [string] @@ -215,8 +222,10 @@ const std::string schema_str = R"( debug_mode: !optional bool exclude: !optional filter_t generate_links: !optional generate_links_t + filter_mode: !optional filter_mode_t + include_system_headers: !optional bool git: !optional git_t - glob: !optional [string] + glob: !optional [regex_or_string_t] include: !optional filter_t plantuml: !optional before: !optional [string] @@ -257,7 +266,9 @@ const std::string schema_str = R"( exclude: !optional filter_t generate_links: !optional generate_links_t git: !optional git_t - glob: !optional [string] + glob: !optional [regex_or_string_t] + filter_mode: !optional filter_mode_t + include_system_headers: !optional bool include: !optional filter_t plantuml: !optional before: !optional [string] @@ -286,10 +297,12 @@ const std::string schema_str = R"( __parent_path: !optional string comment_parser: !optional comment_parser_t debug_mode: !optional bool + filter_mode: !optional filter_mode_t + include_system_headers: !optional bool exclude: !optional filter_t generate_links: !optional generate_links_t git: !optional git_t - glob: !optional [string] + glob: !optional [regex_or_string_t] include: !optional filter_t plantuml: !optional before: !optional [string] @@ -339,7 +352,7 @@ const std::string schema_str = R"( exclude: !optional filter_t generate_links: !optional generate_links_t git: !optional git_t - glob: !optional [string] + glob: !optional [regex_or_string_t] include: !optional filter_t plantuml: !optional before: !optional [string] @@ -371,6 +384,8 @@ const std::string schema_str = R"( generate_template_argument_dependencies: !optional bool skip_redundant_dependencies: !optional bool type_aliases: !optional map_t + filter_mode: !optional filter_mode_t + include_system_headers: !optional bool )"; } // namespace clanguml::config \ No newline at end of file diff --git a/src/config/yaml_decoders.cc b/src/config/yaml_decoders.cc index a21335bac..6235bd3b2 100644 --- a/src/config/yaml_decoders.cc +++ b/src/config/yaml_decoders.cc @@ -158,6 +158,21 @@ void get_option(const Node &node, } } +template <> +void get_option(const Node &node, + clanguml::config::option &option) +{ + if (node[option.name]) { + const auto &val = node[option.name].as(); + if (val == "basic") + option.set(clanguml::config::filter_mode_t::basic); + else if (val == "advanced") + option.set(clanguml::config::filter_mode_t::advanced); + else + throw std::runtime_error("Invalid comment_parser value: " + val); + } +} + template <> void get_option>( const Node &node, @@ -521,6 +536,14 @@ template <> struct convert { template <> struct convert { static bool decode(const Node &node, filter &rhs) { + if (node["anyof"]) { + rhs.anyof = std::make_unique(node["anyof"].as()); + } + + if (node["allof"]) { + rhs.allof = std::make_unique(node["allof"].as()); + } + if (node["namespaces"]) { auto namespace_list = node["namespaces"].as(); @@ -593,11 +616,19 @@ template <> struct convert { template <> struct convert { static bool decode(const Node &node, generate_links_config &rhs) { - if (node["link"]) - rhs.link = node["link"].as(); + if (node["link"]) { + if (node["link"].IsMap()) + rhs.link = node["link"].as(); + else + rhs.link.emplace(".", node["link"].as()); + } - if (node["tooltip"]) - rhs.tooltip = node["tooltip"].as(); + if (node["tooltip"]) { + if (node["tooltip"].IsMap()) + rhs.tooltip = node["tooltip"].as(); + else + rhs.tooltip.emplace(".", node["tooltip"].as()); + } return true; } @@ -631,6 +662,8 @@ template bool decode_diagram(const Node &node, T &rhs) get_option(node, rhs.glob); get_option(node, rhs.using_namespace); get_option(node, rhs.using_module); + get_option(node, rhs.filter_mode); + get_option(node, rhs.include_system_headers); get_option(node, rhs.include); get_option(node, rhs.exclude); get_option(node, rhs.puml); @@ -849,6 +882,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.filter_mode); get_option(node, rhs.output_directory); get_option(node, rhs.query_driver); get_option(node, rhs.allow_empty_diagrams); @@ -937,7 +971,7 @@ void resolve_option_path(YAML::Node &doc, const std::string &option_name) std::filesystem::path relative_to_path{ doc["relative_to"].as()}; - assert(relative_to_path.is_absolute()); + relative_to_path = weakly_canonical(relative_to_path); std::filesystem::path option_path{doc[option_name].as()}; diff --git a/src/include_diagram/generators/json/include_diagram_generator.cc b/src/include_diagram/generators/json/include_diagram_generator.cc index 4a2c934cf..7c4395000 100644 --- a/src/include_diagram/generators/json/include_diagram_generator.cc +++ b/src/include_diagram/generators/json/include_diagram_generator.cc @@ -39,14 +39,11 @@ void generator::generate_relationships( }); } else { - util::for_each_if( - f.relationships(), - [this](const auto &r) { return model().should_include(r.type()); }, - [&f, &parent](const auto &r) { - nlohmann::json rel = r; - rel["source"] = std::to_string(f.id().value()); - parent["relationships"].push_back(std::move(rel)); - }); + for (const auto &r : f.relationships()) { + nlohmann::json rel = r; + rel["source"] = std::to_string(f.id().value()); + parent["relationships"].push_back(std::move(rel)); + } } } @@ -73,17 +70,15 @@ void generator::generate(const source_file &f, nlohmann::json &parent) const parent["elements"].push_back(std::move(j)); } else { - if (model().should_include(f)) { - LOG_DBG("Generating file {}", f.name()); - - 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(); - } + LOG_DBG("Generating file {}", f.name()); - parent["elements"].push_back(std::move(j)); + 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/mermaid/include_diagram_generator.cc b/src/include_diagram/generators/mermaid/include_diagram_generator.cc index be7188def..6dfda215c 100644 --- a/src/include_diagram/generators/mermaid/include_diagram_generator.cc +++ b/src/include_diagram/generators/mermaid/include_diagram_generator.cc @@ -49,21 +49,13 @@ void generator::generate_relationships( }); } else { - util::for_each_if( - f.relationships(), - [this](const auto &r) { - return model().should_include(r.type()) && - util::contains(m_generated_aliases, - model().get(r.destination()).value().alias()); - }, - [&f, &ostr, this](const auto &r) { - ostr << indent(1) << f.alias() << " " - << (r.type() == common::model::relationship_t::kDependency - ? "-.->" - : "-->") - << " " << model().get(r.destination()).value().alias() - << '\n'; - }); + for (const auto &r : f.relationships()) { + ostr << indent(1) << f.alias() << " " + << (r.type() == common::model::relationship_t::kDependency + ? "-.->" + : "-->") + << " " << model().get(r.destination()).value().alias() << '\n'; + } } } @@ -86,11 +78,9 @@ void generator::generate(const source_file &f, std::ostream &ostr) const else { LOG_DBG("Generating file {}", f.name()); - if (model().should_include(f)) { - ostr << indent(1) << f.alias() << "[" << f.name() << "]\n"; + ostr << indent(1) << f.alias() << "[" << f.name() << "]\n"; - m_generated_aliases.emplace(f.alias()); - } + m_generated_aliases.emplace(f.alias()); } if (config().generate_links) { diff --git a/src/include_diagram/generators/plantuml/include_diagram_generator.cc b/src/include_diagram/generators/plantuml/include_diagram_generator.cc index 373607e8a..40420b6fd 100644 --- a/src/include_diagram/generators/plantuml/include_diagram_generator.cc +++ b/src/include_diagram/generators/plantuml/include_diagram_generator.cc @@ -44,18 +44,11 @@ void generator::generate_relationships( }); } else { - util::for_each_if( - f.relationships(), - [this](const auto &r) { - return model().should_include(r.type()) && - util::contains(m_generated_aliases, - model().get(r.destination()).value().alias()); - }, - [&f, &ostr, this](const auto &r) { - ostr << f.alias() << " " - << plantuml_common::to_plantuml(r, config()) << " " - << model().get(r.destination()).value().alias() << '\n'; - }); + for (const auto &r : f.relationships()) { + ostr << f.alias() << " " + << plantuml_common::to_plantuml(r, config()) << " " + << model().get(r.destination()).value().alias() << '\n'; + } } } @@ -79,17 +72,15 @@ void generator::generate(const source_file &f, std::ostream &ostr) const else { LOG_DBG("Generating file {}", f.name()); - if (model().should_include(f)) { - ostr << "file \"" << f.name() << "\" as " << f.alias(); + ostr << "file \"" << f.name() << "\" as " << f.alias(); - if (config().generate_links) { - generate_link(ostr, f); - } + if (config().generate_links) { + generate_link(ostr, f); + } - ostr << '\n'; + ostr << '\n'; - m_generated_aliases.emplace(f.alias()); - } + m_generated_aliases.emplace(f.alias()); } } diff --git a/src/include_diagram/model/diagram.cc b/src/include_diagram/model/diagram.cc index 8bce0ae19..564cbabb4 100644 --- a/src/include_diagram/model/diagram.cc +++ b/src/include_diagram/model/diagram.cc @@ -18,6 +18,7 @@ #include "diagram.h" +#include "common/model/filters/diagram_filter.h" #include "util/error.h" #include "util/util.h" @@ -53,8 +54,6 @@ void diagram::add_file(std::unique_ptr &&f) assert(!ff.name().empty()); assert(ff.id().value() != 0); - element_view::add(ff); - auto p = ff.path(); if (!f->path().is_empty()) { @@ -86,7 +85,8 @@ void diagram::add_file(std::unique_ptr &&f) assert(p.type() == common::model::path_type::kFilesystem); - add_element(p, std::move(f)); + if (add_element(p, std::move(f))) + element_view::add(ff); } const common::reference_vector & @@ -133,6 +133,25 @@ inja::json diagram::context() const return ctx; } +void diagram::apply_filter() +{ + // First find all element ids which should be removed + std::set to_remove; + + for (auto &f : element_view::view()) + if (f.get().type() != common::model::source_file_t::kDirectory && + !filter().should_include(f.get())) { + to_remove.emplace(f.get().id()); + } + + for (auto &sf : element_view::view()) + sf.get().apply_filter(filter(), to_remove); + + element_view::remove(to_remove); + + nested_trait_fspath::remove(to_remove); +} + bool diagram::is_empty() const { return element_view::is_empty(); } } // namespace clanguml::include_diagram::model diff --git a/src/include_diagram/model/diagram.h b/src/include_diagram/model/diagram.h index 38fe3a9a4..4d2fd3f74 100644 --- a/src/include_diagram/model/diagram.h +++ b/src/include_diagram/model/diagram.h @@ -33,13 +33,15 @@ using clanguml::common::opt_ref; using clanguml::common::model::diagram_element; using clanguml::common::model::source_file; +using nested_trait_fspath = clanguml::common::model::nested_trait; + /** * @brief Class representing an include diagram model. */ class diagram : public clanguml::common::model::diagram, public clanguml::common::model::element_view, - public clanguml::common::model::nested_trait { + public nested_trait_fspath { public: diagram() = default; @@ -128,6 +130,8 @@ class diagram : public clanguml::common::model::diagram, * @return True, if diagram is empty */ bool is_empty() const override; + + void apply_filter() override; }; template diff --git a/src/package_diagram/generators/json/package_diagram_generator.cc b/src/package_diagram/generators/json/package_diagram_generator.cc index 6cd001e64..ef34efbf0 100644 --- a/src/package_diagram/generators/json/package_diagram_generator.cc +++ b/src/package_diagram/generators/json/package_diagram_generator.cc @@ -39,9 +39,7 @@ void generator::generate_relationships( auto destination_package = model().get(r.destination()); - if (!destination_package || - !model().should_include( - dynamic_cast(*destination_package))) + if (!destination_package) continue; rel["source"] = std::to_string(p.id().value()); @@ -88,9 +86,7 @@ void generator::generate(const package &p, nlohmann::json &parent) const for (const auto &subpackage : p) { auto &pkg = dynamic_cast(*subpackage); - if (model().should_include(pkg)) { - generate(pkg, j); - } + generate(pkg, j); } parent["elements"].push_back(std::move(j)); @@ -98,9 +94,7 @@ void generator::generate(const package &p, nlohmann::json &parent) const else { for (const auto &subpackage : p) { auto &pkg = dynamic_cast(*subpackage); - if (model().should_include(pkg)) { - generate(pkg, parent); - } + generate(pkg, parent); } } } @@ -120,15 +114,12 @@ void generator::generate_diagram(nlohmann::json &parent) const for (const auto &p : model()) { auto &pkg = dynamic_cast(*p); - if (model().should_include(pkg)) { - generate(pkg, parent); - } + generate(pkg, parent); } // Process package relationships for (const auto &p : model()) { - if (model().should_include(dynamic_cast(*p))) - generate_relationships(dynamic_cast(*p), parent); + generate_relationships(dynamic_cast(*p), parent); } } diff --git a/src/package_diagram/generators/mermaid/package_diagram_generator.cc b/src/package_diagram/generators/mermaid/package_diagram_generator.cc index e2beff79e..a9e0424f3 100644 --- a/src/package_diagram/generators/mermaid/package_diagram_generator.cc +++ b/src/package_diagram/generators/mermaid/package_diagram_generator.cc @@ -47,9 +47,7 @@ void generator::generate_relationships( try { auto destination_package = model().get(r.destination()); - if (!destination_package || - !model().should_include( - dynamic_cast(*destination_package))) + if (!destination_package) continue; auto destination_alias = model().to_alias(r.destination()); @@ -94,16 +92,12 @@ void generator::generate(const package &p, std::ostream &ostr) const for (const auto &subpackage : p) { auto &pkg = dynamic_cast(*subpackage); - if (model().should_include(pkg)) { - auto together_group = - config().get_together_group(pkg.full_name(false)); - if (together_group) { - together_group_stack_.group_together( - together_group.value(), &pkg); - } - else { - generate(pkg, ostr); - } + auto together_group = config().get_together_group(pkg.full_name(false)); + if (together_group) { + together_group_stack_.group_together(together_group.value(), &pkg); + } + else { + generate(pkg, ostr); } } @@ -159,16 +153,12 @@ void generator::generate_diagram(std::ostream &ostr) const { for (const auto &p : model()) { auto &pkg = dynamic_cast(*p); - if (model().should_include(pkg)) { - auto together_group = - config().get_together_group(pkg.full_name(false)); - if (together_group) { - together_group_stack_.group_together( - together_group.value(), &pkg); - } - else { - generate(pkg, ostr); - } + auto together_group = config().get_together_group(pkg.full_name(false)); + if (together_group) { + together_group_stack_.group_together(together_group.value(), &pkg); + } + else { + generate(pkg, ostr); } } @@ -176,8 +166,7 @@ void generator::generate_diagram(std::ostream &ostr) const // Process package relationships for (const auto &p : model()) { - if (model().should_include(dynamic_cast(*p))) - generate_relationships(dynamic_cast(*p), ostr); + generate_relationships(dynamic_cast(*p), ostr); } } diff --git a/src/package_diagram/generators/plantuml/package_diagram_generator.cc b/src/package_diagram/generators/plantuml/package_diagram_generator.cc index 935b567b5..8a0dd9690 100644 --- a/src/package_diagram/generators/plantuml/package_diagram_generator.cc +++ b/src/package_diagram/generators/plantuml/package_diagram_generator.cc @@ -39,10 +39,7 @@ void generator::generate_relationships( std::stringstream relstr; try { auto destination_package = model().get(r.destination()); - - if (!destination_package || - !model().should_include( - dynamic_cast(*destination_package))) + if (!destination_package) continue; auto destination_alias = model().to_alias(r.destination()); @@ -62,9 +59,8 @@ void generator::generate_relationships( // Process it's subpackages relationships for (const auto &subpackage : p) { - if (model().should_include(dynamic_cast(*subpackage))) - generate_relationships( - dynamic_cast(*subpackage), ostr); + generate_relationships( + dynamic_cast(*subpackage), ostr); } } @@ -96,16 +92,12 @@ void generator::generate(const package &p, std::ostream &ostr) const for (const auto &subpackage : p) { auto &pkg = dynamic_cast(*subpackage); - if (model().should_include(pkg)) { - auto together_group = - config().get_together_group(pkg.full_name(false)); - if (together_group) { - together_group_stack_.group_together( - together_group.value(), &pkg); - } - else { - generate(pkg, ostr); - } + auto together_group = config().get_together_group(pkg.full_name(false)); + if (together_group) { + together_group_stack_.group_together(together_group.value(), &pkg); + } + else { + generate(pkg, ostr); } } @@ -138,16 +130,12 @@ void generator::generate_diagram(std::ostream &ostr) const { for (const auto &p : model()) { auto &pkg = dynamic_cast(*p); - if (model().should_include(pkg)) { - auto together_group = - config().get_together_group(pkg.full_name(false)); - if (together_group) { - together_group_stack_.group_together( - together_group.value(), &pkg); - } - else { - generate(pkg, ostr); - } + auto together_group = config().get_together_group(pkg.full_name(false)); + if (together_group) { + together_group_stack_.group_together(together_group.value(), &pkg); + } + else { + generate(pkg, ostr); } } @@ -155,8 +143,7 @@ void generator::generate_diagram(std::ostream &ostr) const // Process package relationships for (const auto &p : model()) { - if (model().should_include(dynamic_cast(*p))) - generate_relationships(dynamic_cast(*p), ostr); + generate_relationships(dynamic_cast(*p), ostr); } generate_config_layout_hints(ostr); diff --git a/src/package_diagram/model/diagram.cc b/src/package_diagram/model/diagram.cc index b1ad3d182..36cfbea6c 100644 --- a/src/package_diagram/model/diagram.cc +++ b/src/package_diagram/model/diagram.cc @@ -18,6 +18,7 @@ #include "diagram.h" +#include "common/model/filters/diagram_filter.h" #include "util/error.h" #include "util/util.h" @@ -74,6 +75,23 @@ inja::json diagram::context() const return ctx; } +void diagram::apply_filter() +{ + // First find all element ids which should be removed + std::set to_remove; + + for (const auto &c : packages()) + if (!filter().should_include(c.get())) + to_remove.emplace(c.get().id()); + + element_view::remove(to_remove); + + nested_trait_ns::remove(to_remove); + + for (auto &c : element_view::view()) + c.get().apply_filter(filter(), to_remove); +} + bool diagram::is_empty() const { return element_view::is_empty(); } } // namespace clanguml::package_diagram::model diff --git a/src/package_diagram/model/diagram.h b/src/package_diagram/model/diagram.h index a06bdb28c..ada50a251 100644 --- a/src/package_diagram/model/diagram.h +++ b/src/package_diagram/model/diagram.h @@ -32,14 +32,16 @@ using clanguml::common::model::diagram_element; using clanguml::common::model::package; using clanguml::common::model::path; +using nested_trait_ns = + clanguml::common::model::nested_trait; + /** * @brief Package diagram model. */ class diagram : public clanguml::common::model::diagram, public clanguml::common::model::element_view, - public clanguml::common::model::nested_trait< - clanguml::common::model::element, - clanguml::common::model::namespace_> { + public nested_trait_ns { public: diagram() = default; @@ -165,6 +167,8 @@ class diagram : public clanguml::common::model::diagram, */ bool is_empty() const override; + void apply_filter() override; + private: /** * @brief Add element using module as diagram path diff --git a/src/sequence_diagram/model/diagram.cc b/src/sequence_diagram/model/diagram.cc index cd32f3a28..dc9dff6ab 100644 --- a/src/sequence_diagram/model/diagram.cc +++ b/src/sequence_diagram/model/diagram.cc @@ -18,7 +18,7 @@ #include "diagram.h" -#include "common/model/diagram_filter.h" +#include "common/model/filters/diagram_filter.h" #include #include diff --git a/src/sequence_diagram/model/participant.h b/src/sequence_diagram/model/participant.h index ea5550c0c..6c2b9be62 100644 --- a/src/sequence_diagram/model/participant.h +++ b/src/sequence_diagram/model/participant.h @@ -380,7 +380,7 @@ struct function : public participant { struct method : public function { method(const common::model::namespace_ &using_namespace); - method(const function &) = delete; + method(const method &) = delete; method(method &&) noexcept = delete; method &operator=(const method &) = delete; method &operator=(method &&) = delete; diff --git a/src/sequence_diagram/visitor/translation_unit_visitor.cc b/src/sequence_diagram/visitor/translation_unit_visitor.cc index 1db588550..7845a8105 100644 --- a/src/sequence_diagram/visitor/translation_unit_visitor.cc +++ b/src/sequence_diagram/visitor/translation_unit_visitor.cc @@ -518,7 +518,8 @@ bool translation_unit_visitor::TraverseLambdaExpr(clang::LambdaExpr *expr) bool translation_unit_visitor::TraverseCallExpr(clang::CallExpr *expr) { - if (source_manager().isInSystemHeader(expr->getSourceRange().getBegin())) + if (!config().include_system_headers() && + source_manager().isInSystemHeader(expr->getSourceRange().getBegin())) return true; LOG_TRACE("Entering call expression at {}", @@ -541,7 +542,8 @@ bool translation_unit_visitor::TraverseCallExpr(clang::CallExpr *expr) bool translation_unit_visitor::TraverseCUDAKernelCallExpr( clang::CUDAKernelCallExpr *expr) { - if (source_manager().isInSystemHeader(expr->getSourceRange().getBegin())) + if (!config().include_system_headers() && + source_manager().isInSystemHeader(expr->getSourceRange().getBegin())) return true; LOG_TRACE("Entering CUDA kernel call expression at {}", @@ -564,7 +566,8 @@ bool translation_unit_visitor::TraverseCUDAKernelCallExpr( bool translation_unit_visitor::TraverseCXXMemberCallExpr( clang::CXXMemberCallExpr *expr) { - if (source_manager().isInSystemHeader(expr->getSourceRange().getBegin())) + if (!config().include_system_headers() && + source_manager().isInSystemHeader(expr->getSourceRange().getBegin())) return true; LOG_TRACE("Entering member call expression at {}", @@ -1085,6 +1088,9 @@ bool translation_unit_visitor::VisitCallExpr(clang::CallExpr *expr) auto generated_message_from_comment = generate_message_from_comment(m); if (!generated_message_from_comment && !should_include(expr)) { + LOG_DBG("Skipping call expression due to filter at: {}", + expr->getBeginLoc().printToString(source_manager())); + processed_comments().erase(raw_expr_comment); return true; } @@ -1178,7 +1184,7 @@ bool translation_unit_visitor::VisitCallExpr(clang::CallExpr *expr) auto success = process_function_call_expression(m, expr); if (!success) { - LOG_DBG("Skipping call to call expression at: {}", + LOG_DBG("Skipping call expression at: {}", expr->getBeginLoc().printToString(source_manager())); return true; @@ -1708,7 +1714,9 @@ translation_unit_visitor::create_class_model(clang::CXXRecordDecl *cls) .get_participant( *id_opt); - assert(parent_class); + if (!parent_class) { + return {}; + } c.set_namespace(ns); if (cls->getNameAsString().empty()) { @@ -2096,6 +2104,7 @@ translation_unit_visitor::create_lambda_method_model( ns.pop_back(); method_model_ptr->set_name(ns.name()); ns.pop_back(); + method_model_ptr->set_namespace(ns); method_model_ptr->is_defaulted(declaration->isDefaulted()); method_model_ptr->is_assignment(declaration->isCopyAssignmentOperator() || @@ -2135,6 +2144,7 @@ translation_unit_visitor::create_method_model(clang::CXXMethodDecl *declaration) ns.pop_back(); method_model_ptr->set_name(ns.name()); ns.pop_back(); + method_model_ptr->set_namespace(ns); method_model_ptr->is_defaulted(declaration->isDefaulted()); method_model_ptr->is_assignment(declaration->isCopyAssignmentOperator() || @@ -2189,14 +2199,8 @@ translation_unit_visitor::create_method_model(clang::CXXMethodDecl *declaration) bool translation_unit_visitor::should_include(const clang::TagDecl *decl) const { - if (source_manager().isInSystemHeader(decl->getSourceRange().getBegin())) - return false; - - const auto decl_file = decl->getLocation().printToString(source_manager()); - - return diagram().should_include( - namespace_{decl->getQualifiedNameAsString()}) && - diagram().should_include(common::model::source_file{decl_file}); + return visitor_specialization_t::should_include( + dynamic_cast(decl)); } bool translation_unit_visitor::should_include( @@ -2234,8 +2238,11 @@ bool translation_unit_visitor::should_include(const clang::CallExpr *expr) const if (callee_decl != nullptr) { const auto *callee_function = callee_decl->getAsFunction(); - if ((callee_function == nullptr) || !should_include(callee_function)) + if ((callee_function == nullptr) || !should_include(callee_function)) { + LOG_DBG("Skipping call expression at {}", + expr->getBeginLoc().printToString(source_manager())); return false; + } return should_include(callee_function); } @@ -2261,30 +2268,19 @@ bool translation_unit_visitor::should_include( bool translation_unit_visitor::should_include( const clang::FunctionDecl *decl) const { - const auto decl_file = decl->getLocation().printToString(source_manager()); - - return diagram().should_include( - namespace_{decl->getQualifiedNameAsString()}) && - diagram().should_include(common::model::source_file{decl_file}); + return visitor_specialization_t::should_include(decl); } bool translation_unit_visitor::should_include( const clang::FunctionTemplateDecl *decl) const { - return should_include(decl->getAsFunction()); + return visitor_specialization_t::should_include(decl->getAsFunction()); } bool translation_unit_visitor::should_include( const clang::ClassTemplateDecl *decl) const { - if (source_manager().isInSystemHeader(decl->getSourceRange().getBegin())) - return false; - - const auto decl_file = decl->getLocation().printToString(source_manager()); - - return diagram().should_include( - namespace_{decl->getQualifiedNameAsString()}) && - diagram().should_include(common::model::source_file{decl_file}); + return visitor_specialization_t::should_include(decl); } std::optional translation_unit_visitor::get_expression_comment( diff --git a/src/util/util.cc b/src/util/util.cc index a06cf70d8..7cc929720 100644 --- a/src/util/util.cc +++ b/src/util/util.cc @@ -496,4 +496,75 @@ std::string format_message_comment(const std::string &comment, unsigned width) return result; } +std::filesystem::path normalize_relative_path(const std::filesystem::path &path) +{ + if (path.is_absolute()) + return path; + + std::filesystem::path result; + + for (const auto &part : path) { + if (part == ".") { + continue; + } + result /= part; + } + + return result; +} + +bool is_subpath( + const std::filesystem::path &path, const std::filesystem::path &base) +{ + if (path.empty()) + return false; + + auto normalized_path = normalize_relative_path(path); + auto normalized_base = normalize_relative_path(base); + + if (normalized_path == normalized_base) + return true; + + auto rel = std::filesystem::relative(normalized_path, normalized_base); + + std::string rel_str = rel.string(); + return !rel_str.empty() && rel.native()[0] != '.'; +} + +std::optional> find_entry_by_path_prefix( + const std::map &m, const std::string &path) +{ + if (m.empty()) + return {}; + + // Extract keys and sort them by length in descending order + std::vector keys; + keys.reserve(m.size()); + for (const auto &[key, pattern] : m) { + keys.push_back(key); + } + + std::sort(keys.begin(), keys.end(), + [](const std::string &a, const std::string &b) { + return a.size() > b.size(); + }); + + std::filesystem::path file_path{path}; + + for (const auto &key : keys) { + const auto &pattern = m.at(key); + std::filesystem::path key_path{key}; + + if (is_subpath(file_path, key_path)) { + return {{key, pattern}}; + } + } + + if ((path.empty() || file_path.is_relative() || path == ".") && + m.count(".") > 0) { + return {{".", m.at(".")}}; + } + + return {}; +} } // namespace clanguml::util diff --git a/src/util/util.h b/src/util/util.h index 1db0af1d5..45c6a986d 100644 --- a/src/util/util.h +++ b/src/util/util.h @@ -23,6 +23,8 @@ #include #include #include +#include +#include #include #include #include @@ -460,4 +462,9 @@ bool is_relative_to( std::string format_message_comment( const std::string &c, unsigned width = kDefaultMessageCommentWidth); +bool is_subpath( + const std::filesystem::path &path, const std::filesystem::path &prefix); + +std::optional> find_entry_by_path_prefix( + const std::map &m, const std::string &prefix); } // namespace clanguml::util \ No newline at end of file diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 88a911e92..2e1ae3277 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,5 +1,5 @@ -file(GLOB_RECURSE TEST_CASE_SOURCES t*/*.cc t*/*.c t*/src/*.c) +file(GLOB_RECURSE TEST_CASE_SOURCES t*/*.cc t*/*.c t*/src/*.c t*/*.cu) 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 @@ -93,6 +93,7 @@ set(TEST_NAMES test_config test_cli_handler test_filters + test_filters_advanced test_thread_pool_executor test_query_driver_output_extractor test_progress_indicator) diff --git a/tests/t00080/.clang-uml b/tests/t00080/.clang-uml new file mode 100644 index 000000000..cf855dae4 --- /dev/null +++ b/tests/t00080/.clang-uml @@ -0,0 +1,15 @@ +diagrams: + t00080_class: + type: class + filter_mode: advanced + comment_parser: clang + include_system_headers: true + glob: + - t00080.cc + include: + anyof: + namespaces: + - clanguml::t00080 + elements: + - std::thread + using_namespace: clanguml::t00080 \ No newline at end of file diff --git a/tests/t00080/t00080.cc b/tests/t00080/t00080.cc new file mode 100644 index 000000000..c3016e720 --- /dev/null +++ b/tests/t00080/t00080.cc @@ -0,0 +1,24 @@ +#include + +namespace clanguml { +namespace t00080 { + +class Worker : public std::thread { +public: + using std::thread::thread; + + ~Worker() + { + if (this->joinable()) { + this->join(); + } + } + + void start(int delay) { } +}; + +struct R { + Worker *w; +}; +} +} \ No newline at end of file diff --git a/tests/t00080/test_case.h b/tests/t00080/test_case.h new file mode 100644 index 000000000..2cb48383f --- /dev/null +++ b/tests/t00080/test_case.h @@ -0,0 +1,35 @@ +/** + * tests/t00080/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("t00080") +{ + using namespace clanguml::test; + using namespace std::string_literals; + + auto [config, db, diagram, model] = + CHECK_CLASS_MODEL("t00080", "t00080_class"); + + CHECK_CLASS_DIAGRAM(*config, diagram, *model, [](const auto &src) { + REQUIRE(IsClass(src, "Worker")); + REQUIRE(IsClass(src, "R")); + REQUIRE(IsClass(src, "std::thread")); + REQUIRE(!IsClass(src, "std::jthread")); + + REQUIRE(IsAssociation(src, "R", "Worker", "w")); + }); +} \ No newline at end of file diff --git a/tests/t00081/.clang-uml b/tests/t00081/.clang-uml new file mode 100644 index 000000000..0463f2f21 --- /dev/null +++ b/tests/t00081/.clang-uml @@ -0,0 +1,25 @@ +diagrams: + t00081_class: + type: class + glob: + - t00081.cc + filter_mode: advanced + include_system_headers: true + include: + allof: + namespaces: + - clanguml::t00081 + - std + context: + - match: + radius: 2 + pattern: clanguml::t00081::A + exclude: + anyof: + access: + - private + - public + - protected + relationships: + - dependency + using_namespace: clanguml::t00081 \ No newline at end of file diff --git a/tests/t00081/t00081.cc b/tests/t00081/t00081.cc new file mode 100644 index 000000000..a499a03da --- /dev/null +++ b/tests/t00081/t00081.cc @@ -0,0 +1,18 @@ +#include +#include +#include + +namespace clanguml { +namespace t00081_detail { +struct C { }; +} // namespace t00081_detail +namespace t00081 { +struct A { + std::vector as; + std::string s; + std::map ms; + + t00081_detail::C *c; +}; +} // namespace t00081 +} // namespace clanguml \ No newline at end of file diff --git a/tests/t00081/test_case.h b/tests/t00081/test_case.h new file mode 100644 index 000000000..47d641043 --- /dev/null +++ b/tests/t00081/test_case.h @@ -0,0 +1,35 @@ +/** + * tests/t00081/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("t00081") +{ + using namespace clanguml::test; + using namespace std::string_literals; + + auto [config, db, diagram, model] = + CHECK_CLASS_MODEL("t00081", "t00081_class"); + + CHECK_CLASS_DIAGRAM(*config, diagram, *model, [](const auto &src) { + REQUIRE(IsClass(src, "A")); + REQUIRE(!IsClass(src, "C")); + + REQUIRE(IsClass(src, "std::string")); + REQUIRE(IsClass(src, "std::vector")); + REQUIRE(IsClass(src, "std::map")); + }); +} \ No newline at end of file diff --git a/tests/t00082/.clang-uml b/tests/t00082/.clang-uml new file mode 100644 index 000000000..54f1fc9f2 --- /dev/null +++ b/tests/t00082/.clang-uml @@ -0,0 +1,20 @@ +diagrams: + t00082_class: + type: class + glob: + - t00082.cc + generate_packages: true + filter_mode: advanced + include: + anyof: + subclasses: + - clanguml::t00082::ns1::nsA::A1 + namespaces: + - clanguml::t00082::ns2::nsB + context: + - clanguml::t00082::ns3::nsC::B3 + exclude: + allof: + elements: + - clanguml::t00082::ns1::nsA::A1 + using_namespace: clanguml::t00082 \ No newline at end of file diff --git a/tests/t00082/t00082.cc b/tests/t00082/t00082.cc new file mode 100644 index 000000000..d2f1c0946 --- /dev/null +++ b/tests/t00082/t00082.cc @@ -0,0 +1,30 @@ +namespace clanguml::t00082 { +namespace ns1 { +namespace nsA { +struct A1 { }; +struct B1 : public A1 { }; +struct C1 : public B1 { }; +struct D1 { }; +} +} +namespace ns2 { +namespace nsB { +struct A2 { }; +struct B2 : public A2 { }; +struct C2 : public B2 { }; +} +} +namespace ns3 { +namespace nsC { +struct A3 { }; +struct B3 : public A3 { }; +struct C3 : public B3 { }; +struct D3 { }; +} +} +namespace ns4 { +namespace nsD { +struct A4 { }; +} +} +} \ No newline at end of file diff --git a/tests/t00082/test_case.h b/tests/t00082/test_case.h new file mode 100644 index 000000000..558ed3756 --- /dev/null +++ b/tests/t00082/test_case.h @@ -0,0 +1,46 @@ +/** + * tests/t00082/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("t00082") +{ + using namespace clanguml::test; + using namespace std::string_literals; + + auto [config, db, diagram, model] = + CHECK_CLASS_MODEL("t00082", "t00082_class"); + + CHECK_CLASS_DIAGRAM(*config, diagram, *model, [](const auto &src) { + REQUIRE(!IsClass(src, {"ns1::nsA", "A1"})); + REQUIRE(IsClass(src, {"ns1::nsA", "B1"})); + REQUIRE(IsClass(src, {"ns1::nsA", "C1"})); + REQUIRE(!IsClass(src, {"ns1::nsA", "D1"})); + + REQUIRE(IsClass(src, {"ns2::nsB", "A2"})); + REQUIRE(IsClass(src, {"ns2::nsB", "B2"})); + REQUIRE(IsClass(src, {"ns2::nsB", "C2"})); + + REQUIRE(IsClass(src, {"ns3::nsC", "A3"})); + REQUIRE(IsClass(src, {"ns3::nsC", "B3"})); + REQUIRE(IsClass(src, {"ns3::nsC", "C3"})); + REQUIRE(!IsClass(src, {"ns3::nsC", "D3"})); + + REQUIRE(!IsNamespacePackage(src, "ns4"s)); + + REQUIRE(!IsClass(src, {"ns4::nsD", "A4"})); + }); +} \ No newline at end of file diff --git a/tests/t00083/.clang-uml b/tests/t00083/.clang-uml new file mode 100644 index 000000000..de1d7f5ba --- /dev/null +++ b/tests/t00083/.clang-uml @@ -0,0 +1,16 @@ +diagrams: + t00083_class: + type: class + glob: + - t00083.cc + generate_packages: true + filter_mode: advanced + exclude: + anyof: + subclasses: + - clanguml::t00083::ns1::nsA::A1 + namespaces: + - clanguml::t00083::ns2::nsB + context: + - clanguml::t00083::ns3::nsC::B3 + using_namespace: clanguml::t00083 \ No newline at end of file diff --git a/tests/t00083/t00083.cc b/tests/t00083/t00083.cc new file mode 100644 index 000000000..750737948 --- /dev/null +++ b/tests/t00083/t00083.cc @@ -0,0 +1,30 @@ +namespace clanguml::t00083 { +namespace ns1 { +namespace nsA { +struct A1 { }; +struct B1 : public A1 { }; +struct C1 : public B1 { }; +struct D1 { }; +} +} +namespace ns2 { +namespace nsB { +struct A2 { }; +struct B2 : public A2 { }; +struct C2 : public B2 { }; +} +} +namespace ns3 { +namespace nsC { +struct A3 { }; +struct B3 : public A3 { }; +struct C3 : public B3 { }; +struct D3 { }; +} +} +namespace ns4 { +namespace nsD { +struct A4 { }; +} +} +} \ No newline at end of file diff --git a/tests/t00083/test_case.h b/tests/t00083/test_case.h new file mode 100644 index 000000000..54a4e1e4b --- /dev/null +++ b/tests/t00083/test_case.h @@ -0,0 +1,46 @@ +/** + * tests/t00083/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("t00083") +{ + using namespace clanguml::test; + using namespace std::string_literals; + + auto [config, db, diagram, model] = + CHECK_CLASS_MODEL("t00083", "t00083_class"); + + CHECK_CLASS_DIAGRAM(*config, diagram, *model, [](const auto &src) { + REQUIRE(!IsClass(src, {"ns1::nsA", "A1"})); + REQUIRE(!IsClass(src, {"ns1::nsA", "B1"})); + REQUIRE(!IsClass(src, {"ns1::nsA", "C1"})); + REQUIRE(IsClass(src, {"ns1::nsA", "D1"})); + + REQUIRE(!IsClass(src, {"ns2::nsB", "A2"})); + REQUIRE(!IsClass(src, {"ns2::nsB", "B2"})); + REQUIRE(!IsClass(src, {"ns2::nsB", "C2"})); + + REQUIRE(!IsClass(src, {"ns3::nsC", "A3"})); + REQUIRE(!IsClass(src, {"ns3::nsC", "B3"})); + REQUIRE(!IsClass(src, {"ns3::nsC", "C3"})); + REQUIRE(IsClass(src, {"ns3::nsC", "D3"})); + + REQUIRE(IsNamespacePackage(src, "ns4"s)); + + REQUIRE(IsClass(src, {"ns4::nsD", "A4"})); + }); +} \ No newline at end of file diff --git a/tests/t20002/t20002.cc b/tests/t20002/t20002.cc index 9888c5992..e225f605f 100644 --- a/tests/t20002/t20002.cc +++ b/tests/t20002/t20002.cc @@ -1,7 +1,3 @@ -#include -#include -#include - namespace clanguml { namespace t20002 { diff --git a/tests/t20049/.clang-uml b/tests/t20049/.clang-uml index 2061996ed..6df5f42d1 100644 --- a/tests/t20049/.clang-uml +++ b/tests/t20049/.clang-uml @@ -2,7 +2,7 @@ diagrams: t20049_sequence: type: sequence glob: - - t20049.cu + - r: ".*t20049.cu$" include: namespaces: - clanguml::t20049 diff --git a/tests/t20055/.clang-uml b/tests/t20055/.clang-uml new file mode 100644 index 000000000..a83d995f5 --- /dev/null +++ b/tests/t20055/.clang-uml @@ -0,0 +1,16 @@ +diagrams: + t20055_sequence: + type: sequence + filter_mode: advanced + glob: + - t20055.cc + include: + anyof: + namespaces: + - clanguml::t20055::ns2 + elements: + - clanguml::t20055::ns1::B + - clanguml::t20055::ns1::d() + using_namespace: clanguml::t20055 + from: + - function: "clanguml::t20055::ns2::tmain()" \ No newline at end of file diff --git a/tests/t20055/t20055.cc b/tests/t20055/t20055.cc new file mode 100644 index 000000000..3ff58cee4 --- /dev/null +++ b/tests/t20055/t20055.cc @@ -0,0 +1,40 @@ +namespace clanguml { +namespace t20055 { +namespace ns1 { + +void d() { } + +struct A { + void a() { } +}; + +struct B { + A a; + void b() + { + a.a(); + d(); + } +}; + +} // namespace ns1 +namespace ns2 { +void f() { } +struct C { + ns1::B b; + void c() + { + b.b(); + f(); + } +}; + +void tmain() +{ + C c; + c.c(); +} + +} // namespace ns2 +} +} \ No newline at end of file diff --git a/tests/t20055/test_case.h b/tests/t20055/test_case.h new file mode 100644 index 000000000..36807d3fb --- /dev/null +++ b/tests/t20055/test_case.h @@ -0,0 +1,40 @@ +/** + * tests/t20055/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("t20055") +{ + using namespace clanguml::test; + using namespace std::string_literals; + + auto [config, db, diagram, model] = + CHECK_SEQUENCE_MODEL("t20055", "t20055_sequence"); + + CHECK_SEQUENCE_DIAGRAM(*config, diagram, *model, [](const auto &src) { + REQUIRE(MessageOrder(src, + { + // + {{"ns2", "tmain()"}, {"ns2", "C"}, "c()"}, + {{"ns2", "C"}, {"ns1", "B"}, "b()"}, + {{"ns1", "B"}, {"ns1", "d()"}, ""}, + {{"ns2", "C"}, {"ns2", "f()"}, ""} + // + })); + + REQUIRE(!HasMessage(src, {{"ns1", "B"}, {"ns1", "A"}, "a()"})); + }); +} \ No newline at end of file diff --git a/tests/t30015/src/app.cppm b/tests/t30015/src/app.cppm index 22da8d4ee..58d188d9b 100644 --- a/tests/t30015/src/app.cppm +++ b/tests/t30015/src/app.cppm @@ -9,25 +9,6 @@ module; 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 { diff --git a/tests/t90000/.clang-uml b/tests/t90000/.clang-uml index 3e8100bea..948822cb4 100644 --- a/tests/t90000/.clang-uml +++ b/tests/t90000/.clang-uml @@ -2,6 +2,8 @@ allow_empty_diagrams: true diagrams: t90000_class: type: class + glob: + - NONE plantuml: before: - 'class "Foo" as C_001' diff --git a/tests/t90001/.clang-uml b/tests/t90001/.clang-uml index 63ad4c663..a99e5497d 100644 --- a/tests/t90001/.clang-uml +++ b/tests/t90001/.clang-uml @@ -1,11 +1,15 @@ diagrams: t90001_class: type: class + glob: + - NONE include: namespaces: - no_such_namespace t90001_sequence: type: sequence + glob: + - NONE include: namespaces: - no_such_namespace @@ -13,11 +17,15 @@ diagrams: - function: "nowhere" t90001_include: type: include + glob: + - NONE include: namespaces: - no_such_namespace t90001_package: type: package + glob: + - NONE include: namespaces: - no_such_namespace diff --git a/tests/test_cases.cc b/tests/test_cases.cc index 1f08d120c..16560ef8d 100644 --- a/tests/test_cases.cc +++ b/tests/test_cases.cc @@ -30,11 +30,14 @@ void inject_diagram_options(std::shared_ptr diagram) { // Inject links config to all test cases - clanguml::config::generate_links_config links_config{ - R"(https://github.com/bkryza/clang-uml/blob/{{ git.commit }}/{{ element.source.path }}#L{{ element.source.line }})", - R"({% if existsIn(element, "comment") and existsIn(element.comment, "brief") %}{{ abbrv(trim(replace(element.comment.brief.0, "\n+", " ")), 256) }}{% else %}{{ element.name }}{% endif %})"}; + clanguml::config::generate_links_config links_config; - diagram->generate_links.set(links_config); + links_config.link.emplace(".", + R"(https://github.com/bkryza/clang-uml/blob/{{ git.commit }}/{{ element.source.path }}#L{{ element.source.line }})"); + links_config.tooltip.emplace(".", + R"({% if existsIn(element, "comment") and existsIn(element.comment, "brief") %}{{ abbrv(trim(replace(element.comment.brief.0, "\n+", " ")), 256) }}{% else %}{{ element.name }}{% endif %})"); + + diagram->generate_links.set(std::move(links_config)); } std::paircompilation_database_dir()); std::vector remove_compile_flags{ - std::string{"-Wno-class-memaccess"}}; + std::string{"-Wno-class-memaccess"}, + std::string{"-forward-unknown-to-host-compiler"}, + std::string{"--generate-code=arch=compute_75,code=[compute_75,sm_75]"}}; res.first->remove_compile_flags.set(remove_compile_flags); @@ -96,10 +101,11 @@ auto generate_diagram_impl(clanguml::common::compilation_database &db, inject_diagram_options(diagram); + auto tus = diagram->glob_translation_units(db.getAllFiles()); + auto model = clanguml::common::generators::generate(db, diagram->name, - dynamic_cast(*diagram), - diagram->get_translation_units()); + diagram_config, diagram_visitor>( + db, diagram->name, dynamic_cast(*diagram), tus); return model; } @@ -249,7 +255,8 @@ void try_run_test_case(const diagram_source_storage &diagrams, TC &&tc) tc(diagrams.get()); } catch (doctest::TestFailureException &e) { - std::cout << "-----------------------------------------------------" + std::cout << "---------------------------------------------" + "--------" "--------------------------\n"; std::cout << "Test case failed for diagram type " << T::diagram_type_name << ": " @@ -553,6 +560,10 @@ void CHECK_INCLUDE_DIAGRAM(const clanguml::config::config &config, #include "t00077/test_case.h" #include "t00078/test_case.h" #include "t00079/test_case.h" +#include "t00080/test_case.h" +#include "t00081/test_case.h" +#include "t00082/test_case.h" +#include "t00083/test_case.h" /// /// Sequence diagram tests @@ -619,6 +630,7 @@ void CHECK_INCLUDE_DIAGRAM(const clanguml::config::config &config, #include "t20052/test_case.h" #include "t20053/test_case.h" #include "t20054/test_case.h" +#include "t20055/test_case.h" /// /// Package diagram tests diff --git a/tests/test_cases.h b/tests/test_cases.h index 1716817fc..7b923ec3b 100644 --- a/tests/test_cases.h +++ b/tests/test_cases.h @@ -339,8 +339,16 @@ std::optional get_participant( if (!j.contains("participants")) return {}; + std::string using_namespace{}; + if (j.contains("using_namespace")) { + using_namespace = + fmt::format("{}::", j["using_namespace"].get()); + } + for (const nlohmann::json &e : j.at("participants")) { - if (e["display_name"] == name) + if (e["display_name"] == name || + e["full_name"].get().substr(using_namespace.size()) == + name) return {e}; } @@ -2482,7 +2490,7 @@ int64_t FindMessage( if (!fail) return -1; - std::cout << "FindMessage failed with error " << e.what() << "\n"; + std::cout << "FindMessage failed with error: " << e.what() << "\n"; throw e; } diff --git a/tests/test_cases.yaml b/tests/test_cases.yaml index fd624f3bb..e623eb34b 100644 --- a/tests/test_cases.yaml +++ b/tests/test_cases.yaml @@ -234,6 +234,18 @@ test_cases: - name: t00079 title: Test case for context diagram exclude filter with relationships option description: + - name: t00080 + title: Test case for including elements from system headers + description: + - name: t00081 + title: Test case for class members relationships to std types + description: + - name: t00082 + title: Test case for advanced diagram filter inclusion test with subclasses and namespaces + description: + - name: t00083 + title: Test case for advanced diagram filter exclusion test with subclasses and namespaces + description: Sequence diagrams: - name: t20001 title: Basic sequence diagram test case @@ -397,6 +409,9 @@ test_cases: - name: t20054 title: Test case for sequence diagram with nested classes description: + - name: t20055 + title: Test case for advanced filter in sequence diagram + description: Package diagrams: - name: t30001 title: Basic package diagram test case diff --git a/tests/test_config.cc b/tests/test_config.cc index 9fd3195fa..1c0d073d6 100644 --- a/tests/test_config.cc +++ b/tests/test_config.cc @@ -43,10 +43,10 @@ TEST_CASE("Test config simple") CHECK(diagram.generate_packages() == true); CHECK(diagram.generate_template_argument_dependencies() == false); CHECK(diagram.generate_links == true); - CHECK(diagram.generate_links().link == + CHECK(diagram.generate_links().link.at(".") == "https://github.com/bkryza/clang-uml/blob/{{ git.branch }}/{{ " "element.source.file }}#L{{ element.source.line }}"); - CHECK(diagram.generate_links().tooltip == "{{ element.comment }}"); + CHECK(diagram.generate_links().tooltip.at(".") == "{{ element.comment }}"); CHECK( diagram.comment_parser() == clanguml::config::comment_parser_t::clang); diff --git a/tests/test_config_data/filters_advanced.yml b/tests/test_config_data/filters_advanced.yml new file mode 100644 index 000000000..31057c44a --- /dev/null +++ b/tests/test_config_data/filters_advanced.yml @@ -0,0 +1,87 @@ +compilation_database_dir: debug +output_directory: output +filter_mode: advanced +diagrams: + include_test: + type: include + relative_to: ../../../src + glob: + - src/**/*.cc + - src/**/*.h + include: + allof: + paths: + - class_d*/ + - common + - util/*.h + - util/*.cc + - main.cc + exclude: + allof: + paths: + - sequence_diagram + - util/error.h + anyof_test: + type: class + relative_to: ../../../src + glob: + - src/**/*.cc + - src/**/*.h + include: + anyof: + namespaces: + - ns1::ns2 + elements: + - std::thread + exclude: + anyof: + namespaces: + - ns1::ns2::detail + modules_test: + type: class + include: + anyof: + modules: + - mod1::mod2 + namespaces: + - ns1::ns2 + method_type_include_test: + type: class + include: + anyof: + namespaces: + - ns1::ns2 + method_types: + - constructor + - operator + regex_elements_test: + type: class + include: + elements: + - ns1::ClassA + - r: 'ns1::ns2::Class.+' + - r: 'ns1::.+::ns3::.+' + exclude: + elements: + - ns1::ns2::ClassZ + regex_elements_and_namespaces: + type: class + include: + allof: + elements: + - ns1::ClassA + - r: 'ns1::ns2::Class.+' + - r: 'ns1::.+::ns3::.+' + namespaces: + - r: '.+ns2.+' + edge_filter_and_namespaces: + type: class + filter_mode: advanced + include: + anyof: + subclasses: + - ns1::nsA::A + namespaces: + - ns2::nsB + context: + - ns1::nsA::C \ No newline at end of file diff --git a/tests/test_filters.cc b/tests/test_filters.cc index 0d2e76e53..3944ff325 100644 --- a/tests/test_filters.cc +++ b/tests/test_filters.cc @@ -21,7 +21,7 @@ #include "class_diagram/model/class.h" #include "cli/cli_handler.h" -#include "common/model/diagram_filter.h" +#include "common/model/filters/diagram_filter_factory.h" #include "common/model/source_file.h" #include "config/config.h" #include "include_diagram/model/diagram.h" @@ -32,6 +32,7 @@ TEST_CASE("Test diagram paths filter") { using clanguml::common::model::diagram_filter; + using clanguml::common::model::diagram_filter_factory; using clanguml::common::model::source_file; auto cfg = clanguml::config::load("./test_config_data/filters.yml"); @@ -39,7 +40,8 @@ TEST_CASE("Test diagram paths filter") auto &config = *cfg.diagrams["include_test"]; clanguml::include_diagram::model::diagram diagram; - diagram_filter filter(diagram, config); + auto filter_ptr = diagram_filter_factory::create(diagram, config); + diagram_filter &filter = *filter_ptr; auto make_path = [&](std::string_view p) { return source_file{config.root_directory() / p}; @@ -59,6 +61,7 @@ TEST_CASE("Test method_types include filter") using clanguml::class_diagram::model::class_method; using clanguml::common::model::access_t; using clanguml::common::model::diagram_filter; + using clanguml::common::model::diagram_filter_factory; using clanguml::common::model::source_file; auto cfg = clanguml::config::load("./test_config_data/filters.yml"); @@ -66,7 +69,8 @@ TEST_CASE("Test method_types include filter") auto &config = *cfg.diagrams["method_type_include_test"]; clanguml::class_diagram::model::diagram diagram; - diagram_filter filter(diagram, config); + auto filter_ptr = diagram_filter_factory::create(diagram, config); + diagram_filter &filter = *filter_ptr; class_method cm{access_t::kPublic, "A", ""}; cm.is_constructor(true); @@ -84,6 +88,7 @@ TEST_CASE("Test method_types exclude filter") using clanguml::class_diagram::model::class_method; using clanguml::common::model::access_t; using clanguml::common::model::diagram_filter; + using clanguml::common::model::diagram_filter_factory; using clanguml::common::model::source_file; auto cfg = clanguml::config::load("./test_config_data/filters.yml"); @@ -91,7 +96,8 @@ TEST_CASE("Test method_types exclude filter") auto &config = *cfg.diagrams["method_type_exclude_test"]; clanguml::class_diagram::model::diagram diagram; - diagram_filter filter(diagram, config); + auto filter_ptr = diagram_filter_factory::create(diagram, config); + diagram_filter &filter = *filter_ptr; class_method cm{access_t::kPublic, "A", ""}; @@ -109,22 +115,23 @@ TEST_CASE("Test method_types exclude filter") TEST_CASE("Test namespaces filter") { + using clanguml::class_diagram::model::class_; using clanguml::class_diagram::model::class_method; using clanguml::class_diagram::model::class_parent; using clanguml::common::model::access_t; using clanguml::common::model::diagram_filter; + using clanguml::common::model::diagram_filter_factory; using clanguml::common::model::namespace_; using clanguml::common::model::package; using clanguml::common::model::source_file; - using clanguml::class_diagram::model::class_; - auto cfg = clanguml::config::load("./test_config_data/filters.yml"); auto &config = *cfg.diagrams["namespace_test"]; clanguml::class_diagram::model::diagram diagram; - diagram_filter filter(diagram, config); + auto filter_ptr = diagram_filter_factory::create(diagram, config); + diagram_filter &filter = *filter_ptr; class_ c{{}}; @@ -173,20 +180,21 @@ TEST_CASE("Test namespaces filter") TEST_CASE("Test elements regexp filter") { + using clanguml::class_diagram::model::class_; using clanguml::class_diagram::model::class_method; using clanguml::common::model::access_t; using clanguml::common::model::diagram_filter; + using clanguml::common::model::diagram_filter_factory; using clanguml::common::model::namespace_; using clanguml::common::model::source_file; - using clanguml::class_diagram::model::class_; - auto cfg = clanguml::config::load("./test_config_data/filters.yml"); auto &config = *cfg.diagrams["regex_elements_test"]; clanguml::class_diagram::model::diagram diagram; - diagram_filter filter(diagram, config); + auto filter_ptr = diagram_filter_factory::create(diagram, config); + diagram_filter &filter = *filter_ptr; class_ c{{}}; @@ -213,22 +221,23 @@ TEST_CASE("Test elements regexp filter") TEST_CASE("Test namespaces regexp filter") { + using clanguml::class_diagram::model::class_; using clanguml::class_diagram::model::class_method; using clanguml::class_diagram::model::class_parent; using clanguml::common::model::access_t; using clanguml::common::model::diagram_filter; + using clanguml::common::model::diagram_filter_factory; using clanguml::common::model::namespace_; using clanguml::common::model::package; using clanguml::common::model::source_file; - using clanguml::class_diagram::model::class_; - auto cfg = clanguml::config::load("./test_config_data/filters.yml"); auto &config = *cfg.diagrams["regex_namespace_test"]; clanguml::class_diagram::model::diagram diagram; - diagram_filter filter(diagram, config); + auto filter_ptr = diagram_filter_factory::create(diagram, config); + diagram_filter &filter = *filter_ptr; class_ c{{}}; @@ -281,8 +290,8 @@ TEST_CASE("Test subclasses regexp filter") using clanguml::common::model::package; using clanguml::common::model::source_file; using namespace std::string_literals; - using clanguml::class_diagram::model::class_; + using clanguml::common::model::diagram_filter_factory; auto cfg = clanguml::config::load("./test_config_data/filters.yml"); @@ -353,7 +362,8 @@ TEST_CASE("Test subclasses regexp filter") diagram.set_complete(true); - diagram_filter filter(diagram, config); + auto filter_ptr = diagram_filter_factory::create(diagram, config); + diagram_filter &filter = *filter_ptr; CHECK(filter.should_include(*diagram.find("ns1::ns2::A1"))); CHECK(filter.should_include(*diagram.find("ns1::ns2::B1"))); @@ -371,8 +381,8 @@ TEST_CASE("Test parents regexp filter") using clanguml::common::model::package; using clanguml::common::model::source_file; using namespace std::string_literals; - using clanguml::class_diagram::model::class_; + using clanguml::common::model::diagram_filter_factory; auto cfg = clanguml::config::load("./test_config_data/filters.yml"); @@ -443,7 +453,8 @@ TEST_CASE("Test parents regexp filter") diagram.set_complete(true); - diagram_filter filter(diagram, config); + auto filter_ptr = diagram_filter_factory::create(diagram, config); + diagram_filter &filter = *filter_ptr; CHECK(filter.should_include(*diagram.find("ns1::ns2::BaseA"))); CHECK(filter.should_include(*diagram.find("ns1::ns2::BaseB"))); @@ -464,8 +475,8 @@ TEST_CASE("Test specializations regexp filter") using clanguml::common::model::source_file; using clanguml::common::model::template_parameter; using namespace std::string_literals; - using clanguml::class_diagram::model::class_; + using clanguml::common::model::diagram_filter_factory; auto cfg = clanguml::config::load("./test_config_data/filters.yml"); @@ -508,7 +519,8 @@ TEST_CASE("Test specializations regexp filter") diagram.set_complete(true); - diagram_filter filter(diagram, config); + auto filter_ptr = diagram_filter_factory::create(diagram, config); + diagram_filter &filter = *filter_ptr; CHECK(filter.should_include(*diagram.find("A"))); CHECK(!filter.should_include(*diagram.find("A"))); @@ -529,8 +541,8 @@ TEST_CASE("Test context regexp filter") using clanguml::common::model::source_file; using clanguml::common::model::template_parameter; using namespace std::string_literals; - using clanguml::class_diagram::model::class_; + using clanguml::common::model::diagram_filter_factory; auto cfg = clanguml::config::load("./test_config_data/filters.yml"); @@ -588,7 +600,8 @@ TEST_CASE("Test context regexp filter") diagram.set_complete(true); - diagram_filter filter(diagram, config); + auto filter_ptr = diagram_filter_factory::create(diagram, config); + diagram_filter &filter = *filter_ptr; CHECK(filter.should_include(*diagram.find("A"))); CHECK(filter.should_include(*diagram.find("A1"))); @@ -619,6 +632,7 @@ TEST_CASE("Test dependencies regexp filter") using clanguml::common::model::template_parameter; using namespace std::string_literals; using clanguml::class_diagram::model::class_; + using clanguml::common::model::diagram_filter_factory; auto cfg = clanguml::config::load("./test_config_data/filters.yml"); @@ -673,7 +687,8 @@ TEST_CASE("Test dependencies regexp filter") diagram.set_complete(true); - diagram_filter filter(diagram, config); + auto filter_ptr = diagram_filter_factory::create(diagram, config); + diagram_filter &filter = *filter_ptr; CHECK(filter.should_include(*diagram.find("A"))); CHECK(!filter.should_include(*diagram.find("A1"))); @@ -703,6 +718,7 @@ TEST_CASE("Test dependants regexp filter") using clanguml::common::model::template_parameter; using namespace std::string_literals; using clanguml::class_diagram::model::class_; + using clanguml::common::model::diagram_filter_factory; auto cfg = clanguml::config::load("./test_config_data/filters.yml"); @@ -757,7 +773,8 @@ TEST_CASE("Test dependants regexp filter") diagram.set_complete(true); - diagram_filter filter(diagram, config); + auto filter_ptr = diagram_filter_factory::create(diagram, config); + diagram_filter &filter = *filter_ptr; CHECK(filter.should_include(*diagram.find("A"))); CHECK(filter.should_include(*diagram.find("A1"))); @@ -775,6 +792,7 @@ TEST_CASE("Test callee_types filter") { using clanguml::common::to_id; using clanguml::common::model::diagram_filter; + using clanguml::common::model::diagram_filter_factory; using clanguml::sequence_diagram::model::class_; using clanguml::sequence_diagram::model::function; using clanguml::sequence_diagram::model::function_template; @@ -812,7 +830,8 @@ TEST_CASE("Test callee_types filter") diagram.add_participant(std::move(p)); diagram.set_complete(true); - diagram_filter filter(diagram, config); + auto filter_ptr = diagram_filter_factory::create(diagram, config); + diagram_filter &filter = *filter_ptr; CHECK( filter.should_include(*diagram.get_participant(to_id("A"s)))); diff --git a/tests/test_filters_advanced.cc b/tests/test_filters_advanced.cc new file mode 100644 index 000000000..f6cfd5acb --- /dev/null +++ b/tests/test_filters_advanced.cc @@ -0,0 +1,272 @@ +/** + * @file tests/test_filters_advanced.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. + */ +#define DOCTEST_CONFIG_IMPLEMENT + +#include "doctest/doctest.h" + +#include "class_diagram/model/class.h" +#include "cli/cli_handler.h" +#include "common/model/filters/diagram_filter_factory.h" +#include "common/model/source_file.h" +#include "config/config.h" +#include "include_diagram/model/diagram.h" +#include "sequence_diagram/model/diagram.h" + +#include +using clanguml::class_diagram::model::class_; +using clanguml::class_diagram::model::class_method; +using clanguml::common::eid_t; +using clanguml::common::model::access_t; +using clanguml::common::model::diagram_filter; +using clanguml::common::model::diagram_filter_factory; +using clanguml::common::model::namespace_; +using clanguml::common::model::package; +using clanguml::common::model::source_file; +using clanguml::config::filter_mode_t; + +TEST_CASE("Test diagram paths filter") +{ + auto cfg = + clanguml::config::load("./test_config_data/filters_advanced.yml"); + + auto &config = *cfg.diagrams["include_test"]; + clanguml::include_diagram::model::diagram diagram; + + auto filter_ptr = diagram_filter_factory::create(diagram, config); + diagram_filter &filter = *filter_ptr; + + auto make_path = [&](std::string_view p) { + return source_file{config.root_directory() / p}; + }; + + CHECK(filter.should_include( + make_path("class_diagram/visitor/translation_unit_visitor.h"))); + CHECK(filter.should_include(make_path("main.cc"))); + CHECK(filter.should_include(make_path("util/util.cc"))); + CHECK_FALSE(filter.should_include(make_path("util/error.h"))); + CHECK_FALSE(filter.should_include( + make_path("sequence_diagram/visitor/translation_unit_visitor.h"))); +} + +TEST_CASE("Test advanced diagram filter anyof") +{ + auto cfg = + clanguml::config::load("./test_config_data/filters_advanced.yml"); + + auto &config = *cfg.diagrams["anyof_test"]; + clanguml::include_diagram::model::diagram diagram; + + diagram.set_complete(true); + + auto filter_ptr = diagram_filter_factory::create(diagram, config); + diagram_filter &filter = *filter_ptr; + + CHECK(config.filter_mode() == filter_mode_t::advanced); + CHECK(filter.should_include(namespace_{"ns1::ns2"})); + CHECK_FALSE(filter.should_include(namespace_{"std::string"})); + + clanguml::common::model::element std_thread{{}}; + std_thread.set_namespace(namespace_{"std"}); + std_thread.set_name("thread"); + CHECK(filter.should_include(std_thread)); + + std_thread.set_name("jthread"); + CHECK_FALSE(filter.should_include(std_thread)); + + CHECK_FALSE(filter.should_include(namespace_{"ns1::ns2::detail"})); +} + +TEST_CASE("Test advanced diagram filter modules") +{ + auto cfg = + clanguml::config::load("./test_config_data/filters_advanced.yml"); + + auto &config = *cfg.diagrams["modules_test"]; + clanguml::include_diagram::model::diagram diagram; + diagram.set_complete(true); + + auto filter_ptr = diagram_filter_factory::create(diagram, config); + diagram_filter &filter = *filter_ptr; + + CHECK(config.filter_mode() == filter_mode_t::advanced); + CHECK(filter.should_include(namespace_{"ns1::ns2"})); + CHECK_FALSE(filter.should_include(namespace_{"std::string"})); + + clanguml::common::model::element std_string{{}}; + std_string.set_namespace(namespace_{"std"}); + std_string.set_name("string"); + + CHECK_FALSE(filter.should_include(std_string)); + + CHECK(filter.should_include(namespace_{"ns1"})); + + clanguml::common::model::element e1{{}}; + e1.set_module("mod1::mod2"); + e1.set_namespace(namespace_{"ns5::ns6"}); + e1.set_name("ClassA"); + CHECK(filter.should_include(e1)); + + e1.set_module("mod1::mod3"); + CHECK_FALSE(filter.should_include(e1)); +} + +TEST_CASE("Test method_types include filter") +{ + auto cfg = + clanguml::config::load("./test_config_data/filters_advanced.yml"); + + auto &config = *cfg.diagrams["method_type_include_test"]; + clanguml::class_diagram::model::diagram diagram; + diagram.set_complete(true); + + auto filter_ptr = diagram_filter_factory::create(diagram, config); + diagram_filter &filter = *filter_ptr; + + class_method cm{access_t::kPublic, "A", ""}; + cm.is_constructor(true); + + CHECK(filter.should_include(cm)); + + cm.is_constructor(false); + cm.is_destructor(true); + + CHECK_FALSE(filter.should_include(cm)); +} + +TEST_CASE("Test elements and namespaces regexp filter") +{ + auto cfg = + clanguml::config::load("./test_config_data/filters_advanced.yml"); + + auto &config = *cfg.diagrams["regex_elements_and_namespaces"]; + clanguml::class_diagram::model::diagram diagram; + + auto filter_ptr = diagram_filter_factory::create(diagram, config); + diagram_filter &filter = *filter_ptr; + + class_ c{{}}; + + c.set_namespace(namespace_{"ns1"}); + c.set_name("ClassA"); + + CHECK_FALSE(filter.should_include(c)); + + c.set_namespace(namespace_{"ns1::ns2"}); + c.set_name("ClassA"); + + CHECK(filter.should_include(c)); + + c.set_namespace(namespace_{"ns1::ns2"}); + c.set_name("ClassZ"); + + CHECK(filter.should_include(c)); + + c.set_namespace(namespace_{"ns1::ns5::ns3"}); + c.set_name("ClassA"); + + CHECK_FALSE(filter.should_include(c)); +} + +TEST_CASE("Test edge filter and namespaces filter") +{ + auto cfg = + clanguml::config::load("./test_config_data/filters_advanced.yml"); + + auto &config = *cfg.diagrams["edge_filter_and_namespaces"]; + clanguml::class_diagram::model::diagram diagram; + + auto filter_ptr = diagram_filter_factory::create(diagram, config); + diagram_filter &filter = *filter_ptr; + + diagram.set_complete(true); + + uint64_t id{1}; + + { + auto ns1 = std::make_unique(namespace_{}); + ns1->set_name("ns1"); + ns1->set_id(eid_t{id++}); + diagram.add(namespace_{}, std::move(ns1)); + } + { + auto ns1__nsA = std::make_unique(namespace_{}); + ns1__nsA->set_name("nsA"); + ns1__nsA->set_namespace(namespace_{"ns1"}); + ns1__nsA->set_id(eid_t{id++}); + diagram.add(namespace_{}, std::move(ns1__nsA)); + } + { + auto A = std::make_unique(namespace_{}); + A->set_namespace(namespace_{"ns1::nsA"}); + A->set_name("A"); + A->set_id(eid_t{id}); + diagram.add(namespace_{"ns1::nsA"}, std::move(A)); + } + + CHECK(filter.should_include(*diagram.get(eid_t{id}))); + + class_ c{{}}; + c.set_namespace(namespace_{"ns2::nsB"}); + c.set_name("B"); + + CHECK(filter.should_include(c)); + + { + auto C = std::make_unique(namespace_{}); + C->set_namespace(namespace_{"ns1::nsA"}); + C->set_name("C"); + C->set_id(eid_t{++id}); + diagram.add(namespace_{"ns1::nsA"}, std::move(C)); + } + + c.set_namespace(namespace_{"ns2::nsB"}); + c.set_name("C"); + + CHECK(filter.should_include(c)); + + c.set_namespace(namespace_{"ns1::nsA"}); + c.set_name("R"); + + CHECK_FALSE(filter.should_include(c)); +} + +/// +/// Main test function +/// +int main(int argc, char *argv[]) +{ + doctest::Context context; + + context.applyCommandLine(argc, argv); + + clanguml::cli::cli_handler clih; + + std::vector argvv = { + "clang-uml", "--config", "./test_config_data/simple.yml"}; + + argvv.push_back("-q"); + + clih.handle_options(argvv.size(), argvv.data()); + + int res = context.run(); + + if (context.shouldExit()) + return res; + + return res; +} diff --git a/tests/test_util.cc b/tests/test_util.cc index 4caa265bb..939fc64b0 100644 --- a/tests/test_util.cc +++ b/tests/test_util.cc @@ -474,4 +474,64 @@ TEST_CASE("Test parse_source_location") CHECK(column == 456); result = false, file = "", line = 0, column = 0; +} + +TEST_CASE("Test is_subpath") +{ + using clanguml::util::is_subpath; + + CHECK(is_subpath("./include/f.h", ".")); + CHECK(is_subpath("include/f.h", ".")); + CHECK(is_subpath("./include/f.h", "./")); + CHECK(is_subpath("./include/f.h", "./include")); + CHECK(is_subpath("./include/f.h", "include")); + CHECK(is_subpath("include/f.h", "./include")); + CHECK(is_subpath("include/f.h", "include")); + + CHECK(is_subpath("include/f.h", "include/f.h")); + CHECK(is_subpath("./include/f.h", "include/f.h")); + CHECK(is_subpath("include/f.h", "./include/f.h")); + CHECK(is_subpath("./include/f.h", "include/f.h")); + +#if !defined(_MSC_VER) + CHECK(is_subpath("/usr/local/include/f.h", "/usr/local")); + CHECK_FALSE(is_subpath("/usr/local/include/f.h", "/usr/local/lib")); + CHECK_FALSE(is_subpath("/usr/include/f.h", ".")); +#else + CHECK(is_subpath("E:\\test\\src\\main.cpp", "E:\\test")); + CHECK_FALSE(is_subpath("E:\\test\\src\\main.cpp", "C:\\test")); +#endif +} + +TEST_CASE("Test find_entry_by_path_prefix") +{ + using clanguml::util::find_entry_by_path_prefix; + + std::map m; + m.emplace(".", "default"); + m.emplace("./src", "internal_sources"); + m.emplace("./src/thirdparty/", "thirdparty_sources"); + m.emplace("/usr/include/boost", "boost_sources"); + m.emplace("../my_other_project/src", "my_other_project_sources"); + + auto kv = find_entry_by_path_prefix(m, "/tmp"); + CHECK_FALSE(kv.has_value()); + + kv = find_entry_by_path_prefix(m, "./src/main.cc"); + CHECK(kv.value().second == "internal_sources"); + + kv = find_entry_by_path_prefix(m, "src/main.cc"); + CHECK(kv.value().second == "internal_sources"); + + kv = find_entry_by_path_prefix(m, "src/thirdparty/main.cc"); + CHECK(kv.value().second == "thirdparty_sources"); + + kv = find_entry_by_path_prefix(m, "include/f.h"); + CHECK(kv.value().second == "default"); + + kv = find_entry_by_path_prefix(m, "./include/f.h"); + CHECK(kv.value().second == "default"); + + kv = find_entry_by_path_prefix(m, "../my_other_project/src/lib.cc"); + CHECK(kv.value().second == "my_other_project_sources"); } \ No newline at end of file diff --git a/uml/class/filter_visitor_hierarchy_class.yml b/uml/class/filter_visitor_hierarchy_class.yml index 1985e5c17..2da58f4aa 100644 --- a/uml/class/filter_visitor_hierarchy_class.yml +++ b/uml/class/filter_visitor_hierarchy_class.yml @@ -3,7 +3,7 @@ title: Diagram filter visitor class hierarchy include_relations_also_as_members: true generate_packages: true glob: - - src/common/model/diagram_filter.cc + - src/common/model/filters/*.cc include: namespaces: - clanguml