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

the class picture is now : 类的图像现在是这的:

Do not hesitate to try the other drawing settings, and look at the reference manual for details. 不要犹豫,试一试其它的绘制设置,细节参阅参考手册。

Relations关系

We want to add a mono directional association from C1 to Administrator, hit the corresponding icon on the top of the diagram sub-window and add draw the relation as for the ones in the use case diagram :

我们想增加一个从C1 指向 Administrator 单向关联:在图子窗口的顶上点击相应的图标,如同用例图中一样增加绘制此关系。

- 29 -

As you can see the relation is added in the browser, by default its name is , edit the relation :

正如你所见,关联加入到了浏览器中,默认的,它的名字是 编辑此关联:

- 30 -

Like for the attributes we have the tab for UML and each language. 如同attributes 一样, 我们有UML标签和其它语言标签。

Because the relation is unidirectional only one role is editable. Like for the attributes and operation the default visibility is specified by the Class settings. The role name will produce the name of the member, and we found the flags already existing for the attributes : there no difference between a relation and an attribute for the generation point of view.

因关联是单向的,所以仅一极(关联的一极)是可编缉的。如同属性和操作,默认的可见性由Class settings 设定。角色名将产生成员名,我们发现已经存在属性的标志:从生成代码的观点来看,一个关联和属性之前没有差异 Name the relation admin and go in the C++ tab : 给关联命名Admin ,转到C++标签:

By default an association and an aggregation produce a pointer in C++, an aggregation by value will not produce a pointer. Obviously this default definition may be changed through the generation settings or just for this relation.

默认情况下,在C++代码中,一个关联和一个聚合产生一个指针,由值给出的聚合将不会产

- 31 -

生指针。显然,其默认的定义可通过generation settings 来改变。 Go in the Java tab :转到java标签:

Go in the Php tab :在转到php标签:

- 32 -