Previous Next Up Title Contents Index Functions Index Top Library

INCLUDE STRUCTURE

PXINCL_STRUCT


CALL SEQUENCE

void pxincl_struct(
)

PHIGS STATE

(PHOP,*,STOP,*)

EFFECT

An INCLUDE STRUCTURE element is inserted in the open structure after element pointer or replaces the element indicated by element pointer, depending on edit mode. Element pointer then points to the INCLUDE STRUCTURE element. The value specified by struct_id is associated with the element.

Execution of the INCLUDE STRUCTURE element during a traversal has the same effect as an EXECUTE ELEMENT without saving context ( primitive attributes, view index, local and global transformations, names sets, modeling clipping, clipping indicator and clipping limits ).

The effect is described as follows :

1) Suspending execution of the current structure.

2) Executing a traversal of the structure defined by struct_id ; this can itself call another structure.

3) Continuing current structure execution.

This element is used mainly in two cases :

- setting attributes :

open structure ( 1 )

set polyline colour index ( red )

set interior style ( SOLID )

close structure ()

open structure ( 2 )

include structure ( 1 )

set interior colour index ( green )

polyline ( point list ) draw a red polyline

fill area ( point list ) draw a green SOLID polygon

close structure ()

- optimizing traversal

If a structure contains only EXECUTE STRUCTURE elements and if this structure do not need to save its context, use INCLUDE STRUCTURE instead of EXECUTE STRUCTURE. Indeed, each EXECUTE STRUCTURE, in opposition to INCLUDE STRUCTURE, saves and restores the context. Anyway, INCLUDE STRUCTURE is more efficient.

If GPHIGS is in NRS mode, the effect of this function is different from the effect described above.

In NRS mode, (see OPEN PIPE), the element is not stored in a structure. It is sent to the workstation on which the pipe is opened. If the structure exists it is traversed immediately. This allows application to work in combined mode: NON RETAINED STRUCTURES call STANDARD STRUCTURES.

ERRORS

5
Ignoring function, function requires state (PHOP, *,STOP,*)

SEE ALSO

Execute structure, see pexec_struct

Open structure, see popen_struct

Open pipe (ext), see pxopen_pipe

Inquire current element content, see pinq_cur_elem_content

Inquire current element type and size, see pinq_cur_elem_type_size


Previous Next Up Title Contents Index Functions Index Top Library