0.6.1
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_return_values: !optional bool
268 generate_condition_statements: !optional bool
269 generate_message_comments: !optional bool
270 fold_repeated_activities: !optional bool
271 message_comment_width: !optional int
272 message_name_width: !optional int
273 participants_order: !optional [string]
274 start_from: !optional [source_location_t] # deprecated -> 'from'
275 from: !optional [source_location_t]
276 from_to: !optional [[source_location_t]]
277 to: !optional [source_location_t]
278 package_diagram_t:
279 type: !variant [package]
280 #
281 # Common options
282 #
283 user_data: !optional any
284 __parent_path: !optional string
285 comment_parser: !optional comment_parser_t
286 debug_mode: !optional bool
287 exclude: !optional filter_t
288 generate_links: !optional generate_links_t
289 git: !optional git_t
290 glob: !optional glob_t
291 filter_mode: !optional filter_mode_t
292 include_system_headers: !optional bool
293 include: !optional filter_t
294 plantuml: !optional
295 before: !optional [string]
296 after: !optional [string]
297 cmd: !optional string
298 mermaid: !optional
299 before: !optional [string]
300 after: !optional [string]
301 cmd: !optional string
302 graphml: !optional
303 notes: !optional notes_t
304 relative_to: !optional string
305 using_namespace: !optional [string, [string]]
306 using_module: !optional string
307 generate_metadata: !optional bool
308 title: !optional string
309 #
310 # Package diagram specific options
311 #
312 generate_packages: !optional bool
313 package_type: !optional package_type_t
314 layout: !optional layout_t
315 include_diagram_t:
316 type: !variant [include]
317 #
318 # Common options
319 #
320 __parent_path: !optional string
321 user_data: !optional any
322 comment_parser: !optional comment_parser_t
323 debug_mode: !optional bool
324 filter_mode: !optional filter_mode_t
325 include_system_headers: !optional bool
326 exclude: !optional filter_t
327 generate_links: !optional generate_links_t
328 generate_packages: !optional bool
329 git: !optional git_t
330 glob: !optional glob_t
331 include: !optional filter_t
332 plantuml: !optional
333 before: !optional [string]
334 after: !optional [string]
335 cmd: !optional string
336 mermaid: !optional
337 before: !optional [string]
338 after: !optional [string]
339 cmd: !optional string
340 graphml: !optional
341 notes: !optional notes_t
342 relative_to: !optional string
343 using_namespace: !optional [string, [string]]
344 generate_metadata: !optional bool
345 title: !optional string
346 #
347 # Include diagram specific options
348 #
349 generate_system_headers: !optional bool
350 diagram_t:
351 - class_diagram_t
352 - sequence_diagram_t
353 - package_diagram_t
354 - include_diagram_t
355 diagram_template_t:
356 description: !optional string
357 type: diagram_type_t
358 template: string
359 diagram_templates_t: map_t<string;diagram_template_t>
360root:
361 #
362 # Root options
363 #
364 compilation_database_dir: !optional string
365 output_directory: !optional string
366 query_driver: !optional string
367 add_compile_flags: !optional [string]
368 remove_compile_flags: !optional [regex_or_string_t]
369 allow_empty_diagrams: !optional bool
370 diagram_templates: !optional diagram_templates_t
371 diagrams: !optional map_t<string;diagram_t>
372 user_data: !optional any
373 #
374 # Common options
375 #
376 __parent_path: !optional string
377 comment_parser: !optional comment_parser_t
378 debug_mode: !optional bool
379 exclude: !optional filter_t
380 generate_links: !optional generate_links_t
381 git: !optional git_t
382 glob: !optional glob_t
383 include: !optional filter_t
384 plantuml: !optional
385 before: !optional [string]
386 after: !optional [string]
387 cmd: !optional string
388 mermaid: !optional
389 before: !optional [string]
390 after: !optional [string]
391 cmd: !optional string
392 graphml: !optional
393 notes: !optional [notes_t]
394 relative_to: !optional string
395 using_namespace: !optional [string, [string]]
396 using_module: !optional string
397 generate_metadata: !optional bool
398 #
399 # Inheritable custom options
400 #
401 include_relations_also_as_members: !optional bool
402 generate_method_arguments: !optional generate_method_arguments_t
403 combine_free_functions_into_file_participants: !optional bool
404 inline_lambda_messages: !optional bool
405 generate_concept_requirements: !optional bool
406 generate_return_types: !optional bool
407 generate_return_values: !optional bool
408 generate_condition_statements: !optional bool
409 generate_message_comments: !optional bool
410 fold_repeated_activities: !optional bool
411 message_comment_width: !optional int
412 message_name_width: !optional int
413 generate_packages: !optional bool
414 group_methods: !optional bool
415 package_type: !optional package_type_t
416 generate_template_argument_dependencies: !optional bool
417 skip_redundant_dependencies: !optional bool
418 type_aliases: !optional map_t<string;string>
419 filter_mode: !optional filter_mode_t
420 include_system_headers: !optional bool
421 relationship_hints: !optional map_t<string;any>
422)";
423
424} // namespace clanguml::config