#include "UmlTransition.h" #include "FileOut.h" void UmlTransition::memo_incoming_trans() { (dynamic_cast(target()))->add_incoming_trans(this); } void UmlTransition::write(FileOut & out) { UmlStateItem * x = dynamic_cast(parent()->parent()); if (x == 0) x = dynamic_cast(parent()); x->memo_trans(this); out.indent(); out << "\n"; } void UmlTransition::write_it(FileOut & out) { out.indent(); out << "\n"; out.indent(+1); QCString trig; QCString grd; QCString effect; switch (_lang) { case Uml: trig = trigger(); grd = guard(); effect = activity(); break; case Cpp: trig = cppTrigger(); grd = cppGuard(); effect = cppActivity(); break; default: // Java trig = javaTrigger(); grd = javaGuard(); effect = javaActivity(); break; } if (! trig.isEmpty()) { out.indent(); out << "\n"; } if (! grd.isEmpty()) { out.indent(); out << "\n"; out.indent(); out << "\t\n"; out.indent(); out << "\t\t"; out.quote(grd); out << "\n"; out.indent(); out << "\t\n"; out.indent(); out << "\n"; } if (! effect.isEmpty()) { out.indent(); out << "\n"; out.indent(); out << "\t"; out.quote(effect); out << "\n"; out.indent(); out << "\n"; } out.indent(-1); out.indent(); out << "\n"; unload(); } void UmlTransition::write_in(FileOut & out) { out.indent(); out << "\n"; }