Added parents (base classes) diagram filter

This commit is contained in:
Bartek Kryza
2023-03-06 22:32:02 +01:00
parent 8ba0239283
commit 8f99e2fc2f
11 changed files with 158 additions and 0 deletions

View File

@@ -69,6 +69,8 @@ struct filter {
std::vector<std::string> subclasses;
std::vector<std::string> parents;
std::vector<std::string> specializations;
std::vector<std::string> dependants;

View File

@@ -275,6 +275,9 @@ template <> struct convert<filter> {
if (node["subclasses"])
rhs.subclasses = node["subclasses"].as<decltype(rhs.subclasses)>();
if (node["parents"])
rhs.parents = node["parents"].as<decltype(rhs.parents)>();
if (node["specializations"])
rhs.specializations =
node["specializations"].as<decltype(rhs.specializations)>();

View File

@@ -69,6 +69,8 @@ YAML::Emitter &operator<<(YAML::Emitter &out, const filter &f)
<< f.specializations;
if (!f.subclasses.empty())
out << YAML::Key << "subclasses" << YAML::Value << f.subclasses;
if (!f.parents.empty())
out << YAML::Key << "parents" << YAML::Value << f.parents;
out << YAML::EndMap;
return out;