Main Page | Modules | Files | Functions | Code Elements | Data Structures | Deprecated

Attribute Mapping
[Properties]

Typedefs

Enumerations

Functions


Typedef Documentation


Enumeration Type Documentation

Enumerator:
ATTRMAP_unknown 
ATTRMAP_property 
ATTRMAP_constant 
ATTRMAP_preference 
ATTRMAP_attribute 

Definition at line 27 of file attrmap.h.


Function Documentation

PROPERTY_API int ATTRMAP_ask_constant ( tag_t  mapping,
char **  value 
)

Parameters:
mapping  (I)
value  (OF)

PROPERTY_API int ATTRMAP_ask_mapping_all_qualifiers ( tag_t  mapping,
char **  result 
)

Parameters:
mapping  (I)
result  (OF)

PROPERTY_API int ATTRMAP_ask_mapping_allow_null_value ( tag_t  mapping,
logical result 
)

Parameters:
mapping  (I)
result  (O)

PROPERTY_API int ATTRMAP_ask_mapping_attr_all ( tag_t  mapping,
char **  title,
tag_t dataset_type,
tag_t item_type,
logical cad_master,
logical iman_master,
logical freezable,
logical required,
logical write_once,
char **  description,
char **  default_value,
ATTRMAP_mapping_type_t map_type 
)

Convenience function lumping together many of the above; of course if we ever extend the possible information then we'll need another call to get more.

Parameters:
mapping  (I)
title  (OF)
dataset_type  (O)
item_type  (O)
cad_master  (O)
iman_master  (O)
freezable  (O)
required  (O)
write_once  (O)
description  (OF)
default_value  (OF)
map_type  (O)

PROPERTY_API int ATTRMAP_ask_mapping_attr_title ( tag_t  mapping,
char **  result 
)

Parameters:
mapping  (I)
result  (OF)

PROPERTY_API int ATTRMAP_ask_mapping_cad_master ( tag_t  mapping,
logical result 
)

Parameters:
mapping  (I)
result  (O)

PROPERTY_API int ATTRMAP_ask_mapping_dataset_type ( tag_t  mapping,
tag_t result 
)

Parameters:
mapping  (I)
result  (O)

PROPERTY_API int ATTRMAP_ask_mapping_default_value ( tag_t  mapping,
char **  result 
)

Parameters:
mapping  (I)
result  (OF)

PROPERTY_API int ATTRMAP_ask_mapping_description ( tag_t  mapping,
char **  result 
)

Parameters:
mapping  (I)
result  (OF)

PROPERTY_API int ATTRMAP_ask_mapping_freezable ( tag_t  mapping,
logical result 
)

Parameters:
mapping  (I)
result  (O)

PROPERTY_API int ATTRMAP_ask_mapping_hard_coded ( tag_t  mapping,
logical result 
)

Parameters:
mapping  (I)
result  (O)

PROPERTY_API int ATTRMAP_ask_mapping_iman_master ( tag_t  mapping,
logical result 
)

Parameters:
mapping  (I)
result  (O)

PROPERTY_API int ATTRMAP_ask_mapping_item_type ( tag_t  mapping,
tag_t result 
)

Parameters:
mapping  (I)
result  (O)

PROPERTY_API int ATTRMAP_ask_mapping_map_type ( tag_t  mapping,
ATTRMAP_mapping_type_t result 
)

Parameters:
mapping  (I)
result  (O)

PROPERTY_API int ATTRMAP_ask_mapping_required ( tag_t  mapping,
logical result 
)

Parameters:
mapping  (I)
result  (O)

PROPERTY_API int ATTRMAP_ask_mapping_whole_string ( tag_t  mapping,
char **  result 
)

Parameters:
mapping  (I)
result  (OF)

PROPERTY_API int ATTRMAP_ask_mapping_write_once ( tag_t  mapping,
logical result 
)

Parameters:
mapping  (I)
result  (O)

PROPERTY_API int ATTRMAP_ask_preference ( tag_t  mapping,
TC_preference_search_scope_t scope,
char **  name 
)

Parameters:
mapping  (I)
scope  (O)
name  (OF)

PROPERTY_API int ATTRMAP_ask_propdesc ( tag_t  obj,
tag_t  mapping,
tag_t propdesc 
)

Sometimes obj may be useful when finding a property-descriptor.

Parameters:
obj  (I)
mapping  (I)
propdesc  (O)

PROPERTY_API int ATTRMAP_ask_propdesc_with_ir ( tag_t  obj,
tag_t  mapping,
tag_t  itemRevTag,
tag_t propdesc 
)

Parameters:
obj  (I)
mapping  (I)
itemRevTag  (I)
propdesc  (O)

PROPERTY_API int ATTRMAP_assert_in_test_mode ( logical  state  ) 

Parameters:
state  (I)

PROPERTY_API int ATTRMAP_find_mapping ( const char *  title,
tag_t  dataset_type,
tag_t  item_type,
tag_t mapping 
)

Parameters:
title  (I)
dataset_type  (I)
item_type  (I)
mapping  (O)

PROPERTY_API int ATTRMAP_in_test_mode ( logical verdict  ) 

Parameters:
verdict  (O)

PROPERTY_API int ATTRMAP_init_module ( void   ) 

PROPERTY_API int ATTRMAP_list_all_mappings ( int *  num_mappings,
tag_t **  mappings 
)

Parameters:
num_mappings  (O)
mappings  (OF) num_mappings

PROPERTY_API int ATTRMAP_list_mappings ( tag_t  obj,
tag_t  dataset_type,
tag_t  item_type,
logical  exact,
int *  num_mappings,
tag_t **  mappings 
)

If "exact" is true, we only pick up the mappings for exactly the supplied (or deduced) dataset-type/item-type combination. If it's false, then we also pick up the relevant more general mappings (e.g. the global ones).

Parameters:
obj  (I)
dataset_type  (I)
item_type  (I)
exact  (I)
num_mappings  (O)
mappings  (OF) num_mappings

PROPERTY_API int ATTRMAP_refresh_mappings ( void   ) 

PROPERTY_API int ATTRMAP_resolve_mapping ( tag_t  obj,
tag_t  mapping,
ATTRMAP_mapping_type_t type,
tag_t obj_to_lock,
tag_t actual_property 
)

Normally, "obj_to_lock" is the object to which "actual_property" is attached; the one current exception is when the property is on a Form's data-file, when locking the data-file itself isn't enough to persuade the property to admit to being read-write - you have to lock the Form instead!

Parameters:
obj  (I)
mapping  (I)
type  (O)
obj_to_lock  (O)
actual_property  (O)

PROPERTY_API int ATTRMAP_resolve_mapping_with_ir ( tag_t  obj,
tag_t  mapping,
tag_t  itemRevTag,
ATTRMAP_mapping_type_t type,
tag_t obj_to_lock,
tag_t actual_property 
)

Parameters:
obj  (I)
mapping  (I)
itemRevTag  (I)
type  (O)
obj_to_lock  (O)
actual_property  (O)

PROPERTY_API int ATTRMAP_resolve_mappings ( tag_t  obj,
tag_t mappings,
int  mappings_count,
ATTRMAP_mapping_type_t **  types,
tag_t **  objs_to_lock,
tag_t **  actual_properties,
int **  xref 
)

ATTRMAP_resolve_mappings does the same job as ATTRMAP_resolve_mapping, except on an array of mappings instead of just one mapping. It returns 4 result arrays. The first three are arrays of the same return values you would get from ATTRMAP_resolve_mapping. They are not in the same order, however, as the input array of mappings. Instead they are sorted by "objs_to_lock". This allows the caller to be more efficient in refreshing and locking when there are multiple poperties on the same object that have been mapped. The 4th array (xref) is the index into the input mappings array of the corresponding result. This allows the caller to easily match the results arrays to the input mappings array.

This function itself is generally more efficient than multiple calls to ATTRMAP_resolve_mapping. If there are many mappings that refer to attributes on the same object, the savings can be quite large.

Parameters:
obj  (I)
mappings  (I)
mappings_count  (I)
types  (OF)
objs_to_lock  (OF)
actual_properties  (OF)
xref  (OF)