Action:
|
Modifies a history stream by merging a range of delta states.
|
|
Prototype:
|
outcome api_merge_states (
|
|
|
DELTA_STATE* ds1
|
// state defining one end
|
|
|
|
= NULL,
|
// of range to be merged
|
|
|
DELTA_STATE* ds2
|
// other end
|
|
|
|
= NULL,
|
// of range to be merged
|
|
|
HISTORY_STREAM* hs
|
// history stream
|
|
|
|
= NULL,
|
// containing states
|
|
|
logical prune_partners
|
// flag to allow pruning
|
|
|
|
= FALSE,
|
// of partner states
|
|
|
logical keep_both
|
// flag to indicate both
|
|
|
|
= FALSE
|
// states are to be kept
|
|
|
);
|
|
Includes:
|
#include "kernel/acis.hxx"
|
|
#include "kernel/kernapi/api/api.hxx"
|
|
#include "kernel/kernapi/api/kernapi.hxx"
|
|
#include "kernel/kerndata/bulletin/bulletin.hxx"
|
|
#include "baseutil/logical.h"
|
|
Description:
|
This API merges the delta states contained in a range specified by the user through the arguments
ds1 and
ds2. If one of these arguments is given as
NULL, the specified state is merged with its next state. If both are given as
NULL, the active delta state is merged with its predecessor. The user may specify the relevant history stream by furnishing the argument
hs. Otherwise, it is taken from
ds1 or
ds2, if they are given, or set to the default stream, if they are not. By default, the function fails if the range contains states having partner states, but if the flag
prune_partners is set to
TRUE, the function will prune the branches associated with these partners. If the
keep_both flag is
TRUE, the merge happens between the given states so neither is deleted. The
keep_both flag has no effect unless two non-NULL states are given.
|
|
Errors:
|
The delta states referenced by
ds1 and
ds2 do not belong to the same stream, they do not belong to the specified stream, or partner states were encountered with
prune_partners set to
FALSE.
|
|
Library:
|
kernel
|
|
Filename:
|
kern/kernel/kernapi/api/kernapi.hxx
|
|
Effect:
|
Read-only
|