void pxincl_struct(
Pint struct_id /* structure identifier */
)
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.
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