Integrations (PTC products, 3rd party products and code) > Code integration (Ada, ARINC 653, C, C#, C++, IDL, Java, SQL and VB) > Ada Code > Reverse engineering legacy Ada code > Mapping information for Reverse engineering Ada > Type mapping for reverse engineering Ada - subtype type (Ada code)
  
Type mapping for reverse engineering Ada - subtype type (Ada code)
For each subtype, the Reverser creates a Type Definition of either Alias or Sequence construction:
If the base type does not have a constraint, or has a constraint that is not a range constraint, the Construction property of the Type Definition is set to Alias.
If the base type indicator has a range constraint, the Construction property of the Type Definition is set to Sequence:
The lower range value is reverse engineered to the Minimum Size property of the Type Definition.
The upper range value is reverse engineered to the Maximum Size property of the Type Definition.
The Visibility property of the reverse engineered Type Definition is set according to how the type is declared:
If the type is declared in the parent Ada package specification, the Visibility property is set to Public.
If the type is declared in the private region of the parent Ada package specification, the Visibility property is set to protected.
If the type is declared in the parent package body, the Visibility property is set to Private.
The Type Definition is stereotyped by the «Ada Subtype» stereotype.
The Pointer property of the Type Definition is set to FALSE, that is, the Pointer check box on the Type Definition's Property Pages is cleared.
If the base type has a mod constraint, the Type Definition is stereotyped by the «Ada Constraint» stereotype. The mod value is reverse engineered to the tagged value of the Ada Mod tag definition, which is applied to the Type Definition by the «Ada Constraint» stereotype.
If the base type has a delta constraint, the Type Definition is stereotyped by the «Ada Constraint» stereotype. The delta value is reverse engineered to the tagged value of the Ada Delta tag definition, which is applied to the Type Definition by the «Ada Constraint» stereotype.
If the base type has a digits constraint, the Type Definition is stereotyped by the «Ada Constraint» stereotype. The digits value is reverse engineered to the tagged value of the Ada Digits tag definition, which is applied to the Type Definition by the «Ada Constraint» stereotype.
If the type is anonymous, the Type Definition is stereotyped by the «Ada Anonymous» stereotype.
If the type has an attribute designator for the data type, the Type Definition is stereotyped by the «Ada Attribute Designator» stereotype and the tagged value of the Ada 'Attribute tag definition (applied by the «Ada Attribute Designator») is set to the attribute designator.
If the type uses the private keyword, the Type Definition is stereotyped by the «Ada Private» stereotype.
If the type uses the limited private keywords, the Type Definition is stereotyped by the «Ada Private» stereotype and the tagged value of the Ada Limited tag definition (applied by the «Ada Private» stereotype) is set to TRUE.