Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Mastering UML with Rational Rose 2002.pdf
Скачиваний:
137
Добавлен:
02.05.2014
Размер:
9.68 Mб
Скачать

Chapter 17: CORBA/IDL Code Generation and Reverse Engineering

Association (Role) Properties

Role properties are the CORBA properties that deal with associations. Using these properties, you can control the code generated for the associations.

Because roles are implemented as attributes, many of the code−generation properties are identical for an attribute and a role. Two properties, however, are unique to roles: GenerateForwardReference and BoundedRoleType.

There are three places to set role properties. To set them for all associations, select Tools → Options, then click the CORBA tab and select Role from the drop−down list box. To set them for only one association, select the CORBA tab on the association's standard specification window, or open the CORBA specification

579

Chapter 17: CORBA/IDL Code Generation and Reverse Engineering

window for the association and edit the properties there.

Table 17.6 lists the code−generation properties for associations, their purposes, and their default values.

Table 17.6: CORBA Code−Generation Association Properties

Property

Purpose

Default

ArrayDimensions

Sets the array dimensions used for an exception,

<blank>

 

struct, or union when the BoundedRoleType

 

 

association property is set to Array

 

CaseSpecifier

Sets the label of the case statement of a union

<blank>

GenerateForwardReference

Controls whether a referenced interface is included

#include (False)

 

with an #include statement or a forward reference

 

IsReadOnly

Controls whether the generated attribute is read only

False

Order

Sets the order of attributes and roles generated

<blank>

BoundedRoleType

If the relationship multiplicity is greater than one,

Sequence

 

controls whether an array or sequence is used for the

 

 

generated attribute

 

These properties can also be set using the CORBA Attribute Specification window:

Dependency Properties

The dependency properties are the CORBA properties that control how dependency relationships are generated.

580