企业架构师操作前/后条件

时间:2018-06-22 09:40:40

标签: c uml enterprise-architect operations post-conditions

我正在使用EA建模某些c组件。我知道EA无法与C语言一起有效地使用,但我正在努力尽可能地坚持每个元素的预期用法。

我的问题...我正在使用一个类对C文件进行建模,并使用此类内的操作对函数进行建模。我的函数需要在开始之前接收一些值,并在完成之后发送其他值,我可以使用Operation的Pre和Post-Coditions在模型中表示它,还是不适合这个位置?如果没有的话,我该如何以正确的方式在模型中表示这一点

1 个答案:

答案 0 :(得分:0)

我不认为这是前提条件。而是需要一个接口来与某些对象模型对话。如我所见,您的主要组件是用C编写的,只使用了一些面向对象的东西。在这种情况下,您需要可以在C代码中使用的适配器。那可能由public class XPathCheck { public static void main(String[] args) throws FileNotFoundException, IOException, XPathExpressionException { XPathFactory xpf = XPathFactory.newInstance(); XPath xpath = xpf.newXPath(); try (InputStream file = new FileInputStream(Paths.get("src", "inputFile.xml").toFile())) { String strExprssion = "//urn:or-HourlyHistoricalPrice:HourlyHistoricalPrice[urn:or-HourlyHistoricalPrice:refSource='AIBO']"; XPathExpression expression = xpath.compile(strExprssion); NodeList nodes = (NodeList) expression.evaluate(new InputSource(file), XPathConstants.NODESET); System.out.println(nodes.getLength()); } } } 组成,反之亦然由send(module, operation, parameters...)组成,它将与OO东西进行同步。因为需要澄清很多约束,所以在此答案中将不提供详细信息。

相关问题