From db3381865e54ff097c198c3f1aa0f69e6ab6fad9 Mon Sep 17 00:00:00 2001 From: Bartek Kryza Date: Tue, 6 Dec 2022 00:32:34 +0100 Subject: [PATCH] Updated test case documentation --- docs/test_cases.md | 2 + docs/test_cases/t00002_class.svg | 36 +-- docs/test_cases/t00003_class.svg | 46 ++-- docs/test_cases/t00004_class.svg | 76 +++--- docs/test_cases/t00005_class.svg | 110 ++++----- docs/test_cases/t00006_class.svg | 132 +++++------ docs/test_cases/t00007_class.svg | 30 +-- docs/test_cases/t00008_class.svg | 56 ++--- docs/test_cases/t00009_class.svg | 32 +-- docs/test_cases/t00010_class.svg | 34 +-- docs/test_cases/t00011_class.svg | 22 +- docs/test_cases/t00012_class.svg | 66 +++--- docs/test_cases/t00013_class.svg | 82 +++---- docs/test_cases/t00014_class.svg | 116 ++++----- docs/test_cases/t00015_class.svg | 22 +- docs/test_cases/t00016_class.svg | 30 +-- docs/test_cases/t00017_class.svg | 66 +++--- docs/test_cases/t00018_class.svg | 18 +- docs/test_cases/t00019_class.svg | 40 ++-- docs/test_cases/t00020_class.svg | 38 +-- docs/test_cases/t00021_class.svg | 30 +-- docs/test_cases/t00022_class.svg | 14 +- docs/test_cases/t00023_class.svg | 26 +- docs/test_cases/t00024_class.svg | 22 +- docs/test_cases/t00025_class.svg | 34 +-- docs/test_cases/t00026_class.svg | 42 ++-- docs/test_cases/t00027_class.svg | 58 ++--- docs/test_cases/t00028_class.svg | 78 +++--- docs/test_cases/t00029_class.svg | 50 ++-- docs/test_cases/t00030_class.svg | 46 ++-- docs/test_cases/t00031_class.svg | 50 ++-- docs/test_cases/t00032_class.svg | 40 ++-- docs/test_cases/t00033_class.svg | 48 ++-- docs/test_cases/t00034_class.svg | 46 ++-- docs/test_cases/t00035_class.svg | 22 +- docs/test_cases/t00036_class.svg | 38 +-- docs/test_cases/t00037_class.svg | 54 ++--- docs/test_cases/t00038_class.svg | 58 ++--- docs/test_cases/t00039_class.svg | 78 +++--- docs/test_cases/t00040_class.svg | 26 +- docs/test_cases/t00041_class.svg | 54 ++--- docs/test_cases/t00042_class.svg | 36 +-- docs/test_cases/t00043_class.svg | 50 ++-- docs/test_cases/t00044_class.svg | 36 +-- docs/test_cases/t00045_class.svg | 70 +++--- docs/test_cases/t00046_class.svg | 64 ++--- docs/test_cases/t00047_class.svg | 22 +- docs/test_cases/t00048.md | 1 + docs/test_cases/t00048_class.svg | 50 ++-- docs/test_cases/t00049_class.svg | 32 +-- docs/test_cases/t00050_class.svg | 70 +++--- docs/test_cases/t20001_sequence.svg | 118 ++++----- docs/test_cases/t20002_sequence.svg | 79 +++---- docs/test_cases/t20003.md | 6 +- docs/test_cases/t20003_sequence.svg | 87 ++++--- docs/test_cases/t20004_sequence.svg | 223 +++++++++--------- docs/test_cases/t20005.md | 2 +- docs/test_cases/t20005_sequence.svg | 30 +-- docs/test_cases/t20006_sequence.svg | 134 +++++------ docs/test_cases/t20007_sequence.svg | 78 +++--- docs/test_cases/t20008_sequence.svg | 70 +++--- docs/test_cases/t20009_sequence.svg | 132 +++++------ docs/test_cases/t20010_sequence.svg | 50 ++-- docs/test_cases/t20011_sequence.svg | 126 +++++----- docs/test_cases/t20012_sequence.svg | 130 +++++----- docs/test_cases/t20013.md | 51 ++++ docs/test_cases/t20013_sequence.svg | 72 ++++++ docs/test_cases/t30001_package.svg | 48 ++-- docs/test_cases/t30002_package.svg | 90 +++---- docs/test_cases/t30003_package.svg | 26 +- docs/test_cases/t30004_package.svg | 30 +-- docs/test_cases/t30005_package.svg | 38 +-- docs/test_cases/t30006_package.svg | 16 +- docs/test_cases/t30007_package.svg | 20 +- docs/test_cases/t30008_package.svg | 34 +-- docs/test_cases/t40001_include.svg | 30 +-- docs/test_cases/t40002_include.svg | 34 +-- docs/test_cases/t40003_include.svg | 50 ++-- .../visitor/call_expression_context.h | 2 + .../visitor/translation_unit_visitor.cc | 51 ++-- .../visitor/translation_unit_visitor.h | 4 +- tests/test_cases.yaml | 6 + 82 files changed, 2195 insertions(+), 2071 deletions(-) create mode 100644 docs/test_cases/t20013.md create mode 100644 docs/test_cases/t20013_sequence.svg diff --git a/docs/test_cases.md b/docs/test_cases.md index 386dd4ed..dc13bd03 100644 --- a/docs/test_cases.md +++ b/docs/test_cases.md @@ -62,6 +62,8 @@ * [t20010](./test_cases/t20010.md) - Container sequence diagram test case * [t20011](./test_cases/t20011.md) - Recursive calls sequence diagram test case * [t20012](./test_cases/t20012.md) - Lambda expression call sequence diagram test case + * [t20013](./test_cases/t20013.md) - Function and method arguments in sequence diagrams test case + * [t20013](./test_cases/t20013.md) - Multiple translation units sequence diagram test case ## Package diagrams * [t30001](./test_cases/t30001.md) - Basic package diagram test case * [t30002](./test_cases/t30002.md) - Package dependency test case diff --git a/docs/test_cases/t00002_class.svg b/docs/test_cases/t00002_class.svg index 6b5e48d9..847e8c15 100644 --- a/docs/test_cases/t00002_class.svg +++ b/docs/test_cases/t00002_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + A @@ -21,8 +21,8 @@ foo_c() = 0 : void - - + + B @@ -31,8 +31,8 @@ foo_a() : void - - + + C @@ -41,18 +41,18 @@ foo_c() : void - - + + D - + - + as : std::vector<A *> @@ -60,18 +60,18 @@ foo_a() : void foo_c() : void - - + + E - + - + as : std::vector<A *> @@ -79,13 +79,13 @@ foo_a() : void foo_c() : void - + This is class A - + This is class B - + This is class D diff --git a/docs/test_cases/t00003_class.svg b/docs/test_cases/t00003_class.svg index 2f3a234a..df63fd69 100644 --- a/docs/test_cases/t00003_class.svg +++ b/docs/test_cases/t00003_class.svg @@ -1,6 +1,6 @@ - + @@ -9,74 +9,74 @@ - - + + A - + - + public_member : int - + - + protected_member : int - + - + private_member : int - + - + a_ : int - + - + b_ : int - + - + c_ : int - + - + static_int : int - + - + static_const_int : const int - + - + auto_member : const unsigned long @@ -112,11 +112,11 @@ protected_method() : void private_method() : void - + - + compare : std::function<bool (const int)> diff --git a/docs/test_cases/t00004_class.svg b/docs/test_cases/t00004_class.svg index 4bf3621f..cff5f816 100644 --- a/docs/test_cases/t00004_class.svg +++ b/docs/test_cases/t00004_class.svg @@ -1,6 +1,6 @@ - + @@ -9,16 +9,16 @@ - - + + B - - + + B::AA @@ -28,8 +28,8 @@ AA_3 - - + + A @@ -40,16 +40,16 @@ foo2() const : void - - + + A::AA - - + + A::AA::Lights @@ -59,15 +59,15 @@ Red - - + + A::AA::AAA - + C::B @@ -75,8 +75,8 @@ int - - + + C @@ -84,39 +84,39 @@ T - + - + t : T - + - + b_int : B<int> - - + + C::AA - - + + C::AA::AAA - - + + C::AA::CCC @@ -125,8 +125,8 @@ CCC_2 - - + + C::B @@ -134,16 +134,16 @@ V - + - + b : V - - + + C::CC @@ -152,16 +152,16 @@ CC_2 - - + + detail::D - - + + detail::D::AA @@ -171,8 +171,8 @@ AA_3 - - + + detail::D::DD diff --git a/docs/test_cases/t00005_class.svg b/docs/test_cases/t00005_class.svg index 109b68fd..bfd8500a 100644 --- a/docs/test_cases/t00005_class.svg +++ b/docs/test_cases/t00005_class.svg @@ -1,6 +1,6 @@ - + @@ -9,204 +9,204 @@ - - + + A - - + + B - - + + C - - + + D - - + + E - - + + F - - + + G - - + + H - - + + I - - + + J - - + + K - - + + R - + - + some_int : int - + - + some_int_pointer : int * - + - + some_int_pointer_pointer : int ** - + - + some_int_reference : int & - + - + a : A - + - + b : B * - + - + c : C & - + - + d : const D * - + - + e : const E & - + - + f : F && - + - + g : G ** - + - + h : H *** - + - + i : I *& - + - + j : volatile J * - + - + k : K * diff --git a/docs/test_cases/t00006_class.svg b/docs/test_cases/t00006_class.svg index 70d841d4..7a7a6945 100644 --- a/docs/test_cases/t00006_class.svg +++ b/docs/test_cases/t00006_class.svg @@ -1,6 +1,6 @@ - + @@ -9,136 +9,136 @@ - - + + A - - + + B - - + + C - - + + D - - + + E - - + + F - - + + G - - + + H - - + + I - - + + J - - + + K - - + + L - - + + M - - + + N - - + + NN - - + + NNN - - + + custom_container @@ -146,15 +146,15 @@ T - + - + data : std::vector<T> - + custom_container @@ -162,102 +162,102 @@ E - - + + R - + - + a : std::vector<A> - + - + b : std::vector<B *> - + - + c : std::map<int,C> - + - + d : std::map<int,D *> - + - + e : custom_container<E> - + - + f : std::vector<std::vector<F>> - + - + g : std::map<int,std::vector<G *>> - + - + h : std::array<H,10> - + - + i : std::array<I *,5> - + - + j : J[10] - + - + k : K *[20] - + - + lm : std::vector<std::pair<L,M>> - + - + ns : std::tuple<N,NN,NNN> diff --git a/docs/test_cases/t00007_class.svg b/docs/test_cases/t00007_class.svg index fd6c7970..2bf20858 100644 --- a/docs/test_cases/t00007_class.svg +++ b/docs/test_cases/t00007_class.svg @@ -1,6 +1,6 @@ - + @@ -9,56 +9,56 @@ - - + + A - - + + B - - + + C - - + + R - + - + a : std::unique_ptr<A> - + - + b : std::shared_ptr<B> - + - + c : std::weak_ptr<C> diff --git a/docs/test_cases/t00008_class.svg b/docs/test_cases/t00008_class.svg index e20aa3fd..9fa8f721 100644 --- a/docs/test_cases/t00008_class.svg +++ b/docs/test_cases/t00008_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + A @@ -18,51 +18,51 @@ T,P,CMP,int N - + - + value : T - + - + pointer : T * - + - + reference : T & - + - + values : std::vector<P> - + - + ints : std::array<int,N> - + - + comparator : CMP - - + + Vector @@ -70,16 +70,16 @@ T - + - + values : std::vector<T> - - + + B @@ -87,15 +87,15 @@ T,C<> - + - + template_template : C<T> - + B @@ -103,18 +103,18 @@ int,Vector - - + + D - + - + ints : B<int,Vector> diff --git a/docs/test_cases/t00009_class.svg b/docs/test_cases/t00009_class.svg index 8278a48a..03cf5af7 100644 --- a/docs/test_cases/t00009_class.svg +++ b/docs/test_cases/t00009_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + A @@ -18,15 +18,15 @@ T - + - + value : T - + A @@ -34,7 +34,7 @@ int - + A @@ -42,7 +42,7 @@ std::string - + A @@ -50,32 +50,32 @@ std::vector<std::string> - - + + B - + - + aint : A<int> - + - + astring : A<std::string> * - + - + avector : A<std::vector<std::string>> & diff --git a/docs/test_cases/t00010_class.svg b/docs/test_cases/t00010_class.svg index e3ef7243..f04de2d4 100644 --- a/docs/test_cases/t00010_class.svg +++ b/docs/test_cases/t00010_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + A @@ -18,22 +18,22 @@ T,P - + - + first : T - + - + second : P - + A @@ -41,8 +41,8 @@ T,std::string - - + + B @@ -50,15 +50,15 @@ T - + - + astring : A<T,std::string> - + B @@ -66,18 +66,18 @@ int - - + + C - + - + aintstring : B<int> diff --git a/docs/test_cases/t00011_class.svg b/docs/test_cases/t00011_class.svg index b6c42908..ece825b8 100644 --- a/docs/test_cases/t00011_class.svg +++ b/docs/test_cases/t00011_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + D @@ -18,16 +18,16 @@ T - + - + value : T - - + + A @@ -36,18 +36,18 @@ foo() : void - - + + B - + - + m_a : A * diff --git a/docs/test_cases/t00012_class.svg b/docs/test_cases/t00012_class.svg index f3b5b83b..51b61f22 100644 --- a/docs/test_cases/t00012_class.svg +++ b/docs/test_cases/t00012_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + A @@ -18,23 +18,23 @@ T,Ts... - + - + value : T - + - + values : std::variant<Ts...> - - + + B @@ -43,15 +43,15 @@ - + - + ints : std::array<int,sizeof...(Is)> - - + + C @@ -60,14 +60,14 @@ - + - + ints : std::array<T,sizeof...(Is)> - + A @@ -75,7 +75,7 @@ int,std::string,float - + A @@ -83,7 +83,7 @@ int,std::string,bool - + B @@ -91,7 +91,7 @@ 3,2,1 - + B @@ -99,7 +99,7 @@ 1,1,1,1 - + C @@ -107,50 +107,50 @@ std::map<int,std::vector<std::vector<std::vector<std::string>>>>,3,3,3 - - + + R - + - + a1 : A<int,std::string,float> - + - + a2 : A<int,std::string,bool> - + - + b1 : B<3,2,1> - + - + b2 : B<1,1,1,1> - + - + c1 : C<std::map<int,std::vector<std::vector<std::vector<std::string>>>>,3,3,3> - + Long template annotation diff --git a/docs/test_cases/t00013_class.svg b/docs/test_cases/t00013_class.svg index 7ab568bc..b8814aee 100644 --- a/docs/test_cases/t00013_class.svg +++ b/docs/test_cases/t00013_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + ABCD::F @@ -18,15 +18,15 @@ T - + - + f : T - + ABCD::F @@ -34,70 +34,70 @@ int - - + + A - + - + a : int - - + + B - + - + b : int - - + + C - + - + c : int - - + + D - + - + d : int print(R * r) : void - - + + E @@ -105,16 +105,16 @@ T - + - + e : T - - + + G @@ -122,22 +122,22 @@ T,Args... - + - + g : T - + - + args : std::tuple<Args...> - + E @@ -145,7 +145,7 @@ int - + G @@ -153,7 +153,7 @@ int,float,std::string - + E @@ -161,25 +161,25 @@ std::string - - + + R - + - + gintstring : G<int,float,std::string> - + - + estring : E<std::string> diff --git a/docs/test_cases/t00014_class.svg b/docs/test_cases/t00014_class.svg index 37caa13b..66c84626 100644 --- a/docs/test_cases/t00014_class.svg +++ b/docs/test_cases/t00014_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + A @@ -18,37 +18,37 @@ T,P - + - + t : T - + - + p : P - - + + B - + - + value : std::string - + A @@ -56,7 +56,7 @@ T,std::string - + A @@ -64,7 +64,7 @@ T,std::unique_ptr<std::string> - + A @@ -72,7 +72,7 @@ long,T - + A @@ -80,7 +80,7 @@ double,T - + A @@ -88,7 +88,7 @@ long,U - + A @@ -96,7 +96,7 @@ long,bool - + A @@ -104,7 +104,7 @@ double,bool - + A @@ -112,7 +112,7 @@ long,float - + A @@ -120,7 +120,7 @@ double,float - + A @@ -128,7 +128,7 @@ bool,std::string - + A @@ -136,7 +136,7 @@ float,std::unique_ptr<std::string> - + A @@ -144,7 +144,7 @@ int,std::string - + A @@ -152,7 +152,7 @@ std::string,std::string - + A @@ -160,7 +160,7 @@ char,std::string - + A @@ -168,116 +168,116 @@ wchar_t,std::string - - + + R - + - + bapair : PairPairBA<bool> - + - + abool : APtr<bool> - + - + aboolfloat : AAPtr<bool,float> - + - + afloat : ASharedPtr<float> - + - + boolstring : A<bool,std::string> - + - + floatstring : AStringPtr<float> - + - + intstring : AIntString - + - + stringstring : AStringString - + - + bstringstring : BStringString - + - + bs : BVector - + - + bs2 : BVector2 - + - + cb : SimpleCallback<ACharString> - + - + gcb : GenericCallback<R::AWCharString> - + - + vcb : VoidCallback - + - + vps : VectorPtr<B> diff --git a/docs/test_cases/t00015_class.svg b/docs/test_cases/t00015_class.svg index ec3d812d..5b85a2f9 100644 --- a/docs/test_cases/t00015_class.svg +++ b/docs/test_cases/t00015_class.svg @@ -1,6 +1,6 @@ - + @@ -9,40 +9,40 @@ - - + + ns1::A - - + + ns1::ns2_v0_9_0::A - - + + ns1::Anon - - + + ns3::ns1::ns2::Anon - - + + ns3::B diff --git a/docs/test_cases/t00016_class.svg b/docs/test_cases/t00016_class.svg index 934ec139..47518a41 100644 --- a/docs/test_cases/t00016_class.svg +++ b/docs/test_cases/t00016_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + is_numeric<> @@ -19,8 +19,8 @@ value : enum - - + + is_numeric @@ -29,8 +29,8 @@ value : enum - - + + is_numeric @@ -41,8 +41,8 @@ value : enum - - + + is_numeric @@ -53,8 +53,8 @@ value : enum - - + + is_numeric @@ -65,8 +65,8 @@ value : enum - - + + is_numeric @@ -77,8 +77,8 @@ value : enum - - + + is_numeric diff --git a/docs/test_cases/t00017_class.svg b/docs/test_cases/t00017_class.svg index 8b789e20..7984857e 100644 --- a/docs/test_cases/t00017_class.svg +++ b/docs/test_cases/t00017_class.svg @@ -1,6 +1,6 @@ - + @@ -9,127 +9,127 @@ - - + + A - - + + B - - + + C - - + + D - - + + E - - + + F - - + + G - - + + H - - + + I - - + + J - - + + K - - + + R - + - + some_int : int - + - + some_int_pointer : int * - + - + some_int_pointer_pointer : int ** - + - + some_int_reference : int & diff --git a/docs/test_cases/t00018_class.svg b/docs/test_cases/t00018_class.svg index fd81ebc6..c2b58822 100644 --- a/docs/test_cases/t00018_class.svg +++ b/docs/test_cases/t00018_class.svg @@ -1,6 +1,6 @@ - + @@ -9,18 +9,18 @@ - - + + impl::widget - + - + n : int @@ -30,18 +30,18 @@ draw(const widget & w) : void widget(int n) : void - - + + widget - + - + pImpl : std::unique_ptr<impl::widget> diff --git a/docs/test_cases/t00019_class.svg b/docs/test_cases/t00019_class.svg index ed541c44..dbf03209 100644 --- a/docs/test_cases/t00019_class.svg +++ b/docs/test_cases/t00019_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + Base @@ -25,8 +25,8 @@ m2() : std::string - - + + Layer1 @@ -39,8 +39,8 @@ m2() : std::string - - + + Layer2 @@ -51,8 +51,8 @@ all_calls_count() const : int - - + + Layer3 @@ -60,18 +60,18 @@ LowerLayer - + - + m_m1_calls : int - + - + m_m2_calls : int @@ -83,7 +83,7 @@ m1_calls() const : int m2_calls() const : int - + Layer3 @@ -91,7 +91,7 @@ Base - + Layer2 @@ -99,7 +99,7 @@ Layer3<Base> - + Layer1 @@ -107,18 +107,18 @@ Layer2<Layer3<Base>> - - + + A - + - + layers : std::unique_ptr<Layer1<Layer2<Layer3<Base>>>> diff --git a/docs/test_cases/t00020_class.svg b/docs/test_cases/t00020_class.svg index 4791137e..5cb5901c 100644 --- a/docs/test_cases/t00020_class.svg +++ b/docs/test_cases/t00020_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + ProductA @@ -21,8 +21,8 @@ sell(int price) const = 0 : bool - - + + ProductA1 @@ -31,8 +31,8 @@ sell(int price) const : bool - - + + ProductA2 @@ -41,8 +41,8 @@ sell(int price) const : bool - - + + ProductB @@ -53,8 +53,8 @@ buy(int price) const = 0 : bool - - + + ProductB1 @@ -63,8 +63,8 @@ buy(int price) const : bool - - + + ProductB2 @@ -73,8 +73,8 @@ buy(int price) const : bool - - + + AbstractFactory @@ -85,8 +85,8 @@ make_b() const = 0 : std::unique_ptr<ProductB> - - + + Factory1 @@ -97,8 +97,8 @@ make_b() const : std::unique_ptr<ProductB> - - + + Factory2 diff --git a/docs/test_cases/t00021_class.svg b/docs/test_cases/t00021_class.svg index 6f8855fa..4b3ac54d 100644 --- a/docs/test_cases/t00021_class.svg +++ b/docs/test_cases/t00021_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + Visitor @@ -23,8 +23,8 @@ visit_B(const B & item) const = 0 : void - - + + Visitor1 @@ -35,8 +35,8 @@ visit_B(const B & item) const : void - - + + Visitor2 @@ -47,8 +47,8 @@ visit_B(const B & item) const : void - - + + Visitor3 @@ -59,8 +59,8 @@ visit_B(const B & item) const : void - - + + Item @@ -71,8 +71,8 @@ accept(const Visitor & visitor) const = 0 : void - - + + A @@ -81,8 +81,8 @@ accept(const Visitor & visitor) const : void - - + + B diff --git a/docs/test_cases/t00022_class.svg b/docs/test_cases/t00022_class.svg index 7aeb6694..8ffa5aed 100644 --- a/docs/test_cases/t00022_class.svg +++ b/docs/test_cases/t00022_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + A @@ -23,8 +23,8 @@ method2() = 0 : void - - + + A1 @@ -35,8 +35,8 @@ method2() : void - - + + A2 diff --git a/docs/test_cases/t00023_class.svg b/docs/test_cases/t00023_class.svg index 8e6d59d0..9e8e4ded 100644 --- a/docs/test_cases/t00023_class.svg +++ b/docs/test_cases/t00023_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + Strategy @@ -21,8 +21,8 @@ algorithm() = 0 : void - - + + StrategyA @@ -31,8 +31,8 @@ algorithm() : void - - + + StrategyB @@ -41,8 +41,8 @@ algorithm() : void - - + + StrategyC @@ -51,18 +51,18 @@ algorithm() : void - - + + Context - + - + m_strategy : std::unique_ptr<Strategy> diff --git a/docs/test_cases/t00024_class.svg b/docs/test_cases/t00024_class.svg index 7ff06f01..a6c8b990 100644 --- a/docs/test_cases/t00024_class.svg +++ b/docs/test_cases/t00024_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + Target @@ -23,8 +23,8 @@ m2() = 0 : void - - + + Target1 @@ -35,8 +35,8 @@ m2() : void - - + + Target2 @@ -47,18 +47,18 @@ m2() : void - - + + Proxy - + - + m_target : std::shared_ptr<Target> diff --git a/docs/test_cases/t00025_class.svg b/docs/test_cases/t00025_class.svg index 79490579..d49eeb1d 100644 --- a/docs/test_cases/t00025_class.svg +++ b/docs/test_cases/t00025_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + Target1 @@ -21,8 +21,8 @@ m2() : void - - + + Target2 @@ -33,8 +33,8 @@ m2() : void - - + + Proxy @@ -42,11 +42,11 @@ T - + - + m_target : std::shared_ptr<T> @@ -56,7 +56,7 @@ m1() : void m2() : void - + Proxy @@ -64,7 +64,7 @@ Target1 - + Proxy @@ -72,25 +72,25 @@ Target2 - - + + ProxyHolder - + - + proxy1 : Proxy<Target1> - + - + proxy2 : Proxy<Target2> diff --git a/docs/test_cases/t00026_class.svg b/docs/test_cases/t00026_class.svg index e8f11de1..f4386a15 100644 --- a/docs/test_cases/t00026_class.svg +++ b/docs/test_cases/t00026_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + Memento @@ -18,11 +18,11 @@ T - + - + m_value : T @@ -30,8 +30,8 @@ Memento<T>(T && v) : void value() const : T - - + + Originator @@ -39,11 +39,11 @@ T - + - + m_value : T @@ -57,8 +57,8 @@ print() const : void set(T && v) : void - - + + Caretaker @@ -66,11 +66,11 @@ T - + - + m_mementos : std::unordered_map<std::string,Memento<T>> @@ -78,7 +78,7 @@ state(const std::string & n) : Memento<T> & set_state(const std::string & s, Memento<T> && m) : void - + Caretaker @@ -86,7 +86,7 @@ std::string - + Originator @@ -94,25 +94,25 @@ std::string - - + + StringMemento - + - + caretaker : Caretaker<std::string> - + - + originator : Originator<std::string> diff --git a/docs/test_cases/t00027_class.svg b/docs/test_cases/t00027_class.svg index 1a9017d6..78eea1a7 100644 --- a/docs/test_cases/t00027_class.svg +++ b/docs/test_cases/t00027_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + Shape @@ -21,14 +21,14 @@ ~Shape() = default : void - + Line - - + + Line @@ -39,14 +39,14 @@ display() : void - + Text - - + + Text @@ -57,8 +57,8 @@ display() : void - - + + ShapeDecorator @@ -67,8 +67,8 @@ display() = 0 : void - - + + Color @@ -79,8 +79,8 @@ display() : void - - + + Weight @@ -91,7 +91,7 @@ display() : void - + Line @@ -99,7 +99,7 @@ Color,Weight - + Line @@ -107,7 +107,7 @@ Color - + Text @@ -115,7 +115,7 @@ Color,Weight - + Text @@ -123,39 +123,39 @@ Color - - + + Window - + - + border : Line<Color,Weight> - + - + divider : Line<Color> - + - + title : Text<Color,Weight> - + - + description : Text<Color> diff --git a/docs/test_cases/t00028_class.svg b/docs/test_cases/t00028_class.svg index 5de86165..84be5357 100644 --- a/docs/test_cases/t00028_class.svg +++ b/docs/test_cases/t00028_class.svg @@ -1,6 +1,6 @@ - + @@ -9,54 +9,54 @@ - - + + A - + A class note. - - + + B - + B class note. - - + + C - + C class note. - - + + D - + D class note. - - + + E @@ -64,27 +64,27 @@ T - + - + param : T - + E template class note. - - + + G - - + + F @@ -94,10 +94,10 @@ three - + F enum note. - + E @@ -105,59 +105,59 @@ int - - + + R - + - + aaa : A - + - + bbb : B * - + - + ccc : C & - + - + ddd : std::vector<std::shared_ptr<D>> - + - + eee : E<int> - + - + ggg : G ** R(C & c) : void - + R class note. diff --git a/docs/test_cases/t00029_class.svg b/docs/test_cases/t00029_class.svg index f7198d27..4e5bb152 100644 --- a/docs/test_cases/t00029_class.svg +++ b/docs/test_cases/t00029_class.svg @@ -1,6 +1,6 @@ - + @@ -9,16 +9,16 @@ - - + + A - - + + C @@ -26,16 +26,16 @@ T - + - + param : T - - + + E @@ -45,64 +45,64 @@ three - - + + G1 - - + + G2 - - + + G3 - - + + G4 - - + + R - + - + g1 : G1 - + - + g3 : G3 & - + - + g4 : std::shared_ptr<G4> diff --git a/docs/test_cases/t00030_class.svg b/docs/test_cases/t00030_class.svg index f6ab4725..d550cd8b 100644 --- a/docs/test_cases/t00030_class.svg +++ b/docs/test_cases/t00030_class.svg @@ -1,6 +1,6 @@ - + @@ -9,86 +9,86 @@ - - + + A - - + + B - - + + C - - + + D - - + + E - - + + R - + - + aaa : A - + - + bbb : std::vector<B> - + - + ccc : std::vector<C> - + - + ddd : D - + - + eee : E * diff --git a/docs/test_cases/t00031_class.svg b/docs/test_cases/t00031_class.svg index d0f2982a..6e14b26e 100644 --- a/docs/test_cases/t00031_class.svg +++ b/docs/test_cases/t00031_class.svg @@ -1,33 +1,33 @@ - + - + - + - - - + + + A - - + + B @@ -37,8 +37,8 @@ three - - + + @@ -47,23 +47,23 @@ T - + - + ttt : T - - + + D - + C @@ -71,39 +71,39 @@ int - - + + R - + - + aaa : A * - + - + bbb : std::vector<B> - + - + ccc : C<int> - + - + ddd : D * diff --git a/docs/test_cases/t00032_class.svg b/docs/test_cases/t00032_class.svg index ebbce3cc..d57be399 100644 --- a/docs/test_cases/t00032_class.svg +++ b/docs/test_cases/t00032_class.svg @@ -1,6 +1,6 @@ - + @@ -9,24 +9,24 @@ - - + + Base - - + + TBase - - + + A @@ -35,8 +35,8 @@ operator()() : void - - + + B @@ -45,8 +45,8 @@ operator()() : void - - + + C @@ -55,8 +55,8 @@ operator()() : void - - + + Overload @@ -64,15 +64,15 @@ T,L,Ts... - + - + counter : L - + Overload @@ -80,18 +80,18 @@ TBase,int,A,B,C - - + + R - + - + overload : Overload<TBase,int,A,B,C> diff --git a/docs/test_cases/t00033_class.svg b/docs/test_cases/t00033_class.svg index 31f77a3d..b03875e5 100644 --- a/docs/test_cases/t00033_class.svg +++ b/docs/test_cases/t00033_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + A @@ -18,16 +18,16 @@ T - + - + aaa : T - - + + B @@ -35,16 +35,16 @@ T - + - + bbb : T - - + + C @@ -52,30 +52,30 @@ T - + - + ccc : T - - + + D - + - + ddd : int - + C @@ -83,7 +83,7 @@ D - + B @@ -91,7 +91,7 @@ std::unique_ptr<C<D>> - + A @@ -99,18 +99,18 @@ B<std::unique_ptr<C<D>>> - - + + R - + - + abc : A<B<std::unique_ptr<C<D>>>> diff --git a/docs/test_cases/t00034_class.svg b/docs/test_cases/t00034_class.svg index b244fc7f..7d6e800d 100644 --- a/docs/test_cases/t00034_class.svg +++ b/docs/test_cases/t00034_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + Void @@ -21,8 +21,8 @@ operator!=(const Void & ) const : bool - - + + lift_void @@ -31,16 +31,16 @@ - - + + lift_void - - + + lift_void @@ -49,8 +49,8 @@ - - + + drop_void @@ -59,16 +59,16 @@ - - + + drop_void - - + + drop_void @@ -77,33 +77,33 @@ - - + + A - - + + R - + - + la : lift_void_t<A> * - + - + lv : lift_void_t<void> * diff --git a/docs/test_cases/t00035_class.svg b/docs/test_cases/t00035_class.svg index c52a8ba3..95268be1 100644 --- a/docs/test_cases/t00035_class.svg +++ b/docs/test_cases/t00035_class.svg @@ -1,6 +1,6 @@ - + @@ -9,40 +9,40 @@ - - + + Top - - + + Left - - + + Center - - + + Bottom - - + + Right diff --git a/docs/test_cases/t00036_class.svg b/docs/test_cases/t00036_class.svg index 242aaad7..4e2d5889 100644 --- a/docs/test_cases/t00036_class.svg +++ b/docs/test_cases/t00036_class.svg @@ -1,6 +1,6 @@ - + @@ -9,23 +9,23 @@ - + ns1 - + ns11 - + ns111 - + ns2 - + ns22 - - + + E @@ -34,8 +34,8 @@ yellow - - + + A @@ -43,15 +43,15 @@ T - + - + a : T - + A @@ -59,23 +59,23 @@ int - - + + B - + - + a_int : A<int> - - + + C diff --git a/docs/test_cases/t00037_class.svg b/docs/test_cases/t00037_class.svg index fe3edc6f..82edfadb 100644 --- a/docs/test_cases/t00037_class.svg +++ b/docs/test_cases/t00037_class.svg @@ -1,6 +1,6 @@ - + @@ -9,98 +9,98 @@ - - + + ST - + - + dimensions : ST::(anonymous_620) - + - + units : ST::(anonymous_739) - - + + ST::(dimensions) - + - + t : double - + - + x : double - + - + y : double - + - + z : double - - + + ST::(units) - + - + c : double - + - + h : double - - + + A - + - + st : ST diff --git a/docs/test_cases/t00038_class.svg b/docs/test_cases/t00038_class.svg index 1d72fc33..df3a1f3e 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,16 +88,16 @@ - - + + map - - + + map @@ -106,8 +106,8 @@ - - + + map @@ -116,8 +116,8 @@ - - + + map @@ -126,8 +126,8 @@ - - + + map diff --git a/docs/test_cases/t00039_class.svg b/docs/test_cases/t00039_class.svg index da7cf09a..46ca9acd 100644 --- a/docs/test_cases/t00039_class.svg +++ b/docs/test_cases/t00039_class.svg @@ -1,6 +1,6 @@ - + @@ -9,95 +9,95 @@ - - + + C - - + + D - - + + E - - + + CD - - + + DE - - + + CDE - - + + A - - + + AA - - + + AAA - + - + b : B * - - + + ns2::AAAA - - + + ns3::F @@ -105,16 +105,16 @@ T - + - + t : T * - - + + ns3::FF @@ -122,16 +122,16 @@ T,M - + - + m : M * - - + + ns3::FE @@ -139,16 +139,16 @@ T,M - + - + m : M * - - + + ns3::FFF @@ -156,11 +156,11 @@ T,M,N - + - + n : N * diff --git a/docs/test_cases/t00040_class.svg b/docs/test_cases/t00040_class.svg index f8c4e7b9..09ec683b 100644 --- a/docs/test_cases/t00040_class.svg +++ b/docs/test_cases/t00040_class.svg @@ -1,6 +1,6 @@ - + @@ -9,50 +9,50 @@ - - + + A - + - + ii_ : int get_a() : int - - + + AA - - + + AAA - + - + b : B * get_aaa() : int - - + + R diff --git a/docs/test_cases/t00041_class.svg b/docs/test_cases/t00041_class.svg index 2c6db52f..e798897d 100644 --- a/docs/test_cases/t00041_class.svg +++ b/docs/test_cases/t00041_class.svg @@ -1,6 +1,6 @@ - + @@ -9,100 +9,100 @@ - - + + R - - + + D - + - + rr : RR * - - + + E - - + + F - - + + RR - + - + e : E * - + - + f : F * - + - + g : detail::G * - - + + RRR - - + + ns1::N - - + + ns1::NN - - + + ns1::NM diff --git a/docs/test_cases/t00042_class.svg b/docs/test_cases/t00042_class.svg index 2750b4b9..e465556e 100644 --- a/docs/test_cases/t00042_class.svg +++ b/docs/test_cases/t00042_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + A @@ -18,16 +18,16 @@ T - + - + a : T - - + + A @@ -35,16 +35,16 @@ void - + - + a : void * - - + + B @@ -52,22 +52,22 @@ T,K - + - + b : T - + - + bb : K - + A @@ -75,7 +75,7 @@ double - + A @@ -83,7 +83,7 @@ std::string - + B diff --git a/docs/test_cases/t00043_class.svg b/docs/test_cases/t00043_class.svg index d5cae539..bf372944 100644 --- a/docs/test_cases/t00043_class.svg +++ b/docs/test_cases/t00043_class.svg @@ -1,6 +1,6 @@ - + @@ -9,22 +9,22 @@ - + dependants - + dependencies - - + + A - - + + B @@ -33,8 +33,8 @@ b(dependants::A * a) : void - - + + BB @@ -43,8 +43,8 @@ bb(dependants::A * a) : void - - + + C @@ -53,8 +53,8 @@ c(dependants::B * b) : void - - + + D @@ -65,8 +65,8 @@ dd(dependants::BB * bb) : void - - + + E @@ -75,24 +75,24 @@ e(dependants::D * d) : void - - + + G - - + + GG - - + + H @@ -103,8 +103,8 @@ hh(dependencies::GG * gg) : void - - + + I @@ -113,8 +113,8 @@ i(dependencies::H * h) : void - - + + J diff --git a/docs/test_cases/t00044_class.svg b/docs/test_cases/t00044_class.svg index 6e07657a..c8664453 100644 --- a/docs/test_cases/t00044_class.svg +++ b/docs/test_cases/t00044_class.svg @@ -1,6 +1,6 @@ - + @@ -9,7 +9,7 @@ - + signal_handler @@ -17,8 +17,8 @@ ,A - - + + sink @@ -27,15 +27,15 @@ sink<signal_handler<type-parameter-0-0 (type-parameter-0-1...), type-parameter-0-2> >(sink<signal_handler<type-parameter-0-0 (type-parameter-0-1...),type-parameter-0-2>>::signal_t & sh) : void - + - + signal : sink<signal_handler<type-parameter-0-0 (type-parameter-0-1...),type-parameter-0-2>>::signal_t * - - + + sink @@ -46,23 +46,23 @@ sink<signal_handler<type-parameter-0-0 (type-parameter-0-1...), type-parameter-0-2> >(sink<signal_handler<type-parameter-0-0 (type-parameter-0-1...),type-parameter-0-2>>::signal_t & sh) : void - + - + signal : sink<signal_handler<type-parameter-0-0 (type-parameter-0-1...),type-parameter-0-2>>::signal_t * - - + + signal_handler - - + + signal_handler @@ -71,8 +71,8 @@ - - + + signal_handler @@ -81,8 +81,8 @@ - - + + sink diff --git a/docs/test_cases/t00045_class.svg b/docs/test_cases/t00045_class.svg index cff821e2..74578674 100644 --- a/docs/test_cases/t00045_class.svg +++ b/docs/test_cases/t00045_class.svg @@ -1,6 +1,6 @@ - + @@ -9,32 +9,32 @@ - - + + A - - + + AA - - + + AAA - - + + AAAA @@ -42,103 +42,103 @@ T - + - + t : T - - + + ns1::A - - + + ns1::ns2::A - - + + ns1::ns2::B - - + + ns1::ns2::C - - + + ns1::ns2::D - - + + ns1::ns2::E - - + + ns1::ns2::AAA - - + + ns1::ns2::R - + - + a : ns1::ns2::A * - + - + ns1_a : ns1::A * - + - + ns1_ns2_a : ns1::ns2::A * - + - + root_a : ::A * diff --git a/docs/test_cases/t00046_class.svg b/docs/test_cases/t00046_class.svg index 9808d4e8..72409acb 100644 --- a/docs/test_cases/t00046_class.svg +++ b/docs/test_cases/t00046_class.svg @@ -1,6 +1,6 @@ - + @@ -9,118 +9,118 @@ - + ns1 - + ns2 - + __gnu_cxx - - + + A - - + + A - - + + B - - + + C - - + + D - - + + E - - + + R - + - + a : ns1::ns2::A * - + - + ns1_a : ns1::A * - + - + ns1_ns2_a : ns1::ns2::A * - + - + root_a : ::A * - + - + i : std::vector<std::uint8_t> foo(AA & aa) : void - - + + A - - + + AA diff --git a/docs/test_cases/t00047_class.svg b/docs/test_cases/t00047_class.svg index 5215f8d7..8d71bfbe 100644 --- a/docs/test_cases/t00047_class.svg +++ b/docs/test_cases/t00047_class.svg @@ -1,6 +1,6 @@ - + @@ -9,16 +9,16 @@ - - + + conditional_t - - + + conditional_t @@ -27,8 +27,8 @@ - - + + conditional_t @@ -37,8 +37,8 @@ - - + + conditional_t @@ -47,8 +47,8 @@ - - + + conditional_t diff --git a/docs/test_cases/t00048.md b/docs/test_cases/t00048.md index 587b2f39..a055889e 100644 --- a/docs/test_cases/t00048.md +++ b/docs/test_cases/t00048.md @@ -9,6 +9,7 @@ diagrams: glob: - ../../tests/t00048/b_t00048.cc - ../../tests/t00048/a_t00048.cc + - ../../tests/t00048/t00048.cc using_namespace: clanguml::t00048 parse_includes: true include: diff --git a/docs/test_cases/t00048_class.svg b/docs/test_cases/t00048_class.svg index 65a266d0..2adc23b2 100644 --- a/docs/test_cases/t00048_class.svg +++ b/docs/test_cases/t00048_class.svg @@ -1,6 +1,6 @@ - + @@ -9,25 +9,25 @@ - - + + Base - + - + base : int foo() = 0 : void - - + + BaseTemplate @@ -35,35 +35,35 @@ T - + - + base : T foo() = 0 : void - - + + B - + - + b : int foo() : void - - + + BTemplate @@ -71,35 +71,35 @@ T - + - + b : T foo() : void - - + + A - + - + a : int foo() : void - - + + ATemplate @@ -107,11 +107,11 @@ T - + - + a : T diff --git a/docs/test_cases/t00049_class.svg b/docs/test_cases/t00049_class.svg index bb2f2db4..6df9f7d1 100644 --- a/docs/test_cases/t00049_class.svg +++ b/docs/test_cases/t00049_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + A @@ -18,17 +18,17 @@ T - + - + a : T get_a() : T & - + A @@ -36,7 +36,7 @@ intmap - + A @@ -44,7 +44,7 @@ thestring - + A @@ -52,32 +52,32 @@ std::vector<thestring> - - + + R - + - + a_string : A<thestring> - + - + a_vector_string : A<string_vector> - + - + a_int_map : A<intmap> diff --git a/docs/test_cases/t00050_class.svg b/docs/test_cases/t00050_class.svg index 3ef44faf..578026db 100644 --- a/docs/test_cases/t00050_class.svg +++ b/docs/test_cases/t00050_class.svg @@ -1,6 +1,6 @@ - + @@ -9,40 +9,40 @@ - - + + A - - + + B - - + + C - - + + utils::D - - + + E @@ -52,8 +52,8 @@ E3 - - + + F @@ -61,44 +61,44 @@ T,V,int N - + - + t : T[N] - + - + v : V - - + + G - - + + NoComment - + Lorem ipsum dolor sit - + Lorem ipsum dolor sit - + Lorem ipsum dolor sit amet consectetur adipiscing elit, urna consequat felis vehicula class ultricies mollis dictumst, aenean non a in donec nulla. @@ -125,50 +125,50 @@ imperdiet praesent magnis ridiculus congue gravida curabitur dictum sagittis, enim et magna sit inceptos sodales parturient pharetra mollis, aenean vel nostra tellus commodo pretium sapien sociosqu. - + This is a short description of class G. - + This is an intermediate description of class G. - + This is a long description of class G. - + Lorem ipsum - + TODO 1. Write meaningful comment - + TODO 2. Write tests - + TODO 3. Implement - + Long comment example - + TODO Implement... - + Simple array wrapper. - + Template parameters diff --git a/docs/test_cases/t20001_sequence.svg b/docs/test_cases/t20001_sequence.svg index cea5c887..b582b0fa 100644 --- a/docs/test_cases/t20001_sequence.svg +++ b/docs/test_cases/t20001_sequence.svg @@ -1,6 +1,6 @@ - + - + @@ -9,68 +9,68 @@ - - - - - - - + + + + + + + - - - + + + tmain() - + tmain() - - A - - A - - B - - B - - - - - - - - - - add() + + A + + A + + B + + B + + + + + + + + + + add(int,int) - - - - wrap_add3() - - - add3() - - - - - add() - - - - - - - - - log_result() - - - - - log_result() + + + + wrap_add3(int,int,int) + + + add3(int,int,int) + + + + + add(int,int) + + + + + + + + + log_result(int) + + + + + log_result(int) - - + + Main test function diff --git a/docs/test_cases/t20002_sequence.svg b/docs/test_cases/t20002_sequence.svg index f0dd197e..f64c01ee 100644 --- a/docs/test_cases/t20002_sequence.svg +++ b/docs/test_cases/t20002_sequence.svg @@ -1,6 +1,6 @@ - + - + @@ -9,48 +9,45 @@ - - - - - - - - - + + + + + + + + + m1() - - m1() - + + m1() + m2() - - m2() - + + m2() + m3() - - m3() - + + m3() + m4() - - m4() - - - - - - - m2() - - - m3() - - - m4() - - - - - - + + m4() + + + + + + + + + + + + + + + + diff --git a/docs/test_cases/t20003.md b/docs/test_cases/t20003.md index cb8eae4c..f38f01e6 100644 --- a/docs/test_cases/t20003.md +++ b/docs/test_cases/t20003.md @@ -14,16 +14,12 @@ diagrams: using_namespace: - clanguml::t20003 start_from: - - function: "clanguml::t20003::m1()" + - function: "clanguml::t20003::m1(T)" ``` ## Source code File t20003.cc ```cpp -#include -#include -#include - namespace clanguml { namespace t20003 { diff --git a/docs/test_cases/t20003_sequence.svg b/docs/test_cases/t20003_sequence.svg index 85fc4d8d..cbad77ad 100644 --- a/docs/test_cases/t20003_sequence.svg +++ b/docs/test_cases/t20003_sequence.svg @@ -1,6 +1,6 @@ - + - + @@ -9,48 +9,45 @@ - - - - - - - - - - m1<T>() - - m1<T>() - - m2<T>() - - m2<T>() - - m3<T>() - - m3<T>() - - m4<T>() - - m4<T>() - - - - - - - m2<T>() - - - m3<T>() - - - m4<T>() - - - - - - + + + + + + + + + + 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 4755d144..42013039 100644 --- a/docs/test_cases/t20004_sequence.svg +++ b/docs/test_cases/t20004_sequence.svg @@ -1,6 +1,6 @@ - + - + @@ -9,120 +9,111 @@ - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + main() - - main() - - m1<float>() - - m1<float>() - - m1<unsigned long>() - - m1<unsigned long>() - - m4<unsigned long>() - - m4<unsigned long>() - - m1<std::string>() - - m1<std::string>() - - m2<std::string>() - - m2<std::string>() - - m1<int>() - - m1<int>() - - m2<int>() - - m2<int>() - - m3<int>() - - m3<int>() - - m4<int>() - - m4<int>() - - - - - - - - - - - - - m1() - - - - - m1() - - - m4() - - - - - - - m1() - - - m2() - - - - - - - m1() - - - m2() - - - m3() - - - m4() - - - - - - - - + + main() + + m1<float>(float) + + m1<float>(float) + + m1<unsigned long>(unsigned long) + + m1<unsigned long>(unsigned long) + + m4<unsigned long>(unsigned long) + + m4<unsigned long>(unsigned long) + + m1<std::string>(std::string) + + m1<std::string>(std::string) + + m2<std::string>(std::string) + + m2<std::string>(std::string) + + m1<int>(int) + + m1<int>(int) + + m2<int>(int) + + m2<int>(int) + + m3<int>(int) + + m3<int>(int) + + m4<int>(int) + + m4<int>(int) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/test_cases/t20005.md b/docs/test_cases/t20005.md index 697e6766..d3d4e8c9 100644 --- a/docs/test_cases/t20005.md +++ b/docs/test_cases/t20005.md @@ -14,7 +14,7 @@ diagrams: using_namespace: - clanguml::t20005 start_from: - - function: "clanguml::t20005::C::c" + - function: "clanguml::t20005::C::c(T)" ``` ## Source code File t20005.cc diff --git a/docs/test_cases/t20005_sequence.svg b/docs/test_cases/t20005_sequence.svg index dda1b150..5972d6c5 100644 --- a/docs/test_cases/t20005_sequence.svg +++ b/docs/test_cases/t20005_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,33 +9,33 @@ - - - + + + - + C<T> - + C<T> - + B<T> - + B<T> - + A<T> - + A<T> - - - + + + - b() + b(T) - a() + a(T) diff --git a/docs/test_cases/t20006_sequence.svg b/docs/test_cases/t20006_sequence.svg index e4bf6ba8..222d07c4 100644 --- a/docs/test_cases/t20006_sequence.svg +++ b/docs/test_cases/t20006_sequence.svg @@ -1,6 +1,6 @@ - + - + @@ -9,22 +9,22 @@ - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + @@ -34,112 +34,112 @@ - + tmain() - + tmain() - + B<int> - + B<int> - + A<int> - + A<int> - + B<std::string> - + B<std::string> - + A<std::string> - + A<std::string> - + BB<int,int> - + BB<int,int> - + AA<int> - + AA<int> - + BB<int,std::string> - + BB<int,std::string> - + BB<int,float> - + BB<int,float> - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - b() + b(int) - a1() + a1(int) - b() + b(std::string) - a2() + a2(std::string) - bb1() + bb1(int,int) - aa1() + aa1(int) - bb2() + bb2(int,int) - aa2() + aa2(int) - bb1() + bb1(int,std::string) - aa2() + aa2(int) - bb2() + bb2(int,std::string) - aa1() + aa1(int) - bb1() + bb1(int,float) - bb2() + bb2(int,float) - aa2() + aa2(int) diff --git a/docs/test_cases/t20007_sequence.svg b/docs/test_cases/t20007_sequence.svg index ca3a37f7..066fde6a 100644 --- a/docs/test_cases/t20007_sequence.svg +++ b/docs/test_cases/t20007_sequence.svg @@ -1,6 +1,6 @@ - + - + @@ -9,48 +9,48 @@ - - - - + + + + - - - - + + + + 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() + + 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() + + + + add(int &&,float &&,double &&) - - - - add() + + + + add(std::string &&,std::string &&,std::string &&) - + diff --git a/docs/test_cases/t20008_sequence.svg b/docs/test_cases/t20008_sequence.svg index e3f4dacc..e7446630 100644 --- a/docs/test_cases/t20008_sequence.svg +++ b/docs/test_cases/t20008_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,13 +9,13 @@ - - - - - - - + + + + + + + @@ -23,58 +23,58 @@ - + 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() + b(int) - a1() + a1(int) - b() + b(const char *) - a2() + a2(const char *) - b() + b(std::string) - a3() + a3(std::string) diff --git a/docs/test_cases/t20009_sequence.svg b/docs/test_cases/t20009_sequence.svg index 03a4a3ea..654f1a6a 100644 --- a/docs/test_cases/t20009_sequence.svg +++ b/docs/test_cases/t20009_sequence.svg @@ -1,6 +1,6 @@ - + - + @@ -9,72 +9,72 @@ - - - - - - - + + + + + + + - - - - - - - + + + + + + + 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() - - - a() - - - b() - - - a() - - - b() - - - a() + + 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 ed503036..2161d5f1 100644 --- a/docs/test_cases/t20010_sequence.svg +++ b/docs/test_cases/t20010_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,39 +9,39 @@ - - - - - - - - - + + + + + + + + + - + tmain() - + tmain() - + B<int> - + B<int> - + A - + A - - - - - - - - - + + + + + + + + + b1() diff --git a/docs/test_cases/t20011_sequence.svg b/docs/test_cases/t20011_sequence.svg index b75dc7b5..7aaccd7d 100644 --- a/docs/test_cases/t20011_sequence.svg +++ b/docs/test_cases/t20011_sequence.svg @@ -1,6 +1,6 @@ - + - + @@ -9,69 +9,69 @@ - - - - - - - - - + + + + + + + + + - - + + tmain() - + tmain() - - A - - A - - - - - - - - - - - - a() - - - - - a() - - - b() - - - - - c() - - - - - d() - - - - - b() - - - - - a() - - - - - a() + + A + + A + + + + + + + + + + + + a(int) + + + + + a(int) + + + b(int) + + + + + c(int) + + + + + d(int) + + + + + b(int) + + + + + a(int) + + + + + a(int) diff --git a/docs/test_cases/t20012_sequence.svg b/docs/test_cases/t20012_sequence.svg index c38a488e..1bae258a 100644 --- a/docs/test_cases/t20012_sequence.svg +++ b/docs/test_cases/t20012_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,30 +9,30 @@ - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + @@ -41,62 +41,62 @@ - + tmain() - + tmain() - + tmain()::(lambda t20012.cc:49:20) - + tmain()::(lambda t20012.cc:49:20) - + A - + A - + B - + B - + tmain()::(lambda t20012.cc:62:20) - + tmain()::(lambda t20012.cc:62:20) - + C - + C - + R<R::(lambda t20012.cc:68:9)> - + R<R::(lambda t20012.cc:68:9)> - + tmain()::(lambda t20012.cc:68:9) - + tmain()::(lambda t20012.cc:68:9) - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + operator()() diff --git a/docs/test_cases/t20013.md b/docs/test_cases/t20013.md new file mode 100644 index 00000000..a5400a2d --- /dev/null +++ b/docs/test_cases/t20013.md @@ -0,0 +1,51 @@ +# t20013 - Multiple translation units sequence diagram test case +## Config +```yaml +compilation_database_dir: .. +output_directory: puml +diagrams: + t20013_sequence: + type: sequence + glob: + - ../../tests/t20013/t20013.cc + include: + namespaces: + - clanguml::t20013 + using_namespace: + - clanguml::t20013 + start_from: + - function: "clanguml::t20013::tmain(int,char **)" +``` +## Source code +File t20013.cc +```cpp +namespace clanguml { +namespace t20013 { + +struct A { + int a1(int i) { return i; } + double a2(double d) { return d; } + const char *a3(const char *s) { return s; } +}; + +struct B { + int b(int i) { return a.a1(i); } + double b(double d) { return a.a2(d); } + const char *b(const char *s) { return a.a3(s); } + + A a; +}; + +void tmain(int argc, char **argv) +{ + B b; + + b.b(1); + b.b(2.0); + b.b("three"); +} +} +} +``` +## Generated UML diagrams +![t20013_sequence](./t20013_sequence.svg "Multiple translation units sequence diagram test case") diff --git a/docs/test_cases/t20013_sequence.svg b/docs/test_cases/t20013_sequence.svg new file mode 100644 index 00000000..33ab729c --- /dev/null +++ b/docs/test_cases/t20013_sequence.svg @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + + + + + + + tmain(int,char **) + + tmain(int,char **) + + B + + B + + A + + A + + + + + + + + + + b(int) + + + a1(int) + + + + + + + b(double) + + + a2(double) + + + + + + + b(const char *) + + + a3(const char *) + + + + + + diff --git a/docs/test_cases/t30001_package.svg b/docs/test_cases/t30001_package.svg index d4826fef..55ee8893 100644 --- a/docs/test_cases/t30001_package.svg +++ b/docs/test_cases/t30001_package.svg @@ -1,6 +1,6 @@ - + @@ -9,63 +9,63 @@ - - + + 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 1ac1bf98..a1dd395e 100644 --- a/docs/test_cases/t30002_package.svg +++ b/docs/test_cases/t30002_package.svg @@ -1,6 +1,6 @@ - + @@ -9,113 +9,113 @@ - - + + A - - + + AA - - + + B - - + + BB - - + + A1 - - + + A2 - - + + A3 - - + + A4 - - + + A5 - - + + A6 - - + + A7 - - + + A8 - - + + A9 - - + + A10 - - + + A11 - - + + A12 - - + + A13 - - + + A14 - - + + A15 - - + + A16 - - + + A17 - - + + BBB diff --git a/docs/test_cases/t30003_package.svg b/docs/test_cases/t30003_package.svg index 6dbf224a..bea7144d 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 e1979abe..b824afd5 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 6915f760..1be536f0 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 dacb4b9b..bf60980d 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 f3933d00..9f4d7823 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 aec51717..54333682 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/t40001_include.svg b/docs/test_cases/t40001_include.svg index 7545f850..ed05ff4a 100644 --- a/docs/test_cases/t40001_include.svg +++ b/docs/test_cases/t40001_include.svg @@ -1,6 +1,6 @@ - + @@ -9,43 +9,43 @@ - + src - + include - + lib1 - - + + t40001.cc - - + + t40001_include1.h - - + + lib1.h - + string - + vector - + yaml-cpp/yaml.h - + This is a lib1 include dir - + This is a t40001_include1.h include file diff --git a/docs/test_cases/t40002_include.svg b/docs/test_cases/t40002_include.svg index 0ef82202..b60d5d86 100644 --- a/docs/test_cases/t40002_include.svg +++ b/docs/test_cases/t40002_include.svg @@ -1,6 +1,6 @@ - + @@ -9,46 +9,46 @@ - + src - + lib1 - + lib2 - + include - + lib1 - + lib2 - - + + t40002.cc - - + + lib1.cc - - + + lib2.cc - - + + lib1.h - - + + lib2.h diff --git a/docs/test_cases/t40003_include.svg b/docs/test_cases/t40003_include.svg index d6df213a..a7f9efca 100644 --- a/docs/test_cases/t40003_include.svg +++ b/docs/test_cases/t40003_include.svg @@ -1,6 +1,6 @@ - + @@ -9,66 +9,66 @@ - + include - + dependants - + dependencies - + src - + dependants - + dependencies - - + + t3.h - - + + t2.h - - + + t1.h - - + + t3.h - - + + t2.h - - + + t1.h - - + + t5.h - - + + t1.cc - - + + t2.cc diff --git a/src/sequence_diagram/visitor/call_expression_context.h b/src/sequence_diagram/visitor/call_expression_context.h index 7e869603..6feb6b34 100644 --- a/src/sequence_diagram/visitor/call_expression_context.h +++ b/src/sequence_diagram/visitor/call_expression_context.h @@ -78,6 +78,8 @@ struct call_expression_context { clang::FunctionDecl *current_function_decl_; clang::FunctionTemplateDecl *current_function_template_decl_; + clang::CallExpr *current_function_call_expr_{nullptr}; + private: std::int64_t current_caller_id_; std::stack current_lambda_caller_id_; diff --git a/src/sequence_diagram/visitor/translation_unit_visitor.cc b/src/sequence_diagram/visitor/translation_unit_visitor.cc index 8c07f3bf..b99d19c3 100644 --- a/src/sequence_diagram/visitor/translation_unit_visitor.cc +++ b/src/sequence_diagram/visitor/translation_unit_visitor.cc @@ -514,21 +514,25 @@ bool translation_unit_visitor::TraverseLambdaExpr(clang::LambdaExpr *expr) return true; } -// -// bool translation_unit_visitor::TraverseCompoundStmt(clang::CompoundStmt -// *stmt) { -// const auto lambda_full_name = -// stmt-> -// -// RecursiveASTVisitor::TraverseCompoundStmt(stmt); -// -// LOG_DBG("Leaving lambda expression {} at {}", lambda_full_name, -// expr->getBeginLoc().printToString(source_manager())); -// -// context().leave_lambda_expression(); -// -// return true; -//} + +bool translation_unit_visitor::TraverseCallExpr(clang::CallExpr *expr) +{ + LOG_DBG("Entering call expression at {}", + expr->getBeginLoc().printToString(source_manager())); + + if (expr->getCalleeDecl() && + expr->getCalleeDecl()->isFunctionOrFunctionTemplate()) + context().current_function_call_expr_ = expr; + + RecursiveASTVisitor::TraverseCallExpr(expr); + + LOG_DBG("Leaving call expression at {}", + expr->getBeginLoc().printToString(source_manager())); + + context().current_function_call_expr_ = nullptr; + + return true; +} bool translation_unit_visitor::VisitCallExpr(clang::CallExpr *expr) { @@ -544,11 +548,6 @@ bool translation_unit_visitor::VisitCallExpr(clang::CallExpr *expr) expr->getBeginLoc().printToString(source_manager()), context().caller_id()); - if (context().caller_id() == 2166770483948966160) { - LOG_WARN(">>>>>>> VISITING CALL EXPRESSION IN METHOD " - "one::s3::S3Server::listBuckets()"); - } - // Skip casts, moves and such if (expr->isCallToStdMove()) return true; @@ -568,7 +567,9 @@ bool translation_unit_visitor::VisitCallExpr(clang::CallExpr *expr) // If we're currently inside a lambda expression, set it's id as // message source rather then enclosing context - if (context().lambda_caller_id() != 0) { + // Unless the lambda is declared in a function or method call + if (context().lambda_caller_id() != 0 && + context().current_function_call_expr_ == nullptr) { m.from = context().lambda_caller_id(); } @@ -960,6 +961,14 @@ translation_unit_visitor::create_class_declaration(clang::CXXRecordDecl *cls) c.set_name(type_name); c.set_namespace(ns); c.set_id(common::to_id(c.full_name(false))); + + // Check if lambda is declared as an argument passed to a + // function/method call + } + else { + LOG_WARN("Cannot find parent declaration for lambda {}", + cls->getQualifiedNameAsString()); + return {}; } } else { diff --git a/src/sequence_diagram/visitor/translation_unit_visitor.h b/src/sequence_diagram/visitor/translation_unit_visitor.h index 234e1bdf..29bd9bfc 100644 --- a/src/sequence_diagram/visitor/translation_unit_visitor.h +++ b/src/sequence_diagram/visitor/translation_unit_visitor.h @@ -44,14 +44,14 @@ public: bool VisitCallExpr(clang::CallExpr *expr); + bool TraverseCallExpr(clang::CallExpr *expr); + bool VisitLambdaExpr(clang::LambdaExpr *expr); bool TraverseLambdaExpr(clang::LambdaExpr *expr); bool VisitCXXMethodDecl(clang::CXXMethodDecl *method); -// bool TraverseCompoundStmt(clang::CompoundStmt *stmt); - bool VisitCXXRecordDecl(clang::CXXRecordDecl *cls); bool VisitClassTemplateDecl(clang::ClassTemplateDecl *cls); diff --git a/tests/test_cases.yaml b/tests/test_cases.yaml index 241086fc..4f60cb43 100644 --- a/tests/test_cases.yaml +++ b/tests/test_cases.yaml @@ -184,6 +184,12 @@ test_cases: - name: t20012 title: Lambda expression call sequence diagram test case description: + - name: t20013 + title: Function and method arguments in sequence diagrams test case + description: + - name: t20014 + title: Multiple translation units sequence diagram test case + description: Package diagrams: - name: t30001 title: Basic package diagram test case