Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- modeltype FA uses "http://www.example.org/fireAlarm";
- modeltype GVIZ uses "http://www.fujaba.de/graphviz/0.1.0";
- transformation FireAlarmToGraphViz(in fa:FA, out gv:GVIZ);
- main() {
- fa.rootObjects()[FireAlarmInstallation] -> map FireAlarmToGraphViz();
- }
- mapping FA::FireAlarmInstallation::FireAlarmToGraphViz(): GVIZ::dot::DotGraph{
- id := self.name;
- nodes := self->collect(d | d.domain) -> map DomainToNodes();
- edges := self->collect(d | d.domain) -> map CreateEdges();
- }
- mapping FA::Domain::DomainToNodes(): GVIZ::dot::DotNode{
- name := self.name;
- }
- mapping FA::Domain::CreateEdges(): GVIZ::dot::DotEdge{
- source := self.resolveoneIn(FA::Domain::DomainToNodes, GVIZ::dot::DotNode);
- }
- mapping FA::OperationZones::OperationZonesToNodes(): GVIZ::dot::DotNode{
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement