diff --git a/CHANGELOG.md b/CHANGELOG.md index c39690a0..f727d7a1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ # CHANGELOG + * Improved template specialization matching for variadic and function + template parameters (#118) * Fixed compilation and tests on LLVM 16 (#108) ### 0.3.3 diff --git a/docs/test_cases/t00002_class.svg b/docs/test_cases/t00002_class.svg index 8d202a9a..930958bd 100644 --- a/docs/test_cases/t00002_class.svg +++ b/docs/test_cases/t00002_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + A @@ -21,8 +21,8 @@ foo_c() = 0 : void - - + + B @@ -31,8 +31,8 @@ foo_a() : void - - + + C @@ -41,18 +41,18 @@ foo_c() : void - - + + D - + - + as : std::vector<A *> @@ -60,18 +60,18 @@ foo_a() : void foo_c() : void - - + + E - + - + as : std::vector<A *> @@ -79,13 +79,13 @@ foo_a() : void foo_c() : void - + This is class A - + This is class B - + This is class D diff --git a/docs/test_cases/t00003_class.svg b/docs/test_cases/t00003_class.svg index 6f938cbb..c65d1939 100644 --- a/docs/test_cases/t00003_class.svg +++ b/docs/test_cases/t00003_class.svg @@ -1,6 +1,6 @@ - + @@ -9,74 +9,74 @@ - - + + 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 @@ -112,11 +112,11 @@ protected_method() : void private_method() : void - + - + compare : std::function<bool (const int)> diff --git a/docs/test_cases/t00004.md b/docs/test_cases/t00004.md index 384d70cc..ee8f826b 100644 --- a/docs/test_cases/t00004.md +++ b/docs/test_cases/t00004.md @@ -227,7 +227,7 @@ public: "is_abstract": false, "is_nested": false, "is_struct": false, - "is_template": false, + "is_template": true, "is_union": false, "members": [], "methods": [], diff --git a/docs/test_cases/t00004_class.svg b/docs/test_cases/t00004_class.svg index e92b173f..25153f0f 100644 --- a/docs/test_cases/t00004_class.svg +++ b/docs/test_cases/t00004_class.svg @@ -1,6 +1,6 @@ - + @@ -9,16 +9,16 @@ - - + + B - - + + B::AA @@ -28,8 +28,8 @@ AA_3 - - + + A @@ -40,16 +40,16 @@ foo2() const : void - - + + A::AA - - + + A::AA::Lights @@ -59,15 +59,15 @@ Red - - + + A::AA::AAA - + C::B @@ -75,8 +75,8 @@ int - - + + C @@ -84,39 +84,39 @@ T - + - + t : T - + - + b_int : B<int> - - + + C::AA - - + + C::AA::AAA - - + + C::AA::CCC @@ -125,8 +125,8 @@ CCC_2 - - + + C::B @@ -134,16 +134,16 @@ V - + - + b : V - - + + C::CC @@ -152,16 +152,16 @@ CC_2 - - + + detail::D - - + + detail::D::AA @@ -171,8 +171,8 @@ AA_3 - - + + detail::D::DD diff --git a/docs/test_cases/t00005_class.svg b/docs/test_cases/t00005_class.svg index 4eff7d19..bb1e4320 100644 --- a/docs/test_cases/t00005_class.svg +++ b/docs/test_cases/t00005_class.svg @@ -1,6 +1,6 @@ - + @@ -9,204 +9,204 @@ - - + + A - - + + B - - + + C - - + + D - - + + E - - + + F - - + + G - - + + H - - + + I - - + + J - - + + K - - + + R - + - + some_int : int - + - + some_int_pointer : int * - + - + some_int_pointer_pointer : int ** - + - + some_int_reference : int & - + - + 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 * diff --git a/docs/test_cases/t00006.md b/docs/test_cases/t00006.md index 6899b131..edea8e0d 100644 --- a/docs/test_cases/t00006.md +++ b/docs/test_cases/t00006.md @@ -460,7 +460,7 @@ public: "is_abstract": false, "is_nested": false, "is_struct": false, - "is_template": false, + "is_template": true, "is_union": false, "members": [], "methods": [], diff --git a/docs/test_cases/t00006_class.svg b/docs/test_cases/t00006_class.svg index bae9d39f..4604a2b9 100644 --- a/docs/test_cases/t00006_class.svg +++ b/docs/test_cases/t00006_class.svg @@ -1,6 +1,6 @@ - + @@ -9,136 +9,136 @@ - - + + A - - + + B - - + + C - - + + D - - + + E - - + + F - - + + G - - + + H - - + + I - - + + J - - + + K - - + + L - - + + M - - + + N - - + + NN - - + + NNN - - + + custom_container @@ -146,15 +146,15 @@ T - + - + data : std::vector<T> - + custom_container @@ -162,102 +162,102 @@ 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> diff --git a/docs/test_cases/t00007_class.svg b/docs/test_cases/t00007_class.svg index 899c1c3e..e37c06a2 100644 --- a/docs/test_cases/t00007_class.svg +++ b/docs/test_cases/t00007_class.svg @@ -1,6 +1,6 @@ - + @@ -9,56 +9,56 @@ - - + + A - - + + B - - + + C - - + + R - + - + a : std::unique_ptr<A> - + - + b : std::shared_ptr<B> - + - + c : std::weak_ptr<C> diff --git a/docs/test_cases/t00008.md b/docs/test_cases/t00008.md index 27f8892f..89e622c7 100644 --- a/docs/test_cases/t00008.md +++ b/docs/test_cases/t00008.md @@ -277,7 +277,7 @@ template <> struct E::nested_template { "is_abstract": false, "is_nested": false, "is_struct": false, - "is_template": false, + "is_template": true, "is_union": false, "members": [], "methods": [], @@ -437,7 +437,7 @@ template <> struct E::nested_template { "is_abstract": false, "is_nested": true, "is_struct": true, - "is_template": false, + "is_template": true, "is_union": false, "members": [], "methods": [], diff --git a/docs/test_cases/t00008_class.svg b/docs/test_cases/t00008_class.svg index b9fafead..390b3332 100644 --- a/docs/test_cases/t00008_class.svg +++ b/docs/test_cases/t00008_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + A @@ -18,51 +18,51 @@ T,P=T,CMP=nullptr,int N=3 - + - + value : T - + - + pointer : T * - + - + reference : T & - + - + values : std::vector<P> - + - + ints : std::array<int,N> - + - + comparator : CMP - - + + Vector @@ -70,16 +70,16 @@ T - + - + values : std::vector<T> - - + + B @@ -87,15 +87,15 @@ T,C<> - + - + template_template : C<T> - + B @@ -103,18 +103,18 @@ int,Vector - - + + D - + - + ints : B<int,Vector> @@ -122,16 +122,16 @@ add(int i) : void D<Items...>(std::tuple<Items...> * ) : void - - + + E - - + + E::nested_template @@ -142,8 +142,8 @@ get(ET * d) : E::nested_template::DT * - - + + E::nested_template diff --git a/docs/test_cases/t00009.md b/docs/test_cases/t00009.md index 559635b3..77917afa 100644 --- a/docs/test_cases/t00009.md +++ b/docs/test_cases/t00009.md @@ -91,7 +91,7 @@ public: "is_abstract": false, "is_nested": false, "is_struct": false, - "is_template": false, + "is_template": true, "is_union": false, "members": [], "methods": [], @@ -114,7 +114,7 @@ public: "is_abstract": false, "is_nested": false, "is_struct": false, - "is_template": false, + "is_template": true, "is_union": false, "members": [], "methods": [], @@ -137,7 +137,7 @@ public: "is_abstract": false, "is_nested": false, "is_struct": false, - "is_template": false, + "is_template": true, "is_union": false, "members": [], "methods": [], diff --git a/docs/test_cases/t00009_class.svg b/docs/test_cases/t00009_class.svg index 1460fd2a..eaebab7f 100644 --- a/docs/test_cases/t00009_class.svg +++ b/docs/test_cases/t00009_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + A @@ -18,15 +18,15 @@ T - + - + value : T - + A @@ -34,7 +34,7 @@ int - + A @@ -42,7 +42,7 @@ std::string - + A @@ -50,32 +50,32 @@ std::vector<std::string> - - + + B - + - + aint : A<int> - + - + astring : A<std::string> * - + - + avector : A<std::vector<std::string>> & diff --git a/docs/test_cases/t00010.md b/docs/test_cases/t00010.md index 259e2445..4d309f11 100644 --- a/docs/test_cases/t00010.md +++ b/docs/test_cases/t00010.md @@ -111,7 +111,7 @@ public: "is_abstract": false, "is_nested": false, "is_struct": false, - "is_template": false, + "is_template": true, "is_union": false, "members": [], "methods": [], @@ -178,7 +178,7 @@ public: "is_abstract": false, "is_nested": false, "is_struct": false, - "is_template": false, + "is_template": true, "is_union": false, "members": [], "methods": [], diff --git a/docs/test_cases/t00010_class.svg b/docs/test_cases/t00010_class.svg index 6e4bb1bc..0d4d6c7b 100644 --- a/docs/test_cases/t00010_class.svg +++ b/docs/test_cases/t00010_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + A @@ -18,22 +18,22 @@ T,P - + - + first : T - + - + second : P - + A @@ -41,8 +41,8 @@ T,std::string - - + + B @@ -50,15 +50,15 @@ T - + - + astring : A<T,std::string> - + B @@ -66,18 +66,18 @@ int - - + + C - + - + aintstring : B<int> diff --git a/docs/test_cases/t00011_class.svg b/docs/test_cases/t00011_class.svg index 580d7ab4..08e69c3b 100644 --- a/docs/test_cases/t00011_class.svg +++ b/docs/test_cases/t00011_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + D @@ -18,16 +18,16 @@ T - + - + value : T - - + + A @@ -36,18 +36,18 @@ foo() : void - - + + B - + - + m_a : A * diff --git a/docs/test_cases/t00012.md b/docs/test_cases/t00012.md index ec28a58c..f0877f0f 100644 --- a/docs/test_cases/t00012.md +++ b/docs/test_cases/t00012.md @@ -211,7 +211,7 @@ class R { "is_abstract": false, "is_nested": false, "is_struct": false, - "is_template": false, + "is_template": true, "is_union": false, "members": [], "methods": [], @@ -246,7 +246,7 @@ class R { "is_abstract": false, "is_nested": false, "is_struct": false, - "is_template": false, + "is_template": true, "is_union": false, "members": [], "methods": [], @@ -281,7 +281,7 @@ class R { "is_abstract": false, "is_nested": false, "is_struct": false, - "is_template": false, + "is_template": true, "is_union": false, "members": [], "methods": [], @@ -316,7 +316,7 @@ class R { "is_abstract": false, "is_nested": false, "is_struct": false, - "is_template": false, + "is_template": true, "is_union": false, "members": [], "methods": [], @@ -357,7 +357,7 @@ class R { "is_abstract": false, "is_nested": false, "is_struct": false, - "is_template": false, + "is_template": true, "is_union": false, "members": [], "methods": [], diff --git a/docs/test_cases/t00012_class.svg b/docs/test_cases/t00012_class.svg index 465d25f9..c3ab26b7 100644 --- a/docs/test_cases/t00012_class.svg +++ b/docs/test_cases/t00012_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + A @@ -18,23 +18,23 @@ T,Ts... - + - + value : T - + - + values : std::variant<Ts...> - - + + B @@ -43,15 +43,15 @@ - + - + ints : std::array<int,sizeof...(Is)> - - + + C @@ -60,14 +60,14 @@ - + - + ints : std::array<T,sizeof...(Is)> - + A @@ -75,7 +75,7 @@ int,std::string,float - + A @@ -83,7 +83,7 @@ int,std::string,bool - + B @@ -91,7 +91,7 @@ 3,2,1 - + B @@ -99,7 +99,7 @@ 1,1,1,1 - + C @@ -107,50 +107,50 @@ 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 diff --git a/docs/test_cases/t00013.md b/docs/test_cases/t00013.md index a60e8de4..83c0e483 100644 --- a/docs/test_cases/t00013.md +++ b/docs/test_cases/t00013.md @@ -139,7 +139,7 @@ private: "is_abstract": false, "is_nested": false, "is_struct": false, - "is_template": false, + "is_template": true, "is_union": false, "members": [], "methods": [], @@ -396,7 +396,7 @@ private: "is_abstract": false, "is_nested": false, "is_struct": false, - "is_template": false, + "is_template": true, "is_union": false, "members": [], "methods": [], @@ -419,7 +419,7 @@ private: "is_abstract": false, "is_nested": false, "is_struct": false, - "is_template": false, + "is_template": true, "is_union": false, "members": [], "methods": [], @@ -454,7 +454,7 @@ private: "is_abstract": false, "is_nested": false, "is_struct": false, - "is_template": false, + "is_template": true, "is_union": false, "members": [], "methods": [], diff --git a/docs/test_cases/t00013_class.svg b/docs/test_cases/t00013_class.svg index 903e08cd..7d1d8b13 100644 --- a/docs/test_cases/t00013_class.svg +++ b/docs/test_cases/t00013_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + ABCD::F @@ -18,15 +18,15 @@ T - + - + f : T - + ABCD::F @@ -34,70 +34,70 @@ int - - + + A - + - + a : int - - + + B - + - + b : int - - + + C - + - + c : int - - + + D - + - + d : int print(R * r) : void - - + + E @@ -105,16 +105,16 @@ T - + - + e : T - - + + G @@ -122,22 +122,22 @@ T,Args... - + - + g : T - + - + args : std::tuple<Args...> - + E @@ -145,7 +145,7 @@ int - + G @@ -153,7 +153,7 @@ int,float,std::string - + E @@ -161,25 +161,25 @@ std::string - - + + R - + - + gintstring : G<int,float,std::string> - + - + estring : E<std::string> diff --git a/docs/test_cases/t00014.md b/docs/test_cases/t00014.md index d9b1201d..b81adbb8 100644 --- a/docs/test_cases/t00014.md +++ b/docs/test_cases/t00014.md @@ -201,7 +201,7 @@ public: "is_abstract": false, "is_nested": false, "is_struct": false, - "is_template": false, + "is_template": true, "is_union": false, "members": [], "methods": [], @@ -230,7 +230,7 @@ public: "is_abstract": false, "is_nested": false, "is_struct": false, - "is_template": false, + "is_template": true, "is_union": false, "members": [], "methods": [], @@ -266,7 +266,7 @@ public: "is_abstract": false, "is_nested": false, "is_struct": false, - "is_template": false, + "is_template": true, "is_union": false, "members": [], "methods": [], @@ -295,7 +295,7 @@ public: "is_abstract": false, "is_nested": false, "is_struct": false, - "is_template": false, + "is_template": true, "is_union": false, "members": [], "methods": [], @@ -324,7 +324,7 @@ public: "is_abstract": false, "is_nested": false, "is_struct": false, - "is_template": false, + "is_template": true, "is_union": false, "members": [], "methods": [], @@ -353,7 +353,7 @@ public: "is_abstract": false, "is_nested": false, "is_struct": false, - "is_template": false, + "is_template": true, "is_union": false, "members": [], "methods": [], @@ -382,7 +382,7 @@ public: "is_abstract": false, "is_nested": false, "is_struct": false, - "is_template": false, + "is_template": true, "is_union": false, "members": [], "methods": [], @@ -411,7 +411,7 @@ public: "is_abstract": false, "is_nested": false, "is_struct": false, - "is_template": false, + "is_template": true, "is_union": false, "members": [], "methods": [], @@ -440,7 +440,7 @@ public: "is_abstract": false, "is_nested": false, "is_struct": false, - "is_template": false, + "is_template": true, "is_union": false, "members": [], "methods": [], @@ -469,7 +469,7 @@ public: "is_abstract": false, "is_nested": false, "is_struct": false, - "is_template": false, + "is_template": true, "is_union": false, "members": [], "methods": [], @@ -498,7 +498,7 @@ public: "is_abstract": false, "is_nested": false, "is_struct": false, - "is_template": false, + "is_template": true, "is_union": false, "members": [], "methods": [], @@ -534,7 +534,7 @@ public: "is_abstract": false, "is_nested": false, "is_struct": false, - "is_template": false, + "is_template": true, "is_union": false, "members": [], "methods": [], @@ -563,7 +563,7 @@ public: "is_abstract": false, "is_nested": false, "is_struct": false, - "is_template": false, + "is_template": true, "is_union": false, "members": [], "methods": [], @@ -843,7 +843,7 @@ public: }, { "access": "public", - "destination": "1700006390494465667", + "destination": "765890579167335652", "source": "906557320263235873", "type": "instantiation" }, diff --git a/docs/test_cases/t00014_class.svg b/docs/test_cases/t00014_class.svg index deb1dd17..1dbfb1b3 100644 --- a/docs/test_cases/t00014_class.svg +++ b/docs/test_cases/t00014_class.svg @@ -1,6 +1,6 @@ - + - + @@ -9,375 +9,375 @@ - - - - - A - - T,P - + + + + + A + + T,P + - - - + + + - - t : T + + t : T - - - + + + - - p : P + + p : P - - - - - - B - + + + + + + B + - - - + + + - - value : std::string + + 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 - + + + + + 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 + - - - + + + - - bapair : PairPairBA<bool> + + bapair : PairPairBA<bool> - - - + + + - - abool : APtr<bool> + + abool : APtr<bool> - - - + + + - - aboolfloat : AAPtr<bool,float> + + aboolfloat : AAPtr<bool,float> - - - + + + - - afloat : ASharedPtr<float> + + afloat : ASharedPtr<float> - - - + + + - - boolstring : A<bool,std::string> + + boolstring : A<bool,std::string> - - - + + + - - floatstring : AStringPtr<float> + + floatstring : AStringPtr<float> - - - + + + - - intstring : AIntString + + intstring : AIntString - - - + + + - - stringstring : AStringString + + stringstring : AStringString - - - + + + - - bstringstring : BStringString + + bstringstring : BStringString - - - + + + - - bs : BVector + + bs : BVector - - - + + + - - bs2 : BVector2 + + bs2 : BVector2 - - - + + + - - cb : SimpleCallback<ACharString> + + cb : SimpleCallback<ACharString> - - - + + + - - gcb : GenericCallback<R::AWCharString> + + gcb : GenericCallback<R::AWCharString> - - - + + + - - vcb : VoidCallback + + vcb : VoidCallback - - - + + + - - vps : VectorPtr<B> + + vps : VectorPtr<B> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - bapair - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + bapair + + bapair - - - - bs - - + + + + bs + + bs2 - - - - vps - - - - + + + + vps + + + + abool - - - - aboolfloat - - - - - - aboolfloat - - - - - - afloat - - - - boolstring - - - - floatstring - - - - intstring - - - - stringstring - - - - bstringstring - - - - + + + + aboolfloat + + + + + + aboolfloat + + + + + + afloat + + + + boolstring + + + + floatstring + + + + intstring + + + + stringstring + + + + bstringstring + + + + diff --git a/docs/test_cases/t00015.md b/docs/test_cases/t00015.md index e889e22b..063bb60b 100644 --- a/docs/test_cases/t00015.md +++ b/docs/test_cases/t00015.md @@ -127,7 +127,7 @@ class B : public ns1::ns2::Anon { }; "access": "public", "id": "1410694888805149453", "is_virtual": false, - "name": "t00015::ns1::A" + "name": "clanguml::t00015::ns1::A" } ], "display_name": "clanguml::t00015::ns3::ns1::ns2::Anon", @@ -154,7 +154,7 @@ class B : public ns1::ns2::Anon { }; "access": "public", "id": "1797521288354158629", "is_virtual": false, - "name": "ns1::ns2::Anon" + "name": "clanguml::t00015::ns3::ns1::ns2::Anon" } ], "display_name": "clanguml::t00015::ns3::B", diff --git a/docs/test_cases/t00015_class.svg b/docs/test_cases/t00015_class.svg index 42506c50..db5269c7 100644 --- a/docs/test_cases/t00015_class.svg +++ b/docs/test_cases/t00015_class.svg @@ -1,6 +1,6 @@ - + @@ -9,40 +9,40 @@ - - + + ns1::A - - + + ns1::ns2_v0_9_0::A - - + + ns1::Anon - - + + ns3::ns1::ns2::Anon - - + + ns3::B diff --git a/docs/test_cases/t00016.md b/docs/test_cases/t00016.md index 39c12c24..0753e05c 100644 --- a/docs/test_cases/t00016.md +++ b/docs/test_cases/t00016.md @@ -95,7 +95,7 @@ template <> struct is_numeric { "is_abstract": false, "is_nested": false, "is_struct": true, - "is_template": false, + "is_template": true, "is_union": false, "members": [], "methods": [], @@ -122,7 +122,7 @@ template <> struct is_numeric { "is_abstract": false, "is_nested": false, "is_struct": true, - "is_template": false, + "is_template": true, "is_union": false, "members": [], "methods": [], @@ -149,7 +149,7 @@ template <> struct is_numeric { "is_abstract": false, "is_nested": false, "is_struct": true, - "is_template": false, + "is_template": true, "is_union": false, "members": [], "methods": [], @@ -176,7 +176,7 @@ template <> struct is_numeric { "is_abstract": false, "is_nested": false, "is_struct": true, - "is_template": false, + "is_template": true, "is_union": false, "members": [], "methods": [], @@ -203,7 +203,7 @@ template <> struct is_numeric { "is_abstract": false, "is_nested": false, "is_struct": true, - "is_template": false, + "is_template": true, "is_union": false, "members": [], "methods": [], diff --git a/docs/test_cases/t00016_class.svg b/docs/test_cases/t00016_class.svg index a535c36e..feee50fa 100644 --- a/docs/test_cases/t00016_class.svg +++ b/docs/test_cases/t00016_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + is_numeric<> @@ -19,8 +19,8 @@ value : enum - - + + is_numeric @@ -29,8 +29,8 @@ - - + + is_numeric @@ -39,8 +39,8 @@ - - + + is_numeric @@ -49,8 +49,8 @@ - - + + is_numeric @@ -59,8 +59,8 @@ - - + + is_numeric diff --git a/docs/test_cases/t00017_class.svg b/docs/test_cases/t00017_class.svg index 36ed178c..cbd2f879 100644 --- a/docs/test_cases/t00017_class.svg +++ b/docs/test_cases/t00017_class.svg @@ -1,6 +1,6 @@ - + @@ -9,127 +9,127 @@ - - + + A - - + + B - - + + C - - + + D - - + + E - - + + F - - + + G - - + + H - - + + I - - + + J - - + + K - - + + R - + - + some_int : int - + - + some_int_pointer : int * - + - + some_int_pointer_pointer : int ** - + - + some_int_reference : int & diff --git a/docs/test_cases/t00018_class.svg b/docs/test_cases/t00018_class.svg index f1fc87c3..696d4baa 100644 --- a/docs/test_cases/t00018_class.svg +++ b/docs/test_cases/t00018_class.svg @@ -1,6 +1,6 @@ - + @@ -9,18 +9,18 @@ - - + + impl::widget - + - + n : int @@ -30,18 +30,18 @@ draw(const widget & w) : void widget(int n) : void - - + + widget - + - + pImpl : std::unique_ptr<impl::widget> diff --git a/docs/test_cases/t00019.md b/docs/test_cases/t00019.md index 9491757b..b904e3e9 100644 --- a/docs/test_cases/t00019.md +++ b/docs/test_cases/t00019.md @@ -429,7 +429,7 @@ class Base { "is_abstract": false, "is_nested": false, "is_struct": false, - "is_template": false, + "is_template": true, "is_union": false, "members": [], "methods": [], @@ -459,7 +459,7 @@ class Base { "is_abstract": false, "is_nested": false, "is_struct": false, - "is_template": false, + "is_template": true, "is_union": false, "members": [], "methods": [], @@ -496,7 +496,7 @@ class Base { "is_abstract": false, "is_nested": false, "is_struct": false, - "is_template": false, + "is_template": true, "is_union": false, "members": [], "methods": [], diff --git a/docs/test_cases/t00019_class.svg b/docs/test_cases/t00019_class.svg index e432e728..45f53676 100644 --- a/docs/test_cases/t00019_class.svg +++ b/docs/test_cases/t00019_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + Base @@ -25,8 +25,8 @@ m2() : std::string - - + + Layer1 @@ -39,8 +39,8 @@ m2() : std::string - - + + Layer2 @@ -51,8 +51,8 @@ all_calls_count() const : int - - + + Layer3 @@ -60,18 +60,18 @@ LowerLayer - + - + m_m1_calls : int - + - + m_m2_calls : int @@ -83,7 +83,7 @@ m1_calls() const : int m2_calls() const : int - + Layer3 @@ -91,7 +91,7 @@ Base - + Layer2 @@ -99,7 +99,7 @@ Layer3<Base> - + Layer1 @@ -107,18 +107,18 @@ Layer2<Layer3<Base>> - - + + A - + - + layers : std::unique_ptr<Layer1<Layer2<Layer3<Base>>>> diff --git a/docs/test_cases/t00020_class.svg b/docs/test_cases/t00020_class.svg index cf0c1667..aef0c67e 100644 --- a/docs/test_cases/t00020_class.svg +++ b/docs/test_cases/t00020_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + ProductA @@ -21,8 +21,8 @@ sell(int price) const = 0 : bool - - + + ProductA1 @@ -31,8 +31,8 @@ sell(int price) const : bool - - + + ProductA2 @@ -41,8 +41,8 @@ sell(int price) const : bool - - + + ProductB @@ -53,8 +53,8 @@ buy(int price) const = 0 : bool - - + + ProductB1 @@ -63,8 +63,8 @@ buy(int price) const : bool - - + + ProductB2 @@ -73,8 +73,8 @@ buy(int price) const : bool - - + + AbstractFactory @@ -85,8 +85,8 @@ make_b() const = 0 : std::unique_ptr<ProductB> - - + + Factory1 @@ -97,8 +97,8 @@ make_b() const : std::unique_ptr<ProductB> - - + + Factory2 diff --git a/docs/test_cases/t00021_class.svg b/docs/test_cases/t00021_class.svg index 5b2152ee..a33ccbe6 100644 --- a/docs/test_cases/t00021_class.svg +++ b/docs/test_cases/t00021_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + Visitor @@ -23,8 +23,8 @@ visit_B(const B & item) const = 0 : void - - + + Visitor1 @@ -35,8 +35,8 @@ visit_B(const B & item) const : void - - + + Visitor2 @@ -47,8 +47,8 @@ visit_B(const B & item) const : void - - + + Visitor3 @@ -59,8 +59,8 @@ visit_B(const B & item) const : void - - + + Item @@ -71,8 +71,8 @@ accept(const Visitor & visitor) const = 0 : void - - + + A @@ -81,8 +81,8 @@ accept(const Visitor & visitor) const : void - - + + B diff --git a/docs/test_cases/t00022_class.svg b/docs/test_cases/t00022_class.svg index e6fe5865..47a2f0bb 100644 --- a/docs/test_cases/t00022_class.svg +++ b/docs/test_cases/t00022_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + A @@ -23,8 +23,8 @@ method2() = 0 : void - - + + A1 @@ -35,8 +35,8 @@ method2() : void - - + + A2 diff --git a/docs/test_cases/t00023_class.svg b/docs/test_cases/t00023_class.svg index e8485c07..5ee5aef9 100644 --- a/docs/test_cases/t00023_class.svg +++ b/docs/test_cases/t00023_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + Strategy @@ -21,8 +21,8 @@ algorithm() = 0 : void - - + + StrategyA @@ -31,8 +31,8 @@ algorithm() : void - - + + StrategyB @@ -41,8 +41,8 @@ algorithm() : void - - + + StrategyC @@ -51,18 +51,18 @@ algorithm() : void - - + + Context - + - + m_strategy : std::unique_ptr<Strategy> diff --git a/docs/test_cases/t00024_class.svg b/docs/test_cases/t00024_class.svg index 72e4830d..7eb209ce 100644 --- a/docs/test_cases/t00024_class.svg +++ b/docs/test_cases/t00024_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + Target @@ -23,8 +23,8 @@ m2() = 0 : void - - + + Target1 @@ -35,8 +35,8 @@ m2() : void - - + + Target2 @@ -47,18 +47,18 @@ m2() : void - - + + Proxy - + - + m_target : std::shared_ptr<Target> diff --git a/docs/test_cases/t00025.md b/docs/test_cases/t00025.md index 9e8ad51a..753f27c9 100644 --- a/docs/test_cases/t00025.md +++ b/docs/test_cases/t00025.md @@ -241,7 +241,7 @@ public: "is_abstract": false, "is_nested": false, "is_struct": false, - "is_template": false, + "is_template": true, "is_union": false, "members": [], "methods": [], @@ -264,7 +264,7 @@ public: "is_abstract": false, "is_nested": false, "is_struct": false, - "is_template": false, + "is_template": true, "is_union": false, "members": [], "methods": [], diff --git a/docs/test_cases/t00025_class.svg b/docs/test_cases/t00025_class.svg index 2bd0497b..ab554c9c 100644 --- a/docs/test_cases/t00025_class.svg +++ b/docs/test_cases/t00025_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + Target1 @@ -21,8 +21,8 @@ m2() : void - - + + Target2 @@ -33,8 +33,8 @@ m2() : void - - + + Proxy @@ -42,11 +42,11 @@ T - + - + m_target : std::shared_ptr<T> @@ -56,7 +56,7 @@ m1() : void m2() : void - + Proxy @@ -64,7 +64,7 @@ Target1 - + Proxy @@ -72,25 +72,25 @@ Target2 - - + + ProxyHolder - + - + proxy1 : Proxy<Target1> - + - + proxy2 : Proxy<Target2> diff --git a/docs/test_cases/t00026.md b/docs/test_cases/t00026.md index 6ca8c99f..76de00ea 100644 --- a/docs/test_cases/t00026.md +++ b/docs/test_cases/t00026.md @@ -351,7 +351,7 @@ struct StringMemento { "is_abstract": false, "is_nested": false, "is_struct": false, - "is_template": false, + "is_template": true, "is_union": false, "members": [], "methods": [], @@ -374,7 +374,7 @@ struct StringMemento { "is_abstract": false, "is_nested": false, "is_struct": false, - "is_template": false, + "is_template": true, "is_union": false, "members": [], "methods": [], diff --git a/docs/test_cases/t00026_class.svg b/docs/test_cases/t00026_class.svg index 7429d144..9d5658ac 100644 --- a/docs/test_cases/t00026_class.svg +++ b/docs/test_cases/t00026_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + Memento @@ -18,11 +18,11 @@ T - + - + m_value : T @@ -30,8 +30,8 @@ Memento<T>(T && v) : void value() const : T - - + + Originator @@ -39,11 +39,11 @@ T - + - + m_value : T @@ -57,8 +57,8 @@ print() const : void set(T && v) : void - - + + Caretaker @@ -66,11 +66,11 @@ T - + - + m_mementos : std::unordered_map<std::string,Memento<T>> @@ -78,7 +78,7 @@ state(const std::string & n) : Memento<T> & set_state(const std::string & s, Memento<T> && m) : void - + Caretaker @@ -86,7 +86,7 @@ std::string - + Originator @@ -94,25 +94,25 @@ std::string - - + + StringMemento - + - + caretaker : Caretaker<std::string> - + - + originator : Originator<std::string> diff --git a/docs/test_cases/t00027.md b/docs/test_cases/t00027.md index 08a7deb1..32b61a0f 100644 --- a/docs/test_cases/t00027.md +++ b/docs/test_cases/t00027.md @@ -134,7 +134,7 @@ struct Window { "is_abstract": false, "is_nested": false, "is_struct": false, - "is_template": false, + "is_template": true, "is_union": false, "members": [], "methods": [], @@ -203,7 +203,7 @@ struct Window { "is_abstract": false, "is_nested": false, "is_struct": false, - "is_template": false, + "is_template": true, "is_union": false, "members": [], "methods": [], @@ -399,7 +399,7 @@ struct Window { "is_abstract": false, "is_nested": false, "is_struct": false, - "is_template": false, + "is_template": true, "is_union": false, "members": [], "methods": [], @@ -428,7 +428,7 @@ struct Window { "is_abstract": false, "is_nested": false, "is_struct": false, - "is_template": false, + "is_template": true, "is_union": false, "members": [], "methods": [], @@ -451,7 +451,7 @@ struct Window { "is_abstract": false, "is_nested": false, "is_struct": false, - "is_template": false, + "is_template": true, "is_union": false, "members": [], "methods": [], @@ -480,7 +480,7 @@ struct Window { "is_abstract": false, "is_nested": false, "is_struct": false, - "is_template": false, + "is_template": true, "is_union": false, "members": [], "methods": [], diff --git a/docs/test_cases/t00027_class.svg b/docs/test_cases/t00027_class.svg index f538daa0..4011c7be 100644 --- a/docs/test_cases/t00027_class.svg +++ b/docs/test_cases/t00027_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + Shape @@ -21,14 +21,14 @@ ~Shape() = default : void - + Line - - + + Line @@ -39,14 +39,14 @@ display() : void - + Text - - + + Text @@ -57,8 +57,8 @@ display() : void - - + + ShapeDecorator @@ -67,8 +67,8 @@ display() = 0 : void - - + + Color @@ -79,8 +79,8 @@ display() : void - - + + Weight @@ -91,7 +91,7 @@ display() : void - + Line @@ -99,7 +99,7 @@ Color,Weight - + Line @@ -107,7 +107,7 @@ Color - + Text @@ -115,7 +115,7 @@ Color,Weight - + Text @@ -123,39 +123,39 @@ Color - - + + Window - + - + border : Line<Color,Weight> - + - + divider : Line<Color> - + - + title : Text<Color,Weight> - + - + description : Text<Color> diff --git a/docs/test_cases/t00028.md b/docs/test_cases/t00028.md index 652039eb..f1c7f88e 100644 --- a/docs/test_cases/t00028.md +++ b/docs/test_cases/t00028.md @@ -281,7 +281,7 @@ class R { "is_abstract": false, "is_nested": false, "is_struct": false, - "is_template": false, + "is_template": true, "is_union": false, "members": [], "methods": [], diff --git a/docs/test_cases/t00028_class.svg b/docs/test_cases/t00028_class.svg index 61e4b6f5..e6a8f7f7 100644 --- a/docs/test_cases/t00028_class.svg +++ b/docs/test_cases/t00028_class.svg @@ -1,6 +1,6 @@ - + @@ -9,54 +9,54 @@ - - + + A - + A class note. - - + + B - + B class note. - - + + C - + C class note. - - + + D - + D class note. - - + + E @@ -64,27 +64,27 @@ T - + - + param : T - + E template class note. - - + + G - - + + F @@ -94,10 +94,10 @@ three - + F enum note. - + E @@ -105,65 +105,65 @@ int - - + + R - + - + aaa : A - + - + bbb : B * - + - + ccc : C & - + - + ddd : std::vector<std::shared_ptr<D>> - + - + eee : E<int> - + - + ggg : G ** R(C & c) : void - + R class note. - + R contains an instance of A. - + Reference to C. diff --git a/docs/test_cases/t00029_class.svg b/docs/test_cases/t00029_class.svg index 98a9d49d..d7d68285 100644 --- a/docs/test_cases/t00029_class.svg +++ b/docs/test_cases/t00029_class.svg @@ -1,6 +1,6 @@ - + @@ -9,16 +9,16 @@ - - + + A - - + + C @@ -26,16 +26,16 @@ T - + - + param : T - - + + E @@ -45,64 +45,64 @@ three - - + + G1 - - + + G2 - - + + G3 - - + + G4 - - + + R - + - + g1 : G1 - + - + g3 : G3 & - + - + g4 : std::shared_ptr<G4> diff --git a/docs/test_cases/t00030_class.svg b/docs/test_cases/t00030_class.svg index cae8413b..cddd3990 100644 --- a/docs/test_cases/t00030_class.svg +++ b/docs/test_cases/t00030_class.svg @@ -1,6 +1,6 @@ - + @@ -9,86 +9,86 @@ - - + + A - - + + B - - + + C - - + + D - - + + E - - + + R - + - + aaa : A - + - + bbb : std::vector<B> - + - + ccc : std::vector<C> - + - + ddd : D - + - + eee : E * diff --git a/docs/test_cases/t00031.md b/docs/test_cases/t00031.md index d45fc832..9c66ed67 100644 --- a/docs/test_cases/t00031.md +++ b/docs/test_cases/t00031.md @@ -177,7 +177,7 @@ struct R { "is_abstract": false, "is_nested": false, "is_struct": false, - "is_template": false, + "is_template": true, "is_union": false, "members": [], "methods": [], diff --git a/docs/test_cases/t00031_class.svg b/docs/test_cases/t00031_class.svg index 9647deb5..df549ffe 100644 --- a/docs/test_cases/t00031_class.svg +++ b/docs/test_cases/t00031_class.svg @@ -1,33 +1,33 @@ - + - + - + - - - + + + A - - + + B @@ -37,8 +37,8 @@ three - - + + @@ -47,23 +47,23 @@ T - + - + ttt : T - - + + D - + C @@ -71,39 +71,39 @@ int - - + + R - + - + aaa : A * - + - + bbb : std::vector<B> - + - + ccc : C<int> - + - + ddd : D * diff --git a/docs/test_cases/t00032.md b/docs/test_cases/t00032.md index 1525a0b6..0504d4a4 100644 --- a/docs/test_cases/t00032.md +++ b/docs/test_cases/t00032.md @@ -291,7 +291,7 @@ struct R { "is_abstract": false, "is_nested": false, "is_struct": false, - "is_template": false, + "is_template": true, "is_union": false, "members": [], "methods": [], diff --git a/docs/test_cases/t00032_class.svg b/docs/test_cases/t00032_class.svg index 4aa41d61..e3c2b315 100644 --- a/docs/test_cases/t00032_class.svg +++ b/docs/test_cases/t00032_class.svg @@ -1,6 +1,6 @@ - + @@ -9,24 +9,24 @@ - - + + Base - - + + TBase - - + + A @@ -35,8 +35,8 @@ operator()() : void - - + + B @@ -45,8 +45,8 @@ operator()() : void - - + + C @@ -55,8 +55,8 @@ operator()() : void - - + + Overload @@ -64,15 +64,15 @@ T,L,Ts... - + - + counter : L - + Overload @@ -80,18 +80,18 @@ TBase,int,A,B,C - - + + R - + - + overload : Overload<TBase,int,A,B,C> diff --git a/docs/test_cases/t00033.md b/docs/test_cases/t00033.md index afce35dc..9dd40639 100644 --- a/docs/test_cases/t00033.md +++ b/docs/test_cases/t00033.md @@ -207,7 +207,7 @@ struct R { "is_abstract": false, "is_nested": false, "is_struct": false, - "is_template": false, + "is_template": true, "is_union": false, "members": [], "methods": [], @@ -230,7 +230,7 @@ struct R { "is_abstract": false, "is_nested": false, "is_struct": false, - "is_template": false, + "is_template": true, "is_union": false, "members": [], "methods": [], @@ -267,7 +267,7 @@ struct R { "is_abstract": false, "is_nested": false, "is_struct": false, - "is_template": false, + "is_template": true, "is_union": false, "members": [], "methods": [], diff --git a/docs/test_cases/t00033_class.svg b/docs/test_cases/t00033_class.svg index 4c682988..75abfbb0 100644 --- a/docs/test_cases/t00033_class.svg +++ b/docs/test_cases/t00033_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + A @@ -18,16 +18,16 @@ T - + - + aaa : T - - + + B @@ -35,16 +35,16 @@ T - + - + bbb : T - - + + C @@ -52,30 +52,30 @@ T - + - + ccc : T - - + + D - + - + ddd : int - + C @@ -83,7 +83,7 @@ D - + B @@ -91,7 +91,7 @@ std::unique_ptr<C<D>> - + A @@ -99,18 +99,18 @@ B<std::unique_ptr<C<D>>> - - + + R - + - + abc : A<B<std::unique_ptr<C<D>>>> diff --git a/docs/test_cases/t00034.md b/docs/test_cases/t00034.md index 15da7587..1162f483 100644 --- a/docs/test_cases/t00034.md +++ b/docs/test_cases/t00034.md @@ -170,7 +170,7 @@ struct R { "is_abstract": false, "is_nested": false, "is_struct": true, - "is_template": false, + "is_template": true, "is_union": false, "members": [], "methods": [], @@ -224,7 +224,7 @@ struct R { "is_abstract": false, "is_nested": false, "is_struct": true, - "is_template": false, + "is_template": true, "is_union": false, "members": [], "methods": [], diff --git a/docs/test_cases/t00034_class.svg b/docs/test_cases/t00034_class.svg index c3da3308..567b961d 100644 --- a/docs/test_cases/t00034_class.svg +++ b/docs/test_cases/t00034_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + Void @@ -21,8 +21,8 @@ operator!=(const Void & ) const : bool - - + + lift_void @@ -31,8 +31,8 @@ - - + + lift_void @@ -41,8 +41,8 @@ - - + + drop_void @@ -51,8 +51,8 @@ - - + + drop_void @@ -61,33 +61,33 @@ - - + + A - - + + R - + - + la : lift_void_t<A> * - + - + lv : lift_void_t<void> * diff --git a/docs/test_cases/t00035_class.svg b/docs/test_cases/t00035_class.svg index c483122f..46f5ffa9 100644 --- a/docs/test_cases/t00035_class.svg +++ b/docs/test_cases/t00035_class.svg @@ -1,6 +1,6 @@ - + @@ -9,40 +9,40 @@ - - + + Top - - + + Left - - + + Center - - + + Bottom - - + + Right diff --git a/docs/test_cases/t00036.md b/docs/test_cases/t00036.md index cda15954..bedd7516 100644 --- a/docs/test_cases/t00036.md +++ b/docs/test_cases/t00036.md @@ -166,7 +166,7 @@ struct C { }; "is_abstract": false, "is_nested": false, "is_struct": false, - "is_template": false, + "is_template": true, "is_union": false, "members": [], "methods": [], diff --git a/docs/test_cases/t00036_class.svg b/docs/test_cases/t00036_class.svg index 61d8192d..3f594eb4 100644 --- a/docs/test_cases/t00036_class.svg +++ b/docs/test_cases/t00036_class.svg @@ -1,6 +1,6 @@ - + @@ -9,23 +9,23 @@ - + ns1 - + ns11 - + ns111 - + ns2 - + ns22 - - + + E @@ -34,8 +34,8 @@ yellow - - + + A @@ -43,15 +43,15 @@ T - + - + a : T - + A @@ -59,23 +59,23 @@ int - - + + B - + - + a_int : A<int> - - + + C diff --git a/docs/test_cases/t00037_class.svg b/docs/test_cases/t00037_class.svg index 38de7af7..1ba3d8f0 100644 --- a/docs/test_cases/t00037_class.svg +++ b/docs/test_cases/t00037_class.svg @@ -1,6 +1,6 @@ - + @@ -9,98 +9,98 @@ - - + + ST - + - + dimensions : ST::(anonymous_662) - + - + units : ST::(anonymous_792) - - + + ST::(dimensions) - + - + t : double - + - + x : double - + - + y : double - + - + z : double - - + + ST::(units) - + - + c : double - + - + h : double - - + + A - + - + st : ST diff --git a/docs/test_cases/t00038.md b/docs/test_cases/t00038.md index 9024497c..02000ce1 100644 --- a/docs/test_cases/t00038.md +++ b/docs/test_cases/t00038.md @@ -265,7 +265,7 @@ struct map - + @@ -9,8 +9,8 @@ - - + + thirdparty::ns1::color_t @@ -20,16 +20,16 @@ blue - - + + thirdparty::ns1::E - - + + property_t @@ -39,47 +39,47 @@ property_c - - + + A - - + + B - - + + C - - + + key_t - + - + key : std::string - - + + map @@ -88,8 +88,8 @@ - - + + map @@ -98,8 +98,8 @@ - - + + map @@ -108,8 +108,8 @@ - - + + map @@ -118,8 +118,8 @@ - - + + map diff --git a/docs/test_cases/t00039_class.svg b/docs/test_cases/t00039_class.svg index e759b9a8..6908e20c 100644 --- a/docs/test_cases/t00039_class.svg +++ b/docs/test_cases/t00039_class.svg @@ -1,6 +1,6 @@ - + @@ -9,95 +9,95 @@ - - + + C - - + + D - - + + E - - + + CD - - + + DE - - + + CDE - - + + A - - + + AA - - + + AAA - + - + b : B * - - + + ns2::AAAA - - + + ns3::F @@ -105,16 +105,16 @@ T - + - + t : T * - - + + ns3::FF @@ -122,16 +122,16 @@ T,M - + - + m : M * - - + + ns3::FE @@ -139,16 +139,16 @@ T,M - + - + m : M * - - + + ns3::FFF @@ -156,11 +156,11 @@ T,M,N - + - + n : N * diff --git a/docs/test_cases/t00040_class.svg b/docs/test_cases/t00040_class.svg index 4a6b93c7..e63ed12a 100644 --- a/docs/test_cases/t00040_class.svg +++ b/docs/test_cases/t00040_class.svg @@ -1,6 +1,6 @@ - + @@ -9,50 +9,50 @@ - - + + A - + - + ii_ : int get_a() : int - - + + AA - - + + AAA - + - + b : B * get_aaa() : int - - + + R diff --git a/docs/test_cases/t00041_class.svg b/docs/test_cases/t00041_class.svg index b5048dbb..19bc7e91 100644 --- a/docs/test_cases/t00041_class.svg +++ b/docs/test_cases/t00041_class.svg @@ -1,6 +1,6 @@ - + @@ -9,102 +9,102 @@ - - + + R - - + + D - + - + rr : RR * - - + + E - - + + F - - + + RR - + - + e : E * - + - + f : F * - + - + g : detail::G * foo(H * h) : void - - + + RRR - - + + ns1::N - - + + ns1::NN - - + + ns1::NM diff --git a/docs/test_cases/t00042.md b/docs/test_cases/t00042.md index 228b9a48..6a25d490 100644 --- a/docs/test_cases/t00042.md +++ b/docs/test_cases/t00042.md @@ -111,7 +111,7 @@ struct R { "is_abstract": false, "is_nested": false, "is_struct": true, - "is_template": false, + "is_template": true, "is_union": false, "members": [], "methods": [], @@ -192,7 +192,7 @@ struct R { "is_abstract": false, "is_nested": false, "is_struct": false, - "is_template": false, + "is_template": true, "is_union": false, "members": [], "methods": [], @@ -215,7 +215,7 @@ struct R { "is_abstract": false, "is_nested": false, "is_struct": false, - "is_template": false, + "is_template": true, "is_union": false, "members": [], "methods": [], @@ -238,7 +238,7 @@ struct R { "is_abstract": false, "is_nested": false, "is_struct": false, - "is_template": false, + "is_template": true, "is_union": false, "members": [], "methods": [], diff --git a/docs/test_cases/t00042_class.svg b/docs/test_cases/t00042_class.svg index 137c568f..514f4dec 100644 --- a/docs/test_cases/t00042_class.svg +++ b/docs/test_cases/t00042_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + A @@ -18,16 +18,16 @@ T - + - + a : T - - + + A @@ -36,8 +36,8 @@ - - + + B @@ -45,22 +45,22 @@ T,K - + - + b : T - + - + bb : K - + A @@ -68,7 +68,7 @@ double - + A @@ -76,7 +76,7 @@ std::string - + B diff --git a/docs/test_cases/t00043_class.svg b/docs/test_cases/t00043_class.svg index 8129e42d..0a30f981 100644 --- a/docs/test_cases/t00043_class.svg +++ b/docs/test_cases/t00043_class.svg @@ -1,6 +1,6 @@ - + @@ -9,22 +9,22 @@ - + dependants - + dependencies - - + + A - - + + B @@ -33,8 +33,8 @@ b(dependants::A * a) : void - - + + BB @@ -43,8 +43,8 @@ bb(dependants::A * a) : void - - + + C @@ -53,8 +53,8 @@ c(dependants::B * b) : void - - + + D @@ -65,8 +65,8 @@ dd(dependants::BB * bb) : void - - + + E @@ -75,24 +75,24 @@ e(dependants::D * d) : void - - + + G - - + + GG - - + + H @@ -103,8 +103,8 @@ hh(dependencies::GG * gg) : void - - + + I @@ -113,8 +113,8 @@ i(dependencies::H * h) : void - - + + J diff --git a/docs/test_cases/t00044.md b/docs/test_cases/t00044.md index 37c66420..2d0be138 100644 --- a/docs/test_cases/t00044.md +++ b/docs/test_cases/t00044.md @@ -49,7 +49,9 @@ sink(signal_handler &) signal_handler int_handler; -sink sink1{int_handler}; +struct R { + sink> sink1{int_handler}; +}; } // namespace clanguml::t00044 @@ -63,12 +65,12 @@ sink sink1{int_handler}; "elements": [ { "bases": [], - "display_name": "clanguml::t00044::sink>", - "id": "1813783008369291713", + "display_name": "clanguml::t00044::sink>", + "id": "559574389062594251", "is_abstract": false, "is_nested": false, "is_struct": false, - "is_template": false, + "is_template": true, "is_union": false, "members": [], "methods": [], @@ -86,14 +88,27 @@ sink sink1{int_handler}; { "is_variadic": false, "kind": "argument", - "template_parameters": [], + "template_parameters": [ + { + "is_variadic": false, + "kind": "template_type", + "name": "Ret", + "template_parameters": [] + }, + { + "is_variadic": true, + "kind": "template_type", + "name": "Args...", + "template_parameters": [] + } + ], "type": "" }, { "is_variadic": false, - "kind": "argument", - "template_parameters": [], - "type": "type-parameter-0-2" + "kind": "template_type", + "name": "A", + "template_parameters": [] } ], "type": "clanguml::t00044::signal_handler" @@ -108,7 +123,7 @@ sink sink1{int_handler}; "is_abstract": false, "is_nested": false, "is_struct": false, - "is_template": false, + "is_template": true, "is_union": false, "members": [], "methods": [], @@ -122,8 +137,20 @@ sink sink1{int_handler}; { "is_variadic": false, "kind": "template_type", - "name": "Ret(Args...)", - "template_parameters": [] + "template_parameters": [ + { + "is_variadic": false, + "kind": "template_type", + "name": "Ret", + "template_parameters": [] + }, + { + "is_variadic": true, + "kind": "template_type", + "name": "Args...", + "template_parameters": [] + } + ] }, { "is_variadic": false, @@ -134,6 +161,128 @@ sink sink1{int_handler}; ], "type": "class" }, + { + "bases": [], + "display_name": "clanguml::t00044::signal_handler", + "id": "103559998624864011", + "is_abstract": false, + "is_nested": false, + "is_struct": false, + "is_template": true, + "is_union": false, + "members": [], + "methods": [], + "name": "signal_handler", + "namespace": "clanguml::t00044", + "template_parameters": [ + { + "is_variadic": false, + "kind": "argument", + "template_parameters": [ + { + "is_variadic": false, + "kind": "argument", + "template_parameters": [], + "type": "void" + }, + { + "is_variadic": false, + "kind": "argument", + "template_parameters": [], + "type": "int" + } + ], + "type": "" + }, + { + "is_variadic": false, + "kind": "argument", + "template_parameters": [], + "type": "bool" + } + ], + "type": "class" + }, + { + "bases": [], + "display_name": "clanguml::t00044::sink>", + "id": "1718007222067272862", + "is_abstract": false, + "is_nested": false, + "is_struct": false, + "is_template": true, + "is_union": false, + "members": [], + "methods": [], + "name": "sink", + "namespace": "clanguml::t00044", + "template_parameters": [ + { + "is_variadic": false, + "kind": "argument", + "template_parameters": [ + { + "is_variadic": false, + "kind": "argument", + "template_parameters": [ + { + "is_variadic": false, + "kind": "argument", + "template_parameters": [], + "type": "void" + }, + { + "is_variadic": false, + "kind": "argument", + "template_parameters": [], + "type": "int" + } + ], + "type": "" + }, + { + "is_variadic": false, + "kind": "argument", + "template_parameters": [], + "type": "bool" + } + ], + "type": "clanguml::t00044::signal_handler" + } + ], + "type": "class" + }, + { + "bases": [], + "display_name": "clanguml::t00044::R", + "id": "1644484569399365272", + "is_abstract": false, + "is_nested": false, + "is_struct": true, + "is_template": false, + "is_union": false, + "members": [ + { + "access": "public", + "is_static": false, + "name": "sink1", + "source_location": { + "file": "../../tests/t00044/t00044.cc", + "line": 33 + }, + "type": "sink>" + } + ], + "methods": [], + "name": "R", + "namespace": "clanguml::t00044", + "source_location": { + "file": "../../tests/t00044/t00044.cc", + "line": 32 + }, + "template_parameters": [], + "type": "class" + }, { "bases": [], "display_name": "clanguml::t00044::signal_handler", @@ -200,7 +349,7 @@ sink sink1{int_handler}; { "access": "public", "destination": "1759724482769288325", - "source": "1813783008369291713", + "source": "559574389062594251", "type": "instantiation" }, { @@ -208,6 +357,31 @@ sink sink1{int_handler}; "destination": "276594465967577895", "source": "1591729735727316875", "type": "instantiation" + }, + { + "access": "public", + "destination": "1591729735727316875", + "source": "103559998624864011", + "type": "instantiation" + }, + { + "access": "public", + "destination": "103559998624864011", + "source": "1718007222067272862", + "type": "dependency" + }, + { + "access": "public", + "destination": "559574389062594251", + "source": "1718007222067272862", + "type": "instantiation" + }, + { + "access": "public", + "destination": "1718007222067272862", + "label": "sink1", + "source": "1644484569399365272", + "type": "aggregation" } ], "using_namespace": "clanguml::t00044" diff --git a/docs/test_cases/t00044_class.svg b/docs/test_cases/t00044_class.svg index c5e6c9ef..7d499e68 100644 --- a/docs/test_cases/t00044_class.svg +++ b/docs/test_cases/t00044_class.svg @@ -1,6 +1,6 @@ - + - + @@ -9,49 +9,90 @@ - - - - - sink - - clanguml::t00044::signal_handler<,type-parameter-0-2> - - + + + + + sink + + signal_handler<Ret(Args...),A> + + - - - - - signal_handler - - Ret(Args...),A - - + + + + + signal_handler + + Ret(Args...),A + + - - - - - signal_handler - - T,A - - + + + + signal_handler + + void(int),bool + + + + + + sink + + signal_handler<void(int),bool> + + + + + + + R + + - - - - - sink - - T - - + + + - - - - + + sink1 : sink<signal_handler<void (int),bool>> + + + + + + signal_handler + + T,A + + + + + + + + sink + + T + + + + + + + + + + + + + + + + + sink1 diff --git a/docs/test_cases/t00045_class.svg b/docs/test_cases/t00045_class.svg index 0d125790..f50b3a76 100644 --- a/docs/test_cases/t00045_class.svg +++ b/docs/test_cases/t00045_class.svg @@ -1,6 +1,6 @@ - + @@ -9,32 +9,32 @@ - - + + A - - + + AA - - + + AAA - - + + AAAA @@ -42,103 +42,103 @@ 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 - + - + a : ns1::ns2::A * - + - + ns1_a : ns1::A * - + - + ns1_ns2_a : ns1::ns2::A * - + - + root_a : ::A * diff --git a/docs/test_cases/t00046_class.svg b/docs/test_cases/t00046_class.svg index 493ce06b..0ef43609 100644 --- a/docs/test_cases/t00046_class.svg +++ b/docs/test_cases/t00046_class.svg @@ -1,6 +1,6 @@ - + @@ -9,118 +9,118 @@ - + ns1 - + ns2 - + __gnu_cxx - - + + A - - + + A - - + + B - - + + C - - + + D - - + + E - - + + R - + - + a : ns1::ns2::A * - + - + ns1_a : ns1::A * - + - + ns1_ns2_a : ns1::ns2::A * - + - + root_a : ::A * - + - + i : std::vector<std::uint8_t> foo(AA & aa) : void - - + + A - - + + AA diff --git a/docs/test_cases/t00047.md b/docs/test_cases/t00047.md index bc8b76b7..1f68c651 100644 --- a/docs/test_cases/t00047.md +++ b/docs/test_cases/t00047.md @@ -57,7 +57,7 @@ using conditional = typename conditional_t::type; "is_abstract": false, "is_nested": false, "is_struct": true, - "is_template": false, + "is_template": true, "is_union": false, "members": [], "methods": [], @@ -84,7 +84,7 @@ using conditional = typename conditional_t::type; "is_abstract": false, "is_nested": false, "is_struct": true, - "is_template": false, + "is_template": true, "is_union": false, "members": [], "methods": [], @@ -123,7 +123,7 @@ using conditional = typename conditional_t::type; "is_abstract": false, "is_nested": false, "is_struct": true, - "is_template": false, + "is_template": true, "is_union": false, "members": [], "methods": [], diff --git a/docs/test_cases/t00047_class.svg b/docs/test_cases/t00047_class.svg index 18c185da..516458bc 100644 --- a/docs/test_cases/t00047_class.svg +++ b/docs/test_cases/t00047_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + conditional_t @@ -19,8 +19,8 @@ - - + + conditional_t @@ -29,8 +29,8 @@ - - + + conditional_t @@ -39,8 +39,8 @@ - - + + conditional_t diff --git a/docs/test_cases/t00048_class.svg b/docs/test_cases/t00048_class.svg index 4b6e0cba..60a493a9 100644 --- a/docs/test_cases/t00048_class.svg +++ b/docs/test_cases/t00048_class.svg @@ -1,6 +1,6 @@ - + @@ -9,25 +9,25 @@ - - + + Base - + - + base : int foo() = 0 : void - - + + BaseTemplate @@ -35,35 +35,35 @@ T - + - + base : T foo() = 0 : void - - + + B - + - + b : int foo() : void - - + + BTemplate @@ -71,35 +71,35 @@ T - + - + b : T foo() : void - - + + A - + - + a : int foo() : void - - + + ATemplate @@ -107,11 +107,11 @@ T - + - + a : T diff --git a/docs/test_cases/t00049.md b/docs/test_cases/t00049.md index 2b2ffc70..bf90a6e9 100644 --- a/docs/test_cases/t00049.md +++ b/docs/test_cases/t00049.md @@ -111,7 +111,7 @@ struct R { "is_abstract": false, "is_nested": false, "is_struct": false, - "is_template": false, + "is_template": true, "is_union": false, "members": [], "methods": [], @@ -134,7 +134,7 @@ struct R { "is_abstract": false, "is_nested": false, "is_struct": false, - "is_template": false, + "is_template": true, "is_union": false, "members": [], "methods": [], @@ -157,7 +157,7 @@ struct R { "is_abstract": false, "is_nested": false, "is_struct": false, - "is_template": false, + "is_template": true, "is_union": false, "members": [], "methods": [], diff --git a/docs/test_cases/t00049_class.svg b/docs/test_cases/t00049_class.svg index 65466d8a..54383167 100644 --- a/docs/test_cases/t00049_class.svg +++ b/docs/test_cases/t00049_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + A @@ -18,17 +18,17 @@ T - + - + a : T get_a() : T & - + A @@ -36,7 +36,7 @@ intmap - + A @@ -44,7 +44,7 @@ thestring - + A @@ -52,32 +52,32 @@ string_vector - - + + R - + - + a_string : A<thestring> - + - + a_vector_string : A<string_vector> - + - + a_int_map : A<intmap> diff --git a/docs/test_cases/t00050_class.svg b/docs/test_cases/t00050_class.svg index 39e2502b..b5c14c9e 100644 --- a/docs/test_cases/t00050_class.svg +++ b/docs/test_cases/t00050_class.svg @@ -1,6 +1,6 @@ - + @@ -9,40 +9,40 @@ - - + + A - - + + B - - + + C - - + + utils::D - - + + E @@ -52,8 +52,8 @@ E3 - - + + F @@ -61,44 +61,44 @@ T,V,int N - + - + t : T[N] - + - + v : V - - + + G - - + + NoComment - + Lorem ipsum dolor sit - + Lorem ipsum dolor sit - + Lorem ipsum dolor sit amet consectetur adipiscing elit, urna consequat felis vehicula class ultricies mollis dictumst, aenean non a in donec nulla. @@ -125,50 +125,50 @@ imperdiet praesent magnis ridiculus congue gravida curabitur dictum sagittis, enim et magna sit inceptos sodales parturient pharetra mollis, aenean vel nostra tellus commodo pretium sapien sociosqu. - + This is a short description of class G. - + This is an intermediate description of class G. - + This is a long description of class G. - + Lorem ipsum - + TODO 1. Write meaningful comment - + TODO 2. Write tests - + TODO 3. Implement - + Long comment example - + TODO Implement... - + Simple array wrapper. - + Template parameters @@ -181,6 +181,6 @@ N Size of T array. - + diff --git a/docs/test_cases/t00051.md b/docs/test_cases/t00051.md index 27937a57..d4be9c98 100644 --- a/docs/test_cases/t00051.md +++ b/docs/test_cases/t00051.md @@ -211,7 +211,7 @@ A::custom_thread2 A::start_thread2() "is_abstract": false, "is_nested": false, "is_struct": true, - "is_template": false, + "is_template": true, "is_union": false, "members": [], "methods": [], diff --git a/docs/test_cases/t00051_class.svg b/docs/test_cases/t00051_class.svg index 2f16e517..b44bc4b3 100644 --- a/docs/test_cases/t00051_class.svg +++ b/docs/test_cases/t00051_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + B @@ -18,18 +18,18 @@ F,FF=F - + - + f_ : F - + - + ff_ : FF @@ -39,16 +39,16 @@ f() : void ff() : void - - + + B<(lambda at ../../tests/t00051/t00051.cc:43:18),(lambda at ../../tests/t00051/t00051.cc:43:27)> - - + + A @@ -63,8 +63,8 @@ get_function() : (lambda at ../../tests/t00051/t00051.cc:48:16) - - + + A::custom_thread1 @@ -73,8 +73,8 @@ custom_thread1<Function,Args...>(Function && f, Args &&... args) : void - - + + A::custom_thread2 diff --git a/docs/test_cases/t00052.md b/docs/test_cases/t00052.md index e4edb209..de581fb3 100644 --- a/docs/test_cases/t00052.md +++ b/docs/test_cases/t00052.md @@ -237,7 +237,7 @@ struct R { "is_abstract": false, "is_nested": false, "is_struct": false, - "is_template": false, + "is_template": true, "is_union": false, "members": [], "methods": [], @@ -260,7 +260,7 @@ struct R { "is_abstract": false, "is_nested": false, "is_struct": false, - "is_template": false, + "is_template": true, "is_union": false, "members": [], "methods": [], diff --git a/docs/test_cases/t00052_class.svg b/docs/test_cases/t00052_class.svg index 204b2406..6a28307c 100644 --- a/docs/test_cases/t00052_class.svg +++ b/docs/test_cases/t00052_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + A @@ -21,8 +21,8 @@ aa<F,Q>(F && f, Q q) : void - - + + B @@ -35,8 +35,8 @@ bb<F>(F && f, T t) : T - - + + C @@ -47,7 +47,7 @@ c<P>(P p) : T - + B @@ -55,7 +55,7 @@ int - + C @@ -63,32 +63,32 @@ int - - + + R - + - + a : A - + - + b : B<int> - + - + c : C<int> diff --git a/docs/test_cases/t00053_class.svg b/docs/test_cases/t00053_class.svg index c537b2fb..aefdf534 100644 --- a/docs/test_cases/t00053_class.svg +++ b/docs/test_cases/t00053_class.svg @@ -1,6 +1,6 @@ - + @@ -9,72 +9,72 @@ - - + + A - - + + C - - + + E - - + + F - - + + a - - + + c - - + + e - - + + f - - + + h @@ -82,8 +82,8 @@ hhh - - + + j @@ -91,56 +91,56 @@ jjj - - + + b - - + + d - - + + g - - + + B - - + + D - - + + G - - + + i diff --git a/docs/test_cases/t00054_class.svg b/docs/test_cases/t00054_class.svg index af7c3943..b98a288d 100644 --- a/docs/test_cases/t00054_class.svg +++ b/docs/test_cases/t00054_class.svg @@ -1,6 +1,6 @@ - + @@ -9,116 +9,116 @@ - + detail - + detail2 - + detail3 - + detail4 - - + + d - - + + a - - + + c - - + + e - - + + C - - + + F - - + + D - - + + E - - + + A - - + + B - - + + f - - + + G - - + + h @@ -127,8 +127,8 @@ hhh - - + + i @@ -137,8 +137,8 @@ iii - - + + j @@ -147,16 +147,16 @@ jjj - - + + b - - + + g diff --git a/docs/test_cases/t00055_class.svg b/docs/test_cases/t00055_class.svg index da51a704..8a122c4f 100644 --- a/docs/test_cases/t00055_class.svg +++ b/docs/test_cases/t00055_class.svg @@ -1,6 +1,6 @@ - + @@ -9,80 +9,80 @@ - - + + A - - + + B - - + + C - - + + D - - + + E - - + + F - - + + G - - + + H - - + + I - - + + J diff --git a/docs/test_cases/t00056_class.svg b/docs/test_cases/t00056_class.svg index ed62a8b1..64813ba3 100644 --- a/docs/test_cases/t00056_class.svg +++ b/docs/test_cases/t00056_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + «concept» @@ -20,8 +20,8 @@ - - + + «concept» @@ -33,8 +33,8 @@ sizeof (l) > sizeof (r) - - + + «concept» @@ -44,8 +44,8 @@ - - + + «concept» @@ -58,8 +58,8 @@ container.begin() container.end() - - + + «concept» @@ -71,8 +71,8 @@ typename T::value_type - - + + «concept» @@ -86,8 +86,8 @@ {std::to_string(s)} noexcept {std::to_string(s)} -> std::same_as<std::string> - - + + «concept» @@ -97,8 +97,8 @@ - - + + «concept» @@ -108,8 +108,8 @@ - - + + A @@ -117,16 +117,16 @@ max_four_bytes T - + - + a : T - - + + B @@ -134,16 +134,16 @@ T - + - + b : T - - + + C @@ -151,16 +151,16 @@ convertible_to_string T - + - + c : T - - + + D @@ -169,8 +169,8 @@ - - + + E @@ -178,30 +178,30 @@ T1,T2,T3 - + - + e1 : T1 - + - + e2 : T2 - + - + e3 : T3 - - + + F @@ -209,25 +209,25 @@ T1,T2,T3 - + - + f1 : T1 - + - + f2 : T2 - + - + f3 : T3 diff --git a/docs/test_cases/t00057_class.svg b/docs/test_cases/t00057_class.svg index da1955d8..5b7e0b78 100644 --- a/docs/test_cases/t00057_class.svg +++ b/docs/test_cases/t00057_class.svg @@ -1,6 +1,6 @@ - + @@ -9,210 +9,210 @@ - - + + t00057_A - + - + a1 : int - - + + t00057_B - + - + b1 : int - - + + t00057_C - + - + c1 : int - - + + «union» t00057_D - + - + d1 : int - + - + d2 : float - - + + t00057_E - + - + e : int - + - + coordinates : t00057_E::(anonymous_739) - + - + height : t00057_E::(anonymous_807) - - + + t00057_E::(coordinates) - + - + x : int - + - + y : int - - + + «union» t00057_E::(height) - + - + z : int - + - + t : double - - + + 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 * - - + + t00057_F - + - + f1 : int diff --git a/docs/test_cases/t00058.md b/docs/test_cases/t00058.md index d32cc43b..5ca946fb 100644 --- a/docs/test_cases/t00058.md +++ b/docs/test_cases/t00058.md @@ -229,7 +229,7 @@ struct R { "is_abstract": false, "is_nested": false, "is_struct": false, - "is_template": false, + "is_template": true, "is_union": false, "members": [], "methods": [], @@ -270,7 +270,7 @@ struct R { "is_abstract": false, "is_nested": false, "is_struct": false, - "is_template": false, + "is_template": true, "is_union": false, "members": [], "methods": [], @@ -299,7 +299,7 @@ struct R { "is_abstract": false, "is_nested": false, "is_struct": false, - "is_template": false, + "is_template": true, "is_union": false, "members": [], "methods": [], diff --git a/docs/test_cases/t00058_class.svg b/docs/test_cases/t00058_class.svg index 516dfff1..ce35d2a4 100644 --- a/docs/test_cases/t00058_class.svg +++ b/docs/test_cases/t00058_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + first_type @@ -19,8 +19,8 @@ - - + + «concept» @@ -30,8 +30,8 @@ - - + + A @@ -39,16 +39,16 @@ T,Args... - + - + a : std::vector<T> - - + + B @@ -56,22 +56,22 @@ T,P,Args... - + - + b : std::vector<T> - + - + bb : P - + A @@ -79,7 +79,7 @@ int,int,double,std::string - + A @@ -87,7 +87,7 @@ int,int - + B @@ -95,25 +95,25 @@ 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>> diff --git a/docs/test_cases/t00059.md b/docs/test_cases/t00059.md index 1cb7b46c..1cd0ea8c 100644 --- a/docs/test_cases/t00059.md +++ b/docs/test_cases/t00059.md @@ -387,7 +387,7 @@ struct R { "is_abstract": false, "is_nested": false, "is_struct": false, - "is_template": false, + "is_template": true, "is_union": false, "members": [], "methods": [], @@ -416,7 +416,7 @@ struct R { "is_abstract": false, "is_nested": false, "is_struct": false, - "is_template": false, + "is_template": true, "is_union": false, "members": [], "methods": [], diff --git a/docs/test_cases/t00059_class.svg b/docs/test_cases/t00059_class.svg index b3e50262..e7652b7a 100644 --- a/docs/test_cases/t00059_class.svg +++ b/docs/test_cases/t00059_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + «concept» @@ -23,8 +23,8 @@ T{} t.get_name() - - + + «concept» @@ -36,8 +36,8 @@ t.get_sweetness() - - + + «concept» @@ -49,8 +49,8 @@ t.get_bitterness() - - + + gala_apple @@ -61,8 +61,8 @@ get_sweetness() const : float - - + + empire_apple @@ -73,8 +73,8 @@ get_sweetness() const : float - - + + lima_orange @@ -85,8 +85,8 @@ get_bitterness() const : float - - + + valencia_orange @@ -97,8 +97,8 @@ get_bitterness() const : float - - + + fruit_factory @@ -111,7 +111,7 @@ create_orange() const : TO - + fruit_factory @@ -119,7 +119,7 @@ gala_apple,valencia_orange - + fruit_factory @@ -127,25 +127,25 @@ empire_apple,lima_orange - - + + R - + - + factory_1 : fruit_factory_1 - + - + factory_2 : fruit_factory_2 diff --git a/docs/test_cases/t00060_class.svg b/docs/test_cases/t00060_class.svg index 8b4fe7bd..c757ec61 100644 --- a/docs/test_cases/t00060_class.svg +++ b/docs/test_cases/t00060_class.svg @@ -1,6 +1,6 @@ - + @@ -9,40 +9,40 @@ - - + + A - - + + B - - + + C - - + + D - - + + G @@ -50,16 +50,16 @@ T - + - + g : T - - + + H @@ -67,18 +67,18 @@ T,P - + - + h : G<T> - + - + hh : P diff --git a/docs/test_cases/t00061_class.svg b/docs/test_cases/t00061_class.svg index 0017cc2a..3a0dfa70 100644 --- a/docs/test_cases/t00061_class.svg +++ b/docs/test_cases/t00061_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + A diff --git a/docs/test_cases/t20001_sequence.svg b/docs/test_cases/t20001_sequence.svg index bbbf0a04..1a5be1b2 100644 --- a/docs/test_cases/t20001_sequence.svg +++ b/docs/test_cases/t20001_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,59 +9,59 @@ - - - - - - - + + + + + + + - - + + tmain() - + tmain() - - + + A - + A - - + + B - + B - - - - - - - - + + + + + + + + add(int,int) - + wrap_add3(int,int,int) - + add3(int,int,int) - + @@ -72,7 +72,7 @@ - + @@ -81,14 +81,14 @@ - + log_result(int) - + Main test function diff --git a/docs/test_cases/t20002_sequence.svg b/docs/test_cases/t20002_sequence.svg index 0a308115..901e0f5a 100644 --- a/docs/test_cases/t20002_sequence.svg +++ b/docs/test_cases/t20002_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,51 +9,51 @@ - - - - + + + + - - + + m1() - + m1() - - + + m2() - + m2() - - + + m3() - + m3() - - + + m4() - + m4() - - - - - + + + + + - + - + diff --git a/docs/test_cases/t20003_sequence.svg b/docs/test_cases/t20003_sequence.svg index 6d18450d..8fe3c98a 100644 --- a/docs/test_cases/t20003_sequence.svg +++ b/docs/test_cases/t20003_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,51 +9,51 @@ - - - - + + + + - - + + m1<T>(T) - + m1<T>(T) - - + + m2<T>(T) - + m2<T>(T) - - + + m3<T>(T) - + m3<T>(T) - - + + m4<T>(T) - + m4<T>(T) - - - - - + + + + + - + - + diff --git a/docs/test_cases/t20004_sequence.svg b/docs/test_cases/t20004_sequence.svg index b94c1497..d80a8544 100644 --- a/docs/test_cases/t20004_sequence.svg +++ b/docs/test_cases/t20004_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,16 +9,16 @@ - - - - - - - - - - + + + + + + + + + + @@ -29,87 +29,87 @@ - - + + main() - + main() - - + + m1<float>(float) - + m1<float>(float) - - + + m1<unsigned long>(unsigned long) - + m1<unsigned long>(unsigned long) - - + + m4<unsigned long>(unsigned long) - + m4<unsigned long>(unsigned long) - - + + m1<std::string>(std::string) - + m1<std::string>(std::string) - - + + m2<std::string>(std::string) - + m2<std::string>(std::string) - - + + m1<int>(int) - + m1<int>(int) - - + + m2<int>(int) - + m2<int>(int) - - + + m3<int>(int) - + m3<int>(int) - - + + m4<int>(int) - + m4<int>(int) - - - - - - - - - - - + + + + + + + + + + + - + - + @@ -117,11 +117,11 @@ - + - + @@ -129,19 +129,19 @@ - + - + - + - + diff --git a/docs/test_cases/t20005_sequence.svg b/docs/test_cases/t20005_sequence.svg index 8a052999..87243f16 100644 --- a/docs/test_cases/t20005_sequence.svg +++ b/docs/test_cases/t20005_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,42 +9,42 @@ - - - + + + - - + + C<T> - + C<T> - - + + B<T> - + B<T> - - + + A<T> - + A<T> - - - + + + c(T) - + b(T) - + a(T) diff --git a/docs/test_cases/t20006_sequence.svg b/docs/test_cases/t20006_sequence.svg index 409e793f..12f5d313 100644 --- a/docs/test_cases/t20006_sequence.svg +++ b/docs/test_cases/t20006_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,22 +9,22 @@ - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + @@ -34,82 +34,82 @@ - - + + tmain() - + tmain() - - + + B<int> - + B<int> - - + + A<int> - + A<int> - - + + B<std::string> - + B<std::string> - - + + A<std::string> - + A<std::string> - - + + BB<int,int> - + BB<int,int> - - + + AA<int> - + AA<int> - - + + BB<int,std::string> - + BB<int,std::string> - - + + BB<int,float> - + BB<int,float> - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + b(int) - + a1(int) @@ -118,12 +118,12 @@ - + b(std::string) - + a2(std::string) @@ -132,59 +132,59 @@ - + 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_sequence.svg b/docs/test_cases/t20007_sequence.svg index a030c345..ec6a9cae 100644 --- a/docs/test_cases/t20007_sequence.svg +++ b/docs/test_cases/t20007_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,57 +9,57 @@ - - - - + + + + - - + + tmain() - + tmain() - - + + Adder<int,int> - + Adder<int,int> - - + + Adder<int,float,double> - + Adder<int,float,double> - - + + Adder<std::string,std::string,std::string> - + Adder<std::string,std::string,std::string> - - - - - + + + + + add(int &&,int &&) - + add(int &&,float &&,double &&) - + add(std::string &&,std::string &&,std::string &&) diff --git a/docs/test_cases/t20008_sequence.svg b/docs/test_cases/t20008_sequence.svg index f9a944fe..9368a53d 100644 --- a/docs/test_cases/t20008_sequence.svg +++ b/docs/test_cases/t20008_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,13 +9,13 @@ - - - - - - - + + + + + + + @@ -23,81 +23,81 @@ - - + + tmain() - + tmain() - - + + B<int> - + B<int> - - + + A<int> - + A<int> - - + + B<const char *> - + B<const char *> - - + + A<const char *> - + A<const char *> - - + + B<std::string> - + B<std::string> - - + + A<std::string> - + A<std::string> - - - - - - - - + + + + + + + + b(int) - + a1(int) - + b(const char *) - + a2(const char *) - + b(std::string) - + a3(std::string) diff --git a/docs/test_cases/t20009_sequence.svg b/docs/test_cases/t20009_sequence.svg index 2d25acb4..0362d0e4 100644 --- a/docs/test_cases/t20009_sequence.svg +++ b/docs/test_cases/t20009_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,13 +9,13 @@ - - - - - - - + + + + + + + @@ -23,81 +23,81 @@ - - + + tmain() - + tmain() - - + + B<std::string> - + B<std::string> - - + + A<std::string> - + A<std::string> - - + + B<int> - + B<int> - - + + A<int> - + A<int> - - + + B<float> - + B<float> - - + + A<float> - + A<float> - - - - - - - - + + + + + + + + b(std::string) - + a(std::string) - + b(int) - + a(int) - + b(float) - + a(float) diff --git a/docs/test_cases/t20010_sequence.svg b/docs/test_cases/t20010_sequence.svg index d380f023..dc71f7f3 100644 --- a/docs/test_cases/t20010_sequence.svg +++ b/docs/test_cases/t20010_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,81 +9,81 @@ - - - - - - - - - + + + + + + + + + - - + + tmain() - + tmain() - - + + B<int> - + B<int> - - + + A - + A - - - - - - - - - - + + + + + + + + + + b1() - + a1() - + b2() - + a2() - + b3() - + a3() - + b4() - + a4() diff --git a/docs/test_cases/t20011_sequence.svg b/docs/test_cases/t20011_sequence.svg index 1b9e00fc..5ce0673c 100644 --- a/docs/test_cases/t20011_sequence.svg +++ b/docs/test_cases/t20011_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,42 +9,42 @@ - - - - - - - - - - - - + + + + + + + + + + + + - - + + tmain() - + tmain() - - + + A - + A - - - - - - - - - - + + + + + + + + + + a(int) @@ -52,26 +52,26 @@ alt - + a(int) - + b(int) - + c(int) - + @@ -81,14 +81,14 @@ alt - + b(int) - + @@ -98,7 +98,7 @@ alt - + diff --git a/docs/test_cases/t20012_sequence.svg b/docs/test_cases/t20012_sequence.svg index bcc578e8..00299f87 100644 --- a/docs/test_cases/t20012_sequence.svg +++ b/docs/test_cases/t20012_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,31 +9,31 @@ - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + @@ -43,122 +43,122 @@ - - + + tmain() - + tmain() - - + + tmain()::(lambda ../../tests/t20012/t20012.cc:66:20) - + tmain()::(lambda ../../tests/t20012/t20012.cc:66:20) - - + + A - + A - - + + B - + B - - + + tmain()::(lambda ../../tests/t20012/t20012.cc:79:20) - + tmain()::(lambda ../../tests/t20012/t20012.cc:79:20) - - + + C - + C - - + + R<R::(lambda ../../tests/t20012/t20012.cc:85:9)> - + R<R::(lambda ../../tests/t20012/t20012.cc:85:9)> - - + + tmain()::(lambda ../../tests/t20012/t20012.cc:85:9) - + tmain()::(lambda ../../tests/t20012/t20012.cc:85:9) - - + + D - + D - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + operator()() - + a() - + aa() - + aaa() - + b() - + bb() - + @@ -167,67 +167,67 @@ - + operator()() - + c() - + cc() - + ccc() - + operator()() - + a() - + aa() - + aaa() - + b() - + bb() - + @@ -238,29 +238,29 @@ - + r() - + operator()() - + c() - + cc() - + @@ -269,7 +269,7 @@ - + add5(int) diff --git a/docs/test_cases/t20013_sequence.svg b/docs/test_cases/t20013_sequence.svg index a81dcb72..4709df79 100644 --- a/docs/test_cases/t20013_sequence.svg +++ b/docs/test_cases/t20013_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,47 +9,47 @@ - - - - - - - + + + + + + + - - + + tmain(int,char **) - + tmain(int,char **) - - + + B - + B - - + + A - + A - - - - - - - - + + + + + + + + b(int) - + a1(int) @@ -58,12 +58,12 @@ - + b(double) - + a2(double) @@ -72,12 +72,12 @@ - + b(const char *) - + a3(const char *) diff --git a/docs/test_cases/t20014_sequence.svg b/docs/test_cases/t20014_sequence.svg index 39c15fb6..6ef10201 100644 --- a/docs/test_cases/t20014_sequence.svg +++ b/docs/test_cases/t20014_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,56 +9,56 @@ - - - - - - - - + + + + + + + + - - + + tmain() - + tmain() - - + + B - + B - - + + A - + A - - + + C<B,int> - + C<B,int> - - - - - - - - - + + + + + + + + + b1(int,int) - + a1(int,int) @@ -67,12 +67,12 @@ - + b2(int,int) - + a2(int,int) @@ -81,17 +81,17 @@ - + c1(int,int) - + b1(int,int) - + a1(int,int) diff --git a/docs/test_cases/t20015_sequence.svg b/docs/test_cases/t20015_sequence.svg index 9b3c0ad0..9fbd01f4 100644 --- a/docs/test_cases/t20015_sequence.svg +++ b/docs/test_cases/t20015_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,25 +9,25 @@ - - + + - - + + tmain() - + tmain() - - + + B - + B - - - + + + setup_a(std::shared_ptr<detail::A> &) diff --git a/docs/test_cases/t20016_sequence.svg b/docs/test_cases/t20016_sequence.svg index 14cf297f..3664e13b 100644 --- a/docs/test_cases/t20016_sequence.svg +++ b/docs/test_cases/t20016_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,53 +9,53 @@ - - - - - + + + + + - - + + tmain() - + tmain() - - + + B<long> - + B<long> - - + + A - + A - - - - - - + + + + + + b1(long) - + a1(int) - + b2(long) - + a2(const long &) diff --git a/docs/test_cases/t20017_sequence.svg b/docs/test_cases/t20017_sequence.svg index 45cebe8e..e42b0cb3 100644 --- a/docs/test_cases/t20017_sequence.svg +++ b/docs/test_cases/t20017_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,65 +9,65 @@ - - - - - - + + + + + + - + t20017.cc - + t20017.cc - + include/t20017_a.h - + include/t20017_a.h - + include/t20017_b.h - + include/t20017_b.h - - - - - - + + + + + + tmain() - + a3(int,int) - + b1(int,int) - + a2(int,int) - + a1(int,int) - + b2<int>(int,int) diff --git a/docs/test_cases/t20018_sequence.svg b/docs/test_cases/t20018_sequence.svg index 394d2eea..58ec45fa 100644 --- a/docs/test_cases/t20018_sequence.svg +++ b/docs/test_cases/t20018_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,14 +9,14 @@ - - - - - - - - + + + + + + + + @@ -25,93 +25,93 @@ - - + + tmain() - + tmain() - - + + Answer<Factorial<5>,120> - + Answer<Factorial<5>,120> - - + + Factorial<5> - + Factorial<5> - - + + Factorial<4> - + Factorial<4> - - + + Factorial<3> - + Factorial<3> - - + + Factorial<2> - + Factorial<2> - - + + Factorial<1> - + Factorial<1> - - + + Factorial<0> - + Factorial<0> - - - - - - - - - + + + + + + + + + print() - + print(int) - + print(int) - + print(int) - + print(int) - + print(int) - + print(int) diff --git a/docs/test_cases/t20019_sequence.svg b/docs/test_cases/t20019_sequence.svg index 73ee0447..59645e6d 100644 --- a/docs/test_cases/t20019_sequence.svg +++ b/docs/test_cases/t20019_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,95 +9,95 @@ - - - - - - - - - + + + + + + + + + - - + + tmain() - + tmain() - - + + Base<D1> - + Base<D1> - - + + D1 - + D1 - - + + Base<D2> - + Base<D2> - - + + D2 - + D2 - - - - - - - - - - + + + + + + + + + + name() - + impl() - + name() - + impl() - + name() - + impl() - + name() - + impl() diff --git a/docs/test_cases/t20020_sequence.svg b/docs/test_cases/t20020_sequence.svg index bc003fe2..b07184d4 100644 --- a/docs/test_cases/t20020_sequence.svg +++ b/docs/test_cases/t20020_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,78 +9,78 @@ - - - - - - - - - - - - - - + + + + + + + + + + + + + + - + - - - + + + - - + + tmain() - + tmain() - - + + A - + A - - + + C - + C - - + + B - + B - - + + D<int> - + D<int> - - - - - - - - - - - - - + + + + + + + + + + + + + alt - + a1() @@ -91,7 +91,7 @@ alt - + [ @@ -100,7 +100,7 @@ - + [ @@ -109,7 +109,7 @@ - + b1() @@ -117,7 +117,7 @@ - + [ @@ -126,21 +126,21 @@ - + b2() - + a4() - + log() @@ -148,7 +148,7 @@ alt - + c1() @@ -156,7 +156,7 @@ alt - + @@ -169,7 +169,7 @@ - + @@ -179,7 +179,7 @@ alt - + d1(int,int) diff --git a/docs/test_cases/t20021_sequence.svg b/docs/test_cases/t20021_sequence.svg index dd98437f..a70df7f3 100644 --- a/docs/test_cases/t20021_sequence.svg +++ b/docs/test_cases/t20021_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,74 +9,74 @@ - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - - + + tmain() - + tmain() - - + + C - + C - - + + A - + A - - + + B - + B - - - - - - - - - - - - + + + + + + + + + + + + loop - + [ c4() ] - + @@ -89,7 +89,7 @@ - + a3() @@ -102,7 +102,7 @@ loop - + [ @@ -111,7 +111,7 @@ - + [ @@ -120,7 +120,7 @@ - + [ @@ -129,14 +129,14 @@ - + a1() - + [ @@ -148,7 +148,7 @@ loop - + b2() @@ -158,7 +158,7 @@ loop - + [ @@ -167,7 +167,7 @@ - + b2() diff --git a/docs/test_cases/t20022_sequence.svg b/docs/test_cases/t20022_sequence.svg index ae17bddd..0cbdf8e8 100644 --- a/docs/test_cases/t20022_sequence.svg +++ b/docs/test_cases/t20022_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,39 +9,39 @@ - - - + + + - - + + tmain() - + tmain() - - + + A - + A - - + + B - + B - - - - + + + + a() - + b() diff --git a/docs/test_cases/t20023_sequence.svg b/docs/test_cases/t20023_sequence.svg index 1782fdcd..417b0603 100644 --- a/docs/test_cases/t20023_sequence.svg +++ b/docs/test_cases/t20023_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,37 +9,37 @@ - - - - - - - + + + + + + + - - + + tmain() - + tmain() - - + + A - + A - - - - - - - + + + + + + + a() @@ -47,7 +47,7 @@ try - + @@ -60,7 +60,7 @@ [std::runtime_error &] - + @@ -73,7 +73,7 @@ [std::logic_error &] - + @@ -86,7 +86,7 @@ [...] - + diff --git a/docs/test_cases/t20024_sequence.svg b/docs/test_cases/t20024_sequence.svg index 65d5d88b..28478901 100644 --- a/docs/test_cases/t20024_sequence.svg +++ b/docs/test_cases/t20024_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,23 +9,23 @@ - - - - - - - - - - - - + + + + + + + + + + + + - + @@ -33,36 +33,36 @@ - - + + tmain() - + tmain() - - + + A - + A - - + + B - + B - - - - - - - - - - - - + + + + + + + + + + + + select(enum_a) @@ -72,7 +72,7 @@ switch [zero] - + @@ -85,7 +85,7 @@ [one] - + @@ -98,7 +98,7 @@ [two] - + @@ -111,7 +111,7 @@ [default] - + @@ -124,7 +124,7 @@ - + select(colors) @@ -134,7 +134,7 @@ switch [enum colors::red] - + @@ -143,7 +143,7 @@ [enum colors::orange] - + @@ -152,7 +152,7 @@ [enum colors::green] - + @@ -161,7 +161,7 @@ [default] - + diff --git a/docs/test_cases/t20025_sequence.svg b/docs/test_cases/t20025_sequence.svg index 0a7640b3..31f8972a 100644 --- a/docs/test_cases/t20025_sequence.svg +++ b/docs/test_cases/t20025_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,41 +9,41 @@ - - - - + + + + - - + + tmain() - + tmain() - - + + A - + A - - + + add(int,int) - + add(int,int) - - - - - + + + + + a() - + @@ -52,7 +52,7 @@ - + diff --git a/docs/test_cases/t20026_sequence.svg b/docs/test_cases/t20026_sequence.svg index 59772743..9345b5f7 100644 --- a/docs/test_cases/t20026_sequence.svg +++ b/docs/test_cases/t20026_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,25 +9,25 @@ - - + + - - + + tmain() - + tmain() - - + + A - + A - - - + + + a() diff --git a/docs/test_cases/t20027_sequence.svg b/docs/test_cases/t20027_sequence.svg index 3addc76a..50e40de1 100644 --- a/docs/test_cases/t20027_sequence.svg +++ b/docs/test_cases/t20027_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,25 +9,25 @@ - - + + - - + + tmain() - + tmain() - - + + A - + A - - - + + + a() diff --git a/docs/test_cases/t20028_sequence.svg b/docs/test_cases/t20028_sequence.svg index 3eb0efe4..ef0b34b1 100644 --- a/docs/test_cases/t20028_sequence.svg +++ b/docs/test_cases/t20028_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,50 +9,50 @@ - - - - - - + + + + + + - - + + tmain() - + tmain() - - + + A - + A - - - - - + + + + + alt - + a() - + b() - + c() @@ -60,7 +60,7 @@ - + d() diff --git a/docs/test_cases/t20029_sequence.svg b/docs/test_cases/t20029_sequence.svg index d470f5d1..896c77d3 100644 --- a/docs/test_cases/t20029_sequence.svg +++ b/docs/test_cases/t20029_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,60 +9,60 @@ - - - - - - - - - - - + + + + + + + + + + + - - + + tmain() - + tmain() - - + + Encoder<Retrier<ConnectionPool>> - + Encoder<Retrier<ConnectionPool>> - - + + Retrier<ConnectionPool> - + Retrier<ConnectionPool> - - + + ConnectionPool - + ConnectionPool - - + + encode_b64(std::string &&) - + encode_b64(std::string &&) - - - - - - - - + + + + + + + + connect() @@ -73,21 +73,21 @@ alt - + [ send(std::string &&) ] - + encode(std::string &&) - + @@ -97,7 +97,7 @@ - + send(std::string &&) @@ -108,7 +108,7 @@ alt - + [ diff --git a/docs/test_cases/t30001_package.svg b/docs/test_cases/t30001_package.svg index 6bfb3bd7..8b91fe64 100644 --- a/docs/test_cases/t30001_package.svg +++ b/docs/test_cases/t30001_package.svg @@ -1,6 +1,6 @@ - + @@ -9,67 +9,67 @@ - - + + A - - + + AA - - + + B - - + + AA - - + + AAA - - + + BBB - - + + BB - - + + AAA - - + + BBB - - + + BB - + A AAA note... - + This is namespace AA in namespace A - + This is namespace AA in namespace B - - - + + + diff --git a/docs/test_cases/t30002_package.svg b/docs/test_cases/t30002_package.svg index 29268b67..d955847b 100644 --- a/docs/test_cases/t30002_package.svg +++ b/docs/test_cases/t30002_package.svg @@ -1,6 +1,6 @@ - + @@ -9,113 +9,113 @@ - - + + A - - + + AA - - + + B - - + + BB - - + + A1 - - + + A2 - - + + A3 - - + + A4 - - + + A5 - - + + A6 - - + + A7 - - + + A8 - - + + A9 - - + + A10 - - + + A11 - - + + A12 - - + + A13 - - + + A14 - - + + A15 - - + + A16 - - + + A17 - - + + BBB diff --git a/docs/test_cases/t30003_package.svg b/docs/test_cases/t30003_package.svg index b6f2cf52..1d592707 100644 --- a/docs/test_cases/t30003_package.svg +++ b/docs/test_cases/t30003_package.svg @@ -1,6 +1,6 @@ - + @@ -9,35 +9,35 @@ - - + + ns1 - - + + ns3 «deprecated» - - + + ns1 - - + + ns2_v1_0_0 - - + + ns2_v0_9_0 «deprecated» - - + + ns2 diff --git a/docs/test_cases/t30004_package.svg b/docs/test_cases/t30004_package.svg index 43facc26..d2295176 100644 --- a/docs/test_cases/t30004_package.svg +++ b/docs/test_cases/t30004_package.svg @@ -1,6 +1,6 @@ - + @@ -9,46 +9,46 @@ - - + + A - + Package AAA. - + Package BBB. - + CCCC package note. - + We skipped DDD. - - + + AAA - - + + BBB - - + + CCC - - + + EEE - - - - + + + + diff --git a/docs/test_cases/t30005_package.svg b/docs/test_cases/t30005_package.svg index ad29bcab..53227a17 100644 --- a/docs/test_cases/t30005_package.svg +++ b/docs/test_cases/t30005_package.svg @@ -1,6 +1,6 @@ - + @@ -9,48 +9,48 @@ - - + + A - - + + AA - - + + B - - + + BB - - + + C - - + + CC - - + + AAA - - + + BBB - - + + CCC diff --git a/docs/test_cases/t30006_package.svg b/docs/test_cases/t30006_package.svg index 7367d33a..42c4b849 100644 --- a/docs/test_cases/t30006_package.svg +++ b/docs/test_cases/t30006_package.svg @@ -1,6 +1,6 @@ - + @@ -9,25 +9,25 @@ - - + + B - - + + A - - + + C - + Top A note. - + diff --git a/docs/test_cases/t30007_package.svg b/docs/test_cases/t30007_package.svg index b51228a5..84f96d68 100644 --- a/docs/test_cases/t30007_package.svg +++ b/docs/test_cases/t30007_package.svg @@ -1,6 +1,6 @@ - + @@ -9,30 +9,30 @@ - - + + A - - + + B - - + + AA - - + + C - + Compare layout with t30006. - + diff --git a/docs/test_cases/t30008_package.svg b/docs/test_cases/t30008_package.svg index 53e49ebc..3ce3fcc8 100644 --- a/docs/test_cases/t30008_package.svg +++ b/docs/test_cases/t30008_package.svg @@ -1,6 +1,6 @@ - + @@ -9,43 +9,43 @@ - - + + dependants - - + + dependencies - - + + A - - + + B - - + + C - - + + D - - + + E - - + + F diff --git a/docs/test_cases/t30009_package.svg b/docs/test_cases/t30009_package.svg index 63b4b6f0..0104221f 100644 --- a/docs/test_cases/t30009_package.svg +++ b/docs/test_cases/t30009_package.svg @@ -1,6 +1,6 @@ - + @@ -9,53 +9,53 @@ - - + + One - - + + Two - - + + B - - + + D - - + + A - - + + C - - + + A - - + + B - - + + C - - + + D diff --git a/docs/test_cases/t40001_include.svg b/docs/test_cases/t40001_include.svg index 21b0f96a..ec24376f 100644 --- a/docs/test_cases/t40001_include.svg +++ b/docs/test_cases/t40001_include.svg @@ -1,6 +1,6 @@ - + @@ -9,43 +9,43 @@ - + 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 @@ -60,7 +60,7 @@ - - + + diff --git a/docs/test_cases/t40002_include.svg b/docs/test_cases/t40002_include.svg index 446fc45c..6adcd588 100644 --- a/docs/test_cases/t40002_include.svg +++ b/docs/test_cases/t40002_include.svg @@ -1,6 +1,6 @@ - + @@ -9,46 +9,46 @@ - + src - + lib1 - + lib2 - + include - + lib1 - + lib2 - - + + t40002.cc - - + + lib1.cc - - + + lib2.cc - - + + lib1.h - - + + lib2.h diff --git a/docs/test_cases/t40003_include.svg b/docs/test_cases/t40003_include.svg index 6c3d11d3..b332d4cb 100644 --- a/docs/test_cases/t40003_include.svg +++ b/docs/test_cases/t40003_include.svg @@ -1,6 +1,6 @@ - + @@ -9,66 +9,66 @@ - + 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/src/class_diagram/generators/json/class_diagram_generator.cc b/src/class_diagram/generators/json/class_diagram_generator.cc index 86403cd6..a15c88b8 100644 --- a/src/class_diagram/generators/json/class_diagram_generator.cc +++ b/src/class_diagram/generators/json/class_diagram_generator.cc @@ -86,7 +86,7 @@ void to_json(nlohmann::json &j, const class_ &c) j["methods"] = c.methods(); j["bases"] = c.parents(); - j["template_parameters"] = c.templates(); + j["template_parameters"] = c.template_params(); } void to_json(nlohmann::json &j, const enum_ &c) diff --git a/src/class_diagram/generators/plantuml/class_diagram_generator.cc b/src/class_diagram/generators/plantuml/class_diagram_generator.cc index 17e2e296..76917f83 100644 --- a/src/class_diagram/generators/plantuml/class_diagram_generator.cc +++ b/src/class_diagram/generators/plantuml/class_diagram_generator.cc @@ -166,7 +166,7 @@ void generator::generate(const class_ &c, std::ostream &ostr) const ostr << plantuml_common::to_plantuml(m.access()) << m.name(); - if (!m.templates().empty()) { + if (!m.template_params().empty()) { m.render_template_params(ostr, m_config.using_namespace(), false); } diff --git a/src/class_diagram/model/class.cc b/src/class_diagram/model/class.cc index 09eb7a66..bc516aa6 100644 --- a/src/class_diagram/model/class.cc +++ b/src/class_diagram/model/class.cc @@ -37,16 +37,6 @@ bool class_::is_template() const { return is_template_; } void class_::is_template(bool is_template) { is_template_ = is_template; } -bool class_::is_template_instantiation() const -{ - return is_template_instantiation_; -} - -void class_::is_template_instantiation(bool is_template_instantiation) -{ - is_template_instantiation_ = is_template_instantiation; -} - void class_::add_member(class_member &&member) { members_.emplace_back(std::move(member)); @@ -84,7 +74,7 @@ std::string class_::full_name_no_ns() const ostr << name(); - render_template_params(ostr, using_namespace(), false); + render_template_params(ostr, using_namespace(), true); return ostr.str(); } @@ -121,35 +111,14 @@ bool class_::is_abstract() const [](const auto &method) { return method.is_pure_virtual(); }); } -int class_::calculate_template_specialization_match( - const class_ &other, const std::string &full_name) const +int class_::calculate_template_specialization_match(const class_ &other) const { - int res{}; + int res{0}; - const std::string left = name_and_ns(); - // TODO: handle variadic templates - if ((name_and_ns() != full_name) || - (templates().size() != other.templates().size())) { + if (name_and_ns() != other.name_and_ns()) { return res; } - // Iterate over all template arguments - for (auto i = 0U; i < other.templates().size(); i++) { - const auto &template_arg = templates().at(i); - const auto &other_template_arg = other.templates().at(i); - - if (template_arg == other_template_arg) { - res++; - } - else if (other_template_arg.is_specialization_of(template_arg)) { - continue; - } - else { - res = 0; - break; - } - } - - return res; + return template_trait::calculate_template_specialization_match(other); } } // namespace clanguml::class_diagram::model diff --git a/src/class_diagram/model/class.h b/src/class_diagram/model/class.h index 97b55e19..143b0645 100644 --- a/src/class_diagram/model/class.h +++ b/src/class_diagram/model/class.h @@ -51,12 +51,6 @@ public: bool is_template() const; void is_template(bool is_template); - bool is_template_instantiation() const; - void is_template_instantiation(bool is_template_instantiation); - - bool is_alias() const { return is_alias_; } - void is_alias(bool alias) { is_alias_ = alias; } - bool is_union() const { return is_union_; } void is_union(bool u) { is_union_ = u; } @@ -68,9 +62,6 @@ public: const std::vector &methods() const; const std::vector &parents() const; - void set_base_template(const std::string &full_name); - std::string base_template() const; - friend bool operator==(const class_ &l, const class_ &r); std::string full_name(bool relative = true) const override; @@ -79,18 +70,11 @@ public: bool is_abstract() const; - void find_relationships( - std::vector> - &nested_relationships); - - int calculate_template_specialization_match( - const class_ &other, const std::string &full_name) const; + int calculate_template_specialization_match(const class_ &other) const; private: bool is_struct_{false}; bool is_template_{false}; - bool is_template_instantiation_{false}; - bool is_alias_{false}; bool is_union_{false}; std::vector members_; std::vector methods_; diff --git a/src/class_diagram/model/class_member.cc b/src/class_diagram/model/class_member.cc index 4bf7a4c6..10b384c8 100644 --- a/src/class_diagram/model/class_member.cc +++ b/src/class_diagram/model/class_member.cc @@ -26,13 +26,6 @@ class_member::class_member(common::model::access_t access, { } -bool class_member::is_relationship() const { return is_relationship_; } - -void class_member::is_relationship(bool is_relationship) -{ - is_relationship_ = is_relationship; -} - bool class_member::is_static() const { return is_static_; } void class_member::is_static(bool is_static) { is_static_ = is_static; } diff --git a/src/class_diagram/model/class_member.h b/src/class_diagram/model/class_member.h index 4a0a80cb..74cf1227 100644 --- a/src/class_diagram/model/class_member.h +++ b/src/class_diagram/model/class_member.h @@ -30,9 +30,6 @@ public: ~class_member() override = default; - bool is_relationship() const; - void is_relationship(bool is_relationship); - bool is_static() const; void is_static(bool is_static); diff --git a/src/class_diagram/visitor/translation_unit_visitor.cc b/src/class_diagram/visitor/translation_unit_visitor.cc index 7a583572..836ea600 100644 --- a/src/class_diagram/visitor/translation_unit_visitor.cc +++ b/src/class_diagram/visitor/translation_unit_visitor.cc @@ -250,7 +250,7 @@ bool translation_unit_visitor::VisitTypeAliasTemplateDecl( return true; auto template_specialization_ptr = - build_template_instantiation(*template_type_specialization_ptr); + build_template_instantiation(cls, *template_type_specialization_ptr); if (!template_specialization_ptr) return true; @@ -630,8 +630,8 @@ void translation_unit_visitor::process_concept_specialization_relationships( std::vector constrained_template_params; size_t argument_index{}; - for (const auto ta : concept_specialization->getTemplateArguments()) { + for (const auto ta : concept_specialization->getTemplateArguments()) { if (ta.getKind() == clang::TemplateArgument::Type) { auto type_name = common::to_string(ta.getAsType(), cpt->getASTContext()); @@ -1092,7 +1092,7 @@ void translation_unit_visitor::process_class_bases( base.getType()->getAs(); tsp != nullptr) { auto template_specialization_ptr = - build_template_instantiation(*tsp, {}); + build_template_instantiation(cls, *tsp, {}); if (template_specialization_ptr) { cp.set_id(template_specialization_ptr->id()); } @@ -1350,7 +1350,7 @@ void translation_unit_visitor::process_method( } else if (const auto *atsp = underlying_type->getAs(); atsp != nullptr) { - process_function_parameter_find_relatinoships_in_autotype(c, atsp); + process_function_parameter_find_relationships_in_autotype(c, atsp); } LOG_DBG("Adding method: {}", method.name()); @@ -1359,7 +1359,7 @@ void translation_unit_visitor::process_method( } void translation_unit_visitor:: - process_function_parameter_find_relatinoships_in_autotype( + process_function_parameter_find_relationships_in_autotype( class_ &c, const clang::AutoType *atsp) { auto desugared_atsp = atsp->getDeducedType(); @@ -1665,8 +1665,9 @@ void translation_unit_visitor:: template_instantiation_type.getTemplateName().getAsTemplateDecl())) return; - auto template_specialization_ptr = - build_template_instantiation(template_instantiation_type, &c); + auto template_specialization_ptr = build_template_instantiation( + template_instantiation_type.getTemplateName().getAsTemplateDecl(), + template_instantiation_type, &c); if (template_instantiation_type.isDependentType()) { if (template_specialization_ptr) { @@ -1762,6 +1763,7 @@ translation_unit_visitor::process_template_specialization( { auto c_ptr{std::make_unique(config_.using_namespace())}; auto &template_instantiation = *c_ptr; + template_instantiation.is_template(true); // TODO: refactor to method get_qualified_name() auto qualified_name = cls->getQualifiedNameAsString(); @@ -1816,9 +1818,59 @@ void translation_unit_visitor::process_template_specialization_argument( // If this is a nested template type - add nested templates as // template arguments - if (const auto *nested_template_type = - arg.getAsType()->getAs(); - nested_template_type != nullptr) { + if (const auto *function_type = + arg.getAsType()->getAs(); + function_type != nullptr) { + + auto a = template_parameter::make_template_type({}); + + a.set_function_template(true); + + // Set function template return type + const auto return_type_name = + function_type->getReturnType().getAsString(); + + // Try to match the return type to template parameter in case + // the type name is in the form 'type-parameter-X-Y' + auto maybe_return_arg = + get_template_argument_from_type_parameter_string( + cls, return_type_name); + + if (maybe_return_arg) + a.add_template_param(*maybe_return_arg); + else { + a.add_template_param( + template_parameter::make_argument(return_type_name)); + } + + // Set function template argument types + for (const auto ¶m_type : function_type->param_types()) { + auto maybe_arg = + get_template_argument_from_type_parameter_string( + cls, param_type.getAsString()); + + if (maybe_arg) { + a.add_template_param(*maybe_arg); + continue; + } + + if (param_type->isBuiltinType()) { + a.add_template_param(template_parameter::make_argument( + param_type.getAsString())); + continue; + } + + const auto *param_record_type = + param_type->getAs(); + if (param_record_type == nullptr) + continue; + } + argument = a; + } + else if (const auto *nested_template_type = + arg.getAsType() + ->getAs(); + nested_template_type != nullptr) { argument = template_parameter::make_argument({}); const auto nested_template_name = @@ -1829,11 +1881,12 @@ void translation_unit_visitor::process_template_specialization_argument( argument->set_type(nested_template_name); auto nested_template_instantiation = build_template_instantiation( - *nested_template_type, {&template_instantiation}); + cls, *nested_template_type, {&template_instantiation}); argument->set_id(nested_template_instantiation->id()); - for (const auto &t : nested_template_instantiation->templates()) + for (const auto &t : + nested_template_instantiation->template_params()) argument->add_template_param(t); } else if (arg.getAsType()->getAs() != @@ -2054,7 +2107,7 @@ std::unique_ptr translation_unit_visitor:: std::hash{}(full_template_specialization_name) >> 4U)); build_template_instantiation_process_template_arguments(parent, - template_base_params, + &template_specialization, template_base_params, template_specialization.getTemplateArgs().asArray(), template_instantiation, full_template_specialization_name, template_decl); @@ -2067,18 +2120,19 @@ std::unique_ptr translation_unit_visitor:: int best_match{}; common::model::diagram_element::id_t best_match_id{0}; - for (const auto c : diagram().classes()) { - if (c.get() == template_instantiation) + for (const auto templ : diagram().classes()) { + if (templ.get() == template_instantiation) continue; - auto c_full_name = c.get().full_name(false); - auto match = c.get().calculate_template_specialization_match( - template_instantiation, template_instantiation.name_and_ns()); + auto c_full_name = templ.get().full_name(false); + auto match = + template_instantiation.calculate_template_specialization_match( + templ.get()); if (match > best_match) { best_match = match; best_match_full_name = c_full_name; - best_match_id = c.get().id(); + best_match_id = templ.get().id(); } } @@ -2106,6 +2160,7 @@ std::unique_ptr translation_unit_visitor:: } std::unique_ptr translation_unit_visitor::build_template_instantiation( + const clang::Decl *cls, const clang::TemplateSpecializationType &template_type_decl, std::optional parent) { @@ -2136,7 +2191,10 @@ std::unique_ptr translation_unit_visitor::build_template_instantiation( // auto template_instantiation_ptr = std::make_unique(config_.using_namespace()); + auto &template_instantiation = *template_instantiation_ptr; + template_instantiation.is_template(true); + std::string full_template_specialization_name = common::to_string( template_type.desugar(), template_type.getTemplateName().getAsTemplateDecl()->getASTContext()); @@ -2240,7 +2298,7 @@ std::unique_ptr translation_unit_visitor::build_template_instantiation( base_index++; } - build_template_instantiation_process_template_arguments(parent, + build_template_instantiation_process_template_arguments(parent, cls, template_base_params, template_type.template_arguments(), template_instantiation, full_template_specialization_name, template_decl); @@ -2253,18 +2311,19 @@ std::unique_ptr translation_unit_visitor::build_template_instantiation( int best_match{}; common::model::diagram_element::id_t best_match_id{0}; - for (const auto c : diagram().classes()) { - if (c.get() == template_instantiation) + for (const auto templ : diagram().classes()) { + if (templ.get() == template_instantiation) continue; - auto c_full_name = c.get().full_name(false); - auto match = c.get().calculate_template_specialization_match( - template_instantiation, template_instantiation.name_and_ns()); + auto c_full_name = templ.get().full_name(false); + auto match = + template_instantiation.calculate_template_specialization_match( + templ.get()); if (match > best_match) { best_match = match; best_match_full_name = c_full_name; - best_match_id = c.get().id(); + best_match_id = templ.get().id(); } } @@ -2302,6 +2361,7 @@ std::unique_ptr translation_unit_visitor::build_template_instantiation( void translation_unit_visitor:: build_template_instantiation_process_template_arguments( std::optional &parent, + const clang::Decl *cls, std::deque> &template_base_params, const clang::ArrayRef &template_args, class_ &template_instantiation, @@ -2318,8 +2378,8 @@ void translation_unit_visitor:: } else if (argument_kind == clang::TemplateArgument::Type) { argument = build_template_instantiation_process_type_argument( - parent, full_template_specialization_name, template_decl, arg, - template_instantiation); + parent, cls, full_template_specialization_name, template_decl, + arg, template_instantiation); } else if (argument_kind == clang::TemplateArgument::Integral) { argument = @@ -2374,6 +2434,7 @@ template_parameter translation_unit_visitor:: template_parameter translation_unit_visitor::build_template_instantiation_process_type_argument( std::optional &parent, + const clang::Decl *cls, const std::string &full_template_specialization_name, const clang::TemplateDecl *template_decl, const clang::TemplateArgument &arg, class_ &template_instantiation) @@ -2382,13 +2443,45 @@ translation_unit_visitor::build_template_instantiation_process_type_argument( auto argument = template_parameter::make_argument({}); - // If this is a nested template type - add nested templates as - // template arguments if (const auto *function_type = arg.getAsType()->getAs(); function_type != nullptr) { + argument.set_function_template(true); + + // Set function template return type + const auto return_type_name = + function_type->getReturnType().getAsString(); + + // Try to match the return type to template parameter in case + // the type name is in the form 'type-parameter-X-Y' + auto maybe_return_arg = + get_template_argument_from_type_parameter_string( + cls, return_type_name); + + if (maybe_return_arg) + argument.add_template_param(*maybe_return_arg); + else { + argument.add_template_param( + template_parameter::make_argument(return_type_name)); + } + + // Set function template argument types for (const auto ¶m_type : function_type->param_types()) { + auto maybe_arg = get_template_argument_from_type_parameter_string( + cls, param_type.getAsString()); + + if (maybe_arg) { + argument.add_template_param(*maybe_arg); + continue; + } + + if (param_type->isBuiltinType()) { + argument.add_template_param(template_parameter::make_argument( + param_type.getAsString())); + continue; + } + const auto *param_record_type = param_type->getAs(); if (param_record_type == nullptr) @@ -2428,6 +2521,14 @@ translation_unit_visitor::build_template_instantiation_process_type_argument( } } } + else if (const auto maybe_arg = + get_template_argument_from_type_parameter_string( + cls, arg.getAsType().getAsString()); + maybe_arg) { + // The type is only in the form 'type-parameter-X-Y' so we have + // to match it to a template parameter name in the 'cls' template + argument = *maybe_arg; + } else if (const auto *nested_template_type = arg.getAsType()->getAs(); nested_template_type != nullptr) { @@ -2439,14 +2540,14 @@ translation_unit_visitor::build_template_instantiation_process_type_argument( argument.set_type(nested_type_name); auto nested_template_instantiation = - build_template_instantiation(*nested_template_type, + build_template_instantiation(cls, *nested_template_type, diagram().should_include(full_template_specialization_name) ? std::make_optional(&template_instantiation) : parent); argument.set_id(nested_template_instantiation->id()); - for (const auto &t : nested_template_instantiation->templates()) + for (const auto &t : nested_template_instantiation->template_params()) argument.add_template_param(t); // Check if this template should be simplified (e.g. system @@ -2492,6 +2593,41 @@ translation_unit_visitor::build_template_instantiation_process_type_argument( return argument; } +std::optional +translation_unit_visitor::get_template_argument_from_type_parameter_string( + const clang::Decl *decl, const std::string &return_type_name) const +{ + if (const auto *template_decl = + llvm::dyn_cast(decl); + template_decl != nullptr && + return_type_name.find("type-parameter-") == 0) { + + [[maybe_unused]] const auto [depth, index] = + common::extract_template_parameter_index(return_type_name); + + std::string param_name = return_type_name; + + for (auto i = 0U; + i < template_decl->getDescribedTemplateParams()->size(); i++) { + const auto *param = + template_decl->getDescribedTemplateParams()->getParam(i); + + if (i == index) { + param_name = param->getNameAsString(); + + auto template_param = + template_parameter::make_template_type(param_name); + + template_param.is_variadic(param->isParameterPack()); + + return template_param; + } + } + } + + return {}; +} + template_parameter translation_unit_visitor:: build_template_instantiation_process_integral_argument( const clang::TemplateArgument &arg) const @@ -2674,7 +2810,7 @@ void translation_unit_visitor::process_field( if (template_field_type != nullptr) { // Skip types which are template template parameters of the parent // template - for (const auto &class_template_param : c.templates()) { + for (const auto &class_template_param : c.template_params()) { if (class_template_param.name() == template_field_type->getTemplateName() .getAsTemplateDecl() @@ -2690,8 +2826,8 @@ void translation_unit_visitor::process_field( !field_type_is_template_template_parameter) { // Build the template instantiation for the field type - auto template_specialization_ptr = - build_template_instantiation(*template_field_type, {&c}); + auto template_specialization_ptr = build_template_instantiation( + &field_declaration, *template_field_type, {&c}); if (!field.skip_relationship() && template_specialization_ptr) { const auto &template_specialization = *template_specialization_ptr; @@ -2721,7 +2857,7 @@ void translation_unit_visitor::process_field( found_relationships_t nested_relationships; if (!template_instantiation_added_as_aggregation) { for (const auto &template_argument : - template_specialization.templates()) { + template_specialization.template_params()) { LOG_DBG("Looking for nested relationships from {}::{} in " "template {}", diff --git a/src/class_diagram/visitor/translation_unit_visitor.h b/src/class_diagram/visitor/translation_unit_visitor.h index e18573a8..b64bad17 100644 --- a/src/class_diagram/visitor/translation_unit_visitor.h +++ b/src/class_diagram/visitor/translation_unit_visitor.h @@ -187,7 +187,7 @@ private: bool break_on_first_aggregation = false); std::unique_ptr - build_template_instantiation( + build_template_instantiation(const clang::Decl *cls, const clang::TemplateSpecializationType &template_type, std::optional parent = {}); @@ -205,6 +205,7 @@ private: void build_template_instantiation_process_template_arguments( std::optional &parent, + const clang::Decl *cls, std::deque> &template_base_params, const clang::ArrayRef &template_args, model::class_ &template_instantiation, @@ -226,6 +227,7 @@ private: template_parameter build_template_instantiation_process_type_argument( std::optional &parent, + const clang::Decl *cls, const std::string &full_template_specialization_name, const clang::TemplateDecl *template_decl, const clang::TemplateArgument &arg, @@ -240,7 +242,7 @@ private: void process_record_parent( clang::RecordDecl *cls, class_ &c, const namespace_ &ns); - void process_function_parameter_find_relatinoships_in_autotype( + void process_function_parameter_find_relationships_in_autotype( model::class_ &c, const clang::AutoType *atsp); void process_function_parameter_find_relationships_in_template( @@ -279,6 +281,10 @@ private: std::vector &constrained_template_params, size_t argument_index, std::string &type_name) const; + std::optional + get_template_argument_from_type_parameter_string( + const clang::Decl *decl, const std::string &return_type_name) const; + /// Store the mapping from local clang entity id (obtained using /// getID()) method to clang-uml global id void set_ast_local_id( diff --git a/src/common/clang_utils.cc b/src/common/clang_utils.cc index 07eb980b..6d203502 100644 --- a/src/common/clang_utils.cc +++ b/src/common/clang_utils.cc @@ -250,6 +250,19 @@ std::string get_source_text( return get_source_text_raw(printable_range, sm); } +std::pair extract_template_parameter_index( + const std::string &type_parameter) +{ + assert(type_parameter.find("type-parameter-") == 0); + + auto toks = + util::split(type_parameter.substr(strlen("type-parameter-")), "-"); + + assert(toks.size() == 2); + + return {std::stoi(toks.at(0)), std::stoi(toks.at(1))}; +} + bool is_subexpr_of(const clang::Stmt *parent_stmt, const clang::Stmt *sub_stmt) { if (parent_stmt == nullptr || sub_stmt == nullptr) diff --git a/src/common/clang_utils.h b/src/common/clang_utils.h index 0ed46aa5..18b6c548 100644 --- a/src/common/clang_utils.h +++ b/src/common/clang_utils.h @@ -95,6 +95,9 @@ std::string get_source_text_raw( std::string get_source_text( clang::SourceRange range, const clang::SourceManager &sm); +std::pair extract_template_parameter_index( + const std::string &type_parameter); + /** * @brief Check if an expression is contained in another expression * diff --git a/src/common/model/element.cc b/src/common/model/element.cc index 57a0994c..456c2437 100644 --- a/src/common/model/element.cc +++ b/src/common/model/element.cc @@ -30,11 +30,6 @@ element::element(namespace_ using_namespace) { } -void element::set_using_namespaces(const namespace_ &un) -{ - using_namespace_ = un; -} - const namespace_ &element::using_namespace() const { return using_namespace_; } inja::json element::context() const diff --git a/src/common/model/element.h b/src/common/model/element.h index dad91ec1..9d95f979 100644 --- a/src/common/model/element.h +++ b/src/common/model/element.h @@ -62,8 +62,6 @@ public: virtual std::string full_name_no_ns() const { return name(); } - void set_using_namespaces(const namespace_ &un); - const namespace_ &using_namespace() const; friend bool operator==(const element &l, const element &r); diff --git a/src/common/model/source_file.h b/src/common/model/source_file.h index 8c860504..4b802d05 100644 --- a/src/common/model/source_file.h +++ b/src/common/model/source_file.h @@ -96,14 +96,6 @@ public: auto full_path() const { return path() | name(); } - void add_file(std::unique_ptr &&f) - { - LOG_DBG("Adding source file: {}, {}", f->name(), f->full_name(true)); - - const auto path = f->path(); - add_element(path, std::move(f)); - } - std::filesystem::path fs_path(const std::filesystem::path &base = {}) const { std::filesystem::path res; diff --git a/src/common/model/template_parameter.cc b/src/common/model/template_parameter.cc index d3a80903..9c9dc22b 100644 --- a/src/common/model/template_parameter.cc +++ b/src/common/model/template_parameter.cc @@ -108,12 +108,46 @@ void template_parameter::is_variadic(bool is_variadic) noexcept bool template_parameter::is_variadic() const noexcept { return is_variadic_; } -bool template_parameter::is_specialization_of( - const template_parameter &ct) const +int template_parameter::calculate_specialization_match( + const template_parameter &base_template_parameter) const { - return (ct.is_template_parameter() || - ct.is_template_template_parameter()) && - !is_template_parameter(); + int res{0}; + + auto maybe_base_template_parameter_type = base_template_parameter.type(); + auto maybe_template_parameter_type = type(); + + if (maybe_base_template_parameter_type.has_value() && + maybe_template_parameter_type.has_value() && + !base_template_parameter.is_template_parameter() && + !is_template_parameter()) { + + if (maybe_base_template_parameter_type.value() != + maybe_template_parameter_type.value()) + return 0; + + res++; + } + + if (base_template_parameter.is_function_template() && + !is_function_template()) + return 0; + + if (!base_template_parameter.template_params().empty() && + !template_params().empty()) { + auto params_match = calculate_template_params_specialization_match( + template_params(), base_template_parameter.template_params()); + + if (params_match == 0) + return 0; + + res += params_match; + } + else if ((base_template_parameter.is_template_parameter() || + base_template_parameter.is_template_template_parameter()) && + !is_template_parameter()) + return 1; + + return res; } void template_parameter::add_template_param(template_parameter &&ct) @@ -139,6 +173,9 @@ bool operator==(const template_parameter &l, const template_parameter &r) if (l.is_template_parameter() != r.is_template_parameter()) return res; + if (l.is_function_template() != r.is_function_template()) + return res; + if (l.is_template_parameter()) { // If this is a template parameter (e.g. 'typename T' or 'typename U' // we don't actually care what it is called @@ -165,6 +202,19 @@ std::string template_parameter::to_string( assert(!(type().has_value() && concept_constraint().has_value())); + if (is_function_template()) { + auto it = template_params_.begin(); + auto return_type = it->to_string(using_namespace, relative); + std::advance(it, 1); + + std::vector function_args; + for (; it != template_params_.end(); it++) + function_args.push_back(it->to_string(using_namespace, relative)); + + return fmt::format( + "{}({})", return_type, fmt::join(function_args, ",")); + } + std::string res; const auto maybe_type = type(); if (maybe_type) { @@ -279,4 +329,76 @@ const std::optional &template_parameter::concept_constraint() const return concept_constraint_; } +int calculate_template_params_specialization_match( + const std::vector &specialization_params, + const std::vector &template_params) +{ + int res{0}; + + if (!specialization_params.empty() && !template_params.empty()) { + auto template_index{0U}; + auto arg_index{0U}; + + while (arg_index < specialization_params.size() && + template_index < template_params.size()) { + auto match = specialization_params.at(arg_index) + .calculate_specialization_match( + template_params.at(template_index)); + + if (match == 0) { + return 0; + } + + // Add 1 point if the current specialization param is an argument + // as it's a more specific match than 2 template params + if (!specialization_params.at(arg_index).is_template_parameter()) + res++; + + // Add 1 point if the current template param is an argument + // as it's a more specific match than 2 template params + if (!template_params.at(template_index).is_template_parameter()) + res++; + + if (!template_params.at(template_index).is_variadic()) + template_index++; + + res += match; + + arg_index++; + } + + if (arg_index == specialization_params.size()) { + // Check also backwards to make sure that trailing non-variadic + // params match after a variadic parameter + template_index = template_params.size() - 1; + arg_index = specialization_params.size() - 1; + + while (true) { + auto match = specialization_params.at(arg_index) + .calculate_specialization_match( + template_params.at(template_index)); + if (match == 0) { + return 0; + } + + if (arg_index == 0 || template_index == 0) + break; + + arg_index--; + + if (!template_params.at(template_index).is_variadic()) + template_index--; + else + break; + } + + return res; + } + + return 0; + } + + return 0; +} + } // namespace clanguml::common::model diff --git a/src/common/model/template_parameter.h b/src/common/model/template_parameter.h index 516ca258..d99056d7 100644 --- a/src/common/model/template_parameter.h +++ b/src/common/model/template_parameter.h @@ -52,6 +52,7 @@ public: p.set_kind(template_parameter_kind_t::template_type); p.set_name(name); p.is_variadic(is_variadic); + p.is_template_parameter(true); if (default_value) p.set_default_value(default_value.value()); return p; @@ -121,7 +122,8 @@ public: void is_variadic(bool is_variadic) noexcept; bool is_variadic() const noexcept; - bool is_specialization_of(const template_parameter &ct) const; + int calculate_specialization_match( + const template_parameter &base_template_parameter) const; friend bool operator==( const template_parameter &l, const template_parameter &r); @@ -176,6 +178,10 @@ public: void set_unexposed(bool unexposed) { is_unexposed_ = unexposed; } + void set_function_template(bool ft) { is_function_template_ = ft; } + + bool is_function_template() const { return is_function_template_; } + private: template_parameter() = default; @@ -202,15 +208,23 @@ private: /// Whether the template parameter is variadic bool is_variadic_{false}; + bool is_function_template_{false}; + /// Stores optional fully qualified name of constraint for this template /// parameter std::optional concept_constraint_; // Nested template parameters + // If this is a function template, the first element is the return type std::vector template_params_; std::optional id_; bool is_unexposed_{false}; }; + +int calculate_template_params_specialization_match( + const std::vector &specialization, + const std::vector &base_template); + } // namespace clanguml::common::model diff --git a/src/common/model/template_trait.cc b/src/common/model/template_trait.cc index 31e7ad2e..c3f0b0bf 100644 --- a/src/common/model/template_trait.cc +++ b/src/common/model/template_trait.cc @@ -58,39 +58,16 @@ bool template_trait::is_implicit() const { return is_implicit_; } void template_trait::set_implicit(bool implicit) { is_implicit_ = implicit; } -const std::vector &template_trait::templates() const +const std::vector &template_trait::template_params() const { return templates_; } int template_trait::calculate_template_specialization_match( - const template_trait &other, const std::string & /*full_name*/) const + const template_trait &base_template) const { - int res{}; - - // TODO: handle variadic templates - if (templates().size() != other.templates().size()) { - return res; - } - - // Iterate over all template arguments - for (auto i = 0U; i < other.templates().size(); i++) { - const auto &template_arg = templates().at(i); - const auto &other_template_arg = other.templates().at(i); - - if (template_arg == other_template_arg) { - res++; - } - else if (other_template_arg.is_specialization_of(template_arg)) { - continue; - } - else { - res = 0; - break; - } - } - - return res; + return calculate_template_params_specialization_match( + template_params(), base_template.template_params()); } } // namespace clanguml::common::model \ No newline at end of file diff --git a/src/common/model/template_trait.h b/src/common/model/template_trait.h index 9adc5315..1414b330 100644 --- a/src/common/model/template_trait.h +++ b/src/common/model/template_trait.h @@ -36,10 +36,10 @@ public: void add_template(template_parameter &&tmplt); - const std::vector &templates() const; + const std::vector &template_params() const; int calculate_template_specialization_match( - const template_trait &other, const std::string &full_name) const; + const template_trait &other) const; bool is_implicit() const; diff --git a/src/sequence_diagram/visitor/translation_unit_visitor.cc b/src/sequence_diagram/visitor/translation_unit_visitor.cc index c2b9f11a..6ac6cdcd 100644 --- a/src/sequence_diagram/visitor/translation_unit_visitor.cc +++ b/src/sequence_diagram/visitor/translation_unit_visitor.cc @@ -1715,7 +1715,8 @@ void translation_unit_visitor::process_template_specialization_argument( argument.set_id(nested_template_instantiation->id()); - for (const auto &t : nested_template_instantiation->templates()) + for (const auto &t : + nested_template_instantiation->template_params()) argument.add_template_param(t); // Check if this template should be simplified (e.g. system @@ -2009,8 +2010,8 @@ translation_unit_visitor::build_template_instantiation( auto c_full_name = participant_as_class->full_name(false); auto match = - participant_as_class->calculate_template_specialization_match( - template_instantiation, template_instantiation.name_and_ns()); + template_instantiation.calculate_template_specialization_match( + *participant_as_class); if (match > best_match) { best_match = match; diff --git a/tests/t00044/t00044.cc b/tests/t00044/t00044.cc index 33110d68..24f391a5 100644 --- a/tests/t00044/t00044.cc +++ b/tests/t00044/t00044.cc @@ -29,6 +29,8 @@ sink(signal_handler &) signal_handler int_handler; -sink sink1{int_handler}; +struct R { + sink> sink1{int_handler}; +}; } // namespace clanguml::t00044 diff --git a/tests/t00044/test_case.h b/tests/t00044/test_case.h index e9f40a1f..8ae83a72 100644 --- a/tests/t00044/test_case.h +++ b/tests/t00044/test_case.h @@ -35,10 +35,31 @@ TEST_CASE("t00044", "[test-case][class]") REQUIRE_THAT(puml, StartsWith("@startuml")); REQUIRE_THAT(puml, EndsWith("@enduml\n")); - // TODO: - // Check dependants filter - // REQUIRE_THAT(puml, IsClassTemplate("signal_handler", - // "Ret,Args...,A")); + REQUIRE_THAT(puml, IsClassTemplate("sink", "T")); + REQUIRE_THAT(puml, IsClassTemplate("signal_handler", "T,A")); + + REQUIRE_THAT(puml, IsClassTemplate("signal_handler", "Ret(Args...),A")); + REQUIRE_THAT(puml, IsClassTemplate("signal_handler", "void(int),bool")); + + REQUIRE_THAT( + puml, IsClassTemplate("sink", "signal_handler")); + + REQUIRE_THAT(puml, + IsInstantiation( + _A("sink"), _A("sink>"))); + + REQUIRE_THAT(puml, + IsInstantiation(_A("sink>"), + _A("sink>"))); + + REQUIRE_THAT(puml, IsClassTemplate("signal_handler", "T,A")); + REQUIRE_THAT(puml, + IsInstantiation(_A("signal_handler"), + _A("signal_handler"))); + + REQUIRE_THAT(puml, + IsInstantiation(_A("signal_handler"), + _A("signal_handler"))); save_puml( config.output_directory() + "/" + diagram->name + ".puml", puml); @@ -48,6 +69,14 @@ TEST_CASE("t00044", "[test-case][class]") using namespace json; + REQUIRE(IsClassTemplate(j, "sink")); + REQUIRE(IsClassTemplate(j, "signal_handler")); + REQUIRE(IsClassTemplate(j, "signal_handler")); + REQUIRE(IsClassTemplate(j, "signal_handler")); + REQUIRE(IsClassTemplate( + j, "sink>")); + REQUIRE(IsClass(j, "R")); + save_json(config.output_directory() + "/" + diagram->name + ".json", j); } } diff --git a/tests/test_model.cc b/tests/test_model.cc index 05ebd01e..ae6a7b06 100644 --- a/tests/test_model.cc +++ b/tests/test_model.cc @@ -19,7 +19,9 @@ #include "catch.h" +#include "class_diagram/model/class.h" #include "common/model/namespace.h" +#include "common/model/template_parameter.h" TEST_CASE("Test namespace_", "[unit-test]") { @@ -69,4 +71,219 @@ TEST_CASE("Test namespace_", "[unit-test]") namespace_ ns8{"aaa::bbb"}; const std::string name{"aaa::bbb::ccc>"}; CHECK(ns8.relative(name) == "ccc>"); -} \ No newline at end of file +} + +TEST_CASE("Test class_::calculate_specialization_match", "[unit-test]") +{ + using clanguml::class_diagram::model::class_; + using clanguml::common::model::template_parameter; + + { + auto c = class_({}); + c.set_name("A"); + c.add_template(template_parameter::make_argument("int")); + c.add_template(template_parameter::make_argument("double")); + c.add_template(template_parameter::make_argument("int")); + + auto t = class_({}); + t.set_name("A"); + t.add_template( + template_parameter::make_template_type("Args", {}, true)); + t.add_template(template_parameter::make_argument("int")); + + CHECK(c.calculate_template_specialization_match(t)); + } + + { + auto c = class_({}); + c.set_name("A"); + c.add_template(template_parameter::make_argument("double")); + c.add_template(template_parameter::make_argument("int")); + + auto s = class_({}); + s.set_name("A"); + s.add_template(template_parameter::make_argument("double")); + s.add_template(template_parameter::make_template_type("V")); + + auto t = class_({}); + t.set_name("A"); + t.add_template(template_parameter::make_template_type("T")); + t.add_template(template_parameter::make_template_type("V")); + + CHECK(c.calculate_template_specialization_match(s) > + c.calculate_template_specialization_match(t)); + } +} + +TEST_CASE( + "Test template_parameter::calculate_specialization_match", "[unit-test]") +{ + using clanguml::common::model::template_parameter; + + { + auto tp1 = template_parameter::make_template_type("T"); + auto tp2 = template_parameter::make_argument("int"); + + CHECK(tp2.calculate_specialization_match(tp1) > 0); + } + + { + auto tp1 = template_parameter::make_template_type("T"); + auto tp2 = template_parameter::make_argument("vector"); + tp2.add_template_param(template_parameter::make_argument("int")); + + CHECK(tp2.calculate_specialization_match(tp1)); + } + + { + auto tp1 = template_parameter::make_argument("vector"); + tp1.add_template_param(template_parameter::make_template_type("T")); + + auto tp2 = template_parameter::make_argument("vector"); + tp2.add_template_param(template_parameter::make_argument("int")); + + CHECK(tp2.calculate_specialization_match(tp1)); + } + + { + auto tp1 = template_parameter::make_argument("vector"); + tp1.add_template_param(template_parameter::make_template_type("T")); + + auto tp2 = template_parameter::make_argument("string"); + tp2.add_template_param(template_parameter::make_argument("char")); + + CHECK(!tp2.calculate_specialization_match(tp1)); + } + + { + auto tp1 = template_parameter::make_argument("tuple"); + tp1.add_template_param( + template_parameter::make_template_type("Args", {}, true)); + + auto tp2 = template_parameter::make_argument("tuple"); + tp2.add_template_param(template_parameter::make_argument("char")); + tp2.add_template_param(template_parameter::make_argument("int")); + tp2.add_template_param(template_parameter::make_argument("double")); + + CHECK(tp2.calculate_specialization_match(tp1)); + } + + { + auto tp1 = template_parameter::make_argument("tuple"); + tp1.add_template_param( + template_parameter::make_template_type("Args", {}, true)); + tp1.add_template_param(template_parameter::make_argument("int")); + + auto tp2 = template_parameter::make_argument("tuple"); + tp2.add_template_param(template_parameter::make_argument("char")); + tp2.add_template_param(template_parameter::make_argument("double")); + tp2.add_template_param(template_parameter::make_argument("int")); + + CHECK(tp2.calculate_specialization_match(tp1)); + } + + { + auto tp1 = template_parameter::make_argument("tuple"); + tp1.add_template_param( + template_parameter::make_template_type("Args", {}, true)); + tp1.add_template_param(template_parameter::make_argument("int")); + + auto tp2 = template_parameter::make_argument("tuple"); + tp2.add_template_param(template_parameter::make_argument("char")); + tp2.add_template_param(template_parameter::make_argument("int")); + tp2.add_template_param(template_parameter::make_argument("double")); + + CHECK(tp2.calculate_specialization_match(tp1) == 0); + } + + { + auto tp1 = template_parameter::make_argument("tuple"); + tp1.add_template_param(template_parameter::make_template_type("T1")); + tp1.add_template_param(template_parameter::make_template_type("T2")); + + auto tp2 = template_parameter::make_argument("tuple"); + tp2.add_template_param(template_parameter::make_argument("char")); + tp2.add_template_param(template_parameter::make_argument("int")); + tp2.add_template_param(template_parameter::make_argument("double")); + + CHECK(tp2.calculate_specialization_match(tp1) == 0); + } + + { + auto tp1 = template_parameter::make_template_type({}); + tp1.set_function_template(true); + tp1.add_template_param(template_parameter::make_template_type("Ret")); + tp1.add_template_param(template_parameter::make_template_type("Arg1")); + tp1.add_template_param(template_parameter::make_template_type("Arg2")); + + auto tp2 = template_parameter::make_argument({}); + tp2.set_function_template(true); + tp2.add_template_param(template_parameter::make_argument("char")); + tp2.add_template_param(template_parameter::make_argument("int")); + tp2.add_template_param(template_parameter::make_argument("double")); + + CHECK(tp2.calculate_specialization_match(tp1)); + } + + { + auto tp1 = template_parameter::make_template_type({}); + tp1.set_function_template(true); + tp1.add_template_param(template_parameter::make_template_type("Ret")); + tp1.add_template_param(template_parameter::make_template_type("Arg1")); + tp1.add_template_param(template_parameter::make_template_type("Arg2")); + + auto tp2 = template_parameter::make_argument({}); + tp2.set_function_template(false); + tp2.add_template_param(template_parameter::make_argument("char")); + tp2.add_template_param(template_parameter::make_argument("int")); + tp2.add_template_param(template_parameter::make_argument("double")); + + CHECK(!tp2.calculate_specialization_match(tp1)); + } + + { + auto tp1 = template_parameter::make_template_type({}); + tp1.set_function_template(true); + tp1.add_template_param(template_parameter::make_template_type("Ret")); + tp1.add_template_param( + template_parameter::make_template_type("Args", {}, true)); + + auto tp2 = template_parameter::make_argument({}); + tp2.set_function_template(true); + tp2.add_template_param(template_parameter::make_argument("char")); + tp2.add_template_param(template_parameter::make_argument("int")); + tp2.add_template_param(template_parameter::make_argument("double")); + + CHECK(tp2.calculate_specialization_match(tp1)); + } + + { + auto sink_t = template_parameter::make_argument("sink"); + auto sh1 = + template_parameter::make_argument("ns1::ns2::signal_handler"); + auto sh1_t1 = template_parameter::make_template_type({}); + sh1_t1.set_function_template(true); + sh1_t1.add_template_param( + template_parameter::make_template_type("Ret")); + sh1_t1.add_template_param( + template_parameter::make_template_type("Args", {}, true)); + auto sh1_t2 = template_parameter::make_template_type("A"); + sh1.add_template_param(sh1_t1); + sh1.add_template_param(sh1_t2); + sink_t.add_template_param(sh1); + + auto sink_s = template_parameter::make_argument("sink"); + auto sh2 = + template_parameter::make_argument("ns1::ns2::signal_handler"); + auto sh2_a1 = template_parameter::make_argument({}); + sh2_a1.set_function_template(true); + sh2_a1.add_template_param(template_parameter::make_argument("void")); + sh2_a1.add_template_param(template_parameter::make_argument("int")); + auto sh2_a2 = template_parameter::make_argument("bool"); + sh2.add_template_param(sh2_a1); + sh2.add_template_param(sh2_a2); + sink_s.add_template_param(sh2); + + CHECK(sink_s.calculate_specialization_match(sink_t)); + } +}