73 const std::string &full_name)
const
76 find<class_>(full_name);
81 res = find<enum_>(full_name);
86 res = find<concept_>(full_name);
91 res = find<objc_interface>(full_name);
101 res = find<class_>(
id);
106 res = find<enum_>(
id);
111 res = find<concept_>(
id);
116 res = find<objc_interface>(
id);
122bool diagram::add_with_namespace_path<common::model::package>(
123 std::unique_ptr<common::model::package> &&p)
125 LOG_DBG(
"Adding namespace package: {}, {}", p->name(), p->full_name(
true));
127 auto ns = p->get_relative_namespace();
131 return add_element(ns, std::move(p));
135bool diagram::add_with_filesystem_path<common::model::package>(
137 std::unique_ptr<common::model::package> &&p)
139 auto ns = p->get_relative_namespace();
141 LOG_DBG(
"Adding filesystem package: {}, {}, {}", p->name(),
142 p->full_name(
true), ns.to_string());
144 return add_element(ns, std::move(p));
148bool diagram::add_with_module_path<common::model::package>(
150 std::unique_ptr<common::model::package> &&p)
152 LOG_DBG(
"Adding module package: {}, {}", p->name(), p->full_name(
true));
154 auto ns = p->get_relative_namespace();
156 return add_element(ns, std::move(p));
162 bool found_new{
false};
163 for (
const auto &parent : parents) {
164 for (
const auto &rel : parent.get().relationships()) {
168 auto p = find<class_>(rel.destination());
171 auto [it, found] = parents.emplace(std::ref(p.value()));
176 LOG_WARN(
"Couldn't find class representing base class: {}",
177 rel.destination().value());
190 [
id](
const auto &c) {
return c.get().
id() ==
id; });
196 [
id](
const auto &c) {
return c.get().
id() ==
id; });
202 [
id](
const auto &c) {
return c.get().
id() ==
id; });
208 [
id](
const auto &c) {
return c.get().
id() ==
id; });
213 LOG_TRACE(
"Looking for alias for {}",
id);
215 for (
const auto &c :
classes()) {
216 if (c.get().id() == id) {
217 return c.get().alias();
221 for (
const auto &e :
enums()) {
222 if (e.get().id() == id)
223 return e.get().alias();
227 if (c.get().id() == id)
228 return c.get().alias();
232 if (c.get().id() == id)
233 return c.get().alias();
246 for (
const auto &el : elements_view) {
247 std::set<eid_t> dependency_relationships_to_remove;
249 for (
auto &r : el.get().relationships()) {
250 if (r.type() != relationship_t::kDependency)
251 dependency_relationships_to_remove.emplace(r.destination());
255 [&dependency_relationships_to_remove, &el](
const auto &r) {
256 if (r.type() != relationship_t::kDependency)
259 auto has_another_relationship_to_destination =
260 dependency_relationships_to_remove.count(
261 r.destination()) > 0;
262 auto is_self_dependency = r.destination() == el.get().id();
264 return has_another_relationship_to_destination ||
274 std::set<eid_t> to_remove;
278 for (
const auto &el : elements_view)
280 to_remove.emplace(el.get().id());
283 if (to_remove.empty())
299 for (
const auto &el : elements_view)
300 el.get().apply_filter(
filter(), to_remove);
314bool check_diagram_type<clanguml::class_diagram::model::diagram>(
diagram_t t)
316 return t == diagram_t::kClass;