0.6.0
C++ to UML diagram generator based on Clang
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
clanguml::config::config Struct Reference

Represents entire configuration file. More...

Detailed Description

Represents entire configuration file.

This class contains all information loaded from the provided clang-uml configuration file, along with information inferred from the system such as current directory or Git context.

The options in this class are not inheritable into specific diagram configurations.

The configuration file is loaded by invoking

See also
clanguml::config::load() function.

Definition at line 814 of file config.h.

#include <config.h>

Public Member Functions

void initialize_diagram_templates ()
 
void inherit ()
 
- Public Member Functions inherited from clanguml::config::inheritable_diagram_options
virtual ~inheritable_diagram_options ()=default
 
void inherit (const inheritable_diagram_options &parent)
 
std::string simplify_template_type (std::string full_name) const
 
bool generate_fully_qualified_name () const
 Whether the diagram element should be fully qualified in diagram.
 
std::filesystem::path root_directory () const
 Returns absolute path of the relative_to option.
 
option< std::filesystem::path > & get_relative_to ()
 Get reference to relative_to diagram config option.
 

Public Attributes

option< std::string > compilation_database_dir
 
option< std::vector< std::string > > add_compile_flags {"add_compile_flags"}
 
option< std::vector< common::string_or_regex > > remove_compile_flags
 
option< std::string > query_driver {"query_driver"}
 
option< std::string > output_directory {"output_directory"}
 
option< std::map< std::string, diagram_template > > diagram_templates
 
std::map< std::string, std::shared_ptr< diagram > > diagrams
 
- Public Attributes inherited from clanguml::config::inheritable_diagram_options
option< glob_tglob {"glob"}
 
option< common::model::namespace_using_namespace {"using_namespace"}
 
option< std::string > using_module {"using_module"}
 
option< bool > include_relations_also_as_members
 
option< filter_mode_tfilter_mode {"filter_mode", filter_mode_t::basic}
 
option< bool > include_system_headers {"include_system_headers", false}
 
option< filterinclude {"include"}
 
option< filterexclude {"exclude"}
 
option< plantumlpuml {"plantuml", option_inherit_mode::kAppend}
 
option< struct mermaidmermaid {"mermaid", option_inherit_mode::kAppend}
 
option< struct graphmlgraphml {"graphml", option_inherit_mode::kAppend}
 
option< method_argumentsgenerate_method_arguments
 
option< bool > generate_concept_requirements
 
option< bool > group_methods {"group_methods", true}
 
option< member_order_tmember_order
 
option< bool > generate_packages {"generate_packages", false}
 
option< package_type_tpackage_type
 
option< bool > generate_template_argument_dependencies
 
option< bool > skip_redundant_dependencies
 
option< generate_links_configgenerate_links {"generate_links"}
 
option< git_configgit {"git"}
 
option< layout_hintslayout {"layout"}
 
option< std::filesystem::path > base_directory {"__parent_path"}
 
option< bool > generate_system_headers {"generate_system_headers", false}
 
option< relationship_hints_trelationship_hints {"relationship_hints"}
 
option< type_aliases_ttype_aliases
 
option< comment_parser_tcomment_parser
 
option< bool > combine_free_functions_into_file_participants
 
option< bool > inline_lambda_messages {"inline_lambda_messages", false}
 
option< bool > generate_return_types {"generate_return_types", false}
 
option< bool > generate_condition_statements
 
option< std::vector< std::string > > participants_order {"participants_order"}
 
option< bool > generate_message_comments {"generate_message_comments", false}
 
option< bool > fold_repeated_activities {"fold_repeated_activities", false}
 
option< unsigned > message_comment_width
 
option< bool > debug_mode {"debug_mode", false}
 
option< bool > generate_metadata {"generate_metadata", true}
 
option< bool > allow_empty_diagrams {"allow_empty_diagrams", false}
 
option< inja::json > user_data {"user_data", {}, option_inherit_mode::kAppend}
 

Additional Inherited Members

- Protected Attributes inherited from clanguml::config::inheritable_diagram_options
option< std::filesystem::path > relative_to {"relative_to"}
 

Member Function Documentation

◆ inherit()

void clanguml::config::config::inherit ( )

Definition at line 1170 of file yaml_decoders.cc.

1171{
1172 for (auto &[name, diagram] : diagrams) {
1173 diagram->inherit(*this);
1174
1175 assert(diagram->get_relative_to().has_value);
1176 }
1177}

◆ initialize_diagram_templates()

void clanguml::config::config::initialize_diagram_templates ( )

Initialize predefined diagram templates.

Definition at line 1156 of file yaml_decoders.cc.

1157{
1158 const auto &predefined_templates_str = get_predefined_diagram_templates();
1159
1160 YAML::Node predefined_templates = YAML::Load(predefined_templates_str);
1161
1162 if (!diagram_templates) {
1163 diagram_templates.set({});
1164 }
1165
1166 diagram_templates().merge(
1167 predefined_templates.as<std::map<std::string, diagram_template>>());
1168}

Member Data Documentation

◆ add_compile_flags

option<std::vector<std::string> > clanguml::config::config::add_compile_flags {"add_compile_flags"}

List of compilation flags to be injected into the compilation commands from database

Definition at line 822 of file config.h.

◆ compilation_database_dir

option<std::string> clanguml::config::config::compilation_database_dir
Initial value:
{
"compilation_database_dir", "."}

Path to the directory containing compile_commands.json

Definition at line 816 of file config.h.

◆ diagram_templates

option<std::map<std::string, diagram_template> > clanguml::config::config::diagram_templates
Initial value:
{
"diagram_templates"}

Dictionary of user defined diagram templates, if any

Definition at line 841 of file config.h.

◆ diagrams

std::map<std::string, std::shared_ptr<diagram> > clanguml::config::config::diagrams

Dictionary of diagrams, keys represent diagram names

Definition at line 845 of file config.h.

◆ output_directory

option<std::string> clanguml::config::config::output_directory {"output_directory"}

Diagrams output directory

Definition at line 838 of file config.h.

◆ query_driver

option<std::string> clanguml::config::config::query_driver {"query_driver"}

Extract include paths by executing specified compiler driver. When the value is ‘’`, the command specified in compile_commands.json will be used. Otherwise the provided value will be treated as compiler executable (e.g. clang++-15) and executed.

Definition at line 835 of file config.h.

◆ remove_compile_flags

option<std::vector<common::string_or_regex> > clanguml::config::config::remove_compile_flags
Initial value:
{
"remove_compile_flags"}

List of compilation flags to be removed from the compilation commands from database

Definition at line 827 of file config.h.


The documentation for this struct was generated from the following files: