OpenDOF Project
DOFObjectID DOFObjectID_Create_String ( DOFObjectIDClass  idClass,
const char *  data 
)

Create a new DOFObjectID from a given class and data string.

This constructs a DOFObjectID without any Attributes.

Resource Management:
This function allocates resources that must later be freed by calling DOFObjectID_Destroy.
Note
It is the responsibility of the caller to ensure the given class is registered and that the given data satisfies the requirements for that class. Refer to the documentation of the specific DOFObjectIDClass, or the DOF Common Types Specification for more information on object ID classes, formats, and requirements.
Parameters
idClassThe DOFObjectIDClass for this identifier. Use of unknown/unregistered classes is permitted (e.g., classes defined after this library was built); however, classes must be registered with the OpenDOF Project prior to use. Valid range is 0 <= idClass < 2^30.
dataThe data, as a null-terminated C string. The data size is inferred by the string length. This should not be NULL, and should be a C string of 63 characters or less, and appropriate for the class of Object ID being constructed. No interpretation, transformation, or parsing of the string is made.
Returns
A new DOFObjectID.
Exceptions
NULLis returned if
  • an invalid parameter is detected; or
  • insufficient resources exist to create the DOFObjectID.
core-c-dof-oal Version 8.0.1 Build 0
2018-01-22