Built a CDL parser project that generates OpenCascade .h header files. Modified the cpp generation files templates to generate c++/CLI wrappers.
Succeeded to parse an OpenCascade package and generate some wrappers that hold internally a pointer to the native object, creates the native object in the constructor and releases it in the destructor, all the function calls are passed to the internal native object. The inheritance is also generated properly.
It remains to refine the code generation to handle situations like: when native and CLI parameters are incompatible some conversion code needs to be generated, have to verify other types of code if they are generated properly: code for transient objects, persistent objects, pointers, handles, consts, etc.
Will continue improving the code generator one more day and see if the results will improve a lot. It is good that for the moment a big part of the code can be generated automatically.
Thursday, June 26, 2008
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment