[MOAB-dev] r2580 - MOAB/trunk/tools/iMesh

Jason Kraftcheck kraftche at cae.wisc.edu
Mon Jan 26 17:27:02 CST 2009


Tim Tautges wrote:
> Where do we ever pass iBase_Instance in the current C-based interfaces?
>  I'd think that it wouldn't matter whether this was void* or a private
> struct*.
> 

iRel.  Defining it as a private struct then requires that all interface
arguments to iRel be cast to iBase_Instance.  Leaving it as void* allows
either interface type to be passed w/out casting.

A better solution would be to get rid of the IfaceType enum and variations
of iRel_createAssociation for every possible pair of interface types.  That
way a) no casting is required, b) we don't need iBase_Instance, and c) it
isn't possible to accidentally pass the wrong IfaceType.  But I went with
the quick solution.

- jason



More information about the moab-dev mailing list