![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Function Qualified_Object_Expression
function Qualified_Object_Expression (Expression : in Asis.Expression) return Asis.Expression;Expanded Name Asis.Expressions.Qualified_Object_Expression
Returns the qualified expression from the specified allocator expression.
Description
Allocators are defined by the following syntax:
allocator ::=
new subtype_indication
| new qualified_expressionThis function returns the qualified expression from the specified allocator.
Parameters
Expression : in Asis.Expression;Specifies the allocator expression that should be queried. The expression must be of the following kinds:
Element_Kinds Expression_Kinds
An_Expression An_Allocation_From_Qualified_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 Allocators"
- Ada83 LRM 4.8, Ada95 LRM 4.8
Function References
function References (Name : in Asis.Element; Context : in Asis.Element) return Asis.Name_List;Expanded Name Asis.Expressions.References
Returns a list containing all direct references to the specified entity in the specified context.
Description
If the Name parameter represents An_Entity_Name_Definition, the search is made with the corresponding simple name or operator symbol.
If the Name parameter represents An_Expression, the search is performed with the corresponding Name_Definition function.
The Context parameter can be any Element_Kinds such as A_Choice or A_Type_Definition but typically will be A_Statement, particularly a block statement, or A_Declaration, typically of a library or secondary unit.
The references are returned in their left-to-right and top-to-bottom order of appearance in the source code.
Parameters
Name : in Asis.Element;Specifies the entity that should be queried. The name must be of the following kinds:
Context : in Asis.Element;Specifies the context for the query.
return Asis.Name_List;The returned list contains elements of the following kinds:
Element_Kinds Expression_Kinds
An_Expression A_Character_Literal
A_Simple_Name
An_Enumeration_Literal
An_Operator_Symbol
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 Obsolete_Reference_Error if a parameter is part of an obsolete compilation unit.
Examples
Cross-References
Function Representation_Value_Image
function Representation_Value_Image (Expression : in Asis.Expression) return String;Expanded Name Asis.Expressions.Representation_Value_Image
Returns the text image of the internal code, as assigned with an enumeration representation specification (Ada83 LRM 13.3, Ada95 LRM 13.4), of the specified character or enumeration literal.
Description
Representation clauses can be inherited by derived types (Ada83 LRM 3.4, Ada95 LRM 3.4). Thus, the specified character or enumeration literal may have an assigned internal code but may not have an explicit enumeration representation clause.
You can determine whether an enumeration representation clause has been specified or inherited by calling Expression_Type to return the type definition of the character or enumeration literal and then calling Representation_Clauses.Associated_Enumeration_Type_Representation to obtain the clause.
If an enumeration representation specification has not been specified and has not been inherited, this function returns the same image as the 'Pos attribute returns when provided with the character or enumeration value (Ada83 LRM 3.3.5, Ada95 LRM 3.2).
Parameters
Expression : in Asis.Expression;Specifies the character or enumeration literal that should be queried. The expression must be of the following kinds:
Element_Kinds Expression_Kinds
An_Entity_Name_Definition A_Character_Literal
An_Enumeration_Literal
An_Expression A_Character_Literal
An_Enumeration_Literal
return String;Returns the text image of the internal code, as assigned with an enumeration representation specification (Ada83 LRM 13.3, Ada95 LRM 13.4), of the specified character or enumeration literal.
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 Obsolete_Reference_Error if a parameter is part of an obsolete compilation unit.
Examples
Cross-References
- function Expression_Type
- function Is_Literal
- function Position_Number_Image
- function Representation_Clauses.Associated-
_Enumeration_Type_Representation
Function Selected_Component
function Selected_Component (Expression : in Asis.Expression) return Asis.Declaration;Expanded Name Asis.Expressions.Selected_Component
Returns the declaration of the discriminant specification or component declaration for the specified selected component expression.
Description
Selected components are defined by the following syntax:
Ada83 LRM 4.1.3, Ada95 LRM 4.1.3
selected_component ::= prefix.selector
selector ::= simple_name
| character_literal
| operator_symbol
| allThis function returns the declaration of the discriminant specification or component declaration associated with the simple name of the specified selected component.
You can call functions in package Declarations to analyze the returned declaration. In particular, you can call Object_Declara-tion_Definition to return the for-subtype declaration of a component declaration and Type_Mark to return the type mark of a discriminant specification.
Parameters
Expression : in Asis.Expression;Specifies the selection that should be queried. The expression must be of the following kinds:
Element_Kinds Expression_Kinds Selection_Kinds
An_Expression A_Selected-
_ComponentA_Discriminant
A_Record-_Component
return Asis.Declaration;The returned element is of the following kinds:
Element_Kinds Declaration_Kinds
A_Declaration A_Component_Declaration
A_Discriminant_Specification
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 Obsolete_Reference_Error if a parameter is part of an obsolete compilation unit.
Examples
Cross-References
- function Selected_Designated_Subtype
- function Selected_Task_Entry
- function Selection_Kind
- function Selector
- function Declarations.Object_Declaration_Definition
- function Declarations.Type_Mark
- "Processing Selected Components"
- Ada83 LRM 4.1.3, Ada95 LRM 4.1.3
Function Selected_Designated_Subtype
function Selected_Designated_Subtype (Expression : in Asis.Expression) return Asis.Declaration;Expanded Name Asis.Expressions.Selected_Designated_Subtype
Returns the declaration of the type corresponding to the specified access-object expression.
Description
Selected components are defined by the following syntax:
Ada83 LRM 4.1.3, Ada95 LRM 4.1.3
selected_component ::= prefix.selector
selector ::= simple_name
| character_literal
| operator_symbol
| allThis function returns the declaration of the subtype or, in the absence of a subtype, the type corresponding to the specified access-object expression (indicated by the reserved word all).
Parameters
Expression : in Asis.Expression;Specifies the access selection that should be queried. The expression must be of the following kinds:
Element_Kinds Expression_Kinds Selection_Kinds
An_Expression A_Selected-
_ComponentAn_Expanded
_Name1
1 That designates a type or subtype.
return Asis.Declaration;The returned element is of the following kind:
Element_Kinds
A_Declaration
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
- "Processing Selected Components"
- Ada83 LRM 4.1.3, Ada95 LRM 4.1.3
Function Selected_Task_Entry
function Selected_Task_Entry (Expression : in Asis.Expression) return Asis.Declaration;Expanded Name Asis.Expressions.Selected_Task_Entry
Returns the entry declaration corresponding to the specified selected-component expression.
Description
Selected components are defined by the following syntax:
Ada83 LRM 4.1.3, Ada95 LRM 4.1.3
selected_component ::= prefix.selector
selector ::= simple_name
| character_literal
| operator_symbol
| allThis function returns the declaration of the entry corresponding to the simple name of the specified selected component.
Parameters
Expression : in Asis.Expression;Specifies the entry selection that should be queried. The expression must be of the following kinds:
Element_Kinds Expression_Kinds Selection_Kinds
An_Expression A_Selected-
_ComponentA_Task_Entry
return Asis.Declaration;The returned element is of the following kinds:
Element_Kinds Declaration_Kinds
A_Declaration An_Entry_Declaration
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 Selected_Component
- function Selected_Designated_Subtype
- function Selection_Kind
- function Selector
- "Processing Selected Components"
- Ada83 LRM 4.1.3, Ada95 LRM 4.1.3
Function Selection_Kind
function Selection_Kind (Expression : in Asis.Expression) return Selection_Kinds;Expanded Name Asis.Expressions.Selection_Kind
Returns the selection kind of the specified selected-component expression.
Description
Selected components are defined by the following syntax:
Ada83 LRM 4.1.3, Ada95 LRM 4.1.3
selected_component ::= prefix.selector
This function returns the kind of selector used in the specified selected component.
Parameters
Expression : in Asis.Expression;Specifies the selection that should be queried. The expression must be of the following kinds:
Element_Kinds Expression_Kinds
An_Expression A_Selected_Component
return Selection_Kinds;Returns the selection kind for all elements in the above table or Not_A_Selection for any unexpected elements.
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 Selected Components"
- Ada83 LRM 4.1.3, Ada95 LRM 4.1.3
Type Selection_Kinds
type Selection_Kinds is (...);Expanded Name Asis.Expressions.Selection_Kinds
Describes the kinds of selectors that are available.
Description
Selected components are used to denote record discriminants and components, entries and entry families, and objects designated by access values (Ada83 LRM 4.1.3, Ada95 LRM 4.1.3). This type describes the selector kinds that are available.
Enumerations
A_DiscriminantIndicates that the element represents a simple name denoting the discriminant of an object or value.
A_Record_ComponentIndicates that the element represents a simple name denoting a component of a record object or value.
A_Task_EntryIndicates that the element represents a single entry or an entry family of a task.
An_Access_ObjectIndicates that the element represents the reserved word all.
An_Expanded_NameIndicates that the element represents an expanded name. An expanded name is a simple name, a character literal, or an operator symbol.
Not_A_SelectionIndicates that the element does not represent a selection.
Cross-References
- "Processing Selected Components"
- Ada83 LRM 4.1.3, Ada95 LRM 4.1.3
Function Selector
function Selector (Expression : in Asis.Expression) return Asis.Expression;Expanded Name Asis.Expressions.Selector
Returns the selector from the specified selected-component expression.
Description
Selected components are defined by the following syntax:
Ada83 LRM 4.1.3, Ada95 LRM 4.1.3
selected_component ::= prefix.selector
selector ::= simple_name
| character_literal
| operator_symbol
| allThis function returns the selector of the specified selected component for all selectors except an access object (designated by the reserved word all).
If the selected component contains multiple dots, this function returns the construct to the right of the rightmost dot.
Parameters
Expression : in Asis.Expression;Specifies the component selection that should be queried. The expression must be of the following kinds:
Element_Kinds Expression_Kinds Selection_Kinds
An_Expression A_Selected-
_ComponentA_Discriminant
A_Record-_Component
A_Task_Entry
An_Expanded-_Name
return Asis.Expression;The returned element is of the following kinds:
Element_Kinds Expression_Kinds
An_Expression A_Character_Literal
A_Simple_Name
An_Enumeration_Literal
An_Operator_Symbol
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_Inappropriate_Element is raised and Environment.Status is set to Value_Error if the Selection_Kind of the expression is An_Access_Object or Not_A_Selection.
Examples
Cross-References
- function Selected_Component
- function Selected_Designated_Subtype
- function Selected_Task_Entry
- function Selection_Kind
- "Processing Selected Components"
- Ada83 LRM 4.1.3, Ada95 LRM 4.1.3
Function Short_Circuit_Operation_Right-_Hand_Side
function Short_Circuit_Operation_Right_Hand_Side (Expression : in Asis.Expression) return Asis.Expression;Expanded Name Asis.Expressions.Short_Circuit_Operation_Right-_Hand_Side
Returns the value on the right side for the specified short-circuit control-form expression.
Description
Expressions are defined by the following syntax:
expression ::=
relation {and relation}
| relation {and then relation}
| relation {or relation}
| relation {[or else relation}
| relation {xor relation}This function returns the relation for the specified expression.
Parameters
Expression : in Asis.Expression;Specifies the special operation that should be queried. The expression must be of the following kinds:
Element_Kinds Expression_Kinds Special_
Operation_
Kinds
An_Expression A_Special_Operation An_And_Then
An_Or_Else
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 Short-Circuit Control Forms"
- Ada83 LRM 4.4, Ada95 LRM 4.4
Rational Software Corporation
http://www.rational.com support@rational.com techpubs@rational.com Copyright © 1993-2001, Rational Software Corporation. All rights reserved. |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |