Integrations (PTC products, 3rd party products and code) > Code integration (Ada, ARINC 653, C, C#, C++, IDL, Java, SQL and VB) > IDL Code > IDL items (reference information) > Attribute item (IDL code)
  
Attribute item (IDL code)
After adding the IDL profile to a model, both standard UML Attributes and IDL Attributes are available in the model. When you create an IDL Attribute, the IDL profile creates a UML Attribute and applies the «IDLAttribute» stereotype to it.
IDL Attributes are generated with the attribute keyword and you can specify getraises and setraises exceptions.
The following item types can own IDL Attributes:
Component
Connector
Interface
Port Type
Value Type
Create an IDL Attribute for an item through its context menu: right-click the owning item, point to New, and then click IDL Attribute. An Interface can own an IDL Attribute, but for an Interface you must create a standard Attribute and then apply the «IDLAttribute» stereotype to it.
When you create an IDL Attribute you must select a Basic Type, Class, Data Type, Message, Structure, Type Definition or Value Type to use as a type.
To specify the Exception to run for the Attribute's getraises exception: on the Attribute's Property Pages, click the Attribute tab, and set the tagged value of the getraises property to the Exception.
To specify the Exception to run for the Attribute's setraises exception: on the Attribute's Property Pages, click the Attribute tab, and set the tagged value of the setraises property to the Exception.
If the Attribute is a constant, apply the «CORBAConstant» stereotype to the Attribute. For Module scoped constants, create the stereotyped Attributes in a Package scoped Class that is by the «CORBAConstants» stereotype and named Constants.
The following sections provide information about how Attribute is used in the model.
Owned By
Component
Connector
Port Type
Interface (UML item)
Value Type
Owns
None.
Shown on these diagrams
Component Definition Diagram
IDL Profile properties
The «IDLAttribute» stereotype applies the following Tag Definitions.
Constant - specifies whether the attribute is a constant.
getraises - shows the Exception that is run for the Attribute's getraises exception.
setraises - shows the Exception that is run for the Attribute's setraises exception.