uml建模工具中bouml的使用(整理版,中英文对照) 下载本文

Go in the Java tab :转到java标签

The principle is the same, applied on Java. 在Java标签内,应用相同的原则。

It is not possible to see the Idl and Php definitions. Why ? Remember, at the beginning I ask you

- 25 -

set the toggle for C++ and Java in the Languages menu, so the definitions for the non toggled languages are hidden. Close the dialog hitting on ok, ask for all the languages through the menu Languages, reedit the attribute and go in the IDL tab :

在这里是不可能看见IDL和Php的定义。为什么?回想一下,在本教程开始时我请求你在语言菜单上设置C++和Java选中开关,这样的话所有未选中的语言将被隐藏。按OK按钮关闭对话框,通过Languages菜单,选中所有语言,再来属性,转到IDL标签。

The declaration is empty ! This is also because Idl was not set in the menu Languages. Hitting the button Default State declaration we have : 声明(declaration)是空的,这还是因为未在Languages 上设置Idl。按Default State declaration 按钮,我们有:

- 26 -

First the visibility is private rather than protected because protected doesn't exist. 首先,的可见性是私有的而不是保护的,因protected在IDL中不存在。

Furthermore ${type} is replaced by long rather than int, this is because the type int doesn't exist in IDL, and the better target is long, magic !

其下,$(type) 由 long 替换,而不是int, 这也是因为在IDL中不存在int 类型,而最好目标类型是long, 太奇了!

They are other type conversions automatically done by BOULM, for instance if you choose any in UML you will have void * in C++, Object in Java and any in IDL. Obviously these conversions are not hard coded, they are set through the generation settings.

它们都是由BOUML自动地转换类型,例如你在UML中选择any类型,你能在C++中得到Void类型,Java中得到Object 类型,而在ODL中得到 any类型。显然的这些转换不是硬编码完成的,而是可以用 generation settings 进行设置的。 Go in the Php tab and ask for the default declaration : 转到Php标签,请求其默认的声明

This is a definition for Php5, if you want to use Php4 the better is to change the visibility to package, and the definition will be :

这是Php5的定义,如果你想使用Php4,最好的方法是针对package 改变可见性,则其定义将是:

- 27 -

The definitions given the default forms with the keywords may also be modified through the generation settings, this allows you to add the '_' to name the attribute in C++ as above etc ... look at the reference manual for more. Remark : when you change the generation settings, the definition of the already existing elements is not changed.

关键字的定义(给出一一个默认的样子)也能够通过generation settings 进行修改。它允许你在C++的代码内在属性名前加上‘_’,如上所述。更多的说明,参阅手册。备注:当你更改generation settings ,已经存在的元素的定义并不改变。 Hit ok to validate the changes. 按OK 校验更改的合法性

Class drawing settings类绘制设置 In the class diagram only the name of the attribute and the operation are visible, not the types nor the visibility, call the class menu in the diagram and change three drawing settings like this :

在类图中,仅可见到属性名和操作名,即见不到类型也不见其可见性,调用类的关联菜单,改变三个drawing settings 如下:

- 28 -