1、Implementation of ISO/IEC 9593-3 : 1990 Information technology - Computer graphics - Programmers hierarchical interactive graphics system (PHIGS) language bindings Part 3. Ada 38 m BS ISO/IEC 9593 : Part 3 : 1990 -y- National foreword This British Standard reproduces verbatim ISO/IEC 9593-3 : 1990 i
2、ncluding Amendment 1 Technical Corrigendum 1, and 2 and implements it as the UK national standard. This British Standard is published under the direction of the information Technology Systems Standards Policy Committee whose Rchnical Committee IST/31 has the responsibility to: - aid enquirers to und
3、erstand the text; - present to the responsible international committee any enquiries on interpretation, or proposals for change, and keep UK interests informed; - monitor related international and European developments and promulgate them in the UK. NmE. International and European Standards, as well
4、 as overseas standards, are available from BSI Sales Department, BSI, Linford Wood, Milton Keynes, MK14 6LE. Compliance with a British Standard does not of itself confer immunity from legal obligations. BSI *BS*ISO/IEC 7573*PART*3 O1 m 1b24bb7 0479474 bOO I N TE R N AT1 O NA L STANDARD ISOIIEC 9593-
5、3 First edition 1990-04-1 5 Information technology - Computer graphics - Programmers Hierarchical Interactive Graphics System (PHIGS) language bindings - Part 3 : Ada Technologies de Iinformation - Infographie - Interfaces langage avec PHIGS - Partie 3 : Ada Reference number ISO/IEC 9593-3 : 1990 (E
6、) - BSI *BS*ISO/IEC 9593*PART*3 O2 1624669 0479495 547 ISO/IEC 9593-3 1990 (E) Con tents Foreword iv Introduction v 1 Scope 1 2 Normative references 2 3 Principles 3 3.1 Conformance . 3 3.2 Implications of the Language 3 3.2.1 Functional Mapping 3 3.2.2 Implementation and Host Dependencies 4 3.2.4 D
7、ata mapping 4 3.2.5 Multi-tasking 6 3.2.6 Packaging . 6 3.2.7 Application Program Environment 7 3.2.8 Registration . 7 4 Tables 8 3.2.3 Error Handling 4 4.1 Abbreviations used in%procedure names 8 4.1.1 List of procedures using the abbreviations 8 4.1.2 Alphabetical by bound name . 11 4.13 Alphabeti
8、cal PHIGS functions U 4.2 Data type definitions . 15 4.2.1 Abbreviations used in the data type definitions 16 4.2.2 Alphabetical list of type definitions 16 4.2.3 Alphabetical List of Private Type Definitions . 66 4.2.4 List of Constant Declarations 68 4.2.5 PHIGS Configuration Values 69 4.3 Error C
9、odes . 71 4.3.1 Precluded Error Codes 72 i- O ISO/IEC 1990 All rights reserved . No part of this publication may be reproduced or utilized in any form or by any means. electronic or mechanical. including photocopying and microfilm. without permission in writing from the publisher . Printed in Switze
10、rland ISO/IEC Copyright Office o Case postale 56 o CH-121 1 Genve 20 Switzerland ii BSI *BS*ISO/IEC 9593*PART*3 O1 1624bb9 0479496 483 W ISOAEC 9593-3 : 1990 (E) 5 Functions in the Ada Binding of PHIGS 73 5.1 Control functions . 73 5.2 Output primitive functions . 74 5.3 Attribute specification func
11、tions . 77 5.4 Transformation and clipping functions 84 5.5 Structure content functions 91 5.6 Structure manipulation functions 94 5.7 Structure display functions . 95 5.8 Structure archive functions 95 5.9 Input functions . 98 5.10 Metdile functions . 106 5.11 Inquiry hinctions 107 5.12 Error contr
12、ol functions . 2 5.13 Special interface functions . 133 5.14 Additional Functions 134 5.14.1 Subprograms for Manipulating Input Data Records . 134 5.14.2 PHIGS Generic Coordinate System Package . 138 5.14.3 PHIGS Generic List Utility Package 141 5.14.4 PHIGS Name Set Faciiity Package . 144 5.14.5 De
13、allocation of structure element records 147 5.14.6 Metafile Function Utilities . 149 5.15 Conformal Variants 149 Annexes A Compiiable PHIGS Specification 15 1 B Cross Reference Listing of Implementation Defined Items 243 C Example Programs 245 C.l Example Program 1: STAR 245 C.2 Example Program 2 IR
14、ON 248 C.3 Example Program 3 DYNASTAR . 2% C.4 Example Program 4: TRANSFORM POLYLINE . 261 C.5 Example Program 5 SHOW-LINET-WES . 269 D PHIGS Multi-Tasking 274 E Index 279 . 111 . *.- Foreword IS0 (the International Organization for Standardization) and IEC (the International Electrotechnical Commis
15、sion) together form a system for worldwide standardization as a whole. National bodies that are members of IS0 or 1EC participate in the development of International Standards through technical committees established by the respective organization to deal with particular fields of technical activity
16、. IS0 and IEC technical committees collaborate in fields of mutual interest. Other international organizations, governmental and non-governmental, in liaison with IS0 and IEC, also take part in the work. In the field of information technology, IS0 and 1EC have established a joint technical committee
17、, ISO/IEC JTC 1. Draft International Standards adopted by the joint technical committee are circulated to national bodies for approval before their acceptance as International Standards. They are approved in accordance with procedures requiring at least 75 Vo approval by the national bodies voting.
18、International Standard ISOIIEC 9593-3 was prepared by Technical Committee ISO/IEC JTC 1, Informotion technology. iv Introduction A Part 1 of PHIGS, ISOAEC 9592-1 : 1989, provides a set of fnctions for the display and modification of 2D or 3D graphical data. Part 1 is extended by Part 4 (PHIGS PLUS)
19、to incorporate he effects of lighting, shading, and other properties that are important for the display of surfaces and multidimensional data. ISOAEC 9592-1 and ISOAEC 9592-4 are specified in a language independent manner and must be embedded in language dependent layers (language bindings) for use
20、with particular programming languages. 3 The purpose of this document is to dehe a standard binding of ISOAEC 95924 to the Ada computer programming ianguage. BSI *BS*ISO/IEC 9593*PART*3 O1 1624669 0479499 192 INTERNATIONAL STANDARD ISO/IEC 9593-3 : 1990 (E) Information technology - Computer graphics
21、 - Programmers Hierarchical Interactive Graphics System (PHIGS) language bindings - Part 3 : Ada to include PHIGS Part 4 (PHIGS PLUS) A 1 Scope ISO/IEC 9592-1 and ISOAEC 95924 specis, a language independent nucleus of a graphics system. For integration into a programming language, PHIGS and PHIGS PL
22、US are embedded in a language dependent layer obeying the particular conventions of that language. This part of ISO/IEC 9593 specifies such a language dependent layer for the Ada computer programming language. 1 BSI *RS*ISO/IEC 9573xPARTx3 o to conform with PHIGS PLUS, the implementation shall corre
23、ctly implement the binding defined in clauses 4,5,6, and 7. - - - A PHIGS Ada application should run without modification under a PMGS PLUS Ada binding implementation. 3.2 Implications of the Language 32.1 Functional Mapping The functions of PHIGS are all mapped to Ada procedures. The mapping utiliz
24、es a one-to-one correspondence between the PHIGS functions and Ada procedures except for the PHIGS function INQUIRE TEXT EXTEhT This function is mapped to two overloaded Ada functions each named INQ - TEXT - EXTENT one which 3 - _ _ BSI *BS*ISO/IEC 9593mPARTa3 O1 m 1624bb9 0479502 507 D ISO/IEC 9593
25、-3 : 1990 (E) Implications of the Language Principles supports modelling text and one which supports annotation text. Certain functions required by the binding but not defined by PHIGS are mapped to Ada functions and procedures. 322 Implementation and Host Dependencies There are a number of implemen
26、tation and host dependencies associated with the Ada compiler and runtime system used. These will affect the portability of application programs and their use of PHIGS. The application programmer should follow accepted practices for ensuring portability of Ada programs to avoid introducing problems
27、when rehosting the application on another system. implementation dependencies include runtime storage management and processor management. 3.223 Error Handling The inquiry functions utilize error indicator parameters for the error returns, and do not raise Ada exceptions. The application program sha
28、ll ensure that these error indicators are checked before attempting to access other parameters, since Ada implementations are not required to raise an exception if an undefined value is accessed. The error handling requirements of PHIGS can be summarized as follows: 1. By default, a procedure named
29、ERROR HANDLING will be provided that simply reports the error by calling ERROR - LOGGING. This is calkd from the PHIGS function that detects the error. The ERROR - HANDLING procedure may be replaced by one defined by the user. 2. The procedure ERROR - HANDLING is defined as a library subprogram: wit
30、h PHIGS TYPES; use PHIGS TYPES; procedure RROR HANDLING (ERROR INDIaTOR : in ERROR NUMBER; PHIGS l%JNCTION : in STRING: ERROR - FILE : in FILE - ID := DEFAULT - ERROR - FILE); - The procedure ERROR HANDLING is defined as a library subprogram, - and is not declared within package PHIGS. This binding
31、defines two different bodies for this subprogram; each shall be supplied by the implementation. The default body is the one required by PHIGS semantics. It simply calls ERROR LOGGING and returns. The second body calls ERROR LOGGING and then raises the exception PHIGSERROR. The PHIGS function sha be
32、written so as not to handle PHIGS ERROR (this is a requirement-of the implementation). Thus, by Ada rules, the exception will be propagatedback to the application program that called the PHIGS function in which the error was detected. The means by which the user replaces the default body by either t
33、he exception-raising version or another one of his or her choosing is dependent upon the Ada library manager. Some implementations support multiple versions of a body with a single specification or otherwise allow hierarchical libraries with the sharing of common units. In other implementations, it
34、may be necessary to duplicate the PHIGS library for each version of ERROR - HANDLING. 32.4 Data mapping The simple and compound data types of PHIGS are bound to a variety of Ada scalar and compound types. Constraints on permitted values are reflected where possible in the type definitions. The gener
35、al correspondence between the PHIGS data types and Ada binding data types is summarized below: 4 - BSI *BS*ISO/IEC 9593*PART*3 01 Lb24669 0479503 443 ISOAEC 9593-3 : 1990 (E) Principles Implications of the Language - PHIGS integer types (I) are mapped to Ada integer types. PHIGS real types (R) are m
36、apped to Ada floating-point types. PHIGS string types (S) are mapped to the predefmed Ada tvpe STRING, or to a type providing for variable length strings. PHIGS point types (P2, P3) are mapped to Ada record types. PHIGS vector types (V2, V3) are mapped to Ada record types. PHIGS enumeration types (E
37、) are mapped to Ada enumeration types. PHIGS name types (NM) are mapped to an Ada integer type. The PHIGS name set composite type SET(NM) is mapped to an Ada private type. A set of subprograms for operating on objects of this private type is expiicitly defined by this binding. PHIGS filter types (FR
38、) are mapped to an Ada record type. PHIGS pick path item type (PP) is mapped to an Ada record type. PHIGS pick paths are mapped to an Ada array type. PHIGS element reference type (ER) is mapped to an Ada record type. PHIGS haif-space types (HS2, HS3) are mapped to Ada record types. PHIGS font/precis
39、ion pair type (Fp) is mapped to an Ada record type. PHIGS structure element type (SE) is mapped to an Ada record type. PHIGS posted structure type (PS) is mapped to an Ada record type. PHIGS bounding range types (3) are mapped to Ada record types. PHIGS colour specification type (CLR) is mapped to a
40、n Ada record type. PHIGS chromaticity coefficient type (CC) is mapped to an Ada record type. PHIGS connection identifier type (C) is mapped to the Ada STRING type. - - - - - - - - - - - - - - - - - - - PHIGS file types (F) are mapped to Ada STRING types. PHIGS workstation type (W) is mapped to an Ad
41、a integer type. PHIGS modelling clipping volume type (MCV) is not used by the binding. Implementations can map this type to an implementation specific private type. PHIGS generalized drawing primitive identifier types (G2, G3) are mapped to Ada integer types. PHIGS generalized structure element iden
42、tifier type (GS) is mapped to an Ada integer type. PHIGS archive file identifier type (AI) is mapped to an Ada integer type. - - - - - - - PHIGS pick identifier type (PI) is mapped to an Ada integer type. PHIGS escape identifier type (EI) is mapped to an Ada integer type. PHIGS function name type (FN) is mapped to an Ada type providing for variable length strings. 5