diff --git a/docs/test_cases.md b/docs/test_cases.md index 9681b59d..aed0792d 100644 --- a/docs/test_cases.md +++ b/docs/test_cases.md @@ -57,5 +57,6 @@ ## Include diagrams * [t40001](./test_cases/t40001.md) - Basic include graph diagram test case * [t40002](./test_cases/t40002.md) - Cyclic include graph diagram test case + * [t40003](./test_cases/t40003.md) - Dependants and dependencies include diagram filter test ## Configuration diagrams * [t90000](./test_cases/t90000.md) - Basic config test diff --git a/docs/test_cases/t00002_class.svg b/docs/test_cases/t00002_class.svg index 6172c133..44013c64 100644 --- a/docs/test_cases/t00002_class.svg +++ b/docs/test_cases/t00002_class.svg @@ -1,6 +1,6 @@ - + - + @@ -9,146 +9,146 @@ - - - - - A - - + + + + + A + + - - - + + + - - foo_a() = 0 : void + + foo_a() = 0 : void - - - + + + - - foo_c() = 0 : void + + foo_c() = 0 : void - - - - - B - - + + + + + B + + - - - + + + - - foo_a() : void + + foo_a() : void - - - - - C - - + + + + + C + + - - - + + + - - foo_c() : void + + foo_c() : void - - - - - D - + + + + + D + - - - + + + - - as : std::vector<A*> + + as : std::vector<A*> - - - - + + + + - - foo_a() : void + + foo_a() : void - - - + + + - - foo_c() : void + + foo_c() : void - - - - - E - + + + + + E + - - - + + + - - as : std::vector<A*> + + as : std::vector<A*> - - - - + + + + - - foo_a() : void + + foo_a() : void - - - + + + - - foo_c() : void + + foo_c() : void - - - This is class A - - - This is class B - - - This is class D - which is a little like B - and a little like C - - - - - - - - as - - - - - - - - as - - - - + + + This is class A + + + This is class B + + + This is class D + which is a little like B + and a little like C + + + + + + + + as + + + + + + + + as + + + + diff --git a/docs/test_cases/t00003_class.svg b/docs/test_cases/t00003_class.svg index 923d0a0d..f5663a4f 100644 --- a/docs/test_cases/t00003_class.svg +++ b/docs/test_cases/t00003_class.svg @@ -1,6 +1,6 @@ - + - + @@ -9,195 +9,195 @@ - - - - - A - + + + + + A + - - - + + + - - public_member : int + + public_member : int - - - + + + - - static_int : int + + static_int : int - - - + + + - - static_const_int : int const + + static_const_int : int const - - - + + + - - auto_member : unsigned long const + + auto_member : unsigned long const - - - + + + - - protected_member : int + + protected_member : int - - - + + + - - private_member : int + + private_member : int - - - + + + - - a : int + + a : int - - - + + + - - b : int + + b : int - - - + + + - - c : int + + c : int - - - - + + + + - - A() : void + + A() : void - - - + + + - - A(int i) : void + + A(int i) : void - - - + + + - - A(A&& ) : void + + A(A&& ) : void - - - + + + - - A(A const& ) : void + + A(A const& ) : void - - - + + + - - ~A() : void + + ~A() : void - - - + + + - - basic_method() : void + + basic_method() : void - - - + + + - - static_method() : int + + static_method() : int - - - + + + - - const_method() const : void + + const_method() const : void - - - + + + - - auto_method() : int + + auto_method() : int - - - + + + - - double_int(int const i) : int + + double_int(int const i) : int - - - + + + - - sum(double const a, double const b) : double + + sum(double const a, double const b) : double - - - + + + - - default_int(int i = 12) : int + + default_int(int i = 12) : int - - - + + + - - default_string(int i, std::string s = "abc") : std::string + + default_string(int i, std::string s = "abc") : std::string - - - + + + - - create_from_int(int i) : A + + create_from_int(int i) : A - - - + + + - - protected_method() : void + + protected_method() : void - - - + + + - - private_method() : void + + private_method() : void - - - + + + - - compare : std::function<bool(int const)> + + compare : std::function<bool(int const)> diff --git a/docs/test_cases/t00004_class.svg b/docs/test_cases/t00004_class.svg index 5d0811e0..831a3ebb 100644 --- a/docs/test_cases/t00004_class.svg +++ b/docs/test_cases/t00004_class.svg @@ -1,6 +1,6 @@ - + - + @@ -9,66 +9,66 @@ - - - - - A - - + + + + + A + + - - - + + + - - foo() const : void + + foo() const : void - - - + + + - - foo2() const : void + + foo2() const : void - - - - - AA - - + + + + + AA + + - - - - - Lights - - Green - Yellow - Red - + + + + + Lights + + Green + Yellow + Red + - - - - - AAA - - + + + + + AAA + + - - - - - - - - - - - - + + + + + + + + + + + + diff --git a/docs/test_cases/t00005_class.svg b/docs/test_cases/t00005_class.svg index 73f916a5..0135e9c7 100644 --- a/docs/test_cases/t00005_class.svg +++ b/docs/test_cases/t00005_class.svg @@ -1,6 +1,6 @@ - + - + @@ -9,239 +9,239 @@ - - - - - A - - + + + + + A + + - - - - - B - - + + + + + B + + - - - - - C - - + + + + + C + + - - - - - D - - + + + + + D + + - - - - - E - - + + + + + E + + - - - - - F - - + + + + + F + + - - - - - G - - + + + + + G + + - - - - - H - - + + + + + H + + - - - - - I - - + + + + + I + + - - - - - J - - + + + + + J + + - - - - - K - - + + + + + K + + - - - - - R - + + + + + R + - - - + + + - - some_int : int + + some_int : int - - - + + + - - some_int_pointer : int* + + some_int_pointer : int* - - - + + + - - some_int_pointer_pointer : int** + + some_int_pointer_pointer : int** - - - + + + - - some_int_reference : int& + + some_int_reference : int& - - - + + + - - a : A + + a : A - - - + + + - - b : B* + + b : B* - - - + + + - - c : C& + + c : C& - - - + + + - - d : D const* + + d : D const* - - - + + + - - e : E const& + + e : E const& - - - + + + - - f : F&& + + f : F&& - - - + + + - - g : G** + + g : G** - - - + + + - - h : H*** + + h : H*** - - - + + + - - i : I*& + + i : I*& - - - + + + - - j : J volatile* + + j : J volatile* - - - + + + - - k : K* + + k : K* - - - - +a - - - +b - - - +c - - - +d - - - +e - - - +f - - - +g - - - +h - - - +i - - - +j - - - +k + + + + +a + + + +b + + + +c + + + +d + + + +e + + + +f + + + +g + + + +h + + + +i + + + +j + + + +k diff --git a/docs/test_cases/t00006_class.svg b/docs/test_cases/t00006_class.svg index 1734618d..55d281d3 100644 --- a/docs/test_cases/t00006_class.svg +++ b/docs/test_cases/t00006_class.svg @@ -1,6 +1,6 @@ - + - + @@ -9,314 +9,314 @@ - - - - - A - - + + + + + A + + - - - - - B - - + + + + + B + + - - - - - C - - + + + + + C + + - - - - - D - - + + + + + D + + - - - - - E - - + + + + + E + + - - - - - F - - + + + + + F + + - - - - - G - - + + + + + G + + - - - - - H - - + + + + + H + + - - - - - I - - + + + + + I + + - - - - - J - - + + + + + J + + - - - - - K - - + + + + + K + + - - - - - L - - + + + + + L + + - - - - - M - - + + + + + M + + - - - - - N - - + + + + + N + + - - - - - NN - - + + + + + NN + + - - - - - NNN - - + + + + + NNN + + - - - - - custom_container - - T - + + + + + custom_container + + T + - - - + + + - - data : std::vector<T> + + data : std::vector<T> - - - - - custom_container - - E - - - - - - - R - + + + + + custom_container + + E + + + + + + + R + - - - + + + - - a : std::vector<A> + + a : std::vector<A> - - - + + + - - b : std::vector<B*> + + b : std::vector<B*> - - - + + + - - c : std::map<int,C> + + c : std::map<int,C> - - - + + + - - d : std::map<int,D*> + + d : std::map<int,D*> - - - + + + - - e : custom_container<E> + + e : custom_container<E> - - - + + + - - f : std::vector<std::vector<F>> + + f : std::vector<std::vector<F>> - - - + + + - - g : std::map<int,std::vector<G*>> + + g : std::map<int,std::vector<G*>> - - - + + + - - h : std::array<H,10> + + h : std::array<H,10> - - - + + + - - i : std::array<I*,5> + + i : std::array<I*,5> - - - + + + - - j : J[10] + + j : J[10] - - - + + + - - k : K*[20] + + k : K*[20] - - - + + + - - lm : std::vector<std::pair<L,M>> + + lm : std::vector<std::pair<L,M>> - - - + + + - - ns : std::tuple<N,NN,NNN> + + ns : std::tuple<N,NN,NNN> - - - - - - - - +a - - - +b - - - +c - - - +d - - - +e - - - +f - - - +g - - - +h - - - +i - - - +j - - - +k - - - - lm - - - - lm - - - - ns - - - - ns - - - - ns + + + + + + + + +a + + + +b + + + +c + + + +d + + + +e + + + +f + + + +g + + + +h + + + +i + + + +j + + + +k + + + + lm + + + + lm + + + + ns + + + + ns + + + + ns diff --git a/docs/test_cases/t00007_class.svg b/docs/test_cases/t00007_class.svg index 357f33d8..871002d5 100644 --- a/docs/test_cases/t00007_class.svg +++ b/docs/test_cases/t00007_class.svg @@ -1,6 +1,6 @@ - + - + @@ -9,67 +9,67 @@ - - - - - A - - + + + + + A + + - - - - - B - - + + + + + B + + - - - - - C - - + + + + + C + + - - - - - R - + + + + + R + - - - + + + - - a : std::unique_ptr<A> + + a : std::unique_ptr<A> - - - + + + - - b : std::shared_ptr<B> + + b : std::shared_ptr<B> - - - + + + - - c : std::weak_ptr<C> + + c : std::weak_ptr<C> - - - - +a - - - +b - - - +c + + + + +a + + + +b + + + +c diff --git a/docs/test_cases/t00008_class.svg b/docs/test_cases/t00008_class.svg index 17122b8c..78bea67b 100644 --- a/docs/test_cases/t00008_class.svg +++ b/docs/test_cases/t00008_class.svg @@ -1,6 +1,6 @@ - + - + @@ -9,134 +9,134 @@ - - - - - A - - T,P,CMP,int N - + + + + + A + + T,P,CMP,int N + - - - + + + - - value : T + + value : T - - - + + + - - pointer : T* + + pointer : T* - - - + + + - - reference : T& + + reference : T& - - - + + + - - values : std::vector<P> + + values : std::vector<P> - - - + + + - - ints : std::array<int,N> + + ints : std::array<int,N> - - - + + + - - comparator : CMP + + comparator : CMP - - - - - - Vector - - T - + + + + + + Vector + + T + - - - + + + - - values : std::vector<T> + + values : std::vector<T> - - - - - - B - - T,C<> - + + + + + + B + + T,C<> + - - - + + + - - template_template : C<T> + + template_template : C<T> - - - - - B - - int,Vector - - - - - - - D - + + + + + B + + int,Vector + + + + + + + D + - - - + + + - - ints : B<int,Vector> + + ints : B<int,Vector> - - - - + + + + - - D(std::tuple<Items...>* ) : void + + D(std::tuple<Items...>* ) : void - - - + + + - - add(int i) : void + + add(int i) : void - - - - - - ints + + + + + + ints diff --git a/docs/test_cases/t00009_class.svg b/docs/test_cases/t00009_class.svg index d8a16533..2a4f7564 100644 --- a/docs/test_cases/t00009_class.svg +++ b/docs/test_cases/t00009_class.svg @@ -1,6 +1,6 @@ - + - + @@ -9,93 +9,93 @@ - - - - - A - - T - + + + + + A + + T + - - - + + + - - value : T + + value : T - - - - - A - - int - - - - - - A - - std::string - - - - - - A - - std::vector<std::string> - - - - - - - B - + + + + + A + + int + + + + + + A + + std::string + + + + + + A + + std::vector<std::string> + + + + + + + B + - - - + + + - - aint : A<int> + + aint : A<int> - - - + + + - - astring : A<std::string>* + + astring : A<std::string>* - - - + + + - - avector : A<std::vector<std::string>>& + + avector : A<std::vector<std::string>>& - - - - - - - - - - - aint - - - - astring - - - - avector + + + + + + + + + + + aint + + + + astring + + + + avector diff --git a/docs/test_cases/t00010_class.svg b/docs/test_cases/t00010_class.svg index 08d7269a..063e3d03 100644 --- a/docs/test_cases/t00010_class.svg +++ b/docs/test_cases/t00010_class.svg @@ -1,6 +1,6 @@ - + - + @@ -9,89 +9,89 @@ - - - - - A - - T,P - + + + + + A + + T,P + - - - + + + - - first : T + + first : T - - - + + + - - second : P + + second : P - - - - - A - - T,std::string - - - - - - - B - - T - + + + + + A + + T,std::string + + + + + + + B + + T + - - - + + + - - astring : A<T,std::string> + + astring : A<T,std::string> - - - - - B - - int - - - - - - - C - + + + + + B + + int + + + + + + + C + - - - + + + - - aintstring : B<int> + + aintstring : B<int> - - - - - - - astring - - - - - - aintstring + + + + + + + astring + + + + + + aintstring diff --git a/docs/test_cases/t00011_class.svg b/docs/test_cases/t00011_class.svg index 349f3a1c..f29ec626 100644 --- a/docs/test_cases/t00011_class.svg +++ b/docs/test_cases/t00011_class.svg @@ -1,6 +1,6 @@ - + - + @@ -9,67 +9,67 @@ - - - - - D - - T - + + + + + D + + T + - - - + + + - - value : T + + value : T - - - - - - A - - + + + + + + A + + - - - + + + - - foo() : void + + foo() : void - - - - - B - + + + + + B + - - - + + + - - m_a : A* + + m_a : A* - - - - + + + + - - foo() : void + + foo() : void - - - - «friend» - - - - m_a + + + + «friend» + + + + m_a diff --git a/docs/test_cases/t00012_class.svg b/docs/test_cases/t00012_class.svg index 8a207535..da7f9a7b 100644 --- a/docs/test_cases/t00012_class.svg +++ b/docs/test_cases/t00012_class.svg @@ -1,6 +1,6 @@ - + - + @@ -9,179 +9,179 @@ - - - - - A - - T,Ts... - + + + + + A + + T,Ts... + - - - + + + - - value : T + + value : T - - - + + + - - values : int + + values : int - - - - - - B - - int Is... - - + + + + + + B + + int Is... + + - - - + + + - - ints : std::array<int,sizeof...(Is)> + + ints : std::array<int,sizeof...(Is)> - - - - - C - - T,int Is... - - + + + + + C + + T,int Is... + + - - - + + + - - ints : std::array<T,sizeof...(Is)> + + ints : std::array<T,sizeof...(Is)> - - - - A - - int,std::string,float - - - - - - A - - int,std::string,bool - - - - - - B - - 3,2,1 - - - - - - B - - 1,1,1,1 - - - - - - C - - std::map<int,std::vector<std::vector<std::vector<std::string>>>>,3,3,3 - - - - - - - R - + + + + A + + int,std::string,float + + + + + + A + + int,std::string,bool + + + + + + B + + 3,2,1 + + + + + + B + + 1,1,1,1 + + + + + + C + + std::map<int,std::vector<std::vector<std::vector<std::string>>>>,3,3,3 + + + + + + + R + - - - + + + - - a1 : A<int,std::string,float> + + a1 : A<int,std::string,float> - - - + + + - - a2 : A<int,std::string,bool> + + a2 : A<int,std::string,bool> - - - + + + - - b1 : B<3,2,1> + + b1 : B<3,2,1> - - - + + + - - b2 : B<1,1,1,1> + + b2 : B<1,1,1,1> - - - + + + - - c1 : C<std::map<int,std::vector<std::vector<std::vector<std::string>>>>,3,3,3> + + c1 : C<std::map<int,std::vector<std::vector<std::vector<std::string>>>>,3,3,3> - - - - Long template annotation - - - - - - - - - - - - - - a1 - - - - a2 - - - - b1 - - - - b2 - - - - c1 + + + + Long template annotation + + + + + + + + + + + + + + a1 + + + + a2 + + + + b1 + + + + b2 + + + + c1 diff --git a/docs/test_cases/t00013_class.svg b/docs/test_cases/t00013_class.svg index b5b13365..6815e296 100644 --- a/docs/test_cases/t00013_class.svg +++ b/docs/test_cases/t00013_class.svg @@ -1,6 +1,6 @@ - + - + @@ -9,250 +9,250 @@ - - - - - ABCD::F - - T - + + + + + ABCD::F + + T + - - - + + + - - f : T + + f : T - - - - - - A - + + + + + + A + - - - + + + - - a : int + + a : int - - - - - - B - + + + + + + B + - - - + + + - - b : int + + b : int - - - - - - C - + + + + + + C + - - - + + + - - c : int + + c : int - - - - - - D - + + + + + + D + - - - + + + - - d : int + + d : int - - - - + + + + - - print(R* r) : void + + print(R* r) : void - - - - - E - - T - + + + + + E + + T + - - - + + + - - e : T + + e : T - - - - - E - - int - - - - - - F - - int - - - - - - E - - std::string - - - - - - - R - + + + + + E + + int + + + + + + F + + int + + + + + + E + + std::string + + + + + + + R + - - - + + + - - estring : E<std::string> + + estring : E<std::string> - - - - + + + + - - get_a(A* a) : int + + get_a(A* a) : int - - - + + + - - get_b(B& b) : int + + get_b(B& b) : int - - - + + + - - get_const_b(B const& b) : int + + get_const_b(B const& b) : int - - - + + + - - get_c(C c) : int + + get_c(C c) : int - - - + + + - - get_d(D&& d) : int + + get_d(D&& d) : int - - - + + + - - get_d2(D&& d) : int + + get_d2(D&& d) : int - - - + + + - - get_e(E<T> e) : T + + get_e(E<T> e) : T - - - + + + - - get_int_e(E<int> const& e) : int + + get_int_e(E<int> const& e) : int - - - + + + - - get_int_e2(E<int>& e) : int + + get_int_e2(E<int>& e) : int - - - + + + - - get_f(F<T> const& f) : T + + get_f(F<T> const& f) : T - - - + + + - - get_int_f(F<int> const& f) : int + + get_int_f(F<int> const& f) : int - - - - - - - - - - - - - - - - - - - - - - - - - - - - estring + + + + + + + + + + + + + + + + + + + + + + + + + + + + estring diff --git a/docs/test_cases/t00014_class.svg b/docs/test_cases/t00014_class.svg index 7afe9213..859affc8 100644 --- a/docs/test_cases/t00014_class.svg +++ b/docs/test_cases/t00014_class.svg @@ -1,6 +1,6 @@ - + - + @@ -9,204 +9,204 @@ - - - - - A - - T,P - + + + + + A + + T,P + - - - + + + - - t : T + + t : T - - - + + + - - p : P + + p : P - - - - - A - - T,std::string - - - - - - - B - + + + + + A + + T,std::string + + + + + + + B + - - - + + + - - value : std::string + + value : std::string - - - - - A - - bool,std::string - - - - - - AString - - float - - - - - - AString - - int - - - - - - AString - - std::string - - - - - - GeneralCallback - - AIntString - - - - - - GeneralCallback - - - - - - - R - + + + + + A + + bool,std::string + + + + + + AString + + float + + + + + + AString + + int + + + + + + AString + + std::string + + + + + + GeneralCallback + + AIntString + + + + + + GeneralCallback + + + + + + + R + - - - + + + - - boolstring : A<bool,std::string> + + boolstring : A<bool,std::string> - - - + + + - - floatstring : AString<float> + + floatstring : AString<float> - - - + + + - - intstring : AIntString + + intstring : AIntString - - - + + + - - stringstring : AStringString + + stringstring : AStringString - - - + + + - - bs : BVector + + bs : BVector - - - + + + - - bs2 : BVector2 + + bs2 : BVector2 - - - + + + - - cb : GeneralCallback<AIntString> + + cb : GeneralCallback<AIntString> - - - + + + - - vcb : VoidCallback + + vcb : VoidCallback - - - - - - - - - - - - - - - boolstring - - - - floatstring - - - - intstring - - - - stringstring - - - - bs - - - - bs2 - - - - cb - - - - vcb + + + + + + + + + + + + + + + boolstring + + + + floatstring + + + + intstring + + + + stringstring + + + + bs + + + + bs2 + + + + cb + + + + vcb diff --git a/docs/test_cases/t00015_class.svg b/docs/test_cases/t00015_class.svg index 79786aa2..e044866c 100644 --- a/docs/test_cases/t00015_class.svg +++ b/docs/test_cases/t00015_class.svg @@ -1,6 +1,6 @@ - + - + @@ -9,51 +9,51 @@ - - - - - ns1::A - - + + + + + ns1::A + + - - - - - ns1::ns2_v0_9_0::A - - + + + + + ns1::ns2_v0_9_0::A + + - - - - - ns1::Anon - - + + + + + ns1::Anon + + - - - - - ns3::ns1::ns2::Anon - - + + + + + ns3::ns1::ns2::Anon + + - - - - - ns3::B - - + + + + + ns3::B + + - - - - - - + + + + + + diff --git a/docs/test_cases/t00016_class.svg b/docs/test_cases/t00016_class.svg index f33a9f13..daf505eb 100644 --- a/docs/test_cases/t00016_class.svg +++ b/docs/test_cases/t00016_class.svg @@ -1,6 +1,6 @@ - + - + @@ -9,71 +9,71 @@ - - - - - is_numeric<> - - - value : enum - + + + + + is_numeric<> + + + value : enum + - - - - - is_numeric - - char - - - value : enum - + + + + + is_numeric + + char + + + value : enum + - - - - - is_numeric - - unsigned char - - - value : enum - + + + + + is_numeric + + unsigned char + + + value : enum + - - - - - is_numeric - - int - - - value : enum - + + + + + is_numeric + + int + + + value : enum + - - - - - is_numeric - - bool - - - value : enum - + + + + + is_numeric + + bool + + + value : enum + - - - - - - - - + + + + + + + + diff --git a/docs/test_cases/t00017_class.svg b/docs/test_cases/t00017_class.svg index 12ec24fb..41f3fe7c 100644 --- a/docs/test_cases/t00017_class.svg +++ b/docs/test_cases/t00017_class.svg @@ -1,6 +1,6 @@ - + - + @@ -9,177 +9,177 @@ - - - - - A - - + + + + + A + + - - - - - B - - + + + + + B + + - - - - - C - - + + + + + C + + - - - - - D - - + + + + + D + + - - - - - E - - + + + + + E + + - - - - - F - - + + + + + F + + - - - - - G - - + + + + + G + + - - - - - H - - + + + + + H + + - - - - - I - - + + + + + I + + - - - - - J - - + + + + + J + + - - - - - K - - + + + + + K + + - - - - - R - + + + + + R + - - - + + + - - some_int : int + + some_int : int - - - + + + - - some_int_pointer : int* + + some_int_pointer : int* - - - + + + - - some_int_pointer_pointer : int** + + some_int_pointer_pointer : int** - - - + + + - - some_int_reference : int& + + some_int_reference : int& - - - - + + + + - - R(int& some_int, C& cc, E const& ee, F&& ff, I*& ii) : void + + R(int& some_int, C& cc, E const& ee, F&& ff, I*& ii) : void - - - - - -c - - - - - -e - - - - - -f - - - - - -i - - - -a - - - -b - - - -d - - - -g - - - -h - - - -j - - - -k + + + + + -c + + + + + -e + + + + + -f + + + + + -i + + + -a + + + -b + + + -d + + + -g + + + -h + + + -j + + + -k diff --git a/docs/test_cases/t00018.md b/docs/test_cases/t00018.md index 12df63da..b6cd8197 100644 --- a/docs/test_cases/t00018.md +++ b/docs/test_cases/t00018.md @@ -17,36 +17,6 @@ diagrams: ``` ## Source code -File t00018_impl.cc -```cpp -#include "t00018_impl.h" -#include "t00018.h" - -namespace clanguml { -namespace t00018 { -namespace impl { - -widget::widget(int n) - : n(n) -{ -} - -void widget::draw(const clanguml::t00018::widget &w) const -{ - if (w.shown()) - std::cout << "drawing a const widget " << n << '\n'; -} - -void widget::draw(const clanguml::t00018::widget &w) -{ - if (w.shown()) - std::cout << "drawing a non-const widget " << n << '\n'; -} -} -} -} - -``` File t00018_impl.h ```cpp #pragma once @@ -131,6 +101,36 @@ widget &widget::operator=(widget &&) = default; } } +``` +File t00018_impl.cc +```cpp +#include "t00018_impl.h" +#include "t00018.h" + +namespace clanguml { +namespace t00018 { +namespace impl { + +widget::widget(int n) + : n(n) +{ +} + +void widget::draw(const clanguml::t00018::widget &w) const +{ + if (w.shown()) + std::cout << "drawing a const widget " << n << '\n'; +} + +void widget::draw(const clanguml::t00018::widget &w) +{ + if (w.shown()) + std::cout << "drawing a non-const widget " << n << '\n'; +} +} +} +} + ``` ## Generated UML diagrams ![t00018_class](./t00018_class.svg "Pimpl pattern") diff --git a/docs/test_cases/t00018_class.svg b/docs/test_cases/t00018_class.svg index 836e50fb..41b05932 100644 --- a/docs/test_cases/t00018_class.svg +++ b/docs/test_cases/t00018_class.svg @@ -1,6 +1,6 @@ - + - + @@ -9,125 +9,125 @@ - - - - - impl::widget - + + + + + impl::widget + - - - + + + - - n : int + + n : int - - - - + + + + - - draw(widget const& w) const : void + + draw(widget const& w) const : void - - - + + + - - draw(widget const& w) : void + + draw(widget const& w) : void - - - + + + - - widget(int n) : void + + widget(int n) : void - - - - - widget - + + + + + widget + - - - + + + - - pImpl : std::unique_ptr<impl::widget> + + pImpl : std::unique_ptr<impl::widget> - - - - + + + + - - draw() const : void + + draw() const : void - - - + + + - - draw() : void + + draw() : void - - - + + + - - shown() const : bool + + shown() const : bool - - - + + + - - widget(int ) : void + + widget(int ) : void - - - + + + - - ~widget() : void + + ~widget() : void - - - + + + - - widget(widget&& ) : void + + widget(widget&& ) : void - - - + + + - - widget(widget const& ) : void + + widget(widget const& ) : void - - - + + + - - operator=(widget&& ) : widget& + + operator=(widget&& ) : widget& - - - + + + - - operator=(widget const& ) : widget& + + operator=(widget const& ) : widget& - - - - - - pImpl + + + + + + pImpl diff --git a/docs/test_cases/t00019.md b/docs/test_cases/t00019.md index 272d6f1b..4f51ff13 100644 --- a/docs/test_cases/t00019.md +++ b/docs/test_cases/t00019.md @@ -17,21 +17,25 @@ diagrams: ``` ## Source code -File t00019.cc +File t00019_layer2.h ```cpp -#include "t00019_base.h" -#include "t00019_layer1.h" -#include "t00019_layer2.h" -#include "t00019_layer3.h" - -#include +#pragma once namespace clanguml { namespace t00019 { -class A { -public: - std::unique_ptr>>> layers; +template class Layer2 : public LowerLayer { + + using LowerLayer::LowerLayer; + + using LowerLayer::m1; + + using LowerLayer::m2; + + int all_calls_count() const + { + return LowerLayer::m1_calls() + LowerLayer::m2_calls(); + } }; } } @@ -89,6 +93,26 @@ template class Layer1 : public LowerLayer { } } +``` +File t00019.cc +```cpp +#include "t00019_base.h" +#include "t00019_layer1.h" +#include "t00019_layer2.h" +#include "t00019_layer3.h" + +#include + +namespace clanguml { +namespace t00019 { + +class A { +public: + std::unique_ptr>>> layers; +}; +} +} + ``` File t00019_layer3.h ```cpp @@ -126,30 +150,6 @@ private: } } -``` -File t00019_layer2.h -```cpp -#pragma once - -namespace clanguml { -namespace t00019 { - -template class Layer2 : public LowerLayer { - - using LowerLayer::LowerLayer; - - using LowerLayer::m1; - - using LowerLayer::m2; - - int all_calls_count() const - { - return LowerLayer::m1_calls() + LowerLayer::m2_calls(); - } -}; -} -} - ``` ## Generated UML diagrams ![t00019_class](./t00019_class.svg "Layercake pattern") diff --git a/docs/test_cases/t00019_class.svg b/docs/test_cases/t00019_class.svg index 7dfa9d5a..dc06da51 100644 --- a/docs/test_cases/t00019_class.svg +++ b/docs/test_cases/t00019_class.svg @@ -1,6 +1,6 @@ - + - + @@ -9,195 +9,195 @@ - - - - - Base - - + + + + + Layer2 + + LowerLayer + + - - - + + + - - Base() : void + + all_calls_count() const : int - - - + + + + + Base + + - - ~Base() : void + + + - - - + + Base() : void - - m1() : int + + + - - - + + ~Base() : void - - m2() : std::string + + + - - - - - Layer1 - - LowerLayer - - + + m1() : int - - - + + + - - m1() : int + + m2() : std::string - - - + + + + + Layer1 + + LowerLayer + + - - m2() : std::string + + + - - - - - Layer3 - - LowerLayer - + + m1() : int - - - + + + - - m_m1_calls : int + + m2() : std::string - - - + + + + + Layer3 + + LowerLayer + - - m_m2_calls : int + + + - - - - + + m_m1_calls : int - - m1() : int + + + - - - + + m_m2_calls : int - - m2() : std::string + + + + - - - + + m1() : int - - m1_calls() const : int + + + - - - + + m2() : std::string - - m2_calls() const : int + + + - - - - - Layer2 - - LowerLayer - - + + m1_calls() const : int - - - + + + - - all_calls_count() const : int + + m2_calls() const : int - - - - Layer3 - - Base - - - - - - Layer2 - - Layer3<Base> - - - - - - Layer1 - - Layer2<Layer3<Base>> - - - - - - - A - + + + + Layer3 + + Base + + + + + + Layer2 + + Layer3<Base> + + + + + + Layer1 + + Layer2<Layer3<Base>> + + + + + + + A + - - - + + + - - layers : std::unique_ptr<Layer1<Layer2<Layer3<Base>>>> + + layers : std::unique_ptr<Layer1<Layer2<Layer3<Base>>>> - - - - - - - - - - - - - - - - - - - - - - - layers + + + + + + + + + + + + + + + + + + + + + + + layers diff --git a/docs/test_cases/t00020_class.svg b/docs/test_cases/t00020_class.svg index 031e495b..70d98fef 100644 --- a/docs/test_cases/t00020_class.svg +++ b/docs/test_cases/t00020_class.svg @@ -1,6 +1,6 @@ - + - + @@ -9,195 +9,195 @@ - - - - - ProductA - - + + + + + ProductA + + - - - + + + - - ~ProductA() : void + + ~ProductA() : void - - - + + + - - sell(int price) const = 0 : bool + + sell(int price) const = 0 : bool - - - - - ProductA1 - - + + + + + ProductA1 + + - - - + + + - - sell(int price) const : bool + + sell(int price) const : bool - - - - - ProductA2 - - + + + + + ProductA2 + + - - - + + + - - sell(int price) const : bool + + sell(int price) const : bool - - - - - ProductB - - + + + + + ProductB + + - - - + + + - - ~ProductB() : void + + ~ProductB() : void - - - + + + - - buy(int price) const = 0 : bool + + buy(int price) const = 0 : bool - - - - - ProductB1 - - + + + + + ProductB1 + + - - - + + + - - buy(int price) const : bool + + buy(int price) const : bool - - - - - ProductB2 - - + + + + + ProductB2 + + - - - + + + - - buy(int price) const : bool + + buy(int price) const : bool - - - - - AbstractFactory - - + + + + + AbstractFactory + + - - - + + + - - make_a() const = 0 : std::unique_ptr<ProductA> + + make_a() const = 0 : std::unique_ptr<ProductA> - - - + + + - - make_b() const = 0 : std::unique_ptr<ProductB> + + make_b() const = 0 : std::unique_ptr<ProductB> - - - - - Factory1 - - + + + + + Factory1 + + - - - + + + - - make_a() const : std::unique_ptr<ProductA> + + make_a() const : std::unique_ptr<ProductA> - - - + + + - - make_b() const : std::unique_ptr<ProductB> + + make_b() const : std::unique_ptr<ProductB> - - - - - Factory2 - - + + + + + Factory2 + + - - - + + + - - make_a() const : std::unique_ptr<ProductA> + + make_a() const : std::unique_ptr<ProductA> - - - + + + - - make_b() const : std::unique_ptr<ProductB> + + make_b() const : std::unique_ptr<ProductB> - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + diff --git a/docs/test_cases/t00021_class.svg b/docs/test_cases/t00021_class.svg index f08b9623..5960cd52 100644 --- a/docs/test_cases/t00021_class.svg +++ b/docs/test_cases/t00021_class.svg @@ -1,6 +1,6 @@ - + - + @@ -9,184 +9,184 @@ - - - - - Visitor - - + + + + + Visitor + + - - - + + + - - ~Visitor() : void + + ~Visitor() : void - - - + + + - - visit_A(A const& item) const = 0 : void + + visit_A(A const& item) const = 0 : void - - - + + + - - visit_B(B const& item) const = 0 : void + + visit_B(B const& item) const = 0 : void - - - - - Visitor1 - - + + + + + Visitor1 + + - - - + + + - - visit_A(A const& item) const : void + + visit_A(A const& item) const : void - - - + + + - - visit_B(B const& item) const : void + + visit_B(B const& item) const : void - - - - - Visitor2 - - + + + + + Visitor2 + + - - - + + + - - visit_A(A const& item) const : void + + visit_A(A const& item) const : void - - - + + + - - visit_B(B const& item) const : void + + visit_B(B const& item) const : void - - - - - Visitor3 - - + + + + + Visitor3 + + - - - + + + - - visit_A(A const& item) const : void + + visit_A(A const& item) const : void - - - + + + - - visit_B(B const& item) const : void + + visit_B(B const& item) const : void - - - - - Item - - + + + + + Item + + - - - + + + - - ~Item() : void + + ~Item() : void - - - + + + - - accept(Visitor const& visitor) const = 0 : void + + accept(Visitor const& visitor) const = 0 : void - - - - - A - - + + + + + A + + - - - + + + - - accept(Visitor const& visitor) const : void + + accept(Visitor const& visitor) const : void - - - - - B - - + + + + + B + + - - - + + + - - accept(Visitor const& visitor) const : void + + accept(Visitor const& visitor) const : void - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/test_cases/t00022_class.svg b/docs/test_cases/t00022_class.svg index 1a06084e..af977a8d 100644 --- a/docs/test_cases/t00022_class.svg +++ b/docs/test_cases/t00022_class.svg @@ -1,6 +1,6 @@ - + - + @@ -9,82 +9,82 @@ - - - - - A - - + + + + + A + + - - - + + + - - template_method() : void + + template_method() : void - - - + + + - - method1() = 0 : void + + method1() = 0 : void - - - + + + - - method2() = 0 : void + + method2() = 0 : void - - - - - A1 - - + + + + + A1 + + - - - + + + - - method1() : void + + method1() : void - - - + + + - - method2() : void + + method2() : void - - - - - A2 - - + + + + + A2 + + - - - + + + - - method1() : void + + method1() : void - - - + + + - - method2() : void + + method2() : void - - - - + + + + diff --git a/docs/test_cases/t00023_class.svg b/docs/test_cases/t00023_class.svg index d4142696..587ffded 100644 --- a/docs/test_cases/t00023_class.svg +++ b/docs/test_cases/t00023_class.svg @@ -1,6 +1,6 @@ - + - + @@ -9,113 +9,113 @@ - - - - - Strategy - - + + + + + Strategy + + - - - + + + - - ~Strategy() : void + + ~Strategy() : void - - - + + + - - algorithm() = 0 : void + + algorithm() = 0 : void - - - - - StrategyA - - + + + + + StrategyA + + - - - + + + - - algorithm() : void + + algorithm() : void - - - - - StrategyB - - + + + + + StrategyB + + - - - + + + - - algorithm() : void + + algorithm() : void - - - - - StrategyC - - + + + + + StrategyC + + - - - + + + - - algorithm() : void + + algorithm() : void - - - - - Context - + + + + + Context + - - - + + + - - m_strategy : std::unique_ptr<Strategy> + + m_strategy : std::unique_ptr<Strategy> - - - - + + + + - - Context(std::unique_ptr<Strategy> strategy) : void + + Context(std::unique_ptr<Strategy> strategy) : void - - - + + + - - apply() : void + + apply() : void - - - - - - - - - - - - m_strategy + + + + + + + + + + + + m_strategy diff --git a/docs/test_cases/t00024_class.svg b/docs/test_cases/t00024_class.svg index 9832c5da..7908d9c8 100644 --- a/docs/test_cases/t00024_class.svg +++ b/docs/test_cases/t00024_class.svg @@ -1,6 +1,6 @@ - + - + @@ -9,126 +9,126 @@ - - - - - Target - - + + + + + Target + + - - - + + + - - ~Target() : void + + ~Target() : void - - - + + + - - m1() = 0 : void + + m1() = 0 : void - - - + + + - - m2() = 0 : void + + m2() = 0 : void - - - - - Target1 - - + + + + + Target1 + + - - - + + + - - m1() : void + + m1() : void - - - + + + - - m2() : void + + m2() : void - - - - - Target2 - - + + + + + Target2 + + - - - + + + - - m1() : void + + m1() : void - - - + + + - - m2() : void + + m2() : void - - - - - Proxy - + + + + + Proxy + - - - + + + - - m_target : std::shared_ptr<Target> + + m_target : std::shared_ptr<Target> - - - - + + + + - - Proxy(std::shared_ptr<Target> target) : void + + Proxy(std::shared_ptr<Target> target) : void - - - + + + - - m1() : void + + m1() : void - - - + + + - - m2() : void + + m2() : void - - - - - - - - - - m_target - - + + + + + + + + + + m_target + + diff --git a/docs/test_cases/t00025_class.svg b/docs/test_cases/t00025_class.svg index be5da38e..d9b4b860 100644 --- a/docs/test_cases/t00025_class.svg +++ b/docs/test_cases/t00025_class.svg @@ -1,6 +1,6 @@ - + - + @@ -9,141 +9,141 @@ - - - - - Target1 - - + + + + + Target1 + + - - - + + + - - m1() : void + + m1() : void - - - + + + - - m2() : void + + m2() : void - - - - - Target2 - - + + + + + Target2 + + - - - + + + - - m1() : void + + m1() : void - - - + + + - - m2() : void + + m2() : void - - - - - Proxy - - T - + + + + + Proxy + + T + - - - + + + - - m_target : std::shared_ptr<T> + + m_target : std::shared_ptr<T> - - - - + + + + - - Proxy(std::shared_ptr<T> target) : void + + Proxy(std::shared_ptr<T> target) : void - - - + + + - - m1() : void + + m1() : void - - - + + + - - m2() : void + + m2() : void - - - - Proxy - - Target1 - - - - - - Proxy - - Target2 - - - - - - - ProxyHolder - + + + + Proxy + + Target1 + + + + + + Proxy + + Target2 + + + + + + + ProxyHolder + - - - + + + - - proxy1 : Proxy<Target1> + + proxy1 : Proxy<Target1> - - - + + + - - proxy2 : Proxy<Target2> + + proxy2 : Proxy<Target2> - - - - - - - - - - - - - proxy1 - - - - proxy2 + + + + + + + + + + + + + proxy1 + + + + proxy2 diff --git a/docs/test_cases/t00026_class.svg b/docs/test_cases/t00026_class.svg index 49d6ea6b..276de4fc 100644 --- a/docs/test_cases/t00026_class.svg +++ b/docs/test_cases/t00026_class.svg @@ -1,6 +1,6 @@ - + - + @@ -9,177 +9,177 @@ - - - - - Memento - - T - + + + + + Memento + + T + - - - + + + - - m_value : T + + m_value : T - - - - + + + + - - Memento(T&& v) : void + + Memento(T&& v) : void - - - + + + - - value() const : T + + value() const : T - - - - - Originator - - T - + + + + + Originator + + T + - - - + + + - - m_value : T + + m_value : T - - - - + + + + - - Originator(T&& v) : void + + Originator(T&& v) : void - - - + + + - - memoize_value() const : Memento<T> + + memoize_value() const : Memento<T> - - - + + + - - load(Memento<T> const& m) : void + + load(Memento<T> const& m) : void - - - + + + - - print() const : void + + print() const : void - - - + + + - - set(T&& v) : void + + set(T&& v) : void - - - - - Caretaker - - T - + + + + + Caretaker + + T + - - - + + + - - m_mementos : std::unordered_map<std::string,Memento<T>> + + m_mementos : std::unordered_map<std::string,Memento<T>> - - - - + + + + - - state(std::string const& n) : Memento<T>& + + state(std::string const& n) : Memento<T>& - - - + + + - - set_state(std::string const& s, Memento<T>&& m) : void + + set_state(std::string const& s, Memento<T>&& m) : void - - - - Caretaker - - std::string - - - - - - Originator - - std::string - - - - - - - StringMemento - + + + + Caretaker + + std::string + + + + + + Originator + + std::string + + + + + + + StringMemento + - - - + + + - - caretaker : Caretaker<std::string> + + caretaker : Caretaker<std::string> - - - + + + - - originator : Originator<std::string> + + originator : Originator<std::string> - - - - - - - - - m_mementos - - - - - - - - caretaker - - - - originator + + + + + + + + + m_mementos + + + + + + + + caretaker + + + + originator diff --git a/docs/test_cases/t00027_class.svg b/docs/test_cases/t00027_class.svg index dfd3e66a..d12453a9 100644 --- a/docs/test_cases/t00027_class.svg +++ b/docs/test_cases/t00027_class.svg @@ -1,6 +1,6 @@ - + - + @@ -9,210 +9,210 @@ - - - - - Shape - - + + + + + Shape + + - - - + + + - - display() = 0 : void + + display() = 0 : void - - - + + + - - ~Shape() : void + + ~Shape() : void - - - - - Line - - T<> - - + + + + + Line + + T<> + + - - - + + + - - display() : void + + display() : void - - - - - Text - - T<> - - + + + + + Text + + T<> + + - - - + + + - - display() : void + + display() : void - - - - - ShapeDecorator - - + + + + + ShapeDecorator + + - - - + + + - - display() = 0 : void + + display() = 0 : void - - - - - Color - - T - - + + + + + Color + + T + + - - - + + + - - display() : void + + display() : void - - - - - Weight - - T - - + + + + + Weight + + T + + - - - + + + - - display() : void + + display() : void - - - - Line - - Color,Weight - - - - - - Line - - Color - - - - - - Text - - Color,Weight - - - - - - Text - - Color - - - - - - - Window - + + + + Line + + Color,Weight + + + + + + Line + + Color + + + + + + Text + + Color,Weight + + + + + + Text + + Color + + + + + + + Window + - - - + + + - - border : Line<Color,Weight> + + border : Line<Color,Weight> - - - + + + - - divider : Line<Color> + + divider : Line<Color> - - - + + + - - title : Text<Color,Weight> + + title : Text<Color,Weight> - - - + + + - - description : Text<Color> + + description : Text<Color> - - - - - - - - - - - - - - - - - - - - - border - - - - divider - - - - title - - - - description + + + + + + + + + + + + + + + + + + + + + border + + + + divider + + + + title + + + + description diff --git a/docs/test_cases/t00028_class.svg b/docs/test_cases/t00028_class.svg index 975d6831..49fdf03f 100644 --- a/docs/test_cases/t00028_class.svg +++ b/docs/test_cases/t00028_class.svg @@ -1,6 +1,6 @@ - + - + @@ -9,212 +9,212 @@ - - - - - A - - + + + + + A + + - - - A class note. - - - A class note. - - - - - B - - + + + A class note. + + + A class note. + + + + + B + + - - - B class note. - - - B class note. - - - - - C - - + + + B class note. + + + B class note. + + + + + C + + - - - C class note. - - - C class note. - - - - - D - - + + + C class note. + + + C class note. + + + + + D + + - - - D - class - note. - - - D - class - note. - - - - - E - - T - + + + D + class + note. + + + D + class + note. + + + + + E + + T + - - - + + + - - param : T + + param : T - - - - E template class note. - - - - - G - - + + + + E template class note. + + + + + G + + - - - - - F - - one - two - three - + + + + + F + + one + two + three + - - - F enum note. - - - F enum note. - - - - E - - int - - - - - - - R - + + + F enum note. + + + F enum note. + + + + E + + int + + + + + + + R + - - - + + + - - aaa : A + + aaa : A - - - + + + - - bbb : B* + + bbb : B* - - - + + + - - ccc : C& + + ccc : C& - - - + + + - - ddd : std::vector<std::shared_ptr<D>> + + ddd : std::vector<std::shared_ptr<D>> - - - + + + - - eee : E<int> + + eee : E<int> - - - + + + - - ggg : G** + + ggg : G** - - - - + + + + - - R(C& c) : void + + R(C& c) : void - - - R class note. - - - R class note. - - - - - - - - - - - ccc - - - - aaa - - - - bbb - - - - ddd - - - - eee - - - - ggg + + + R class note. + + + R class note. + + + + + + + + + + + ccc + + + + aaa + + + + bbb + + + + ddd + + + + eee + + + + ggg diff --git a/docs/test_cases/t00029_class.svg b/docs/test_cases/t00029_class.svg index 7a204743..45d9fda9 100644 --- a/docs/test_cases/t00029_class.svg +++ b/docs/test_cases/t00029_class.svg @@ -1,6 +1,6 @@ - + - + @@ -9,110 +9,110 @@ - - - - - A - - + + + + + A + + - - - - - C - - T - + + + + + C + + T + - - - + + + - - param : T + + param : T - - - - - - E - - one - two - three - + + + + + + E + + one + two + three + - - - - - G1 - - + + + + + G1 + + - - - - - G2 - - + + + + + G2 + + - - - - - G3 - - + + + + + G3 + + - - - - - G4 - - + + + + + G4 + + - - - - - R - + + + + + R + - - - + + + - - g1 : G1 + + g1 : G1 - - - + + + - - g3 : G3& + + g3 : G3& - - - + + + - - g4 : std::shared_ptr<G4> + + g4 : std::shared_ptr<G4> - - - - - g1 - - - - g4 + + + + + g1 + + + + g4 diff --git a/docs/test_cases/t00030_class.svg b/docs/test_cases/t00030_class.svg index 7536a536..69285c9a 100644 --- a/docs/test_cases/t00030_class.svg +++ b/docs/test_cases/t00030_class.svg @@ -1,6 +1,6 @@ - + - + @@ -9,94 +9,94 @@ - - - - - A - - + + + + + A + + - - - - - B - - + + + + + B + + - - - - - C - - + + + + + C + + - - - - - D - - + + + + + D + + - - - - - R - + + + + + R + - - - + + + - - aaa : A + + aaa : A - - - + + + - - bbb : std::vector<B> + + bbb : std::vector<B> - - - + + + - - ccc : std::vector<C> + + ccc : std::vector<C> - - - + + + - - ddd : D + + ddd : D - - - - - aaa - - - - bbb - 0..1 - 1..* - - - - ccc - 0..1 - 1..5 - - - - ddd - 1 + + + + + aaa + + + + bbb + 0..1 + 1..* + + + + ccc + 0..1 + 1..5 + + + + ddd + 1 diff --git a/docs/test_cases/t00031_class.svg b/docs/test_cases/t00031_class.svg index 0ca3a790..6cd54b0d 100644 --- a/docs/test_cases/t00031_class.svg +++ b/docs/test_cases/t00031_class.svg @@ -1,128 +1,129 @@ - + - + - + - + - - - - - - A - - + + + + + + A + + - - - - - B - - one - two - three - + + + + + B + + one + two + three + - - - - - C - - T - + + + + + + C + + T + - - - + + + - - ttt : T + + ttt : T - - - - - - D - - + + + + + + D + + - - - - C - - int - - - - - - - R - + + + + C + + int + + + + + + + R + - - - + + + - - aaa : A* + + aaa : A* - - - + + + - - bbb : std::vector<B> + + bbb : std::vector<B> - - - + + + - - ccc : C<int> + + ccc : C<int> - - - + + + - - ddd : D* + + ddd : D* - - - - - - - aaa - - - - bbb - - - - ccc - - - - ddd + + + + + + + aaa + + + + bbb + + + + ccc + + + + ddd diff --git a/docs/test_cases/t00032_class.svg b/docs/test_cases/t00032_class.svg index c274a8e8..6bc0c1dc 100644 --- a/docs/test_cases/t00032_class.svg +++ b/docs/test_cases/t00032_class.svg @@ -1,6 +1,6 @@ - + - + @@ -9,130 +9,130 @@ - - - - - Base - - + + + + + Base + + - - - - - TBase - - + + + + + TBase + + - - - - - A - - + + + + + A + + - - - + + + - - operator()() : void + + operator()() : void - - - - - B - - + + + + + B + + - - - + + + - - operator()() : void + + operator()() : void - - - - - C - - + + + + + C + + - - - + + + - - operator()() : void + + operator()() : void - - - - - Overload - - T,L,Ts... - + + + + + Overload + + T,L,Ts... + - - - + + + - - counter : L + + counter : L - - - - - Overload - - TBase,int,A,B,C - - - - - - - R - + + + + + Overload + + TBase,int,A,B,C + + + + + + + R + - - - + + + - - overload : Overload<TBase,int,A,B,C> + + overload : Overload<TBase,int,A,B,C> - - - - - - - - - - - - - - - - - - - - - - - - - overload + + + + + + + + + + + + + + + + + + + + + + + + + overload diff --git a/docs/test_cases/t00033_class.svg b/docs/test_cases/t00033_class.svg index aa85a589..fdec220e 100644 --- a/docs/test_cases/t00033_class.svg +++ b/docs/test_cases/t00033_class.svg @@ -1,6 +1,6 @@ - + - + @@ -9,126 +9,126 @@ - - - - - A - - T - + + + + + A + + T + - - - + + + - - aaa : T + + aaa : T - - - - - - B - - T - + + + + + + B + + T + - - - + + + - - bbb : T + + bbb : T - - - - - - C - - T - + + + + + + C + + T + - - - + + + - - ccc : T + + ccc : T - - - - - - D - + + + + + + D + - - - + + + - - ddd : int + + ddd : int - - - - - C - - D - - - - - - B - - std::unique_ptr<C<D>> - - - - - - A - - B<std::unique_ptr<C<D>>> - - - - - - - R - + + + + + C + + D + + + + + + B + + std::unique_ptr<C<D>> + + + + + + A + + B<std::unique_ptr<C<D>>> + + + + + + + R + - - - + + + - - abc : A<B<std::unique_ptr<C<D>>>> + + abc : A<B<std::unique_ptr<C<D>>>> - - - - - - - - - - - - - - - - - abc + + + + + + + + + + + + + + + + + abc diff --git a/docs/test_cases/t00034_class.svg b/docs/test_cases/t00034_class.svg index cb6ee1d5..4b1b715b 100644 --- a/docs/test_cases/t00034_class.svg +++ b/docs/test_cases/t00034_class.svg @@ -1,6 +1,6 @@ - + - + @@ -9,107 +9,107 @@ - - - - - Void - - + + + + + Void + + - - - + + + - - operator==(Void const& ) const : bool + + operator==(Void const& ) const : bool - - - + + + - - operator!=(Void const& ) const : bool + + operator!=(Void const& ) const : bool - - - - - lift_void - - T - - + + + + + lift_void + + T + + - - - - - lift_void - - void - - + + + + + lift_void + + void + + - - - - - drop_void - - T - - + + + + + drop_void + + T + + - - - - - drop_void - - Void - - + + + + + drop_void + + Void + + - - - - - A - - + + + + + A + + - - - - - R - + + + + + R + - - - + + + - - la : lift_void_t<A>* + + la : lift_void_t<A>* - - - + + + - - lv : lift_void_t<void>* + + lv : lift_void_t<void>* - - - - - - - - - - - la + + + + + + + + + + + la diff --git a/docs/test_cases/t00035_class.svg b/docs/test_cases/t00035_class.svg index 37f947be..40e78f2b 100644 --- a/docs/test_cases/t00035_class.svg +++ b/docs/test_cases/t00035_class.svg @@ -1,6 +1,6 @@ - + - + @@ -9,45 +9,45 @@ - - - - - Top - - + + + + + Top + + - - - - - Left - - + + + + + Left + + - - - - - Center - - + + + + + Center + + - - - - - Bottom - - + + + + + Bottom + + - - - - - Right - - + + + + + Right + + diff --git a/docs/test_cases/t00036_class.svg b/docs/test_cases/t00036_class.svg index 9203ad25..61a1357f 100644 --- a/docs/test_cases/t00036_class.svg +++ b/docs/test_cases/t00036_class.svg @@ -1,6 +1,6 @@ - + - + @@ -9,84 +9,84 @@ - - - ns1 - - - ns11 - - - ns111 - - - ns2 - - - ns22 - - - - - E - - blue - yellow - + + + ns1 + + + ns11 + + + ns111 + + + ns2 + + + ns22 + + + + + E + + blue + yellow + - - - - - A - - T - + + + + + A + + T + - - - + + + - - a : T + + a : T - - - - - A - - int - - - - - - - B - + + + + + A + + int + + + + + + + B + - - - + + + - - a_int : A<int> + + a_int : A<int> - - - - - - C - - + + + + + + C + + - - - - - - a_int + + + + + + a_int diff --git a/docs/test_cases/t00037_class.svg b/docs/test_cases/t00037_class.svg index 56bd41a2..1d4b5d57 100644 --- a/docs/test_cases/t00037_class.svg +++ b/docs/test_cases/t00037_class.svg @@ -1,6 +1,6 @@ - + - + @@ -9,86 +9,86 @@ - - - - - ST - + + + + + ST + - - - + + + - - dimensions : «anonymous» + + dimensions : «anonymous» - - - - - - <<anonymous>> - + + + + + + <<anonymous>> + - - - + + + - - t : double + + t : double - - - + + + - - x : double + + x : double - - - + + + - - y : double + + y : double - - - + + + - - z : double + + z : double - - - - - - A - + + + + + + A + - - - + + + - - st : ST + + st : ST - - - - + + + + - - A() : void + + A() : void - - - - - - - - st + + + + + + + + st diff --git a/docs/test_cases/t00038_class.svg b/docs/test_cases/t00038_class.svg index 5cf638c0..b085d34f 100644 --- a/docs/test_cases/t00038_class.svg +++ b/docs/test_cases/t00038_class.svg @@ -1,6 +1,6 @@ - + - + @@ -9,150 +9,150 @@ - - - - - thirdparty::ns1::color_t - - red - green - blue - + + + + + thirdparty::ns1::color_t + + red + green + blue + - - - - - thirdparty::ns1::E - - + + + + + thirdparty::ns1::E + + - - - - - property_t - - property_a - property_b - property_c - + + + + + property_t + + property_a + property_b + property_c + - - - - - A - - + + + + + A + + - - - - - B - - + + + + + B + + - - - - - C - - + + + + + C + + - - - - - key_t - + + + + + key_t + - - - + + + - - key : std::string + + key : std::string - - - - - - map - - T - - + + + + + + map + + T + + - - - - - map - - std::integral_constant<thirdparty::ns1::color_t,thirdparty::ns1::color_t::red> - - + + + + + map + + std::integral_constant<thirdparty::ns1::color_t,thirdparty::ns1::color_t::red> + + - - - - - map - - std::integral_constant<property_t,property_t::property_a> - - + + + + + map + + std::integral_constant<property_t,property_t::property_a> + + - - - - - map - - std::vector<std::integral_constant<property_t,property_t::property_b>> - - + + + + + map + + std::vector<std::integral_constant<property_t,property_t::property_b>> + + - - - - - map - - std::map<key_t,std::vector<std::integral_constant<property_t,property_t::property_c>>> - - + + + + + map + + std::map<key_t,std::vector<std::integral_constant<property_t,property_t::property_c>>> + + - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/test_cases/t00039_class.svg b/docs/test_cases/t00039_class.svg index 3870122d..c0cd6fdf 100644 --- a/docs/test_cases/t00039_class.svg +++ b/docs/test_cases/t00039_class.svg @@ -1,6 +1,6 @@ - + - + @@ -9,186 +9,186 @@ - - - - - C - - + + + + + C + + - - - - - D - - + + + + + D + + - - - - - E - - + + + + + E + + - - - - - CD - - + + + + + CD + + - - - - - DE - - + + + + + DE + + - - - - - CDE - - + + + + + CDE + + - - - - - A - - + + + + + A + + - - - - - AA - - + + + + + AA + + - - - - - AAA - + + + + + AAA + - - - + + + - - b : B* + + b : B* - - - - - - ns2::AAAA - - + + + + + + ns2::AAAA + + - - - - - ns3::F - - T - + + + + + ns3::F + + T + - - - + + + - - t : T* + + t : T* - - - - - - ns3::FF - - T,M - + + + + + + ns3::FF + + T,M + - - - + + + - - m : M* + + m : M* - - - - - - ns3::FE - - T,M - + + + + + + ns3::FE + + T,M + - - - + + + - - m : M* + + m : M* - - - - - - ns3::FFF - - T,M,N - + + + + + + ns3::FFF + + T,M,N + - - - + + + - - n : N* + + n : N* - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/test_cases/t00040_class.svg b/docs/test_cases/t00040_class.svg index e1cf1667..3c34899b 100644 --- a/docs/test_cases/t00040_class.svg +++ b/docs/test_cases/t00040_class.svg @@ -1,6 +1,6 @@ - + - + @@ -9,76 +9,76 @@ - - - - - A - + + + + + A + - - - + + + - - ii_ : int + + ii_ : int - - - - + + + + - - get_a() : int + + get_a() : int - - - - - AA - - + + + + + AA + + - - - - - AAA - + + + + + AAA + - - - + + + - - b : B* + + b : B* - - - - + + + + - - get_aaa() : int + + get_aaa() : int - - - - - R - - + + + + + R + + - - - + + + - - foo(A* a) : void + + foo(A* a) : void - - - - + + + + diff --git a/docs/test_cases/t00041_class.svg b/docs/test_cases/t00041_class.svg index edfc9f26..0f37b802 100644 --- a/docs/test_cases/t00041_class.svg +++ b/docs/test_cases/t00041_class.svg @@ -1,6 +1,6 @@ - + - + @@ -9,116 +9,116 @@ - - - - - R - - + + + + + R + + - - - - - D - + + + + + D + - - - + + + - - rr : RR* + + rr : RR* - - - - - - E - - + + + + + + E + + - - - - - F - - + + + + + F + + - - - - - RR - + + + + + RR + - - - + + + - - e : E* + + e : E* - - - + + + - - f : F* + + f : F* - - - - - - RRR - - + + + + + + RRR + + - - - - - ns1::N - - + + + + + ns1::N + + - - - - - ns1::NN - - + + + + + ns1::NN + + - - - - - ns1::NM - - + + + + + ns1::NM + + - - - - rr - - - +e - - - +f - - - - - - - - + + + + rr + + + +e + + + +f + + + + + + + + diff --git a/docs/test_cases/t00042_class.svg b/docs/test_cases/t00042_class.svg index e395a310..39698c7b 100644 --- a/docs/test_cases/t00042_class.svg +++ b/docs/test_cases/t00042_class.svg @@ -1,6 +1,6 @@ - + - + @@ -9,46 +9,46 @@ - - - - - A - - T - + + + + + A + + T + - - - + + + - - a : T + + a : T - - - - - - B - - T,K - + + + + + + B + + T,K + - - - + + + - - b : T + + b : T - - - + + + - - bb : K + + bb : K - + diff --git a/docs/test_cases/t00043_class.svg b/docs/test_cases/t00043_class.svg index 93d02df6..38ace0f4 100644 --- a/docs/test_cases/t00043_class.svg +++ b/docs/test_cases/t00043_class.svg @@ -1,6 +1,6 @@ - + - + @@ -9,189 +9,189 @@ - - - dependants - - - dependencies - - - - - A - - + + + dependants + + + dependencies + + + + + A + + - - - - - B - - + + + + + B + + - - - + + + - - b(dependants::A* a) : void + + b(dependants::A* a) : void - - - - - BB - - + + + + + BB + + - - - + + + - - bb(dependants::A* a) : void + + bb(dependants::A* a) : void - - - - - C - - + + + + + C + + - - - + + + - - c(dependants::B* b) : void + + c(dependants::B* b) : void - - - - - D - - + + + + + D + + - - - + + + - - d(dependants::C* c) : void + + d(dependants::C* c) : void - - - + + + - - dd(dependants::BB* bb) : void + + dd(dependants::BB* bb) : void - - - - - E - - + + + + + E + + - - - + + + - - e(dependants::D* d) : void + + e(dependants::D* d) : void - - - - - G - - + + + + + G + + - - - - - GG - - + + + + + GG + + - - - - - H - - + + + + + H + + - - - + + + - - h(dependencies::G* g) : void + + h(dependencies::G* g) : void - - - + + + - - hh(dependencies::GG* gg) : void + + hh(dependencies::GG* gg) : void - - - - - I - - + + + + + I + + - - - + + + - - i(dependencies::H* h) : void + + i(dependencies::H* h) : void - - - - - J - - + + + + + J + + - - - + + + - - i(dependencies::I* i) : void + + i(dependencies::I* i) : void - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + diff --git a/docs/test_cases/t20001_sequence.svg b/docs/test_cases/t20001_sequence.svg index 52e081b1..470e2953 100644 --- a/docs/test_cases/t20001_sequence.svg +++ b/docs/test_cases/t20001_sequence.svg @@ -1,4 +1,4 @@ - + @@ -9,56 +9,56 @@ - - - - - - - - - - tmain() - - tmain() - - B - - B - - A - - A - - - - - - - - wrap_add3() - - - add3() - - - - - add() - - - - - log_result() - - - - - log_result() - - - - - Main test function + + + + + + + + + + tmain() + + tmain() + + B + + B + + A + + A + + + + + + + + wrap_add3() + + + add3() + + + + + add() + + + + + log_result() + + + + + log_result() + + + + + Main test function diff --git a/docs/test_cases/t20002_sequence.svg b/docs/test_cases/t20002_sequence.svg index 5b9e5438..568a2b80 100644 --- a/docs/test_cases/t20002_sequence.svg +++ b/docs/test_cases/t20002_sequence.svg @@ -1,4 +1,4 @@ - + @@ -9,40 +9,40 @@ - - - - - - - - - m1() - - m1() - - m2() - - m2() - - m3() - - m3() - - m4() - - m4() - - - - - - m2() - - - m3() - - - m4() + + + + + + + + + m1() + + m1() + + m2() + + m2() + + m3() + + m3() + + m4() + + m4() + + + + + + m2() + + + m3() + + + m4() diff --git a/docs/test_cases/t30001_package.svg b/docs/test_cases/t30001_package.svg index bde86090..8d02b6a6 100644 --- a/docs/test_cases/t30001_package.svg +++ b/docs/test_cases/t30001_package.svg @@ -1,6 +1,6 @@ - + - + @@ -9,67 +9,67 @@ - - - - A + + + + A - - - - AA + + + + AA - - - - B + + + + B - - - - AA + + + + AA - - - - AAA + + + + AAA - - - - BBB + + + + BBB - - - - BB + + + + BB - - - - AAA + + + + AAA - - - - BBB + + + + BBB - - - - BB + + + + BB - - - A AAA note... - - - This is namespace AA in namespace A - - - This is namespace AA in namespace B - - - + + + A AAA note... + + + This is namespace AA in namespace A + + + This is namespace AA in namespace B + + + diff --git a/docs/test_cases/t30002_package.svg b/docs/test_cases/t30002_package.svg index f47801fe..7a57a1ed 100644 --- a/docs/test_cases/t30002_package.svg +++ b/docs/test_cases/t30002_package.svg @@ -1,6 +1,6 @@ - + - + @@ -9,121 +9,121 @@ - - - - A + + + + A - - - - AA + + + + AA - - - - B + + + + B - - - - BB + + + + BB - - - - A1 + + + + A1 - - - - A2 + + + + A2 - - - - A3 + + + + A3 - - - - A4 + + + + A4 - - - - A5 + + + + A5 - - - - A6 + + + + A6 - - - - A7 + + + + A7 - - - - A8 + + + + A8 - - - - A9 + + + + A9 - - - - A10 + + + + A10 - - - - A11 + + + + A11 - - - - A12 + + + + A12 - - - - A13 + + + + A13 - - - - BBB + + + + BBB - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/test_cases/t30003_package.svg b/docs/test_cases/t30003_package.svg index a9447116..51e529bb 100644 --- a/docs/test_cases/t30003_package.svg +++ b/docs/test_cases/t30003_package.svg @@ -1,6 +1,6 @@ - + - + @@ -9,39 +9,39 @@ - - - - ns1 + + + + ns1 - - - - ns3 - «deprecated» + + + + ns3 + «deprecated» - - - - ns1 + + + + ns1 - - - - ns2_v1_0_0 + + + + ns2_v1_0_0 - - - - ns2_v0_9_0 - «deprecated» + + + + ns2_v0_9_0 + «deprecated» - - - - ns2 + + + + ns2 - - + + diff --git a/docs/test_cases/t30004_package.svg b/docs/test_cases/t30004_package.svg index df14f5d0..688eed23 100644 --- a/docs/test_cases/t30004_package.svg +++ b/docs/test_cases/t30004_package.svg @@ -1,6 +1,6 @@ - + - + @@ -9,50 +9,50 @@ - - - - A + + + + A - - - Package AAA. - - - Package BBB. - - - CCCC package note. - - - Another CCC note. - - - We skipped DDD. - - - - AAA + + + Package AAA. + + + Package BBB. + + + CCCC package note. + + + Another CCC note. + + + We skipped DDD. + + + + AAA - - - - BBB + + + + BBB - - - - CCC + + + + CCC - - - - EEE + + + + EEE - - - - - + + + + + diff --git a/docs/test_cases/t30005_package.svg b/docs/test_cases/t30005_package.svg index abbe2984..bb8858ea 100644 --- a/docs/test_cases/t30005_package.svg +++ b/docs/test_cases/t30005_package.svg @@ -1,6 +1,6 @@ - + - + @@ -9,54 +9,54 @@ - - - - A + + + + A - - - - AA + + + + AA - - - - B + + + + B - - - - BB + + + + BB - - - - C + + + + C - - - - CC + + + + CC - - - - AAA + + + + AAA - - - - BBB + + + + BBB - - - - CCC + + + + CCC - - - - + + + + diff --git a/docs/test_cases/t30006_package.svg b/docs/test_cases/t30006_package.svg index 64d113fb..7b80885e 100644 --- a/docs/test_cases/t30006_package.svg +++ b/docs/test_cases/t30006_package.svg @@ -1,6 +1,6 @@ - + - + @@ -9,32 +9,32 @@ - - - - B + + + + B - - - - A + + + + A - - - - C + + + + C - - - Top A note. - - - Bottom A note. - - - - - - + + + Top A note. + + + Bottom A note. + + + + + + diff --git a/docs/test_cases/t30007_package.svg b/docs/test_cases/t30007_package.svg index db353eb8..2c480c72 100644 --- a/docs/test_cases/t30007_package.svg +++ b/docs/test_cases/t30007_package.svg @@ -1,6 +1,6 @@ - + - + @@ -9,37 +9,37 @@ - - - - A + + + + A - - - - B + + + + B - - - - AA + + + + AA - - - - C + + + + C - - - Compare layout with t30006. - - - Bottom A note. - - - - - - + + + Compare layout with t30006. + + + Bottom A note. + + + + + + diff --git a/docs/test_cases/t30008_package.svg b/docs/test_cases/t30008_package.svg index 13ac9b90..4008f8d9 100644 --- a/docs/test_cases/t30008_package.svg +++ b/docs/test_cases/t30008_package.svg @@ -1,6 +1,6 @@ - + - + @@ -9,53 +9,53 @@ - - - - dependants + + + + dependants - - - - dependencies + + + + dependencies - - - - A + + + + A - - - - B + + + + B - - - - C + + + + C - - - - D + + + + D - - - - E + + + + E - - - - F + + + + F - - - - - - - - + + + + + + + + diff --git a/docs/test_cases/t40001_include.svg b/docs/test_cases/t40001_include.svg index 3d204456..63c0a7ba 100644 --- a/docs/test_cases/t40001_include.svg +++ b/docs/test_cases/t40001_include.svg @@ -1,6 +1,6 @@ - + - + @@ -9,40 +9,40 @@ - - - src - - - include - - - lib1 - - - - t40001.cc + + + src + + + include + + + lib1 + + + + t40001.cc - - - - t40001_include1.h + + + + t40001_include1.h - - - - lib1.h + + + + lib1.h - - - This is a lib1 include dir - - - This is a t40001_include1.h include file - - - - - + + + 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 d6c906c6..8b78c259 100644 --- a/docs/test_cases/t40002_include.svg +++ b/docs/test_cases/t40002_include.svg @@ -1,6 +1,6 @@ - + - + @@ -9,58 +9,58 @@ - - - src - - - lib1 - - - lib2 - - - include - - - lib1 - - - lib2 - - - - t40002.cc + + + src + + + lib1 + + + lib2 + + + include + + + lib1 + + + lib2 + + + + t40002.cc - - - - lib1.cc + + + + lib1.cc - - - - lib2.cc + + + + lib2.cc - - - - lib1.h + + + + lib1.h - - - - lib2.h + + + + lib2.h - - - - - - - - - - + + + + + + + + + + diff --git a/docs/test_cases/t40003.md b/docs/test_cases/t40003.md new file mode 100644 index 00000000..18d51585 --- /dev/null +++ b/docs/test_cases/t40003.md @@ -0,0 +1,28 @@ +# t40003 - Dependants and dependencies include diagram filter test +## Config +```yaml +compilation_database_dir: .. +output_directory: puml +diagrams: + t40003_include: + type: include + # Provide the files to parse in order to look + # for #include directives + glob: + - ../../tests/t40003/include/**/*.h + - ../../tests/t40003/src/**/*.cc + # Render the paths relative to this directory + relative_to: ../../tests/t40003 + include: + # Include only files belonging to these paths + dependants: + - ../../tests/t40003/include/dependants/t1.h + dependencies: + - ../../tests/t40003/src/dependencies/t2.cc + plantuml: + before: + - "' t40003 test include diagram" +``` +## Source code +## Generated UML diagrams +![t40003_include](./t40003_include.svg "Dependants and dependencies include diagram filter test") diff --git a/docs/test_cases/t40003_include.svg b/docs/test_cases/t40003_include.svg new file mode 100644 index 00000000..b268d072 --- /dev/null +++ b/docs/test_cases/t40003_include.svg @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + 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/docs/test_cases/t90000_class.svg b/docs/test_cases/t90000_class.svg index f0162233..64b6d962 100644 --- a/docs/test_cases/t90000_class.svg +++ b/docs/test_cases/t90000_class.svg @@ -1,4 +1,4 @@ - + @@ -9,40 +9,40 @@ - - - - Foo - - - int value - - - - - ArrayList - - - - - This is a very important class. - - - This is a - floating note - - - This note is connected - to several objects. - - - - Boo - - - - - - + + + + Foo + + + int value + + + + + ArrayList + + + + + This is a very important class. + + + This is a + floating note + + + This note is connected + to several objects. + + + + Boo + + + + + + diff --git a/tests/test_cases.yaml b/tests/test_cases.yaml index c4c2b7ae..a4332583 100644 --- a/tests/test_cases.yaml +++ b/tests/test_cases.yaml @@ -165,6 +165,9 @@ test_cases: - name: t40002 title: Cyclic include graph diagram test case description: + - name: t40003 + title: Dependants and dependencies include diagram filter test + description: Configuration diagrams: - name: t90000 title: Basic config test