0.6.0
C++ to UML diagram generator based on Clang
Loading...
Searching...
No Matches
Classes | Typedefs | Enumerations | Functions | Variables
clanguml::config Namespace Reference

Configuration file related classes. More...

Detailed Description

Configuration file related classes.

Classes

struct  class_diagram
 Class diagram configuration. More...
 
struct  config
 Represents entire configuration file. More...
 
struct  context_config
 
struct  diagram
 Common diagram configuration type. More...
 
struct  diagram_template
 Definition of diagram template. More...
 
struct  element_filter_t
 
struct  filter
 
struct  generate_links_config
 
struct  git_config
 
struct  glob_t
 Glob config section for including and excluding TUs. More...
 
struct  graphml
 GraphML diagram config section. More...
 
struct  include_diagram
 Include diagram configuration. More...
 
struct  inheritable_diagram_options
 Represents subset of inheritable configuration options. More...
 
struct  layout_hint
 
struct  mermaid
 MermaidJS diagram config section. More...
 
struct  option
 Generic configuration option type. More...
 
struct  option_with_alt_names_tag
 
struct  package_diagram
 Package diagram configuration. More...
 
struct  plantuml
 PlantUML diagram config section. More...
 
struct  plantuml_keyword_mapping_t
 
struct  relationship_hint_t
 
struct  sequence_diagram
 Sequence diagram configuration. More...
 
struct  source_location
 
struct  type_aliases_longer_first_comparator
 

Typedefs

using layout_hints = std::map< std::string, std::vector< layout_hint > >
 
using relationship_hints_t = std::map< std::string, relationship_hint_t >
 
using type_aliases_t = std::map< std::string, std::string >
 
using type_aliases_longer_first_t = std::map< std::string, std::string, type_aliases_longer_first_comparator >
 
using config_ptr = std::unique_ptr< config >
 

Enumerations

enum class  method_arguments { full , abbreviated , none }
 
enum class  method_type {
  constructor , destructor , assignment , operator_ ,
  defaulted , deleted , static_
}
 
enum class  callee_type {
  constructor , assignment , operator_ , defaulted ,
  static_ , method , function , function_template ,
  lambda , cuda_kernel , cuda_device
}
 
enum class  package_type_t { kNamespace , kDirectory , kModule }
 
enum class  member_order_t { lexical , as_is }
 
enum class  comment_parser_t { plain , clang }
 
enum class  filter_mode_t { basic , advanced }
 
enum class  context_direction_t { inward , outward , any }
 
enum class  hint_t {
  up , down , left , right ,
  together , row , column
}
 
enum class  location_t { marker , fileline , function }
 
enum class  option_inherit_mode { kOverride , kAppend }
 

Functions

std::string to_string (const hint_t t)
 
std::string to_string (element_filter_t::filtered_type ft)
 
std::string to_string (const method_arguments ma)
 
std::string to_string (method_type mt)
 
std::string to_string (callee_type mt)
 
std::string to_string (const comment_parser_t cp)
 
std::string to_string (location_t cp)
 
std::string to_string (package_type_t pt)
 
std::string to_string (member_order_t mo)
 
std::string to_string (context_direction_t cd)
 
std::string to_string (filter_mode_t fm)
 
template<>
void append_value< plantuml > (plantuml &l, const plantuml &r)
 
config load (const std::string &config_file, bool inherit=true, std::optional< bool > paths_relative_to_pwd={}, std::optional< bool > no_metadata={}, bool validate=true)
 Load and parse .clang-uml configuration file.
 
YAML::Emitter & operator<< (YAML::Emitter &out, const config &c)
 
YAML::Emitter & operator<< (YAML::Emitter &out, const inheritable_diagram_options &c)
 
YAML::Emitter & operator<< (YAML::Emitter &out, const filter &f)
 
YAML::Emitter & operator<< (YAML::Emitter &out, const plantuml &p)
 
YAML::Emitter & operator<< (YAML::Emitter &out, const mermaid &p)
 
YAML::Emitter & operator<< (YAML::Emitter &out, const graphml &p)
 
YAML::Emitter & operator<< (YAML::Emitter &out, const method_arguments &ma)
 
YAML::Emitter & operator<< (YAML::Emitter &out, const generate_links_config &glc)
 
YAML::Emitter & operator<< (YAML::Emitter &out, const git_config &gc)
 
YAML::Emitter & operator<< (YAML::Emitter &out, const relationship_hint_t &rh)
 
YAML::Emitter & operator<< (YAML::Emitter &out, const comment_parser_t &cp)
 
YAML::Emitter & operator<< (YAML::Emitter &out, const hint_t &h)
 
YAML::Emitter & operator<< (YAML::Emitter &out, const class_diagram &c)
 
YAML::Emitter & operator<< (YAML::Emitter &out, const sequence_diagram &c)
 
YAML::Emitter & operator<< (YAML::Emitter &out, const include_diagram &c)
 
YAML::Emitter & operator<< (YAML::Emitter &out, const package_diagram &c)
 
YAML::Emitter & operator<< (YAML::Emitter &out, const layout_hint &c)
 
YAML::Emitter & operator<< (YAML::Emitter &out, const element_filter_t &ef)
 
YAML::Emitter & operator<< (YAML::Emitter &out, const diagram_template &dt)
 
YAML::Emitter & operator<< (YAML::Emitter &out, const inja::json &ef)
 
YAML::Emitter & operator<< (YAML::Emitter &out, const source_location &sc)
 
template<typename T >
bool is_null (const T &)
 
template<>
bool is_null (const std::string &v)
 
template<>
bool is_null (const glob_t &v)
 
template<>
bool is_null (const plantuml &v)
 
template<>
bool is_null (const mermaid &v)
 
template<>
bool is_null (const graphml &v)
 
template<>
bool is_null (const inja::json &v)
 
template<typename T >
YAML::Emitter & operator<< (YAML::Emitter &out, const option< T > &o)
 
const std::string & get_predefined_diagram_templates ()
 Return YAML with predefined diagram templates.
 
template<>
void append_value (inja::json &l, const inja::json &r)
 
template<typename T >
void append_value (T &l, const T &r)
 
template<typename T >
void append_value (std::vector< T > &l, const std::vector< T > &r)
 
template<typename K , typename V >
void append_value (std::map< K, V > &l, const std::map< K, V > &r)
 
template<>
void append_value (inja::json &l, const inja::json &r)
 
YAML::Emitter & operator<< (YAML::Emitter &out, const method_type &m)
 
YAML::Emitter & operator<< (YAML::Emitter &out, const callee_type &m)
 
YAML::Emitter & operator<< (YAML::Emitter &out, const member_order_t &r)
 
YAML::Emitter & operator<< (YAML::Emitter &out, const package_type_t &r)
 
YAML::Emitter & operator<< (YAML::Emitter &out, const context_config &c)
 
YAML::Emitter & operator<< (YAML::Emitter &out, const glob_t &g)
 
template<>
bool is_null (const std::string &v)
 
template<>
bool is_null (const glob_t &v)
 
template<>
bool is_null (const plantuml &v)
 
template<>
bool is_null (const mermaid &v)
 
template<>
bool is_null (const graphml &v)
 
template<>
bool is_null (const inja::json &v)
 

Variables

const std::string schema_str
 

Typedef Documentation

◆ config_ptr

using clanguml::config::config_ptr = typedef std::unique_ptr<config>

Definition at line 855 of file config.h.

◆ layout_hints

using clanguml::config::layout_hints = typedef std::map<std::string, std::vector<layout_hint> >

Definition at line 517 of file config.h.

◆ relationship_hints_t

using clanguml::config::relationship_hints_t = typedef std::map<std::string, relationship_hint_t>

Definition at line 562 of file config.h.

◆ type_aliases_longer_first_t

using clanguml::config::type_aliases_longer_first_t = typedef std::map<std::string, std::string, type_aliases_longer_first_comparator>

Definition at line 575 of file config.h.

◆ type_aliases_t

using clanguml::config::type_aliases_t = typedef std::map<std::string, std::string>

Definition at line 564 of file config.h.

Enumeration Type Documentation

◆ callee_type

enum class clanguml::config::callee_type
strong

Types of call expressions, which can be used in sequence diagram filters

Enumerator
constructor 
assignment 
operator_ 
defaulted 
static_ 
method 
function 
function_template 
lambda 
cuda_kernel 
cuda_device 

Definition at line 114 of file config.h.

114 {
117 operator_,
118 defaulted,
119 static_,
120 method,
121 function,
123 lambda,
126};

◆ comment_parser_t

Which comment parser should be used

Enumerator
plain 

Basic string parser

clang 

Clang's internal comment parser with structured output

Definition at line 149 of file config.h.

149 {
150 plain, /*!< Basic string parser */
151 clang /*!< Clang's internal comment parser with structured output */
152};

◆ context_direction_t

Enumerator
inward 
outward 
any 

Definition at line 231 of file config.h.

231{ inward, outward, any };

◆ filter_mode_t

Enumerator
basic 

Default filter structure without logical operators

advanced 

Advanced filter config with logical operators

Definition at line 161 of file config.h.

161 {
162 basic, /*!< Default filter structure without logical operators */
163 advanced /*!< Advanced filter config with logical operators */
164};

◆ hint_t

enum class clanguml::config::hint_t
strong
Enumerator
up 
down 
left 
right 
together 
row 
column 

Definition at line 508 of file config.h.

◆ location_t

enum class clanguml::config::location_t
strong
Enumerator
marker 
fileline 
function 

Definition at line 578 of file config.h.

◆ member_order_t

How class methods and members should be ordered in diagrams

Enumerator
lexical 
as_is 

Lexical order based on entire method or member signature without type

As written in source code

Definition at line 140 of file config.h.

140 {
141 lexical, /*! Lexical order based on entire method or member signature
142 without type */
143 as_is /*! As written in source code */
144};

◆ method_arguments

Select how the method arguments should be rendered

Enumerator
full 
abbreviated 

Full

none 

Abrreviate, string between '(' and ')' is cropped

Empty string between '(' and ')'

Definition at line 92 of file config.h.

92 {
93 full, /*! Full */
94 abbreviated, /*! Abrreviate, string between '(' and ')' is cropped */
95 none /*! Empty string between '(' and ')' */
96};

◆ method_type

enum class clanguml::config::method_type
strong

Types of methods, which can be used in diagram filters

Enumerator
constructor 
destructor 
assignment 
operator_ 
defaulted 
deleted 
static_ 

Definition at line 101 of file config.h.

101 {
105 operator_,
106 defaulted,
107 deleted,
108 static_
109};

◆ option_inherit_mode

Possible option inheritance methods from top level to diagram level.

Enumerator
kOverride 

Override entire options

kAppend 

Append to list options

Definition at line 49 of file option.h.

49 {
50 kOverride, /*!< Override entire options */
51 kAppend /*!< Append to list options */
52};

◆ package_type_t

How packages in diagrams should be generated

Enumerator
kNamespace 

From namespaces

kDirectory 

From directories

kModule 

From modules

Definition at line 131 of file config.h.

131 {
132 kNamespace, /*!< From namespaces */
133 kDirectory, /*!< From directories */
134 kModule /*!< From modules */
135};

Function Documentation

◆ append_value() [1/5]

template<>
void clanguml::config::append_value ( inja::json &  l,
const inja::json &  r 
)

Definition at line 23 of file option.cc.

24{
25 if (r.is_object()) {
26 if (l.is_null()) {
27 l = r;
28 }
29 else {
30 inja::json merged = r;
31 merged.merge_patch(l);
32 l = std::move(merged);
33 }
34 }
35}

◆ append_value() [2/5]

template<>
void clanguml::config::append_value ( inja::json &  l,
const inja::json &  r 
)

Definition at line 23 of file option.cc.

24{
25 if (r.is_object()) {
26 if (l.is_null()) {
27 l = r;
28 }
29 else {
30 inja::json merged = r;
31 merged.merge_patch(l);
32 l = std::move(merged);
33 }
34 }
35}

◆ append_value() [3/5]

template<typename K , typename V >
void clanguml::config::append_value ( std::map< K, V > &  l,
const std::map< K, V > &  r 
)

Definition at line 39 of file option.h.

40{
41 l.insert(r.begin(), r.end());
42}

◆ append_value() [4/5]

template<typename T >
void clanguml::config::append_value ( std::vector< T > &  l,
const std::vector< T > &  r 
)

Definition at line 33 of file option.h.

34{
35 l.insert(std::end(l), r.begin(), r.end());
36}

◆ append_value() [5/5]

template<typename T >
void clanguml::config::append_value ( T &  l,
const T &  r 
)

Definition at line 30 of file option.h.

30{ l = r; }

◆ append_value< plantuml >()

template<>
void clanguml::config::append_value< plantuml > ( plantuml l,
const plantuml r 
)

Definition at line 619 of file config.cc.

620{
621 l.append(r);
622}

◆ get_predefined_diagram_templates()

const std::string & clanguml::config::get_predefined_diagram_templates ( )

Return YAML with predefined diagram templates.

Returns
YAML definition of predefined diagram templates

Definition at line 24 of file diagram_templates.cc.

25{
26 static const std::string predefined_diagram_templates =
27 R"(# Predefined diagram templates
28parents_hierarchy_tmpl:
29 description: Generate class parents inheritance diagram
30 type: class

◆ load()

config clanguml::config::load ( const std::string &  config_file,
bool  inherit = true,
std::optional< bool >  paths_relative_to_pwd = {},
std::optional< bool >  no_metadata = {},
bool  validate = true 
)

Load and parse .clang-uml configuration file.

This function takes the path to the configuration file and some options, parses the YAML file and creates a

See also
clanguml::config::config instance.

Parameters
config_filePath to the configuration file
inheritIf true, common options will be propagated to diagram configs
paths_relative_to_pwdWhether the paths in the configuration file should be relative to the parent directory of the configuration file or to the current directory ($PWD)
no_metadataWhether the diagram should skip metadata at the end
validateIf true, perform schema validation
Returns
Configuration instance

Definition at line 1200 of file yaml_decoders.cc.

1203{
1204 try {
1205 auto schema = YAML::Load(clanguml::config::schema_str);
1206 auto schema_validator = miroir::Validator<YAML::Node>(schema);
1207
1208 YAML::Node doc;
1209 std::filesystem::path config_file_path{};
1210
1211 if (config_file == "-") {
1212 std::istreambuf_iterator<char> stdin_stream_begin{std::cin};
1213 std::istreambuf_iterator<char> stdin_stream_end{};
1214 std::string stdin_stream_str{stdin_stream_begin, stdin_stream_end};
1215
1216 doc = YAML::Load(stdin_stream_str);
1217 }
1218 else {
1219 doc = YAML::LoadFile(config_file);
1220 }
1221
1222 // Store the parent path of the config_file to properly resolve
1223 // relative paths in config file
1224 if (has_key(doc, "__parent_path"))
1225 doc.remove("__parent_path");
1226 if (config_file == "-") {
1227 config_file_path = std::filesystem::current_path();
1228 doc.force_insert("__parent_path", config_file_path.string());
1229 }
1230 else {
1231 config_file_path =
1232 canonical(absolute(std::filesystem::path{config_file}));
1233 doc.force_insert(
1234 "__parent_path", config_file_path.parent_path().string());
1235 }
1236
1237 LOG_DBG("Effective config file path is {}", config_file_path.string());
1238
1239 //
1240 // If no relative_to path is specified in the config, make all paths
1241 // resolvable against the parent directory of the .clang-uml config
1242 // file, or against the $PWD if it was specified so in the command
1243 // line
1244 //
1245 if (!doc["relative_to"]) {
1246 bool paths_relative_to_config_file = true;
1247
1248 if (doc["paths_relative_to_config_file"] &&
1249 !doc["paths_relative_to_config_file"].as<bool>())
1250 paths_relative_to_config_file = false;
1251
1252 if (paths_relative_to_pwd && *paths_relative_to_pwd)
1253 paths_relative_to_config_file = false;
1254
1255 if (paths_relative_to_config_file)
1256 doc["relative_to"] = config_file_path.parent_path().string();
1257 else
1258 doc["relative_to"] = std::filesystem::current_path().string();
1259 }
1260
1261 if (no_metadata.has_value()) {
1262 doc["generate_metadata"] = !no_metadata.value();
1263 }
1264
1265 //
1266 // Resolve common path-like config options relative to `relative_to`
1267 //
1268 if (!doc["output_directory"]) {
1269 doc["output_directory"] = ".";
1270 }
1271 resolve_option_path(doc, "output_directory");
1272
1273 if (!doc["compilation_database_dir"]) {
1274 doc["compilation_database_dir"] = ".";
1275 }
1276 resolve_option_path(doc, "compilation_database_dir");
1277
1278 // If the current directory is also a git repository,
1279 // load some config values, which can be included in the
1280 // generated diagrams
1281 if (util::is_git_repository() && !doc["git"]) {
1282 YAML::Node git_config{YAML::NodeType::Map};
1283 git_config["branch"] = util::get_git_branch();
1284 git_config["revision"] = util::get_git_revision();
1285 git_config["commit"] = util::get_git_commit();
1286 git_config["toplevel"] = util::get_git_toplevel_dir();
1287
1288 doc["git"] = git_config;
1289 }
1290
1291 if (has_key(doc, "diagrams")) {
1292 auto diagrams = doc["diagrams"];
1293
1294 assert(diagrams.Type() == YAML::NodeType::Map);
1295
1296 for (auto d : diagrams) {
1297 auto name = d.first.as<std::string>();
1298 std::shared_ptr<clanguml::config::diagram> diagram_config{};
1299 auto parent_path = doc["__parent_path"].as<std::string>();
1300
1301 if (has_key(d.second, "include!")) {
1302 auto include_path = std::filesystem::path{parent_path};
1303 include_path /= d.second["include!"].as<std::string>();
1304
1305 YAML::Node included_node =
1306 YAML::LoadFile(include_path.string());
1307
1308 diagrams[name] = included_node;
1309 }
1310 }
1311 }
1312
1313 if (validate) {
1314 auto schema_errors = schema_validator.validate(doc);
1315
1316 if (!schema_errors.empty()) {
1318 std::move(schema_errors));
1319 }
1320 }
1321
1322 auto d = doc.as<config>();
1323
1324 if (inherit)
1325 d.inherit();
1326
1327 d.initialize_diagram_templates();
1328
1329 return d;
1330 }
1331 catch (YAML::BadFile &e) {
1332 throw std::runtime_error(fmt::format(
1333 "Could not open config file {}: {}", config_file, e.what()));
1334 }
1335 catch (YAML::Exception &e) {
1336 throw std::runtime_error(
1337 fmt::format("Cannot parse YAML file {} at line {}: {}", config_file,
1338 e.mark.line, e.msg));
1339 }
1340}

◆ operator<<() [1/6]

YAML::Emitter & clanguml::config::operator<< ( YAML::Emitter &  out,
const callee_type m 
)

Definition at line 95 of file yaml_emitters.cc.

96{
97 out << to_string(m);
98 return out;
99}

◆ operator<<() [2/6]

YAML::Emitter & clanguml::config::operator<< ( YAML::Emitter &  out,
const context_config c 
)

Definition at line 113 of file yaml_emitters.cc.

114{
115 out << YAML::BeginMap;
116 out << YAML::Key << "match";
117 out << YAML::BeginMap;
118 out << YAML::Key << "radius" << YAML::Value << c.radius;
119 out << YAML::Key << "pattern" << YAML::Value << c.pattern;
120 out << YAML::EndMap;
121 out << YAML::EndMap;
122
123 return out;
124}

◆ operator<<() [3/6]

YAML::Emitter & clanguml::config::operator<< ( YAML::Emitter &  out,
const glob_t g 
)

Definition at line 310 of file yaml_emitters.cc.

311{
312 out << YAML::BeginMap;
313 out << YAML::Key << "include" << YAML::Value << g.include;
314 out << YAML::Key << "exclude" << YAML::Value << g.exclude;
315 out << YAML::EndMap;
316 return out;
317}

◆ operator<<() [4/6]

YAML::Emitter & clanguml::config::operator<< ( YAML::Emitter &  out,
const member_order_t r 
)

Definition at line 101 of file yaml_emitters.cc.

102{
103 out << to_string(r);
104 return out;
105}

◆ operator<<() [5/6]

YAML::Emitter & clanguml::config::operator<< ( YAML::Emitter &  out,
const method_type m 
)

Definition at line 89 of file yaml_emitters.cc.

90{
91 out << to_string(m);
92 return out;
93}

◆ operator<<() [6/6]

YAML::Emitter & clanguml::config::operator<< ( YAML::Emitter &  out,
const package_type_t r 
)

Definition at line 107 of file yaml_emitters.cc.

108{
109 out << to_string(r);
110 return out;
111}

◆ to_string() [1/11]

std::string clanguml::config::to_string ( callee_type  mt)

Definition at line 125 of file config.cc.

126{
127 switch (mt) {
128 case callee_type::constructor:
129 return "constructor";
130 case callee_type::assignment:
131 return "assignment";
132 case callee_type::operator_:
133 return "operator";
134 case callee_type::defaulted:
135 return "defaulted";
136 case callee_type::static_:
137 return "static";
138 case callee_type::method:
139 return "method";
140 case callee_type::function:
141 return "function";
142 case callee_type::function_template:
143 return "function_template";
144 case callee_type::lambda:
145 return "lambda";
146 case callee_type::cuda_kernel:
147 return "cuda_kernel";
148 case callee_type::cuda_device:
149 return "cuda_device";
150 }
151
152 assert(false);
153 return "";
154}

◆ to_string() [2/11]

std::string clanguml::config::to_string ( const comment_parser_t  cp)

Definition at line 156 of file config.cc.

157{
158 switch (cp) {
159 case comment_parser_t::clang:
160 return "clang";
161 case comment_parser_t::plain:
162 return "plain";
163 default:
164 assert(false);
165 return "";
166 }
167}

◆ to_string() [3/11]

std::string clanguml::config::to_string ( const hint_t  t)

Definition at line 27 of file config.cc.

28{
29 switch (t) {
30 case hint_t::up:
31 return "up";
32 case hint_t::down:
33 return "down";
34 case hint_t::left:
35 return "left";
36 case hint_t::right:
37 return "right";
38 case hint_t::together:
39 return "together";
40 case hint_t::row:
41 return "row";
42 case hint_t::column:
43 return "column";
44 default:
45 assert(false);
46 return "";
47 }
48}

◆ to_string() [4/11]

std::string clanguml::config::to_string ( const method_arguments  ma)

Definition at line 87 of file config.cc.

88{
89 switch (ma) {
90 case method_arguments::full:
91 return "full";
92 case method_arguments::abbreviated:
93 return "abbreviated";
94 case method_arguments::none:
95 return "none";
96 default:
97 assert(false);
98 return "";
99 }
100}

◆ to_string() [5/11]

std::string clanguml::config::to_string ( context_direction_t  cd)

Definition at line 211 of file config.cc.

212{
213 switch (cd) {
214 case context_direction_t::inward:
215 return "inward";
216 case context_direction_t::outward:
217 return "outward";
218 case context_direction_t::any:
219 return "any";
220 default:
221 assert(false);
222 return "";
223 }
224}

◆ to_string() [6/11]

std::string clanguml::config::to_string ( element_filter_t::filtered_type  ft)

Definition at line 50 of file config.cc.

51{
52 switch (ft) {
53 case element_filter_t::filtered_type::any:
54 return "any";
55 case element_filter_t::filtered_type::class_:
56 return "class";
57 case element_filter_t::filtered_type::function:
58 return "function";
59 case element_filter_t::filtered_type::method:
60 return "method";
61 case element_filter_t::filtered_type::member:
62 return "member";
63 case element_filter_t::filtered_type::enum_:
64 return "enum";
65 case element_filter_t::filtered_type::concept_:
66 return "concept";
67 case element_filter_t::filtered_type::package:
68 return "package";
69 case element_filter_t::filtered_type::function_template:
70 return "function_template";
71 case element_filter_t::filtered_type::objc_method:
72 return "objc_method";
73 case element_filter_t::filtered_type::objc_member:
74 return "objc_member";
75 case element_filter_t::filtered_type::objc_protocol:
76 return "objc_protocol";
77 case element_filter_t::filtered_type::objc_category:
78 return "objc_category";
79 case element_filter_t::filtered_type::objc_interface:
80 return "objc_interface";
81 default:
82 assert(false);
83 return "";
84 }
85}

◆ to_string() [7/11]

std::string clanguml::config::to_string ( filter_mode_t  fm)

Definition at line 226 of file config.cc.

227{
228 switch (fm) {
229 case filter_mode_t::basic:
230 return "basic";
231 case filter_mode_t::advanced:
232 return "advanced";
233 default:
234 assert(false);
235 return "";
236 }
237}

◆ to_string() [8/11]

std::string clanguml::config::to_string ( location_t  cp)

Definition at line 169 of file config.cc.

170{
171 switch (cp) {
172 case location_t::fileline:
173 return "fileline";
174 case location_t::function:
175 return "function";
176 case location_t::marker:
177 return "marker";
178 default:
179 assert(false);
180 return "";
181 }
182}

◆ to_string() [9/11]

std::string clanguml::config::to_string ( member_order_t  mo)

Definition at line 199 of file config.cc.

200{
201 switch (mo) {
202 case member_order_t::lexical:
203 return "lexical";
204 case member_order_t::as_is:
205 return "as_is";
206 default:
207 assert(false);
208 return "";
209 }
210}

◆ to_string() [10/11]

std::string clanguml::config::to_string ( method_type  mt)

Definition at line 102 of file config.cc.

103{
104 switch (mt) {
105 case method_type::constructor:
106 return "constructor";
107 case method_type::destructor:
108 return "destructor";
109 case method_type::assignment:
110 return "assignment";
111 case method_type::operator_:
112 return "operator";
113 case method_type::defaulted:
114 return "defaulted";
115 case method_type::deleted:
116 return "deleted";
117 case method_type::static_:
118 return "static";
119 }
120
121 assert(false);
122 return "";
123}

◆ to_string() [11/11]

std::string clanguml::config::to_string ( package_type_t  pt)

Definition at line 184 of file config.cc.

185{
186 switch (pt) {
187 case package_type_t::kNamespace:
188 return "namespace";
189 case package_type_t::kDirectory:
190 return "directory";
191 case package_type_t::kModule:
192 return "module";
193 default:
194 assert(false);
195 return "";
196 }
197}

Variable Documentation

◆ schema_str

const std::string clanguml::config::schema_str

Definition at line 24 of file schema.h.