Timothy Wall <twalljava@...> writes:
I'm inferring that you already know the memory layout of the
structures, which is independent of the generated code. Is it that
you want to modify the code generation to include the annotations, or
write the annotations independently of the generated code?
It's just a way to move my problem to another position : Now, I do not
rely upon the field definition order. My brand new problem is to keep
the annotation syncronized with the library definition order which is
stricly equivalent to the previous problem. The only small improvement,
is that I do not need to manually move the fields but to change a number.
In my wildest dreams, I will have the annotation generated by the code
generation tool after generating the order ... In the reality, this is
a first step to a solution.
The internals of Structure could certainly be augmented to take
advantage of additional annotation information, if present, but I
strongly prefer not to enforce annotations on the library, since
structure definitions *without* annotations is simpler.
Of course, I understand your point of view. The modifications I made take
advantages from the annotations but do not rely on them. The result remain
compatible with older versions.
Nicolas