PEXSearchNetwork - Search Network (5.0)


Synopsis

     Status PEXSearchNetwork(
               Display *display,
               PEXSearchContext context,
               PEXStructurePath **path_return
      )

Arguments

display
A pointer to a display structure returned by a successful XOpenDisplay call.

context
The resource identifier of the search context

path_return
Returns a pointer to a structure network path identifying the first primitive found.

Returns

Zero if unsuccessful; non-zero otherwise.

Description

Invoke PEXSearchNetwork to search a structure network according to the specified search criteria.

The path to the first primitive found that satisfies the search criteria is returned. If no primitive is found that satisfies the criteria, then a null pointer is returned and the search context's start path is set to Null. If the primitive is found in a locked structure, the returned path is undefined.

After the search has been completed, the start path attribute of the specified search context is set to the path returned, if a primitive was found. If the structure is locked, the first valid position in the structure network beyond the primitive which met the search criteria is used to set the return path. A valid position is the next structure referencing output command in the locked structure, or the reference to the locked structure, unless the end of the search occurs before encountering the next valid position.

PEXlib allocates memory for the returned structure path. Invoke PEXFreeStructurePaths to deallocate the memory.

Errors

BadPEXPath
The specified path is invalid.

BadPEXSearchContext
The specified search context resource identifier is invalid.

BadPEXStructurePermission
The specified path includes an invalid position in a locked structure.

See Also

For an overview and a list of Spatial Search functions, see Spatial Searches.