3 TQ3ElementCopyReplaceMethod

You can define a method to copy the data of your custom element type when an element of that type is being replaced by another element of that type.

typedef TQ3Status (*TQ3ElementCopyReplaceMethod) (
const void *fromAPIElement, 
void *ontoInternalElement);
fromAPIElement
A pointer to the element data associated with an element having your custom element type.
ontoInternalElement
On entry, a pointer to an empty, zeroed block of memory large enough to contain the element data associated with an element having your custom element type.

DESCRIPTION


Your TQ3ElementCopyReplaceMethod function should copy the element data pointed to by the fromAPIElement parameter into the location pointed to by the toInternalElement parameter. This method is called whenever the Q3Set_Add or Q3AttributeSet_Add function is used to replace an element of your custom type in a set. The fromAPIElement parameter contains the same data pointer that was passed to Q3Set_Add or Q3AttributeSet_Add. The ontoInternalElement parameter is a pre-existing block initialized by your TQ3ElementCopyAddMethod or TQ3ElementCopyDuplicateMethod method.

RESULT CODES


Your TQ3ElementCopyReplaceMethod function should return kQ3Success if it is successful and kQ3Failure otherwise.

DESCRIPTION
RESULT CODES

3D Graphics Programming with QuickDraw 3D - 16 OCT 1995

© Apple Computer, Inc.

Let us know what you think of these prototype pages.

Generated with Harlequin WebMaker