ITK Function Reference

(V10000.1.0.60_20160308.00)
Modules | Functions | Variables
Compare

Modules

 CMP Errors
 
 CMP Tokens
 

Functions

FCLASSES_API int CMP_add_cached_char (tag_t cache, char value)
 
FCLASSES_API int CMP_add_cached_date (tag_t cache, date_t value)
 
FCLASSES_API int CMP_add_cached_double (tag_t cache, double value)
 
FCLASSES_API int CMP_add_cached_int (tag_t cache, int value)
 
FCLASSES_API int CMP_add_cached_logical (tag_t cache, logical value)
 
FCLASSES_API int CMP_add_cached_string (tag_t cache, char *value)
 
FCLASSES_API int CMP_add_cached_tag (tag_t cache, tag_t value)
 
FCLASSES_API int CMP_ask_app_data (tag_t engine, void **app_data)
 
FCLASSES_API int CMP_ask_cached_char (tag_t cache, char *value)
 
FCLASSES_API int CMP_ask_cached_char_array (tag_t cache, int *n, char **value)
 
FCLASSES_API int CMP_ask_cached_date (tag_t cache, date_t *value)
 
FCLASSES_API int CMP_ask_cached_date_array (tag_t cache, int *n, date_t **value)
 
FCLASSES_API int CMP_ask_cached_double (tag_t cache, double *value)
 
FCLASSES_API int CMP_ask_cached_int (tag_t cache, int *value)
 
FCLASSES_API int CMP_ask_cached_logical (tag_t cache, logical *value)
 
FCLASSES_API int CMP_ask_cached_pointer (tag_t cache, void **value)
 
FCLASSES_API int CMP_ask_cached_string (tag_t cache, char **value)
 
FCLASSES_API int CMP_ask_cached_string_array (tag_t cache, int *n, char ***value)
 
FCLASSES_API int CMP_ask_cached_tag (tag_t cache, tag_t *value)
 
FCLASSES_API int CMP_ask_cached_tag_array (tag_t cache, int *n, tag_t **value)
 
FCLASSES_API int CMP_ask_data_cache (tag_t set, tag_t element, int side, int *cache_type, tag_t *cache)
 
FCLASSES_API int CMP_ask_diff (tag_t set, logical *is_added, int *added_to_side, logical *is_changed)
 
FCLASSES_API int CMP_ask_diff_elements (tag_t set, int *n, tag_t **elements)
 
FCLASSES_API int CMP_ask_diff_sets (tag_t engine, int *n, tag_t **diff_sets)
 
FCLASSES_API int CMP_ask_element_application_flag (tag_t element, int app_flag, logical *value)
 
FCLASSES_API int CMP_ask_element_info (tag_t element, int *element_type, int *priority, int *cache_type, char **uif_name, logical *suppress_value)
 
FCLASSES_API int CMP_ask_element_methods (tag_t element, CMP_compare_obj_method_t **obj_method, CMP_compare_agg_method_t **agg_method, CMP_update_cache_method_t **cache_method, CMP_uif_name_method_t **name_method, CMP_uif_value_method_t **value_method, CMP_free_cache_method_t **free_method)
 
FCLASSES_API int CMP_ask_element_value (tag_t set, int side, tag_t element, char **value)
 
FCLASSES_API int CMP_ask_element_value_char (tag_t set, int side, tag_t element, char *value)
 
FCLASSES_API int CMP_ask_element_value_char_array (tag_t set, int side, tag_t element, int *n, char **value)
 
FCLASSES_API int CMP_ask_element_value_date (tag_t set, int side, tag_t element, date_t *value)
 
FCLASSES_API int CMP_ask_element_value_date_array (tag_t set, int side, tag_t element, int *n, date_t **value)
 
FCLASSES_API int CMP_ask_element_value_double (tag_t set, int side, tag_t element, double *value)
 
FCLASSES_API int CMP_ask_element_value_int (tag_t set, int side, tag_t element, int *value)
 
FCLASSES_API int CMP_ask_element_value_logical (tag_t set, int side, tag_t element, logical *value)
 
FCLASSES_API int CMP_ask_element_value_string (tag_t set, int side, tag_t element, char **value)
 
FCLASSES_API int CMP_ask_element_value_string_array (tag_t set, int side, tag_t element, int *n, char ***value)
 
FCLASSES_API int CMP_ask_element_value_tag (tag_t set, int side, tag_t element, tag_t *value)
 
FCLASSES_API int CMP_ask_element_value_tag_array (tag_t set, int side, tag_t element, int *n, tag_t **value)
 
FCLASSES_API int CMP_ask_elements (tag_t desc, int *n, tag_t **elements)
 
FCLASSES_API int CMP_ask_engine_of_set (tag_t set, tag_t *engine)
 
FCLASSES_API int CMP_ask_objects_in_set (tag_t set, int side, int *n, tag_t **objects)
 
FCLASSES_API int CMP_ask_ordered_elements (tag_t desc, int *n, tag_t **elements)
 
FCLASSES_API int CMP_ask_prop_element_info (tag_t prop_element, int *aggregate_type, char **prop_name, char **disp_prop_name)
 
FCLASSES_API int CMP_ask_prop_element_order (tag_t prop_element, int *order)
 
FCLASSES_API int CMP_ask_sets (tag_t engine, int *n, tag_t **sets)
 
FCLASSES_API int CMP_create (tag_t compare_desc, tag_t *engine)
 
FCLASSES_API int CMP_create_desc (const char *name, tag_t *desc)
 
FCLASSES_API int CMP_create_element (tag_t desc, int priority, int cache_type, const char *name, logical suppress_value, tag_t *element)
 
FCLASSES_API int CMP_create_prop_element (tag_t desc, int priority, int cache_type, const char *name, logical suppress_value, tag_t type_tag, const char *prop_name, const char *disp_prop_name, tag_t *element)
 
FCLASSES_API int CMP_cull_compare_set (tag_t set)
 
FCLASSES_API int CMP_cull_compare_sets (tag_t engine)
 
FCLASSES_API int CMP_find_desc (const char *name, tag_t *compare_desc)
 
FCLASSES_API int CMP_register_compare_agg_method (tag_t element, CMP_compare_agg_method_t *method)
 
FCLASSES_API int CMP_register_compare_obj_method (tag_t element, CMP_compare_obj_method_t *method)
 
FCLASSES_API int CMP_register_free_cache_method (tag_t element, CMP_free_cache_method_t *method)
 
FCLASSES_API int CMP_register_uif_name_method (tag_t element, CMP_uif_name_method_t *method)
 
FCLASSES_API int CMP_register_uif_value_method (tag_t element, CMP_uif_value_method_t *method)
 
FCLASSES_API int CMP_register_update_cache_method (tag_t element, CMP_update_cache_method_t *method)
 
FCLASSES_API int CMP_set_aggregate_type (tag_t prop_element, int aggregate_type)
 
FCLASSES_API int CMP_set_app_data (tag_t engine, void *app_data)
 
FCLASSES_API int CMP_set_cached_char (tag_t cache, char value)
 
FCLASSES_API int CMP_set_cached_char_array (tag_t cache, int n, char *value)
 
FCLASSES_API int CMP_set_cached_date (tag_t cache, date_t value)
 
FCLASSES_API int CMP_set_cached_date_array (tag_t cache, int n, date_t *value)
 
FCLASSES_API int CMP_set_cached_double (tag_t cache, double value)
 
FCLASSES_API int CMP_set_cached_int (tag_t cache, int value)
 
FCLASSES_API int CMP_set_cached_logical (tag_t cache, logical value)
 
FCLASSES_API int CMP_set_cached_pointer (tag_t cache, void *value)
 
FCLASSES_API int CMP_set_cached_string (tag_t cache, char *value)
 
FCLASSES_API int CMP_set_cached_string_array (tag_t cache, int n, char **value)
 
FCLASSES_API int CMP_set_cached_tag (tag_t cache, tag_t value)
 
FCLASSES_API int CMP_set_cached_tag_array (tag_t cache, int n, tag_t *value)
 
FCLASSES_API int CMP_set_element_application_flag (tag_t element, int app_flag, logical value)
 
FCLASSES_API int CMP_set_element_display_order (tag_t desc, int n, tag_t *elements)
 
FCLASSES_API int CMP_set_prop_element_order (tag_t prop_element, int order)
 

Variables

FCLASSES_API const char *const CMP_std_descriptor_appr_compare_name
 
FCLASSES_API const char *const CMP_std_descriptor_LBOM_compare_name
 
FCLASSES_API const char *const CMP_std_descriptor_LBOM_withocc_compare_name
 
FCLASSES_API const char *const CMP_std_descriptor_P_id_A_rev_qty_name
 
FCLASSES_API const char *const CMP_std_descriptor_P_id_seq_A_rev_qty_name
 

Detailed Description

Function Documentation

FCLASSES_API int CMP_add_cached_char ( tag_t  cache,
char  value 
)

Adds the given value to the previously cached value. This is intended for use by cache update methods registered with CMP_register_update_cache_method. The exact meaning of this operation depends on the data type of the cache. For example, an integer cache will simply add the 2 values. A string cache will concatenate the values. A logical cache will AND the values. If the default behavior is not appropriate to a specific situation then a combination of CMP_ask_cached_char and CMP_set_cached_char allows complete control over the cache update.

Parameters
cache(I) Data cache to set, as returned by CMP_ask_data_cache.
value(I) Value to add to the already cached value.
FCLASSES_API int CMP_add_cached_date ( tag_t  cache,
date_t  value 
)

Adds the given value to the previously cached value. This is intended for use by cache update methods registered with CMP_register_update_cache_method. The exact meaning of this operation depends on the data type of the cache. For example, an integer cache will simply add the 2 values. A string cache will concatenate the values. A logical cache will AND the values. If the default behavior is not appropriate to a specific situation then a combination of CMP_ask_cached_date and CMP_set_cached_date allows complete control over the cache update.

Parameters
cache(I) Data cache to set, as returned by CMP_ask_data_cache.
value(I) Value to add to the already cached value.
FCLASSES_API int CMP_add_cached_double ( tag_t  cache,
double  value 
)

Adds the given value to the previously cached value. This is intended for use by cache update methods registered with CMP_register_update_cache_method. The exact meaning of this operation depends on the data type of the cache. For example, an integer cache will simply add the 2 values. A string cache will concatenate the values. A logical cache will AND the values. If the default behavior is not appropriate to a specific situation then a combination of CMP_ask_cached_double and CMP_set_cached_double allows complete control over the cache update.

Parameters
cache(I) Data cache to set, as returned by CMP_ask_data_cache.
value(I) Value to add to the already cached value.
FCLASSES_API int CMP_add_cached_int ( tag_t  cache,
int  value 
)

Adds the given value to the previously cached value. This is intended for use by cache update methods registered with CMP_register_update_cache_method. The exact meaning of this operation depends on the data type of the cache. For example, an integer cache will simply add the 2 values. A string cache will concatenate the values. A logical cache will AND the values. If the default behavior is not appropriate to a specific situation then a combination of CMP_ask_cached_int and CMP_set_cached_int allows complete control over the cache update.

Parameters
cache(I) Data cache to set, as returned by CMP_ask_data_cache.
value(I) Value to add to the already cached value.
FCLASSES_API int CMP_add_cached_logical ( tag_t  cache,
logical  value 
)

Adds the given value to the previously cached value. This is intended for use by cache update methods registered with CMP_register_update_cache_method. The exact meaning of this operation depends on the data type of the cache. For example, an integer cache will simply add the 2 values. A string cache will concatenate the values. A logical cache will AND the values. If the default behavior is not appropriate to a specific situation then a combination of CMP_ask_cached_logical and CMP_set_cached_logical allows complete control over the cache update.

Parameters
cache(I) Data cache to set, as returned by CMP_ask_data_cache.
value(I) Value to add to the already cached value.
FCLASSES_API int CMP_add_cached_string ( tag_t  cache,
char *  value 
)

Adds the given value to the previously cached value. This is intended for use by cache update methods registered with CMP_register_update_cache_method. The exact meaning of this operation depends on the data type of the cache. For example, an integer cache will simply add the 2 values. A string cache will concatenate the values. A logical cache will AND the values. If the default behavior is not appropriate to a specific situation then a combination of CMP_ask_cached_string and CMP_set_cached_string allows complete control over the cache update.

Parameters
cache(I) Data cache to set, as returned by CMP_ask_data_cache.
value(I) Value to add to the already cached value.
FCLASSES_API int CMP_add_cached_tag ( tag_t  cache,
tag_t  value 
)

Adds the given value to the previously cached value. This is intended for use by cache update methods registered with CMP_register_update_cache_method. The exact meaning of this operation depends on the data type of the cache. For example, an integer cache will simply add the 2 values. A string cache will concatenate the values. A logical cache will AND the values. If the default behavior is not appropriate to a specific situation then a combination of CMP_ask_cached_tag and CMP_set_cached_tag allows complete control over the cache update.

Parameters
cache(I) Data cache to set, as returned by CMP_ask_data_cache.
value(I) Value to add to the already cached value.
FCLASSES_API int CMP_ask_app_data ( tag_t  engine,
void **  app_data 
)

Returns the compare engine�s application data pointer. The application data pointer is intended to provide a mechanism for passing important data into your external logic methods.

Parameters
engine(I) Compare engine to query.
app_data(Op) Pointer to some vital piece of data.
FCLASSES_API int CMP_ask_cached_char ( tag_t  cache,
char *  value 
)

Returns the value stored in the given data cache. This is intended for use by cache update methods registered with CMP_register_update_cache_method

Parameters
cache(I) Data cache to query, as returned by CMP_ask_data_cache.
value(O) Cached value.
FCLASSES_API int CMP_ask_cached_char_array ( tag_t  cache,
int *  n,
char **  value 
)

Returns the value stored in the given data cache. This is intended for use by cache update methods registered with CMP_register_update_cache_method

Parameters
cache(I) Data cache to query, as returned by CMP_ask_data_cache.
n(O)
value(OF) n Cached value.
FCLASSES_API int CMP_ask_cached_date ( tag_t  cache,
date_t value 
)

Returns the value stored in the given data cache. This is intended for use by cache update methods registered with CMP_register_update_cache_method

Parameters
cache(I) Data cache to query, as returned by CMP_ask_data_cache.
value(O) Cached value.
FCLASSES_API int CMP_ask_cached_date_array ( tag_t  cache,
int *  n,
date_t **  value 
)

Returns the value stored in the given data cache. This is intended for use by cache update methods registered with CMP_register_update_cache_method

Parameters
cache(I) Data cache to query, as returned by CMP_ask_data_cache.
n(O)
value(OF) n Cached value
FCLASSES_API int CMP_ask_cached_double ( tag_t  cache,
double *  value 
)

Returns the value stored in the given data cache. This is intended for use by cache update methods registered with CMP_register_update_cache_method

Parameters
cache(I) Data cache to query, as returned by CMP_ask_data_cache.
value(O) Cached value.
FCLASSES_API int CMP_ask_cached_int ( tag_t  cache,
int *  value 
)

Returns the value stored in the given data cache. This is intended for use by cache update methods registered with CMP_register_update_cache_method

Parameters
cache(I) Data cache to query, as returned by CMP_ask_data_cache.
value(O) Cached value.
FCLASSES_API int CMP_ask_cached_logical ( tag_t  cache,
logical value 
)

Returns the value stored in the given data cache. This is intended for use by cache update methods registered with CMP_register_update_cache_method

Parameters
cache(I) Data cache to query, as returned by CMP_ask_data_cache.
value(O) Cached value.
FCLASSES_API int CMP_ask_cached_pointer ( tag_t  cache,
void **  value 
)

Returns the value stored in the given data cache. This is intended for use by cache update methods registered with CMP_register_update_cache_method

Parameters
cache(I) Data cache to query, as returned by CMP_ask_data_cache.
value(Op) Cached value.
FCLASSES_API int CMP_ask_cached_string ( tag_t  cache,
char **  value 
)

Returns the value stored in the given data cache. This is intended for use by cache update methods registered with CMP_register_update_cache_method

Parameters
cache(I) Data cache to query, as returned by CMP_ask_data_cache.
value(OF) Cached value.
FCLASSES_API int CMP_ask_cached_string_array ( tag_t  cache,
int *  n,
char ***  value 
)

Returns the value stored in the given data cache. This is intended for use by cache update methods registered with CMP_register_update_cache_method

Parameters
cache(I) Data cache to query, as returned by CMP_ask_data_cache.
n(O)
value(OF) n Cached value
FCLASSES_API int CMP_ask_cached_tag ( tag_t  cache,
tag_t value 
)

Returns the value stored in the given data cache. This is intended for use by cache update methods registered with CMP_register_update_cache_method

Parameters
cache(I) Data cache to query, as returned by CMP_ask_data_cache.
value(O) Cached value.
FCLASSES_API int CMP_ask_cached_tag_array ( tag_t  cache,
int *  n,
tag_t **  value 
)

Returns the value stored in the given data cache. This is intended for use by cache update methods registered with CMP_register_update_cache_method

Parameters
cache(I) Data cache to query, as returned by CMP_ask_data_cache.
n(O)
value(OF) n Cached value
FCLASSES_API int CMP_ask_data_cache ( tag_t  set,
tag_t  element,
int  side,
int *  cache_type,
tag_t cache 
)

Returns the data cache for the given element in a particular set. This is intended for use by cache update methods registered with CMP_register_update_cache_method.

Parameters
set(I) Compare set to query.
element(I) Compare element to query.
side(I)
cache_type(O) Data type of the cache. Will be set to CMP_cache_none if no cache exists for this element of the given set.
cache(O) Tag of the cache.
FCLASSES_API int CMP_ask_diff ( tag_t  set,
logical is_added,
int *  added_to_side,
logical is_changed 
)

Returns an overview of the type of differences that a set contains.

Parameters
set(I) Compare set to query.
is_added(O) Returned as true if this set only contains objects on one side. Returned as false if there are objects on both sides of the set.
added_to_side(O) If is_added is true, then this will define which side contains objects. It will be set to either CMP_LHS or CMP_RHS.
is_changed(O) Returned as true if there are objects on both sides but some aggregate element differs between the two sides.
FCLASSES_API int CMP_ask_diff_elements ( tag_t  set,
int *  n,
tag_t **  elements 
)

Returns a list of the compare elements that differ between the two sides of the given set.

Parameters
set(I) Compare set to query.
n(O) Number of elements that are different.
elements(OF) n Array of elements that are different.
FCLASSES_API int CMP_ask_diff_sets ( tag_t  engine,
int *  n,
tag_t **  diff_sets 
)

Returns an array of the sets that contain differences that exist inside the compare engine.

Parameters
engine(I) Compare engine to query.
n(O) Number of sets containing differences in the engine.
diff_sets(OF) n Array of sets containing differences in the engine.
FCLASSES_API int CMP_ask_element_application_flag ( tag_t  element,
int  app_flag,
logical value 
)

Returns a specific application flag for the given compare element. See bom_tokens.h for a list of standard application flags.

Parameters
element(I)
app_flag(I)
value(O)
FCLASSES_API int CMP_ask_element_info ( tag_t  element,
int *  element_type,
int *  priority,
int *  cache_type,
char **  uif_name,
logical suppress_value 
)

Returns details about the given element.

Parameters
element(I) Compare element to query.
element_type(O) Defines whether it is a property element or an external element. Set to either CMP_property_element or CMP_external_element.
priority(O) Set to CMP_primary_element, CMP_aggregate_element, or CMP_display_element.
cache_type(O) Defines data type for caching element values.
uif_name(OF) Internationalized name for this element.
suppress_value(O) Defines whether an application should display the element value or not. This is used to flag that a particular value is too verbose for output to a compare report.
FCLASSES_API int CMP_ask_element_methods ( tag_t  element,
CMP_compare_obj_method_t **  obj_method,
CMP_compare_agg_method_t **  agg_method,
CMP_update_cache_method_t **  cache_method,
CMP_uif_name_method_t **  name_method,
CMP_uif_value_method_t **  value_method,
CMP_free_cache_method_t **  free_method 
)

Returns the element�s method pointers.

Parameters
element(I) Compare element to query.
obj_method(Op) Method for comparing an EIM object against a compare set.
agg_method(Op) Method for comparing the two sides against a compare set.
cache_method(Op) Method for updating the data cache following an EIM object�s insertion into a set.
name_method(Op) Method to return the display name for an element.
value_method(Op) Method to return the display value for an element.
free_method(Op) Method to release an externally defined data cache.
FCLASSES_API int CMP_ask_element_value ( tag_t  set,
int  side,
tag_t  element,
char **  value 
)

Returns the display value on the given side of the compare set for a specific element.

Parameters
set(I) Compare set to query.
side(I) Which side of the compare set to query. Set this to either CMP_LHS or CMP_RHS.
element(I) Element to query.
value(OF) Value as a string.
FCLASSES_API int CMP_ask_element_value_char ( tag_t  set,
int  side,
tag_t  element,
char *  value 
)

Returns the value on the given side of the compare set for a specific element.

Restrictions:

These functions are only valid for property elements and cached external elements. It will fail for uncached external elements, as the system has no mechanism for obtaining the values of such elements.

Parameters
set(I) Compare set to query.
side(I) Which side of the compare set to query. Set this to either CMP_LHS or CMP_RHS.
element(I) Element to query.
value(O) Value.
FCLASSES_API int CMP_ask_element_value_char_array ( tag_t  set,
int  side,
tag_t  element,
int *  n,
char **  value 
)

Returns the values on the given side of the compare set for a specific element.

Restrictions:

These functions are only valid for property elements and cached external elements. It will fail for uncached external elements, as the system has no mechanism for obtaining the values of such elements.

Parameters
set(I) Compare set to query.
side(I) Which side of the compare set to query. Set this to either CMP_LHS or CMP_RHS.
element(I) Element to query.
n(O)
value(OF) n Value.
FCLASSES_API int CMP_ask_element_value_date ( tag_t  set,
int  side,
tag_t  element,
date_t value 
)

Returns the value on the given side of the compare set for a specific element.

Restrictions:

These functions are only valid for property elements and cached external elements. It will fail for uncached external elements, as the system has no mechanism for obtaining the values of such elements.

Parameters
set(I) Compare set to query.
side(I) Which side of the compare set to query. Set this to either CMP_LHS or CMP_RHS.
element(I) Element to query.
value(O) Value.
FCLASSES_API int CMP_ask_element_value_date_array ( tag_t  set,
int  side,
tag_t  element,
int *  n,
date_t **  value 
)

Returns the values on the given side of the compare set for a specific element.

Restrictions:

These functions are only valid for property elements and cached external elements. It will fail for uncached external elements, as the system has no mechanism for obtaining the values of such elements.

Parameters
set(I) Compare set to query.
side(I) Which side of the compare set to query. Set this to either CMP_LHS or CMP_RHS.
element(I) Element to query.
n(O)
value(OF) n Value.
FCLASSES_API int CMP_ask_element_value_double ( tag_t  set,
int  side,
tag_t  element,
double *  value 
)

Returns the value on the given side of the compare set for a specific element.

Restrictions:

These functions are only valid for property elements and cached external elements. It will fail for uncached external elements, as the system has no mechanism for obtaining the values of such elements.

Parameters
set(I) Compare set to query.
side(I) Which side of the compare set to query. Set this to either CMP_LHS or CMP_RHS.
element(I) Element to query.
value(O) Value.
FCLASSES_API int CMP_ask_element_value_int ( tag_t  set,
int  side,
tag_t  element,
int *  value 
)

Returns the value on the given side of the compare set for a specific element.

Restrictions:

These functions are only valid for property elements and cached external elements. It will fail for uncached external elements, as the system has no mechanism for obtaining the values of such elements.

Parameters
set(I) Compare set to query.
side(I) Which side of the compare set to query. Set this to either CMP_LHS or CMP_RHS.
element(I) Element to query.
value(O) Value.
FCLASSES_API int CMP_ask_element_value_logical ( tag_t  set,
int  side,
tag_t  element,
logical value 
)

Returns the value on the given side of the compare set for a specific element.

Restrictions:

These functions are only valid for property elements and cached external elements. It will fail for uncached external elements, as the system has no mechanism for obtaining the values of such elements.

Parameters
set(I) Compare set to query.
side(I) Which side of the compare set to query. Set this to either CMP_LHS or CMP_RHS.
element(I) Element to query.
value(O) Value.
FCLASSES_API int CMP_ask_element_value_string ( tag_t  set,
int  side,
tag_t  element,
char **  value 
)

Returns the value on the given side of the compare set for a specific element.

The value parameter for the scalar type string (char*) needs to be MEM_free()d where it�s an output parameter.

Restrictions:

These functions are only valid for property elements and cached external elements. It will fail for uncached external elements, as the system has no mechanism for obtaining the values of such elements.

Parameters
set(I) Compare set to query.
side(I) Which side of the compare set to query. Set this to either CMP_LHS or CMP_RHS.
element(I) Element to query.
value(OF) Value.
FCLASSES_API int CMP_ask_element_value_string_array ( tag_t  set,
int  side,
tag_t  element,
int *  n,
char ***  value 
)

Returns the values on the given side of the compare set for a specific element.

Restrictions:

These functions are only valid for property elements and cached external elements. It will fail for uncached external elements, as the system has no mechanism for obtaining the values of such elements.

Parameters
set(I) Compare set to query.
side(I) Which side of the compare set to query. Set this to either CMP_LHS or CMP_RHS.
element(I) Element to query.
n(O)
value(OF) n Value.
FCLASSES_API int CMP_ask_element_value_tag ( tag_t  set,
int  side,
tag_t  element,
tag_t value 
)

Returns the value on the given side of the compare set for a specific element.

Restrictions:

These functions are only valid for property elements and cached external elements. It will fail for uncached external elements, as the system has no mechanism for obtaining the values of such elements.

Parameters
set(I) Compare set to query.
side(I) Which side of the compare set to query. Set this to either CMP_LHS or CMP_RHS.
element(I) Element to query.
value(O) Value.
FCLASSES_API int CMP_ask_element_value_tag_array ( tag_t  set,
int  side,
tag_t  element,
int *  n,
tag_t **  value 
)

Returns the values on the given side of the compare set for a specific element.

Restrictions:

These functions are only valid for property elements and cached external elements. It will fail for uncached external elements, as the system has no mechanism for obtaining the values of such elements.

Parameters
set(I) Compare set to query.
side(I) Which side of the compare set to query. Set this to either CMP_LHS or CMP_RHS.
element(I) Element to query.
n(O)
value(OF) n Value.
FCLASSES_API int CMP_ask_elements ( tag_t  desc,
int *  n,
tag_t **  elements 
)

Returns a list of the elements of a compare descriptor.

Parameters
desc(I) Compare descriptor to query.
n(O) Number of elements.
elements(OF) n Array of elements.
FCLASSES_API int CMP_ask_engine_of_set ( tag_t  set,
tag_t engine 
)

Returns the compare set�s engine.

Parameters
set(I)
engine(O)
FCLASSES_API int CMP_ask_objects_in_set ( tag_t  set,
int  side,
int *  n,
tag_t **  objects 
)

Returns the objects on the given side of the compare set.

Parameters
set(I) Compare set to query.
side(I) Which side of the compare set to query. Set this to either CMP_LHS or CMP_RHS.
n(O) Number of objects on given side of the set.
objects(OF) n Array of objects on given side of the set.
FCLASSES_API int CMP_ask_ordered_elements ( tag_t  desc,
int *  n,
tag_t **  elements 
)

Returns a list of the elements of a compare descriptor, in the display order (defined by CMP_set_element_display_order). If no display order has been defined for the descriptor, then the elements are returned in their definition order (same as CMP_ask_elements).

Parameters
desc(I) Compare descriptor to query.
n(O) Number of elements.
elements(OF) n Array of elements.
FCLASSES_API int CMP_ask_prop_element_info ( tag_t  prop_element,
int *  aggregate_type,
char **  prop_name,
char **  disp_prop_name 
)

Returns details about the given property element.

Restrictions:

This function is only valid for property elements. It will fail if called against an external element.

Parameters
prop_element(I) Compare property element to query.
aggregate_type(O) Data type for aggregated values.
prop_name(OF) Name of the property that this element represents.
disp_prop_name(OF) Name of an alternative property that is used for display purposes in preference to the actual compared property. For example, you might want to compare on Item Tag but display Item Id.
FCLASSES_API int CMP_ask_prop_element_order ( tag_t  prop_element,
int *  order 
)
Parameters
prop_element(I)
order(O)
FCLASSES_API int CMP_ask_sets ( tag_t  engine,
int *  n,
tag_t **  sets 
)

Returns an array of the sets that exist inside the compare engine.

Parameters
engine(I) Compare engine to query.
n(O) Number of sets in the engine.
sets(OF) n Array of sets in the engine.
FCLASSES_API int CMP_create ( tag_t  compare_desc,
tag_t engine 
)

Creates a new compare engine based on the given compare descriptor.

Parameters
compare_desc(I) Compare descriptor, as returned by CMP_find_desc.
engine(O) New compare engine.
FCLASSES_API int CMP_create_desc ( const char *  name,
tag_t desc 
)

Creates a new compare descriptor with the supplied name.

Parameters
name(I) New name
desc(O) New compare descriptor.
FCLASSES_API int CMP_create_element ( tag_t  desc,
int  priority,
int  cache_type,
const char *  name,
logical  suppress_value,
tag_t element 
)

Creates a new external compare element.

Parameters
desc(I) Compare descriptor to add the new element to.
priority(I) Set this to CMP_primary_element, CMP_aggregate_element, or CMP_display_element.
cache_type(I) Defines data type for caching element values. Can be set to CMP_cache_none.
name(I) Internationalized name for this element.
suppress_value(I) Defines whether an application should display the element value or not. This is used to flag that a particular value is too verbose for output to a compare report.
element(O) Newly created element.
FCLASSES_API int CMP_create_prop_element ( tag_t  desc,
int  priority,
int  cache_type,
const char *  name,
logical  suppress_value,
tag_t  type_tag,
const char *  prop_name,
const char *  disp_prop_name,
tag_t element 
)

Creates a new compare property element.

Parameters
desc(I) Compare descriptor to add the new element to.
priority(I) Set this to CMP_primary_element, CMP_aggregate_element, or CMP_display_element.
cache_type(I) Defines data type for caching element values. Can be set to CMP_cache_none. Can be set to CMP_cache_sync to force it to match the property data type, or CMP_cache_auto to perform a best fit guess.
name(I) Internationalized name for this element. This will supersede the property name. This feature is useful if the property name is too verbose for output to a compare report.
suppress_value(I) Defines whether an application should display the element value or not. This is used to flag that a particular value is too verbose for output to a compare report.
type_tag(I) Imantype of the object that the property is defined against.
prop_name(I) Name of the property that this element represents.
disp_prop_name(I) Name of an alternative property that is used for display purposes in preference to the actual compared property. For example, you might want to compare on Item Tag but display Item Id.
element(O) Newly created element.
FCLASSES_API int CMP_cull_compare_set ( tag_t  set)

Purges the given set from its compare engine, if that set does not contain any differences.

Parameters
set(I) Compare set to cull from its owning engine.
FCLASSES_API int CMP_cull_compare_sets ( tag_t  engine)

Purges all sets that do not contain any differences from the given compare engine.

Parameters
engine(I) Compare engine from which to cull non-different sets.
FCLASSES_API int CMP_find_desc ( const char *  name,
tag_t compare_desc 
)

Returns the named compare descriptor.

Parameters
name(I) Name of descriptor to find.
compare_desc(O) Compare descriptor.
FCLASSES_API int CMP_register_compare_agg_method ( tag_t  element,
CMP_compare_agg_method_t method 
)

Registers a method for comparing the two sides of a compare set, based on the specified compare element.

Parameters
element(I) Compare element to register the method against.
method(Ip) Method to register.
FCLASSES_API int CMP_register_compare_obj_method ( tag_t  element,
CMP_compare_obj_method_t method 
)

Registers a method for comparing an object against a compare set, based on the specified element.

Parameters
element(I) Compare element to register the method against.
method(Ip) Method to register.
FCLASSES_API int CMP_register_free_cache_method ( tag_t  element,
CMP_free_cache_method_t method 
)

Registers a method for releasing any memory associated with an externally defined cache on the given compare element. This method is only invoked if the element cache type is set to CMP_cache_pointer.

Parameters
element(I) Compare element to register the method against.
method(Ip) Method to register.
FCLASSES_API int CMP_register_uif_name_method ( tag_t  element,
CMP_uif_name_method_t method 
)

Registers a method for obtaining the display name for the given compare element. This method is used (if defined) instead of the internationalized name that is stored on the element itself.

Parameters
element(I) Compare element to register the method against.
method(Ip) Method to register.
FCLASSES_API int CMP_register_uif_value_method ( tag_t  element,
CMP_uif_value_method_t method 
)

Registers a method for obtaining the display value of the given compare element.

Parameters
element(I) Compare element to register the method against.
method(Ip) Method to register.
FCLASSES_API int CMP_register_update_cache_method ( tag_t  element,
CMP_update_cache_method_t method 
)

Registers a method for updating this element�s cached value when a new object is added to a set.

Parameters
element(I) Compare element to register the method against.
method(Ip) Method to register.
FCLASSES_API int CMP_set_aggregate_type ( tag_t  prop_element,
int  aggregate_type 
)

Sets the aggregated data type for a compare property element. By default, the aggregate type will be the same as the property type. However, in some cases this is not appropriate. For example, if your aggregate property has a tag data type then combining multiple tags into a single aggregate tag is meaningless. In this situation you would want to change the aggregate type to be a tag array.

Restrictions:

This function is only valid for property elements. It will fail if called against an external element.

All compare cache types are valid, except for CMP_cache_none, CMP_cache_sync, and CMP_cache_auto.

This function will fail if a cache is being used for the element. This function should only be called if the element�s cache type is set to CMP_cache_none. If a cache is being used for an element, then the aggregate type will, and indeed must, match the cache type.

Parameters
prop_element(I) Compare property element to set the aggregate type of.
aggregate_type(I) Data type of the aggregated values.
FCLASSES_API int CMP_set_app_data ( tag_t  engine,
void *  app_data 
)

Sets the compare engine�s application data pointer. The application data pointer is intended to provide a mechanism for passing important data into your external logic methods.

Parameters
engine(I) Compare engine.
app_data(I) Pointer to some vital piece of data.
FCLASSES_API int CMP_set_cached_char ( tag_t  cache,
char  value 
)

Sets the value stored in the given data cache. This is intended for use by cache update methods registered with CMP_register_update_cache_method.

Parameters
cache(I) Data cache to set, as returned by CMP_ask_data_cache.
value(I) Cached value.
FCLASSES_API int CMP_set_cached_char_array ( tag_t  cache,
int  n,
char *  value 
)

Sets the value stored in the given data cache. This is intended for use by cache update methods registered with CMP_register_update_cache_method.

Parameters
cache(I) Data cache to set, as returned by CMP_ask_data_cache.
n(I)
value(I) n Cached value.
FCLASSES_API int CMP_set_cached_date ( tag_t  cache,
date_t  value 
)

Sets the value stored in the given data cache. This is intended for use by cache update methods registered with CMP_register_update_cache_method.

Parameters
cache(I) Data cache to set, as returned by CMP_ask_data_cache.
value(I) Cached value.
FCLASSES_API int CMP_set_cached_date_array ( tag_t  cache,
int  n,
date_t value 
)

Sets the value stored in the given data cache. This is intended for use by cache update methods registered with CMP_register_update_cache_method.

Parameters
cache(I) Data cache to set, as returned by CMP_ask_data_cache.
n(I)
value(I) n Cached value.
FCLASSES_API int CMP_set_cached_double ( tag_t  cache,
double  value 
)

Sets the value stored in the given data cache. This is intended for use by cache update methods registered with CMP_register_update_cache_method.

Parameters
cache(I) Data cache to set, as returned by CMP_ask_data_cache.
value(I) Cached value.
FCLASSES_API int CMP_set_cached_int ( tag_t  cache,
int  value 
)

Sets the value stored in the given data cache. This is intended for use by cache update methods registered with CMP_register_update_cache_method.

Parameters
cache(I) Data cache to set, as returned by CMP_ask_data_cache.
value(I) Cached value.
FCLASSES_API int CMP_set_cached_logical ( tag_t  cache,
logical  value 
)

Sets the value stored in the given data cache. This is intended for use by cache update methods registered with CMP_register_update_cache_method.

Parameters
cache(I) Data cache to set, as returned by CMP_ask_data_cache.
value(I) Cached value.
FCLASSES_API int CMP_set_cached_pointer ( tag_t  cache,
void *  value 
)

Sets the value stored in the given data cache. This is intended for use by cache update methods registered with CMP_register_update_cache_method.

Parameters
cache(I) Data cache to set, as returned by CMP_ask_data_cache.
value(I) Cached value.
FCLASSES_API int CMP_set_cached_string ( tag_t  cache,
char *  value 
)

Sets the value stored in the given data cache. This is intended for use by cache update methods registered with CMP_register_update_cache_method.

Parameters
cache(I) Data cache to set, as returned by CMP_ask_data_cache.
value(I) Cached value.
FCLASSES_API int CMP_set_cached_string_array ( tag_t  cache,
int  n,
char **  value 
)

Sets the value stored in the given data cache. This is intended for use by cache update methods registered with CMP_register_update_cache_method.

Parameters
cache(I) Data cache to set, as returned by CMP_ask_data_cache.
n(I)
value(I) Cached value.
FCLASSES_API int CMP_set_cached_tag ( tag_t  cache,
tag_t  value 
)

Sets the value stored in the given data cache. This is intended for use by cache update methods registered with CMP_register_update_cache_method.

Parameters
cache(I) Data cache to set, as returned by CMP_ask_data_cache.
value(I) Cached value.
FCLASSES_API int CMP_set_cached_tag_array ( tag_t  cache,
int  n,
tag_t value 
)

Sets the value stored in the given data cache. This is intended for use by cache update methods registered with CMP_register_update_cache_method.

Parameters
cache(I) Data cache to set, as returned by CMP_ask_data_cache.
n(I)
value(I) n Cached value.
FCLASSES_API int CMP_set_element_application_flag ( tag_t  element,
int  app_flag,
logical  value 
)

Sets a specific application flag for the given compare element. See bom_tokens.h for a list of standard application flags.

Parameters
element(I)
app_flag(I)
value(I)
FCLASSES_API int CMP_set_element_display_order ( tag_t  desc,
int  n,
tag_t elements 
)

By default, elements are reported to users in the order in which they were defined in the compare descriptor. This call allows users to have their elements returned in a different order through the CMP_ask_ordered_elements function.

For example, when performing a BOMCompare which uses both Item Id and Sequence Number as primary elements, users would expect the list of changed BOMLines returned to be sorted by Sequence Number and then by Item Id. To achieve this they must define Sequence Number before Item Id in the compare descriptor. However, this would result in the BOMCompare report output displaying the Sequence Number column before the Item Id Column. The use of this function will allow users to reverse these two elements for output purposes.

Parameters
desc(I)
n(I) Number of elements.
elements(I) n Array of all elements in the order in which they should be displayed.
FCLASSES_API int CMP_set_prop_element_order ( tag_t  prop_element,
int  order 
)
Parameters
prop_element(I)
order(I)

Variable Documentation

FCLASSES_API const char* const CMP_std_descriptor_appr_compare_name
FCLASSES_API const char* const CMP_std_descriptor_LBOM_compare_name
FCLASSES_API const char* const CMP_std_descriptor_LBOM_withocc_compare_name
FCLASSES_API const char* const CMP_std_descriptor_P_id_A_rev_qty_name
FCLASSES_API const char* const CMP_std_descriptor_P_id_seq_A_rev_qty_name