typedef TQ3Status (*TQ3ObjectTraverseMethod) ( TQ3Object object, TQ3FileObject file);object
A QuickDraw3D object.file
A file object.
TQ3ObjectTraverseMethod
method should perform a number of operations necessary to write the object specified by the object
parameter, as well as any subobjects attached to it, to the file specified by the file
parameter.
First, your traverse method should determine whether the specified object should be written to the file. It's possible that you won't want to write certain types of custom objects or certain types of data associated with a custom object. If you decide not to write the specified object and its subobjects to the file, your traverse method should return kQ3Success
without calling any _Submit
functions.
Next, you should calculate the size on disk of your custom object. This size must be aligned on a 4-byte boundary. Then you should retrieve whatever view state information you need to preserve. The state of the view is not valid in your custom object write method, but it is valid in your traverse method; if you need view state information in your write method, you can pass a temporary buffer to it.
Once you've preserved whatever view state information you need, you should submit your data by calling Q3View_SubmitWriteData
. Then you should submit subobjects by calling the appropriate _Submit
functions. You must call Q3View_SubmitWriteData
before calling _Submit
functions to submit any subobjects.
TQ3ObjectTraverseMethod
function should return kQ3Success
if it is successful and kQ3Failure
otherwise.
Let us know what you think of these prototype pages.
Generated with Harlequin WebMaker