Added 'title' diagram property
This commit is contained in:
@@ -537,6 +537,8 @@ struct diagram : public inheritable_diagram_options {
|
||||
void initialize_type_aliases();
|
||||
|
||||
std::string name;
|
||||
|
||||
option<std::string> title{"title"};
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -156,6 +156,7 @@ types:
|
||||
relative_to: !optional string
|
||||
using_namespace: !optional [string, [string]]
|
||||
generate_metadata: !optional bool
|
||||
title: !optional string
|
||||
#
|
||||
# Class diagram specific options
|
||||
#
|
||||
@@ -192,6 +193,7 @@ types:
|
||||
relative_to: !optional string
|
||||
using_namespace: !optional [string, [string]]
|
||||
generate_metadata: !optional bool
|
||||
title: !optional string
|
||||
#
|
||||
# Sequence diagram specific options
|
||||
#
|
||||
@@ -226,6 +228,7 @@ types:
|
||||
relative_to: !optional string
|
||||
using_namespace: !optional [string, [string]]
|
||||
generate_metadata: !optional bool
|
||||
title: !optional string
|
||||
#
|
||||
# Package diagram specific options
|
||||
#
|
||||
@@ -254,6 +257,7 @@ types:
|
||||
relative_to: !optional string
|
||||
using_namespace: !optional [string, [string]]
|
||||
generate_metadata: !optional bool
|
||||
title: !optional string
|
||||
#
|
||||
# Include diagram specific options
|
||||
#
|
||||
|
||||
@@ -551,6 +551,7 @@ template <typename T> bool decode_diagram(const Node &node, T &rhs)
|
||||
get_option(node, rhs.comment_parser);
|
||||
get_option(node, rhs.debug_mode);
|
||||
get_option(node, rhs.generate_metadata);
|
||||
get_option(node, rhs.title);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -297,7 +297,9 @@ YAML::Emitter &operator<<(
|
||||
out << c.using_namespace;
|
||||
out << c.generate_metadata;
|
||||
|
||||
if (dynamic_cast<const class_diagram *>(&c) != nullptr) {
|
||||
if (const auto *cd = dynamic_cast<const class_diagram *>(&c);
|
||||
cd != nullptr) {
|
||||
out << cd->title;
|
||||
out << c.generate_method_arguments;
|
||||
out << c.generate_packages;
|
||||
out << c.include_relations_also_as_members;
|
||||
@@ -315,18 +317,24 @@ YAML::Emitter &operator<<(
|
||||
out << c.generate_template_argument_dependencies;
|
||||
out << c.skip_redundant_dependencies;
|
||||
}
|
||||
else if (dynamic_cast<const sequence_diagram *>(&c) != nullptr) {
|
||||
else if (const auto *sd = dynamic_cast<const sequence_diagram *>(&c);
|
||||
sd != nullptr) {
|
||||
out << sd->title;
|
||||
out << c.combine_free_functions_into_file_participants;
|
||||
out << c.generate_condition_statements;
|
||||
out << c.generate_method_arguments;
|
||||
out << c.generate_return_types;
|
||||
out << c.participants_order;
|
||||
}
|
||||
else if (dynamic_cast<const package_diagram *>(&c) != nullptr) {
|
||||
else if (const auto *pd = dynamic_cast<const package_diagram *>(&c);
|
||||
pd != nullptr) {
|
||||
out << pd->title;
|
||||
out << c.generate_packages;
|
||||
out << c.package_type;
|
||||
}
|
||||
else if (dynamic_cast<const include_diagram *>(&c) != nullptr) {
|
||||
else if (const auto *id = dynamic_cast<const include_diagram *>(&c);
|
||||
id != nullptr) {
|
||||
out << id->title;
|
||||
out << c.generate_system_headers;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user