5 TQ3AttributeCopyInheritMethod

You can define an attribute inheritance method to copy attributes during inheritance.

typedef TQ3Status (*TQ3AttributeCopyInheritMethod) (
const void *fromInternalAttribute,
void *toInternalAttribute);
fromInternalAttribute
A pointer to the attribute data associated with an attribute having your custom attribute type.
toInternalAttribute
On entry, a pointer to an uninitialized block of memory large enough to contain the attribute data associated with an attribute having your custom attribute type.

DESCRIPTION


Your TQ3AttributeCopyInheritMethod function should copy the attribute data pointed to by the fromInternalAttribute parameter into the location pointed to by the toInternalAttribute parameter. This method is called whenever the Q3AttributeSet_Inherit function is used to copy an attribute of your custom type from one set to another set.

You should strive to make your TQ3AttributeCopyInheritMethod method as fast as possible. For example, if your custom element contains objects, you should call the Q3Shared_GetReference function instead of the Q3Object_Duplicate function.

RESULT CODES


Your TQ3AttributeCopyInheritMethod 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