From: Lucena, I. <iva...@pm...> - 2007-12-07 17:15:01
|
Hi Stefano, Are you using the Delphi module developed by Semyon? I guess not. But if i understand you correctly the one you have is good enough to wrap around the C API of GDAL and OGR. Isn't that right? Are you going to make that public on the GDAL SVN trunk? One general question: Do we have anybody developing a official "Delphi" module to SWIG? By the way, It looks like CodeGear is now calling it "Pascal" again. Best regards, Ivan Stefano Moratto wrote: > Dear SWIG developers, > > I'm developing a module for the Object Pascal (DELPHI for > WIN32) language. > > Since Delphi is a compiled language the purpose is to write a import > module for functions and classes exported by C++'s DLL. (I'm very > tired to translate from C/C++ to Pascal manually). I started from the > Modula 3 module. > > At the moment I have been able to translate well written API like GDAL > and OGR library, but providing only flat C interface; the Delphi > Module at the moment does not generate proxy classes. > > > Basically the module translates a C function declaration in pascal > (one to one mapping). > > Now I'm testing the library against a more complicated C++ header. > I have some problems with namespaces > > suppose to have > > namespace NS { > > class C1; > > class C2 { > > public: > > void Foo( NS::C1* p0); > > } > > } > > SWIG generates something like > > void C2_Foo(NS::C1* p0); > > that is an exported function. > > in the Delphi NS::C1 in a pointer > > unit NS; > > type > C1 = integer; > PC1=^C1; > > procedure C2_Foo(p0 : PC1); > > the translation of the parameter is obtained using a typemap like > > %typemap(m3rawintype) SWIGTYPE * "P$1_basetype" > > Unfortunately $1_basetype contains the namespace and the translation bacame: > > > procedure C2_Foo(p0 : PNS::C1); > > but I need > > procedure C2_Foo(p0 : NS.PC1); or procedure C2_Foo(p0 : NS.PC1); > > > How can I remove the inclusion of the namespace in the typemap? > |