we use doxygen as C++ parser and I guess the problem lies there.
A short overview how XBiG works:
- let doxygen parse C++ headers and generate xml output
- use "combine.xslt" generated by doxygen to combine all the xml files into one big file (all.xml)
- transform all.xml into our own API description (meta.xml)
- generate java and c++ code from meta.xml
I would suggest to look what is in meta.xml. Instead of one function called "META_StateAttribute" there should be six functions:
- cloneType
- clone
- ...
You may want to create a simple header first (which reproduces this case) to deal with a smaller meta.xml file.
If there is only one function in meta.xml you can try tweaking the doxygen config. That is located in:
xbig/src/doxygen/xml.doxygen
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
hi, i'm currently evaluate xbig to make a tool for auto binding openscenegraph engine (maybe a next sourceforge project !).
but after running xbig tests project successfully, i fall in error on openscenegraph binding generation in one way.
some headers files used c++ macro in order to no rewrite declaration in several headers.
this a simple of macro :
----------------------------------
#define META_StateAttribute(library,name,type) \ virtual osg::Object* cloneType() const { return new name(); } \ virtual osg::Object* clone(const osg::CopyOp& copyop) const { return new name (*this,copyop); } \ virtual bool isSameKindAs(const osg::Object* obj) const { return dynamic_cast<const name *>(obj)!=NULL; } \ virtual const char* libraryName() const { return #library; } \ virtual const char* className() const { return #name; } \ virtual Type getType() const { return type; }
this is the xbig code generated :
----------------------------------------------
/** **/
public META_StateAttribute(org.xbig.osg a1, org.xbig.osg.IAlphaFunc a2, org.xbig.osg.StateAttribute.Type a3);
where "org.xbig.osg" is the namespace
can you tell me how xbig deal with c++ macro cause i gess java code failed because of c++ macro are not strongly typed....
if you can drive me in the right way...
cheers
Hi,
we use doxygen as C++ parser and I guess the problem lies there.
A short overview how XBiG works:
- let doxygen parse C++ headers and generate xml output
- use "combine.xslt" generated by doxygen to combine all the xml files into one big file (all.xml)
- transform all.xml into our own API description (meta.xml)
- generate java and c++ code from meta.xml
I would suggest to look what is in meta.xml. Instead of one function called "META_StateAttribute" there should be six functions:
- cloneType
- clone
- ...
You may want to create a simple header first (which reproduces this case) to deal with a smaller meta.xml file.
If there is only one function in meta.xml you can try tweaking the doxygen config. That is located in:
xbig/src/doxygen/xml.doxygen