Perhaps this is what you are looking for, but it is for C generated code:
It generates an 32-bit fnv1a hash of the fully qualified name. It is not guaranteed unique, but close enough.
If you check for several buffer types in a switch you will get a compile error on conflicting values and then you can change a name of one type slightly.
I should have added this to the C++ generator, but I never got around to it. You can use this header file to compute your own:
I principle it can be supported by all languages more or less directly, because most languages have fnv1a support
- you just need the fully qualified name to start with and you can get that from the binary schema bfbs if nothing else.
If you are up to it, perhaps you could this functionality if Wouter is ok with it?
Note that the 32-bit file identifier in the buffer is optional an can make buffers larger depending on alignment.