Create a new DOFValueArray from a known array type and a list of DOFValue elements.
The number of elements is checked against the allowable length of the given array type. The elements are checked against the element type of the given array type. If either of these checks fail, the array will not be constructed.
- Resource Management:
- This function allocates resources that must later be freed by calling DOFValue_Destroy.
- Parameters
-
type | The type of the resulting array. This must not be NULL. |
elementCount | The number of elements in the array. This may be 0, and should be less than 32768. |
elements | The array of DOFValue elements to put in the DOFValueArray. This must not be NULL if elementCount > 0. |
- Returns
- A new DOFValueArray containing the given elements.
- Exceptions
-
NULL | is returned if insufficient resources are available to create the DOFValueArray, if any of the elements are not compatible with the specified elementType, of an illegal argument is detected. |