Added module_access diagram filter (#101)

This commit is contained in:
Bartek Kryza
2023-12-19 22:16:18 +01:00
parent c51ae5b6ee
commit f09edd8b47
16 changed files with 189 additions and 5 deletions

View File

@@ -1278,6 +1278,22 @@ bool IsClass(const nlohmann::json &j, const std::string &name)
return e && e->at("type") == "class";
}
bool InPublicModule(const nlohmann::json &j, const std::string &element,
const std::string &module)
{
auto e = get_element(j, expand_name(j, element));
return e && e->contains("module") && e->at("module")["name"] == module &&
!e->at("module")["is_private"];
}
bool InPrivateModule(const nlohmann::json &j, const std::string &element,
const std::string &module)
{
auto e = get_element(j, expand_name(j, element));
return e && e->contains("module") && e->at("module")["name"] == module &&
e->at("module")["is_private"];
}
bool IsAbstractClass(const nlohmann::json &j, const std::string &name)
{
auto e = get_element(j, expand_name(j, name));