[ Previous | Next | Contents | Glossary | Home | Search ]
The graPHIGS Programming Interface: ISO PHIGS Subroutine Reference

Chapter 5. Structure Operation Subroutines

The subroutines included in this section let your application program manipulate structure content. Operations performed by these subroutines include:

After opening a structure, the element pointer normally points to the last element in the structure. In order to modify a structure, the application must reposition the element pointer to a desired element. If the edit mode is set for insertion, then the graPHIGS API inserts an element in the open structure following the element pointer. Otherwise, if the edit mode is set for replacement, then an element replaces the element at the current element pointer.

If you plan to use both GPxxxx and ISO PHIGS subroutine calls, be aware of the compatibility issues as outlined in Chapter 22. "graPHIGS API Extensions and Compatibility with the ISO PHIGS Standard".

CHANGE STRUCTURE IDENTIFIER (PHOP,*,*,*)

Purpose

Use Change Structure Identifier to change the identifier of a structure (called the original structure) to a specified structure identifier (called the resulting structure). This subroutine does not affect execute structure-type elements that reference the original structure.

If the identifier of the original structure is the same as the identifier of the resulting structure and if the structure exists, then no action occurs. If the structure does not exist, however, then the graPHIGS API creates an empty structure with the identifier of the resulting structure.

If the original structure does not exist, then the graPHIGS API empties the resulting structure. If the original structure does exist, then the contents of the original structure replace the contents of the resulting structure and the graPHIGS API empties the original structure. If the original structure references the resulting structure, then the graPHIGS API generates an implementation error (-129)and no action occurs.

At the completion of this subroutine, the graPHIGS API deletes the original structure; unless, the original structure is the open structure, is referenced by any other structure, or is posted to a workstation.

If the original structure is the open structure, then the graPHIGS API sets the current element pointer to zero. If the resulting structure is the open structure, then the graPHIGS API sets the current element pointer to point to the last element in the structure.

Language Bindings

C

pchange_struct_id (orig_struct_id, result_struct_id)

Input Parameters

Pint orig_struct_id
Original structure identifier.

Pint result_struct_id
Resulting structure identifier.

FORTRAN

PCSTID (oldsid, newsid)

Input Parameters

integer oldsid
Original structure identifier.

integer newsid
Resulting structure identifier.

Errors

2
Function Requires State (PHOP,*,*,*)

Related Subroutines

  • Empty Structure

  • Execute Structure

  • Post Structure


  • [ Previous | Next | Contents | Glossary | Home | Search ]