Updated test cases documentation
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 62 KiB After Width: | Height: | Size: 67 KiB |
|
Before Width: | Height: | Size: 8.4 KiB After Width: | Height: | Size: 9.5 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 8.9 KiB After Width: | Height: | Size: 9.3 KiB |
|
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 39 KiB |
|
Before Width: | Height: | Size: 45 KiB After Width: | Height: | Size: 47 KiB |
|
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 33 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 25 KiB |
@@ -17,6 +17,36 @@ 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
|
||||
@@ -101,36 +131,6 @@ 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
|
||||

|
||||
|
||||
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 14 KiB |
@@ -22,25 +22,21 @@ diagrams:
|
||||
|
||||
```
|
||||
## Source code
|
||||
File t00019_layer2.h
|
||||
File t00019.cc
|
||||
```cpp
|
||||
#pragma once
|
||||
#include "t00019_base.h"
|
||||
#include "t00019_layer1.h"
|
||||
#include "t00019_layer2.h"
|
||||
#include "t00019_layer3.h"
|
||||
|
||||
#include <memory>
|
||||
|
||||
namespace clanguml {
|
||||
namespace t00019 {
|
||||
|
||||
template <typename LowerLayer> 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();
|
||||
}
|
||||
class A {
|
||||
public:
|
||||
std::unique_ptr<Layer1<Layer2<Layer3<Base>>>> layers;
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -98,26 +94,6 @@ template <typename LowerLayer> 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 <memory>
|
||||
|
||||
namespace clanguml {
|
||||
namespace t00019 {
|
||||
|
||||
class A {
|
||||
public:
|
||||
std::unique_ptr<Layer1<Layer2<Layer3<Base>>>> layers;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
```
|
||||
File t00019_layer3.h
|
||||
```cpp
|
||||
@@ -155,6 +131,30 @@ private:
|
||||
}
|
||||
}
|
||||
|
||||
```
|
||||
File t00019_layer2.h
|
||||
```cpp
|
||||
#pragma once
|
||||
|
||||
namespace clanguml {
|
||||
namespace t00019 {
|
||||
|
||||
template <typename LowerLayer> 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
|
||||

|
||||
|
||||
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 46 KiB |
|
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 40 KiB |
|
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 49 KiB |
|
Before Width: | Height: | Size: 9.8 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 38 KiB |
|
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 45 KiB |
|
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 43 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 26 KiB |
@@ -41,7 +41,7 @@ struct D {
|
||||
};
|
||||
|
||||
struct R {
|
||||
A<B<C<D>>> abc;
|
||||
A<B<std::unique_ptr<C<D>>>> abc;
|
||||
};
|
||||
|
||||
} // namespace t00033
|
||||
|
||||
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 25 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |