Synopsis

OTM_TREE *otm_MergeTree(long option, OTM_TREE *tree1, OTM_TREE *tree2, char operation)

Purpose

Merge two object trees into one object tree.

Description

This function will return a pointer to a new tree as a result of merging the two specified trees according to the specified operation. If one of the specified tree pointers is NULL the other will be copied to create the new tree. The object sizes and compare functions must be the same or an error will be returned.

Input

option

Options (not used)

tree1

Tree pointer one

tree2

Tree pointer two

operation

OTM_DIFFERENCE

object in one and not the other

OTM_UNION

all objects in both

OTM_INTERSECTION

object in both

Return

Tree pointer or NULL if error