Attribute Callback Functions   

<<< Application I/O Functions Chapters Frustrum Tokens and Error Codes >>>

Contents

[back to top]


F.1 Introduction

This appendix contains the specifications of the attribute callback functions which can be implemented to replace or extend the normal attribute handling process in Parasolid.

Further information on the use and effects of attribute callback functions can be found in Chapter 45, "Attribute Definitions", and Chapter 46, "Attributes", of the Parasolid Functional Description Manual.

[back to top]

F.1.1 Registering the attribute callback functions

The attribute callback functions must be registered with Parasolid by calling the PK function PK_ATTDEF_register_callbacks, at any time during a Parasolid session.

The functions can then be enabled and disabled during a modeling session by the PK function PK_ATTDEF_set_callback_flags.

 

Note: In the following function definitions, the function names given are purely nominal, as the functions are registered by the call to PK_ATTDEF_register_callbacks.

split_callback

 

void              split_callback
(
PK_ENTITY_t       old_entity, /* the old entity     */
int               n_attribs,  /* and its attributes */
const PK_ATTRIB_t attribs[],
PK_ENTITY_t       new_entity /* the new entity      */
)

Called after the split has occurred. There are no attributes on the new entity.

merge_callback

 

void              merge_callback
(
PK_ENTITY_t       live_entity,      /* the entity which survives */
int               n_live_attribs,   /* and its attributes            */
const PK_ATTRIB_t live_attribs[],
PK_ENTITY_t       doomed_entity,    /* the entity to be deleted      */
int               n_doomed_attribs, /* and its attributes            */
const PK_ATTRIB_t doomed_attribs[]
)

Called as the merge is about to occur.

delete_callback

 

void              delete_callback
(
PK_ENTITY_t       entity,    /* the entity to be deleted */
int               n_attribs, /* and its attributes       */
const PK_ATTRIB_t attribs[]
)

Called as the deletion is about to occur.

copy_callback

 

void              copy_callback
(
PK_ENTITY_t       old_entity, /* the original entity */
int               n_attribs,  /* and its attributes  */
const PK_ATTRIB_t attribs[],
PK_ENTITY_t       new_entity  /* the copy            */
)

Called after the copy has occurred. There are no attributes on the new entity.

transmit_callback

 

void              transmit_callback
(
PK_ENTITY_t       entity,    /* the entity         */
int               n_attribs, /* and its attributes */
const PK_ATTRIB_t attribs[]
)

Called at the start of the PK function doing the transmit.

receive_callback

 

void              receive_callback
(
PK_ENTITY_t       entity,    /* the entity         */
int               n_attribs, /* and its attributes */
const PK_ATTRIB_t attribs[]
)

Called at the end of the PK function doing the receive.

[back to top]

<<< Application I/O Functions Chapters Frustrum Tokens and Error Codes >>>