TOC PREV NEXT INDEX DOC LIST MASTER INDEX




Function Elaboration_Order

Expanded Name Asis.Compilation_Units.Elaboration_Order

Returns a relationship containing a valid elaboration order for the specified compilation units.

Description

The list of compilation units required to elaborate the specified units is placed into the Existing component of the returned Relationship. If a particular compilation unit is not consistent, no related units are added to the Existing list.

For any particular set of compilation units, multiple elaboration orders might be possible. This function returns one of those orders.

The compilation units will be elaborated in the order in which they appear. For a description of the other Relationship record components, see "Finding Related Compilation Units."

If all specified compilation units are Is_Consistent in the specified library, the first unit in the Existing list is always the package specification for package Standard. If one or more compilation units are inconsistent, no guarantee is made to the content of the Existing component.

The list can contain vendor-specific runtime packages.

Parameters

Specifies the compilation unit for which the elaboration order is desired. The Compilation_Units list must contain units 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

Unknown

Specifies the library to be searched and to which the returned compilation units belong.

Returns an elaboration order for the specified compilation units.

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 Enclosing_Compilation_Unit

Expanded Name Asis.Compilation_Units.Enclosing_Compilation_Unit

Returns the compilation unit in which the specified element physically exists.

Description

The returned compilation-unit value is Is_Identical to the compilation-unit value that was used to transition from compilation units to elements.

Parameters

Element : in Asis.Element;

Specifies the element for which the enclosing compilation unit is desired. All Element_Kinds except Not_An_Element are appropriate.

return Asis.Compilation_Unit;

The returned compilation unit is 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

Errors

Asis_Inappropriate_Element is raised and Environment.Status is set to Value_Error if a parameter references a library that is no longer open or if the specified element is Asis.Nil_Element.

Examples

Cross-References

Related subprograms:

Related concept:


Function Enclosing_Library

Expanded Name Asis.Compilation_Units.Enclosing_Library

Returns the library from which the specified compilation unit was obtained.

Description

Because the Library type is limited private, this function's primary use is to provide the library parameter to other functions.

Two compilation-unit values that represent the same physical compilation unit will test as Is_Equal if they were obtained with different library values. They will test as Is_Identical if they were obtained from the same ASIS library.

Parameters

Specifies the compilation unit for which the enclosing library is desired. All Compilation_Unit_Kinds are appropriate.

Returns the library to which the specified compilation unit belongs.

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 or is Asis.Nil_Compilation_Unit.

Examples

Cross-References

Related subprograms:

Related concept:


Function Exists

Expanded Name Asis.Compilation_Units.Exists

Returns a Boolean value indicating whether the specified compilation unit exists.

Description

This function returns False if:

Otherwise, this function returns True.

Parameters

Specifies the compilation unit to query. All Compilation_Unit_Kinds are appropriate.

Returns True if the unit is not Asis.Nil_Compilation_Unit and does not have a Compilation_Unit_Kinds of A_Nonexistent_Library_Unit or A_Nonexistent_Secondary_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 subprograms:

Related concept:


Function Has_Attribute

Expanded Name Asis.Compilation_Units.Has_Attribute

Returns a Boolean value indicating whether the specified compilation unit has the associated compilation-unit attribute.

Description

Returns True if the specified compilation unit has the specified compilation-unit attribute.

Returns False if:

Otherwise, this function returns True.

Rational ASIS does not support compilation-unit attributes; italways returns False.

Parameters

Specifies the compilation unit to query. All Compilation_Unit_Kinds are appropriate.

Specifies the name of the compilation-unit attribute to query.

Rational ASIS always returns False.

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:


Function Is_Consistent

Expanded Name Asis.Compilation_Units.Is_Consistent

Returns a Boolean value indicating whether the specified compilation unit can be linked as part of an executable.

Description

At any given time and within a particular library, a compilation unit is either obsolete (Is_Obsolete) or consistent (Is_Consistent), but not both.

This function returns False if:

Otherwise, this function returns True.

Not all Compilation_Unit_Kinds can be main programs. You can determine whether a particular compilation unit can be a main program with the Can_Be_Main_Program function.

Parameters

Specifies the compilation unit for which the program closure status is desired. All Compilation_Unit_Kinds are appropriate.

Specifies the library in which the analysis should be performed.

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

This function returns True if the specified compilation unit, and all compilation units of its extended family (or program closure), are available for linking into an executable (Ada83 LRM 10.3, Ada95 LRM 10.1.4).

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 concepts:


Function Is_Equal

Expanded Name Asis.Compilation_Units.Is_Equal

Returns a Boolean value indicating whether two compilation units represent the same physical compilation unit.

Description

Returns True if:

Otherwise, this function returns False.

Parameters

Specifies the first compilation unit. All Compilation_Unit_Kinds are appropriate.

Specifies the second compilation unit. All Compilation_Unit_Kinds are appropriate.

Returns True if the two compilation-unit values represent the same physical 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 subprograms:

Related concept:


Function Is_Identical

Expanded Name Asis.Compilation_Units.Is_Identical

Returns a Boolean value indicating whether two compilation units represent the same physical compilation unit and were obtained from the same ASIS library.

Description

Returns True if:

Otherwise, this function returns False.

Parameters

Specifies the first compilation unit. All Compilation_Unit_Kinds are appropriate.

Specifies the second compilation unit. All Compilation_Unit_Kinds are appropriate.

Returns True if the two compilation-unit values represent the same physical compilation unit and have been derived from the same ASIS 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 Is_Nil

Expanded Name Asis.Compilation_Units.Is_Nil

Returns a Boolean value indicating whether the specified compilation unit is Asis.Nil_Compilation_Unit or the specified compilation-unit list is empty.

Description

A compilation unit is nil if its value is Asis.Nil_Compilation_Unit.

A compilation-unit list is nil if the value of its 'Length attribute is 0.

Parameters

Specifies the compilation unit. All Compilation_Unit_Kinds are appropriate.

Specifies the compilation-unit list. All Compilation_Unit_Kinds are appropriate.

Returns True if the specified compilation unit is Asis.Nil_Compilation_Unit or the specified Compilation_Unit_List's 'Length attribute value is 0.

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 Is_Obsolete

Expanded Name Asis.Compilation_Units.Is_Obsolete

Returns a Boolean value indicating whether the specified compilation unit or any supporting unit is obsolete or missing.

Description

At any given time and within a particular library, a compilation unit is either obsolete (Is_Obsolete) or consistent (Is_Consistent), but not both.

This function returns True if:

Otherwise, this function returns False.

Parameters

Specifies the compilation unit for which the program closure is desired. All Compilation_Unit_Kinds are appropriate.

Specifies the library in which the analysis should be performed.

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

This function returns False if the specified compilation unit, or any compilation units of its extended family (or program closure), are not available for linking into an executable (Ada83 LRM 10.3, Ada95 LRM 10.1.4).

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 concepts:


Function Is_Subunit

Expanded Name Asis.Compilation_Units.Is_Subunit

Returns a Boolean value indicating whether the specified compilation unit is a subunit.

Description

Compilation subunits are defined by the following syntax:

 subunit ::=
  separate (parent_unit_name) proper body

This function returns True if the specified compilation unit is a subunit.

Parameters

Specifies the compilation unit that should be queried. The Compilation_Unit must be of the following kind
Compilation_Unit_Kinds

A_Subunit

:

return Boolean;

Returns True for all compilation units in the above table and False for all other compilation units.

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:


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