OpenDOF Project
boolean DOFValue_IsCompatibleWith ( DOFValue  value,
DOFType  type 
)

Determine if a value's type is compatible with another type.

Compatibility is not commutative, but is directional. In other words, Type A may be compatible with Type B, but not vice versa. An example of this is comparing a 20-element Fixed-Length Array Type (Type A) with a 50-element Variable Length Array Type (Type B). In this example, Type A is compatible with Type B because a 20-element array is within the parameters of a 50-element Variable-Length Array. However, Type B is not compatible with Type A, because the maximum (and minimum) length of Type B exceeds the specification of Type A.

Array element types or Structure Field types (including order) must also be compatible for their parent Types to be compatible.

If both the type and value are NULL, they are considered compatible.

Parameters
valueThe value to be compared (containing Type A, possibly a more specific type). This may be NULL if there is no value (compatible with some types, such as NULLABLE).
typeThe type to compare against (Type B, possibly a more generic type). This should not be NULL.
Returns
TRUE if the types are compatible; FALSE otherwise.
core-c-dof-oal Version 8.0.1 Build 0
2018-01-22