Prev Next

Ada 2012 Conventions

Enterprise Architect supports round trip engineering of Ada 2012, where these conventions are used.

Stereotypes

Stereotype

Applies To

See also

adaPackage

Class

Corresponds To: A Package specification in Ada 2012 without a tagged record.

adaProcedure

Class

Corresponds To: A procedure specification in Ada 2012.

delegate

Operation

Corresponds To: Access to a subprogram.

enumeration

Inner Class

Corresponds To: An enumerated type.

struct

Inner Class

Corresponds To: A record definition.

typedef

Inner Class

Corresponds To: A type definition, subtype definition, access type definition, renaming.

Tagged Values

Tag

Applies To

See also

Aspect

Inner Class with stereotype typedef

Operation

Corresponds to: Aspect specification (Precondition and Postcondition of Subprogram type 'invariant', subtype 'predicate').

InstantiatedUnitType

Inner Class with stereotype typedef

Corresponds To: The instantiated unit's type (Package / Procedure / Function).

IsAccess

Parameter

Corresponds To: Determination of whether the parameter is an access variable.

IsAliased

Function parameter

Corresponds to: Aliased function parameter.

Discriminant

Inner Class with stereotype typedef

Corresponds To: The type's discriminant.

PartType

Inner Class with stereotype typedef

Corresponds To: The part type ('renames' or 'new').

Type

Inner Class with stereotype typedef

Corresponds To: If 'Value' = 'SubType', set 'subtype'

If 'Value' = 'Access', set 'access type'.

Other Conventions

  • Appropriate type of source files: Ada specification file, .ads
  • Ada 2012 imports Packages defined as either <<adaPackage>> Class or Class, based on the settings in the Ada 2012 options
  • A Package in the Ada specification file is imported as a Class if it contains a Tagged Record, the name of which is governed by the options 'Use Class Name for Tagged Record' and 'Alternate Tagged Record Name'; all attributes defined in that Tagged Record are absorbed as the Class's attributes
  • A procedure / function in an Ada specification file is considered as the Class's member function if its first parameter satisfies the conditions specified in the options 'Ref Param Style', 'Ignore Reference parameter name' and 'Ref parameter name'
  • The option 'Define Reference for Tagged Record', if enabled, creates a reference type for the Class, the name of which is determined by the option 'Reference Type Name'; for example:

           HelloWorld.ads

           package HelloWorld is

                type HelloWorld is tagged record

                     Att1: Natural;

                     Att3: Integer;

                end record;

                -- Public Functions

                function MyPublicFunction (P: HelloWorld) return String;

                procedure MyPublicFunction (P1: in out HelloWorld; AFlag: Boolean);

           private

                -- Private Functions

                function MyPrivateFunction (P: HelloWorld) return String;

                procedure MyPrivateFunction (P1: in out HelloWorld; AFlag: Boolean);

           end HelloWorld;

     

Notes

  • Ada 2012 support is available in the System Engineering and Ultimate editions of Enterprise Architect

Learn more