Required Parameter Group:
|
The program uses the Add View Description (QteAddViewDescription) API to add a new view in the existing view information. The added view can then be used on subsequent APIs when providing text and map details associated with this view.
It is the responsibility of each processor to create its input view, which is the root source file read by the processor. Each processor must also create its output view, which is the source produced by the processor. Other intermediate views may be produced, but, as a minimum, there must be a map between a processor's input and output view.
If a processor discards views produced by previous preprocessors, then it is not necessary for the input source view to be created. For example, the C compiler can create only a listing file view, as long as it discards all previous views.
It is possible to create several views at one time. It is the responsibility of the processes creating multiple views to manage them.
When a view is created, a handle to that view is returned in the form of a view number. This number is needed when adding text or maps that refer to the view. Once a view has been created, it cannot be created again. However, text and maps can be added to the view if it already exists. Thus, one processor can create the view, and another processor can add a map to the view, if that processor knows the view number.
There is only one statement view per module. If the statement view is created more than once, an error results. However, the statement view number is returned. This allows one processor to create the statement view and another processor to determine which number the view is.
Note: The following restrictions apply to the adding of views.
The view number of a previous view whose text is used in creating the text for this view. When describing text for this view, it can be indicated that part of the text is a direct copy of text in the previous view. This allows the API to automatically generate a map between this view and the previous view.
As an example, if a preprocessor takes as input some source, changes it by expanding macros or SQL statements, and outputs the changed source, then the output view would have the input view as its previous view. When creating text from the output view, some of the text could come from the input view.
The previous view of a *TEXT view must also be a *TEXT view.
If there is no previous view, specify zero for the view number. .
The type of view being created. Not all view types need be present in the view information. View type can be one of the following values:
Indicates whether the view is an input view, an output view, or an intermediate view. An input view is the view created from the output of the previous processor, or the view created from the root source file. It is not necessary for each processor to have an input view.
An output view is the view created by the processor to be input to the next processor. If a processor creates views that will not be used by any subsequent processors, then no output view is specified.
The allowable values for this parameter are:
Specifies whether the using program will be supplying mapping information for this view, or whether the source debugger support should infer (create) the mapping at the time the text is described.
The purpose of the automatic mapping is to allow the ease of creating an include view. An include view has a previous view (usually the input view) which consists of only one file. The include view gets its text from this file and from include files.
This parameter applies only when the view type specified in the previous parameter is *TEXT, and when this view has a previous view. A map can then be inferred from the previous view to this view. To do so, the following criteria must be met:
A character string that describes the view being created. The source debugger has the option of displaying this text with the view for identification purposes. The description should be left-justified.
A number used to identify the view. Other APIs must be passed this number when they require a view.
The structure in which to return error information. For the format of the structure, see Error Code Parameter.
|
Top
| Debugger APIs
| Source Debugger APIs Source Debugger APIs and Exit Programs | Create View APIs | APIs by category |
| [Information Center Home Page | Feedback ] | [Legal | AS/400 Glossary] |