TOC PREV NEXT INDEX DOC LIST MASTER INDEX




Function Supporters

Expanded Name Asis.Compilation_Units.Supporters

Returns a list of the units directly supporting the specified compilation unit that also exist in the specified compilation-unit list.

Description

If the specified compilation unit does not belong to the specified library, all components of the returned Relationship will be Is_Nil.

The returned list of compilation units contains only those units that are supporters of the specified compilation unit, that exist in the candidate compilation-unit list, and that belong to the specified library. A compilation unit is not a direct supporter of itself and will not exist in the returned list.

See the enumeration value Supporters in the Relation_Kinds type for a description of what units constitute supporting units.

The specified library need not be the Enclosing_Library of the specified compilation unit. By specifying a different library, you can obtain an Is_Equal compilation-unit value from a different library.

The returned list can include Is_Identical compilation-unit values if duplicates appear in the candidate compilation-unit list.

Parameters

Specifies the compilation unit for which the list of supporting units should be returned. The Compilation_Unit must be of the following kinds
Compilation_Unit_Kinds

A_Generic_Declaration

A_Generic_Instantiation

A_Package_Body

A_Package_Declaration

A_Subprogram_Body

A_Subprogram_Declaration

A_Subunit

Unknown

:

Specifies the list of candidate compilation units. All Compilation_Unit_Kinds are appropriate.

Specifies the library to which the returned units must belong.

If a library is not specified, the Enclosing_Library of the compilation unit is assumed. These calls produce identical results:

Returns a list of the units that are supporters of the specified compilation unit and that also appear in the list of candidate compilation units. All kinds of compilation units can appear in the returned list.

Errors

Asis_Inappropriate_Library is raised and Environment.Status is set to Value_Error if a library variable is specified that is no longer open.

Asis_Inappropriate_Compilation_Unit is raised and Environment.Status is set to Value_Error if a compilation-unit parameter references a library that is no longer open.

Examples

Cross-References

Related subprograms:

Related concept:


Function Text_File_Form

Expanded Name Asis.Compilation_Units.Text_File_Form

Returns the Form parameter (for Text_Io.Open) of the text file or other structure that was the source for the compilation of the specified compilation unit.

Description

Returns Asis.Nil_Asis_String if:

Rational ASIS does not support the retrieval of the text file Form parameter; it always returns Asis.Nil_Asis_String. However, a Form parameter is not required to access source files, so a nil string can always be specified in Text_Io.Open.

Parameters

Specifies the compilation unit for which the Text_Io.Open Form parameter is desired. All Compilation_Unit_Kinds are appropriate.

Rational ASIS returns Asis.Nil_Asis_String.

Errors

Asis_Inappropriate_Compilation_Unit is raised and Environment.Status is set to Value_Error if a compilation-unit parameter references a library that is no longer open.

Examples

Cross-References

Related subprograms:

Related concept:


Function Text_File_Name

Expanded Name Asis.Compilation_Units.Text_File_Name

Returns the name of the text file or other structure that was the source for the compilation of the specified compilation unit.

Description

Returns Asis.Nil_Asis_String if:

If the specified compilation unit is a library unit, the returned string references a file with a ".1.ada" suffix. If the specified compilation unit is a secondary unit, the returned string references a file with a ".2.ada" suffix. In both cases, the name is a fully expanded path name.

Parameters

Specifies the compilation unit for which the file name is desired. All Compilation_Unit_Kinds are appropriate.

Returns the fully qualified path name of the unit image.

Errors

Asis_Inappropriate_Compilation_Unit is raised and Environment.Status is set to Value_Error if a compilation-unit parameter references a library that is no longer open.

Examples

Cross-References

Related subprograms:

Related concept:


Function Time_Of_Last_Update

Expanded Name Asis.Compilation_Units.Time_Of_Last_Update

Returns the time that the representation of the specified compilation unit was last updated in the Ada library.

Description

Returns Asis.Nil_Asis_Time if:

Rational ASIS returns the file system modification time of the file containing the Ada source corresponding to the specified compilation unit.

Parameters

Specifies the compilation unit for which the last update time is desired. All Compilation_Unit_Kinds are appropriate.

Returns the time that the representation of the specified compilation unit was last updated in the Ada library.

Errors

Asis_Inappropriate_Compilation_Unit is raised and Environment.Status is set to Value_Error if a compilation-unit parameter references a library that is no longer open.

Examples

Cross-References

Related subprograms:

Related concept:


Function Unique_Name

Expanded Name Asis.Compilation_Units.Unique_Name

Returns an Asis.Asis_String containing a name that uniquely identifies, within the underlying Ada library implementation, the specified compilation unit.

Description

The result will vary depending on the ASIS implementation. The unique name can include the name and parameters of the library, file system paths, sub-library names, version numbers, unit kind, or any other information that a vendor needs to uniquely identify the compilation unit.

If Asis.Nil_Compilation_Unit is specified, Asis.Nil_Asis_String is returned.

Under Apex, the name remains the same until the unit is removed.

Parameters

Specifies the compilation unit for which the unique name is desired. All Compilation_Unit_Kinds are appropriate.

Returns the unique name for the specified compilation unit.

Errors

Asis_Inappropriate_Compilation_Unit is raised and Environment.Status is set to Value_Error if a compilation-unit parameter references a library that is no longer open.

Examples

Cross-References

Related subprogram:

Related concept:


Function Unit_Declaration

Expanded Name Asis.Compilation_Units.Unit_Declaration

Returns the element representing the declaration of the specified compilation unit.

Description.

If the specified compilation unit has a Compilation_Unit_Kinds of Unknown, Asis.Nil_Element is returned.

A subprogram body is treated as a secondary unit when a library unit with the same name already exists. If such a library unit does not exist, the subprogram body is treated as a library unit. In either case, the unit has a Compilation_Unit_Kinds of A_Subprogram_Declaration. In the later case, it has a Declarations.Declaration_Kinds of A_Procedure_Body_Declaration or A_Function_Body_Declaration rather than A_Procedure_Declaration or A_Function_Declaration.

Analysis of compilation units is performed with the elements that comprise the unit. Initial analysis is performed with the functions in package Declarations.

Parameters

Specifies the compilation unit for which the declaration should be returned. The Compilation_Unit must be of the following kinds
Compilation_Unit_Kinds

A_Generic_Declaration

A_Generic_Instantiation

A_Package_Body

A_Package_Declaration

A_Subprogram_Body

A_Subprogram_Declaration

A_Subunit

Unknown

:

The returned element is of the following kinds:
Element_Kinds
Declaration_Kinds
A_Declaration
A_Function_Body_Declaration A_Function_Declaration A_Function_Instantiation A_Generic_Function_Declaration A_Generic_Package_Declaration A_Generic_Procedure_Declaration A_Package_Body_Declaration A_Package_Declaration A_Package_Instantiation A_Procedure_Body_Declaration A_Procedure_Declaration A_Procedure_Instantiation A_Task_Body_Declaration

Errors

Asis_Inappropriate_Compilation_Unit is raised and Environment.Status is set to Value_Error if a compilation-unit parameter references a library that is no longer open.

Examples

Cross-References

Related subprograms:

Related concepts:


Package Operations

Expanded Name Asis.Compilation_Units.Operations

Package Operations provides a simple way to obtain visibility to operators for types used in package Compilation_Units. The package typically is referenced in a use clause by an
application.

Cross-References

Related subprograms and types:

Related concepts:


Rational Software Corporation  http://www.rational.com
support@rational.com
techpubs@rational.com
Copyright © 1993-2001, Rational Software Corporation. All rights reserved.
TOC PREV NEXT INDEX DOC LIST MASTER INDEX TECHNOTES APEX TIPS