Added module_access diagram filter (#101)
This commit is contained in:
@@ -29,6 +29,7 @@ namespace YAML {
|
||||
using clanguml::common::namespace_or_regex;
|
||||
using clanguml::common::string_or_regex;
|
||||
using clanguml::common::model::access_t;
|
||||
using clanguml::common::model::module_access_t;
|
||||
using clanguml::common::model::relationship_t;
|
||||
using clanguml::config::callee_type;
|
||||
using clanguml::config::class_diagram;
|
||||
@@ -241,6 +242,23 @@ template <> struct convert<access_t> {
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// config module_access_t decoder
|
||||
//
|
||||
template <> struct convert<module_access_t> {
|
||||
static bool decode(const Node &node, module_access_t &rhs)
|
||||
{
|
||||
if (node.as<std::string>() == "public")
|
||||
rhs = module_access_t::kPublic;
|
||||
else if (node.as<std::string>() == "private")
|
||||
rhs = module_access_t::kPrivate;
|
||||
else
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// config method_type decoder
|
||||
//
|
||||
@@ -483,6 +501,10 @@ template <> struct convert<filter> {
|
||||
rhs.modules.push_back({ns});
|
||||
}
|
||||
|
||||
if (node["module_access"])
|
||||
rhs.module_access =
|
||||
node["module_access"].as<decltype(rhs.module_access)>();
|
||||
|
||||
if (node["relationships"])
|
||||
rhs.relationships =
|
||||
node["relationships"].as<decltype(rhs.relationships)>();
|
||||
|
||||
Reference in New Issue
Block a user