Added generate_packages option to class_diagrams
This commit is contained in:
@@ -396,6 +396,7 @@ template <> struct convert<class_diagram> {
|
||||
get_option(node, rhs.layout);
|
||||
get_option(node, rhs.include_relations_also_as_members);
|
||||
get_option(node, rhs.generate_method_arguments);
|
||||
get_option(node, rhs.generate_packages);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -476,6 +477,7 @@ template <> struct convert<config> {
|
||||
get_option(node, rhs.include_relations_also_as_members);
|
||||
get_option(node, rhs.puml);
|
||||
get_option(node, rhs.generate_method_arguments);
|
||||
get_option(node, rhs.generate_packages);
|
||||
|
||||
auto diagrams = node["diagrams"];
|
||||
|
||||
|
||||
@@ -87,6 +87,8 @@ struct inheritable_diagram_options {
|
||||
option<plantuml> puml{"plantuml", option_inherit_mode::append};
|
||||
option<method_arguments> generate_method_arguments{
|
||||
"generate_method_arguments", method_arguments::full};
|
||||
option<bool> generate_packages{
|
||||
"generate_packages", false};
|
||||
|
||||
void inherit(const inheritable_diagram_options &parent);
|
||||
};
|
||||
|
||||
@@ -56,6 +56,8 @@ template <typename T> struct option {
|
||||
}
|
||||
}
|
||||
|
||||
void operator()(const T &v) { set(v); }
|
||||
|
||||
T &operator()() { return value; }
|
||||
|
||||
const T &operator()() const { return value; }
|
||||
|
||||
@@ -33,6 +33,7 @@ TEST_CASE("Test config simple", "[unit-test]")
|
||||
CHECK(clanguml::util::contains(diagram.using_namespace(), "clanguml"));
|
||||
CHECK(diagram.generate_method_arguments() ==
|
||||
clanguml::config::method_arguments::full);
|
||||
CHECK(diagram.generate_packages() == true);
|
||||
}
|
||||
|
||||
TEST_CASE("Test config inherited", "[unit-test]")
|
||||
|
||||
@@ -9,6 +9,7 @@ diagrams:
|
||||
using_namespace:
|
||||
- clanguml
|
||||
generate_method_arguments: full
|
||||
generate_packages: true
|
||||
include:
|
||||
namespaces:
|
||||
- clanguml
|
||||
|
||||
Reference in New Issue
Block a user