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 LOG_DBG(
"Adding filesystem package: {}, {}", p->name(), p->full_name(
true));
141 auto ns = p->get_relative_namespace();
143 return add_element(ns, std::move(p));
147bool diagram::add_with_module_path<common::model::package>(
149 std::unique_ptr<common::model::package> &&p)
151 LOG_DBG(
"Adding module package: {}, {}", p->name(), p->full_name(
true));
153 auto ns = p->get_relative_namespace();
155 return add_element(ns, std::move(p));
161 bool found_new{
false};
162 for (
const auto &parent : parents) {
163 for (
const auto &rel : parent.get().relationships()) {
167 auto p = find<class_>(rel.destination());
170 auto [it, found] = parents.emplace(std::ref(p.value()));
175 LOG_WARN(
"Couldn't find class representing base class: {}",
176 rel.destination().value());
189 [
id](
const auto &c) {
return c.get().
id() ==
id; });
195 [
id](
const auto &c) {
return c.get().
id() ==
id; });
201 [
id](
const auto &c) {
return c.get().
id() ==
id; });
207 [
id](
const auto &c) {
return c.get().
id() ==
id; });
212 LOG_DBG(
"Looking for alias for {}",
id);
214 for (
const auto &c :
classes()) {
215 if (c.get().id() == id) {
216 return c.get().alias();
220 for (
const auto &e :
enums()) {
221 if (e.get().id() == id)
222 return e.get().alias();
226 if (c.get().id() == id)
227 return c.get().alias();
231 if (c.get().id() == id)
232 return c.get().alias();
245 for (
const auto &el : elements_view) {
246 std::set<eid_t> dependency_relationships_to_remove;
248 for (
auto &r : el.get().relationships()) {
249 if (r.type() != relationship_t::kDependency)
250 dependency_relationships_to_remove.emplace(r.destination());
254 [&dependency_relationships_to_remove, &el](
const auto &r) {
255 if (r.type() != relationship_t::kDependency)
258 auto has_another_relationship_to_destination =
259 dependency_relationships_to_remove.count(
260 r.destination()) > 0;
261 auto is_self_dependency = r.destination() == el.get().id();
263 return has_another_relationship_to_destination ||
273 std::set<eid_t> to_remove;
276 for (
const auto &el : elements_view)
278 to_remove.emplace(el.get().id());
289 for (
const auto &el : elements_view)
290 el.get().apply_filter(
filter(), to_remove);
304bool check_diagram_type<clanguml::class_diagram::model::diagram>(
diagram_t t)
306 return t == diagram_t::kClass;