0.6.0
C++ to UML diagram generator based on Clang
Loading...
Searching...
No Matches
src
config
diagram_templates.cc
Go to the documentation of this file.
1
/**
2
* @file src/config/diagram_templates.cc
3
*
4
* Copyright (c) 2021-2025 Bartek Kryza <bkryza@gmail.com>
5
*
6
* Licensed under the Apache License, Version 2.0 (the "License");
7
* you may not use this file except in compliance with the License.
8
* You may obtain a copy of the License at
9
*
10
* http://www.apache.org/licenses/LICENSE-2.0
11
*
12
* Unless required by applicable law or agreed to in writing, software
13
* distributed under the License is distributed on an "AS IS" BASIS,
14
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
* See the License for the specific language governing permissions and
16
* limitations under the License.
17
*/
18
19
#include "
diagram_templates.h
"
20
21
namespace
clanguml
{
22
namespace
config {
23
24
const
std::string &
get_predefined_diagram_templates
()
25
{
26
static
const
std::string predefined_diagram_templates =
27
R
"(# Predefined diagram templates
28
parents_hierarchy_tmpl:
29
description: Generate class parents inheritance diagram
30
type: class
31
template: |
32
{{ diagram_name }}:
33
type: class
34
{% if exists("glob") %}
35
glob: [{{ glob }}]
36
{% endif %}
37
{% if exists("using_namespace") %}
38
using_namespace: {{ using_namespace }}
39
{% endif %}
40
include:
41
parents: [{{ class_name }}]
42
namespaces: [{{ namespace_name }}]
43
relationships:
44
- inheritance
45
exclude:
46
access: [public, protected, private]
47
plantuml:
48
before:
49
- left to right direction
50
subclass_hierarchy_tmpl:
51
description: Generate class children inheritance diagram
52
type: class
53
template: |
54
{{ diagram_name }}:
55
type: class
56
{% if exists("glob") %}
57
glob: [{{ glob }}]
58
{% endif %}
59
{% if exists("using_namespace") %}
60
using_namespace: {{ using_namespace }}
61
{% endif %}
62
include:
63
parents: [{{ class_name }}]
64
namespaces: [{{ namespace_name }}]
65
relationships:
66
- inheritance
67
exclude:
68
access: [public, protected, private]
69
plantuml:
70
before:
71
- left to right direction
72
class_context_tmpl:
73
description: Generate class context diagram
74
type: class
75
template: |
76
"{{ diagram_name }}":
77
type: class
78
{% if exists("glob") %}
79
glob: [{{ glob }}]
80
{% endif %}
81
{% if exists("using_namespace") %}
82
using_namespace: {{ using_namespace }}
83
{% endif %}
84
include:
85
context: [{{ class_name }}]
86
namespaces: [{{ namespace_name }}]
87
)";
88
89
return
predefined_diagram_templates;
90
}
91
92
}
// namespace config
93
}
// namespace clanguml
Copyright © 2022-present
Bartek Kryza
Generated by
1.9.7