#include "UmlNcRelation.h"
#include "FileOut.h"
bool UmlNcRelation::write_if_needed(FileOut & out) {
parent()->write(out);
if (relationKind() == aGeneralisation)
write_generalization(out);
else
write_dependency(out);
return TRUE;
}
void UmlNcRelation::write_generalization(FileOut & out) {
out.indent();
out << "\n";
out.indent();
out << "\t";
parent()->ref(out);
out << "\n";
out.indent();
out << "\t";
target()->ref(out);
out << "\n";
out.indent(+1);
write_stereotype(out);
write_description_properties(out);
out.indent(-1);
out.indent();
out << "\n";
}
void UmlNcRelation::write_dependency(FileOut & out) {
out.indent();
out << "\n";
out.indent(+1);
write_stereotype(out);
write_description_properties(out);
out.indent(-1);
out.indent();
out << "\n";
}