Added package diagram decorators test case

This commit is contained in:
Bartek Kryza
2022-01-26 20:11:22 +01:00
parent 62b2c73213
commit 3d074f1ddd
8 changed files with 114 additions and 6 deletions
@@ -86,7 +86,6 @@ void generator::generate_relationships(
// Generate this packages relationship
if (m_config.should_include_relationship("dependency")) {
LOG_DBG("LOOKING FOR RELATIONSHIPS IN PACKAGE: {}", p.full_name(false));
for (const auto &r : p.relationships()) {
std::stringstream relstr;
try {
+1
View File
@@ -122,6 +122,7 @@ public:
bool is_deprecated() const;
void set_deprecated(bool deprecated);
private:
bool is_deprecated_{false};
};
@@ -106,6 +106,12 @@ void translation_unit_visitor::operator()(const cppast::cpp_entity &file)
p->set_name(e.name());
p->set_namespace(package_parent);
if (ns_declaration.comment().has_value())
p->add_decorators(decorators::parse(
ns_declaration.comment().value()));
p->set_style(p->style_spec());
for (const auto &attr :
ns_declaration.attributes()) {
if (attr.kind() ==
@@ -115,10 +121,12 @@ void translation_unit_visitor::operator()(const cppast::cpp_entity &file)
}
}
ctx.diagram().add_package(
package_parent, std::move(p));
ctx.set_current_package(
ctx.diagram().get_package(package_path));
if (!p->skip()) {
ctx.diagram().add_package(
package_parent, std::move(p));
ctx.set_current_package(
ctx.diagram().get_package(package_path));
}
}
ctx.push_namespace(e.name());