Xcode的UML类图(快速编程) [英] UML class diagrams for Xcode (swift programming)

查看:701
本文介绍了Xcode的UML类图(快速编程)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个iOS移动应用程序。我想知道是否有办法为swift编程语言生成UML类图?
我尝试过Omni Graffle,但它一直说该项目不包含Objective-C接口。 Omni Graffle只为Objective-c做这个。请帮忙。

I have created an iOS mobile application. I wanted to know if there is a way to generate UML Class diagram for swift programming language? I have tried Omni Graffle but it keeps saying that the project doesn't contain Objective-C interfaces. And Omni Graffle only does this for objective-c. Please help.

提前致谢。

推荐答案

不幸的是答案是:你不能这样做。至少不是自动的。 Swift作为编译器本身还有足够的缺陷。单独留下一些工具就可以吞下任何Swift代码。您唯一的选择是良好的旧手动方式。

The answer unfortunately is: you can't do it. At least not automatically. Swift as compiler itself has enough flaws left. Leave alone some tool will be able to swallow any Swift code. Your only alternative is the good old manual way.

我知道Enterprise Architect有可能定义基于BNF的语言语法。但Swift(不幸的是)不是没有上下文的。 (实际上它是如此上下文敏感,它经常吞下它自己的后方。)所以这也不会起作用。

I know that Enterprise Architect has a possibility to define a language syntax based on BNF. But Swift is (again unfortunately) not context free. (In fact it's so context sensitive that it often swallows its own rear.) So that won't work either.

PS:既然Swift是开源的,有人可能会采取有机会为类接口挖掘编译器的输出。我想这应该不会太难,但仍然需要做很多工作。

P.S.: Now that Swift is open source someone might take the opportunity to tap the compiler's output for the class interfaces. I guess that should not be too difficult, but it's a lot of work still.

这篇关于Xcode的UML类图(快速编程)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆