Role mapping for IDL (IDL code)
ACS generates Roles as attributes. ACS generates code similar to this:
// Role declarations
Class1 MyRole
ACS uses Roles for generating the content of a Deployment Plan's Component Deployment Plan (CDP) file.
Reverser Notes: When reverse engineering an attribute, the Reverser will reverse engineer the attribute as a Role if all of the following statements are true:
• The IDL attribute's data type can be identified as a class, connector, message, structure or value type in the code being reverse engineered.
• The IDL item that is used as a data type is being reverse engineered.
• The Reverser cannot match the IDL attribute to an Attribute in the Model.
The generation of a Role in an IDL file is derived from its properties.
Constants
To model a constant, make the Role read-only, specify the default value and apply the «CORBAConstant» stereotype.
To model a module scoped constant. Create a Class named Constants that is scoped to the Package that represents the module, and apply the «CORBAConstants» stereotype to that Class. Create a Role as a child of the Constants class, make the Role read-only, specify the default value and apply the «CORBAConstant» stereotype.
ACS generates code similar to this for a constant:
const char MyConstant = Class1
Child items:
Not applicable.
Properties:
• ACS generates the target of the Role as the attribute's data type.
• If the Multiplicity property is set to 'only one', ACS generates the attribute declaration as having a single value. If the Multiplicity property is set to a value that isn't 'only one', ACS generates the attribute declaration as a sequence.
• ACS generates the Name property as the name of the attribute in the code.
Note ACS may modify the attribute name that is added to the code to make it valid for IDL. You can specify the exact attribute name to add to the code through the CODE_GENERATION_NAME property of a Role.
Tell me more... • If the Read Only property is set to TRUE (Read Only check box selected on Property Pages), ACS generates the attribute declaration as readonly or const as appropriate.
Other properties are ignored.
Tag Definitions:
If you have applied the «key» stereotype to the Role, a key comment is appended to the declaration of the member of a struct.