Closed adamcreekroad closed 4 years ago
After that PR you should be able to wrap them directly:
classes:
PoDoFo::PdfDocument: Document
PoDoFo::PdfMemDocument: MemDocument
PoDoFo::PdfStreamedDocument: StreamedDocument
Extra type configuration shouldn't be required and SanityCheck shouldn't break.
I'm having some issues trying to create bindings for the PoDoFo library - everything is name-spaced under
PoDoFo
. I'm mainly having issues with classes.If I use the namespace in the config, I have two issues (that I've found):
using
declaration uses the namespace improperlypodofo.yml
src/podofo/binding.cr
ext/podofo_binding.cpp
If I manually edit the generated code to fix these issues I can run crystal code using the bindings.
If I don't use the namespace, the inheritance is detected but the cpp bindings are incorrect since the namespace isn't used
podofo.yml
src/podofo/binding.cr
ext/podofo_binding.cpp
I've also tried messing around by setting the types manually for each class, but didn't seem to make any difference.
From what I can tell, qt doesn't namespace its classes, so I'm wondering if this is something that was never really implemented since it wasn't needed. I'd be willing to help out, I don't have a ton of experience with code parsing/generation so I'd need a little direction. I also don't have a ton of c++ experience (which is why I'm trying to create crystal bindings 😄 ), I'm mostly a ruby developer but we have some c++ that I have to maintain from time to time.
Also, I have to turn off the sanity_check processor or else everything blows up about invalid aliases and unreachable types for the specified classes.