TOC PREV NEXT INDEX DOC LIST MASTER INDEX




Function Construct_Artificial_Data_Stream

Expanded Name Asis.Data_Decomposition.Construct_Artificial_Data_Stream

Returns an artificial data stream that represents the specified type definition and has been updated with the specified value for the specified discriminant.

Description

To complete the construction of the artificial data stream, the function must be called once for each discriminant. The return value of each call should be used as the input data-stream value for the next call. The initial call specifies a nil data stream; this directs the function to initialize the stream before installing the first discriminant value.

The order in which the discriminants are specified is not
significant.

The resulting artificial data stream contains only valid discriminant values. The values of all other record components are undefined.

The sole use of the artificial data stream is to obtain record component values (with the Record_Components functions). The component values for all discriminants and components can be obtained. With the component values, you can obtain the first bit, last bit, position, and size attribute values of the discriminants and components.

Parameters

Specifies the array type definition to be queried. The type definition must be of the following kinds:
Element_Kinds
Type_Definition_Kinds
A_Type_Definition
A_Derived_Type_Definition1
A_Record_Type_Definition
1 Whose parent type is a record type.

And of the following type-definition model kinds:
Type_Model_Kinds
A_Simple_Dynamic_Model
A_Simple_Static_Model

Parameters (continued)

Specifies the data stream that has been constructed thus far. The initial value should be Nil_Portable_Data.

Specifies the discriminant of the record, referenced by the type definition, that is being set or changed.

Specifies a value of the appropriate type for the specified discriminant.

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 Data_Error if the discriminant value is not appropriate for the specified discriminant.

Examples

Cross-References

Related subprograms:

Related concept:


Type Dimension_Indexes

Expanded Name Asis.Data_Decomposition.Dimension_Indexes

Defines an array of index values used to reference an array stream.

Description

Each element in the type represents a dimension in an array.

Each element has a range of 1 .. 'Length (Dimension) of the array it describes. The 'First and 'Last values are not used because the original index type might have been an enumeration type and the type might not be available to the program using this interface.

Cross-References

Related subprograms:

Related concept:


Function Discriminant_Components

Expanded Name Asis.Data_Decomposition.Discriminant_Components

Returns a list containing the discriminants of the specified array component, record component, or record type definition.

Description

The returned components can be used with a data stream representing a value of the specified record type.

All returned values are valid parameters for all functions.

Parameters

Specifies the component to query. All components with a record subtype (Is_Record = True) and all type-definition model kinds are appropriate.

Specifies the record type definition to be queried. The type definition must be of the following kinds:
Element_Kinds
Type_Definition_Kinds
A_Type_Definition
A_Derived_Type_Definition1
A_Record_Type_Definition
1 Whose parent type is a record type.

All type-definition model kinds are appropriate.

Returns a list containing the discriminants of the specified or referenced record type.

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


Function Done

Expanded Name Asis.Data_Decomposition.Done

Returns a Boolean value indicating whether the specified iterator is past the last array component.

Description

If Nil_Array_Component_Iterator is specified, True is returned.

Parameters

Specifies the iterator to query.

Returns True if the specified iterator is past the last array component.

Errors

Asis_Inappropriate_Library is raised and Environment.Status is set to Value_Error if a parameter references a library that is no longer open.

Examples

Cross-References

Related subprograms:

Related concept:


Function First_Bit

Expanded Name Asis.Data_Decomposition.First_Bit

For the first form, returns the offset, from the start of the first of the storage units occupied by the specified component, of the first bit occupied by the specified component.

For the last three forms, returns the offset, from the start of the first of the storage units occupied by the specified component, of the first bit occupied by the element referenced.

Description

The offset is measured in bits.

This function is meant to reflect the value of the 'First_Bit predefined language attribute (LRM Annex A).

Parameters

Specifies the component to query. All non-nil component values are appropriate.

Specifies the linear index value for the array component that is being queried. The value must be in the range 1 .. Array_Length (Component).

Specifies the dimensional index values for the array component that is being queried. There must be one value for each dimension of the array type and the value must be in the range 1 .. Array_Length (Component, N), where N represents the dimension of interest.

Specifies the array component to query.

Returns the offset, from the start of the first of the storage units occupied by the specified component, of the first bit occupied by the specified component.

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 Data_Error if any index is not in the expected range or if Done (Iterator) is True.

Examples

Cross-References

Related subprograms and types:

Related concepts:


Function Is_Array

Expanded Name Asis.Data_Decomposition.Is_Array

Returns a Boolean value indicating whether the specified component has an array subtype.

Description

If a nil component is specified, False is returned.

Parameters

Specifies the component to be queried.

Returns True if the specified component has an array subtype.

Errors

Asis_Inappropriate_Library is raised and Environment.Status is set to Value_Error if a parameter references a library that is no longer open.

Examples

Cross-References

Related subprograms and constants:

Related concepts:


Function Is_Equal

Expanded Name Asis.Data_Decomposition.Is_Equal

Returns a Boolean value indicating whether the specified components represent the same component, of the same record or array type, from the same physical compilation unit.

Description

To be from the same physical compilation unit, the Compilation-_Units.Enclosing_Compilation_Unit for the Component_Declaration values must be Compilation_Units.Is_Equal.

The two components need not have been derived from the same library.

The function also returns True if both parameters represent nil components.

Parameters

Specifies the first component. All component values are appropriate.

Specifies the second component. All component values are appropriate.

Returns True if the specified components represent the same component, of the same record or array type, from the same physical compilation unit.

Errors

Asis_Inappropriate_Library is raised and Environment.Status is set to Value_Error if a parameter references a library that is no longer open.

Examples

Cross-References

Related subprograms and constants:

Related concept:


Function Is_Identical

Expanded Name Asis.Data_Decomposition.Is_Identical

Returns a Boolean value indicating whether the specified components represent the same component, of the same record or array type, from the same physical compilation unit, from the same library.

Description

To be from the same physical compilation unit, the Compilation-_Units.Enclosing_Compilation_Unit for the Component_Declaration values must be Compilation_Units.Is_Identical.

The function also returns True if both parameters represent nil components.

Parameters

Specifies the first component. All component values are appropriate.

Specifies the second component. All component values are appropriate.

Returns True if the specified components represent the same component, of the same record or array type, from the same physical compilation unit, from the same library.

Errors

Asis_Inappropriate_Library is raised and Environment.Status is set to Value_Error if a parameter references a library that is no longer open.

Examples

Cross-References

Related subprograms and constants:

Related concept:


Function Is_Nil

Expanded Name Asis.Data_Decomposition.Is_Nil

Returns a Boolean value indicating whether the specified component is a nil component.

Description

An array component is nil if its value is Nil_Array_Component.

A record component is nil if its value is Nil_Record_Component.

An uninitialized component tests as Is_Nil.

Parameters

Specifies the component to query.

Returns True if the specified component's value is the appropriate nil value.

Errors

Asis_Inappropriate_Library is raised and Environment.Status is set to Value_Error if a parameter references a library that is no longer open.

Examples

Cross-References

Related subprograms and constants:

Related concept:


Function Is_Record

Expanded Name Asis.Data_Decomposition.Is_Record

Returns a Boolean value indicating whether the specified component has a record subtype.

Description

If a nil component is specified, False is returned.

Parameters

Specifies the component to be queried.

Returns True if the specified component has a record subtype.

Errors

Asis_Inappropriate_Library is raised and Environment.Status is set to Value_Error if a parameter references a library that is no longer open.

Examples

Cross-References

Related subprograms and constants:

Related concept:


Function Last_Bit

Expanded Name Asis.Data_Decomposition.Last_Bit

For the first form, returns the offset, from the start of the first of the storage units occupied by the specified component, of the last bit occupied by the specified component.

For the last three forms, returns the offset, from the start of the first of the storage units occupied by the specified component, of the last bit occupied by the element referenced.

Description

The offset is measured in bits.

This function is meant to reflect the value of the 'Last_Bit predefined language attribute (LRM Annex A).

Parameters

Specifies the component to query. All non-Nil component values are appropriate.

Specifies the linear index value for the array component that is being queried. The value must be in the range 1 .. Array_Length (Component).

Specifies the dimensional index values for the array component that is being queried. There must be one value for each dimension of the array type and the value must be in the range 1 .. Array_Length (Component, N), where N represents the dimension of interest.

Specifies the array component to query.

Returns the offset, from the start of the first of the storage units occupied by the specified component, of the last bit occupied by the specified component.

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 Data_Error if any index is not in the expected range or if Done (Iterator) is True.

Examples

Cross-References

Related subprograms and types:

Related concepts:


Procedure Next

Expanded Name Asis.Data_Decomposition.Next

Advances the iterator to the next array component.

Description

If the iterator is already passed the last array component, the procedure does nothing.

Use the Done function to determine whether the iterator has passed the last array component.

Use the Reset function to reset the iterator to the first array component.

Parameters

Specifies the iterator to advance.

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


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