Skip to content

nifxml 0.9, niflib structural changes #1

@hexabits

Description

@hexabits

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: niftools/nifxml#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

#include <BSTriShape>

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:

#include "BSTriShape.gen.h"

#if __has_include("BSTriShape.custom.h")
#  include "BSTriShape.custom.h"
#else
using BSTriShape = BSTriShapeGenerated;
#endif

Generation method:

// If BSTriShape.custom.h does not exist
#include "BSTriShape.gen.h"
using BSTriShape = BSTriShapeGenerated;
// Else
#include "BSTriShape.gen.h"
#include "BSTriShape.custom.h"

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. :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions