 |
PK_PARTITION_reset_attribs |
|
PK_ERROR_code_t PK_PARTITION_reset_attribs
(
--- received arguments ---
PK_PARTITION_t partition, --- partition
int n_attdefs, --- number of attdefs
const PK_ATTDEF_t attdefs[], --- attdefs to consider
PK_ATTRIB_reset_cb_f_t reset_cb, --- callback to obtain revised
--- values for an attribute
PK_POINTER_t context, --- context data for callback
const PK_PARTITION_reset_attribs_o_t *options --- options
)
This function allows changes to the contents of selected attributes in
the given partition.
Specific Errors:
PK_ERROR_rollback_not_started Partitioned rollback is not active (MILD)
PK_ERROR_not_at_pmark Partition is not at a pmark (MILD)
PK_ERROR_unsuitable_entity One of 'attdefs' is a Parasolid system
attribute definition (MILD)
PK_ERROR_reset_failed Operation stopped before visiting all
pmarks in partition (SERIOUS)
PK_ERROR_deltas_not_available Partition has been received or
transmitted with the option to
receive or transmit deltas later,
and has not yet done so (MILD)
This function visits all the pmarks in 'partition' and, at each pmark,
it finds the attribute values which have been created or changed and
obtains replacement values by calling the callback 'reset_cb'.
The pmarks are visited starting at the partition's initial pmark,
rolling forward a single pmark at a time. At each pmark, it finds
attributes which have been created or changed during the roll. If the
attdef of the attribute is one of those in the array 'attdefs', the
callback will be called allowing the application to return new values
for the attribute. The values in the attribute will be changed to
these new values, and these will become the values of the attribute
whenever the partition is rolled to this pmark. The callback must only
make read-only calls to Parasolid.
When this function is called, the partition must be at a pmark. When
the function has finished without error, the partition will be
returned to this starting pmark.
This function should only be called when partitioned rollback has been
started with PK_DELTA_register_callbacks.
The attdefs must be of class PK_ATTDEF_class_01_c or
PK_ATTDEF_class_06_c. Also, 'attdefs' must not include any Parasolid
system attribute definitions.
Warning: if there is a failure during the call to this function, it
will not be possible, using the rollback mechanism, to restore the
attributes to the same state as when it was called. However, the
partition should still be valid so, if the application can resolve the
problem causing the failure (for example by increasing available
memory after running out), the function can be called again. Note
that each call to this function will scan the whole partition, so a
recovery procedure needs to know those attributes which have already
been processed and those which have not been processed.