R
Roedy Green
It just hit me that there must be some special kludge to handle
serialising the values of enums.
I have not checked if enums are indeed serialisable. If they are, when
you reconstitute, you want to get the value reconstituted to point to
the enum constant object in the target machine, not a pointer to a
reconstructed clone of the enum constant object from the source
machine.
Perhaps they are serialised as ordinals. Perhaps they are serialised
as string enum constant names. (That would allow you to add new enum
constants and still read old serialised files).
Has anyone ever experimented to figure out how it works or if it works
at all?
serialising the values of enums.
I have not checked if enums are indeed serialisable. If they are, when
you reconstitute, you want to get the value reconstituted to point to
the enum constant object in the target machine, not a pointer to a
reconstructed clone of the enum constant object from the source
machine.
Perhaps they are serialised as ordinals. Perhaps they are serialised
as string enum constant names. (That would allow you to add new enum
constants and still read old serialised files).
Has anyone ever experimented to figure out how it works or if it works
at all?