itaps-parallel Re: typedef structure in iMeshP.h

Onkar Sahni osahni at scorec.rpi.edu
Tue Oct 21 14:00:22 CDT 2008


I am not trying to argue on number of ways we can do this... but there
should be discussion and consensus on one way of doing it... and as of now
I do not like this generic macro ITAPS_DECLARE_HANDLE sitting in iMeshP.h
(which is applicable to almost all handles in ITAPS interface including
ones in iBase, iRel, iMesh...).

If iBase.h is always included (even if a user would only use iGeom) then
macro can go in there or we can keep it simple as:

// in iMesh.h
typedef struct iBase_EntityHandle_Private *iBase_EntityHandle;
....

// in iMeshP.h
typedef struct iMeshP_PartitionHandle_Private *iMeshP_PartitionHandle;
...

- Onkar

> Onkar Sahni wrote:
>> As Ting mentioned we will check on email update for changes to svn. We
>> do
>> exercise this with repositories of our tools/software (probably you guys
>> know it but in case... "View Log" link provides log on changes).
>>
>> On handle issue we had discussions as can be seen in the link but there
>> was no discussion on how its going to be incorporated in header files.
>
> Other than possibly removing the "ITAPS_DECLARE_HANDLE" macro that you
> mention below, what other way is there to incorporate it in the header
> files?  Either the declaration is in the header file or it is not.
> Presumably all handle types that begin with iMeshP_ belong in iMeshP.h
>
>> Moreover, I do not know if ITAPS_DECLARE_HANDLE goes in iMeshP.h or
>> iBase.h or other. If we want to have it this way (ITAPS_DECLARE_HANDLE)
>> then I think it doesn't goes in iMeshP.h.
>>
>
> If it is only used in iMeshP.h, then that is where it belongs.  If we wish
> to use the same macro in other headers, then perhaps it should be moved to
> iBase.h.  On the other hand, perhaps we don't want to export this macro to
> applications.  Maybe each header should have its own copy of the macro,
> and
>  "#undef ITAPS_DECLARE_HANDLE" as soon as the necessary handle types are
> declared.  Or perhaps we should not use a macro to declare the handle
> types.
>  I don't really care how the definition is written.  I do think that
> making
> the different handle types distinct rather than all of them being 'void*"
> improves the interface, regardless of how or where such definitions are
> written.
>
> - jason
>
>





More information about the itaps-parallel mailing list