0.6.0
C++ to UML diagram generator based on Clang
Loading...
Searching...
No Matches
schema.h
Go to the documentation of this file.
1/**
2 * @file src/config/schema.h
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#pragma once
19
20#include <string>
21
22namespace clanguml::config {
23
24const std::string schema_str = R"(
25types:
26 map_t<K;V>: { $K: V }
27 string_list_t: [string]
28 comment_parser_t: !variant
29 - plain
30 - clang
31 diagram_type_t: !variant
32 - class
33 - sequence
34 - include
35 - package
36 generate_method_arguments_t: !variant
37 - full
38 - abbreviated
39 - none
40 generate_links_t:
41 link: !optional [string, map_t<string;string>]
42 tooltip: !optional [string, map_t<string;string>]
43 git_t:
44 branch: string
45 revision: [string, int]
46 commit: string
47 toplevel: string
48 layout_hint_key: !variant
49 - up
50 - left
51 - right
52 - down
53 - row
54 - column
55 - together
56 layout_hint_value: [string, [string]]
57 layout_hint_t: [map_t<layout_hint_key;layout_hint_value>]
58 layout_t: map_t<string;layout_hint_t>
59 package_type_t: !variant
60 - namespace
61 - directory
62 - module
63 member_order_t: !variant
64 - lexical
65 - as_is
66 regex_t:
67 r: string
68 regex_or_string_t: [string, regex_t]
69 glob_explicit_t:
70 include: !optional [regex_or_string_t]
71 exclude: !optional [regex_or_string_t]
72 regex_or_string_list_t: [regex_or_string_t]
73 glob_t: !optional [glob_explicit_t,[regex_or_string_t]]
74 element_types_filter_t: !variant
75 - class
76 - enum
77 - concept
78 - method
79 - function
80 - function_template
81 - lambda
82 relationship_filter_t: !variant
83 - extension
84 - inheritance
85 - composition
86 - aggregation
87 - containment
88 - ownership
89 - association
90 - instantiation
91 - friendship
92 - alias
93 - dependency
94 - constraint
95 - none
96 relationship_context_t: !variant
97 - extension
98 - inheritance
99 - composition
100 - aggregation
101 - containment
102 - ownership
103 - association
104 - instantiation
105 - friendship
106 - dependency
107 - constraint
108 access_filter_t: !variant
109 - public
110 - protected
111 - private
112 module_access_filter_t: !variant
113 - public
114 - private
115 method_type_filter_t: !variant
116 - constructor
117 - destructor
118 - assignment
119 - operator
120 - defaulted
121 - deleted
122 - static
123 callee_type_filter_t: !variant
124 - constructor
125 - assignment
126 - operator
127 - defaulted
128 - static
129 - method
130 - function
131 - function_template
132 - lambda
133 - cuda_kernel
134 - cuda_device
135 direction_t: !variant
136 - inward
137 - outward
138 - any
139 context_filter_match_t:
140 match:
141 radius: int
142 pattern: regex_or_string_t
143 direction: !optional direction_t
144 relationships: !optional [relationship_context_t]
145 context_filter_t:
146 - regex_or_string_t
147 - context_filter_match_t
148 element_typed_filter_t:
149 type: string
150 name: regex_or_string_t
151 element_filter_t:
152 - regex_or_string_t
153 - element_typed_filter_t
154 filter_t:
155 namespaces: !optional [regex_or_string_t]
156 modules: !optional [regex_or_string_t]
157 elements: !optional [element_filter_t]
158 element_types: !optional [element_types_filter_t]
159 relationships: !optional [relationship_filter_t]
160 access: !optional [access_filter_t]
161 module_access: !optional [module_access_filter_t]
162 subclasses: !optional [regex_or_string_t]
163 parents: !optional [regex_or_string_t]
164 specializations: !optional [regex_or_string_t]
165 dependants: !optional [regex_or_string_t]
166 dependencies: !optional [regex_or_string_t]
167 context: !optional [context_filter_t]
168 paths: !optional [string]
169 method_types: !optional [method_type_filter_t]
170 callee_types: !optional [callee_type_filter_t]
171 anyof: !optional filter_t
172 allof: !optional filter_t
173 function_location_t:
174 function: regex_or_string_t
175 marker_location_t:
176 marker: string
177 source_location_t:
178 - function_location_t
179 - marker_location_t
180 filter_mode_t: !variant
181 - basic
182 - advanced
183 notes_t: map_t<string;string_list_t>
184 class_diagram_t:
185 type: !variant [class]
186 #
187 # Common options
188 #
189 __parent_path: !optional string
190 user_data: !optional any
191 comment_parser: !optional comment_parser_t
192 debug_mode: !optional bool
193 filter_mode: !optional filter_mode_t
194 include_system_headers: !optional bool
195 exclude: !optional filter_t
196 generate_links: !optional generate_links_t
197 git: !optional git_t
198 glob: !optional glob_t
199 include: !optional filter_t
200 plantuml: !optional
201 before: !optional [string]
202 after: !optional [string]
203 cmd: !optional string
204 style: !optional map_t<string;string>
205 mermaid: !optional
206 before: !optional [string]
207 after: !optional [string]
208 cmd: !optional string
209 graphml: !optional
210 notes: !optional notes_t
211 relative_to: !optional string
212 using_namespace: !optional [string, [string]]
213 using_module: !optional string
214 generate_metadata: !optional bool
215 title: !optional string
216 #
217 # Class diagram specific options
218 #
219 generate_method_arguments: !optional generate_method_arguments_t
220 generate_packages: !optional bool
221 generate_concept_requirements: !optional bool
222 package_type: !optional package_type_t
223 generate_template_argument_dependencies: !optional bool
224 skip_redundant_dependencies: !optional bool
225 member_order: !optional member_order_t
226 group_methods: !optional bool
227 type_aliases: !optional map_t<string;string>
228 relationship_hints: !optional map_t<string;any>
229 include_relations_also_as_members: !optional bool
230 layout: !optional layout_t
231 sequence_diagram_t:
232 type: !variant [sequence]
233 #
234 # Common options
235 #
236 __parent_path: !optional string
237 user_data: !optional any
238 comment_parser: !optional comment_parser_t
239 debug_mode: !optional bool
240 exclude: !optional filter_t
241 generate_links: !optional generate_links_t
242 filter_mode: !optional filter_mode_t
243 include_system_headers: !optional bool
244 git: !optional git_t
245 glob: !optional glob_t
246 include: !optional filter_t
247 plantuml: !optional
248 before: !optional [string]
249 after: !optional [string]
250 cmd: !optional string
251 mermaid: !optional
252 before: !optional [string]
253 after: !optional [string]
254 cmd: !optional string
255 relative_to: !optional string
256 type_aliases: !optional map_t<string;string>
257 using_namespace: !optional [string, [string]]
258 generate_metadata: !optional bool
259 title: !optional string
260 #
261 # Sequence diagram specific options
262 #
263 generate_method_arguments: !optional generate_method_arguments_t
264 combine_free_functions_into_file_participants: !optional bool
265 inline_lambda_messages: !optional bool
266 generate_return_types: !optional bool
267 generate_condition_statements: !optional bool
268 generate_message_comments: !optional bool
269 fold_repeated_activities: !optional bool
270 message_comment_width: !optional int
271 participants_order: !optional [string]
272 start_from: !optional [source_location_t] # deprecated -> 'from'
273 from: !optional [source_location_t]
274 from_to: !optional [[source_location_t]]
275 to: !optional [source_location_t]
276 package_diagram_t:
277 type: !variant [package]
278 #
279 # Common options
280 #
281 user_data: !optional any
282 __parent_path: !optional string
283 comment_parser: !optional comment_parser_t
284 debug_mode: !optional bool
285 exclude: !optional filter_t
286 generate_links: !optional generate_links_t
287 git: !optional git_t
288 glob: !optional glob_t
289 filter_mode: !optional filter_mode_t
290 include_system_headers: !optional bool
291 include: !optional filter_t
292 plantuml: !optional
293 before: !optional [string]
294 after: !optional [string]
295 cmd: !optional string
296 mermaid: !optional
297 before: !optional [string]
298 after: !optional [string]
299 cmd: !optional string
300 graphml: !optional
301 notes: !optional notes_t
302 relative_to: !optional string
303 using_namespace: !optional [string, [string]]
304 using_module: !optional string
305 generate_metadata: !optional bool
306 title: !optional string
307 #
308 # Package diagram specific options
309 #
310 generate_packages: !optional bool
311 package_type: !optional package_type_t
312 layout: !optional layout_t
313 include_diagram_t:
314 type: !variant [include]
315 #
316 # Common options
317 #
318 __parent_path: !optional string
319 user_data: !optional any
320 comment_parser: !optional comment_parser_t
321 debug_mode: !optional bool
322 filter_mode: !optional filter_mode_t
323 include_system_headers: !optional bool
324 exclude: !optional filter_t
325 generate_links: !optional generate_links_t
326 generate_packages: !optional bool
327 git: !optional git_t
328 glob: !optional glob_t
329 include: !optional filter_t
330 plantuml: !optional
331 before: !optional [string]
332 after: !optional [string]
333 cmd: !optional string
334 mermaid: !optional
335 before: !optional [string]
336 after: !optional [string]
337 cmd: !optional string
338 graphml: !optional
339 notes: !optional notes_t
340 relative_to: !optional string
341 using_namespace: !optional [string, [string]]
342 generate_metadata: !optional bool
343 title: !optional string
344 #
345 # Include diagram specific options
346 #
347 generate_system_headers: !optional bool
348 diagram_t:
349 - class_diagram_t
350 - sequence_diagram_t
351 - package_diagram_t
352 - include_diagram_t
353 diagram_template_t:
354 description: !optional string
355 type: diagram_type_t
356 template: string
357 diagram_templates_t: map_t<string;diagram_template_t>
358root:
359 #
360 # Root options
361 #
362 compilation_database_dir: !optional string
363 output_directory: !optional string
364 query_driver: !optional string
365 add_compile_flags: !optional [string]
366 remove_compile_flags: !optional [regex_or_string_t]
367 allow_empty_diagrams: !optional bool
368 diagram_templates: !optional diagram_templates_t
369 diagrams: !optional map_t<string;diagram_t>
370 user_data: !optional any
371 #
372 # Common options
373 #
374 __parent_path: !optional string
375 comment_parser: !optional comment_parser_t
376 debug_mode: !optional bool
377 exclude: !optional filter_t
378 generate_links: !optional generate_links_t
379 git: !optional git_t
380 glob: !optional glob_t
381 include: !optional filter_t
382 plantuml: !optional
383 before: !optional [string]
384 after: !optional [string]
385 cmd: !optional string
386 mermaid: !optional
387 before: !optional [string]
388 after: !optional [string]
389 cmd: !optional string
390 graphml: !optional
391 notes: !optional [notes_t]
392 relative_to: !optional string
393 using_namespace: !optional [string, [string]]
394 using_module: !optional string
395 generate_metadata: !optional bool
396 #
397 # Inheritable custom options
398 #
399 include_relations_also_as_members: !optional bool
400 generate_method_arguments: !optional generate_method_arguments_t
401 combine_free_functions_into_file_participants: !optional bool
402 inline_lambda_messages: !optional bool
403 generate_concept_requirements: !optional bool
404 generate_return_types: !optional bool
405 generate_condition_statements: !optional bool
406 generate_message_comments: !optional bool
407 fold_repeated_activities: !optional bool
408 message_comment_width: !optional int
409 generate_packages: !optional bool
410 group_methods: !optional bool
411 package_type: !optional package_type_t
412 generate_template_argument_dependencies: !optional bool
413 skip_redundant_dependencies: !optional bool
414 type_aliases: !optional map_t<string;string>
415 filter_mode: !optional filter_mode_t
416 include_system_headers: !optional bool
417)";
418
419} // namespace clanguml::config