TOC PREV NEXT INDEX DOC LIST MASTER INDEX




Function Corresponding_Discriminant_Simple-_Name

Expanded Name Asis.Type_Definitions.Corresponding_Discriminant-_Simple_Name

Returns the discriminant simple name associated with 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 the discriminant simple name for the specified variant part.

Parameters

Specifies the variant 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 element is of the following kinds:
Element_Kinds
Expression_Kinds
An_Expression
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

Related subprograms:

Related concepts:


Function Discrete_Range_Kind

Expanded Name Asis.Type_Definitions.Discrete_Range_Kind

Returns the kind of discrete range represented by the specified Discrete_Range parameter.

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 kind of discrete range associated with the specified range or discrete range.

Parameters

Specifies the discrete range that should be queried. The discrete range must be of the following kind:
Element_Kinds

A_Discrete_Range

Returns the kind of range represented by the Discrete_Range parameter or Not_A_Discrete_Range if the specified Discrete-_Range parameter does not represent a discrete range.

Errors

None.

Examples

Cross-References

Related subprograms and types:

Related concepts:


Type Discrete_Range_Kinds

Expanded Name Asis.Type_Definitions.Discrete_Range_Kinds

Describes the kinds of components that can make up a range or discrete range.

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 type describes the kind of component represented by a range or discrete range.

Enumerations

Indicates that the element represents a discrete subtype indication (Ada83 LRM 3.6, Ada95 LRM 3.6).

Indicates that the element represents a simple-expression range (Ada83 LRM 3.5, Ada95 LRM 3.5).

Indicates that the element represents a range attribute (Ada83 LRM 3.5, Ada95 LRM 3.5).

Indicates that the element does not represent a range or discrete range.

Cross-References

Related subprogram:

Related concepts:


Function Discrete_Ranges

Expanded Name Asis.Type_Definitions.Discrete_Ranges

Returns a list of the discrete ranges associated with the specified index constraint.

Description

Constrained-array index constraints are partially defined by the following syntax:

Ada83 LRM 3.6, Ada95 LRM 3.6
 constrained_array_definition ::=
  array index_constraint of
   component_subtype_indication

 index_constraint ::=
  (discrete_range {, discrete_range})

This function returns a list of the discrete ranges that make up the specified index constraint.

Parameters

Specifies the index constraint that should be queried. The constraint must be of the following kinds:
Element_Kinds
Constraint_Kinds
A_Constraint
An_Index_Constraint

The returned list contains elements 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:

Related concepts:


Function Discriminant_Associations

Expanded Name Asis.Type_Definitions.Discriminant_Associations

Returns a list of the discriminant associations associated with the specified discriminant constraint.

Description

Discriminant constraints are defined by the following syntax:

Ada83 LRM 3.7.2, Ada95 LRM 3.7.1
 discriminant_constraint ::=
  (discriminant_association
   {, discriminant_association})

 discriminant_association ::=
  [discriminant_simple_name
   {| discriminant_simple_name} =>]
     expression

This function returns a list of the discriminant associations associated with the specified discriminant constraint.

An ASIS implementation may choose to always normalize parameter lists and include defaulted parameters in the parameter list. If parameter lists are always normalized, this function behaves as if the Normalized parameter has been specified as True.

If a list is unnormalized:

If a list is normalized:

For more information on parameter names, defaulted parameters, and list normalization, see package Environment, "Default Parameter Processing" and "Normalization of Parameter Lists," the Environment.Discriminant_Associations_Include_Defaults function, and the Environment.Discriminant_Associations-_Normalized function.

Parameters

Specifies the discriminant constraint that should be queried. The constraint must be of the following kinds:
Element_Kinds
Constraint_Kinds
A_Constraint
A_Discriminant_Constraint

Specifies whether the parameter list should contain normalized or unnormalized associations.

The returned list contains elements of the following kind:
Element_Kinds

A_Discriminant_Association

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 Discriminant_Expression

Expanded Name Asis.Type_Definitions.Discriminant_Expression

Returns the expression associated with the specified discriminant association.

Description

Discriminant constraints and associations are defined by the following syntax:

Ada83 LRM 3.7.2, Ada95 LRM 3.7.1
 discriminant_constraint ::=
  (discriminant_association
   {, discriminant_association})

 discriminant_association ::=
  [discriminant_simple_name
   {| discriminant_simple_name} =>]
     expression

This function returns the expression for the specified discriminant association.

The expression and the enclosing element of the expression depend on the source code, the handling of normalized and defaulted parameter lists by ASIS, and the value of the Normalized parameter. They are defined as follows:

Parameters

Specifies the discriminant association that should be queried. The association must be of the following kind:
Element_Kinds

A_Discriminant_Association

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 Discriminant_Simple_Names

Expanded Name Asis.Type_Definitions.Discriminant_Simple_Names

Returns a list of the simple names associated with the specified discriminant association.

Description

Discriminant constraints and associations are partially defined by the following syntax:

Ada83 LRM 3.7.2, Ada95 LRM 3.7.1
 discriminant_constraint ::=
  (discriminant_association
   {, discriminant_association})

 discriminant_association ::=
  [discriminant_simple_name
   {| discriminant_simple_name} =>]
     expression

This function returns a list of the discriminant simple names for the specified discriminant association.

The content of the returned list depends on whether the discriminant association is obtained from a normalized or unnormalized list.

If the discriminant association is from an unnormalized list:

If the discriminant association is from a normalized list:

Parameters

Specifies the discriminant association that should be queried. The association must be of the following kind:
Element_Kinds

A_Discriminant_Association

The returned list contains elements of the following kinds:
Element_Kinds
Expression_Kinds
An_Expression
A_Simple_Name
An_Entity_Name_Association

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 Discriminants

Expanded Name Asis.Type_Definitions.Discriminants

Returns a list of the discriminants on the specified record-type
definition.

Description

Full-type definitions are partially defined by the following syntax:

Ada83 LRM 3.3.1, Ada95 LRM 3.2.1
 full_type_declaration ::=
  type identifier [discriminant_part] is
    type_definition;

Record discriminants are partially defined by the following syntax:

Ada83 LRM 3.7.1, Ada95 LRM 3.7
 discriminant_part ::=
  (discriminant_specification
   {; discriminant_specification})

This function returns a list of the discriminant specifications on the specified full-type declaration. The full-type declaration must be a record-type definition.

If the record-type definition does not contain a discriminant part, Asis.Nil_Element_List is returned.

The subprograms in the package Declarations can be used to analyze the returned discriminant specifications.

Parameters

Specifies the record-type definition that should be queried. The type definition must be of the following kinds:
Element_Kinds
Type_Definition_Kinds
A_Type_Definition
A_Record_Type_Definition

The returned list contains elements of the following kinds:
Element_Kinds
Declaration_Kinds
A_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.

Examples

Cross-References

Related subprograms:

Related concepts:


Function Enumeration_Literal_Declarations

Expanded Name Asis.Type_Definitions.Enumeration_Literal_Declarations

Returns a list of the literals declared in the specified enumeration-type definition.

Description

Enumeration-type definitions are defined by the following syntax:

Ada83 LRM 3.5.1, Ada95 LRM 3.5.1
 enumeration_type_definition ::=
  (enumeration_literal_specification
   {, enumeration_literal_specification})

This function returns a list of elements representing the enumeration-literal specifications from the specified enumeration-type definition. Each element is An_Enumeration_Literal_Specification. The literal specifications are returned in their order or appearance in the source code.

Each An_Enumeration_Literal_Specification element represents a function of the form:

If an enumeration-literal specification is from a derived type, each element will test as Declarations.Is_Part_Of_Implicit.

Passing An_Enumeration_Literal_Specification element to the Declarations.Names function returns a single-entry name list. For each enumeration literal, the element represented by the name-list value is the same element returned by the Enumeration_Literal_Names function.

Parameters

Specifies the enumeration-type definition that should be queried. The type definition must be of the following kinds:
Element_Kinds
Type_Definition_Kinds
A_Type_Definition
A_Derived_Type_Definition1
An_Enumeration_Type_Definition
1 Whose parent type is an enumeration type.

The returned list contains elements of the following kinds:
Element_Kinds
Declaration_Kinds
A_Declaration
An_Enumeration_Literal_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.

Examples

Cross-References

Related subprograms:

Related concepts:


Function Enumeration_Literal_Names

Expanded Name Asis.Type_Definitions.Enumeration_Literal_Names

Returns a list of the enumeration literals associated with the specified enumeration-type definition.

Description

Enumeration-type definitions are defined by the following syntax:

Ada83 LRM 3.5.1, Ada95 LRM 3.5.1
 enumeration_type_definition ::=
  (enumeration_literal_specification
   {, enumeration_literal_specification})

 enumeration_literal_specification ::=
  enumeration_literal

 enumeration_literal ::=
  identifier | character_literal

This function returns a list of elements representing enumeration literals from the specified enumeration-type definition. There is an entry for each enumeration literal in the definition.

This function returns a list of elements representing the enumeration-literal specifications that make up the specified enumeration-type definition. Each element is An_Enumeration_Literal-_Specification. The literal specifications are returned in their order or appearance in the source code.

If an enumeration literal is from a derived type, each element will test as Declarations.Is_Part_Of_Implicit.

The function returns a list of An_Entity_Name_Definitions with an Expression_Kinds of An_Enumeration_Literal or A_Char-acter_Literal.

Parameters

Specifies the enumeration-type definition that should be queried. The type definition must be of the following kinds:
Element_Kinds
Type_Definition_Kinds
A_Type_Definition
A_Derived_Type_Definition1
An_Enumeration_Type_Definition
1 Whose parent type is an enumeration type.

The returned list contains elements of the following kinds:
Element_Kinds
Expression_Kinds
An_Entity_Name_Definition
A_Character_Literal
An_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.

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