Synopsis
PDX_MSGT mda_CopyFromOTree(long option, void *ent, OTM_TREE *tree, MDA_COUNT *count, void *ptr)
Purpose
Copy an object tree to a field.
Description
The contents of the specified object tree will be copied to an entity field. The tree will be copied in sorted order. The number of tree elements copied will be stored in the count argument. The target of the copy must be a "pointer to fixed" field type in the entity. If the number of elements in the tree is 0, no memory will be allocated, the count will be set to 0, a NULL pointer will be stored in ptr, and a value of MDA_NOERR will be returned.
Input
option
MDA_SET_BACKPTRS
Set back pointers if objects in list are MDA_PTR objects.
ent
The entity which owns the copied tree
tree
The object tree of data to be copied
ptr
Address to store the allocated memory pointer at
Output
count
Number of elements copied from the tree
ptr
The allocated memory pointer referncing the copied tree
Return
MDA error code