cgma
Array pointer, allocated and occupied sizes argument trio

Many of the functions in iMesh have arguments corresponding to lists of objects. In-type arguments for lists consist of a pointer to an array and a list size. Lists returned from functions are passed in three arguments, a pointer to the array representing the list, and pointers to the allocated and occupied lengths of the array. These three arguments are inout-type arguments, because they can be allocated by the application and passed into the interface to hold the results of the function. Lists which are pre-allocated must be large enough to hold the results of the function; if this is not the case, an error is generated. Otherwise, the occupied size is changed to the size output from the function. If a list argument is unallocated (the list pointer points to a NULL value) or if the incoming value of the allocated size is zero, the list storage will be allocated by the implementation.

IN ALL CASES, MEMORY ALLOCATED BY ITAPS INTERFACE IMPLEMENTATIONS IS DONE USING THE C MALLOC FUNCTION, AND MUST BE DE-ALLOCATED USING THE C FREE FUNCTION.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines