Added package dependencies and dependants filter

This commit is contained in:
Bartek Kryza
2022-04-18 19:29:08 +02:00
parent 2043727565
commit 5b8e40c1eb
29 changed files with 359 additions and 92 deletions

View File

@@ -26,6 +26,8 @@
#include "common/model/stylable_element.h"
#include "type_alias.h"
#include <type_safe/reference.hpp>
#include <string>
#include <vector>
@@ -90,3 +92,17 @@ private:
};
}
namespace std {
template <>
struct hash<
type_safe::object_ref<const clanguml::class_diagram::model::class_>> {
std::size_t operator()(const type_safe::object_ref<
const clanguml::class_diagram::model::class_> &key) const
{
using clanguml::class_diagram::model::class_;
return std::hash<std::string>{}(key.get().full_name(false));
}
};
}

View File

@@ -192,3 +192,11 @@ std::string diagram::to_alias(const std::string &full_name) const
}
}
namespace clanguml::common::model {
template <>
bool check_diagram_type<clanguml::class_diagram::model::diagram>(diagram_t t)
{
return t == diagram_t::kClass;
}
}

View File

@@ -83,17 +83,7 @@ private:
};
}
namespace std {
namespace clanguml::common::model {
template <>
struct hash<
type_safe::object_ref<const clanguml::class_diagram::model::class_>> {
std::size_t operator()(const type_safe::object_ref<
const clanguml::class_diagram::model::class_> &key) const
{
using clanguml::class_diagram::model::class_;
return std::hash<std::string>{}(key.get().full_name(false));
}
};
}
bool check_diagram_type<clanguml::class_diagram::model::diagram>(diagram_t t);
}