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

Chapter 5. Structure Operations

The subroutines included in this section let your application program manipulate structures and their contents. Operations performed by these subroutines include:

  • creating-deleting a structure

  • creating structure hierarchies

  • opening a structure for modification

  • editing structure content
  • After opening a structure, the element pointer normally points to the last element in the structure. In order to modify a structure, the element pointer can be repositioned to a desired element. If the edit mode is set for insertion, then an element is inserted 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.

    When editing structure content, the structure store containing the structures must first be selected by the application by using the Select Structure Store (GPSSS) subroutine.

    In order to have structure data displayed on the workstation, the structure store containing the structures must first be associated to the specified workstation by the application by using the Associate Structure Store with Workstation (GPASSW) subroutine.

    GPASSW - Associate Structure Store with Workstation

    GPASSW (wsid, ssid)

    Purpose

    Use GPASSW to associate a structure store to all views on a workstation. This association gives the workstations the ability to associate structures from the specified structure store to the workstation or to views in the workstation (a necessary step to having structures displayed) If the workstation currently has a structure store associated to it, then the graPHIGS API disassociates the structure store from the workstation and associates the specified structure store.

    Disassociating a structure store from a workstation is similar to invoking the Disassociate All Roots from Workstation (GPDARW) subroutine. In addition, GPASSW does not allow the graPHIGS API to associate any of the structures in the structure store to a workstation or view on the workstation until that structure store is once again associated to the workstation.

    If a structure store is selected when the Open Workstation (GPOPWS) subroutine is invoked, then the subroutine automatically associates the selected structure store to the workstation. Use GPASSW at a later time to associate a different structure store to the workstation. If your application does not select a structure store when invoking the Open Workstation (GPOPWS) subroutine, or your application used the Create Workstation (GPCRWS) subroutine to open a workstation, then your application needs to explicitly associate a structure store to the workstation before the graPHIGS API can add the structures to views and then display them.

    A structure store has a limit on the number of workstations to which it can associate. This limit applies to all application processes attached to the structure store resource. To determine the limit, use the Inquire List of Available Workstation Types on Nucleus (GPQWTN) subroutine. The graPHIGS API issues error message 226 if this limit is exceeded.

    Parameters

    wsid -- specified by user, fullword integer

    Workstation identifier.

    ssid -- specified by user, fullword integer

    Structure store identifier.

    Error Codes

    25
    SPECIFIED WORKSTATION DOES NOT EXIST
    35
    WORKSTATION HAS ONLY INPUT CAPABILITIES
    215
    SPECIFIED RESOURCES DO NOT EXIST ON THE SAME NUCLEUS
    222
    SPECIFIED STRUCTURE STORE DOES NOT EXIST
    226
    MAXIMUM NUMBER OF SIMULTANEOUS ASSOCIATED WORKSTATIONS EXCEEDED

    Related Subroutines

    GPARV
    Associate Root with View
    GPARW
    Associate Root with Workstation
    GPDARW
    Disassociate All Roots from Workstation
    GPOPWS
    Open Workstation
    GPSSS
    Select Structure Store

    RCP code

    201333506 (X'0C001B02')


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