- 3
- 0
- 约1.7万字
- 约 90页
- 2016-12-28 发布于北京
- 举报
例6.1:取消目标模型元素的自关联 mapping Line::lineToline():Line when { not (not self.source-resolveoneIn(ellipse::eTc)-isEmpty() and not self.tareget-resolveoneIn(ellipse::eTc)-isEmpty() and self.source-resolveoneIn(ellipse::eTc)=self.tareget-resolveoneIn(ellipse::eTc)) } { …… } 在lineToline中加入when 子句 Evaluation only. Created with Aspose.Slides for .NET 3.5 Client Profile . Copyright 2004-2011 Aspose Pty Ltd. 取消目标模型元素的自关联 Evaluation only. Created with Aspose.Slides for .NET 3.5 Client Profile . Copyright 2004-2011 Aspose Pty Ltd. 抽象工厂模式转化为一般工厂模式 Evaluation only. Created with Aspose.Slides for .NET 3.5 Client Profile . Copyright 2004-2011 Aspose Pty Ltd. 将相同的子结构提取出来 Evaluation only. Created with Aspose.Slides for .NET 3.5 Client Profile . Copyright 2004-2011 Aspose Pty Ltd. 将相同的子结构提取出来 modeltype simplegraph uses http://simplegragh/; transformation NewTransformation(in source : simplegraph, out target:simplegraph); main() { source.objectsOfType(simplediagram)-map SDToSD(); } mapping simplediagram::SDToSD():simplediagram { self.nodes-forEach(r) { // result.nodes+=self.findNodeWithSameEllipse(r); if self.findNodeWithSameEllipse(r)-isEmpty() or self.findNodeWithSameEllipse(r)=null then result.nodes+=r.map NodeTNode() else { var f:=resolveIn(abstractsubnode, node)-select(e|e.nodename=father and ponents[ellipse]-first().nodename=ponents[ellipse]-first().nodename); if f-notEmpty() then {continue} endif; self.findNodeWithSameEllipse(r)-forEach(k){ result.nodes+= map abstractsubnode(r,k).father; result.lines+= map abstractsubnode(r,k).l1; result.nodes+= map abstractsubnode(r,k).son; } } endif } ; result.lines+=self.lines-map lineToline(); } Evaluation only. Created with Aspose.Slides for .NET 3.5 Client Profile . Copyright 2004-2011 Aspose Pty Ltd. 将相同的子结构提取出来 mapping node::NodeTNode():node{ result.nodename:=self.nodename; result.to:=self.to-map lineToline(); result._from:=self._from-map lineToline(); ponents:=ponents[ellipse]-map el
您可能关注的文档
最近下载
- NB/T 41004-2014_电能质量现象分类.pdf VIP
- 2025年医学课件-胸痛的鉴别诊断.pptx VIP
- 默纳克NICE2000new扶梯一体化控制器用户手册-赤峰特种设备.PDF VIP
- ISO22163:2023检查表(完整版) Assessment sheet IRIS 04.xlsx VIP
- 国家核安保技术中心2026年社会公开招聘工作人员备考题库有答案详解.docx VIP
- 中专毕业生登记表.docx VIP
- ISO22163内审员培训试卷附答案.doc VIP
- 2026年广州水务项目经理考试大纲及题目解析.docx VIP
- 数学-云南省师大附中2024届高考适应性月考卷(八)试题和答案.docx VIP
- AQ 2083-2025 陆上石油天然气钻井安全规范.docx
原创力文档

文档评论(0)