Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

RETRIEVE PATHS TO DESCENDANTS(3P)  —  Kubota Pacfic Computer Inc. (29 February 1991)

NAME

RETRIEVE PATHS TO DESCENDANTS − retrieve the descendants of the specified structure from an archive file

SYNOPSIS

C Syntax

void
pret_paths_descs ( ar_id, struct_id, po, pd, store, paths, status )
Pintar_id;archive identifier
Pintstruct_id;structure identifier
Ppath_orderpo;path order
Pintpd;path depth
Pstorestore;handle to Store object
Pelem_ref_list_list∗∗paths; OUT path list
Pint∗status;OUT status of retrieval

Required PHIGS Operating States

(PHOP, ∗, ∗, AROP)

DESCRIPTION

Purpose

Use RETRIEVE PATHS TO DESCENDANTS to determine the path or paths in the specified archive file that are referenced by the specified structure.  It performs the same function in PEX-SI as RETRIEVE PATHS TO DESCENDANTS does in standard PHIGS. 

C Input Parameters

Applications using the C binding must create a buffer to be used by this function as memory space for storing data associated with the device state.  This buffer is passed as the store argument. 

The store buffer is a data area managed by PHIGS. While the application is responsible for creating the inital buffer through a call to CREATE STORE, PHIGS manages this area such that there is sufficient memory for the specific inquiry. The data record within the store buffer is accessed by the pointer pointed to by paths. 

ar_idIdentifier of the archive file from which to retrieve structure path data. 

struct_id
Identifier of the structure whose descendants are to be retrieved.

poOrder in which the path lists are to be returned.  Valid values defined in phigs.h are:

PORDER_TOP_FIRST
PORDER_BOTTOM_FIRST

pdDepth (maximum number of references) of path lists to return. 

storeThe memory buffer PHIGS is to use for storing the information returned.  This buffer must exist prior to calling this function (see CREATE STORE (3P)). 

C Output Parameters

pathsA pointer to a structure, Pelem_ref_list_list, containing a list of the specified structure’s structure path lists.  Pelem_ref_list_list is defined in phigs.h as follows:

typedef struct{
Pintnum_elem_ref_lists;/∗ number of execute reference lists ∗/
Pelem_ref_list∗elem_ref_lists;/∗ list of execute reference lists ∗/
} Pelem_ref_list_list;

The num_elem_ref_lists component specifies the number of structure path lists, or execute reference lists. 

The elem_ref_lists component is a pointer to a list, num_elem_ref_lists long, of Pelem_ref_list structures, containing the specified structure’s execute reference lists.  Pelem_ref_list is defined in phigs.h as follows:

typedef struct{
Pintnum_elem_refs;/∗ number of execute references ∗/
Pelem_ref∗elem_refs;/∗ list of execute references ∗/
} Pelem_ref_list;

elem_refs is a pointer to a list num_elem_refs long of Pelem_ref structures containing the structure identifier and element number of each execute reference structure element in the execute reference list.  Pelem_ref is defined in phigs.h as follows:

typedef struct {
Pintstruct_id;/∗ structure identifier ∗/
Pintelem_pos;/∗ element number ∗/
} Pelem_ref;

statusAn integer used for returning the success or failure of the routine. 

Execution

When RETRIEVE PATHS TO DESCENDANTSS is called, structure path list is filled with list(s) identifying the EXECUTE STRUCTURE structure elements that are referenced by structure identifier, in the order of traversal.  These EXECUTE STRUCTURE structure elements are represented as (structure identifier, element position) pairs, giving the parent structure identifier and the position of the EXECUTE STRUCTURE structure element.  The bottom-most element of a structure network, if included in a returned path, is indicated by a (structure identifier, element position) pair containing the identifier of the bottom-most structure and an element position of 0.  path order and path depth are used to determine the portion of each path returned.  The number of references returned in each path is specified by path depth; a path depth of 0 returns all the references in the path.  In case of truncation, path order determines whether the head (top first) or the tail (bottom first) portion of a path is returned.  If a path truncation results in two or more partial paths with the same set of element references, only one of the identical path portions is returned. 

For example, specifying top first and a depth of 0 returns all paths from structure identifier. Specifying top first and a depth of 1 returns each EXECUTE STRUCTURE structure element in structure identifier as a separate path list.  Specifying bottom first and a depth of 1 returns all the bottom-most structures of the network. 

ERRORS

007Ignoring function, function requires state (PHOP, ∗, ∗, AROP)

201Ignoring function, the specified structure does not exist

207Ignoring function, the specified path depth is less than zero

SEE ALSO

OPEN ARCHIVE FILE (3P)
ARCHIVE STRUCTURE NETWORKS (3P)
SET CONFLICT RESOLUTION (3P)
INQUIRE ALL CONFLICTING STRUCTURES (3P)
INQUIRE CONFLICTING STRUCTURES IN NETWORK (3P)
RETRIEVE PATHS TO ANCESTORS (3P)
RETRIEVE STRUCTURE NETWORKS (3P)
DELETE STRUCTURE NETWORKS FROM ARCHIVE (3P)
CREATE STORE (3P)
DELETE STORE (3P)

September 02, 1992

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026