Open hexabits opened 6 years ago
Hi jonwd, many thanks for contacting me. Nice to read you again. Had a brief look around and didn't see anyone working on a niflib generator renewal. After coding in PHP and ruby a long time I wanted to do something in C++ again - a real language ;)
Please give me some time to read through your annotations before leaving some comments or join you on Discord. Sounds very interesting!
BTW: I can just read Python, but I'm far away from programming in Python ;)
Hi skyfox,
Nice to see you active.
Didn't really know how else to contact you about this but we noticed you created this repo. We currently already have someone working on prospective niflib rewrites and obviously that requires generation changes. This generator would also need to be updated to even work with nif.xml 0.9, which we're just days away from merging: https://github.com/niftools/nifxml/pull/65
You can see some of the changes conceptually at my nifdocsys repo: https://github.com/jonwd7/nifdocsys/commits/master
It'd be nice to actually discuss this stuff with you so that there's not all this parallel, conflicting work on niflib, and at the very least you could be around to ask about XML format changes that require generator changes. We have a Discord and a development channel which you can get to through https://discord.gg/ZFjdN4x or the NifTools.org mainpage.
We'd especially like to know if you have any plans on doing any work on niflib itself, as there are a lot of big changes there to discuss. I'm mainly pushing for the complete separation of the generated and custom code blocks, using either PIMPL or inheritance. The generated code would then actually be removed from the repo and we'd no longer have commits where you cannot tell if the diff is from code regeneration or custom code changes.
As an example, for a stub file for BSTriShape, the include would be
And the stub file contents could be either filled out with the generator based on file existence, or done using C++17. (Filenames are just examples for clarification and would be in different folders)
C++17 method:
Generation method:
And then of course there are other approaches like the PIMPL method, the benefit being hiding the
BSTriShapeGenerated
class.Anyway, it's this kind of stuff and the XML changes that we'd like to talk with you about on Discord. :)