0.5.4
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 749 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.
 
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< std::vector< common::string_or_regex > > glob {"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< 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< 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}
 

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 959 of file yaml_decoders.cc.

960{
961 for (auto &[name, diagram] : diagrams) {
962 diagram->inherit(*this);
963
964 assert(diagram->get_relative_to().has_value);
965 }
966}

◆ initialize_diagram_templates()

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

Initialize predefined diagram templates.

Definition at line 945 of file yaml_decoders.cc.

946{
947 const auto &predefined_templates_str = get_predefined_diagram_templates();
948
949 YAML::Node predefined_templates = YAML::Load(predefined_templates_str);
950
951 if (!diagram_templates) {
952 diagram_templates.set({});
953 }
954
955 diagram_templates().merge(
956 predefined_templates.as<std::map<std::string, diagram_template>>());
957}

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 757 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 751 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 776 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 780 of file config.h.

◆ output_directory

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

Diagrams output directory

Definition at line 773 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 770 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 762 of file config.h.


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