diff --git a/docs/test_cases/t00002_class.svg b/docs/test_cases/t00002_class.svg index f2764550..da44331f 100644 --- a/docs/test_cases/t00002_class.svg +++ b/docs/test_cases/t00002_class.svg @@ -1,6 +1,6 @@ - + @@ -10,123 +10,123 @@ Basic class diagram example - - + + A - + - + foo_a() = 0 : void - + - + foo_c() = 0 : void - - + + B - + - + foo_a() : void - - + + C - + - + foo_c() : void - - + + D - + - + foo_a() : void - + - + foo_c() : void - + - + as : std::vector<A *> - - + + E - + - + foo_a() : void - + - + foo_c() : void - + - + as : std::vector<A *> - + This is class A - + This is class B - + This is class D diff --git a/docs/test_cases/t00002_class_mermaid.svg b/docs/test_cases/t00002_class_mermaid.svg index 1b2258d6..8b912e21 100644 --- a/docs/test_cases/t00002_class_mermaid.svg +++ b/docs/test_cases/t00002_class_mermaid.svg @@ -169,7 +169,7 @@ - + @@ -198,7 +198,7 @@ - + @@ -222,7 +222,7 @@ - + @@ -246,7 +246,7 @@ - + @@ -280,7 +280,7 @@ - + diff --git a/docs/test_cases/t00003_class.svg b/docs/test_cases/t00003_class.svg index d554e457..00a7e937 100644 --- a/docs/test_cases/t00003_class.svg +++ b/docs/test_cases/t00003_class.svg @@ -1,6 +1,6 @@ - + @@ -9,227 +9,227 @@ - - + + A - + - + A() = default : void - + - + A(int i) : void - + - + A(A &&) = default : void - + - + A(const A &) = deleted : void A<T>(T t) : void - + - + ~A() = default : void - + - + operator=(A && other) noexcept : A & - + - + operator=(A & other) noexcept : A & - + - + operator++() : A & - + - + auto_method() : int - + - + basic_method() : void - + - + const_method() const : void - + - + create_from_int(int i) : A - + - + default_int(int i = 12) : int - + - + default_string(int i, std::string s = "abc") : std::string - + - + double_int(const int i) : int - + - + private_method() : void - + - + protected_method() : void - + - + size() constexpr const : std::size_t - + - + static_method() : int - + - + sum(const double a, const double b) : int - + - + a_ : int - + - + auto_member : const unsigned long - + - + b_ : int - + - + c_ : int - + - + compare : std::function<bool (const int)> - + - + private_member : int - + - + protected_member : int - + - + public_member : int - + - + static_const_int : const int - + - + static_int : int diff --git a/docs/test_cases/t00003_class_mermaid.svg b/docs/test_cases/t00003_class_mermaid.svg index e9e3f595..9f090964 100644 --- a/docs/test_cases/t00003_class_mermaid.svg +++ b/docs/test_cases/t00003_class_mermaid.svg @@ -52,7 +52,7 @@ - + diff --git a/docs/test_cases/t00004_class.svg b/docs/test_cases/t00004_class.svg index cdd34a5c..4de1cf64 100644 --- a/docs/test_cases/t00004_class.svg +++ b/docs/test_cases/t00004_class.svg @@ -1,6 +1,6 @@ - + @@ -9,16 +9,16 @@ - - + + B - - + + B::AA @@ -28,38 +28,38 @@ AA_3 - - + + A - + - + foo() const : void - + - + foo2() const : void - - + + A::AA - - + + A::AA::Lights @@ -69,16 +69,16 @@ Red - - + + A::AA::AAA - - + + C::B @@ -87,8 +87,8 @@ - - + + C @@ -97,38 +97,38 @@ - + - + b_int : B<int> - + - + t : T - - + + C::AA - - + + C::AA::AAA - - + + C::AA::CCC @@ -137,8 +137,8 @@ CCC_2 - - + + C::B @@ -147,15 +147,15 @@ - + - + b : V - - + + C::CC @@ -164,16 +164,16 @@ CC_2 - - + + detail::D - - + + detail::D::AA @@ -183,8 +183,8 @@ AA_3 - - + + detail::D::DD diff --git a/docs/test_cases/t00004_class_mermaid.svg b/docs/test_cases/t00004_class_mermaid.svg index f1d47fc2..a39975d1 100644 --- a/docs/test_cases/t00004_class_mermaid.svg +++ b/docs/test_cases/t00004_class_mermaid.svg @@ -210,7 +210,7 @@ - + @@ -229,7 +229,7 @@ - + @@ -263,7 +263,7 @@ - + @@ -292,7 +292,7 @@ - + @@ -311,7 +311,7 @@ - + @@ -345,7 +345,7 @@ - + @@ -364,7 +364,7 @@ - + @@ -383,7 +383,7 @@ - + @@ -412,7 +412,7 @@ - + @@ -431,7 +431,7 @@ - + @@ -450,7 +450,7 @@ - + @@ -479,7 +479,7 @@ - + @@ -503,7 +503,7 @@ - + @@ -532,7 +532,7 @@ - + @@ -551,7 +551,7 @@ - + @@ -585,7 +585,7 @@ - + diff --git a/docs/test_cases/t00005_class.svg b/docs/test_cases/t00005_class.svg index ed43cd1e..e224b7f0 100644 --- a/docs/test_cases/t00005_class.svg +++ b/docs/test_cases/t00005_class.svg @@ -1,6 +1,6 @@ - + @@ -9,205 +9,205 @@ - - + + A - - + + B - - + + C - - + + D - - + + E - - + + F - - + + G - - + + H - - + + I - - + + J - - + + K - - + + R - + - + a : A - + - + b : B * - + - + c : C & - + - + d : const D * - + - + e : const E & - + - + f : F && - + - + g : G ** - + - + h : H *** - + - + i : I *& - + - + j : volatile J * - + - + k : K * - + - + some_int : int - + - + some_int_pointer : int * - + - + some_int_pointer_pointer : int ** - + - + some_int_reference : int & diff --git a/docs/test_cases/t00005_class_mermaid.svg b/docs/test_cases/t00005_class_mermaid.svg index 90885aa8..12689ef6 100644 --- a/docs/test_cases/t00005_class_mermaid.svg +++ b/docs/test_cases/t00005_class_mermaid.svg @@ -186,7 +186,7 @@ - + @@ -205,7 +205,7 @@ - + @@ -224,7 +224,7 @@ - + @@ -243,7 +243,7 @@ - + @@ -262,7 +262,7 @@ - + @@ -281,7 +281,7 @@ - + @@ -300,7 +300,7 @@ - + @@ -319,7 +319,7 @@ - + @@ -338,7 +338,7 @@ - + @@ -357,7 +357,7 @@ - + @@ -376,7 +376,7 @@ - + @@ -395,7 +395,7 @@ - + diff --git a/docs/test_cases/t00006_class.svg b/docs/test_cases/t00006_class.svg index 1f44cd05..0f129da1 100644 --- a/docs/test_cases/t00006_class.svg +++ b/docs/test_cases/t00006_class.svg @@ -1,6 +1,6 @@ - + @@ -9,136 +9,136 @@ - - + + A - - + + B - - + + C - - + + D - - + + E - - + + F - - + + G - - + + H - - + + I - - + + J - - + + K - - + + L - - + + M - - + + N - - + + NN - - + + NNN - - + + custom_container @@ -147,15 +147,15 @@ - + - + data : std::vector<T> - - + + custom_container @@ -164,103 +164,103 @@ - - + + R - + - + a : std::vector<A> - + - + b : std::vector<B *> - + - + c : std::map<int,C> - + - + d : std::map<int,D *> - + - + e : custom_container<E> - + - + f : std::vector<std::vector<F>> - + - + g : std::map<int,std::vector<G *>> - + - + h : std::array<H,10> - + - + i : std::array<I *,5> - + - + j : J[10] - + - + k : K *[20] - + - + lm : std::vector<std::pair<L,M>> - + - + ns : std::tuple<N,NN,NNN> diff --git a/docs/test_cases/t00006_class_mermaid.svg b/docs/test_cases/t00006_class_mermaid.svg index b4e14635..2e56cf97 100644 --- a/docs/test_cases/t00006_class_mermaid.svg +++ b/docs/test_cases/t00006_class_mermaid.svg @@ -270,7 +270,7 @@ - + @@ -289,7 +289,7 @@ - + @@ -308,7 +308,7 @@ - + @@ -327,7 +327,7 @@ - + @@ -346,7 +346,7 @@ - + @@ -365,7 +365,7 @@ - + @@ -384,7 +384,7 @@ - + @@ -403,7 +403,7 @@ - + @@ -422,7 +422,7 @@ - + @@ -441,7 +441,7 @@ - + @@ -460,7 +460,7 @@ - + @@ -479,7 +479,7 @@ - + @@ -498,7 +498,7 @@ - + @@ -517,7 +517,7 @@ - + @@ -536,7 +536,7 @@ - + @@ -555,7 +555,7 @@ - + @@ -574,7 +574,7 @@ - + @@ -598,7 +598,7 @@ - + @@ -617,7 +617,7 @@ - + diff --git a/docs/test_cases/t00007_class.svg b/docs/test_cases/t00007_class.svg index ac722d91..129556e6 100644 --- a/docs/test_cases/t00007_class.svg +++ b/docs/test_cases/t00007_class.svg @@ -1,6 +1,6 @@ - + @@ -9,57 +9,57 @@ - - + + A - - + + B - - + + C - - + + R - + - + a : std::unique_ptr<A> - + - + b : std::shared_ptr<B> - + - + c : std::weak_ptr<C> diff --git a/docs/test_cases/t00007_class_mermaid.svg b/docs/test_cases/t00007_class_mermaid.svg index c5929f5b..b0d0dd0d 100644 --- a/docs/test_cases/t00007_class_mermaid.svg +++ b/docs/test_cases/t00007_class_mermaid.svg @@ -90,7 +90,7 @@ - + @@ -109,7 +109,7 @@ - + @@ -128,7 +128,7 @@ - + @@ -147,7 +147,7 @@ - + diff --git a/docs/test_cases/t00008_class.svg b/docs/test_cases/t00008_class.svg index 1de1a238..934dd619 100644 --- a/docs/test_cases/t00008_class.svg +++ b/docs/test_cases/t00008_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + A @@ -19,50 +19,50 @@ - + - + comparator : CMP - + - + ints : std::array<int,N> - + - + pointer : T * - + - + reference : T & - + - + value : T - + - + values : std::vector<P> - - + + Vector @@ -71,15 +71,15 @@ - + - + values : std::vector<T> - - + + B @@ -88,15 +88,15 @@ - + - + template_template : C<T> - - + + B @@ -105,8 +105,8 @@ - - + + D @@ -115,31 +115,31 @@ D<Items...>(std::tuple<Items...> *) : void - + - + add(int i) : void - + - + ints : B<int,Vector> - - + + E - - + + E::nested_template @@ -147,16 +147,16 @@ ET - + - + get(ET * d) : DT * - - + + E::nested_template @@ -164,11 +164,11 @@ char - + - + getDecl(char * c) : DeclType * diff --git a/docs/test_cases/t00008_class_mermaid.svg b/docs/test_cases/t00008_class_mermaid.svg index 3c4131e0..032b078b 100644 --- a/docs/test_cases/t00008_class_mermaid.svg +++ b/docs/test_cases/t00008_class_mermaid.svg @@ -114,7 +114,7 @@ - + @@ -163,7 +163,7 @@ - + @@ -187,7 +187,7 @@ - + @@ -211,7 +211,7 @@ - + @@ -230,7 +230,7 @@ - + @@ -264,7 +264,7 @@ - + @@ -283,7 +283,7 @@ - + @@ -307,7 +307,7 @@ - + diff --git a/docs/test_cases/t00009_class.svg b/docs/test_cases/t00009_class.svg index 41be461e..98332c0f 100644 --- a/docs/test_cases/t00009_class.svg +++ b/docs/test_cases/t00009_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + A @@ -19,15 +19,15 @@ - + - + value : T - - + + A @@ -36,8 +36,8 @@ - - + + A @@ -46,8 +46,8 @@ - - + + A @@ -56,33 +56,33 @@ - - + + B - + - + aint : A<int> - + - + astring : A<std::string> * - + - + avector : A<std::vector<std::string>> & diff --git a/docs/test_cases/t00009_class_mermaid.svg b/docs/test_cases/t00009_class_mermaid.svg index 51b960ac..5e06b074 100644 --- a/docs/test_cases/t00009_class_mermaid.svg +++ b/docs/test_cases/t00009_class_mermaid.svg @@ -126,7 +126,7 @@ - + @@ -150,7 +150,7 @@ - + @@ -169,7 +169,7 @@ - + @@ -188,7 +188,7 @@ - + @@ -207,7 +207,7 @@ - + diff --git a/docs/test_cases/t00010_class.svg b/docs/test_cases/t00010_class.svg index 01cefb17..4e5bb769 100644 --- a/docs/test_cases/t00010_class.svg +++ b/docs/test_cases/t00010_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + A @@ -19,22 +19,22 @@ - + - + first : T - + - + second : P - - + + A @@ -43,8 +43,8 @@ - - + + B @@ -53,15 +53,15 @@ - + - + astring : A<T,std::string> - - + + B @@ -70,19 +70,19 @@ - - + + C - + - + aintstring : B<int> diff --git a/docs/test_cases/t00010_class_mermaid.svg b/docs/test_cases/t00010_class_mermaid.svg index 32c876bf..d375186f 100644 --- a/docs/test_cases/t00010_class_mermaid.svg +++ b/docs/test_cases/t00010_class_mermaid.svg @@ -102,7 +102,7 @@ - + @@ -131,7 +131,7 @@ - + @@ -150,7 +150,7 @@ - + @@ -174,7 +174,7 @@ - + @@ -193,7 +193,7 @@ - + diff --git a/docs/test_cases/t00011_class.svg b/docs/test_cases/t00011_class.svg index f206038a..bb170072 100644 --- a/docs/test_cases/t00011_class.svg +++ b/docs/test_cases/t00011_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + D @@ -19,48 +19,48 @@ - + - + value : T - - + + A - + - + foo() : void - - + + B - + - + foo() : void - + - + m_a : A * diff --git a/docs/test_cases/t00011_class_mermaid.svg b/docs/test_cases/t00011_class_mermaid.svg index 2998a19a..3489893e 100644 --- a/docs/test_cases/t00011_class_mermaid.svg +++ b/docs/test_cases/t00011_class_mermaid.svg @@ -78,7 +78,7 @@ - + @@ -102,7 +102,7 @@ - + @@ -126,7 +126,7 @@ - + diff --git a/docs/test_cases/t00012_class.svg b/docs/test_cases/t00012_class.svg index 32a3961e..6fd068bd 100644 --- a/docs/test_cases/t00012_class.svg +++ b/docs/test_cases/t00012_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + A @@ -19,22 +19,22 @@ - + - + value : T - + - + values : std::variant<Ts...> - - + + B @@ -43,15 +43,15 @@ - + - + ints : std::array<int,sizeof...(Is)> - - + + C @@ -60,15 +60,15 @@ - + - + ints : std::array<T,sizeof...(Is)> - - + + A @@ -77,8 +77,8 @@ - - + + A @@ -87,8 +87,8 @@ - - + + B @@ -97,8 +97,8 @@ - - + + B @@ -107,8 +107,8 @@ - - + + C @@ -117,50 +117,50 @@ - - + + R - + - + a1 : A<int,std::string,float> - + - + a2 : A<int,std::string,bool> - + - + b1 : B<3,2,1> - + - + b2 : B<1,1,1,1> - + - + c1 : C<std::map<int,std::vector<std::vector<std::vector<std::string>>>>,3,3,3> - + Long template annotation diff --git a/docs/test_cases/t00012_class_mermaid.svg b/docs/test_cases/t00012_class_mermaid.svg index 5723a64a..5c720005 100644 --- a/docs/test_cases/t00012_class_mermaid.svg +++ b/docs/test_cases/t00012_class_mermaid.svg @@ -174,7 +174,7 @@ - + @@ -203,7 +203,7 @@ - + @@ -227,7 +227,7 @@ - + @@ -251,7 +251,7 @@ - + @@ -270,7 +270,7 @@ - + @@ -289,7 +289,7 @@ - + @@ -308,7 +308,7 @@ - + @@ -327,7 +327,7 @@ - + @@ -346,7 +346,7 @@ - + diff --git a/docs/test_cases/t00013_class.svg b/docs/test_cases/t00013_class.svg index bca0a240..639424fd 100644 --- a/docs/test_cases/t00013_class.svg +++ b/docs/test_cases/t00013_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + ABCD::F @@ -19,15 +19,15 @@ - + - + f : T - - + + ABCD::F @@ -36,75 +36,75 @@ - - + + A - + - + a : int - - + + B - + - + b : int - - + + C - + - + c : int - - + + D - + - + print(R * r) : void - + - + d : int - - + + E @@ -113,15 +113,15 @@ - + - + e : T - - + + G @@ -130,22 +130,22 @@ - + - + args : std::tuple<Args...> - + - + g : T - - + + E @@ -154,8 +154,8 @@ - - + + G @@ -164,8 +164,8 @@ - - + + E @@ -174,93 +174,93 @@ - - + + R - + - + get_a(A * a) : int - + - + get_b(B & b) : int - + - + get_c(C c) : int - + - + get_const_b(const B & b) : int - + - + get_d(D && d) : int - + - + get_d2(D && d) : int get_e<T>(E<T> e) : T get_f<T>(const F<T> & f) : T - + - + get_int_e(const E<int> & e) : int - + - + get_int_e2(E<int> & e) : int - + - + get_int_f(const ABCD::F<int> & f) : int - + - + estring : E<std::string> - + - + gintstring : G<int,float,std::string> diff --git a/docs/test_cases/t00013_class_mermaid.svg b/docs/test_cases/t00013_class_mermaid.svg index b07bf1a1..29e361de 100644 --- a/docs/test_cases/t00013_class_mermaid.svg +++ b/docs/test_cases/t00013_class_mermaid.svg @@ -234,7 +234,7 @@ - + @@ -258,7 +258,7 @@ - + @@ -277,7 +277,7 @@ - + @@ -301,7 +301,7 @@ - + @@ -325,7 +325,7 @@ - + @@ -349,7 +349,7 @@ - + @@ -378,7 +378,7 @@ - + @@ -402,7 +402,7 @@ - + @@ -431,7 +431,7 @@ - + @@ -450,7 +450,7 @@ - + @@ -469,7 +469,7 @@ - + @@ -488,7 +488,7 @@ - + diff --git a/docs/test_cases/t00014.md b/docs/test_cases/t00014.md index bc04bc1c..03cbdeed 100644 --- a/docs/test_cases/t00014.md +++ b/docs/test_cases/t00014.md @@ -291,7 +291,7 @@ public: "id": "1700006390494465667", "is_abstract": false, "is_nested": false, - "is_struct": false, + "is_struct": true, "is_template": true, "is_union": false, "members": [], @@ -326,7 +326,7 @@ public: "id": "2017665567517853203", "is_abstract": false, "is_nested": false, - "is_struct": false, + "is_struct": true, "is_template": true, "is_union": false, "members": [], @@ -361,7 +361,7 @@ public: "id": "906557320263235873", "is_abstract": false, "is_nested": false, - "is_struct": false, + "is_struct": true, "is_template": true, "is_union": false, "members": [], @@ -396,7 +396,7 @@ public: "id": "378898020828430636", "is_abstract": false, "is_nested": false, - "is_struct": false, + "is_struct": true, "is_template": true, "is_union": false, "members": [], @@ -431,7 +431,7 @@ public: "id": "2082013375525130414", "is_abstract": false, "is_nested": false, - "is_struct": false, + "is_struct": true, "is_template": true, "is_union": false, "members": [], @@ -466,7 +466,7 @@ public: "id": "51978493292659230", "is_abstract": false, "is_nested": false, - "is_struct": false, + "is_struct": true, "is_template": true, "is_union": false, "members": [], @@ -501,7 +501,7 @@ public: "id": "197769253782961588", "is_abstract": false, "is_nested": false, - "is_struct": false, + "is_struct": true, "is_template": true, "is_union": false, "members": [], diff --git a/docs/test_cases/t00014_class.svg b/docs/test_cases/t00014_class.svg index 57cd9936..e7baddb0 100644 --- a/docs/test_cases/t00014_class.svg +++ b/docs/test_cases/t00014_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + A @@ -19,37 +19,37 @@ - + - + p : P - + - + t : T - - + + B - + - + value : std::string - - + + A @@ -58,8 +58,8 @@ - - + + A @@ -68,8 +68,8 @@ - - + + A @@ -78,8 +78,8 @@ - - + + A @@ -88,8 +88,8 @@ - - + + A @@ -98,8 +98,8 @@ - - + + A @@ -108,8 +108,8 @@ - - + + A @@ -118,8 +118,8 @@ - - + + A @@ -128,8 +128,8 @@ - - + + A @@ -138,8 +138,8 @@ - - + + A @@ -148,8 +148,8 @@ - - + + A @@ -158,8 +158,8 @@ - - + + A @@ -168,8 +168,8 @@ - - + + A @@ -178,7 +178,7 @@ - + A @@ -186,7 +186,7 @@ char,std::string - + A @@ -194,8 +194,8 @@ wchar_t,std::string - - + + R @@ -204,116 +204,116 @@ - + - + abool : APtr<bool> - + - + aboolfloat : AAPtr<bool,float> - + - + afloat : ASharedPtr<float> - + - + atfloat : AAPtr<T,float> - + - + bapair : PairPairBA<bool> - + - + boolstring : A<bool,std::string> - + - + bs : BVector - + - + bs2 : BVector2 - + - + bstringstring : BStringString - + - + cb : SimpleCallback<ACharString> - + - + floatstring : AStringPtr<float> - + - + gcb : GenericCallback<AWCharString> - + - + intstring : AIntString - + - + stringstring : AStringString - + - + vcb : VoidCallback - + - + vps : VectorPtr<B> diff --git a/docs/test_cases/t00014_class_mermaid.svg b/docs/test_cases/t00014_class_mermaid.svg index d72a732b..e776ea7c 100644 --- a/docs/test_cases/t00014_class_mermaid.svg +++ b/docs/test_cases/t00014_class_mermaid.svg @@ -474,7 +474,7 @@ - + @@ -503,7 +503,7 @@ - + @@ -527,7 +527,7 @@ - + @@ -546,7 +546,7 @@ - + @@ -565,7 +565,7 @@ - + @@ -584,7 +584,7 @@ - + @@ -603,7 +603,7 @@ - + @@ -622,7 +622,7 @@ - + @@ -641,7 +641,7 @@ - + @@ -660,7 +660,7 @@ - + @@ -679,7 +679,7 @@ - + @@ -698,7 +698,7 @@ - + @@ -717,7 +717,7 @@ - + @@ -736,7 +736,7 @@ - + @@ -755,7 +755,7 @@ - + @@ -774,7 +774,7 @@ - + @@ -793,7 +793,7 @@ - + @@ -812,7 +812,7 @@ - + diff --git a/docs/test_cases/t00015_class.svg b/docs/test_cases/t00015_class.svg index 8f5bc888..ff576403 100644 --- a/docs/test_cases/t00015_class.svg +++ b/docs/test_cases/t00015_class.svg @@ -1,6 +1,6 @@ - + @@ -9,40 +9,40 @@ - - + + ns1::A - - + + ns1::ns2_v0_9_0::A - - + + ns1::Anon - - + + ns3::ns1::ns2::Anon - - + + ns3::B diff --git a/docs/test_cases/t00015_class_mermaid.svg b/docs/test_cases/t00015_class_mermaid.svg index fcffa272..69713c7d 100644 --- a/docs/test_cases/t00015_class_mermaid.svg +++ b/docs/test_cases/t00015_class_mermaid.svg @@ -84,7 +84,7 @@ - + @@ -103,7 +103,7 @@ - + @@ -122,7 +122,7 @@ - + @@ -141,7 +141,7 @@ - + @@ -160,7 +160,7 @@ - + diff --git a/docs/test_cases/t00016_class.svg b/docs/test_cases/t00016_class.svg index 889b0cbb..38d80655 100644 --- a/docs/test_cases/t00016_class.svg +++ b/docs/test_cases/t00016_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + is_numeric @@ -21,8 +21,8 @@ value : enum - - + + is_numeric @@ -33,8 +33,8 @@ value : enum - - + + is_numeric @@ -45,8 +45,8 @@ value : enum - - + + is_numeric @@ -57,8 +57,8 @@ value : enum - - + + is_numeric @@ -69,8 +69,8 @@ value : enum - - + + is_numeric diff --git a/docs/test_cases/t00016_class_mermaid.svg b/docs/test_cases/t00016_class_mermaid.svg index e31fb698..46d5face 100644 --- a/docs/test_cases/t00016_class_mermaid.svg +++ b/docs/test_cases/t00016_class_mermaid.svg @@ -114,7 +114,7 @@ - + @@ -138,7 +138,7 @@ - + @@ -162,7 +162,7 @@ - + @@ -186,7 +186,7 @@ - + @@ -210,7 +210,7 @@ - + @@ -234,7 +234,7 @@ - + diff --git a/docs/test_cases/t00017_class.svg b/docs/test_cases/t00017_class.svg index 343b40b2..a005ccc1 100644 --- a/docs/test_cases/t00017_class.svg +++ b/docs/test_cases/t00017_class.svg @@ -1,6 +1,6 @@ - + @@ -9,135 +9,135 @@ - - + + A - - + + B - - + + C - - + + D - - + + E - - + + F - - + + G - - + + H - - + + I - - + + J - - + + K - - + + R - + - + R(int & some_int, C & cc, const E & ee, F && ff, I *& ii) : void - + - + some_int : int - + - + some_int_pointer : int * - + - + some_int_pointer_pointer : int ** - + - + some_int_reference : int & diff --git a/docs/test_cases/t00017_class_mermaid.svg b/docs/test_cases/t00017_class_mermaid.svg index 5028b787..86b87540 100644 --- a/docs/test_cases/t00017_class_mermaid.svg +++ b/docs/test_cases/t00017_class_mermaid.svg @@ -186,7 +186,7 @@ - + @@ -205,7 +205,7 @@ - + @@ -224,7 +224,7 @@ - + @@ -243,7 +243,7 @@ - + @@ -262,7 +262,7 @@ - + @@ -281,7 +281,7 @@ - + @@ -300,7 +300,7 @@ - + @@ -319,7 +319,7 @@ - + @@ -338,7 +338,7 @@ - + @@ -357,7 +357,7 @@ - + @@ -376,7 +376,7 @@ - + @@ -395,7 +395,7 @@ - + diff --git a/docs/test_cases/t00018_class.svg b/docs/test_cases/t00018_class.svg index 888ceb8d..ca86cce5 100644 --- a/docs/test_cases/t00018_class.svg +++ b/docs/test_cases/t00018_class.svg @@ -1,6 +1,6 @@ - + @@ -9,121 +9,121 @@ - - + + impl::widget - + - + widget(int n) : void - + - + draw(const widget & w) const : void - + - + draw(const widget & w) : void - + - + n : int - - + + widget - + - + widget(int) : void - + - + widget(widget &&) : void - + - + widget(const widget &) = deleted : void - + - + ~widget() : void - + - + operator=(widget &&) : widget & - + - + operator=(const widget &) = deleted : widget & - + - + draw() const : void - + - + draw() : void - + - + shown() const : bool - + - + pImpl : std::unique_ptr<impl::widget> diff --git a/docs/test_cases/t00018_class_mermaid.svg b/docs/test_cases/t00018_class_mermaid.svg index 54ae6f58..d89145cf 100644 --- a/docs/test_cases/t00018_class_mermaid.svg +++ b/docs/test_cases/t00018_class_mermaid.svg @@ -78,7 +78,7 @@ - + @@ -117,7 +117,7 @@ - + diff --git a/docs/test_cases/t00019_class.svg b/docs/test_cases/t00019_class.svg index c32862db..ed9f976a 100644 --- a/docs/test_cases/t00019_class.svg +++ b/docs/test_cases/t00019_class.svg @@ -1,6 +1,6 @@ - + @@ -9,45 +9,45 @@ - - + + Base - + - + Base() = default : void - + - + ~Base() constexpr = default : void - + - + m1() : int - + - + m2() : std::string - - + + Layer1 @@ -55,23 +55,23 @@ LowerLayer - + - + m1() : int - + - + m2() : std::string - - + + Layer2 @@ -79,16 +79,16 @@ LowerLayer - + - + all_calls_count() const : int - - + + Layer3 @@ -96,50 +96,50 @@ LowerLayer - + - + m1() : int - + - + m1_calls() const : int - + - + m2() : std::string - + - + m2_calls() const : int - + - + m_m1_calls : int - + - + m_m2_calls : int - + Layer3 @@ -147,7 +147,7 @@ Base - + Layer2 @@ -155,7 +155,7 @@ Layer3<Base> - + Layer1 @@ -163,19 +163,19 @@ Layer2<Layer3<Base>> - - + + A - + - + layers : std::unique_ptr<Layer1<Layer2<Layer3<Base>>>> diff --git a/docs/test_cases/t00019_class_mermaid.svg b/docs/test_cases/t00019_class_mermaid.svg index 3dd64186..9a72f750 100644 --- a/docs/test_cases/t00019_class_mermaid.svg +++ b/docs/test_cases/t00019_class_mermaid.svg @@ -132,7 +132,7 @@ - + @@ -171,7 +171,7 @@ - + @@ -200,7 +200,7 @@ - + @@ -224,7 +224,7 @@ - + @@ -273,7 +273,7 @@ - + @@ -292,7 +292,7 @@ - + @@ -311,7 +311,7 @@ - + @@ -330,7 +330,7 @@ - + diff --git a/docs/test_cases/t00020_class.svg b/docs/test_cases/t00020_class.svg index 8badb4d2..d45c55b0 100644 --- a/docs/test_cases/t00020_class.svg +++ b/docs/test_cases/t00020_class.svg @@ -1,6 +1,6 @@ - + @@ -9,175 +9,175 @@ - - + + ProductA - + - + ~ProductA() constexpr = default : void - + - + sell(int price) const = 0 : bool - - + + ProductA1 - + - + sell(int price) const : bool - - + + ProductA2 - + - + sell(int price) const : bool - - + + ProductB - + - + ~ProductB() constexpr = default : void - + - + buy(int price) const = 0 : bool - - + + ProductB1 - + - + buy(int price) const : bool - - + + ProductB2 - + - + buy(int price) const : bool - - + + AbstractFactory - + - + make_a() const = 0 : std::unique_ptr<ProductA> - + - + make_b() const = 0 : std::unique_ptr<ProductB> - - + + Factory1 - + - + make_a() const : std::unique_ptr<ProductA> - + - + make_b() const : std::unique_ptr<ProductB> - - + + Factory2 - + - + make_a() const : std::unique_ptr<ProductA> - + - + make_b() const : std::unique_ptr<ProductB> diff --git a/docs/test_cases/t00020_class_mermaid.svg b/docs/test_cases/t00020_class_mermaid.svg index 92003c4d..f91290f7 100644 --- a/docs/test_cases/t00020_class_mermaid.svg +++ b/docs/test_cases/t00020_class_mermaid.svg @@ -186,7 +186,7 @@ - + @@ -215,7 +215,7 @@ - + @@ -239,7 +239,7 @@ - + @@ -263,7 +263,7 @@ - + @@ -292,7 +292,7 @@ - + @@ -316,7 +316,7 @@ - + @@ -340,7 +340,7 @@ - + @@ -369,7 +369,7 @@ - + @@ -398,7 +398,7 @@ - + diff --git a/docs/test_cases/t00021_class.svg b/docs/test_cases/t00021_class.svg index 7e3bb5ce..927ec4dc 100644 --- a/docs/test_cases/t00021_class.svg +++ b/docs/test_cases/t00021_class.svg @@ -1,6 +1,6 @@ - + @@ -9,152 +9,152 @@ - - + + Visitor - + - + ~Visitor() constexpr = default : void - + - + visit_A(const A & item) const = 0 : void - + - + visit_B(const B & item) const = 0 : void - - + + Visitor1 - + - + visit_A(const A & item) const : void - + - + visit_B(const B & item) const : void - - + + Visitor2 - + - + visit_A(const A & item) const : void - + - + visit_B(const B & item) const : void - - + + Visitor3 - + - + visit_A(const A & item) const : void - + - + visit_B(const B & item) const : void - - + + Item - + - + ~Item() constexpr = default : void - + - + accept(const Visitor & visitor) const = 0 : void - - + + A - + - + accept(const Visitor & visitor) const : void - - + + B - + - + accept(const Visitor & visitor) const : void diff --git a/docs/test_cases/t00021_class_mermaid.svg b/docs/test_cases/t00021_class_mermaid.svg index 77dd2160..ee86cc1e 100644 --- a/docs/test_cases/t00021_class_mermaid.svg +++ b/docs/test_cases/t00021_class_mermaid.svg @@ -236,7 +236,7 @@ - + @@ -270,7 +270,7 @@ - + @@ -299,7 +299,7 @@ - + @@ -328,7 +328,7 @@ - + @@ -357,7 +357,7 @@ - + @@ -386,7 +386,7 @@ - + @@ -410,7 +410,7 @@ - + diff --git a/docs/test_cases/t00022_class.svg b/docs/test_cases/t00022_class.svg index 3328d458..f6bc3ba1 100644 --- a/docs/test_cases/t00022_class.svg +++ b/docs/test_cases/t00022_class.svg @@ -1,6 +1,6 @@ - + @@ -9,76 +9,76 @@ - - + + A - + - + method1() = 0 : void - + - + method2() = 0 : void - + - + template_method() : void - - + + A1 - + - + method1() : void - + - + method2() : void - - + + A2 - + - + method1() : void - + - + method2() : void diff --git a/docs/test_cases/t00022_class_mermaid.svg b/docs/test_cases/t00022_class_mermaid.svg index b6b302fd..695ef313 100644 --- a/docs/test_cases/t00022_class_mermaid.svg +++ b/docs/test_cases/t00022_class_mermaid.svg @@ -74,7 +74,7 @@ - + @@ -108,7 +108,7 @@ - + @@ -137,7 +137,7 @@ - + diff --git a/docs/test_cases/t00023_class.svg b/docs/test_cases/t00023_class.svg index 3dcfd92e..86a5fa81 100644 --- a/docs/test_cases/t00023_class.svg +++ b/docs/test_cases/t00023_class.svg @@ -1,6 +1,6 @@ - + @@ -9,102 +9,102 @@ - - + + Strategy - + - + ~Strategy() constexpr = default : void - + - + algorithm() = 0 : void - - + + StrategyA - + - + algorithm() : void - - + + StrategyB - + - + algorithm() : void - - + + StrategyC - + - + algorithm() : void - - + + Context - + - + Context(std::unique_ptr<Strategy> strategy) : void - + - + apply() : void - + - + m_strategy : std::unique_ptr<Strategy> diff --git a/docs/test_cases/t00023_class_mermaid.svg b/docs/test_cases/t00023_class_mermaid.svg index f4a6bf11..909fbbec 100644 --- a/docs/test_cases/t00023_class_mermaid.svg +++ b/docs/test_cases/t00023_class_mermaid.svg @@ -96,7 +96,7 @@ - + @@ -125,7 +125,7 @@ - + @@ -149,7 +149,7 @@ - + @@ -173,7 +173,7 @@ - + @@ -197,7 +197,7 @@ - + diff --git a/docs/test_cases/t00024_class.svg b/docs/test_cases/t00024_class.svg index 35bf6f75..e93124d4 100644 --- a/docs/test_cases/t00024_class.svg +++ b/docs/test_cases/t00024_class.svg @@ -1,6 +1,6 @@ - + @@ -9,115 +9,115 @@ - - + + Target - + - + ~Target() = 0 : void - + - + m1() = 0 : void - + - + m2() = 0 : void - - + + Target1 - + - + m1() : void - + - + m2() : void - - + + Target2 - + - + m1() : void - + - + m2() : void - - + + Proxy - + - + Proxy(std::shared_ptr<Target> target) : void - + - + m1() : void - + - + m2() : void - + - + m_target : std::shared_ptr<Target> diff --git a/docs/test_cases/t00024_class_mermaid.svg b/docs/test_cases/t00024_class_mermaid.svg index 65a0e3ff..397bd553 100644 --- a/docs/test_cases/t00024_class_mermaid.svg +++ b/docs/test_cases/t00024_class_mermaid.svg @@ -96,7 +96,7 @@ - + @@ -130,7 +130,7 @@ - + @@ -159,7 +159,7 @@ - + @@ -188,7 +188,7 @@ - + diff --git a/docs/test_cases/t00025_class.svg b/docs/test_cases/t00025_class.svg index 87a02d59..c53d91e8 100644 --- a/docs/test_cases/t00025_class.svg +++ b/docs/test_cases/t00025_class.svg @@ -1,6 +1,6 @@ - + @@ -9,52 +9,52 @@ - - + + Target1 - + - + m1() : void - + - + m2() : void - - + + Target2 - + - + m1() : void - + - + m2() : void - - + + Proxy @@ -62,38 +62,38 @@ T - + - + Proxy(std::shared_ptr<T> target) : void - + - + m1() : void - + - + m2() : void - + - + m_target : std::shared_ptr<T> - - + + Proxy @@ -102,8 +102,8 @@ - - + + Proxy @@ -112,26 +112,26 @@ - - + + ProxyHolder - + - + proxy1 : Proxy<Target1> - + - + proxy2 : Proxy<Target2> diff --git a/docs/test_cases/t00025_class_mermaid.svg b/docs/test_cases/t00025_class_mermaid.svg index 5b7d3843..17e2bdaf 100644 --- a/docs/test_cases/t00025_class_mermaid.svg +++ b/docs/test_cases/t00025_class_mermaid.svg @@ -126,7 +126,7 @@ - + @@ -155,7 +155,7 @@ - + @@ -184,7 +184,7 @@ - + @@ -223,7 +223,7 @@ - + @@ -242,7 +242,7 @@ - + @@ -261,7 +261,7 @@ - + diff --git a/docs/test_cases/t00026_class.svg b/docs/test_cases/t00026_class.svg index 74d0db81..a96136ef 100644 --- a/docs/test_cases/t00026_class.svg +++ b/docs/test_cases/t00026_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + Memento @@ -18,31 +18,31 @@ T - + - + Memento(T && v) : void - + - + value() const : T - + - + m_value : T - - + + Originator @@ -50,52 +50,52 @@ T - + - + Originator(T && v) : void - + - + load(const Memento<T> & m) : void - + - + memoize_value() const : Memento<T> - + - + print() const : void - + - + set(T && v) : void - + - + m_value : T - - + + Caretaker @@ -103,30 +103,30 @@ T - + - + set_state(const std::string & s, Memento<T> && m) : void - + - + state(const std::string & n) : Memento<T> & - + - + m_mementos : std::unordered_map<std::string,Memento<T>> - - + + Caretaker @@ -135,8 +135,8 @@ - - + + Originator @@ -145,26 +145,26 @@ - - + + StringMemento - + - + caretaker : Caretaker<std::string> - + - + originator : Originator<std::string> diff --git a/docs/test_cases/t00026_class_mermaid.svg b/docs/test_cases/t00026_class_mermaid.svg index d8a96909..4665d556 100644 --- a/docs/test_cases/t00026_class_mermaid.svg +++ b/docs/test_cases/t00026_class_mermaid.svg @@ -126,7 +126,7 @@ - + @@ -160,7 +160,7 @@ - + @@ -209,7 +209,7 @@ - + @@ -243,7 +243,7 @@ - + @@ -262,7 +262,7 @@ - + @@ -281,7 +281,7 @@ - + diff --git a/docs/test_cases/t00027.md b/docs/test_cases/t00027.md index c289e0ad..e31c4b8a 100644 --- a/docs/test_cases/t00027.md +++ b/docs/test_cases/t00027.md @@ -190,7 +190,7 @@ struct Window { "access": "public", "id": "2184609081997324211", "is_virtual": false, - "name": "T>" + "name": "clanguml::t00027::Line::T" } ], "display_name": "Line...>", @@ -281,7 +281,7 @@ struct Window { "access": "public", "id": "2247508827463056747", "is_virtual": false, - "name": "T>" + "name": "clanguml::t00027::Text::T" } ], "display_name": "Text...>", diff --git a/docs/test_cases/t00027_class.svg b/docs/test_cases/t00027_class.svg index 1810ab78..4264c93b 100644 --- a/docs/test_cases/t00027_class.svg +++ b/docs/test_cases/t00027_class.svg @@ -1,6 +1,6 @@ - + @@ -9,39 +9,39 @@ - - + + Shape - + - + ~Shape() constexpr = default : void - + - + display() = 0 : void - - + + Line - - + + Line @@ -49,24 +49,24 @@ T<>... - + - + display() : void - - + + Text - - + + Text @@ -74,31 +74,31 @@ T<>... - + - + display() : void - - + + ShapeDecorator - + - + display() = 0 : void - - + + Color @@ -106,16 +106,16 @@ T - + - + display() : void - - + + Weight @@ -123,16 +123,16 @@ T - + - + display() : void - - + + Line @@ -141,8 +141,8 @@ - - + + Line @@ -151,8 +151,8 @@ - - + + Text @@ -161,8 +161,8 @@ - - + + Text @@ -171,40 +171,40 @@ - - + + Window - + - + border : Line<Color,Weight> - + - + description : Text<Color> - + - + divider : Line<Color> - + - + title : Text<Color,Weight> diff --git a/docs/test_cases/t00027_class_mermaid.svg b/docs/test_cases/t00027_class_mermaid.svg index ceb8f209..b65351e2 100644 --- a/docs/test_cases/t00027_class_mermaid.svg +++ b/docs/test_cases/t00027_class_mermaid.svg @@ -190,7 +190,7 @@ - + @@ -219,7 +219,7 @@ - + @@ -238,7 +238,7 @@ - + @@ -262,7 +262,7 @@ - + @@ -281,7 +281,7 @@ - + @@ -305,7 +305,7 @@ - + @@ -329,7 +329,7 @@ - + @@ -353,7 +353,7 @@ - + @@ -377,7 +377,7 @@ - + @@ -396,7 +396,7 @@ - + @@ -415,7 +415,7 @@ - + @@ -434,7 +434,7 @@ - + @@ -453,7 +453,7 @@ - + diff --git a/docs/test_cases/t00028_class.svg b/docs/test_cases/t00028_class.svg index bd726d1b..0871bb23 100644 --- a/docs/test_cases/t00028_class.svg +++ b/docs/test_cases/t00028_class.svg @@ -1,6 +1,6 @@ - + @@ -9,54 +9,54 @@ - - + + A - + A class note. - - + + B - + B class note. - - + + C - + C class note. - - + + D - + D class note. - - + + E @@ -65,26 +65,26 @@ - + - + param : T - + E template class note. - - + + G - - + + F @@ -94,11 +94,11 @@ three - + F enum note. - - + + E @@ -107,70 +107,70 @@ - - + + R - + - + R(C & c) : void - + - + aaa : A - + - + bbb : B * - + - + ccc : C & - + - + ddd : std::vector<std::shared_ptr<D>> - + - + eee : E<int> - + - + ggg : G ** - + R class note. - + R contains an instance of A. - + Reference to C. diff --git a/docs/test_cases/t00028_class_mermaid.svg b/docs/test_cases/t00028_class_mermaid.svg index bf01c53f..b769d8e0 100644 --- a/docs/test_cases/t00028_class_mermaid.svg +++ b/docs/test_cases/t00028_class_mermaid.svg @@ -218,7 +218,7 @@ - + @@ -237,7 +237,7 @@ - + @@ -256,7 +256,7 @@ - + @@ -275,7 +275,7 @@ - + @@ -294,7 +294,7 @@ - + @@ -318,7 +318,7 @@ - + @@ -337,7 +337,7 @@ - + @@ -371,7 +371,7 @@ - + @@ -390,7 +390,7 @@ - + diff --git a/docs/test_cases/t00029_class.svg b/docs/test_cases/t00029_class.svg index 85a7e9e7..e91c381a 100644 --- a/docs/test_cases/t00029_class.svg +++ b/docs/test_cases/t00029_class.svg @@ -1,6 +1,6 @@ - + @@ -9,16 +9,16 @@ - - + + A - - + + C @@ -27,30 +27,30 @@ - + - + param : T - - + + D - + - + param : T - - + + E @@ -60,65 +60,65 @@ three - - + + G1 - - + + G2 - - + + G3 - - + + G4 - - + + R - + - + g1 : G1 - + - + g3 : G3 & - + - + g4 : std::shared_ptr<G4> diff --git a/docs/test_cases/t00029_class_mermaid.svg b/docs/test_cases/t00029_class_mermaid.svg index c42d14d5..7eecdc33 100644 --- a/docs/test_cases/t00029_class_mermaid.svg +++ b/docs/test_cases/t00029_class_mermaid.svg @@ -78,7 +78,7 @@ - + @@ -97,7 +97,7 @@ - + @@ -121,7 +121,7 @@ - + @@ -145,7 +145,7 @@ - + @@ -179,7 +179,7 @@ - + @@ -198,7 +198,7 @@ - + @@ -217,7 +217,7 @@ - + @@ -236,7 +236,7 @@ - + @@ -255,7 +255,7 @@ - + diff --git a/docs/test_cases/t00030_class.svg b/docs/test_cases/t00030_class.svg index 05447bc2..4e4874ce 100644 --- a/docs/test_cases/t00030_class.svg +++ b/docs/test_cases/t00030_class.svg @@ -1,6 +1,6 @@ - + @@ -9,87 +9,87 @@ - - + + A - - + + B - - + + C - - + + D - - + + E - - + + R - + - + aaa : A - + - + bbb : std::vector<B> - + - + ccc : std::vector<C> - + - + ddd : D - + - + eee : E * diff --git a/docs/test_cases/t00030_class_mermaid.svg b/docs/test_cases/t00030_class_mermaid.svg index 6a7535c7..dfcd3a55 100644 --- a/docs/test_cases/t00030_class_mermaid.svg +++ b/docs/test_cases/t00030_class_mermaid.svg @@ -164,7 +164,7 @@ - + @@ -183,7 +183,7 @@ - + @@ -202,7 +202,7 @@ - + @@ -221,7 +221,7 @@ - + @@ -240,7 +240,7 @@ - + @@ -259,7 +259,7 @@ - + diff --git a/docs/test_cases/t00031_class.svg b/docs/test_cases/t00031_class.svg index 45208e98..0bdea834 100644 --- a/docs/test_cases/t00031_class.svg +++ b/docs/test_cases/t00031_class.svg @@ -1,33 +1,33 @@ - + - + - + - - - + + + A - - + + B @@ -37,8 +37,8 @@ three - - + + @@ -48,23 +48,23 @@ - + - + ttt : T - - + + D - - + + C @@ -73,47 +73,47 @@ - - + + R - + - + add_b(B b) : void - + - + aaa : A * - + - + bbb : std::vector<B> - + - + ccc : C<int> - + - + ddd : D * diff --git a/docs/test_cases/t00031_class_mermaid.svg b/docs/test_cases/t00031_class_mermaid.svg index 47698726..2b278042 100644 --- a/docs/test_cases/t00031_class_mermaid.svg +++ b/docs/test_cases/t00031_class_mermaid.svg @@ -126,7 +126,7 @@ - + @@ -145,7 +145,7 @@ - + @@ -179,7 +179,7 @@ - + @@ -203,7 +203,7 @@ - + @@ -222,7 +222,7 @@ - + @@ -241,7 +241,7 @@ - + diff --git a/docs/test_cases/t00032_class.svg b/docs/test_cases/t00032_class.svg index 98a845a5..53f95359 100644 --- a/docs/test_cases/t00032_class.svg +++ b/docs/test_cases/t00032_class.svg @@ -1,6 +1,6 @@ - + @@ -9,69 +9,69 @@ - - + + Base - - + + TBase - - + + A - + - + operator()() : void - - + + B - + - + operator()() : void - - + + C - + - + operator()() : void - - + + Overload @@ -80,15 +80,15 @@ - + - + counter : L - - + + Overload @@ -97,19 +97,19 @@ - - + + R - + - + overload : Overload<TBase,int,A,B,C> diff --git a/docs/test_cases/t00032_class_mermaid.svg b/docs/test_cases/t00032_class_mermaid.svg index 6f6fadc5..d24875b8 100644 --- a/docs/test_cases/t00032_class_mermaid.svg +++ b/docs/test_cases/t00032_class_mermaid.svg @@ -128,7 +128,7 @@ - + @@ -147,7 +147,7 @@ - + @@ -166,7 +166,7 @@ - + @@ -190,7 +190,7 @@ - + @@ -214,7 +214,7 @@ - + @@ -238,7 +238,7 @@ - + @@ -262,7 +262,7 @@ - + @@ -281,7 +281,7 @@ - + diff --git a/docs/test_cases/t00033.md b/docs/test_cases/t00033.md index 921e661a..dc2acaa3 100644 --- a/docs/test_cases/t00033.md +++ b/docs/test_cases/t00033.md @@ -221,7 +221,7 @@ struct R { "id": "1609446044604054241", "is_abstract": false, "is_nested": false, - "is_struct": false, + "is_struct": true, "is_template": true, "is_union": false, "members": [], @@ -250,7 +250,7 @@ struct R { "id": "384927316081978893", "is_abstract": false, "is_nested": false, - "is_struct": false, + "is_struct": true, "is_template": true, "is_union": false, "members": [], diff --git a/docs/test_cases/t00033_class.svg b/docs/test_cases/t00033_class.svg index 655ce973..694f28d6 100644 --- a/docs/test_cases/t00033_class.svg +++ b/docs/test_cases/t00033_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + A @@ -19,15 +19,15 @@ - + - + aaa : T - - + + B @@ -36,15 +36,15 @@ - + - + bbb : T - - + + C @@ -53,30 +53,30 @@ - + - + ccc : T - - + + D - + - + ddd : int - - + + C @@ -85,8 +85,8 @@ - - + + B @@ -95,8 +95,8 @@ - - + + A @@ -105,19 +105,19 @@ - - + + R - + - + abc : A<B<std::unique_ptr<C<D>>>> diff --git a/docs/test_cases/t00033_class_mermaid.svg b/docs/test_cases/t00033_class_mermaid.svg index 7bd2acb7..ba00f33e 100644 --- a/docs/test_cases/t00033_class_mermaid.svg +++ b/docs/test_cases/t00033_class_mermaid.svg @@ -138,7 +138,7 @@ - + @@ -162,7 +162,7 @@ - + @@ -186,7 +186,7 @@ - + @@ -210,7 +210,7 @@ - + @@ -234,7 +234,7 @@ - + @@ -253,7 +253,7 @@ - + @@ -272,7 +272,7 @@ - + @@ -291,7 +291,7 @@ - + diff --git a/docs/test_cases/t00034_class.svg b/docs/test_cases/t00034_class.svg index 49a48cfe..ad8a6b89 100644 --- a/docs/test_cases/t00034_class.svg +++ b/docs/test_cases/t00034_class.svg @@ -1,6 +1,6 @@ - + @@ -9,30 +9,30 @@ - - + + Void - + - + operator!=(const Void &) constexpr const : bool - + - + operator==(const Void &) constexpr const : bool - - + + lift_void @@ -41,8 +41,8 @@ - - + + lift_void @@ -51,8 +51,8 @@ - - + + drop_void @@ -61,8 +61,8 @@ - - + + drop_void @@ -71,34 +71,34 @@ - - + + A - - + + R - + - + la : lift_void_t<A> * - + - + lv : lift_void_t<void> * diff --git a/docs/test_cases/t00034_class_mermaid.svg b/docs/test_cases/t00034_class_mermaid.svg index 2babeaa7..9b689fd3 100644 --- a/docs/test_cases/t00034_class_mermaid.svg +++ b/docs/test_cases/t00034_class_mermaid.svg @@ -102,7 +102,7 @@ - + @@ -131,7 +131,7 @@ - + @@ -150,7 +150,7 @@ - + @@ -169,7 +169,7 @@ - + @@ -188,7 +188,7 @@ - + @@ -207,7 +207,7 @@ - + @@ -226,7 +226,7 @@ - + diff --git a/docs/test_cases/t00035_class.svg b/docs/test_cases/t00035_class.svg index 8afeb972..44b1bb26 100644 --- a/docs/test_cases/t00035_class.svg +++ b/docs/test_cases/t00035_class.svg @@ -1,6 +1,6 @@ - + @@ -9,40 +9,40 @@ - - + + Top - - + + Left - - + + Center - - + + Bottom - - + + Right diff --git a/docs/test_cases/t00035_class_mermaid.svg b/docs/test_cases/t00035_class_mermaid.svg index f2f9c322..b673ff35 100644 --- a/docs/test_cases/t00035_class_mermaid.svg +++ b/docs/test_cases/t00035_class_mermaid.svg @@ -52,7 +52,7 @@ - + @@ -71,7 +71,7 @@ - + @@ -90,7 +90,7 @@ - + @@ -109,7 +109,7 @@ - + @@ -128,7 +128,7 @@ - + diff --git a/docs/test_cases/t00036_class.svg b/docs/test_cases/t00036_class.svg index 917fc5cb..99c1b605 100644 --- a/docs/test_cases/t00036_class.svg +++ b/docs/test_cases/t00036_class.svg @@ -1,6 +1,6 @@ - + @@ -9,23 +9,23 @@ - + ns1 - + ns11 - + ns111 - + ns2 - + ns22 - - + + E @@ -34,8 +34,8 @@ yellow - - + + A @@ -44,15 +44,15 @@ - + - + a : T - - + + A @@ -61,23 +61,23 @@ - - + + B - + - + a_int : A<int> - - + + C diff --git a/docs/test_cases/t00036_class_mermaid.svg b/docs/test_cases/t00036_class_mermaid.svg index 41437a01..d3053920 100644 --- a/docs/test_cases/t00036_class_mermaid.svg +++ b/docs/test_cases/t00036_class_mermaid.svg @@ -78,7 +78,7 @@ - + @@ -107,7 +107,7 @@ - + @@ -131,7 +131,7 @@ - + @@ -155,7 +155,7 @@ - + @@ -174,7 +174,7 @@ - + diff --git a/docs/test_cases/t00037_class.svg b/docs/test_cases/t00037_class.svg index 1b8b4cf7..d5e46af2 100644 --- a/docs/test_cases/t00037_class.svg +++ b/docs/test_cases/t00037_class.svg @@ -1,6 +1,6 @@ - + @@ -9,106 +9,106 @@ - - + + ST - + - + dimensions : ST::(anonymous_662) - + - + units : ST::(anonymous_792) - - + + ST::(dimensions) - + - + t : double - + - + x : double - + - + y : double - + - + z : double - - + + ST::(units) - + - + c : double - + - + h : double - - + + A - + - + A() : void - + - + st : ST diff --git a/docs/test_cases/t00037_class_mermaid.svg b/docs/test_cases/t00037_class_mermaid.svg index 88f3b1a4..cd9dc681 100644 --- a/docs/test_cases/t00037_class_mermaid.svg +++ b/docs/test_cases/t00037_class_mermaid.svg @@ -90,7 +90,7 @@ - + @@ -119,7 +119,7 @@ - + @@ -158,7 +158,7 @@ - + @@ -187,7 +187,7 @@ - + diff --git a/docs/test_cases/t00038_class.svg b/docs/test_cases/t00038_class.svg index 434ed92c..650b16ec 100644 --- a/docs/test_cases/t00038_class.svg +++ b/docs/test_cases/t00038_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + thirdparty::ns1::color_t @@ -20,16 +20,16 @@ blue - - + + thirdparty::ns1::E - - + + property_t @@ -39,47 +39,47 @@ property_c - - + + A - - + + B - - + + C - - + + key_t - + - + key : std::string - - + + map @@ -88,8 +88,8 @@ - - + + map @@ -98,8 +98,8 @@ - - + + map @@ -108,8 +108,8 @@ - - + + map @@ -118,8 +118,8 @@ - - + + map diff --git a/docs/test_cases/t00038_class_mermaid.svg b/docs/test_cases/t00038_class_mermaid.svg index fe74e7b8..6dd38f42 100644 --- a/docs/test_cases/t00038_class_mermaid.svg +++ b/docs/test_cases/t00038_class_mermaid.svg @@ -202,7 +202,7 @@ - + @@ -236,7 +236,7 @@ - + @@ -255,7 +255,7 @@ - + @@ -289,7 +289,7 @@ - + @@ -308,7 +308,7 @@ - + @@ -327,7 +327,7 @@ - + @@ -346,7 +346,7 @@ - + @@ -370,7 +370,7 @@ - + @@ -389,7 +389,7 @@ - + @@ -408,7 +408,7 @@ - + @@ -427,7 +427,7 @@ - + @@ -446,7 +446,7 @@ - + diff --git a/docs/test_cases/t00039.md b/docs/test_cases/t00039.md index fe316946..6b60f9e7 100644 --- a/docs/test_cases/t00039.md +++ b/docs/test_cases/t00039.md @@ -440,7 +440,7 @@ template struct FFF : public FF { "access": "public", "id": "955785395599769805", "is_virtual": false, - "name": "F" + "name": "clanguml::t00039::ns3::F" } ], "display_name": "ns3::FF", @@ -495,7 +495,7 @@ template struct FFF : public FF { "access": "public", "id": "955785395599769805", "is_virtual": false, - "name": "F" + "name": "clanguml::t00039::ns3::F" } ], "display_name": "ns3::FE", @@ -550,7 +550,7 @@ template struct FFF : public FF { "access": "public", "id": "1321996888067531304", "is_virtual": false, - "name": "FF" + "name": "clanguml::t00039::ns3::FF" } ], "display_name": "ns3::FFF", diff --git a/docs/test_cases/t00039_class.svg b/docs/test_cases/t00039_class.svg index 3690d535..7933fd34 100644 --- a/docs/test_cases/t00039_class.svg +++ b/docs/test_cases/t00039_class.svg @@ -1,6 +1,6 @@ - + @@ -9,95 +9,95 @@ - - + + C - - + + D - - + + E - - + + CD - - + + DE - - + + CDE - - + + A - - + + AA - - + + AAA - + - + b : B * - - + + ns2::AAAA - - + + ns3::F @@ -106,15 +106,15 @@ - + - + t : T * - - + + ns3::FF @@ -123,15 +123,15 @@ - + - + m : M * - - + + ns3::FE @@ -140,15 +140,15 @@ - + - + m : M * - - + + ns3::FFF @@ -157,11 +157,11 @@ - + - + n : N * diff --git a/docs/test_cases/t00039_class_mermaid.svg b/docs/test_cases/t00039_class_mermaid.svg index 435b1f53..514c8848 100644 --- a/docs/test_cases/t00039_class_mermaid.svg +++ b/docs/test_cases/t00039_class_mermaid.svg @@ -184,7 +184,7 @@ - + @@ -203,7 +203,7 @@ - + @@ -222,7 +222,7 @@ - + @@ -241,7 +241,7 @@ - + @@ -260,7 +260,7 @@ - + @@ -279,7 +279,7 @@ - + @@ -298,7 +298,7 @@ - + @@ -317,7 +317,7 @@ - + @@ -336,7 +336,7 @@ - + @@ -360,7 +360,7 @@ - + @@ -379,7 +379,7 @@ - + @@ -403,7 +403,7 @@ - + @@ -427,7 +427,7 @@ - + @@ -451,7 +451,7 @@ - + diff --git a/docs/test_cases/t00040_class.svg b/docs/test_cases/t00040_class.svg index 1f59a480..b660b2b2 100644 --- a/docs/test_cases/t00040_class.svg +++ b/docs/test_cases/t00040_class.svg @@ -1,6 +1,6 @@ - + @@ -9,70 +9,70 @@ - - + + A - + - + get_a() : int - + - + ii_ : int - - + + AA - - + + AAA - + - + get_aaa() : int - + - + b : B * - - + + R - + - + foo(A * a) : void diff --git a/docs/test_cases/t00040_class_mermaid.svg b/docs/test_cases/t00040_class_mermaid.svg index 82e3afbc..23f87956 100644 --- a/docs/test_cases/t00040_class_mermaid.svg +++ b/docs/test_cases/t00040_class_mermaid.svg @@ -74,7 +74,7 @@ - + @@ -103,7 +103,7 @@ - + @@ -122,7 +122,7 @@ - + @@ -151,7 +151,7 @@ - + diff --git a/docs/test_cases/t00041_class.svg b/docs/test_cases/t00041_class.svg index bc11a084..015b1069 100644 --- a/docs/test_cases/t00041_class.svg +++ b/docs/test_cases/t00041_class.svg @@ -1,6 +1,6 @@ - + @@ -9,107 +9,107 @@ - - + + R - - + + D - + - + rr : RR * - - + + E - - + + F - - + + RR - + - + foo(H * h) : void - + - + e : E * - + - + f : F * - + - + g : detail::G * - - + + RRR - - + + ns1::N - - + + ns1::NN - - + + ns1::NM diff --git a/docs/test_cases/t00041_class_mermaid.svg b/docs/test_cases/t00041_class_mermaid.svg index 09b55765..763915c7 100644 --- a/docs/test_cases/t00041_class_mermaid.svg +++ b/docs/test_cases/t00041_class_mermaid.svg @@ -130,7 +130,7 @@ - + @@ -149,7 +149,7 @@ - + @@ -173,7 +173,7 @@ - + @@ -192,7 +192,7 @@ - + @@ -211,7 +211,7 @@ - + @@ -250,7 +250,7 @@ - + @@ -269,7 +269,7 @@ - + @@ -288,7 +288,7 @@ - + @@ -307,7 +307,7 @@ - + diff --git a/docs/test_cases/t00042_class.svg b/docs/test_cases/t00042_class.svg index ea89bd86..4dd04be6 100644 --- a/docs/test_cases/t00042_class.svg +++ b/docs/test_cases/t00042_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + A @@ -19,15 +19,15 @@ - + - + a : T - - + + A @@ -36,15 +36,15 @@ - + - + a : void * - - + + B @@ -53,22 +53,22 @@ - + - + b : T - + - + bb : K - - + + A @@ -77,8 +77,8 @@ - - + + A @@ -87,8 +87,8 @@ - - + + B diff --git a/docs/test_cases/t00042_class_mermaid.svg b/docs/test_cases/t00042_class_mermaid.svg index 6a685df8..61061ced 100644 --- a/docs/test_cases/t00042_class_mermaid.svg +++ b/docs/test_cases/t00042_class_mermaid.svg @@ -102,7 +102,7 @@ - + @@ -126,7 +126,7 @@ - + @@ -150,7 +150,7 @@ - + @@ -179,7 +179,7 @@ - + @@ -198,7 +198,7 @@ - + @@ -217,7 +217,7 @@ - + diff --git a/docs/test_cases/t00043_class.svg b/docs/test_cases/t00043_class.svg index af1fb66f..8ec69bd5 100644 --- a/docs/test_cases/t00043_class.svg +++ b/docs/test_cases/t00043_class.svg @@ -1,6 +1,6 @@ - + @@ -9,167 +9,167 @@ - + dependants - + dependencies - - + + A - - + + B - + - + b(A * a) : void - - + + BB - + - + bb(A * a) : void - - + + C - + - + c(B * b) : void - - + + D - + - + d(C * c) : void - + - + dd(BB * bb) : void - - + + E - + - + e(D * d) : void - - + + G - - + + GG - - + + H - + - + h(G * g) : void - + - + hh(GG * gg) : void - - + + I - + - + i(H * h) : void - - + + J - + - + i(I * i) : void diff --git a/docs/test_cases/t00043_class_mermaid.svg b/docs/test_cases/t00043_class_mermaid.svg index bafa8736..d322499f 100644 --- a/docs/test_cases/t00043_class_mermaid.svg +++ b/docs/test_cases/t00043_class_mermaid.svg @@ -174,7 +174,7 @@ - + @@ -193,7 +193,7 @@ - + @@ -217,7 +217,7 @@ - + @@ -241,7 +241,7 @@ - + @@ -265,7 +265,7 @@ - + @@ -294,7 +294,7 @@ - + @@ -318,7 +318,7 @@ - + @@ -337,7 +337,7 @@ - + @@ -356,7 +356,7 @@ - + @@ -385,7 +385,7 @@ - + @@ -409,7 +409,7 @@ - + diff --git a/docs/test_cases/t00044.md b/docs/test_cases/t00044.md index e11b072d..a4ecf101 100644 --- a/docs/test_cases/t00044.md +++ b/docs/test_cases/t00044.md @@ -20,7 +20,7 @@ namespace clanguml::t00044 { template class sink; -template class signal_handler; +template struct signal_handler; template class sink> { @@ -39,7 +39,7 @@ private: }; template -class signal_handler { }; +struct signal_handler { }; template sink(signal_handler &) @@ -69,7 +69,7 @@ struct R { "id": "1591729735727316875", "is_abstract": false, "is_nested": false, - "is_struct": false, + "is_struct": true, "is_template": true, "is_union": false, "members": [], @@ -235,7 +235,7 @@ struct R { "id": "103559998624864011", "is_abstract": false, "is_nested": false, - "is_struct": false, + "is_struct": true, "is_template": true, "is_union": false, "members": [], @@ -371,7 +371,7 @@ struct R { "id": "276594465967577895", "is_abstract": false, "is_nested": false, - "is_struct": false, + "is_struct": true, "is_template": true, "is_union": false, "members": [], @@ -379,7 +379,7 @@ struct R { "name": "signal_handler", "namespace": "clanguml::t00044", "source_location": { - "column": 41, + "column": 42, "file": "t00044.cc", "line": 6, "translation_unit": "t00044.cc" diff --git a/docs/test_cases/t00044_class.svg b/docs/test_cases/t00044_class.svg index 67538079..f745655a 100644 --- a/docs/test_cases/t00044_class.svg +++ b/docs/test_cases/t00044_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + signal_handler @@ -19,8 +19,8 @@ - - + + sink @@ -28,26 +28,26 @@ signal_handler<Ret(Args...),A> - + - + sink(signal_t & sh) : void get_signal<CastTo>() : CastTo * - + - + signal : signal_t * - - + + signal_handler @@ -56,8 +56,8 @@ - - + + sink @@ -66,23 +66,23 @@ - - + + R - + - + sink1 : sink<signal_handler<void (int),bool>> - - + + signal_handler @@ -91,8 +91,8 @@ - - + + sink diff --git a/docs/test_cases/t00044_class_mermaid.svg b/docs/test_cases/t00044_class_mermaid.svg index 049ce887..fbe23c30 100644 --- a/docs/test_cases/t00044_class_mermaid.svg +++ b/docs/test_cases/t00044_class_mermaid.svg @@ -138,7 +138,7 @@ - + @@ -157,7 +157,7 @@ - + @@ -191,7 +191,7 @@ - + @@ -210,7 +210,7 @@ - + @@ -229,7 +229,7 @@ - + @@ -253,7 +253,7 @@ - + @@ -272,7 +272,7 @@ - + diff --git a/docs/test_cases/t00045_class.svg b/docs/test_cases/t00045_class.svg index 04eb02c3..ebf3a8af 100644 --- a/docs/test_cases/t00045_class.svg +++ b/docs/test_cases/t00045_class.svg @@ -1,6 +1,6 @@ - + @@ -9,32 +9,32 @@ - - + + A - - + + AA - - + + AAA - - + + AAAA @@ -43,110 +43,110 @@ - + - + t : T - - + + ns1::A - - + + ns1::ns2::A - - + + ns1::ns2::B - - + + ns1::ns2::C - - + + ns1::ns2::D - - + + ns1::ns2::E - - + + ns1::ns2::AAA - - + + ns1::ns2::R - + - + foo(AA & aa) : void - + - + a : A * - + - + ns1_a : ns1::A * - + - + ns1_ns2_a : ns1::ns2::A * - + - + root_a : ::A * diff --git a/docs/test_cases/t00045_class_mermaid.svg b/docs/test_cases/t00045_class_mermaid.svg index d4b81a7a..999a21ad 100644 --- a/docs/test_cases/t00045_class_mermaid.svg +++ b/docs/test_cases/t00045_class_mermaid.svg @@ -166,7 +166,7 @@ - + @@ -185,7 +185,7 @@ - + @@ -204,7 +204,7 @@ - + @@ -223,7 +223,7 @@ - + @@ -247,7 +247,7 @@ - + @@ -266,7 +266,7 @@ - + @@ -285,7 +285,7 @@ - + @@ -304,7 +304,7 @@ - + @@ -323,7 +323,7 @@ - + @@ -342,7 +342,7 @@ - + @@ -361,7 +361,7 @@ - + @@ -380,7 +380,7 @@ - + diff --git a/docs/test_cases/t00046_class.svg b/docs/test_cases/t00046_class.svg index 85046385..9862c447 100644 --- a/docs/test_cases/t00046_class.svg +++ b/docs/test_cases/t00046_class.svg @@ -1,6 +1,6 @@ - + @@ -9,120 +9,120 @@ - + ns1 - + ns2 - - + + A - - + + A - - + + B - - + + C - - + + D - - + + E - - + + R - + - + foo(AA & aa) : void - + - + a : A * - + - + i : std::vector<std::uint8_t> - + - + ns1_a : ns1::A * - + - + ns1_ns2_a : ns1::ns2::A * - + - + root_a : ::A * - - + + A - - + + AA diff --git a/docs/test_cases/t00046_class_mermaid.svg b/docs/test_cases/t00046_class_mermaid.svg index b63ebf3e..eddfc3b8 100644 --- a/docs/test_cases/t00046_class_mermaid.svg +++ b/docs/test_cases/t00046_class_mermaid.svg @@ -154,7 +154,7 @@ - + @@ -173,7 +173,7 @@ - + @@ -192,7 +192,7 @@ - + @@ -211,7 +211,7 @@ - + @@ -230,7 +230,7 @@ - + @@ -249,7 +249,7 @@ - + @@ -268,7 +268,7 @@ - + @@ -287,7 +287,7 @@ - + @@ -306,7 +306,7 @@ - + diff --git a/docs/test_cases/t00047_class.svg b/docs/test_cases/t00047_class.svg index db457d66..5c54b585 100644 --- a/docs/test_cases/t00047_class.svg +++ b/docs/test_cases/t00047_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + conditional_t @@ -19,8 +19,8 @@ - - + + conditional_t @@ -29,8 +29,8 @@ - - + + conditional_t @@ -39,8 +39,8 @@ - - + + conditional_t diff --git a/docs/test_cases/t00047_class_mermaid.svg b/docs/test_cases/t00047_class_mermaid.svg index 6954c516..fc0e805c 100644 --- a/docs/test_cases/t00047_class_mermaid.svg +++ b/docs/test_cases/t00047_class_mermaid.svg @@ -90,7 +90,7 @@ - + @@ -109,7 +109,7 @@ - + @@ -128,7 +128,7 @@ - + @@ -147,7 +147,7 @@ - + diff --git a/docs/test_cases/t00048.md b/docs/test_cases/t00048.md index c42e151d..53abd167 100644 --- a/docs/test_cases/t00048.md +++ b/docs/test_cases/t00048.md @@ -332,7 +332,7 @@ template struct BaseTemplate { "access": "public", "id": "630197772543569536", "is_virtual": false, - "name": "BaseTemplate" + "name": "clanguml::t00048::BaseTemplate" } ], "display_name": "BTemplate", @@ -477,7 +477,7 @@ template struct BaseTemplate { "access": "public", "id": "630197772543569536", "is_virtual": false, - "name": "BaseTemplate" + "name": "clanguml::t00048::BaseTemplate" } ], "display_name": "ATemplate", diff --git a/docs/test_cases/t00048_class.svg b/docs/test_cases/t00048_class.svg index 1e4d98ef..caac6ebd 100644 --- a/docs/test_cases/t00048_class.svg +++ b/docs/test_cases/t00048_class.svg @@ -1,6 +1,6 @@ - + @@ -9,30 +9,30 @@ - - + + Base - + - + foo() = 0 : void - + - + base : int - - + + BaseTemplate @@ -40,45 +40,45 @@ T - + - + foo() = 0 : void - + - + base : T - - + + B - + - + foo() : void - + - + b : int - - + + BTemplate @@ -86,45 +86,45 @@ T - + - + foo() : void - + - + b : T - - + + A - + - + foo() : void - + - + a : int - - + + ATemplate @@ -132,19 +132,19 @@ T - + - + foo() : void - + - + a : T diff --git a/docs/test_cases/t00048_class_mermaid.svg b/docs/test_cases/t00048_class_mermaid.svg index c987436e..c89d7301 100644 --- a/docs/test_cases/t00048_class_mermaid.svg +++ b/docs/test_cases/t00048_class_mermaid.svg @@ -94,7 +94,7 @@ - + @@ -123,7 +123,7 @@ - + @@ -152,7 +152,7 @@ - + @@ -181,7 +181,7 @@ - + @@ -210,7 +210,7 @@ - + @@ -239,7 +239,7 @@ - + diff --git a/docs/test_cases/t00049_class.svg b/docs/test_cases/t00049_class.svg index 2a95a451..0d1605b1 100644 --- a/docs/test_cases/t00049_class.svg +++ b/docs/test_cases/t00049_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + A @@ -18,23 +18,23 @@ T - + - + get_a() : T & - + - + a : T - - + + A @@ -43,8 +43,8 @@ - - + + A @@ -53,8 +53,8 @@ - - + + A @@ -63,47 +63,47 @@ - - + + R - + - + get_int_map() : A<intmap> - + - + set_int_map(A<intmap> && int_map) : void - + - + a_int_map : A<intmap> - + - + a_string : A<thestring> - + - + a_vector_string : A<string_vector> diff --git a/docs/test_cases/t00049_class_mermaid.svg b/docs/test_cases/t00049_class_mermaid.svg index 5ae87ae2..fb81e781 100644 --- a/docs/test_cases/t00049_class_mermaid.svg +++ b/docs/test_cases/t00049_class_mermaid.svg @@ -126,7 +126,7 @@ - + @@ -155,7 +155,7 @@ - + @@ -174,7 +174,7 @@ - + @@ -193,7 +193,7 @@ - + @@ -212,7 +212,7 @@ - + diff --git a/docs/test_cases/t00050_class.svg b/docs/test_cases/t00050_class.svg index 2de17019..2ffd3d0c 100644 --- a/docs/test_cases/t00050_class.svg +++ b/docs/test_cases/t00050_class.svg @@ -1,6 +1,6 @@ - + @@ -9,40 +9,40 @@ - - + + A - - + + B - - + + C - - + + utils::D - - + + E @@ -52,8 +52,8 @@ E3 - - + + F @@ -62,43 +62,43 @@ - + - + t : T[N] - + - + v : V - - + + G - - + + NoComment - + Lorem ipsum dolor sit - + Lorem ipsum dolor sit - + Lorem ipsum dolor sit amet consectetur adipiscing elit, urna consequat felis vehicula class ultricies mollis dictumst, aenean non a in donec nulla. @@ -125,50 +125,50 @@ imperdiet praesent magnis ridiculus congue gravida curabitur dictum sagittis, enim et magna sit inceptos sodales parturient pharetra mollis, aenean vel nostra tellus commodo pretium sapien sociosqu. - + This is a short description of class G. - + This is an intermediate description of class G. - + This is a long description of class G. - + Lorem ipsum - + TODO 1. Write meaningful comment - + TODO 2. Write tests - + TODO 3. Implement - + Long comment example - + TODO Implement... - + Simple array wrapper. - + Template parameters diff --git a/docs/test_cases/t00050_class_mermaid.svg b/docs/test_cases/t00050_class_mermaid.svg index fc0b293b..140c1ecf 100644 --- a/docs/test_cases/t00050_class_mermaid.svg +++ b/docs/test_cases/t00050_class_mermaid.svg @@ -184,7 +184,7 @@ - + @@ -203,7 +203,7 @@ - + @@ -222,7 +222,7 @@ - + @@ -241,7 +241,7 @@ - + @@ -260,7 +260,7 @@ - + @@ -294,7 +294,7 @@ - + @@ -323,7 +323,7 @@ - + @@ -342,7 +342,7 @@ - + diff --git a/docs/test_cases/t00051_class.svg b/docs/test_cases/t00051_class.svg index 4bbdc77c..ba678166 100644 --- a/docs/test_cases/t00051_class.svg +++ b/docs/test_cases/t00051_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + B @@ -18,45 +18,45 @@ F,FF=F - + - + B(F && f, FF && ff) : void - + - + f() : void - + - + ff() : void - + - + f_ : F - + - + ff_ : FF - - + + B @@ -64,81 +64,81 @@ (lambda at t00051.cc:43:18),(lambda at t00051.cc:43:27) - + - + B((lambda at t00051.cc:43:18) && f, (lambda at t00051.cc:43:27) && ff) : void - + - + f() : void - + - + ff() : void - + - + f_ : (lambda at t00051.cc:43:18) - + - + ff_ : (lambda at t00051.cc:43:27) - - + + A - + - + get_function() : (lambda at t00051.cc:48:16) - + - + start_thread1() : custom_thread1 - + - + start_thread2() : custom_thread2 - + - + start_thread3() : B<(lambda at t00051.cc:43:18),(lambda at t00051.cc:43:27)> - - + + A::custom_thread1 @@ -147,18 +147,18 @@ custom_thread1<Function,Args...>(Function && f, Args &&... args) : void - - + + A::custom_thread2 - + - + thread((lambda at t00051.cc:59:27) &&) : void diff --git a/docs/test_cases/t00051_class_mermaid.svg b/docs/test_cases/t00051_class_mermaid.svg index dc4945c3..cd39e67d 100644 --- a/docs/test_cases/t00051_class_mermaid.svg +++ b/docs/test_cases/t00051_class_mermaid.svg @@ -102,7 +102,7 @@ - + @@ -146,7 +146,7 @@ - + @@ -190,7 +190,7 @@ - + @@ -229,7 +229,7 @@ - + @@ -253,7 +253,7 @@ - + diff --git a/docs/test_cases/t00052_class.svg b/docs/test_cases/t00052_class.svg index 566225d4..d6fda475 100644 --- a/docs/test_cases/t00052_class.svg +++ b/docs/test_cases/t00052_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + A @@ -21,8 +21,8 @@ aa<F,Q>(F && f, Q q) : void - - + + B @@ -30,18 +30,18 @@ T - + - + b(T t) : T bb<F>(F && f, T t) : T - - + + C @@ -52,8 +52,8 @@ c<P>(P p) : T - - + + B @@ -62,8 +62,8 @@ - - + + C @@ -72,33 +72,33 @@ - - + + R - + - + a : A - + - + b : B<int> - + - + c : C<int> diff --git a/docs/test_cases/t00052_class_mermaid.svg b/docs/test_cases/t00052_class_mermaid.svg index 3e3cb624..69eb6e3a 100644 --- a/docs/test_cases/t00052_class_mermaid.svg +++ b/docs/test_cases/t00052_class_mermaid.svg @@ -114,7 +114,7 @@ - + @@ -143,7 +143,7 @@ - + @@ -172,7 +172,7 @@ - + @@ -196,7 +196,7 @@ - + @@ -215,7 +215,7 @@ - + @@ -234,7 +234,7 @@ - + diff --git a/docs/test_cases/t00053_class.svg b/docs/test_cases/t00053_class.svg index 78016ebc..2704590d 100644 --- a/docs/test_cases/t00053_class.svg +++ b/docs/test_cases/t00053_class.svg @@ -1,6 +1,6 @@ - + @@ -9,72 +9,72 @@ - - + + A - - + + C - - + + E - - + + F - - + + a - - + + c - - + + e - - + + f - - + + h @@ -82,8 +82,8 @@ hhh - - + + j @@ -91,56 +91,56 @@ jjj - - + + b - - + + d - - + + g - - + + B - - + + D - - + + G - - + + i diff --git a/docs/test_cases/t00053_class_mermaid.svg b/docs/test_cases/t00053_class_mermaid.svg index 579e02d2..389cda53 100644 --- a/docs/test_cases/t00053_class_mermaid.svg +++ b/docs/test_cases/t00053_class_mermaid.svg @@ -52,7 +52,7 @@ - + @@ -71,7 +71,7 @@ - + @@ -90,7 +90,7 @@ - + @@ -109,7 +109,7 @@ - + @@ -128,7 +128,7 @@ - + @@ -147,7 +147,7 @@ - + @@ -166,7 +166,7 @@ - + @@ -190,7 +190,7 @@ - + @@ -209,7 +209,7 @@ - + @@ -228,7 +228,7 @@ - + @@ -247,7 +247,7 @@ - + @@ -266,7 +266,7 @@ - + @@ -285,7 +285,7 @@ - + @@ -304,7 +304,7 @@ - + @@ -323,7 +323,7 @@ - + @@ -342,7 +342,7 @@ - + @@ -366,7 +366,7 @@ - + diff --git a/docs/test_cases/t00054_class.svg b/docs/test_cases/t00054_class.svg index 24bea75a..e717f8fb 100644 --- a/docs/test_cases/t00054_class.svg +++ b/docs/test_cases/t00054_class.svg @@ -1,6 +1,6 @@ - + @@ -9,28 +9,28 @@ - + detail - + detail2 - + detail3 - + detail4 - - + + d - - + + a @@ -40,8 +40,8 @@ - - + + c @@ -51,8 +51,8 @@ - - + + e @@ -62,40 +62,40 @@ - - + + C - - + + F - - + + D - - + + E - - + + A @@ -104,8 +104,8 @@ - - + + B @@ -114,8 +114,8 @@ - - + + f @@ -124,8 +124,8 @@ - - + + G @@ -133,8 +133,8 @@ - - + + h @@ -143,8 +143,8 @@ hhh - - + + i @@ -153,8 +153,8 @@ iii - - + + j @@ -163,16 +163,16 @@ jjj - - + + b - - + + g diff --git a/docs/test_cases/t00054_class_mermaid.svg b/docs/test_cases/t00054_class_mermaid.svg index 1cfc22f0..c38209c0 100644 --- a/docs/test_cases/t00054_class_mermaid.svg +++ b/docs/test_cases/t00054_class_mermaid.svg @@ -52,7 +52,7 @@ - + @@ -71,7 +71,7 @@ - + @@ -90,7 +90,7 @@ - + @@ -109,7 +109,7 @@ - + @@ -128,7 +128,7 @@ - + @@ -147,7 +147,7 @@ - + @@ -166,7 +166,7 @@ - + @@ -185,7 +185,7 @@ - + @@ -204,7 +204,7 @@ - + @@ -223,7 +223,7 @@ - + @@ -242,7 +242,7 @@ - + @@ -261,7 +261,7 @@ - + @@ -280,7 +280,7 @@ - + @@ -304,7 +304,7 @@ - + @@ -328,7 +328,7 @@ - + @@ -352,7 +352,7 @@ - + @@ -371,7 +371,7 @@ - + diff --git a/docs/test_cases/t00055_class.svg b/docs/test_cases/t00055_class.svg index c733fb17..2b002e9e 100644 --- a/docs/test_cases/t00055_class.svg +++ b/docs/test_cases/t00055_class.svg @@ -1,6 +1,6 @@ - + @@ -9,80 +9,80 @@ - - + + A - - + + B - - + + C - - + + D - - + + E - - + + F - - + + G - - + + H - - + + I - - + + J diff --git a/docs/test_cases/t00055_class_mermaid.svg b/docs/test_cases/t00055_class_mermaid.svg index ac2b128c..684191c6 100644 --- a/docs/test_cases/t00055_class_mermaid.svg +++ b/docs/test_cases/t00055_class_mermaid.svg @@ -52,7 +52,7 @@ - + @@ -71,7 +71,7 @@ - + @@ -90,7 +90,7 @@ - + @@ -109,7 +109,7 @@ - + @@ -128,7 +128,7 @@ - + @@ -147,7 +147,7 @@ - + @@ -166,7 +166,7 @@ - + @@ -185,7 +185,7 @@ - + @@ -204,7 +204,7 @@ - + @@ -223,7 +223,7 @@ - + diff --git a/docs/test_cases/t00056_class.svg b/docs/test_cases/t00056_class.svg index 02e702a6..18eecf77 100644 --- a/docs/test_cases/t00056_class.svg +++ b/docs/test_cases/t00056_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + «concept» @@ -20,8 +20,8 @@ - - + + «concept» @@ -33,8 +33,8 @@ sizeof (l) > sizeof (r) - - + + «concept» @@ -44,8 +44,8 @@ - - + + «concept» @@ -58,8 +58,8 @@ container.begin() container.end() - - + + «concept» @@ -71,8 +71,8 @@ typename T::value_type - - + + «concept» @@ -86,8 +86,8 @@ {std::to_string(s)} noexcept {std::to_string(s)} -> std::same_as<std::string> - - + + «concept» @@ -97,8 +97,8 @@ - - + + «concept» @@ -108,8 +108,8 @@ - - + + A @@ -118,15 +118,15 @@ - + - + a : T - - + + B @@ -135,15 +135,15 @@ - + - + b : T - - + + C @@ -152,15 +152,15 @@ - + - + c : T - - + + D @@ -169,8 +169,8 @@ - - + + E @@ -179,29 +179,29 @@ - + - + e1 : T1 - + - + e2 : T2 - + - + e3 : T3 - - + + F @@ -210,25 +210,25 @@ - + - + f1 : T1 - + - + f2 : T2 - + - + f3 : T3 diff --git a/docs/test_cases/t00056_class_mermaid.svg b/docs/test_cases/t00056_class_mermaid.svg index a57e180e..368b9e32 100644 --- a/docs/test_cases/t00056_class_mermaid.svg +++ b/docs/test_cases/t00056_class_mermaid.svg @@ -222,7 +222,7 @@ - + @@ -241,7 +241,7 @@ - + @@ -270,7 +270,7 @@ - + @@ -289,7 +289,7 @@ - + @@ -323,7 +323,7 @@ - + @@ -352,7 +352,7 @@ - + @@ -391,7 +391,7 @@ - + @@ -410,7 +410,7 @@ - + @@ -429,7 +429,7 @@ - + @@ -453,7 +453,7 @@ - + @@ -477,7 +477,7 @@ - + @@ -501,7 +501,7 @@ - + @@ -520,7 +520,7 @@ - + @@ -554,7 +554,7 @@ - + diff --git a/docs/test_cases/t00057_class.svg b/docs/test_cases/t00057_class.svg index 5f2e931d..13e31071 100644 --- a/docs/test_cases/t00057_class.svg +++ b/docs/test_cases/t00057_class.svg @@ -1,6 +1,6 @@ - + @@ -9,53 +9,53 @@ - - + + t00057_A - + - + a1 : int - - + + t00057_B - + - + b1 : int - - + + t00057_C - + - + c1 : int - - + + «union» @@ -63,73 +63,73 @@ - + - + d1 : int - + - + d2 : float - - + + t00057_E - + - + coordinates : t00057_E::(anonymous_739) - + - + e : int - + - + height : t00057_E::(anonymous_807) - - + + t00057_E::(coordinates) - + - + x : int - + - + y : int - - + + «union» @@ -137,105 +137,105 @@ - + - + t : double - + - + z : int - - + + t00057_G - + - + g1 : int - - + + t00057_R - + - + a : struct t00057_A - + - + b : t00057_B - + - + c : struct t00057_C * - + - + d : union t00057_D - + - + e : struct t00057_E * - + - + f : struct t00057_F * - + - + g : struct t00057_G * - - + + t00057_F - + - + f1 : int diff --git a/docs/test_cases/t00057_class_mermaid.svg b/docs/test_cases/t00057_class_mermaid.svg index 172bbbdf..37f7af1c 100644 --- a/docs/test_cases/t00057_class_mermaid.svg +++ b/docs/test_cases/t00057_class_mermaid.svg @@ -162,7 +162,7 @@ - + @@ -186,7 +186,7 @@ - + @@ -210,7 +210,7 @@ - + @@ -234,7 +234,7 @@ - + @@ -263,7 +263,7 @@ - + @@ -297,7 +297,7 @@ - + @@ -326,7 +326,7 @@ - + @@ -355,7 +355,7 @@ - + @@ -379,7 +379,7 @@ - + @@ -433,7 +433,7 @@ - + diff --git a/docs/test_cases/t00058.md b/docs/test_cases/t00058.md index 9b12c112..efd05e44 100644 --- a/docs/test_cases/t00058.md +++ b/docs/test_cases/t00058.md @@ -288,7 +288,7 @@ struct R { "id": "1372381231906520278", "is_abstract": false, "is_nested": false, - "is_struct": false, + "is_struct": true, "is_template": true, "is_union": false, "members": [], diff --git a/docs/test_cases/t00058_class.svg b/docs/test_cases/t00058_class.svg index ea71cecc..b3ec7424 100644 --- a/docs/test_cases/t00058_class.svg +++ b/docs/test_cases/t00058_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + first_type @@ -19,8 +19,8 @@ - - + + «concept» @@ -30,8 +30,8 @@ - - + + A @@ -40,15 +40,15 @@ - + - + a : std::vector<T> - - + + B @@ -57,22 +57,22 @@ - + - + b : std::vector<T> - + - + bb : P - - + + A @@ -81,8 +81,8 @@ - - + + A @@ -91,8 +91,8 @@ - - + + B @@ -101,26 +101,26 @@ - - + + R - + - + aa : A<int,int,double,std::string> - + - + bb : B<int,std::string,int,double,A<int,int>> diff --git a/docs/test_cases/t00058_class_mermaid.svg b/docs/test_cases/t00058_class_mermaid.svg index 7a3b177d..4189e4f1 100644 --- a/docs/test_cases/t00058_class_mermaid.svg +++ b/docs/test_cases/t00058_class_mermaid.svg @@ -150,7 +150,7 @@ - + @@ -169,7 +169,7 @@ - + @@ -188,7 +188,7 @@ - + @@ -212,7 +212,7 @@ - + @@ -241,7 +241,7 @@ - + @@ -260,7 +260,7 @@ - + @@ -279,7 +279,7 @@ - + @@ -298,7 +298,7 @@ - + diff --git a/docs/test_cases/t00059_class.svg b/docs/test_cases/t00059_class.svg index 4639b2a1..ab2732db 100644 --- a/docs/test_cases/t00059_class.svg +++ b/docs/test_cases/t00059_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + «concept» @@ -23,8 +23,8 @@ T{} t.get_name() - - + + «concept» @@ -36,8 +36,8 @@ t.get_sweetness() - - + + «concept» @@ -49,96 +49,96 @@ t.get_bitterness() - - + + gala_apple - + - + get_name() const : std::string - + - + get_sweetness() const : float - - + + empire_apple - + - + get_name() const : std::string - + - + get_sweetness() const : float - - + + lima_orange - + - + get_bitterness() const : float - + - + get_name() const : std::string - - + + valencia_orange - + - + get_bitterness() const : float - + - + get_name() const : std::string - - + + fruit_factory @@ -146,23 +146,23 @@ apple_c TA,orange_c TO - + - + create_apple() const : TA - + - + create_orange() const : TO - - + + fruit_factory @@ -171,8 +171,8 @@ - - + + fruit_factory @@ -181,26 +181,26 @@ - - + + R - + - + factory_1 : fruit_factory_1 - + - + factory_2 : fruit_factory_2 diff --git a/docs/test_cases/t00059_class_mermaid.svg b/docs/test_cases/t00059_class_mermaid.svg index e5177b2e..edda315b 100644 --- a/docs/test_cases/t00059_class_mermaid.svg +++ b/docs/test_cases/t00059_class_mermaid.svg @@ -198,7 +198,7 @@ - + @@ -232,7 +232,7 @@ - + @@ -261,7 +261,7 @@ - + @@ -290,7 +290,7 @@ - + @@ -319,7 +319,7 @@ - + @@ -348,7 +348,7 @@ - + @@ -377,7 +377,7 @@ - + @@ -406,7 +406,7 @@ - + @@ -435,7 +435,7 @@ - + @@ -454,7 +454,7 @@ - + @@ -473,7 +473,7 @@ - + diff --git a/docs/test_cases/t00060.md b/docs/test_cases/t00060.md index bf33de7d..58fc9faf 100644 --- a/docs/test_cases/t00060.md +++ b/docs/test_cases/t00060.md @@ -210,7 +210,7 @@ template struct H : public G { "access": "public", "id": "1877304825033069517", "is_virtual": false, - "name": "G" + "name": "clanguml::t00060::G" } ], "display_name": "H", diff --git a/docs/test_cases/t00060_class.svg b/docs/test_cases/t00060_class.svg index 10504ff8..08dd1bdb 100644 --- a/docs/test_cases/t00060_class.svg +++ b/docs/test_cases/t00060_class.svg @@ -1,6 +1,6 @@ - + @@ -9,40 +9,40 @@ - - + + A - - + + B - - + + C - - + + D - - + + G @@ -51,15 +51,15 @@ - + - + g : T - - + + H @@ -68,18 +68,18 @@ - + - + h : G<T> - + - + hh : P diff --git a/docs/test_cases/t00060_class_mermaid.svg b/docs/test_cases/t00060_class_mermaid.svg index f661620e..d604333a 100644 --- a/docs/test_cases/t00060_class_mermaid.svg +++ b/docs/test_cases/t00060_class_mermaid.svg @@ -116,7 +116,7 @@ - + @@ -135,7 +135,7 @@ - + @@ -154,7 +154,7 @@ - + @@ -173,7 +173,7 @@ - + @@ -192,7 +192,7 @@ - + @@ -216,7 +216,7 @@ - + diff --git a/docs/test_cases/t00061_class.svg b/docs/test_cases/t00061_class.svg index 92c304ae..c2088c3b 100644 --- a/docs/test_cases/t00061_class.svg +++ b/docs/test_cases/t00061_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + A diff --git a/docs/test_cases/t00061_class_mermaid.svg b/docs/test_cases/t00061_class_mermaid.svg index dbc46f7e..1bf31331 100644 --- a/docs/test_cases/t00061_class_mermaid.svg +++ b/docs/test_cases/t00061_class_mermaid.svg @@ -52,7 +52,7 @@ - + diff --git a/docs/test_cases/t00062_class.svg b/docs/test_cases/t00062_class.svg index 8ba68ed6..5f316da8 100644 --- a/docs/test_cases/t00062_class.svg +++ b/docs/test_cases/t00062_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + A @@ -19,15 +19,15 @@ - + - + u : U & - - + + A @@ -36,15 +36,15 @@ - + - + u : U & - - + + A @@ -53,8 +53,8 @@ - - + + A @@ -63,15 +63,15 @@ - + - + u : U ** - - + + A @@ -80,15 +80,15 @@ - + - + u : U *** - - + + A @@ -97,15 +97,15 @@ - + - + u : U *** - - + + A @@ -114,15 +114,15 @@ - + - + u : U && - - + + A @@ -131,15 +131,15 @@ - + - + u : const U & - - + + A @@ -148,22 +148,22 @@ - + - + c : C & - + - + m : M C::* - - + + A @@ -172,22 +172,22 @@ - + - + c : C && - + - + m : M C::* - - + + A @@ -196,22 +196,22 @@ - + - + c : C & - + - + m : M C::* - - + + A @@ -220,15 +220,15 @@ - + - + c : C & - - + + A @@ -237,22 +237,22 @@ - + - + c : C && - + - + m : M C::* - - + + A @@ -261,22 +261,22 @@ - + - + c : C && - + - + mf : float C::* - - + + A @@ -285,22 +285,22 @@ - + - + c : C & - + - + m : M C::* - - + + A @@ -309,15 +309,15 @@ - + - + n : char[N] - - + + A @@ -326,15 +326,15 @@ - + - + n : std::vector<char> - - + + A @@ -343,15 +343,15 @@ - + - + klm : char[K][L][M] - - + + A @@ -360,15 +360,15 @@ - + - + u : bool - - + + A @@ -377,15 +377,15 @@ - + - + c : C<T> - - + + A @@ -394,22 +394,22 @@ - + - + args : std::tuple<Args...> - + - + c : C<T> - - + + A diff --git a/docs/test_cases/t00062_class_mermaid.svg b/docs/test_cases/t00062_class_mermaid.svg index f0746d7b..47f13adb 100644 --- a/docs/test_cases/t00062_class_mermaid.svg +++ b/docs/test_cases/t00062_class_mermaid.svg @@ -306,7 +306,7 @@ - + @@ -330,7 +330,7 @@ - + @@ -354,7 +354,7 @@ - + @@ -373,7 +373,7 @@ - + @@ -397,7 +397,7 @@ - + @@ -421,7 +421,7 @@ - + @@ -445,7 +445,7 @@ - + @@ -469,7 +469,7 @@ - + @@ -493,7 +493,7 @@ - + @@ -522,7 +522,7 @@ - + @@ -551,7 +551,7 @@ - + @@ -580,7 +580,7 @@ - + @@ -604,7 +604,7 @@ - + @@ -633,7 +633,7 @@ - + @@ -662,7 +662,7 @@ - + @@ -691,7 +691,7 @@ - + @@ -715,7 +715,7 @@ - + @@ -739,7 +739,7 @@ - + @@ -763,7 +763,7 @@ - + @@ -787,7 +787,7 @@ - + @@ -811,7 +811,7 @@ - + @@ -840,7 +840,7 @@ - + diff --git a/docs/test_cases/t00063_class.svg b/docs/test_cases/t00063_class.svg index 1d919346..f0b0972d 100644 --- a/docs/test_cases/t00063_class.svg +++ b/docs/test_cases/t00063_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + A diff --git a/docs/test_cases/t00063_class_mermaid.svg b/docs/test_cases/t00063_class_mermaid.svg index 0a1c1f57..6b90b038 100644 --- a/docs/test_cases/t00063_class_mermaid.svg +++ b/docs/test_cases/t00063_class_mermaid.svg @@ -52,7 +52,7 @@ - + diff --git a/docs/test_cases/t00064.md b/docs/test_cases/t00064.md index a40bde1c..1df262d4 100644 --- a/docs/test_cases/t00064.md +++ b/docs/test_cases/t00064.md @@ -205,7 +205,7 @@ public: "id": "96201031647373215", "is_abstract": false, "is_nested": false, - "is_struct": false, + "is_struct": true, "is_template": true, "is_union": false, "members": [], @@ -311,7 +311,7 @@ public: "id": "1877705309010128195", "is_abstract": false, "is_nested": false, - "is_struct": false, + "is_struct": true, "is_template": true, "is_union": false, "members": [], @@ -340,7 +340,7 @@ public: "id": "1737554639587928188", "is_abstract": false, "is_nested": false, - "is_struct": false, + "is_struct": true, "is_template": true, "is_union": false, "members": [], @@ -745,7 +745,7 @@ public: "id": "179850898515269194", "is_abstract": false, "is_nested": false, - "is_struct": false, + "is_struct": true, "is_template": true, "is_union": false, "members": [], @@ -780,7 +780,7 @@ public: "id": "1070380438303872295", "is_abstract": false, "is_nested": false, - "is_struct": false, + "is_struct": true, "is_template": true, "is_union": false, "members": [], diff --git a/docs/test_cases/t00064_class.svg b/docs/test_cases/t00064_class.svg index 3bcabf6e..8af2bc06 100644 --- a/docs/test_cases/t00064_class.svg +++ b/docs/test_cases/t00064_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + type_list @@ -19,8 +19,8 @@ - - + + type_list @@ -29,8 +29,8 @@ - - + + type_list @@ -39,8 +39,8 @@ - - + + type_list @@ -49,8 +49,8 @@ - - + + head @@ -59,8 +59,8 @@ - - + + type_list @@ -69,8 +69,8 @@ - - + + type_list @@ -79,8 +79,8 @@ - - + + type_list @@ -89,8 +89,8 @@ - - + + type_group_pair @@ -99,15 +99,15 @@ - + - + size : const size_t - - + + optional_ref @@ -116,8 +116,8 @@ - - + + optional_ref @@ -126,8 +126,8 @@ - - + + type_group_pair_it @@ -135,54 +135,54 @@ It,type_list<First...>,type_list<Second...> - + - + find(const value_type & v) constexpr : unsigned int - + - + get(unsigned int i) : ref_t - + - + getp(unsigned int i) : const value_type * - - + + A - - + + B - - + + C - - + + type_list @@ -191,8 +191,8 @@ - - + + type_list @@ -201,8 +201,8 @@ - - + + type_list @@ -211,8 +211,8 @@ - - + + type_group_pair @@ -221,30 +221,30 @@ - - + + R - + - + abc : type_group_pair<type_list<float,double>,type_list<A,B,C>> - + - + aboolint : type_list<A,bool,int> - - + + type_group_pair @@ -253,8 +253,8 @@ - - + + type_group_pair_it @@ -263,8 +263,8 @@ - - + + head diff --git a/docs/test_cases/t00064_class_mermaid.svg b/docs/test_cases/t00064_class_mermaid.svg index 36dea75d..0d3270a8 100644 --- a/docs/test_cases/t00064_class_mermaid.svg +++ b/docs/test_cases/t00064_class_mermaid.svg @@ -390,7 +390,7 @@ - + @@ -409,7 +409,7 @@ - + @@ -428,7 +428,7 @@ - + @@ -447,7 +447,7 @@ - + @@ -466,7 +466,7 @@ - + @@ -485,7 +485,7 @@ - + @@ -504,7 +504,7 @@ - + @@ -523,7 +523,7 @@ - + @@ -542,7 +542,7 @@ - + @@ -566,7 +566,7 @@ - + @@ -585,7 +585,7 @@ - + @@ -604,7 +604,7 @@ - + @@ -638,7 +638,7 @@ - + @@ -657,7 +657,7 @@ - + @@ -676,7 +676,7 @@ - + @@ -695,7 +695,7 @@ - + @@ -714,7 +714,7 @@ - + @@ -733,7 +733,7 @@ - + @@ -752,7 +752,7 @@ - + @@ -771,7 +771,7 @@ - + @@ -800,7 +800,7 @@ - + @@ -819,7 +819,7 @@ - + @@ -838,7 +838,7 @@ - + diff --git a/docs/test_cases/t00065_class.svg b/docs/test_cases/t00065_class.svg index 2116e0ce..be582138 100644 --- a/docs/test_cases/t00065_class.svg +++ b/docs/test_cases/t00065_class.svg @@ -1,6 +1,6 @@ - + @@ -9,20 +9,20 @@ - + module1 - + submodule1a - + module2 - + concepts - - + + ABC @@ -32,8 +32,8 @@ c - - + + XYZ @@ -43,68 +43,68 @@ z - - + + A - + - + abc : ABC - + - + pimpl : detail::AImpl * - + - + xyz : XYZ - - + + detail::AImpl - - + + B - + - + B() = default : void - + - + b() : void - - + + C @@ -113,15 +113,15 @@ - + - + t : T * - - + + C @@ -130,8 +130,8 @@ - - + + D @@ -140,22 +140,22 @@ - + - + c : C<int> - + - + t : T - - + + C @@ -164,8 +164,8 @@ - - + + D @@ -174,8 +174,8 @@ - - + + «concept» @@ -188,33 +188,33 @@ T{} t.b() - - + + R - + - + a : A * - + - + c : C<B> - + - + d : D<B> diff --git a/docs/test_cases/t00065_class_mermaid.svg b/docs/test_cases/t00065_class_mermaid.svg index 906fc069..6defd8dc 100644 --- a/docs/test_cases/t00065_class_mermaid.svg +++ b/docs/test_cases/t00065_class_mermaid.svg @@ -210,7 +210,7 @@ - + @@ -229,7 +229,7 @@ - + @@ -263,7 +263,7 @@ - + @@ -297,7 +297,7 @@ - + @@ -331,7 +331,7 @@ - + @@ -365,7 +365,7 @@ - + @@ -394,7 +394,7 @@ - + @@ -418,7 +418,7 @@ - + @@ -437,7 +437,7 @@ - + @@ -466,7 +466,7 @@ - + @@ -485,7 +485,7 @@ - + @@ -504,7 +504,7 @@ - + diff --git a/docs/test_cases/t00066_class.svg b/docs/test_cases/t00066_class.svg index f4386bbe..175eb1f2 100644 --- a/docs/test_cases/t00066_class.svg +++ b/docs/test_cases/t00066_class.svg @@ -1,6 +1,6 @@ - + @@ -9,222 +9,222 @@ - - + + A - + - + public_member : int - + - + protected_member : int - + - + private_member : int - + - + a_ : int - + - + b_ : int - + - + c_ : int - + - + static_int : int - + - + static_const_int : const int - + - + auto_member : const unsigned long - + - + A() = default : void - + - + A(int i) : void - + - + A(A &&) = default : void - + - + A(const A &) = deleted : void - + - + ~A() = default : void - + - + basic_method() : void - + - + static_method() : int - + - + const_method() const : void - + - + auto_method() : int - + - + operator++() : A & - + - + operator=(A && other) noexcept : A & - + - + operator=(A & other) noexcept : A & - + - + size() const : std::size_t - + - + double_int(const int i) : int - + - + sum(const double a, const double b) : int - + - + default_int(int i = 12) : int - + - + default_string(int i, std::string s = "abc") : std::string - + - + create_from_int(int i) : A - + - + protected_method() : void - + - + private_method() : void - + - + compare : std::function<bool (const int)> diff --git a/docs/test_cases/t00066_class_mermaid.svg b/docs/test_cases/t00066_class_mermaid.svg index b51a7ec3..3f4d04b3 100644 --- a/docs/test_cases/t00066_class_mermaid.svg +++ b/docs/test_cases/t00066_class_mermaid.svg @@ -52,7 +52,7 @@ - + diff --git a/docs/test_cases/t00067_class.svg b/docs/test_cases/t00067_class.svg index d9bf4e9f..3ed565b2 100644 --- a/docs/test_cases/t00067_class.svg +++ b/docs/test_cases/t00067_class.svg @@ -1,6 +1,6 @@ - + @@ -9,152 +9,152 @@ - - + + A - + - + auto_method() : int - + - + basic_method() : void - + - + const_method() const : void - + - + default_int(int i = 12) : int - + - + default_string(int i, std::string s = "abc") : std::string - + - + double_int(const int i) : int - + - + private_method() : void - + - + protected_method() : void - + - + size() const : std::size_t - + - + sum(const double a, const double b) : int - + - + a_ : int - + - + auto_member : const unsigned long - + - + b_ : int - + - + c_ : int - + - + compare : std::function<bool (const int)> - + - + private_member : int - + - + protected_member : int - + - + public_member : int - + - + static_const_int : const int - + - + static_int : int diff --git a/docs/test_cases/t00067_class_mermaid.svg b/docs/test_cases/t00067_class_mermaid.svg index 904952d0..8fec4559 100644 --- a/docs/test_cases/t00067_class_mermaid.svg +++ b/docs/test_cases/t00067_class_mermaid.svg @@ -52,7 +52,7 @@ - + diff --git a/docs/test_cases/t00068_r0_class.svg b/docs/test_cases/t00068_r0_class.svg index 991b6804..6ff57fd8 100644 --- a/docs/test_cases/t00068_r0_class.svg +++ b/docs/test_cases/t00068_r0_class.svg @@ -1,6 +1,6 @@ - + @@ -10,26 +10,26 @@ AAA context of radius 0 - - + + AAA - + - + akind : AKind - + - + bb : BB * diff --git a/docs/test_cases/t00068_r0_class_mermaid.svg b/docs/test_cases/t00068_r0_class_mermaid.svg index 689f23d5..6a6daecb 100644 --- a/docs/test_cases/t00068_r0_class_mermaid.svg +++ b/docs/test_cases/t00068_r0_class_mermaid.svg @@ -53,7 +53,7 @@ - + diff --git a/docs/test_cases/t00068_r1_class.svg b/docs/test_cases/t00068_r1_class.svg index 7abfaadb..6102cb2c 100644 --- a/docs/test_cases/t00068_r1_class.svg +++ b/docs/test_cases/t00068_r1_class.svg @@ -1,6 +1,6 @@ - + @@ -10,23 +10,23 @@ AAA context of radius 1 - - + + BB - + - + b : std::vector<B> - - + + AKind @@ -36,49 +36,49 @@ ThreeA - - + + AA - - + + AAA - + - + akind : AKind - + - + bb : BB * - - + + R - + - + aaa : AAA * diff --git a/docs/test_cases/t00068_r1_class_mermaid.svg b/docs/test_cases/t00068_r1_class_mermaid.svg index 2d9b0f5a..317fa129 100644 --- a/docs/test_cases/t00068_r1_class_mermaid.svg +++ b/docs/test_cases/t00068_r1_class_mermaid.svg @@ -101,7 +101,7 @@ - + @@ -125,7 +125,7 @@ - + @@ -159,7 +159,7 @@ - + @@ -178,7 +178,7 @@ - + @@ -207,7 +207,7 @@ - + diff --git a/docs/test_cases/t00068_r2_class.svg b/docs/test_cases/t00068_r2_class.svg index 0d361cca..9f7650ae 100644 --- a/docs/test_cases/t00068_r2_class.svg +++ b/docs/test_cases/t00068_r2_class.svg @@ -1,6 +1,6 @@ - + @@ -10,31 +10,31 @@ AAA context of radius 2 - - + + B - - + + BB - + - + b : std::vector<B> - - + + AKind @@ -44,72 +44,72 @@ ThreeA - - + + A - - + + AA - - + + AAA - + - + akind : AKind - + - + bb : BB * - - + + R - + - + aaa : AAA * - - + + RR - + - + r : std::shared_ptr<R> diff --git a/docs/test_cases/t00068_r2_class_mermaid.svg b/docs/test_cases/t00068_r2_class_mermaid.svg index f1cc8267..d5c0e9b7 100644 --- a/docs/test_cases/t00068_r2_class_mermaid.svg +++ b/docs/test_cases/t00068_r2_class_mermaid.svg @@ -135,7 +135,7 @@ - + @@ -154,7 +154,7 @@ - + @@ -178,7 +178,7 @@ - + @@ -212,7 +212,7 @@ - + @@ -231,7 +231,7 @@ - + @@ -250,7 +250,7 @@ - + @@ -279,7 +279,7 @@ - + @@ -303,7 +303,7 @@ - + diff --git a/docs/test_cases/t00069_class.svg b/docs/test_cases/t00069_class.svg index de782f10..b8972dba 100644 --- a/docs/test_cases/t00069_class.svg +++ b/docs/test_cases/t00069_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + generator @@ -18,96 +18,96 @@ T - + - + generator(handle_type h) : void - + - + ~generator() : void - + - + full_ : bool - + - + h_ : handle_type - - + + generator::promise_type - + - + final_suspend() noexcept : std::suspend_always - + - + get_return_object() : generator<T> - + - + initial_suspend() : std::suspend_always - + - + return_void() : void - + - + unhandled_exception() : void yield_value<std::convertible_to From>(From && from) : std::suspend_always - + - + exception_ : std::exception_ptr - + - + value_ : T - - + + generator @@ -116,33 +116,33 @@ - - + + A - + - + iota() [coroutine] : generator<unsigned long> - + - + seed() [coroutine] : generator<unsigned long> - + - + counter_ : unsigned long diff --git a/docs/test_cases/t00069_class_mermaid.svg b/docs/test_cases/t00069_class_mermaid.svg index 83412602..85a719fd 100644 --- a/docs/test_cases/t00069_class_mermaid.svg +++ b/docs/test_cases/t00069_class_mermaid.svg @@ -90,7 +90,7 @@ - + @@ -129,7 +129,7 @@ - + @@ -188,7 +188,7 @@ - + @@ -207,7 +207,7 @@ - + diff --git a/docs/test_cases/t00070_class.svg b/docs/test_cases/t00070_class.svg index c85df48d..f7fb982e 100644 --- a/docs/test_cases/t00070_class.svg +++ b/docs/test_cases/t00070_class.svg @@ -1,6 +1,6 @@ - + @@ -9,16 +9,16 @@ - - + + B - - + + BB @@ -27,15 +27,15 @@ - + - + t : T - - + + BBB @@ -44,26 +44,26 @@ bbb2 - - + + A - + - + get() : int - + - + a : int diff --git a/docs/test_cases/t00070_class_mermaid.svg b/docs/test_cases/t00070_class_mermaid.svg index 7b35254d..227dd9e1 100644 --- a/docs/test_cases/t00070_class_mermaid.svg +++ b/docs/test_cases/t00070_class_mermaid.svg @@ -52,7 +52,7 @@ - + @@ -71,7 +71,7 @@ - + @@ -95,7 +95,7 @@ - + @@ -124,7 +124,7 @@ - + diff --git a/docs/test_cases/t00071_class.svg b/docs/test_cases/t00071_class.svg index 69fcdf67..94b8f919 100644 --- a/docs/test_cases/t00071_class.svg +++ b/docs/test_cases/t00071_class.svg @@ -1,6 +1,6 @@ - + @@ -9,53 +9,53 @@ - + app - + lib1 - + mod1 - + mod2 - + lib2 - - + + A - + - + get() : int - + - + a : int - - + + B - - + + BB @@ -64,15 +64,15 @@ - + - + t : T - - + + detail::BBB @@ -81,32 +81,32 @@ bbb2 - - + + D - - + + E - - + + C - - + + CC @@ -115,15 +115,15 @@ - + - + t : T - - + + detail::CCC @@ -132,33 +132,33 @@ ccc2 - - + + R - + - + a : A * - + - + b : B * - + - + c : C * diff --git a/docs/test_cases/t00071_class_mermaid.svg b/docs/test_cases/t00071_class_mermaid.svg index b7d1ff17..b024b045 100644 --- a/docs/test_cases/t00071_class_mermaid.svg +++ b/docs/test_cases/t00071_class_mermaid.svg @@ -90,7 +90,7 @@ - + @@ -109,7 +109,7 @@ - + @@ -133,7 +133,7 @@ - + @@ -162,7 +162,7 @@ - + @@ -181,7 +181,7 @@ - + @@ -200,7 +200,7 @@ - + @@ -219,7 +219,7 @@ - + @@ -243,7 +243,7 @@ - + @@ -272,7 +272,7 @@ - + @@ -301,7 +301,7 @@ - + diff --git a/docs/test_cases/t00072_class.svg b/docs/test_cases/t00072_class.svg index 5bce9ae4..53c97206 100644 --- a/docs/test_cases/t00072_class.svg +++ b/docs/test_cases/t00072_class.svg @@ -1,6 +1,6 @@ - + @@ -9,53 +9,53 @@ - + app - + :lib1 - + mod1 - + mod2 - + :lib2 - - + + A - + - + get() : int - + - + a : int - - + + B - - + + BB @@ -64,15 +64,15 @@ - + - + t : T - - + + detail::BBB @@ -81,32 +81,32 @@ bbb2 - - + + D - - + + E - - + + C - - + + CC @@ -115,15 +115,15 @@ - + - + t : T - - + + detail::CCC diff --git a/docs/test_cases/t00072_class_mermaid.svg b/docs/test_cases/t00072_class_mermaid.svg index b563d13c..7fcdeadb 100644 --- a/docs/test_cases/t00072_class_mermaid.svg +++ b/docs/test_cases/t00072_class_mermaid.svg @@ -52,7 +52,7 @@ - + @@ -71,7 +71,7 @@ - + @@ -95,7 +95,7 @@ - + @@ -124,7 +124,7 @@ - + @@ -143,7 +143,7 @@ - + @@ -162,7 +162,7 @@ - + @@ -181,7 +181,7 @@ - + @@ -205,7 +205,7 @@ - + @@ -234,7 +234,7 @@ - + diff --git a/docs/test_cases/t20001_sequence.svg b/docs/test_cases/t20001_sequence.svg index 27920143..b04f28f8 100644 --- a/docs/test_cases/t20001_sequence.svg +++ b/docs/test_cases/t20001_sequence.svg @@ -1,6 +1,6 @@ - + @@ -10,79 +10,79 @@ Basic sequence diagram example - - - - - - - - - + + + + + + + + + - - + + tmain() - + tmain() - - + + A - + A - - + + B - + B - - - - - - - - - - + + + + + + + + + + A() - + B(A &) - + Just add 2 numbers - + add(int,int) - + And now add another 2 - + wrap_add3(int,int,int) - + add3(int,int,int) - + @@ -93,7 +93,7 @@ - + @@ -102,14 +102,14 @@ - + log_result(int) - + Main test function diff --git a/docs/test_cases/t20002_sequence.svg b/docs/test_cases/t20002_sequence.svg index 9f418e6b..0bbc109c 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 140ece2a..0607a252 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 033f3952..c6d7ac6f 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 a4f6829b..edd52587 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 012ee3f4..829d6c80 100644 --- a/docs/test_cases/t20006_sequence.svg +++ b/docs/test_cases/t20006_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,24 +9,24 @@ - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + @@ -36,84 +36,84 @@ - - + + tmain() - + tmain() - - + + B<int> - + B<int> - - + + A<int> - + A<int> - - + + B<std::string> - + B<std::string> - - + + A<std::string> - + A<std::string> - - + + BB<int,std::string> - + BB<int,std::string> - - + + BB<int,float> - + BB<int,float> - - + + BB<int,int> - + BB<int,int> - - + + AA<int> - + AA<int> - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + b(int) - + a1(int) @@ -122,12 +122,12 @@ - + b(std::string) - + a2(std::string) @@ -136,69 +136,69 @@ - + BB(AA<int> *) - + BB(AA<int> &) - + bb1(int,int) - + aa1(int) - + bb2(int,int) - + aa2(int) - + bb1(int,std::string) - + aa2(int) - + bb2(int,std::string) - + aa1(int) - + bb1(int,float) - + bb2(int,float) - + aa2(int) diff --git a/docs/test_cases/t20007_sequence.svg b/docs/test_cases/t20007_sequence.svg index 01ed1389..ae35ebbb 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 1035c52b..a25fe5d4 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 63f63801..13efff2e 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 3978e5c1..95b4a61d 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 f349baef..a89d525e 100644 --- a/docs/test_cases/t20011_sequence.svg +++ b/docs/test_cases/t20011_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,42 +9,42 @@ - - - - - - - - - - - - + + + + + + + + + + + + - - + + tmain() - + tmain() - - + + A - + A - - - - - - - - - - + + + + + + + + + + a(int) @@ -52,26 +52,26 @@ alt - + a(int) - + b(int) - + c(int) - + @@ -81,14 +81,14 @@ alt - + b(int) - + @@ -98,7 +98,7 @@ alt - + diff --git a/docs/test_cases/t20012.md b/docs/test_cases/t20012.md index 811072f9..c962d787 100644 --- a/docs/test_cases/t20012.md +++ b/docs/test_cases/t20012.md @@ -355,8 +355,8 @@ void tmain() { "activities": [ { - "display_name": "R((lambda at /home/bartek/devel/clang-uml/tests/t20012/t20012.cc:86:9) &&)", - "id": "1225911104877544354", + "display_name": "R((lambda at t20012.cc:86:9) &&)", + "id": "1976182450987832927", "name": "R", "namespace": "", "source_location": { @@ -369,7 +369,7 @@ void tmain() }, { "display_name": "r()", - "id": "984475898639439059", + "id": "1627963942447215983", "name": "r", "namespace": "", "source_location": { @@ -381,8 +381,8 @@ void tmain() "type": "method" } ], - "display_name": "R", - "id": "943938410171869397", + "display_name": "R<(lambda at t20012.cc:86:9)>", + "id": "1418878159628415236", "name": "R", "namespace": "clanguml::t20012", "source_location": { @@ -664,7 +664,7 @@ void tmain() "activity_id": "893699278278125827", "participant_id": "893699278278125827" }, - "name": "R((lambda at /home/bartek/devel/clang-uml/tests/t20012/t20012.cc:86:9) &&)", + "name": "R((lambda at t20012.cc:86:9) &&)", "return_type": "void", "scope": "normal", "source_location": { @@ -674,8 +674,8 @@ void tmain() "translation_unit": "t20012.cc" }, "to": { - "activity_id": "1225911104877544354", - "participant_id": "943938410171869397" + "activity_id": "1976182450987832927", + "participant_id": "1418878159628415236" }, "type": "message" }, @@ -694,15 +694,15 @@ void tmain() "translation_unit": "t20012.cc" }, "to": { - "activity_id": "984475898639439059", - "participant_id": "943938410171869397" + "activity_id": "1627963942447215983", + "participant_id": "1418878159628415236" }, "type": "message" }, { "from": { - "activity_id": "984475898639439059", - "participant_id": "943938410171869397" + "activity_id": "1627963942447215983", + "participant_id": "1418878159628415236" }, "name": "operator()()", "return_type": "", diff --git a/docs/test_cases/t20012_sequence.svg b/docs/test_cases/t20012_sequence.svg index c046a262..0cec37f0 100644 --- a/docs/test_cases/t20012_sequence.svg +++ b/docs/test_cases/t20012_sequence.svg @@ -1,6 +1,6 @@ - + - + @@ -9,149 +9,149 @@ - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + tmain() - + tmain() - - + + tmain()::(lambda t20012.cc:67:20) - + tmain()::(lambda t20012.cc:67:20) - - + + A - + A - - + + B - + B - - + + tmain()::(lambda t20012.cc:80:20) - + tmain()::(lambda t20012.cc:80:20) - - + + C - + C - - - R<R::(lambda t20012.cc:86:9)> - - R<R::(lambda t20012.cc:86:9)> + + + R<(lambda at t20012.cc:86:9)> + + R<(lambda at t20012.cc:86:9)> - - - tmain()::(lambda t20012.cc:86:9) - - tmain()::(lambda t20012.cc:86:9) + + + tmain()::(lambda t20012.cc:86:9) + + tmain()::(lambda t20012.cc:86:9) - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + operator()() - + a() - + aa() - + aaa() - + b() - + bb() - + @@ -160,67 +160,67 @@ - + operator()() - + c() - + cc() - + ccc() - + operator()() - + a() - + aa() - + aaa() - + b() - + bb() - + @@ -231,41 +231,41 @@ - - - - R((lambda at /home/bartek/devel/clang-uml/tests/t20012/t20012.cc:86:9) &&) + + + + R((lambda at t20012.cc:86:9) &&) - - - + + + r() - - - - operator()() + + + + operator()() - + - + c() - + cc() - + ccc() - - + + diff --git a/docs/test_cases/t20012_sequence_mermaid.svg b/docs/test_cases/t20012_sequence_mermaid.svg index 45caec59..e7b36fa9 100644 --- a/docs/test_cases/t20012_sequence_mermaid.svg +++ b/docs/test_cases/t20012_sequence_mermaid.svg @@ -1,14 +1,14 @@ - + - - - tmain()::(lambda t20012.cc:86:9) + + + tmain()::(lambda t20012.cc:86:9) - - - R<R::(lambda t20012.cc:86:9)> + + + R<(lambda at t20012.cc:86:9)> @@ -48,20 +48,20 @@ - + - - - tmain()::(lambda t20012.cc:86:9) + + + tmain()::(lambda t20012.cc:86:9) - + - - - R<R::(lambda t20012.cc:86:9)> + + + R<(lambda at t20012.cc:86:9)> @@ -215,13 +215,13 @@ - + - + - + @@ -274,18 +274,18 @@ ​ - R((lambda at /home/bartek/devel/clang-uml/tests/t20012/t20012.cc:86:9) &&) - - r() - - operator()() - - c() - + R((lambda at t20012.cc:86:9) &&) + + r() + + operator()() + + c() + cc() ccc() - ​ - + ​ + diff --git a/docs/test_cases/t20013_sequence.svg b/docs/test_cases/t20013_sequence.svg index 268c163e..13db84d6 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 840b7f9a..35bbb1f8 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 f4495b80..8d670341 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 5f867671..352d2fb0 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 abee61a4..0dde9040 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 81837bdd..37af5446 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 d1f0545d..e89684a4 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 599aed74..2ce811fa 100644 --- a/docs/test_cases/t20020_sequence.svg +++ b/docs/test_cases/t20020_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,82 +9,82 @@ - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - + - - - + + + - - + + tmain() - + tmain() - - + + A - + A - - + + C - + C - - + + B - + B - - + + D<int> - + D<int> - - - - - - - - - - - - - - + + + + + + + + + + + + + + alt - + a1() @@ -92,7 +92,7 @@ - + a5() @@ -103,7 +103,7 @@ alt - + [ @@ -112,7 +112,7 @@ - + [ @@ -121,7 +121,7 @@ - + b1() @@ -129,7 +129,7 @@ - + [ @@ -138,7 +138,7 @@ - + b2() @@ -146,14 +146,14 @@ - + a4() - + log() @@ -161,7 +161,7 @@ alt - + c1() const @@ -169,7 +169,7 @@ alt - + @@ -182,7 +182,7 @@ - + @@ -192,7 +192,7 @@ alt - + d1(int,int) diff --git a/docs/test_cases/t20021_sequence.svg b/docs/test_cases/t20021_sequence.svg index a004c93c..04375a16 100644 --- a/docs/test_cases/t20021_sequence.svg +++ b/docs/test_cases/t20021_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,74 +9,74 @@ - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - - + + tmain() - + tmain() - - + + C - + C - - + + A - + A - - + + B - + B - - - - - - - - - - - - + + + + + + + + + + + + loop - + [ c4() ] - + @@ -89,7 +89,7 @@ - + a3() @@ -102,7 +102,7 @@ loop - + [ @@ -111,7 +111,7 @@ - + [ @@ -120,7 +120,7 @@ - + [ @@ -129,14 +129,14 @@ - + a1() - + [ @@ -148,7 +148,7 @@ loop - + b2() const @@ -158,7 +158,7 @@ loop - + [ @@ -167,7 +167,7 @@ - + b2() const diff --git a/docs/test_cases/t20022_sequence.svg b/docs/test_cases/t20022_sequence.svg index 97dc7a3c..bf7b836d 100644 --- a/docs/test_cases/t20022_sequence.svg +++ b/docs/test_cases/t20022_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,47 +9,47 @@ - - - - + + + + - - + + tmain() - + tmain() - - + + A - + A - - + + B - + B - - - - - + + + + + A(std::unique_ptr ) - + a() - + b() diff --git a/docs/test_cases/t20023_sequence.svg b/docs/test_cases/t20023_sequence.svg index 9f18b116..eaa74d1e 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 ee65f3a4..3c247d7b 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 218e3874..1ade801d 100644 --- a/docs/test_cases/t20025_sequence.svg +++ b/docs/test_cases/t20025_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,41 +9,41 @@ - - - + + + - - + + tmain() - + tmain() - - + + A - + A - - + + add(int,int) - + add(int,int) - - - - + + + + a() - + diff --git a/docs/test_cases/t20026_sequence.svg b/docs/test_cases/t20026_sequence.svg index 10fd7f6c..7833fc9b 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 d2e2cf4e..5b907d41 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 27b01ed1..06e30d96 100644 --- a/docs/test_cases/t20028_sequence.svg +++ b/docs/test_cases/t20028_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,36 +9,36 @@ - - - - - - + + + + + + - - + + tmain() - + tmain() - - + + A - + A - - - - - + + + + + alt - + [ @@ -47,14 +47,14 @@ - + b() - + c() @@ -62,7 +62,7 @@ - + d() diff --git a/docs/test_cases/t20029_sequence.svg b/docs/test_cases/t20029_sequence.svg index d50b9a10..698dd1de 100644 --- a/docs/test_cases/t20029_sequence.svg +++ b/docs/test_cases/t20029_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,69 +9,69 @@ - - - - - - - - - - - + + + + + + + + + + + - - + + tmain() - + tmain() - - + + Encoder<Retrier<ConnectionPool>> - + Encoder<Retrier<ConnectionPool>> - - + + Retrier<ConnectionPool> - + Retrier<ConnectionPool> - - + + ConnectionPool - + ConnectionPool - - + + encode_b64(std::string &&) - + encode_b64(std::string &&) - - - - - - - - + + + + + + + + Establish connection to the remote server synchronously - + connect() - + Repeat for each line in the input stream @@ -81,26 +81,26 @@ alt - + [ send(std::string &&) ] - + Encode the message using Base64 encoding and pass it to the next layer - + encode(std::string &&) - + @@ -110,12 +110,12 @@ - + send(std::string &&) - + Repeat until send() succeeds or retry count is exceeded @@ -125,7 +125,7 @@ alt - + [ diff --git a/docs/test_cases/t20030_sequence.svg b/docs/test_cases/t20030_sequence.svg index c4dbd9cc..f726d26f 100644 --- a/docs/test_cases/t20030_sequence.svg +++ b/docs/test_cases/t20030_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,81 +9,81 @@ - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - + + tmain(int) - + tmain(int) - - + + magic() - + magic() - - + + A - + A - - + + tmain(bool,int) - + tmain(bool,int) - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - + A(int) - + operator+=(int) - + @@ -92,36 +92,36 @@ - + A() - + create() - + A() - + create() - + operator+=(int) - + @@ -130,12 +130,12 @@ - + operator=(const A &) - + @@ -144,7 +144,7 @@ - + value() const diff --git a/docs/test_cases/t20031_sequence.svg b/docs/test_cases/t20031_sequence.svg index dd2bcea7..4cbcec5e 100644 --- a/docs/test_cases/t20031_sequence.svg +++ b/docs/test_cases/t20031_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,64 +9,64 @@ - - - - - + + + + + - - + + tmain(int) - + tmain(int) - - + + magic() - + magic() - - + + tmain(bool,int) - + tmain(bool,int) - - + + execute(std::function<int ()>) - + execute(std::function<int ()>) - - + + A - + A - - - - - - + + + + + + - + - + value() const diff --git a/docs/test_cases/t20032_sequence.svg b/docs/test_cases/t20032_sequence.svg index 9809ffc4..008719c2 100644 --- a/docs/test_cases/t20032_sequence.svg +++ b/docs/test_cases/t20032_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,47 +9,47 @@ - - - - - - - + + + + + + + - - + + tmain(int,char **) - + tmain(int,char **) - - + + B - + B - - + + A - + A - - - - - - - - + + + + + + + + b(int) - + a1(int) @@ -60,12 +60,12 @@ int - + b(double) - + a2(double) @@ -76,12 +76,12 @@ double - + b(const char *) - + a3(const char *) diff --git a/docs/test_cases/t20033_sequence.svg b/docs/test_cases/t20033_sequence.svg index e0d58075..f9ffe43d 100644 --- a/docs/test_cases/t20033_sequence.svg +++ b/docs/test_cases/t20033_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,73 +9,73 @@ - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - - - - + + + + + - + - - + + tmain() - + tmain() - - + + A - + A - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + alt [false] [reinterpret_cast<uint64_t>(&a) % 100 == 0ULL] - + a1() @@ -84,7 +84,7 @@ [reinterpret_cast<uint64_t>(&a) % 64 == 0ULL] - + a2() @@ -93,7 +93,7 @@ [a.a2() == 2 && a.a3() == 3] - + [ @@ -102,7 +102,7 @@ - + [ @@ -111,7 +111,7 @@ - + a3() @@ -119,7 +119,7 @@ - + a4() @@ -130,7 +130,7 @@ alt [int i = a.a2(); i != 2] - + [ @@ -139,7 +139,7 @@ - + a3() @@ -150,7 +150,7 @@ loop [int i = 0; i < a.a2(); i++] - + [ @@ -159,14 +159,14 @@ - + a3() - + a3() @@ -177,7 +177,7 @@ loop [retry_count--] - + a2() @@ -188,14 +188,14 @@ loop [retry_count++ < a.a3()] - + a4() - + [ @@ -208,7 +208,7 @@ alt [a.a4() % 6] - + [ @@ -222,7 +222,7 @@ loop [ints] - + a4() diff --git a/docs/test_cases/t20034_sequence.svg b/docs/test_cases/t20034_sequence.svg index 30062dc1..8bdbbe55 100644 --- a/docs/test_cases/t20034_sequence.svg +++ b/docs/test_cases/t20034_sequence.svg @@ -1,6 +1,6 @@ - + @@ -14,154 +14,154 @@ - - + + D - + D - - + + C - + C - - + + B - + B - - + + A - + A - - + + D::d2()::(lambda t20034.cc:56:18) - + D::d2()::(lambda t20034.cc:56:18) d2() - + c2() - + b2() - + a2() - + d2() - + a2() - + d2() - + operator()() - + a2() - + d2() - + c4() - + b4() - + b2() - + a2() - + d2() - + c1() - + b1() - + a2() - + d2() - + c3() - + c2() - + b2() - + a2() diff --git a/docs/test_cases/t20035_sequence.svg b/docs/test_cases/t20035_sequence.svg index c05bd25e..aa598470 100644 --- a/docs/test_cases/t20035_sequence.svg +++ b/docs/test_cases/t20035_sequence.svg @@ -1,6 +1,6 @@ - + @@ -13,39 +13,39 @@ - - + + tmain(int,char **) - + tmain(int,char **) - - + + a(int) - + a(int) - - + + b1(int) - + b1(int) - - + + c(int) - + c(int) - + - + - + diff --git a/docs/test_cases/t20036_sequence.svg b/docs/test_cases/t20036_sequence.svg index 2872b901..e4470642 100644 --- a/docs/test_cases/t20036_sequence.svg +++ b/docs/test_cases/t20036_sequence.svg @@ -1,6 +1,6 @@ - + @@ -13,131 +13,131 @@ - - + + C - + C - - + + B - + B - - + + A - + A - - + + D - + D c1() - + b1() - + a2() - + d1() - + c2() - + b2() - + a2() - + d3() - + a2() - + c4() - + b2() - + a2() - + c3() - + c2() - + b2() - + a2() - + d2() - + c2() - + b2() - + a2() diff --git a/docs/test_cases/t20037_sequence.svg b/docs/test_cases/t20037_sequence.svg index c4639fd4..8d0d933f 100644 --- a/docs/test_cases/t20037_sequence.svg +++ b/docs/test_cases/t20037_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,95 +9,95 @@ - - - - - - - - - - - - + + + + + + + + + + + + - - + + tmain(int,char **) - + tmain(int,char **) - - + + a() - + a() - - + + A - + A - - + + initb() - + initb() - - + + B - + B - - + + c() - + c() - - - - - - - - - - - - - + + + + + + + + + + + + + - + A() - + - + get() - + @@ -105,18 +105,18 @@ - + - + get() - + @@ -124,18 +124,18 @@ - + - + get() - + diff --git a/docs/test_cases/t20038_sequence.svg b/docs/test_cases/t20038_sequence.svg index c606ec70..00af3686 100644 --- a/docs/test_cases/t20038_sequence.svg +++ b/docs/test_cases/t20038_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,29 +9,29 @@ - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + - + @@ -39,62 +39,62 @@ - - + + tmain() - + tmain() - - + + B - + B - - + + A - + A - - + + add<int>(int,int) - + add<int>(int,int) - - + + add_impl<int>(int,int) - + add_impl<int>(int,int) - - + + add_impl<double>(double,double) - + add_impl<double>(double,double) - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + Nisl purus in mollis nunc sed id semper. Varius vel pharetra vel turpis. Arcu @@ -111,18 +111,18 @@ alt - + Repeat 5 times... loop - + b() - + a() @@ -132,15 +132,15 @@ - + ... or just once - + b() - + a() @@ -149,12 +149,12 @@ - + bbb() - + aaa() @@ -163,24 +163,24 @@ - + bbbb() - + aaaa() - + - + Invoke 'add' implementation - + @@ -192,47 +192,47 @@ - + This comment should be rendered only once - + wrap(int) - + What is 2 + 2? - + - + Calling B::bbbbb() - + bbbbb() - + aaaa() - + - + Invoke 'add' implementation - + @@ -244,20 +244,20 @@ - + This is a conditional operator alt - + [ bbb() ] - + aaa() diff --git a/docs/test_cases/t20039.md b/docs/test_cases/t20039.md index 12a4d2a1..14b0b4ef 100644 --- a/docs/test_cases/t20039.md +++ b/docs/test_cases/t20039.md @@ -12,7 +12,9 @@ diagrams: using_namespace: clanguml::t20039 type_aliases: "std::vector": int_vec_t + "std::vector": string_vec_t "std::map": int_map_t + "std::map": string_map_t from: - function: "clanguml::t20039::tmain()" ``` @@ -33,13 +35,17 @@ template struct A { struct R { A a_int; A> a_intvec; + A> a_stringvec; A> a_intmap; + A> a_stringmap; void run() { a_int.a({}); a_intvec.a({}); + a_stringvec.a({}); a_intmap.a({}); + a_stringmap.a({}); } }; @@ -72,7 +78,7 @@ int tmain() "source_location": { "column": 5, "file": "t20039.cc", - "line": 25, + "line": 29, "translation_unit": "t20039.cc" }, "type": "function" @@ -87,7 +93,7 @@ int tmain() "source_location": { "column": 10, "file": "t20039.cc", - "line": 17, + "line": 19, "translation_unit": "t20039.cc" }, "type": "method" @@ -161,6 +167,34 @@ int tmain() }, "type": "class" }, + { + "activities": [ + { + "display_name": "a(string_vec_t)", + "id": "877375915521239216", + "name": "a", + "namespace": "", + "source_location": { + "column": 33, + "file": "t20039.cc", + "line": 9, + "translation_unit": "t20039.cc" + }, + "type": "method" + } + ], + "display_name": "A", + "id": "985421674263139595", + "name": "A", + "namespace": "clanguml::t20039", + "source_location": { + "column": 30, + "file": "t20039.cc", + "line": 8, + "translation_unit": "t20039.cc" + }, + "type": "class" + }, { "activities": [ { @@ -188,6 +222,34 @@ int tmain() "translation_unit": "t20039.cc" }, "type": "class" + }, + { + "activities": [ + { + "display_name": "a(string_map_t)", + "id": "1228686762653429102", + "name": "a", + "namespace": "", + "source_location": { + "column": 33, + "file": "t20039.cc", + "line": 9, + "translation_unit": "t20039.cc" + }, + "type": "method" + } + ], + "display_name": "A", + "id": "1410668113085504962", + "name": "A", + "namespace": "clanguml::t20039", + "source_location": { + "column": 30, + "file": "t20039.cc", + "line": 8, + "translation_unit": "t20039.cc" + }, + "type": "class" } ], "sequences": [ @@ -204,7 +266,7 @@ int tmain() "source_location": { "column": 5, "file": "t20039.cc", - "line": 29, + "line": 33, "translation_unit": "t20039.cc" }, "to": { @@ -224,7 +286,7 @@ int tmain() "source_location": { "column": 9, "file": "t20039.cc", - "line": 19, + "line": 21, "translation_unit": "t20039.cc" }, "to": { @@ -244,7 +306,7 @@ int tmain() "source_location": { "column": 9, "file": "t20039.cc", - "line": 20, + "line": 22, "translation_unit": "t20039.cc" }, "to": { @@ -253,6 +315,26 @@ int tmain() }, "type": "message" }, + { + "from": { + "activity_id": "743095879760855186", + "participant_id": "911510236910860394" + }, + "name": "a(string_vec_t)", + "return_type": "std::vector,allocator>,allocator,allocator>>>>>", + "scope": "normal", + "source_location": { + "column": 9, + "file": "t20039.cc", + "line": 23, + "translation_unit": "t20039.cc" + }, + "to": { + "activity_id": "877375915521239216", + "participant_id": "985421674263139595" + }, + "type": "message" + }, { "from": { "activity_id": "743095879760855186", @@ -264,7 +346,7 @@ int tmain() "source_location": { "column": 9, "file": "t20039.cc", - "line": 21, + "line": 24, "translation_unit": "t20039.cc" }, "to": { @@ -272,6 +354,26 @@ int tmain() "participant_id": "1577435969137543418" }, "type": "message" + }, + { + "from": { + "activity_id": "743095879760855186", + "participant_id": "911510236910860394" + }, + "name": "a(string_map_t)", + "return_type": "std::vector,allocator>,basic_string,allocator>,less,allocator>>,allocator,allocator>,basic_string,allocator>>>>>>", + "scope": "normal", + "source_location": { + "column": 9, + "file": "t20039.cc", + "line": 25, + "translation_unit": "t20039.cc" + }, + "to": { + "activity_id": "1228686762653429102", + "participant_id": "1410668113085504962" + }, + "type": "message" } ], "start_from": { diff --git a/docs/test_cases/t20039_sequence.svg b/docs/test_cases/t20039_sequence.svg index afe69f1a..fb9ab1b5 100644 --- a/docs/test_cases/t20039_sequence.svg +++ b/docs/test_cases/t20039_sequence.svg @@ -1,6 +1,6 @@ - + - + @@ -9,76 +9,108 @@ - - - - - - - - - - - - + + + + + + + + + + + + + + + + tmain() - - tmain() + + tmain() - - + + R - - R + + R - - + + A<int> - - A<int> + + A<int> - - + + A<int_vec_t> - - A<int_vec_t> + + A<int_vec_t> - - - A<int_map_t> - - A<int_map_t> + + + A<string_vec_t> + + A<string_vec_t> - - - - - - + + + A<int_map_t> + + A<int_map_t> + + + + A<string_map_t> + + A<string_map_t> + + + + + + + + + run() - + a(int) - + a(int_vec_t) - - - - a(int_map_t) + + + + a(string_vec_t) - - + + + + + + a(int_map_t) + + + + + + + a(string_map_t) + + + diff --git a/docs/test_cases/t20039_sequence_mermaid.svg b/docs/test_cases/t20039_sequence_mermaid.svg index 22f712ae..8d63af74 100644 --- a/docs/test_cases/t20039_sequence_mermaid.svg +++ b/docs/test_cases/t20039_sequence_mermaid.svg @@ -1,45 +1,75 @@ - + - - - A<int_map_t> + + + A<string_map_t> - - + + + A<int_map_t> + + + + + + A<string_vec_t> + + + + + A<int_vec_t> - - + + A<int> - - + + R - - + + tmain() - - - - - A<int_map_t> + + + + + A<string_map_t> - + + + + + A<int_map_t> + + + + + + + + + A<string_vec_t> + + + + + @@ -48,7 +78,7 @@ - + @@ -57,7 +87,7 @@ - + @@ -66,7 +96,7 @@ - + @@ -113,10 +143,10 @@ - + - + @@ -127,6 +157,12 @@ + + + + + + run() a(int) @@ -137,8 +173,16 @@ ​ - a(int_map_t) + a(string_vec_t) ​ + a(int_map_t) + + ​ + + a(string_map_t) + + ​ + diff --git a/docs/test_cases/t30001_package.svg b/docs/test_cases/t30001_package.svg index d3e71fd9..8522eedf 100644 --- a/docs/test_cases/t30001_package.svg +++ b/docs/test_cases/t30001_package.svg @@ -1,6 +1,6 @@ - + @@ -10,63 +10,63 @@ Basic package diagram example - - + + A - - + + AA - - + + B - - + + AA - - + + AAA - - + + BBB - - + + BB - - + + AAA - - + + BBB - - + + BB - + A AAA note... - + This is namespace AA in namespace A - + This is namespace AA in namespace B diff --git a/docs/test_cases/t30002_package.svg b/docs/test_cases/t30002_package.svg index 4869506a..ab4228f4 100644 --- a/docs/test_cases/t30002_package.svg +++ b/docs/test_cases/t30002_package.svg @@ -1,6 +1,6 @@ - + @@ -9,118 +9,118 @@ - - + + A - - + + AA - - + + B - - + + BB - - + + A1 - - + + A2 - - + + A3 - - + + A4 - - + + A5 - - + + A6 - - + + A7 - - + + A8 - - + + A9 - - + + A10 - - + + A11 - - + + A12 - - + + A13 - - + + A14 - - + + A15 - - + + A16 - - + + A17 - - + + A18 - - + + BBB diff --git a/docs/test_cases/t30003_package.svg b/docs/test_cases/t30003_package.svg index a4840cd2..31ee0a29 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 749e335c..61683e4e 100644 --- a/docs/test_cases/t30004_package.svg +++ b/docs/test_cases/t30004_package.svg @@ -1,6 +1,6 @@ - + @@ -9,40 +9,40 @@ - - + + 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 6d4942bf..689b85ba 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 717e1645..9b7b7c86 100644 --- a/docs/test_cases/t30006_package.svg +++ b/docs/test_cases/t30006_package.svg @@ -1,6 +1,6 @@ - + @@ -9,22 +9,22 @@ - - + + B - - + + A - - + + C - + Top A note. diff --git a/docs/test_cases/t30007_package.svg b/docs/test_cases/t30007_package.svg index 8993318f..4ddba072 100644 --- a/docs/test_cases/t30007_package.svg +++ b/docs/test_cases/t30007_package.svg @@ -1,6 +1,6 @@ - + @@ -9,27 +9,27 @@ - - + + 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 6f95b1d2..fe1c18ad 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 dcf4ae6f..5340d590 100644 --- a/docs/test_cases/t30009_package.svg +++ b/docs/test_cases/t30009_package.svg @@ -1,6 +1,6 @@ - + @@ -9,53 +9,53 @@ - - + + One - - + + Two - - + + B - - + + D - - + + A - - + + C - - + + A - - + + B - - + + C - - + + D diff --git a/docs/test_cases/t30010_package.svg b/docs/test_cases/t30010_package.svg index ec5d993d..5338c4dc 100644 --- a/docs/test_cases/t30010_package.svg +++ b/docs/test_cases/t30010_package.svg @@ -1,6 +1,6 @@ - + @@ -9,31 +9,31 @@ - + libraries - - + + lib1 - - + + lib2 - - + + lib3 - - + + lib4 - - + + app diff --git a/docs/test_cases/t30011_package.svg b/docs/test_cases/t30011_package.svg index 12c18634..d6ac378d 100644 --- a/docs/test_cases/t30011_package.svg +++ b/docs/test_cases/t30011_package.svg @@ -1,6 +1,6 @@ - + @@ -9,31 +9,31 @@ - + libraries - - + + lib1 - - + + lib2 - - + + lib3 - - + + lib4 - - + + app diff --git a/docs/test_cases/t30012_package.svg b/docs/test_cases/t30012_package.svg index 7239c608..deee9581 100644 --- a/docs/test_cases/t30012_package.svg +++ b/docs/test_cases/t30012_package.svg @@ -1,6 +1,6 @@ - + @@ -9,26 +9,26 @@ - + app - - + + lib1 - - + + mod1 - - + + mod2 - - + + lib2 diff --git a/docs/test_cases/t30013_package.svg b/docs/test_cases/t30013_package.svg index bb9152a3..b53b51d6 100644 --- a/docs/test_cases/t30013_package.svg +++ b/docs/test_cases/t30013_package.svg @@ -1,6 +1,6 @@ - + @@ -9,98 +9,98 @@ - - + + mod1 - - + + mod2 - - + + mod3 - - + + mod4 - - + + mod5 - - + + mod6 - - + + mod7 - - + + mod8 - - + + mod9 - - + + mod10 - - + + mod11 - - + + mod12 - - + + mod13 - - + + mod14 - - + + mod15 - - + + mod16 - - + + mod17 - - + + mod18 - - + + app diff --git a/docs/test_cases/t30014_package.svg b/docs/test_cases/t30014_package.svg index 6d60e594..f5a222a1 100644 --- a/docs/test_cases/t30014_package.svg +++ b/docs/test_cases/t30014_package.svg @@ -1,6 +1,6 @@ - + @@ -9,21 +9,21 @@ - + app - - + + :lib1 - - + + mod1 - - + + :lib2 diff --git a/docs/test_cases/t30015_package.svg b/docs/test_cases/t30015_package.svg index ba96f0e1..8984199b 100644 --- a/docs/test_cases/t30015_package.svg +++ b/docs/test_cases/t30015_package.svg @@ -1,6 +1,6 @@ - + @@ -9,101 +9,101 @@ - + lib1 - - + + :mod1 - - + + :mod2 - - + + :mod3 - - + + :mod4 - - + + :mod5 - - + + :mod6 - - + + :mod7 - - + + :mod8 - - + + :mod9 - - + + :mod10 - - + + :mod11 - - + + :mod12 - - + + :mod13 - - + + :mod14 - - + + :mod15 - - + + :mod16 - - + + :mod17 - - + + :mod18 - - + + app diff --git a/docs/test_cases/t40001_include.svg b/docs/test_cases/t40001_include.svg index 90355077..b45baa74 100644 --- a/docs/test_cases/t40001_include.svg +++ b/docs/test_cases/t40001_include.svg @@ -1,6 +1,6 @@ - + @@ -10,41 +10,41 @@ Basic include diagram example - + src - + include - + lib1 - - + + t40001.cc - - + + t40001_include1.h - + lib1.h - + string - + vector - + yaml-cpp/yaml.h - + This is a lib1 include dir - + This is a t40001_include1.h include file diff --git a/docs/test_cases/t40001_include_mermaid.svg b/docs/test_cases/t40001_include_mermaid.svg index 0af13e6f..01ee6be7 100644 --- a/docs/test_cases/t40001_include_mermaid.svg +++ b/docs/test_cases/t40001_include_mermaid.svg @@ -138,7 +138,7 @@ - + @@ -151,7 +151,7 @@ - + @@ -164,7 +164,7 @@ - + diff --git a/docs/test_cases/t40002_include.svg b/docs/test_cases/t40002_include.svg index 5ad5cdd6..ca4715e8 100644 --- a/docs/test_cases/t40002_include.svg +++ b/docs/test_cases/t40002_include.svg @@ -1,6 +1,6 @@ - + @@ -9,46 +9,46 @@ - + src - + lib1 - + lib2 - + include - + lib1 - + lib2 - - + + t40002.cc - - + + lib1.cc - - + + lib2.cc - - + + lib1.h - - + + lib2.h diff --git a/docs/test_cases/t40002_include_mermaid.svg b/docs/test_cases/t40002_include_mermaid.svg index d41801d9..7531e411 100644 --- a/docs/test_cases/t40002_include_mermaid.svg +++ b/docs/test_cases/t40002_include_mermaid.svg @@ -137,7 +137,7 @@ - + @@ -150,7 +150,7 @@ - + @@ -163,7 +163,7 @@ - + @@ -176,7 +176,7 @@ - + @@ -189,7 +189,7 @@ - + diff --git a/docs/test_cases/t40003_include.svg b/docs/test_cases/t40003_include.svg index 61cd20a5..c7a10e44 100644 --- a/docs/test_cases/t40003_include.svg +++ b/docs/test_cases/t40003_include.svg @@ -1,6 +1,6 @@ - + @@ -9,62 +9,62 @@ - + src - + dependants - + dependencies - + include - + dependants - + dependencies - - + + t1.cc - - + + t2.cc - - + + t3.h - - + + t2.h - + t1.h - - + + t3.h - - + + t2.h - + t1.h - - + + t5.h diff --git a/docs/test_cases/t40003_include_mermaid.svg b/docs/test_cases/t40003_include_mermaid.svg index 980dacbf..48a2f5bd 100644 --- a/docs/test_cases/t40003_include_mermaid.svg +++ b/docs/test_cases/t40003_include_mermaid.svg @@ -167,7 +167,7 @@ - + @@ -180,7 +180,7 @@ - + @@ -193,7 +193,7 @@ - + @@ -206,7 +206,7 @@ - + @@ -219,7 +219,7 @@ - + @@ -232,7 +232,7 @@ - + @@ -245,7 +245,7 @@ - + @@ -258,7 +258,7 @@ - + @@ -271,7 +271,7 @@ - + diff --git a/src/class_diagram/model/class.cc b/src/class_diagram/model/class.cc index 8105ee19..4dc8c0fc 100644 --- a/src/class_diagram/model/class.cc +++ b/src/class_diagram/model/class.cc @@ -25,7 +25,7 @@ namespace clanguml::class_diagram::model { class_::class_(const common::model::namespace_ &using_namespace) - : element{using_namespace} + : template_element{using_namespace} { } @@ -33,10 +33,6 @@ bool class_::is_struct() const { return is_struct_; } void class_::is_struct(bool is_struct) { is_struct_ = is_struct; } -bool class_::is_template() const { return is_template_; } - -void class_::is_template(bool is_template) { is_template_ = is_template; } - bool class_::is_union() const { return is_union_; } void class_::is_union(bool is_union) { is_union_ = is_union; } @@ -115,27 +111,6 @@ bool class_::is_abstract() const [](const auto &method) { return method.is_pure_virtual(); }); } -int class_::calculate_template_specialization_match(const class_ &other) const -{ - int res{0}; - - if (name_and_ns() != other.name_and_ns()) { - return res; - } - - return template_trait::calculate_template_specialization_match(other); -} - -void class_::template_specialization_found(bool found) -{ - template_specialization_found_ = found; -} - -bool class_::template_specialization_found() const -{ - return template_specialization_found_; -} - std::optional class_::doxygen_link() const { const auto *type = is_struct() ? "struct" : "class"; diff --git a/src/class_diagram/model/class.h b/src/class_diagram/model/class.h index c3484d43..b8375aec 100644 --- a/src/class_diagram/model/class.h +++ b/src/class_diagram/model/class.h @@ -20,9 +20,9 @@ #include "class_member.h" #include "class_method.h" #include "class_parent.h" -#include "common/model/element.h" #include "common/model/enums.h" #include "common/model/stylable_element.h" +#include "common/model/template_element.h" #include "common/model/template_parameter.h" #include "common/model/template_trait.h" #include "common/types.h" @@ -35,9 +35,8 @@ namespace clanguml::class_diagram::model { /** * @brief Diagram element representing a class or class template. */ -class class_ : public common::model::element, - public common::model::stylable_element, - public template_trait { +class class_ : public common::model::template_element, + public common::model::stylable_element { public: class_(const common::model::namespace_ &using_namespace); @@ -69,20 +68,6 @@ public: */ void is_struct(bool is_struct); - /** - * Whether or not the class is a template. - * - * @return True, if the class is a template. - */ - bool is_template() const; - - /** - * Set, whether the class is a template. - * - * @param is_struct True, if the class is a template. - */ - void is_template(bool is_template); - /** * Whether or not the class is a union. * @@ -171,31 +156,6 @@ public: */ bool is_abstract() const; - /** - * @brief Calculate template specialization match with other class. - * - * This method is a wrapper over - * @ref template_trait::calculate_template_specialization_match() - * - * @param other - * @return - */ - int calculate_template_specialization_match(const class_ &other) const; - - /** - * Whether, a template specialization has already been found for this class. - * @return True, if a template specialization has already been found. - */ - bool template_specialization_found() const; - - /** - * Set, whether a template specialization has already been found for this - * class. - * - * @param found True, if a template specialization has already been found. - */ - void template_specialization_found(bool found); - /** * @brief Generate Doxygen style HTML link for the class. * @@ -208,15 +168,12 @@ public: private: bool is_struct_{false}; - bool is_template_{false}; bool is_union_{false}; std::vector members_; std::vector methods_; std::vector bases_; std::string base_template_full_name_; std::string full_name_; - - bool template_specialization_found_{false}; }; } // namespace clanguml::class_diagram::model diff --git a/src/class_diagram/model/diagram.cc b/src/class_diagram/model/diagram.cc index 50aa49c6..a062cad2 100644 --- a/src/class_diagram/model/diagram.cc +++ b/src/class_diagram/model/diagram.cc @@ -141,6 +141,10 @@ void diagram::get_parents( if (found) found_new = true; } + else { + LOG_WARN("Couldn't find class representing base class: {} [{}]", + pp.name(), pp.id()); + } } } diff --git a/src/class_diagram/visitor/translation_unit_visitor.cc b/src/class_diagram/visitor/translation_unit_visitor.cc index cac07180..e15d6d26 100644 --- a/src/class_diagram/visitor/translation_unit_visitor.cc +++ b/src/class_diagram/visitor/translation_unit_visitor.cc @@ -32,7 +32,26 @@ translation_unit_visitor::translation_unit_visitor(clang::SourceManager &sm, : common::visitor::translation_unit_visitor{sm, config} , diagram_{diagram} , config_{config} - , template_builder_{*this} + , template_builder_{diagram_, config_, *this, + [uns = config_.using_namespace()](const clang::NamedDecl *decl) { + auto cls = std::make_unique(uns); + cls->is_struct(common::is_struct(decl)); + return cls; + }, + [this](common::model::template_element &template_instantiation_base, + const std::string &full_name, common::id_t templated_decl_id) { + find_instantiation_relationships( + template_instantiation_base, full_name, templated_decl_id); + }, + [](clanguml::common::model::template_element &tinst, + clanguml::common::id_t id, const std::string &full_name) { + model::class_parent cp; + cp.set_access(common::model::access_t::kPublic); + cp.set_name(full_name); + cp.set_id(id); + + dynamic_cast(tinst).add_parent(std::move(cp)); + }} { } @@ -254,10 +273,9 @@ bool translation_unit_visitor::VisitTypeAliasTemplateDecl( return true; auto template_specialization_ptr = - tbuilder().build(cls, *template_type_specialization_ptr); - - if (!template_specialization_ptr) - return true; + std::make_unique(config().using_namespace()); + tbuilder().build( + *template_specialization_ptr, cls, *template_type_specialization_ptr); if (diagram().should_include(*template_specialization_ptr)) { const auto name = template_specialization_ptr->full_name(); @@ -1051,20 +1069,26 @@ void translation_unit_visitor::process_class_bases( cp.set_name(name_and_ns.to_string()); - if (const auto *record_type = - base.getType()->getAs(); - record_type != nullptr) { + if (const auto *tsp = + base.getType()->getAs(); + tsp != nullptr) { + auto template_specialization_ptr = + std::make_unique(config().using_namespace()); + tbuilder().build(*template_specialization_ptr, cls, *tsp, {}); + + cp.set_id(template_specialization_ptr->id()); + cp.set_name(template_specialization_ptr->full_name(false)); + + if (diagram().should_include(*template_specialization_ptr)) { + add_class(std::move(template_specialization_ptr)); + } + } + else if (const auto *record_type = + base.getType()->getAs(); + record_type != nullptr) { cp.set_name(record_type->getDecl()->getQualifiedNameAsString()); cp.set_id(common::to_id(*record_type->getDecl())); } - else if (const auto *tsp = - base.getType()->getAs(); - tsp != nullptr) { - auto template_specialization_ptr = tbuilder().build(cls, *tsp, {}); - if (template_specialization_ptr) { - cp.set_id(template_specialization_ptr->id()); - } - } else // This could be a template parameter - we don't want it here continue; @@ -1261,7 +1285,7 @@ void translation_unit_visitor::process_method( auto method_return_type = common::to_string(mf.getReturnType(), mf.getASTContext()); - ensure_lambda_type_is_relative(method_return_type); + common::ensure_lambda_type_is_relative(config(), method_return_type); auto method_name = mf.getNameAsString(); if (mf.isTemplated()) { @@ -1304,12 +1328,13 @@ void translation_unit_visitor::process_method( ->getAs(); if (unaliased_type != nullptr) { - auto template_specialization_ptr = tbuilder().build( + auto template_specialization_ptr = + std::make_unique(config().using_namespace()); + tbuilder().build(*template_specialization_ptr, unaliased_type->getTemplateName().getAsTemplateDecl(), *unaliased_type, &c); - if (diagram().should_include( - template_specialization_ptr->get_namespace())) { + if (diagram().should_include(*template_specialization_ptr)) { relationships.emplace_back(template_specialization_ptr->id(), relationship_t::kDependency); @@ -1652,7 +1677,7 @@ void translation_unit_visitor::process_function_parameter( auto parameter_type = common::to_string(p.getType(), p.getASTContext()); // Is there no better way to determine that 'type' is a lambda? - ensure_lambda_type_is_relative(parameter_type); + common::ensure_lambda_type_is_relative(config(), parameter_type); parameter.set_type(parameter_type); @@ -1678,11 +1703,12 @@ void translation_unit_visitor::process_function_parameter( .getUnqualifiedType() ->getAs(); templ != nullptr) { - auto template_specialization_ptr = tbuilder().build( + auto template_specialization_ptr = + std::make_unique(config().using_namespace()); + tbuilder().build(*template_specialization_ptr, templ->getTemplateName().getAsTemplateDecl(), *templ, &c); - if (diagram().should_include( - template_specialization_ptr->get_namespace())) { + if (diagram().should_include(*template_specialization_ptr)) { relationships.emplace_back(template_specialization_ptr->id(), relationship_t::kDependency); @@ -1711,40 +1737,6 @@ void translation_unit_visitor::process_function_parameter( method.add_parameter(std::move(parameter)); } -void translation_unit_visitor::ensure_lambda_type_is_relative( - std::string ¶meter_type) const -{ -#ifdef _MSC_VER - auto root_name = - fmt::format("{}", std::filesystem::current_path().root_name().string()); -#else - auto root_name = std::string{"/"}; -#endif - - std::string lambda_prefix{fmt::format("(lambda at {}", root_name)}; - - while (parameter_type.find(lambda_prefix) != std::string::npos) { - auto lambda_begin = parameter_type.find(lambda_prefix); - auto lambda_prefix_size = lambda_prefix.size(); -#ifdef _MSC_VER - // Skip the `\` or `/` after drive letter and semicolon - lambda_prefix_size++; -#endif - auto absolute_lambda_path_end = - parameter_type.find(':', lambda_begin + lambda_prefix_size); - auto absolute_lambda_path = parameter_type.substr( - lambda_begin + lambda_prefix_size - 1, - absolute_lambda_path_end - (lambda_begin + lambda_prefix_size - 1)); - - auto relative_lambda_path = util::path_to_url( - config().make_path_relative(absolute_lambda_path).string()); - - parameter_type = fmt::format("{}(lambda at {}{}", - parameter_type.substr(0, lambda_begin), relative_lambda_path, - parameter_type.substr(absolute_lambda_path_end)); - } -} - void translation_unit_visitor::add_relationships(class_ &c, const class_member &field, const found_relationships_t &relationships, bool break_on_first_aggregation) @@ -1816,7 +1808,8 @@ std::unique_ptr translation_unit_visitor::process_template_specialization( clang::ClassTemplateSpecializationDecl *cls) { - auto c_ptr = tbuilder().build_from_class_template_specialization(*cls); + auto c_ptr = std::make_unique(config().using_namespace()); + tbuilder().build_from_class_template_specialization(*c_ptr, *cls); auto &template_instantiation = *c_ptr; template_instantiation.is_template(true); @@ -1876,7 +1869,7 @@ void translation_unit_visitor::process_field( auto field_type_str = common::to_string(field_type, field_declaration.getASTContext(), false); - ensure_lambda_type_is_relative(field_type_str); + common::ensure_lambda_type_is_relative(config(), field_type_str); class_member field{ common::access_specifier_to_access_t(field_declaration.getAccess()), @@ -1938,7 +1931,9 @@ void translation_unit_visitor::process_field( if (template_field_type != nullptr && !field_type_is_template_template_parameter) { // Build the template instantiation for the field type - auto template_specialization_ptr = tbuilder().build( + auto template_specialization_ptr = + std::make_unique(config().using_namespace()); + tbuilder().build(*template_specialization_ptr, field_type->getAs() ->getTemplateName() .getAsTemplateDecl(), @@ -2136,6 +2131,12 @@ bool translation_unit_visitor::has_processed_template_class( return util::contains(processed_template_qualified_names_, qualified_name); } +void translation_unit_visitor::add_diagram_element( + std::unique_ptr element) +{ + add_class(util::unique_pointer_cast(std::move(element))); +} + void translation_unit_visitor::add_class(std::unique_ptr &&c) { if ((config().generate_packages() && @@ -2220,4 +2221,66 @@ void translation_unit_visitor::add_concept(std::unique_ptr &&c) } } +void translation_unit_visitor::find_instantiation_relationships( + common::model::template_element &template_instantiation_base, + const std::string &full_name, common::id_t templated_decl_id) +{ + auto &template_instantiation = dynamic_cast( + template_instantiation_base); + + // First try to find the best match for this template in partially + // specialized templates + std::string destination{}; + std::string best_match_full_name{}; + auto full_template_name = template_instantiation.full_name(false); + int best_match{}; + common::id_t best_match_id{0}; + + for (const auto templ : diagram().classes()) { + if (templ.get() == template_instantiation) + continue; + + 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 = templ.get().id(); + } + } + + auto templated_decl_global_id = + id_mapper().get_global_id(templated_decl_id).value_or(0); + + if (best_match_id > 0) { + destination = best_match_full_name; + template_instantiation.add_relationship( + {common::model::relationship_t::kInstantiation, best_match_id}); + template_instantiation.template_specialization_found(true); + } + // If we can't find optimal match for parent template specialization, + // just use whatever clang suggests + else if (diagram().has_element(templated_decl_global_id)) { + template_instantiation.add_relationship( + {common::model::relationship_t::kInstantiation, + templated_decl_global_id}); + template_instantiation.template_specialization_found(true); + } + else if (diagram().should_include(common::model::namespace_{full_name})) { + LOG_DBG("Skipping instantiation relationship from {} to {}", + template_instantiation.full_name(false), templated_decl_global_id); + } + else { + LOG_DBG("== Cannot determine global id for specialization template {} " + "- delaying until the translation unit is complete ", + templated_decl_global_id); + + template_instantiation.add_relationship( + {common::model::relationship_t::kInstantiation, templated_decl_id}); + } +} + } // namespace clanguml::class_diagram::visitor diff --git a/src/class_diagram/visitor/translation_unit_visitor.h b/src/class_diagram/visitor/translation_unit_visitor.h index 30e7ea65..ac96229b 100644 --- a/src/class_diagram/visitor/translation_unit_visitor.h +++ b/src/class_diagram/visitor/translation_unit_visitor.h @@ -20,13 +20,11 @@ #include "class_diagram/model/class.h" #include "class_diagram/model/concept.h" #include "class_diagram/model/diagram.h" -#include "class_diagram/visitor/template_builder.h" #include "common/model/enums.h" #include "common/model/template_trait.h" -#include "common/visitor/ast_id_mapper.h" +#include "common/visitor/template_builder.h" #include "common/visitor/translation_unit_visitor.h" #include "config/config.h" -#include "template_builder.h" #include #include @@ -53,6 +51,8 @@ using clanguml::common::model::relationship; using clanguml::common::model::relationship_t; using clanguml::common::model::template_parameter; using clanguml::common::model::template_trait; +using clanguml::common::visitor::found_relationships_t; +using clanguml::common::visitor::template_builder; /** * @brief Class diagram translation unit visitor @@ -136,13 +136,6 @@ public: */ void finalize(); - /** - * @brief Get reference to Clang AST to clang-uml id mapper - * - * @return Reference to Clang AST to clang-uml id mapper - */ - common::visitor::ast_id_mapper &id_mapper() const { return id_mapper_; } - /** * @brief Add class (or template class) to the diagram. * @@ -164,8 +157,6 @@ public: */ void add_concept(std::unique_ptr &&c); - void ensure_lambda_type_is_relative(std::string ¶meter_type) const; - private: /** * @brief Check if the diagram should include a declaration. @@ -460,6 +451,13 @@ private: */ bool has_processed_template_class(const std::string &qualified_name) const; + void add_diagram_element( + std::unique_ptr element) override; + + void find_instantiation_relationships( + common::model::template_element &template_instantiation_base, + const std::string &full_name, common::id_t templated_decl_id); + /** * @brief Get template builder reference * @@ -473,8 +471,6 @@ private: // Reference to class diagram config const clanguml::config::class_diagram &config_; - mutable common::visitor::ast_id_mapper id_mapper_; - template_builder template_builder_; std::map(body); } +bool is_struct(const clang::NamedDecl *decl) +{ + if (decl == nullptr) + return false; + + if (const auto *record = clang::dyn_cast(decl); + record) { + return record->isStruct(); + } + + if (const auto *tag = clang::dyn_cast(decl); tag) { + return tag->isStruct(); + } + + return false; +} + } // namespace clanguml::common diff --git a/src/common/clang_utils.h b/src/common/clang_utils.h index 2f1ef2ab..11e39488 100644 --- a/src/common/clang_utils.h +++ b/src/common/clang_utils.h @@ -20,6 +20,7 @@ #include "common/model/enums.h" #include "common/model/namespace.h" #include "common/model/template_parameter.h" +#include "config/config.h" #include "types.h" #include "util/util.h" @@ -153,6 +154,9 @@ std::string get_source_text( std::tuple extract_template_parameter_index(const std::string &type_parameter); +void ensure_lambda_type_is_relative( + const config::diagram &config, std::string ¶meter_type); + /** * @brief Check if an expression is contained in another expression * @@ -303,4 +307,12 @@ clang::RawComment *get_expression_raw_comment(const clang::SourceManager &sm, */ bool is_coroutine(const clang::FunctionDecl &decl); +/** + * Check if named declaration is a C++ struct. + * + * @param decl Declaration to check + * @return True, if declaration represents a struct. + */ +bool is_struct(const clang::NamedDecl *decl); + } // namespace clanguml::common diff --git a/src/common/model/diagram_filter.cc b/src/common/model/diagram_filter.cc index a784ed56..d29db4da 100644 --- a/src/common/model/diagram_filter.cc +++ b/src/common/model/diagram_filter.cc @@ -498,8 +498,9 @@ tvl::value_t subclass_filter::match(const diagram &d, const element &e) const for (const auto &root : roots_) { for (const auto &parent : parents) { auto full_name = parent.get().full_name(false); - if (root == full_name) + if (root == full_name) { return true; + } } } diff --git a/src/common/model/template_element.cc b/src/common/model/template_element.cc new file mode 100644 index 00000000..2caac028 --- /dev/null +++ b/src/common/model/template_element.cc @@ -0,0 +1,52 @@ +/** + * @file src/common/model/template_element.cc + * + * Copyright (c) 2021-2024 Bartek Kryza + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "template_element.h" + +namespace clanguml::common::model { + +bool template_element::is_template() const { return is_template_; } + +void template_element::is_template(bool is_template) +{ + is_template_ = is_template; +} + +int template_element::calculate_template_specialization_match( + const template_element &other) const +{ + int res{0}; + + if (name_and_ns() != other.name_and_ns()) { + return res; + } + + return template_trait::calculate_template_specialization_match(other); +} + +void template_element::template_specialization_found(bool found) +{ + template_specialization_found_ = found; +} + +bool template_element::template_specialization_found() const +{ + return template_specialization_found_; +} + +} // namespace clanguml::common::model \ No newline at end of file diff --git a/src/common/model/template_element.h b/src/common/model/template_element.h new file mode 100644 index 00000000..338bb64f --- /dev/null +++ b/src/common/model/template_element.h @@ -0,0 +1,79 @@ +/** + * @file src/common/model/template_element.h + * + * Copyright (c) 2021-2024 Bartek Kryza + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#pragma once + +#include "element.h" +#include "template_trait.h" + +namespace clanguml::common::model { + +/** + * @brief Base class for any element qualified by namespace. + */ +class template_element : public element, public template_trait { +public: + using element::element; + + ~template_element() override = default; + + /** + * Whether or not the class is a template. + * + * @return True, if the class is a template. + */ + bool is_template() const; + + /** + * Set, whether the class is a template. + * + * @param is_struct True, if the class is a template. + */ + void is_template(bool is_template); + + /** + * @brief Calculate template specialization match with other class. + * + * This method is a wrapper over + * @ref template_trait::calculate_template_specialization_match() + * + * @param other + * @return + */ + int calculate_template_specialization_match( + const template_element &other) const; + + /** + * Whether, a template specialization has already been found for this class. + * @return True, if a template specialization has already been found. + */ + bool template_specialization_found() const; + + /** + * Set, whether a template specialization has already been found for this + * class. + * + * @param found True, if a template specialization has already been found. + */ + void template_specialization_found(bool found); + +private: + bool template_specialization_found_{false}; + bool is_template_{false}; +}; + +} // namespace clanguml::common::model \ No newline at end of file diff --git a/src/class_diagram/visitor/template_builder.cc b/src/common/visitor/template_builder.cc similarity index 82% rename from src/class_diagram/visitor/template_builder.cc rename to src/common/visitor/template_builder.cc index ae73733f..eee5ed7c 100644 --- a/src/class_diagram/visitor/template_builder.cc +++ b/src/common/visitor/template_builder.cc @@ -21,24 +21,29 @@ #include "translation_unit_visitor.h" #include -namespace clanguml::class_diagram::visitor { +namespace clanguml::common::visitor { -template_builder::template_builder( - clanguml::class_diagram::visitor::translation_unit_visitor &visitor) - : diagram_{visitor.diagram()} - , config_{visitor.config()} +template_builder::template_builder(clanguml::common::model::diagram &diagram_, + const clanguml::config::diagram &config_, + clanguml::common::visitor::translation_unit_visitor &visitor, + element_factory_t element_factory, + find_instantiation_relationships_t find_instantiation_relationships, + on_argument_base_found_t on_argument_base_found) + : diagram_{diagram_} + , config_{config_} , id_mapper_{visitor.id_mapper()} , source_manager_{visitor.source_manager()} , visitor_{visitor} + , element_factory_{std::move(element_factory)} + , find_instantiation_relationships_{std::move( + find_instantiation_relationships)} + , on_argument_base_found_{std::move(on_argument_base_found)} { } -class_diagram::model::diagram &template_builder::diagram() { return diagram_; } +common::model::diagram &template_builder::diagram() { return diagram_; } -const config::class_diagram &template_builder::config() const -{ - return config_; -} +const config::diagram &template_builder::config() const { return config_; } const namespace_ &template_builder::using_namespace() const { @@ -70,9 +75,11 @@ bool template_builder::simplify_system_template( return false; } -std::unique_ptr template_builder::build(const clang::NamedDecl *cls, +void template_builder::build( + clanguml::common::model::template_element &template_instantiation, + const clang::NamedDecl *cls, const clang::TemplateSpecializationType &template_type_decl, - std::optional parent) + std::optional parent) { // // Here we'll hold the template base class params to replace with the @@ -94,13 +101,6 @@ std::unique_ptr template_builder::build(const clang::NamedDecl *cls, const auto &template_type = *template_type_ptr; - // - // Create class_ instance to hold the template instantiation - // - auto template_instantiation_ptr = - std::make_unique(using_namespace()); - - auto &template_instantiation = *template_instantiation_ptr; template_instantiation.is_template(true); std::string full_template_specialization_name = common::to_string( @@ -210,78 +210,21 @@ std::unique_ptr template_builder::build(const clang::NamedDecl *cls, template_type.template_arguments(), template_instantiation, template_decl); - // First try to find the best match for this template in partially - // specialized templates - std::string destination{}; - std::string best_match_full_name{}; - auto full_template_name = template_instantiation.full_name(false); - int best_match{}; - common::id_t best_match_id{0}; - - for (const auto templ : diagram().classes()) { - if (templ.get() == template_instantiation) - continue; - - 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 = templ.get().id(); - } - } - - auto templated_decl_id = - template_type.getTemplateName().getAsTemplateDecl()->getID(); - auto templated_decl_global_id = - id_mapper().get_global_id(templated_decl_id).value_or(0); - - if (best_match_id > 0) { - destination = best_match_full_name; - template_instantiation.add_relationship( - {relationship_t::kInstantiation, best_match_id}); - template_instantiation.template_specialization_found(true); - } - // If we can't find optimal match for parent template specialization, - // just use whatever clang suggests - else if (diagram().has_element(templated_decl_global_id)) { - template_instantiation.add_relationship( - {relationship_t::kInstantiation, templated_decl_global_id}); - template_instantiation.template_specialization_found(true); - } - else if (diagram().should_include( - namespace_{full_template_specialization_name})) { - LOG_DBG("Skipping instantiation relationship from {} to {}", - template_instantiation_ptr->full_name(false), templated_decl_id); - } - else { - LOG_DBG("== Cannot determine global id for specialization template {} " - "- delaying until the translation unit is complete ", - templated_decl_id); - - template_instantiation.add_relationship( - {relationship_t::kInstantiation, templated_decl_id}); - } + find_instantiation_relationships(template_instantiation, + template_type.getTemplateName().getAsTemplateDecl()->getID(), + full_template_specialization_name); template_instantiation.set_id( - common::to_id(template_instantiation_ptr->full_name(false))); + common::to_id(template_instantiation.full_name(false))); visitor_.set_source_location(*cls, template_instantiation); - - return template_instantiation_ptr; } -std::unique_ptr -template_builder::build_from_class_template_specialization( +void template_builder::build_from_class_template_specialization( + clanguml::common::model::template_element &template_instantiation, const clang::ClassTemplateSpecializationDecl &template_specialization, - std::optional parent) + std::optional parent) { - auto template_instantiation_ptr = - std::make_unique(config_.using_namespace()); - // // Here we'll hold the template base params to replace with the // instantiated values @@ -290,9 +233,6 @@ template_builder::build_from_class_template_specialization( /*is variadic */ bool>> template_base_params{}; - auto &template_instantiation = *template_instantiation_ptr; - template_instantiation.is_struct(template_specialization.isStruct()); - const clang::ClassTemplateDecl *template_decl = template_specialization.getSpecializedTemplate(); @@ -312,63 +252,29 @@ template_builder::build_from_class_template_specialization( template_instantiation.set_id( common::to_id(template_instantiation.full_name(false))); - // First try to find the best match for this template in partially - // specialized templates - std::string destination{}; - std::string best_match_full_name{}; - auto full_template_name = template_instantiation.full_name(false); - int best_match{}; - common::id_t best_match_id{0}; - - for (const auto templ : diagram().classes()) { - if (templ.get() == template_instantiation) - continue; - - 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 = templ.get().id(); - } - } - - auto templated_decl_id = template_specialization.getID(); - auto templated_decl_local_id = - id_mapper().get_global_id(templated_decl_id).value_or(0); - - if (best_match_id > 0) { - destination = best_match_full_name; - template_instantiation.add_relationship( - {relationship_t::kInstantiation, best_match_id}); - template_instantiation.template_specialization_found(true); - } - else if (diagram().has_element(templated_decl_local_id)) { - // If we can't find optimal match for parent template specialization, - // just use whatever clang suggests - template_instantiation.add_relationship( - {relationship_t::kInstantiation, templated_decl_local_id}); - template_instantiation.template_specialization_found(true); - } - else if (diagram().should_include(namespace_{qualified_name})) { - LOG_DBG("Skipping instantiation relationship from {} to {}", - template_instantiation_ptr->full_name(false), templated_decl_id); - } + find_instantiation_relationships(template_instantiation, + template_specialization.getID(), qualified_name); visitor_.set_source_location(*template_decl, template_instantiation); +} - return template_instantiation_ptr; +void template_builder::find_instantiation_relationships( + common::model::template_element &template_instantiation, common::id_t id, + const std::string &qualified_name) const +{ + if (find_instantiation_relationships_) { + find_instantiation_relationships_( + template_instantiation, qualified_name, id); + } } void template_builder::process_template_arguments( - std::optional &parent, + std::optional &parent, const clang::NamedDecl *cls, std::deque> &template_base_params, const clang::ArrayRef &template_args, - class_ &template_instantiation, const clang::TemplateDecl *template_decl) + clanguml::common::model::template_element &template_instantiation, + const clang::TemplateDecl *template_decl) { auto arg_index{0}; @@ -445,8 +351,9 @@ void template_builder::process_template_arguments( } void template_builder::argument_process_dispatch( - std::optional &parent, - const clang::NamedDecl *cls, class_ &template_instantiation, + std::optional &parent, + const clang::NamedDecl *cls, + clanguml::common::model::template_element &template_instantiation, const clang::TemplateDecl *template_decl, const clang::TemplateArgument &arg, size_t argument_index, std::vector &argument) @@ -529,9 +436,11 @@ clang::QualType template_builder::consume_context( } template_parameter template_builder::process_type_argument( - std::optional &parent, + std::optional &parent, const clang::NamedDecl *cls, const clang::TemplateDecl *template_decl, - clang::QualType type, class_ &template_instantiation, size_t argument_index) + clang::QualType type, + clanguml::common::model::template_element &template_instantiation, + size_t argument_index) { std::optional argument; @@ -739,8 +648,9 @@ template_parameter template_builder::process_expression_argument( } std::vector template_builder::process_pack_argument( - std::optional &parent, - const clang::NamedDecl *cls, class_ &template_instantiation, + std::optional &parent, + const clang::NamedDecl *cls, + clanguml::common::model::template_element &template_instantiation, const clang::TemplateDecl *base_template_decl, const clang::TemplateArgument &arg, size_t argument_index, std::vector & /*argument*/) @@ -760,9 +670,10 @@ std::vector template_builder::process_pack_argument( } std::optional template_builder::try_as_member_pointer( - std::optional &parent, + std::optional &parent, const clang::NamedDecl *cls, const clang::TemplateDecl *template_decl, - clang::QualType &type, class_ &template_instantiation, + clang::QualType &type, + clanguml::common::model::template_element &template_instantiation, size_t argument_index) { const auto *mp_type = @@ -835,9 +746,10 @@ std::optional template_builder::try_as_member_pointer( } std::optional template_builder::try_as_array( - std::optional &parent, + std::optional &parent, const clang::NamedDecl *cls, const clang::TemplateDecl *template_decl, - clang::QualType &type, class_ &template_instantiation, + clang::QualType &type, + clanguml::common::model::template_element &template_instantiation, size_t argument_index) { const auto *array_type = common::dereference(type)->getAsArrayTypeUnsafe(); @@ -877,9 +789,10 @@ std::optional template_builder::try_as_array( } std::optional template_builder::try_as_function_prototype( - std::optional &parent, + std::optional &parent, const clang::NamedDecl *cls, const clang::TemplateDecl *template_decl, - clang::QualType &type, class_ &template_instantiation, + clang::QualType &type, + clanguml::common::model::template_element &template_instantiation, size_t argument_index) { const auto *function_type = type->getAs(); @@ -926,10 +839,11 @@ std::optional template_builder::try_as_function_prototype( } std::optional template_builder::try_as_decl_type( - std::optional & /*parent*/, + std::optional & /*parent*/, const clang::NamedDecl * /*cls*/, const clang::TemplateDecl * /*template_decl*/, clang::QualType &type, - class_ & /*template_instantiation*/, size_t /*argument_index*/) + clanguml::common::model::template_element & /*template_instantiation*/, + size_t /*argument_index*/) { const auto *decl_type = common::dereference(type)->getAs(); @@ -944,10 +858,11 @@ std::optional template_builder::try_as_decl_type( } std::optional template_builder::try_as_typedef_type( - std::optional &parent, + std::optional &parent, const clang::NamedDecl * /*cls*/, const clang::TemplateDecl * /*template_decl*/, clang::QualType &type, - class_ & /*template_instantiation*/, size_t /*argument_index*/) + clanguml::common::model::template_element & /*template_instantiation*/, + size_t /*argument_index*/) { const auto *typedef_type = common::dereference(type)->getAs(); @@ -978,9 +893,10 @@ std::optional template_builder::try_as_typedef_type( std::optional template_builder::try_as_template_specialization_type( - std::optional &parent, + std::optional &parent, const clang::NamedDecl *cls, const clang::TemplateDecl *template_decl, - clang::QualType &type, class_ &template_instantiation, + clang::QualType &type, + clanguml::common::model::template_element &template_instantiation, size_t argument_index) { const auto *nested_template_type = @@ -1019,7 +935,11 @@ template_builder::try_as_template_specialization_type( argument.set_type(nested_type_name); - auto nested_template_instantiation = build(cls, *nested_template_type, + auto nested_template_instantiation = + element_factory_(nested_template_type->getTemplateName() + .getAsTemplateDecl() + ->getTemplatedDecl()); + build(*nested_template_instantiation, cls, *nested_template_type, diagram().should_include( namespace_{template_decl->getQualifiedNameAsString()}) ? std::make_optional(&template_instantiation) @@ -1064,7 +984,7 @@ template_builder::try_as_template_specialization_type( if (diagram().should_include( namespace_{nested_template_instantiation_full_name})) { visitor_.set_source_location(*cls, *nested_template_instantiation); - visitor_.add_class(std::move(nested_template_instantiation)); + visitor_.add_diagram_element(std::move(nested_template_instantiation)); } return argument; @@ -1108,7 +1028,7 @@ std::optional template_builder::try_as_template_parm_type( argument.is_variadic(is_variadic); - visitor_.ensure_lambda_type_is_relative(type_parameter_name); + common::ensure_lambda_type_is_relative(config(), type_parameter_name); return argument; } @@ -1127,16 +1047,17 @@ std::optional template_builder::try_as_lambda( auto argument = template_parameter::make_argument(""); type = consume_context(type, argument); - visitor_.ensure_lambda_type_is_relative(type_name); + common::ensure_lambda_type_is_relative(config(), type_name); argument.set_type(type_name); return argument; } std::optional template_builder::try_as_record_type( - std::optional &parent, + std::optional &parent, const clang::NamedDecl * /*cls*/, const clang::TemplateDecl *template_decl, - clang::QualType &type, class_ &template_instantiation, + clang::QualType &type, + clanguml::common::model::template_element &template_instantiation, size_t /*argument_index*/) { const auto *record_type = @@ -1162,8 +1083,10 @@ std::optional template_builder::try_as_record_type( record_type->getAsRecordDecl()); if (class_template_specialization != nullptr) { - auto tag_argument = build_from_class_template_specialization( - *class_template_specialization); + auto tag_argument = element_factory_(class_template_specialization); + + build_from_class_template_specialization( + *tag_argument, *class_template_specialization); if (tag_argument) { argument.set_type(tag_argument->name_and_ns()); @@ -1179,7 +1102,7 @@ std::optional template_builder::try_as_record_type( parent.value()->add_relationship( {relationship_t::kDependency, tag_argument->id()}); visitor_.set_source_location(*template_decl, *tag_argument); - visitor_.add_class(std::move(tag_argument)); + visitor_.add_diagram_element(std::move(tag_argument)); } } } @@ -1198,9 +1121,10 @@ std::optional template_builder::try_as_record_type( } std::optional template_builder::try_as_enum_type( - std::optional & /*parent*/, + std::optional & /*parent*/, const clang::NamedDecl * /*cls*/, const clang::TemplateDecl *template_decl, - clang::QualType &type, class_ &template_instantiation) + clang::QualType &type, + clanguml::common::model::template_element &template_instantiation) { const auto *enum_type = type->getAs(); if (enum_type == nullptr) @@ -1226,7 +1150,7 @@ std::optional template_builder::try_as_enum_type( } std::optional template_builder::try_as_builtin_type( - std::optional & /*parent*/, + std::optional & /*parent*/, clang::QualType &type, const clang::TemplateDecl *template_decl) { const auto *builtin_type = type->getAs(); @@ -1244,16 +1168,19 @@ std::optional template_builder::try_as_builtin_type( return argument; } -bool template_builder::add_base_classes(class_ &tinst, +bool template_builder::add_base_classes( + clanguml::common::model::template_element &tinst, std::deque> &template_base_params, int arg_index, bool variadic_params, const template_parameter &ct) { bool add_template_argument_as_base_class = false; - auto [arg_name, index, is_variadic] = template_base_params.front(); - if (variadic_params) + if (variadic_params) { add_template_argument_as_base_class = true; + } else { + auto [arg_name, index, is_variadic] = template_base_params.front(); + variadic_params = is_variadic; if ((arg_index == index) || (is_variadic && arg_index >= index)) { add_template_argument_as_base_class = true; @@ -1268,13 +1195,9 @@ bool template_builder::add_base_classes(class_ &tinst, if (add_template_argument_as_base_class && maybe_id) { LOG_DBG("Adding template argument as base class '{}'", ct.to_string({}, false)); - - model::class_parent cp; - cp.set_access(common::model::access_t::kPublic); - cp.set_name(ct.to_string({}, false)); - cp.set_id(maybe_id.value()); - - tinst.add_parent(std::move(cp)); + if (on_argument_base_found_) + on_argument_base_found_( + tinst, maybe_id.value(), ct.to_string({}, false)); } return variadic_params; diff --git a/src/class_diagram/visitor/template_builder.h b/src/common/visitor/template_builder.h similarity index 78% rename from src/class_diagram/visitor/template_builder.h rename to src/common/visitor/template_builder.h index 1a2b58ff..25b00df9 100644 --- a/src/class_diagram/visitor/template_builder.h +++ b/src/common/visitor/template_builder.h @@ -17,15 +17,14 @@ */ #pragma once -#include "class_diagram/model/class.h" -#include "class_diagram/model/concept.h" -#include "class_diagram/model/diagram.h" +#include "common/model/diagram.h" +#include "common/model/template_element.h" #include "common/visitor/ast_id_mapper.h" +#include "common/visitor/translation_unit_visitor.h" #include "config/config.h" -namespace clanguml::class_diagram::visitor { +namespace clanguml::common::visitor { -using class_diagram::model::class_; using common::model::namespace_; using common::model::relationship_t; using common::model::template_parameter; @@ -40,27 +39,42 @@ class translation_unit_visitor; */ class template_builder { public: + using element_factory_t = + std::function( + const clang::NamedDecl *)>; + + using find_instantiation_relationships_t = std::function; + + using on_argument_base_found_t = + std::function; /** * @brief Constructor. * * @param visitor Reference to class diagram translation_unit_visitor */ - template_builder( - clanguml::class_diagram::visitor::translation_unit_visitor &visitor); + template_builder(clanguml::common::model::diagram &diagram_, + const clanguml::config::diagram &config_, + clanguml::common::visitor::translation_unit_visitor &visitor, + element_factory_t element_factory, + find_instantiation_relationships_t find_instantiation_relationships = + {}, + on_argument_base_found_t on_argument_base_found = {}); /** * @brief Get reference to the current diagram model * * @return Reference to the current diagram model */ - class_diagram::model::diagram &diagram(); + common::model::diagram &diagram(); /** * @brief Get reference to the current diagram configuration * * @return Reference to the current diagram configuration */ - const config::class_diagram &config() const; + const config::diagram &config() const; /** * @brief Get diagram relative namespace @@ -94,10 +108,11 @@ public: * @param parent Optional class in which this template is contained * @return Created template class model */ - std::unique_ptr build( + void build( + clanguml::common::model::template_element &template_instantiation, const clang::NamedDecl *cls, const clang::TemplateSpecializationType &template_type_decl, - std::optional parent = {}); + std::optional parent = {}); /** * @brief Build template class from class template specialization decl @@ -106,10 +121,10 @@ public: * @param parent Optional class in which this template is contained * @return Created template class model */ - std::unique_ptr - build_from_class_template_specialization( + void build_from_class_template_specialization( + clanguml::common::model::template_element &template_instantiation, const clang::ClassTemplateSpecializationDecl &template_specialization, - std::optional parent = {}); + std::optional parent = {}); /** * @brief Add base classes to the template class, if any. @@ -125,7 +140,7 @@ public: * @param ct Template parameter model * @return True, if any base classes were added */ - bool add_base_classes(clanguml::class_diagram::model::class_ &tinst, + bool add_base_classes(clanguml::common::model::template_element &tinst, std::deque> &template_base_params, int arg_index, bool variadic_params, const clanguml::common::model::template_parameter &ct); @@ -141,11 +156,11 @@ public: * @param template_decl Base template declaration */ void process_template_arguments( - std::optional &parent, + std::optional &parent, const clang::NamedDecl *cls, std::deque> &template_base_params, const clang::ArrayRef &template_args, - model::class_ &template_instantiation, + clanguml::common::model::template_element &template_instantiation, const clang::TemplateDecl *template_decl); /** @@ -161,8 +176,9 @@ public: * variadic parameters) */ void argument_process_dispatch( - std::optional &parent, - const clang::NamedDecl *cls, class_ &template_instantiation, + std::optional &parent, + const clang::NamedDecl *cls, + clanguml::common::model::template_element &template_instantiation, const clang::TemplateDecl *template_decl, const clang::TemplateArgument &arg, size_t argument_index, std::vector &argument); @@ -226,8 +242,9 @@ public: * @return Return template argument model */ std::vector process_pack_argument( - std::optional &parent, - const clang::NamedDecl *cls, class_ &template_instantiation, + std::optional &parent, + const clang::NamedDecl *cls, + clanguml::common::model::template_element &template_instantiation, const clang::TemplateDecl *base_template_decl, const clang::TemplateArgument &arg, size_t argument_index, std::vector &argument); @@ -241,10 +258,11 @@ public: * @return Return template argument model */ template_parameter process_type_argument( - std::optional &parent, + std::optional &parent, const clang::NamedDecl *cls, const clang::TemplateDecl *base_template_decl, clang::QualType type, - model::class_ &template_instantiation, size_t argument_index); + clanguml::common::model::template_element &template_instantiation, + size_t argument_index); /** * @brief Process `clang::TemplateArgument::Template` @@ -282,9 +300,10 @@ public: * @return Function template argument if succeeds, or std::nullopt */ std::optional try_as_function_prototype( - std::optional &parent, + std::optional &parent, const clang::NamedDecl *cls, const clang::TemplateDecl *template_decl, - clang::QualType &type, class_ &template_instantiation, + clang::QualType &type, + clanguml::common::model::template_element &template_instantiation, size_t argument_index); /** @@ -299,9 +318,10 @@ public: * @return Array template argument if succeeds, or std::nullopt */ std::optional try_as_array( - std::optional &parent, + std::optional &parent, const clang::NamedDecl *cls, const clang::TemplateDecl *template_decl, - clang::QualType &type, class_ &template_instantiation, + clang::QualType &type, + clanguml::common::model::template_element &template_instantiation, size_t argument_index); /** @@ -317,9 +337,10 @@ public: * or std::nullopt */ std::optional try_as_template_specialization_type( - std::optional &parent, + std::optional &parent, const clang::NamedDecl *cls, const clang::TemplateDecl *template_decl, - clang::QualType &type, class_ &template_instantiation, + clang::QualType &type, + clanguml::common::model::template_element &template_instantiation, size_t argument_index); /** @@ -357,9 +378,10 @@ public: * @return Record type template argument if succeeds, or std::nullopt */ std::optional try_as_record_type( - std::optional &parent, + std::optional &parent, const clang::NamedDecl *cls, const clang::TemplateDecl *template_decl, - clang::QualType &type, class_ &template_instantiation, + clang::QualType &type, + clanguml::common::model::template_element &template_instantiation, size_t argument_index); /** @@ -373,9 +395,10 @@ public: * @return Enum type template argument if succeeds, or std::nullopt */ std::optional try_as_enum_type( - std::optional &parent, + std::optional &parent, const clang::NamedDecl *cls, const clang::TemplateDecl *template_decl, - clang::QualType &type, class_ &template_instantiation); + clang::QualType &type, + clanguml::common::model::template_element &template_instantiation); /** * @brief Try to process template type argument as builtin type @@ -386,7 +409,7 @@ public: * @return Builtin type template argument if succeeds, or std::nullopt */ std::optional try_as_builtin_type( - std::optional &parent, + std::optional &parent, clang::QualType &type, const clang::TemplateDecl *template_decl); /** @@ -402,9 +425,10 @@ public: * or std::nullopt */ std::optional try_as_member_pointer( - std::optional &parent, + std::optional &parent, const clang::NamedDecl *cls, const clang::TemplateDecl *template_decl, - clang::QualType &type, class_ &template_instantiation, + clang::QualType &type, + clanguml::common::model::template_element &template_instantiation, size_t argument_index); /** @@ -419,9 +443,10 @@ public: * @return `decltype()` type template argument if succeeds, or std::nullopt */ std::optional try_as_decl_type( - std::optional &parent, + std::optional &parent, const clang::NamedDecl *cls, const clang::TemplateDecl *template_decl, - clang::QualType &type, class_ &template_instantiation, + clang::QualType &type, + clanguml::common::model::template_element &template_instantiation, size_t argument_index); /** @@ -436,9 +461,10 @@ public: * @return Typedef type template argument if succeeds, or std::nullopt */ std::optional try_as_typedef_type( - std::optional &parent, + std::optional &parent, const clang::NamedDecl *cls, const clang::TemplateDecl *template_decl, - clang::QualType &type, class_ &template_instantiation, + clang::QualType &type, + clanguml::common::model::template_element &template_instantiation, size_t argument_index); /** @@ -471,8 +497,11 @@ public: * @return True, if any relationships were found */ bool find_relationships_in_unexposed_template_params( - const template_parameter &ct, - class_diagram::visitor::found_relationships_t &relationships); + const template_parameter &ct, found_relationships_t &relationships); + + void find_instantiation_relationships( + common::model::template_element &template_instantiation, + common::id_t id, const std::string &qualified_name) const; /** * @brief Get reference to Clang AST to clang-uml id mapper @@ -490,16 +519,24 @@ public: private: // Reference to the output diagram model - clanguml::class_diagram::model::diagram &diagram_; + clanguml::common::model::diagram &diagram_; - // Reference to class diagram config - const clanguml::config::class_diagram &config_; + // Reference to diagram config + const clanguml::config::diagram &config_; common::visitor::ast_id_mapper &id_mapper_; clang::SourceManager &source_manager_; - clanguml::class_diagram::visitor::translation_unit_visitor &visitor_; + clanguml::common::visitor::translation_unit_visitor &visitor_; + + element_factory_t element_factory_; + + find_instantiation_relationships_t find_instantiation_relationships_; + + // Callback to call when a template instantiation has arguments which are + // base classes, i.e. when template class inherits from template params + on_argument_base_found_t on_argument_base_found_; }; -} // namespace clanguml::class_diagram::visitor \ No newline at end of file +} // namespace clanguml::common::visitor \ No newline at end of file diff --git a/src/common/visitor/translation_unit_visitor.h b/src/common/visitor/translation_unit_visitor.h index 6dfbc762..71408ed5 100644 --- a/src/common/visitor/translation_unit_visitor.h +++ b/src/common/visitor/translation_unit_visitor.h @@ -18,8 +18,9 @@ #pragma once #include "comment/comment_visitor.h" -#include "common/model/element.h" #include "common/model/source_location.h" +#include "common/model/template_element.h" +#include "common/visitor/ast_id_mapper.h" #include "config/config.h" #include @@ -65,6 +66,13 @@ public: */ const std::filesystem::path &tu_path() const; + /** + * @brief Get reference to Clang AST to clang-uml id mapper + * + * @return Reference to Clang AST to clang-uml id mapper + */ + common::visitor::ast_id_mapper &id_mapper() const { return id_mapper_; } + /** * @brief Get clang::SourceManager * @return Reference to @ref clang::SourceManager used by this translation @@ -105,6 +113,11 @@ public: void set_owning_module( const clang::Decl &decl, clanguml::common::model::element &element); + virtual void add_diagram_element( + std::unique_ptr element) + { + } + protected: /** * @brief Process comment directives in comment attached to a declaration @@ -136,5 +149,7 @@ private: std::filesystem::path translation_unit_path_; std::set processed_comments_; + + mutable common::visitor::ast_id_mapper id_mapper_; }; } // namespace clanguml::common::visitor diff --git a/src/config/config.cc b/src/config/config.cc index 829c1361..012ebfcc 100644 --- a/src/config/config.cc +++ b/src/config/config.cc @@ -226,8 +226,15 @@ std::string inheritable_diagram_options::simplify_template_type( type_aliases_longer_first_t aliases; aliases.insert(type_aliases().begin(), type_aliases().end()); - for (const auto &[pattern, replacement] : aliases) { - util::replace_all(full_name, pattern, replacement); + bool matched{true}; + while (matched) { + auto matched_in_iteration{false}; + for (const auto &[pattern, replacement] : aliases) { + matched_in_iteration = + util::replace_all(full_name, pattern, replacement) || + matched_in_iteration; + } + matched = matched_in_iteration; } return full_name; diff --git a/src/config/config.h b/src/config/config.h index 32944fdd..029e934a 100644 --- a/src/config/config.h +++ b/src/config/config.h @@ -458,8 +458,18 @@ struct relationship_hint_t { using relationship_hints_t = std::map; using type_aliases_t = std::map; + +struct type_aliases_longer_first_comparator { + bool operator()(const std::string &a, const std::string &b) const + { + if (a.size() == b.size()) + return a > b; + + return a.size() > b.size(); + } +}; using type_aliases_longer_first_t = - std::map>; + std::map; enum class location_t { marker, fileline, function }; diff --git a/src/sequence_diagram/generators/mermaid/sequence_diagram_generator.cc b/src/sequence_diagram/generators/mermaid/sequence_diagram_generator.cc index af403651..e35dbb49 100644 --- a/src/sequence_diagram/generators/mermaid/sequence_diagram_generator.cc +++ b/src/sequence_diagram/generators/mermaid/sequence_diagram_generator.cc @@ -378,10 +378,13 @@ void generator::generate_participant( print_debug(class_participant, ostr); + auto participant_name = + config().using_namespace().relative(config().simplify_template_type( + class_participant.full_name(false))); + common::ensure_lambda_type_is_relative(config(), participant_name); + ostr << indent(1) << "participant " << class_participant.alias() - << " as " - << render_participant_name(config().using_namespace().relative( - class_participant.full_name(false))); + << " as " << render_participant_name(participant_name); ostr << '\n'; @@ -418,9 +421,12 @@ void generator::generate_participant( else { print_debug(participant, ostr); + auto participant_name = config().using_namespace().relative( + config().simplify_template_type(participant.full_name(false))); + common::ensure_lambda_type_is_relative(config(), participant_name); + ostr << indent(1) << "participant " << participant.alias() << " as " - << config().using_namespace().relative( - participant.full_name(false)); + << render_participant_name(participant_name); ostr << '\n'; generated_participants_.emplace(participant_id); diff --git a/src/sequence_diagram/generators/plantuml/sequence_diagram_generator.cc b/src/sequence_diagram/generators/plantuml/sequence_diagram_generator.cc index 598b0b0f..2207c95d 100644 --- a/src/sequence_diagram/generators/plantuml/sequence_diagram_generator.cc +++ b/src/sequence_diagram/generators/plantuml/sequence_diagram_generator.cc @@ -370,10 +370,13 @@ void generator::generate_participant( print_debug(class_participant, ostr); - ostr << "participant \"" - << render_name(config().using_namespace().relative( - class_participant.full_name(false))) - << "\" as " << class_participant.alias(); + auto participant_name = + config().using_namespace().relative(config().simplify_template_type( + class_participant.full_name(false))); + common::ensure_lambda_type_is_relative(config(), participant_name); + + ostr << "participant \"" << render_name(participant_name) << "\" as " + << class_participant.alias(); if (config().generate_links) { common_generator::generate_link( @@ -416,10 +419,12 @@ void generator::generate_participant( else { print_debug(participant, ostr); - ostr << "participant \"" - << config().using_namespace().relative( - participant.full_name(false)) - << "\" as " << participant.alias(); + auto participant_name = config().using_namespace().relative( + config().simplify_template_type(participant.full_name(false))); + common::ensure_lambda_type_is_relative(config(), participant_name); + + ostr << "participant \"" << render_name(participant_name) << "\" as " + << participant.alias(); if (config().generate_links) { common_generator::generate_link( diff --git a/src/sequence_diagram/model/diagram.h b/src/sequence_diagram/model/diagram.h index 35f0c465..e075a04f 100644 --- a/src/sequence_diagram/model/diagram.h +++ b/src/sequence_diagram/model/diagram.h @@ -83,7 +83,7 @@ public: } return common::optional_ref( - static_cast(participants_.at(id).get())); + dynamic_cast(participants_.at(id).get())); } /** diff --git a/src/sequence_diagram/model/participant.h b/src/sequence_diagram/model/participant.h index ff86fa2e..950a6f26 100644 --- a/src/sequence_diagram/model/participant.h +++ b/src/sequence_diagram/model/participant.h @@ -18,6 +18,7 @@ #pragma once #include "common/model/element.h" +#include "common/model/template_element.h" #include "common/model/template_parameter.h" #include "common/model/template_trait.h" @@ -31,9 +32,9 @@ using clanguml::common::model::template_trait; /** * @brief Base class for various types of sequence diagram participants */ -struct participant : public common::model::element, +struct participant : public common::model::template_element, public common::model::stylable_element { - using common::model::element::element; + using common::model::template_element::template_element; /** * @brief Enum representing stereotype of a participant @@ -74,7 +75,7 @@ struct participant : public common::model::element, /** * @brief Sequence diagram participant representing a class. */ -struct class_ : public participant, public template_trait { +struct class_ : public participant { public: class_(const common::model::namespace_ &using_namespace); @@ -477,7 +478,7 @@ private: /** * @brief Participant model representing a function template. */ -struct function_template : public function, public template_trait { +struct function_template : public function { function_template(const common::model::namespace_ &using_namespace); function_template(const function_template &) = delete; diff --git a/src/sequence_diagram/visitor/translation_unit_visitor.cc b/src/sequence_diagram/visitor/translation_unit_visitor.cc index 5b02b279..dffaa1f4 100644 --- a/src/sequence_diagram/visitor/translation_unit_visitor.cc +++ b/src/sequence_diagram/visitor/translation_unit_visitor.cc @@ -20,6 +20,7 @@ #include "common/clang_utils.h" #include "common/model/namespace.h" +#include "sequence_diagram/model/participant.h" namespace clanguml::sequence_diagram::visitor { @@ -29,6 +30,10 @@ translation_unit_visitor::translation_unit_visitor(clang::SourceManager &sm, : common::visitor::translation_unit_visitor{sm, config} , diagram_{diagram} , config_{config} + , template_builder_{diagram_, config_, *this, + [uns = config_.using_namespace()](const clang::NamedDecl * /*decl*/) { + return std::make_unique(uns); + }} { } @@ -370,6 +375,7 @@ bool translation_unit_visitor::VisitFunctionTemplateDecl( process_comment(*declaration, *function_template_model); set_source_location(*declaration, *function_template_model); + set_owning_module(*declaration, *function_template_model); function_template_model->is_void( declaration->getAsFunction()->getReturnType()->isVoidType()); @@ -1881,6 +1887,9 @@ translation_unit_visitor::process_template_specialization( clang::ClassTemplateSpecializationDecl *cls) { auto c_ptr{std::make_unique(config_.using_namespace())}; + + tbuilder().build_from_class_template_specialization(*c_ptr, *cls); + auto &template_instantiation = *c_ptr; // TODO: refactor to method get_qualified_name() @@ -1897,17 +1906,11 @@ translation_unit_visitor::process_template_specialization( process_comment(*cls, template_instantiation); set_source_location(*cls, template_instantiation); + set_owning_module(*cls, template_instantiation); if (template_instantiation.skip()) return {}; - const auto template_args_count = cls->getTemplateArgs().size(); - for (auto arg_it = 0U; arg_it < template_args_count; arg_it++) { - const auto arg = cls->getTemplateArgs().get(arg_it); - process_template_specialization_argument( - cls, template_instantiation, arg, arg_it); - } - template_instantiation.set_id( common::to_id(template_instantiation.full_name(false))); @@ -2434,15 +2437,16 @@ translation_unit_visitor::create_method_model(clang::CXXMethodDecl *declaration) LOG_DBG("Getting method's class with local id {}", parent_decl->getID()); - if (!get_participant(parent_decl)) { + const auto maybe_method_class = get_participant(parent_decl); + + if (!maybe_method_class) { LOG_DBG("Cannot find parent class_ for method {} in class {}", declaration->getQualifiedNameAsString(), declaration->getParent()->getQualifiedNameAsString()); return {}; } - const auto &method_class = - get_participant(parent_decl).value(); + const auto &method_class = maybe_method_class.value(); method_model_ptr->is_void(declaration->getReturnType()->isVoidType()); @@ -2458,9 +2462,12 @@ translation_unit_visitor::create_method_model(clang::CXXMethodDecl *declaration) declaration->getReturnType(), declaration->getASTContext())); for (const auto *param : declaration->parameters()) { + auto parameter_type = + common::to_string(param->getType(), param->getASTContext()); + common::ensure_lambda_type_is_relative(config(), parameter_type); + parameter_type = simplify_system_template(parameter_type); method_model_ptr->add_parameter(config().using_namespace().relative( - simplify_system_template(common::to_string( - param->getType(), declaration->getASTContext(), false)))); + simplify_system_template(parameter_type))); } return method_model_ptr; diff --git a/src/sequence_diagram/visitor/translation_unit_visitor.h b/src/sequence_diagram/visitor/translation_unit_visitor.h index d1190096..109cf779 100644 --- a/src/sequence_diagram/visitor/translation_unit_visitor.h +++ b/src/sequence_diagram/visitor/translation_unit_visitor.h @@ -18,6 +18,7 @@ #pragma once #include "call_expression_context.h" +#include "common/visitor/template_builder.h" #include "common/visitor/translation_unit_visitor.h" #include "config/config.h" #include "sequence_diagram/model/diagram.h" @@ -510,6 +511,13 @@ private: const clang::SourceManager &sm, const clang::ASTContext &context, int64_t caller_id, const clang::Stmt *stmt); + /** + * @brief Get template builder reference + * + * @return Reference to 'template_builder' instance + */ + common::visitor::template_builder &tbuilder() { return template_builder_; } + // Reference to the output diagram model clanguml::sequence_diagram::model::diagram &diagram_; @@ -549,5 +557,7 @@ private: mutable std::set> processed_comments_; + + common::visitor::template_builder template_builder_; }; } // namespace clanguml::sequence_diagram::visitor diff --git a/src/util/util.h b/src/util/util.h index 391f5b8c..d547fa18 100644 --- a/src/util/util.h +++ b/src/util/util.h @@ -160,6 +160,17 @@ std::string get_git_toplevel_dir(); */ std::string get_os_name(); +template +std::unique_ptr unique_pointer_cast(std::unique_ptr &&p) noexcept +{ + if (T *const converted = dynamic_cast(p.get())) { + p.release(); // NOLINT + return std::unique_ptr{converted}; + } + + return {}; +} + /** * @brief Split a string using delimiter * diff --git a/tests/t00044/t00044.cc b/tests/t00044/t00044.cc index 2d71d9bd..0a23aa02 100644 --- a/tests/t00044/t00044.cc +++ b/tests/t00044/t00044.cc @@ -3,7 +3,7 @@ namespace clanguml::t00044 { template class sink; -template class signal_handler; +template struct signal_handler; template class sink> { @@ -22,7 +22,7 @@ private: }; template -class signal_handler { }; +struct signal_handler { }; template sink(signal_handler &) diff --git a/tests/t00044/test_case.h b/tests/t00044/test_case.h index 55610f86..3f04d11d 100644 --- a/tests/t00044/test_case.h +++ b/tests/t00044/test_case.h @@ -74,9 +74,10 @@ TEST_CASE("t00044", "[test-case][class]") REQUIRE(IsClassTemplate(j, "sink")); REQUIRE(IsClassTemplate(j, "signal_handler")); REQUIRE(IsClassTemplate(j, "signal_handler")); + REQUIRE(IsStruct(j, "signal_handler")); REQUIRE(IsClassTemplate(j, "signal_handler")); REQUIRE(IsClassTemplate(j, "sink>")); - REQUIRE(IsClass(j, "R")); + REQUIRE(IsStruct(j, "R")); save_json(config.output_directory(), diagram->name + ".json", j); } diff --git a/tests/t20012/test_case.h b/tests/t20012/test_case.h index 12100f25..ddebb1d5 100644 --- a/tests/t20012/test_case.h +++ b/tests/t20012/test_case.h @@ -59,9 +59,12 @@ TEST_CASE("t20012", "[test-case][sequence]") REQUIRE_THAT(src, HasCall(_A("C"), _A("C"), "ccc()")); REQUIRE_THAT(src, - HasCall(_A("tmain()"), _A("R"), "r()")); + HasCall(_A("tmain()"), _A("R<(lambda at t20012.cc:86:9)>"), + "R((lambda at t20012.cc:86:9) &&)")); REQUIRE_THAT(src, - HasCall(_A("R"), + HasCall(_A("tmain()"), _A("R<(lambda at t20012.cc:86:9)>"), "r()")); + REQUIRE_THAT(src, + HasCall(_A("R<(lambda at t20012.cc:86:9)>"), _A("tmain()::(lambda t20012.cc:86:9)"), "operator()()")); REQUIRE_THAT(src, HasCall(_A("tmain()::(lambda t20012.cc:86:9)"), _A("C"), "c()")); @@ -88,8 +91,8 @@ TEST_CASE("t20012", "[test-case][sequence]") FindMessage(j, "C", "C", "cc()"), FindMessage(j, "C", "C", "ccc()"), FindMessage(j, "tmain()::(lambda t20012.cc:80:20)", "tmain()::(lambda t20012.cc:67:20)", "operator()()"), - FindMessage(j, "tmain()", "R", "r()"), - FindMessage(j, "R", + FindMessage(j, "tmain()", "R<(lambda at t20012.cc:86:9)>", "r()"), + FindMessage(j, "R<(lambda at t20012.cc:86:9)>", "tmain()::(lambda t20012.cc:86:9)", "operator()()"), FindMessage(j, "tmain()::(lambda t20012.cc:86:9)", "C", "c()"), // @todo #168 @@ -131,9 +134,9 @@ TEST_CASE("t20012", "[test-case][sequence]") REQUIRE_THAT(src, HasCall(_A("C"), _A("C"), "ccc()")); REQUIRE_THAT(src, - HasCall(_A("tmain()"), _A("R"), "r()")); + HasCall(_A("tmain()"), _A("R<(lambda at t20012.cc:86:9)>"), "r()")); REQUIRE_THAT(src, - HasCall(_A("R"), + HasCall(_A("R<(lambda at t20012.cc:86:9)>"), _A("tmain()::(lambda t20012.cc:86:9)"), "operator()()")); REQUIRE_THAT(src, HasCall(_A("tmain()::(lambda t20012.cc:86:9)"), _A("C"), "c()")); diff --git a/tests/t20039/.clang-uml b/tests/t20039/.clang-uml index ff038945..f73b133e 100644 --- a/tests/t20039/.clang-uml +++ b/tests/t20039/.clang-uml @@ -9,6 +9,8 @@ diagrams: using_namespace: clanguml::t20039 type_aliases: "std::vector": int_vec_t + "std::vector": string_vec_t "std::map": int_map_t + "std::map": string_map_t from: - function: "clanguml::t20039::tmain()" \ No newline at end of file diff --git a/tests/t20039/t20039.cc b/tests/t20039/t20039.cc index 62804d36..a8a53579 100644 --- a/tests/t20039/t20039.cc +++ b/tests/t20039/t20039.cc @@ -12,13 +12,17 @@ template struct A { struct R { A a_int; A> a_intvec; + A> a_stringvec; A> a_intmap; + A> a_stringmap; void run() { a_int.a({}); a_intvec.a({}); + a_stringvec.a({}); a_intmap.a({}); + a_stringmap.a({}); } }; diff --git a/tests/t20039/test_case.h b/tests/t20039/test_case.h index 5c41852d..b6f1d976 100644 --- a/tests/t20039/test_case.h +++ b/tests/t20039/test_case.h @@ -39,7 +39,11 @@ TEST_CASE("t20039", "[test-case][sequence]") REQUIRE_THAT(src, HasCall(_A("tmain()"), _A("R"), "run()")); REQUIRE_THAT(src, HasCall(_A("R"), _A("A"), "a(int)")); REQUIRE_THAT(src, HasCall(_A("R"), _A("A"), "a(int_vec_t)")); + REQUIRE_THAT( + src, HasCall(_A("R"), _A("A"), "a(string_vec_t)")); REQUIRE_THAT(src, HasCall(_A("R"), _A("A"), "a(int_map_t)")); + REQUIRE_THAT( + src, HasCall(_A("R"), _A("A"), "a(string_map_t)")); save_puml(config.output_directory(), diagram->name + ".puml", src); } diff --git a/tests/test_cases.h b/tests/test_cases.h index c6662815..26883024 100644 --- a/tests/test_cases.h +++ b/tests/test_cases.h @@ -1273,6 +1273,12 @@ bool IsClass(const nlohmann::json &j, const std::string &name) return e && e->at("type") == "class"; } +bool IsStruct(const nlohmann::json &j, const std::string &name) +{ + auto e = get_element(j, expand_name(j, name)); + return e && e->at("type") == "class" && e->at("is_struct"); +} + bool InPublicModule(const nlohmann::json &j, const std::string &element, const std::string &module) { diff --git a/uml/class/nested_trait_hierarchy_class.yml b/uml/class/nested_trait_hierarchy_class.yml index 4048fadb..5771552b 100644 --- a/uml/class/nested_trait_hierarchy_class.yml +++ b/uml/class/nested_trait_hierarchy_class.yml @@ -1,8 +1,9 @@ type: class title: Nested trait model class hierarchy include_relations_also_as_members: true +generate_packages: true glob: - - src/common/model/*.cc + - src/common/model/package.cc include: namespaces: - clanguml diff --git a/uml/sequence/template_builder_sequence.yml b/uml/sequence/template_builder_sequence.yml index 9c082d74..305bf45e 100644 --- a/uml/sequence/template_builder_sequence.yml +++ b/uml/sequence/template_builder_sequence.yml @@ -3,17 +3,17 @@ title: Diagram element template builder sequence diagram combine_free_functions_into_file_participants: true generate_method_arguments: none glob: - - src/class_diagram/visitor/template_builder.cc + - src/common/visitor/template_builder.cc include: namespaces: - clanguml paths: - - src/class_diagram/visitor/template_builder.h - - src/class_diagram/visitor/template_builder.cc + - src/common/visitor/template_builder.h + - src/common/visitor/template_builder.cc exclude: paths: - src/common/model/source_location.h using_namespace: - clanguml from: - - function: "clanguml::class_diagram::visitor::template_builder::build(const clang::NamedDecl *,const clang::TemplateSpecializationType &,std::optional)" + - function: "clanguml::common::visitor::template_builder::build(common::model::template_element &,const clang::NamedDecl *,const clang::TemplateSpecializationType &,std::optional)"