Adds typedefs and functions to help write generic code.
authorWouter van Oortmerssen <wvo@google.com>
Fri, 2 Dec 2016 22:25:39 +0000 (14:25 -0800)
committerWouter van Oortmerssen <wvo@google.com>
Fri, 2 Dec 2016 22:25:39 +0000 (14:25 -0800)
commitbc2ec7119bd95230c4eb9a730a5439472efe01fa
tree0bb2d747ae9ed779a08ae184fba835ccbae24757
parent641b397f8b79701b44184a52b5b9c6da98eb7580
Adds typedefs and functions to help write generic code.

The following changes have been made to the C++ codegen to enable writing generic code
that uses the Table and NativeTable types.

- Adds TableType and NativeTableType typedefs to NativeTable and Table structs.
- Adds GetFullyQualifiedName() to NativeTables if --gen-name-strings is set.
- Adds a static Pack function to Tables that simply calls the global CreateX functions.

See cr/140391505 as an example of improved usage.

From cl/140529288.

Change-Id: Idec137c16129e15c1783f94fabdcea24aeeaaef6
samples/monster_generated.h
src/idl_gen_cpp.cpp
tests/monster_test_generated.h