 |
PK_PARTITION_merge |
|
PK_ERROR_code_t PK_PARTITION_merge
(
--- received arguments ---
int n_partitions, --- number of partitions
const PK_PARTITION_t partitions[], --- partitions
int n_pmarks, --- number of partition marks
const PK_PMARK_t pmarks[], --- partition marks
const PK_PARTITION_merge_o_t *options --- merge options
)
This function merges the given 'partitions' by combining their model data and
interleaving their pmark deltas into a single partition using the given
'pmarks'.
Specific Errors:
PK_ERROR_rollback_not_started Partitioned rollback is not active (MILD)
PK_ERROR_bad_mark Partition mark cannot be merged (MILD)
PK_ERROR_bad_partition Partition cannot be merged (MILD)
PK_ERROR_frustrum_failure The frustrum returned an error
(potentially FATAL)
All model data from the 'partitions' are moved into the first partition without
changing any tags. This first partition is the surviving partition. The other
emptied 'partitions' are then deleted, leaving the surviving partition in the
same overall model state.
If any of the 'partitions' are not at a pmark then the surviving partition will
not be at a pmark. If one of the 'partitions' is the current partition then the
surviving partition will be the current partition.
All the 'partitions' must have strictly linear pmark graphs with the last pmark
being the current pmark. No session marks may be set.
The 'pmarks' array must contain for each of the 'partitions', a complete
linear sequence of pmarks from the first (unique) non-initial pmark to the
current pmark. They must be in the same order within the array, but can be
noncontiguous; interleaved with the other 'pmarks' in any permutation.
Partitions with their initial pmark current have an empty sequence.
The new linear pmark graph of the surviving partition will be in the same order
as 'pmarks', together with the original initial pmark. The initial pmarks of
the other 'partitions' are deleted. The new current pmark will be the last
pmark.
All 'pmarks' not from the surviving partition will get a new pmark identifier.
Light partitions and partitions that allow partial pmarks cannot participate in
merging.
See Merging partitions for more information.