Re: Way to autogenerate C/C++ Headers?



On 8 feb, 17:24, "James Van Buskirk" <not_va...@xxxxxxxxxxx> wrote:
Have you compared your work with that of others, such ashttp://www-stone.ch.cam.ac.uk/pub/f03gl/f03gl.zipwhere I think
the interfaces were automatically generated, or just going down
the list of Windows header files, starting with kernel32.h?

The former has nonconformities in that 0x789a gets turned into
Z'789a' instead of int(Z'789a', APPROPRIATE_TYPE) which could be
easily fixed, I suppose, but opportunities for combining
functionality into generics as described in the OpenGL standard
are missed and this might be more problematic.  I don't think
even Intel does that in their interfaces.


I have enhanced my wrapper generator and have looked at the
gl.h header file that comes with the MSVC compiler. I noticed
a few annoying things, special keywords like WINGDIAPI and APIENTRY,
but also the use of a general void pointer instead of
function pointers.

At least, not being overly familiar with OpenGL, I assume that
types like PFNGLGETCOLORTABLEPARAMETERIVEXTPROC as defined in
that files are meant for user-defined functions that you
pass to the appropriate OpenGL functions.

In this case the header file does not give me _any_ clue
as to the character of the void pointer. And unless I am
overlooking something, no automatic procedure will be
able to supply the appropriate pointer type. I could of
course assume that any GLvoid * argument is actually a
pointer to an external procedure, but that information
must be supplied by the user of the wrapper generator.

Well, just another bump in the road ;).

Regards,

Arjen
.



Relevant Pages

  • Pointers, DLL Header files and lots of exceptions?
    ... I have the C header file that I used Dr. Bob's ... append line to the memo box. ... I've spent many hours investigating this on-line and reading docs on pointer ...
    (comp.lang.pascal.delphi.misc)
  • Re: CByteBuffer implementation passed between modules
    ... header file, then it is compiled in the context of the caller, which is ... created an impossible situation, and there isn't a good answer for it. ... "In C++ it is quite natural to use the value NULL to indicate the pointer ... You don't have to test to see if a pointer is empty before you ...
    (microsoft.public.vc.mfc)
  • Re: Overloaded Constructors
    ... > just a pointer to an existing object. ... The reader of your header file should try to ignore implementation details ... > standard will make code easier to maintain down the road. ...
    (comp.lang.cpp)
  • Re: Attributes for pointers in .ODL file
    ... > header file in the .ODL file. ... > like to know how to correctly specify attributes for memory addresses. ... pointer - this is obvious from the parameter's type. ... Marshaling layer has to do extra work to deal with aliasing issues, ...
    (microsoft.public.vc.language)
  • Re: [RFC] Splitting kernel headers and deprecating __KERNEL__
    ... particular header file, then you must include yyy.h first, or you can't ... reason to NOT use them. ... > that also new interfaces which need to specify an exact integer ... the kernel, and that are already used widely. ...
    (Linux-Kernel)