TOC PREV NEXT INDEX DOC LIST MASTER INDEX




Function Subtype_Constraint

Expanded Name Asis.Type_Definitions.Subtype_Constraint

Returns the constraint applied to the specified subtype
indication.

Description

Subtype indications are partially defined by the following syntax:

Ada83 LRM 3.2.2, Ada95 LRM 3.3.2
 subtype_indication ::= type_mark [constraint]

This function returns the constraint from the specified subtype indication.

If a constraint is not present, Asis.Nil_Element is returned.

Subtype indications appear in the following constructs:

Parameters

Specifies the subtype declaration that should be queried. The subtype indication must be of the following kinds:
Element_Kinds
Discrete_Range_Kinds
A_Subtype_Indication
——
A_Discrete_Range
A_Discrete_Subtype_Indication

The returned element is of the following kind:
Element_Kinds

A_Constraint

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

Related concepts:


Function Subtype_Definition_Subtype_Indication

Expanded Name Asis.Type_Definitions.Subtype_Definition_Subtype-
_Indication

Returns the subtype indication from the specified subtype
definition.

Description

Object declarations are partially defined by the following syntax:

Ada83 LRM 3.2, Ada95 LRM 3.3
 object_declaration ::=
   identifier_list :
    [constant] subtype_indication
     [:= expression];
  | identifier_list :
    [constant] constrained_array_definition
     [:= expression];

This function returns the subtype indication from the specified subtype definition. The subtype definition for an object declaration is obtained with the Declarations.Object_Declaration-
_Definition
function.

Parameters

Specifies the subtype declaration that should be queried. The type definition must be of the following kinds:
Element_Kinds
Type_Definition_Kinds
A_Type_Definition
A_Subtype_Definition

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

Related subprograms:

Related concepts:


Function Task_Type_Declarative_Items

Expanded Name Asis.Type_Definitions.Task_Type_Declarative_Items

Returns a list of all entry declarations, representation clauses, and, optionally, pragmas that are present in the specified task- type declaration.

Description

Task types are defined by the following syntax:

Ada83 LRM 9.1, Ada95 LRM 9.1
 task_specification ::=
  task [type] identifier [is
   {entry_declaration}
   {representation_clause}
  end [task_simple_name}]

This function returns a list containing all the entry declarations, representation clauses, and, optionally, pragmas contained in the specified task-type specification.

The declarations, representations, and pragmas are returned in their order of appearance in the source code. A_Pragma elements do not appear in the list unless Include_Pragmas has been specified as True.

The Declarations.Task_Declaration_Declarative_Items function can be used to obtain the same information for a task specification.

For further analysis:
Element_Kinds
Calls to Use
A_Declaration
Declarations.
Family_Index

A_Pragma
Elements.
Argument_Associations
Is_Predefined
Name
Pragma_Kind

A_Representation_Clause
Representation_Clauses.
Associated_Type
Kind
Length_Clause_Attribute
Length_Clause_Attribute_Kind

Parameters

Specifies the task-type specification that should be queried. The type definition must be of the following kinds:
Element_Kinds
Type_Definition_Kinds
A_Type_Definition
A_Task_Type_Definition

Specifies whether pragma definitions should be included in the returned list.

The returned list contains elements of the following kinds:
Element_Kinds
Declaration_Kinds
A_Declaration
An_Entry_Declaration
A_Pragma
——
A_Representation_Clause
——

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:

Related concepts:


Function Type_Definition_Declaration

Expanded Name Asis.Type_Definitions.Type_Definition_Declaration

Returns the type declaration or the object declaration associated with the specified type definition.

Description

The declaration is the Elements.Enclosing_Element of the definition. See package Elements, "Enclosing Elements" for more information.

Parameters

Specifies the type definition that should be queried. The type definition must be of the following kind:
Element_Kinds

A_Type_Definition

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.

Examples

Cross-References

Related subprogram:

Related concept:


Type Type_Definition_Kinds

Expanded Name Asis.Type_Definitions.Type_Definition_Kinds

Describes the kinds of type definitions available.

Description

Enumerations

Indicates that the element represents a derived-type definition (Ada83 LRM 3.4, Ada95 LRM 3.4).

Indicates that the element represents a fixed-point type definition (Ada83 LRM 3.5.9, Ada95 LRM 3.5.9).

Indicates that the element represents a floating-point type definition (Ada83 LRM 3.5.7, Ada95 LRM 3.5.7).

Indicates that the element represents an access-type definition from a generic-parameter declaration (Ada83 LRM 12.1, Ada95 LRM 12.1).

Indicates that the element represents an array-type definition from a generic-parameter declaration (Ada83 LRM 12.1, Ada95 LRM 12.1).

Indicates that the element represents an enumeration- or integer-type definition from a generic-parameter declaration (Ada83 LRM 12.1, Ada95 LRM 12.1).

Indicates that the element represents a fixed-point real-type definition from a generic-parameter declaration (Ada83 LRM 12.1, Ada95 LRM 12.1).

Indicates that the element represents a floating-point real-type definition from a generic-parameter declaration (Ada83 LRM 12.1, Ada95 LRM 12.1).

Indicates that the element represents an integer-type definition from a generic-parameter declaration (Ada83 LRM 12.1, Ada95 LRM 12.1).

Indicates that the element represents a limited private-type definition from a generic-parameter declaration (Ada83 LRM 12.1, Ada95 LRM 12.1).

Indicates that the element represents a private-type definition from the generic-parameter declaration (Ada83 LRM 12.1, Ada95 LRM 12.1).

Indicates that the element represents a limited private-type declaration (Ada83 LRM 7.4, Ada95 LRM 7.3).

Indicates that the element represents a private-type declaration (Ada83 LRM 7.4, Ada95 LRM 7.3).

Indicates that the element represents a record-type definition (Ada83 LRM 3.7, Ada95 LRM 3.8).

Indicates that the element represents a subtype definition (Ada83 LRM 3.3.2, Ada95 LRM 3.2.2). This is distinct from a subtype indication (which is an Element_Kinds).

Indicates that the element represents a task-type specification (Ada83 LRM 9.1, Ada95 LRM 9.1).

Indicates that the element represents a universal fixed-point definition (Ada83 LRM 3.5.9, Ada95 LRM 3.5.9).

Indicates the element represents a universal integer definition (Ada83 LRM 3.5.4, Ada95 LRM 3.5.4).

Indicates that the element represents a universal real definition (Ada83 LRM 3.5.6, Ada95 LRM 3.5.6).

Indicates that the element represents an access-type definition (Ada83 LRM 3.8, Ada95 LRM 3.10).

Indicates that the element represents an array-type definition (Ada83 LRM 3.6, Ada95 LRM 3.6).

Indicates that the element represents an enumeration-type definition (Ada83 LRM 3.5.1, Ada95 LRM 3.5.1).

Indicates that the element represents an integer-type definition (Ada83 LRM 3.5.4, Ada95 LRM 3.5.4).

Indicates that the element does not represent a type definition.

Cross-References

Related subprogram:

Related concept:


Function Type_Mark

Expanded Name Asis.Type_Definitions.Type_Mark

Returns the type mark from a subtype indication or discrete-range subtype indication.

Description

Subtype indications are defined by the following syntax:

Ada83 LRM 3.2.2, Ada95 LRM 3.3.2
 subtype_indication ::= type_mark [constraint]

Discrete ranges are defined by the following syntax:

Ada83 LRM 3.6, Ada95 LRM 3.6  
discrete_range ::=
  discrete_subtype_indication | range

This function returns the type mark from the specified subtype indication or discrete range.

Parameters

Specifies the subtype indicator or discrete range that should be queried. The subtype indication must be of the following kinds:
Element_Kinds
Discrete_Range_Kind
A_Discrete_Range
——
A_Subtype_Indication
A_Discrete_Subtype_Indication

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

Related subprograms:

Related concepts:


Function Type_Structure

Expanded Name Asis.Type_Definitions.Type_Structure

Returns the type structure from which the specified type definition has been derived.

Description

The function unwinds recursive derivations and subtyping until the type definition derives a new representation (Ada83 LRM 13.6, Ada95 LRM 13.6) or is no longer derived.

Parameters

Specifies the type definition that should be queried. The type definition must be of the following kind:
Element_Kinds

A_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

Related subprograms:

Related concepts:


Function Upper_Bound

Expanded Name Asis.Type_Definitions.Upper_Bound

Returns the simple expression that represents the upper bound of the specified range constraint or discrete range constraint.

Description

Range 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_expression

Discrete ranges are defined by the following syntax:

Ada83 LRM 3.6, Ada95 LRM 3.6
 discrete_range ::=
  discrete_subtype_indication | range

This function returns the upper-bound simple expression of the specified range constraint or discrete range.

Parameters

Specifies the range constraint or discrete range that should be queried. The constraint must be of the following kinds:
Element_Kinds
Constraint_Kinds
Discrete_Range_Kind
A_Constraint
A_Simple_Range
——
A_Discrete_Range
A_Simple_Range
A_Simple_Range

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

Related subprograms:

Related concepts:


Function Variant_Choices

Expanded Name Asis.Type_Definitions.Variant_Choices

This function returns the choices contained in the specified record variant.

Description

Record variants are partially defined by the following syntax:

Ada83 LRM 3.7.3, Ada95 LRM 3.8.1 
variant ::=
  when choice {| choice} =>
   component_list

This function returns a list of the choices contained in the specified variant.

Parameters

Specifies the record variant that should be queried. The variant must be of the following kind:
Element_Kinds

A_Variant

The returned list contains elements of the following kind:
Element_Kinds

A_Choice

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:

Related concepts:


Function Variant_Components

Expanded Name Asis.Type_Definitions.Variant_Components

Returns a list of all components, and, optionally, pragmas that are present in the specified record variant.

Description

Record variants are partially defined by the following syntax:

Ada83 LRM 3.7.3, Ada95 LRM 3.8.1
 variant ::=
  when choice {| choice} =>
   component_list

This function returns the component list contained in the specified variant.

The components and pragmas are returned in their order of appearance in the source code. A_Pragma elements do not appear in the list unless Include_Pragmas has been specified as True.

The list does not include any implementation-defined components (Ada83 LRM 13.4(8), Ada95 LRM 13.5.1). You can obtain these components with the Implicit_Variant_Components function.

For further analysis:
Element_Kinds
Calls to Use
A_Declaration
Declarations.
(most subprograms)

A_Null_Component
——
A_Pragma
Elements.
Argument_Associations
Is_Predefined
Name
Pragma_Kind

A_Variant_Part
Type_Definitions.
Corresponding_Discriminant- _Simple_name
Variants

Parameters

Specifies the record variant that should be queried. The variant must be of the following kind:
Element_Kinds

A_Variant

Specifies whether pragma definitions should be included in the returned list.

The returned list contains elements of the following kinds:
Element_Kinds
Declaration_Kinds
A_Declaration
A_Component_Declaration
A_Null_Component
——
A_Pragma
——
A_Variant_Part
——

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:

Related concepts:


Function Variants

Expanded Name Asis.Type_Definitions.Variants

Returns a list of the variants that are contained within the specified variant part.

Description

Record variant parts are partially defined by the following syntax:

Ada83 LRM 3.7.3, Ada95 LRM 3.8.1
 variant_part ::=
  case discriminant_simple_name is
   variant
   {variant}
  end case;

This function returns a list of the variants that make up the specified variant part.

The variants are returned in their order of appearance in the source code.

Parameters

Specifies the record variant part that should be queried. The variant part must be of the following kinds:
Element_Kinds
Component_Kinds
A_Variant_Part
A_Variant_Part

The returned list contains elements of the following kind:
Element_Kinds

A_Variant

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:

Related concepts:


Package Operations

Expanded Name Asis.Type_Definitions.Operations

Package Operations provides a simple way to obtain visibility to operators for types used in package Type_Definitions. 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