Added element_types diagram filter (#131)

This commit is contained in:
Bartek Kryza
2023-05-08 22:53:21 +02:00
parent f8876b1ed0
commit dec4b7bc3d
11 changed files with 141 additions and 0 deletions

View File

@@ -61,6 +61,12 @@ struct filter {
std::vector<std::string> elements;
// E.g.:
// - class
// - enum
// - concept
std::vector<std::string> element_types;
// E.g.:
// - inheritance/extension
// - dependency

View File

@@ -301,6 +301,10 @@ template <> struct convert<filter> {
if (node["elements"])
rhs.elements = node["elements"].as<decltype(rhs.elements)>();
if (node["element_types"])
rhs.element_types =
node["element_types"].as<decltype(rhs.element_types)>();
if (node["access"])
rhs.access = node["access"].as<decltype(rhs.access)>();

View File

@@ -60,6 +60,8 @@ YAML::Emitter &operator<<(YAML::Emitter &out, const filter &f)
out << YAML::Key << "dependencies" << YAML::Value << f.dependencies;
if (!f.elements.empty())
out << YAML::Key << "elements" << YAML::Value << f.elements;
if (!f.element_types.empty())
out << YAML::Key << "element_types" << YAML::Value << f.element_types;
if (!f.paths.empty())
out << YAML::Key << "paths" << YAML::Value << f.paths;
if (!f.relationships.empty())