![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Function Access_To
function Access_To (Type_Definition : in Asis.Type_Definition) return Asis.Subtype_Indication;Expanded Name Asis.Type_Definitions.Access_To
Returns the subtype indication following the reserved word access in the access-type definition.
Description
Access-type definitions are defined by the following syntax:
Ada83 LRM 3.8, Ada95 LRM 3.10
access_type_definition ::=
access subtype_indicationThis function returns the subtype indication for the specified access-type definition.
Parameters
Type_Definition : in Asis.Type_Definition;Specifies the type definition that should be queried. The type definition must be of the following kinds:
Element_Kinds Type_Definition_Kinds
A_Type_Definition A_Generic_Access_Type_Definition
An_Access_Type_Definition
return Asis.Subtype_Indication;The returned element is of the following kind:
Element_Kinds
A_Subtype_Indication
Errors
Asis_Inappropriate_Element is raised and Environment.Status is set to Value_Error if a parameter references a library variable that is no longer open, or a parameter is specified that is not appropriate for the query.
Examples
Cross-References
- "Processing Access-Type Definitions"
- Ada83 LRM 3.8, Ada95 LRM 3.10
Function Base_Type
function Base_Type (Type_Definition : in Asis.Type_Definition) return Asis.Type_Definition;Expanded Name Asis.Type_Definitions.Base_Type
Returns the type mark of the subtype indication associated with the specified subtype declaration or derived-type definition.
Description
A subtype is a type and an optional constraint (Ada83 LRM 3.3, Ada95 LRM 3.2). This function returns the type to which the constraint was applied or the subtype indication specified in a derived-type definition.
If a base type is specified, then the function acts as an identity function and returns the base type.
An anonymous array type (Ada83 LRM 3.6, Ada95 LRM 3.6) is its own base type.
Parameters
Type_Definition : in Asis.Type_Definition;Specifies the type definition that should be queried. The type definition must be of the following kind:
Element_Kinds
A_Type_Definition
return Asis.Type_Definition;The returned element is of the following kind:
Element_Kinds
A_Type_Definition
Errors
Asis_Inappropriate_Element is raised and Environment.Status is set to Value_Error if a parameter references a library variable that is no longer open, or a parameter is specified that is not appropriate for the query.
Asis_Failed is raised and Environment.Status is set to Obso-
lete_Reference_Error if a parameter is part of an obsolete
compilation unit.Examples
Cross-References
- function Ground_Type
- function Is_Predefined
- function Last_Constraint
- function Last_Subtype
- function Parent_Subtype
- function Parent_Type
Function Choice_Discrete_Range
function Choice_Discrete_Range (Choice : in Asis.Choice) return Asis.Discrete_Range;Expanded Name Asis.Type_Definitions.Choice_Discrete_Range
Returns the discrete range associated with the specified choice.
Description
Choices are partially defined by the following syntax:
Ada83 LRM 3.7.3, Ada95 LRM 3.8.1
choice ::= simple_expression
| discrete_range
| others
| component_simple_nameThis function returns the discrete range (Ada83 LRM 3.6, Ada95 LRM 3.6) of the specified choice.
Parameters
Choice : in Asis.Choice;Specifies the choice that should be queried. The choice must be of the following kinds:
Element_Kinds Choice_Kinds
A_Choice A_Discrete_Range
return Asis.Discrete_Range;The returned element is of the following kind:
Element_Kinds
A_Discrete_Range
Errors
Asis_Inappropriate_Element is raised and Environment.Status is set to Value_Error if a parameter references a library variable that is no longer open, or a parameter is specified that is not appropriate for the query.
Examples
Cross-References
Related subprograms and types:
- function Choice_Discrete_Range
- function Choice_Kind
- function Discrete_Range_Kind
- type Discrete_Range_Kinds
- function Lower_Bound
- function Range_Attribute
- function Upper_Bound
- function Variant_Choices
- function Expressions.Component_Choices
- "Processing Choices"
- "Processing Discrete Ranges"
- Ada83 LRM 3.6, Ada95 LRM 3.6
- Ada83 LRM 3.7.3, Ada95 LRM 3.8.1
Function Choice_Kind
function Choice_Kind (Choice : in Asis.Choice) return Choice_Kinds;Expanded Name Asis.Type_Definitions.Choice_Kind
Returns the kind of the specified choice.
Description
Choices are partially defined by the following syntax:
Ada83 LRM 3.7.3, Ada95 LRM 3.8.1
choice ::= simple_expression
| discrete_range
| others
| component_simple_nameAda83 LRM 11.2, Ada95 LRM 11.2
exception_choice ::= exception_name | othersThis function returns the kind of the specified choice or exception choice.
Parameters
Choice : in Asis.Choice;Specifies the choice that should be queried. The Choice parameter must be of the following kind:
Element_Kinds
A_Choice
return Choice_Kinds;Returns the kind of the choice represented by the Choice parameter. If the Choice parameter is neither a choice nor an exception choice, Not_A_Choice is returned.
Errors
Examples
Cross-References
Related subprograms and types:
- type Choice_Kinds
- function Variant_Choices
- function Expressions.Component_Choices
- function Statements.Case_Statement_Alternative_Choices
- function Statements.Exception_Choices
Type Choice_Kinds
type Choice_Kinds is (...);Expanded Name Asis.Type_Definitions.Choice_Kinds
Describes the kinds of choices available in record-definition variants (Ada83 LRM 3.7.3, Ada95 LRM 3.8.1), record and array aggregates (Ada83 LRM 4.3, Ada95 LRM 4.3), case-statement alternatives (Ada83 LRM 5.4, Ada95 LRM 5.4), and exception handlers (Ada83 LRM 11.2, Ada95 LRM 11.2).
Description
Choices are partially defined by the following syntax:
Ada83 LRM 3.7.3, Ada95 LRM 3.8.1
choice ::= simple_expression
| discrete_range
| others
| component_simple_nameAda83 LRM 11.2, Ada95 LRM 11.2
exception_choice ::= exception_name | others
- Record-definition variants (Ada83 LRM 3.7.3, Ada95 LRM 3.8.1)
- Record and array aggregates (Ada83 LRM 4.3, Ada95 LRM 4.3)
- Case-statement alternatives (Ada83 LRM 5.4, Ada95 LRM 5.4)
- Exception handlers (Ada83 LRM 11.2, Ada95 LRM 11.2)
This enumeration describes the kinds of choices available in choice and exception choice.
Enumerations
A_Discrete_RangeIndicates that the element represents a discrete range (Ada83 LRM 3.6, Ada95 LRM 3.6).
A_Simple_ExpressionIndicates that the element represents a simple expression (Ada83 LRM 3.5, Ada95 LRM 3.5).
A_Simple_NameIndicates that the element represents a simple name (Ada83 LRM 3.7.3, Ada95 LRM 3.8.1).
An_Exception_NameIndicates that the element represents an exception name (Ada83 LRM 11.2, Ada95 LRM 11.2).
An_Others_ChoiceIndicates that the element represents the reserved word others (Ada83 LRM 3.7.3, and 11.2, Ada95 LRM 3.8.1 and 11.2).
Not_A_ChoiceIndicates that the element does not represent a choice.
Cross-References
- function Choice_Kind
- function Variant_Choices
- function Expressions.Component_Choices
- function Statements.Case_Statement_Alternative_Choices
- function Statements.Exception_Choices
- "Processing Choices"
- Ada83 LRM 3.5, Ada95 LRM 3.5
- Ada83 LRM 3.6, Ada95 LRM 3.6
- Ada83 LRM 3.7.3, Ada95 LRM 3.8.1
- Ada83 LRM 4.3, Ada95 LRM 4.3
- Ada83 LRM 5.4, Ada95 LRM 5.4
- Ada83 LRM 11.2, Ada95 LRM 11.2
Function Choice_Name
function Choice_Name (Choice : in Asis.Choice) return Asis.Expression;Expanded Name Asis.Type_Definitions.Choice_Name
Returns the name associated with the specified choice.
Description
Choices are partially defined by the following syntax:
Ada83 LRM 3.7.3, Ada95 LRM 3.8.1
choice ::= simple_expression
| discrete_range
| others
| component_simple_nameAda83 LRM 11.2, Ada95 LRM 11.2
exception_choice ::= exception_name | othersThis function returns the component simple name (Ada83 LRM 4.1, Ada95 LRM 4.1) or exception name represented by the specified choice.
Parameters
Choice : in Asis.Choice;Specifies the choice that should be queried. The choice must be of the following kinds:
Element_Kinds Choice_Kinds
A_Choice A_Simple_Name
An_Exception_Name
return Asis.Expression;The returned element is of the following kinds:
Element_Kinds Expression_Kinds
An_Expression A_Selected_Component
A_Simple_Name
Errors
Asis_Inappropriate_Element is raised and Environment.Status is set to Value_Error if a parameter references a library variable that is no longer open, or a parameter is specified that is not appropriate for the query.
Examples
Cross-References
- function Choice_Kind
- function Statements.Case_Statement_Alternative_Choices
- function Statements.Exception_Choices
- "Processing Choices"
- package Expressions, "Processing Expressions"
- Ada83 LRM 3.5 , Ada95 LRM 3.5
- Ada83 LRM 3.7.3, Ada95 LRM 3.8.1
- Ada83 LRM 11.2, Ada95 LRM 11.2
Function Choice_Simple_Expression
function Choice_Simple_Expression (Choice : in Asis.Choice) return Asis.Expression;Expanded Name Asis.Type_Definitions.Choice_Simple_Expression
Returns the expression associated with the specified choice.
Description
Choices are partially defined by the following syntax:
Ada83 LRM 3.7.3, Ada95 LRM 3.8.1
choice ::= simple_expression
| discrete_range
| others
| component_simple_nameThis function returns the simple expression (Ada83 LRM 4.4, Ada95 LRM 4.4) of the specified choice.
Parameters
Choice : in Asis.Choice;Specifies the choice that should be queried. The choice must be of the following kinds:
Element_Kinds Choice_Kinds
A_Choice A_Simple_Expression
return Asis.Expression;The returned element is of the following kind:
Element_Kinds
An_Expression
Errors
Asis_Inappropriate_Element is raised and Environment.Status is set to Value_Error if a parameter references a library variable that is no longer open, or a parameter is specified that is not appropriate for the query.
Examples
Cross-References
- "Processing Choices"
- "Processing Discrete Ranges"
- package Expressions, "Processing Expressions"
- Ada83 LRM 3.5, Ada95 LRM 3.5
- Ada83 LRM 3.7.3, Ada95 LRM 3.8.1
Function Component_Kind
function Component_Kind (Component : in Asis.Record_Component) return Component_Kinds;Expanded Name Asis.Type_Definitions.Component_Kind
Returns the kind of component associated with the specified component.
Description
Record-component definitions are partially defined by the following syntax:
Ada83 LRM 3.7, Ada95 LRM 3.7
component_list ::=
component_declaration
{component_declaration}
| {component_declaration} variant_part
| null;This function returns the kind of component (component declaration, variant part, or null) represented by the specified component.
Components can be analyzed with subprograms in the package Declarations.
Parameters
Component : in Asis.Record_Component;Specifies the record component that should be queried. The component must be of the following kinds:
Element_Kinds Declaration_Kinds
A_Declaration A_Component_Declaration
A_Null_Component ——
A_Variant ——
return Component_Kinds;Returns the kind of component represented by the specified component or Not_A_Component if component is not a record component.
Errors
Examples
Cross-References
Related subprograms and types:
- type Component_Kinds
- function Record_Components
- function Variant_Components
- function Declarations.Initial_Value
- function Declarations.Is_Initialized
- function Expressions.Selected_Component
- "Processing Record-Type Definitions"
- Ada83 LRM 3.7, Ada95 LRM 3.7
Type Component_Kinds
type Component_Kinds is (...);Expanded Name Asis.Type_Definitions.Component_Kinds
Describes the kinds of components available in record-type
definitions.Description
Record-component definitions are partially defined by the following syntax:
Ada83 LRM 3.7, Ada95 LRM 3.7
component_list ::=
component_declaration
{component_declaration}
| {component_declaration} variant_part
| null;This enumeration describes the kinds of components available in a component list.
Enumerations
A_Component_DeclarationIndicates that the element represents a component declaration (Ada83 LRM 3.7, Ada95 LRM 3.7).
A_Null_ComponentIndicates that the element represents a null component (Ada83 LRM 3.7, Ada95 LRM 3.7).
A_Variant_PartIndicates that the element represents a variant (Ada83 LRM 3.7.3, Ada95 LRM 3.8.1).
Not_A_ComponentIndicates that the element does not represent a record
component.Cross-References
- function Component_Kind
- function Record_Components
- function Variant_Components
- function Expressions.Selected_Component
Function Component_Subtype_Indication
function Component_Subtype_Indication (Type_Definition : in Asis.Type_Definition) return Asis.Subtype_Indication;Expanded Name Asis.Type_Definitions.Component_Subtype_Indication
Returns the component-subtype indication of the specified constrained array-type definition.
Description
Constrained array-type definitions are partially defined by the following syntax:
Ada83 LRM 3.6, Ada95 LRM 3.6
constrained_array_definition ::=
array index_constraint of
component_subtype_indicationConstrained array-type definitions can also appear in object declarations. Object declarations are partially defined by the following syntax:
Ada83 LRM 3.2, Ada95 LRM 3.2
object_declaration ::=
identifier_list :
[constant] subtype_indication
[:= expression];
| identifier_list :
[constant] constrained_array_definition
[:= expression];This function returns the component-subtype indication for the specified constrained-array definition.
Parameters
Type_Definition : in Asis.Type_Definition;Specifies the type definition that should be queried. The type definition must be of the following kinds:
Element_Kinds Type_Definition_Kinds
A_Type_Definition A_Generic_Array_Type_Definition
An_Array_Type_Definition
return Asis.Subtype_Indication;The returned element is of the following kind:
Element_Kinds
A_Subtype_Indication
Errors
Asis_Inappropriate_Element is raised and Environment.Status is set to Value_Error if a parameter references a library variable that is no longer open, or a parameter is specified that is not appropriate for the query.
Examples
Cross-References
- function Index_Constraint
- function Is_Constrained_Array
- function Declarations.Object_Declaration_Definition
- "Processing Array-Type Definitions"
- package Declarations, "Processing Object and Number Declarations"
- Ada83 LRM 3.6, Ada95 LRM 3.6
Function Constraint_Kind
function Constraint_Kind (Constraint : in Asis.Constraint) return Constraint_Kinds;Expanded Name Asis.Type_Definitions.Constraint_Kind
Returns the kind of constraint represented by the specified Constraint parameter.
Description
Declaration constraints are defined by the following syntax:
Ada83 LRM 3.3.2, Ada95 LRM 3.2.2
constraint ::=
range_constraint
| floating_point_constraint
| fixed_point_constraint
| index_constraint
| discriminant_constraintRange constraints are partially defined by the following syntax:
Ada83 LRM 3.5, Ada95 LRM 3.5
range_constraint ::= range range
range ::= range_attribute
| simple_expressions .. simple_expressionDescription (continued)
Floating and fixed-point range constraints are defined by the following syntax:
Ada83 LRM 3.5.7, Ada95 LRM 3.5.7
floating_point_constraint ::=
floating_accuracy_definition
[range_constraint]Ada83 LRM 3.5.9, Ada95 LRM 3.5.9
fixed_point_constraint ::=
fixed_accuracy_definition
[range_constraint]Index constraints are defined by the following syntax:
Ada83 LRM 3.6, Ada95 LRM 3.6
index_constraint ::=
(discrete_range {, discrete_range})Discriminant constraints are defined by the following syntax:
Ada83 LRM 3.7.2, Ada95 LRM 3.7.1
discriminant_constraint ::=
(discriminant_association
{, discriminant_association})This function returns the kind of constraint represented by the specified Constraint parameter.
Parameters
Constraint : in Asis.Constraint;Specifies the constraint that should be queried. The constraint must be of the following kind:
Element_Kinds
A_Constraint
return Constraint_Kinds;Returns the kind of the constraint represented by the Constraint parameter. If the Constraint parameter does not represent a constraint, Not_A_Constraint is returned.
Errors
Examples
Cross-References
Related subprograms and types:
- type Constraint_Kinds
- function Fixed_Point_Range_Constraint
- function Floating_Point_Range_Constraint
- function Index_Constraint
- function Integer_Constraint
- function Real_Type_Constraint
- function Subtype_Constraint
- function Expressions.In_Range_Operation-
_Right_Hand_Side
- "Processing Discriminant Constraints"
- "Processing Index and Range Constraints"
- Ada83 LRM 3.3.2, Ada95 LRM 3.2.2
- Ada83 LRM 3.5, Ada95 LRM 3.5
- Ada83 LRM 3.5.7, Ada95 LRM 3.5.7
- Ada83 LRM 3.5.9, Ada95 LRM 3.5.9
- Ada83 LRM 3.6, Ada95 LRM 3.6
- Ada83 LRM 3.7.2, Ada95 LRM 3.7.1
Type Constraint_Kinds
type Constraint_Kinds is (...);Expanded Name Asis.Type_Definitions.Constraint_Kinds
Describes the kinds of constraints available.
Description
Declaration constraints are defined by the following syntax:
Ada83 LRM 3.3.2, Ada95 LRM 3.2.2
constraint ::=
range_constraint
| floating_point_constraint
| fixed_point_constraint
| index_constraint
| discriminant_constraintThe correlation of constraint kinds and the constraint syntax is shown in the below table:
The value Not_A_Constraint indicates that the element does not represent a constraint.
Enumerations
A_Discriminant_ConstraintIndicates that the element represents a discriminant constraint (Ada83 LRM 3.7.2, Ada95 LRM 3.7.1).
A_Fixed_Point_ConstraintIndicates that the element represents a floating-point constraint (Ada83 LRM 3.5.7, Ada95 LRM 3.5.7).
A_Floating_Point_ConstraintIndicates that the element represents a fixed-point constraint (Ada83 LRM 3.5.9, Ada95 LRM 3.5.9).
A_Range_AttributeIndicates that the element represents a range attribute (Ada83 LRM 3.5, Ada95 LRM 3.5).
A_Simple_RangeIndicates that the element represents a simple range (Ada83 LRM 3.5, Ada95 LRM 3.5).
An_Index_ConstraintIndicates that the element represents an index constraint (Ada83 LRM 3.6, Ada95 LRM 3.6).
Not_A_ConstraintIndicates that the element is not a constraint.
Cross-References
Rational Software Corporation
http://www.rational.com support@rational.com techpubs@rational.com Copyright © 1993-2001, Rational Software Corporation. All rights reserved. |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |