StarUML 生成 C++代码
我是 UML 新手,我已经为凭证用户界面编写了一个序列图,这是我为学习 UML 所做的一个小宠物项目。我已经在 StarUML 中编写了一个不错的序列图,现在我想生成 C++ 代码,步骤非常简单我只需转到 Tools/C++/Generate Code...
I'm new to UML and I have written a Sequence diagram for a Voucher User Interface, it is a small pet project I'm doing to learn UML. I have written a decent Sequence Diagram in StarUML and now I would like to generate the C++ code, the step is very simple I just go to Tools/C++/Generate Code... But there I face a problem, which you can understand from the screen captures below. I tried various places but I could not find any help, anyone experienced in StarUML who could help me go further?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
有一段时间没有使用 starUML,所以事情可能已经改变了。但是:
上次我查看时,它没有提供行为代码生成的模板。唯一的代码生成模板用于静态结构(类、属性、包)。如果情况仍然如此,那么我怀疑空面板是由于找不到任何合适的模型元素来生成代码而产生的。即您的序列图包中没有任何类。
您也许可以通过查看代码生成模板来解决这个问题;它们应该位于
hth 中。
Haven't used starUML for a while so things may have changed. But:
Last time I looked, it didn't provide templates for behavioural code generation. The only codegen templates were for static structure (classes, attributes, packages). If that's still the case then I suspect the empty panel arises from it not finding any suitable model elements to generate code for. i.e. your Sequence Diagram package doesn't have any classes in it.
You might be able to work it out by looking at the codegen templates; they should be in
<STARUML_INSTALL_PATH>\modules\staruml-generator\templates
hth.
我只是尝试从 start uml 生成代码。
版本为 5.0.3.1570。效果很好。
我立即得到了图表。
一个问题是,它实际上没有生成组合/聚合内容,但是我手动完成了这一操作。
因为它对我的组织有好处,所以我不能陶醉,但是,顺序和你的一模一样。
我选择设计模型&然后在对话框中给出文件路径。
I just tried to generate the code from start uml.
With Version 5.0.3.1570. It works well.
I got the diagram instantly.
One issue, it actually did not generate the composition / aggregation stuff but, then, I did that manually.
Since its propitiatory for my organization, I cannot revel but, sequence is exactly the same as of yours.
I choose Design model & then gave file path in dialog box.