C++ generated code now has constants for vtable offsets.
authorWouter van Oortmerssen <wvo@google.com>
Mon, 30 Nov 2015 22:27:47 +0000 (14:27 -0800)
committerWouter van Oortmerssen <wvo@google.com>
Mon, 30 Nov 2015 22:27:47 +0000 (14:27 -0800)
commit1fa803d187c244e8de0bb40f0d3c91f22408bde0
treebaee8e1684706660fe5191f23249f33be097f19b
parent6d1ff8a5252cf206776374e31e72a69b58ce6967
C++ generated code now has constants for vtable offsets.

Besides making the generated code looking a lot more readable,
it also allows you to use these offsets in calls to
Table::CheckField, to see if a field is present in a table.

Change-Id: I1b4cc350c4f27c4e474c31add40c701ef4ae63b2
Tested: On Linux.
samples/monster_generated.h
src/idl_gen_cpp.cpp
tests/monster_test_generated.h