#include "UmlDeploymentView.h" #include "FileOut.h" bool UmlDeploymentView::write_if_needed(FileOut & out) { const QVector ch = children(); unsigned n = ch.size(); bool used = FALSE; for (unsigned i = 0; i != n; i += 1) used |= ch[i]->write_if_needed(out); if (used && _gen_views) { out.indent(-1); out.indent(); out << "\n"; out.indent(-1); out.indent(); out << "\n"; } return used; } void UmlDeploymentView::write(FileOut & out) { if (!_written) { _written = TRUE; parent()->write(out); if (_gen_views) { out.indent(); out << "\n"; out.indent(+1); write_stereotype(out); write_description_properties(out); out.indent(); out << "\n"; out.indent(+1); } } }