![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Function Is_Initialized
function Is_Initialized (Declaration : in Asis.Declaration) return Boolean;Expanded Name Asis.Declarations.Is_Initialized
Returns a Boolean value indicating whether the specified declaration has an explicit initialization.
Description
Object and number declarations are partially defined by the following syntax:
object_declaration ::=
identifier_list :
[constant] subtype_indication
[:= expression];
| identifier_list :
[constant] constrained_array_definition
[:= expression];number_declaration ::=
identifier_list : constant :=
universal_static_expression;Record-component declarations are defined by the following syntax:
component_declaration ::=
identifier_list :
component_subtype_definition
[:= expression];Discriminant specifications for type declarations are defined by the following syntax:
Ada83 LRM 3.7.1, Ada95 LRM 3.7
discriminant_specification ::=
identifier_list : type_mark [:= expression]Parameter specifications for subprogram declarations are defined by the following syntax:
parameter_specification ::=
identifier_list : mode type_mark
[:= expression]Deferred constants are defined by the following syntax:
deferred_constant_declaration ::=
identifier_list : constant type_mark;Generic-parameter declarations are partially defined by the following syntax:
Ada83 LRM 12.1, Ada95 LRM 12.1
generic_parameter_declaration ::=
identifier list : [in [out]] type_mark
[:= expression]| type identifier is generic_type_definition;
| private_type_declaration
| with subprogram_specification [is name];
| with subprogram_specification [is <>];This function returns True if the specified declaration represents an object declaration, number declaration, deferred-constant declaration, component declaration, discriminant specification, parameter specification, or generic-parameter declaration that includes a default expression.
Parameters
Declaration : in Asis.Declaration;Specifies the declaration for which the initialization status should be returned. This function returns True for the following kinds:
return Boolean;Returns True for all elements in the above tables that have an initial-value expression.
Errors
Examples
Cross-References
- function Corresponding_Constant_Declaration
- function Initial_Value
- function Is_Constant
- function Is_Variable
- function Object_Declaration_Definition
- "Processing Object and Number Declarations"
- Ada83 LRM 3.2, Ada95 LRM 3.3
- Ada83 LRM 3.7, Ada95 LRM 3.8
- Ada83 LRM 3.7.1, Ada95 LRM 3.7
- Ada83 LRM 7.4, Ada95 LRM 7.3
- Ada83 LRM 6.1, Ada95 LRM 6.1
- Ada83 LRM 12.1, Ada95 LRM 12.1
Function Is_Limited
function Is_Limited (Declaration : in Asis.Declaration) return Boolean;Expanded Name Asis.Declarations.Is_Limited
Returns a Boolean value indicating whether the specified declaration is a limited private type, has been derived from a limited private type, or is a task-type declaration.
Description
Subtype declarations are partially defined by the following syntax:
Ada83 LRM 3.3.2, Ada95 LRM 3.2.2
subtype_declaration ::=
subtype identifier is subtype_indication;Derived types are defined by the following syntax:
derived_type_definition ::= new
subtype_indicationPrivate type declarations are defined by the following syntax:
private_type_declaration ::=
type identifier [discriminant_part] is
[limited] private;Task specifications are defined by the following syntax:
task_specification ::=
task [type] identifier [is
{entry_declaration}
{representation_clause}
end [task_simple_name}]Generic package and subprogram specifications are partially defined by the following syntax:
Ada83 LRM 12.1, Ada95 LRM 12.1
generic_parameter_declaration ::=
identifier list : [in [out]] type_mark
[:= expression]| type identifier is generic_type_definition;
| private_type_declaration
| with subprogram_specification [is name];
| with subprogram_specification [is <>];This function returns True if the specified declaration is a subtype declaration of a limited private-type declaration, a derived-type definition of a limited private-type declaration, a limited private-type declaration, a task-type declaration, a limited private-type declaration of a generic-parameter declaration, or a record or array with components of a limited private type.
Parameters
Declaration : in Asis.Declaration;Specifies the declaration to be checked to determine whether it represents a limited private-type declaration. This function returns True for the following kind
s:
return Boolean;Returns True for the following declaration kinds and False for all others:
- A_Private_Type_Declaration that includes the reserved word limited
- A_Generic_Formal_Type_Declaration that includes the reserved word limited
- A type or subtype derived from a limited private type
- A record or array, type or subtype, with components of a limited private type
- A_Task_Type_Declaration
Errors
Examples
Cross-References
- function Corresponding_Type_Declaration
- function Discriminants
- function Is_Discriminated
- function Is_Private
- function Is_Type_Declaration
- function Type_Declaration_Definition
- "Processing Incomplete- and Private-Type Declarations"
- Ada83 LRM 3.3.3, Ada95 LRM 3.2.3
- Ada83 LRM 3.4, Ada95 LRM 3.4
- Ada83 LRM 7.4, Ada95 LRM 7.3
- Ada83 LRM 9.1, Ada95 LRM 9.1
- Ada83 LRM 12.1, Ada95 LRM 12.1
Function Is_Operator_Definition
function Is_Operator_Definition (Declaration : in Asis.Declaration) return Boolean;Expanded Name Asis.Declarations.Is_Operator_Definition
Returns a Boolean value indicating whether the specified declaration is an operator-symbol function.
Description
Subprogram specifications are partially defined by the following syntax:
subprogram_specification ::=
procedure identifier [formal_part]
| function designator [formal_part]
return type_markdesignator ::= identifier | operator_symbol
operator_symbol ::= literal_stringThis function returns True if the specified declaration represents a designator that is an operator symbol.
The kind of the operator defined by the declaration can be obtained from Expressions.Operator_Kind.
Parameters
Declaration : in Asis.Declaration;Specifies the declaration to be checked to determine whether it represents an operator symbol. This function returns True for the following kinds
:
return Boolean;Returns True for all elements in the above table that are also operators and False for all other elements.
Errors
Examples
function "+" (Left, Right : in Declaration_Kinds) return Boolean;The Is_Operator_Definition function returns True when given the declaration or body stub for the above function.
Cross-References
- function Names
- function Parameters
- function Return_Type
- function Subprogram_Body_Block
- function Expressions.Operator_Kind
- "Processing Subprograms"
- Ada83 LRM 6.1, Ada95 LRM 6.1
Function Is_Package
function Is_Package (Declaration : in Asis.Declaration) return Boolean;Expanded Name Asis.Declarations.Is_Package
Returns a Boolean value indicating whether the specified declaration is a package declaration.
Description
Package specifications are defined by the following syntax and can also have a corresponding package body:
package_specification ::=
package identifier is
{basic_declarative_item}
[private
{basic_declarative_item}]
end [package_simple_name]Renaming clauses are defined by the following syntax:
renaming_declaration ::=
identifier : type_mark renames
object_name;
| identifier : exception renames
exception_name;
| package identifier renames package_name;
| subprogram_specification renames
subprogram_or_entry_name;Body stubs are defined by the following syntax:
Ada83 LRM 10.2, Ada95 LRM 10.1.3
body_stub ::=
subprogram_specification is separate;
| package body package_simple_name
is separate;
| task body task_simple_name is separate;Generic package and subprogram specifications are partially defined by the following syntax:
Ada83 LRM 12.1, Ada95 LRM 12.1
generic_specification ::=
generic_formal_part
subprogram_specification
| generic_formal_part package_specificationGeneric instantiations are partially defined by the following syntax:
Ada83 LRM 12.3, Ada95 LRM 12.3
generic_instantiation ::=
package identifier is
new generic_package_name
[generic_actual_part];
| procedure identifier is
new generic_procedure_name
[generic_actual_part];
| function designator is
new generic_function_name
[generic_actual_part];
| function designator is
new generic_function_nameThis function returns True if the specified element is a package specification, a renaming declaration of a package, a body stub or subunit of a package, a generic specification of a package, or a generic instantiation of a package.
Parameters
Declaration : in Asis.Declaration;Specifies the Declaration to be checked to determine whether it is a package declaration. This function returns True for the following kinds:
Element_Kinds Declaration_Kinds
A_Declaration A_Generic_Package_Declaration
A_Package_Body_Declaration
A_Package_Body_Stub
A_Package_Declaration
A_Package_Instantiation
A_Package_Rename_Declaration
return Boolean;Returns True for all elements in the above table and False for all other elements.
Errors
Examples
Cross-References
- function Corresponding_Body
- function Corresponding_Specification
- function Is_Function
- function Is_Procedure
- function Is_Specification
- function Is_Subprogram
- function Is_Task
- "Processing Program Units"
- Ada83 LRM 7.1, Ada95 LRM 7.1
- Ada83 LRM 8.5, Ada95 LRM 8.5
- Ada83 LRM 10.2, Ada95 LRM 10.1.3
- Ada83 LRM 12.1, Ada95 LRM 12.1
- Ada83 LRM 12.3, Ada95 LRM 12.3
Function Is_Part_Of_Derived
function Is_Part_Of_Derived (Element : in Asis.Element) return Boolean;Expanded Name Asis.Declarations.Is_Part_Of_Derived
Returns a Boolean value indicating whether the specified element forms a part of, or is, a derived or implicitly derived subprogram declaration.
Description
The elements that represent the subprograms resulting from a derived-type definition (Ada83 LRM 3.4(12), Ada95 LRM 3.4) test as Is_Part_Of-
_Derived.The Expressions.Is_Derived function can be used to determine whether an element is a reference to a derived declaration.
Parameters
Element : in Asis.Element;Specifies the element to be checked.
return Boolean;Returns True if the specified element is part of, or is, a derived or implicitly derived subprogram declaration.
Errors
Examples
Cross-References
- function Corresponding_Equality_Operator
- function Corresponding_Type
- function Implicit_Attribute_Functions
- function Implicit_Derived_Subprograms
- function Implicit_Predefined_Operators
- function Is_Part_Of_Implicit
- function Is_Part_Of_Instance
- function Subprogram_Derivation
- function Type_Operators
- function Expressions.Is_Derived
- "Implicit and Derived Operations"
- Ada83 LRM 3.4, Ada95 LRM 3.4
Function Is_Part_Of_Implicit
function Is_Part_Of_Implicit (Element : in Asis.Element) return Boolean;Expanded Name Asis.Declarations.Is_Part_Of_Implicit
Returns a Boolean value indicating whether the specified element forms a part of, or is, an implicitly declared program element.
Description
The following elements are Is_Part_Of_Implicit:
- All predefined operator definitions and their components (Ada83 LRM 3.3.3
(2), Ada95 LRM 3.2.3).- Implicitly derived subprograms and their components (Ada83 LRM 4.5
(6), Ada95 LRM 4.5).- Implicit actual parameter associations with default expressions (Ada83 LRM 6.4.2
(2), Ada95 LRM 6.4).
The Formal_Parameter and Actual_Parameter values from a parameter association are not Is_Part_Of_Implicit unless they are from a default initialization for a derived subprogram declaration and have an enclosing element that is a parameter specification of the subprogram declaration. These elements are conversions, with children that were created by the original subprogram declaration.- All parameter associations from normalized parameter lists. See package Environment, "Normalization of Parameter Lists" for more information.
- Inequality operators for types (Ada83 LRM 6.7
, Ada95 LRM 6.6). If the ASIS implementation converts the inequality operator (/=) to a not and an equals (=), these elements are Is_Part_Of_Implicit. See "Processing Implicit and Derived Operations" for more information.- Implicit attribute functions and their components (LRM Annex C).
Generic-instance specifications (Ada83 LRM 12.3(17), Ada95 LRM 12.3) are not Is_Part-_Of_Implicit unless they are made so by one of the above definitions. Generic-instance specifications are Is_Part_Of_Instance.
Parameters
Element : in Asis.Element;Specifies the element to be checked.
return Boolean;Returns True if the specified element forms a part of, or is, an implicitly declared program element. Returns False if the element represents something that exists in the source code.
Errors
Examples
Cross-References
- function Statements.Actual_Parameter
- function Corresponding_Equality_Operator
- function Corresponding_Type
- function Statements.Formal_Parameter
- function Implicit_Attribute_Functions
- function Implicit_Derived_Subprograms
- function Implicit_Predefined_Operators
- function Is_Part_Of_Derived
- function Is_Part_Of_Instance
- function Subprogram_Derivation
- function Type_Operators
- "Implicit and Derived Operations"
- package Environment, "Normalization of Parameter Lists"
- Ada83 LRM 3.3.3, Ada95 LRM 3.2.3
- Ada83 LRM 4.5, Ada95 LRM
4.5- Ada83 LRM 6.4.2, Ada95 LRM
6.4- Ada83 LRM 6.7, Ada95 LRM
6.6- Ada83 LRM 12.3, Ada95 LRM
12.3- LRM Annex C
Function Is_Part_Of_Instance
function Is_Part_Of_Instance (Element : Asis.Element) return Boolean;Expanded Name Asis.Declarations.Is_Part_Of_Instance
Returns a Boolean value indicating whether the specified element is part of an implicit generic-specification instance or implicit generic-body instance.
Description
Instantiations are not themselves Is_Part_Of_Instance unless they are encountered while traversing a generic instance.
Parameters
Element : Asis.Element;Specifies the element to be checked.
return Boolean;Returns True if the specified element is part of an implicit generic-specification instance or implicit generic-body instance.
Errors
Examples
Cross-References
Rational Software Corporation
http://www.rational.com support@rational.com techpubs@rational.com Copyright © 1993-2001, Rational Software Corporation. All rights reserved. |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |