Fixed package generation in class diagrams
This commit is contained in:
@@ -169,6 +169,31 @@ bool diagram::should_include(const std::string &name_) const
|
||||
return false;
|
||||
}
|
||||
|
||||
bool diagram::should_include_package(const std::string &name) const
|
||||
{
|
||||
|
||||
for (const auto &ex : exclude().namespaces) {
|
||||
if (name.find(ex) == 0) {
|
||||
LOG_DBG("Skipping from diagram: {}", name);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// If no inclusive namespaces are provided,
|
||||
// allow all
|
||||
if (include().namespaces.empty())
|
||||
return true;
|
||||
|
||||
for (const auto &in : include().namespaces) {
|
||||
if (in.find(name) == 0 || name.find(in) == 0)
|
||||
return true;
|
||||
}
|
||||
|
||||
LOG_DBG("Skipping from diagram: {}", name);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool diagram::should_include(const clanguml::common::model::scope_t scope) const
|
||||
{
|
||||
for (const auto &s : exclude().scopes) {
|
||||
|
||||
@@ -103,6 +103,8 @@ struct diagram : public inheritable_diagram_options {
|
||||
|
||||
bool should_include_relationship(const std::string &rel);
|
||||
|
||||
bool should_include_package(const std::string &name) const;
|
||||
|
||||
bool should_include(
|
||||
const std::pair<std::vector<std::string>, std::string> &name) const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user