29 , together_group_stack_{
false}
35 ostr <<
"flowchart\n";
39 const package &p, std::ostream &ostr)
const
44 if (
model().should_include(relationship_t::kDependency)) {
46 std::stringstream relstr;
48 auto destination_package =
model().get(r.destination());
50 if (!destination_package)
53 auto destination_alias =
model().to_alias(r.destination());
54 if (!destination_alias.empty()) {
55 relstr << p.
alias() <<
" -.-> " << destination_alias
57 ostr << indent(1) << relstr.str();
61 LOG_DBG(
"=== Skipping dependency relation from {} to {} due "
63 p.
full_name(
false), r.destination(), e.what());
69 for (
const auto &subpackage : p) {
71 dynamic_cast<const package &
>(*subpackage), ostr);
81 const auto &uns =
config().using_namespace();
85 if (!uns.starts_with({p.full_name(false)})) {
86 ostr << indent(1) <<
"subgraph " << p.
alias() <<
"[" << p.
name()
90 ostr << indent(1) <<
"%% <<deprecated>>\n";
93 for (
const auto &subpackage : p) {
94 auto &pkg =
dynamic_cast<package &
>(*subpackage);
95 auto together_group =
config().get_together_group(pkg.full_name(
false));
106 if (!uns.starts_with({p.full_name(false)})) {
107 ostr << indent(1) <<
"end" <<
'\n';
110 if (
config().generate_links) {
121 for (
const auto &[group_name, group_elements] :
123 ostr << indent(1) <<
"%% together group - not rendered in MermaidJS \n";
125 for (
auto *pkg : group_elements) {
129 ostr << indent(1) <<
"%% end together group\n";
139 for (
const auto &decorator : element.
decorators()) {
140 auto note = std::dynamic_pointer_cast<decorators::note>(decorator);
141 if (note && note->applies_to_diagram(
config.name)) {
142 auto note_id_str = fmt::format(
"N_{}",
note_id_++);
144 ostr << indent(1) << note_id_str <<
"(" << note->text <<
")\n";
146 ostr << indent(1) << note_id_str <<
"-.-" << element.
alias()
154 for (
const auto &p :
model()) {
155 auto &pkg =
dynamic_cast<package &
>(*p);
156 auto together_group =
config().get_together_group(pkg.full_name(
false));
157 if (together_group) {
168 for (
const auto &p :
model()) {