google/flatbuffers — pull request #107 by maglar0 (2014-11-30 06:38:11+00:00)
Title: Add generated C++ function for returning file_identifier

The code adds a function for accessing the file identifier of a "root table". I send packages over the network and use the flatbuffer file_identifier for figuring out the type of packet instead of adding some kind of external identifier. With this function one avoids having to repeat the identifier string both in the .fbs file and in the code.

The generated code looks like this:

inline const char *MonsterIdentifier() { return "MONS"; }