Go to the source code of this file.
|
struct diffutil_snake_t * | vlc_diffutil_build_snake (const vlc_diffutil_callback_t *diffOp, const void *dataOld, const void *dataNew) |
| vlc_diffutil_build_snake compute a diff model between the dataOld model and the dataNew model.
|
|
void | vlc_diffutil_free_snake (struct diffutil_snake_t *snake) |
| free the snake created by vlc_diffutil_build_snake
|
|
bool | vlc_diffutil_walk_snake (const diffutil_snake_t *snake, const vlc_diffutil_snake_callback_t *snakeOp, void *cbData, const vlc_diffutil_callback_t *diffOp, const void *dataOld, const void *dataNew) |
| iterate over the changelist and callback user on each operation (keep/insert/remove)
|
|
vlc_diffutil_changelist_t * | vlc_diffutil_build_change_list (const struct diffutil_snake_t *snake, const vlc_diffutil_callback_t *diffOp, const void *dataOld, const void *dataNew, int flags) |
| vlc_diffutil_build_change_list creates a list of changes to apply to transform dataOld into dataNew
|
|
void | vlc_diffutil_free_change_list (vlc_diffutil_changelist_t *changelist) |
| free the changelist created by vlc_diffutil_build_change_list
|
|
◆ diffutil_snake_t
◆ vlc_diffutil_op_type
Enumerator |
---|
VLC_DIFFUTIL_OP_INSERT | items have been added to the list
|
VLC_DIFFUTIL_OP_REMOVE | items have been removed from the list
|
VLC_DIFFUTIL_OP_MOVE | items have been moved within the list
|
VLC_DIFFUTIL_OP_IGNORE | current change should be ignored
|
◆ vlc_diffutil_result_flag
Enumerator |
---|
VLC_DIFFUTIL_RESULT_MOVE | try to transform an insertion with a matching suppression into a move operation
|
VLC_DIFFUTIL_RESULT_AGGREGATE | aggregate similar consecutive operations into a single operation for instance this: [{INSERT, i=5}{INSERT, x=6}{REMOVE, i=10}{REMOVE, i=10}{REMOVE, i=10}] would be transformed into: [{INSERT, i=5, count=2}{REMOVE, i=10, count=3}]
|
◆ vlc_diffutil_build_change_list()
vlc_diffutil_build_change_list creates a list of changes to apply to transform dataOld into dataNew
- Parameters
-
snake | the snake created with vlc_diffutil_build_snake |
diffOp | callbacks used in vlc_diffutil_build_snake |
dataOld | old model |
dataNew | new model |
flags | vlc_diffutil_result_flag flags |
- Returns
- the list of changes, NULL on error
◆ vlc_diffutil_build_snake()
vlc_diffutil_build_snake compute a diff model between the dataOld model and the dataNew model.
This model can be processed manually using vlc_diffutil_walk_snake or translated into a change list using vlc_diffutil_build_change_list
- Parameters
-
diffOp | callback to compare the elements from the old and new model |
dataOld | old model |
dataNew | new model |
- Returns
- the diff model, NULL on error
References diffutil_context_t::backward, diffutil_context_t::dataNew, diffutil_context_t::dataOld, DiffUtilFindPath(), diffutil_context_t::forward, vlc_diffutil_callback_t::getNewSize, vlc_diffutil_callback_t::getOldSize, vlc_diffutil_callback_t::isSame, diffutil_context_t::op, vlc_vector_init, and diffutil_context_t::z.
◆ vlc_diffutil_free_change_list()
free the changelist created by vlc_diffutil_build_change_list
References vlc_vector_destroy.
◆ vlc_diffutil_free_snake()
◆ vlc_diffutil_walk_snake()