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

Chapter 4. Miscellaneous Structure Elements

This section describes subroutines which generate structure elements which are not related to primitives or primitive attributes. The subroutines in this section generate structure execution and return elements and application data elements used to store application specific information.

GPCEXS - Conditional Execute Structure

GPCEXS (mask, crit, mode, strid)

Purpose

Use GPCEXS to insert a Conditional Execute Structure structure element into the open structure following the element pointer or to replace the element pointed at by the element pointer with a Conditional Execute Structure structure element depending on the current edit mode.

If the specified structure identifier does not exist, then the graPHIGS API creates a new empty structure.

If the current condition flags selected by the mask parameter satisfy the specified criteria, then the graPHIGS API executes the specified structure according to the specified execution mode. Otherwise, no action is taken, and the element count is incremented.

The condition flag is a 32-bit bit string. Each bit is defined as follows:

    0                        15  16                       29  30     31
    --------------------------------------------------------------------------
    |                           |                            | cull |  prune |
    | reserved for application  |          reserved          | flag |  flag  |
    --------------------------------------------------------------------------
  High bit                                                               Low bit
GPCEXS is identified as GSE 1004.

Note:

Not all GSEs are supported on all workstations. Use the Inquire List of Generalized Structure Elements (GPQGSE) inquiry subroutine to determine the GSEs which are supported by an open workstation. See also the workstation descriptors in The graPHIGS Programming Interface: Technical Reference

Parameters

mask -- specified by user, fullword integer

32-bit mask specifying flags to be tested in the current condition flag.

crit -- specified by user, fullword integer

Criteria to be satisfied when the set of flags in the specified mask is tested against the current condition flag (1=ALL_ONES, 2=ALL_ZEROS, 3=NOT_ALL_ONES, 4=NOT_ALL_ZEROS )

mode -- specified by user, fullword integer

Execution mode of the child structure (1=NORMAL )

strid -- specified by user, fullword integer

Structure identifier.

Error Codes

5
FUNCTION REQUIRES STATE STOP OR NROP (NOT STCL)
123
CONDITION CRITERIA IS INVALID
124
EXECUTE MODE IS INVALID
125
ATTEMPTING TO EXECUTE THE OPEN STRUCTURE

Related Subroutines

GPCOND
Set Condition
GPCRET
Conditional Return
GPTEX2
Test Extent 2
GPTEX3
Test Extent 3

RCP code

201331716 (X'0C001404')


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