flatbuffers/samples
Wouter van Oortmerssen 3f936c5655 More native code gen functionality.
Allow tables to be mapped to native types directly.  For example, a table
representing a vector3 (eg. table Vec3 { x:float; y:float; z:float; }) can
be mapped to a "mathfu::vec3" native type in NativeTables.  This requires
users to provide Pack and UnPack functions that convert between the
Table and native types.  This is done by adding the "native_type" attribute
to the table definition.

To support user-defined flatbuffers::Pack and flatbuffers::UnPack functions,
support a "native_include" markup that will generate a corresponding

Also add an UnPackTo function which allows users to pass in a pointer to
a NativeTable object into which to UnPack the Table.  The existing UnPack
function is now simply:

  NativeTable* UnPack() {
    NativeTable* obj = new NativeTable();
    Table::UnPackTo(obj);
    return obj;
  }

Finally, allow native types to be given a default value as well which are
set in the NativeTable constructor.  This is done by providing a
"native_default" attribute to the member of a table.

Change-Id: Ic45cb48b0e6d7cfa5734b24819e54aa96d847cfd
2017-01-18 16:23:35 -08:00
..
android Merge "Removed reference to deprecated NDK toolchain version." into ub-games-master 2016-05-23 23:49:56 +00:00
android_sample.sh Made .sh files all have same comment formatting. 2016-05-23 14:08:21 -07:00
csharp_sample.sh Made .sh files all have same comment formatting. 2016-05-23 14:08:21 -07:00
go_sample.sh Made .sh files all have same comment formatting. 2016-05-23 14:08:21 -07:00
java_sample.sh Made .sh files all have same comment formatting. 2016-05-23 14:08:21 -07:00
javascript_sample.sh Made .sh files all have same comment formatting. 2016-05-23 14:08:21 -07:00
monster.fbs Revamping the FlatBuffers docs. 2016-01-19 14:31:17 -08:00
monster_generated.h More native code gen functionality. 2017-01-18 16:23:35 -08:00
monsterdata.json add weapon + equipment to json example (#4114) 2016-12-12 14:12:56 -08:00
php_sample.sh Made .sh files all have same comment formatting. 2016-05-23 14:08:21 -07:00
python_sample.sh Made .sh files all have same comment formatting. 2016-05-23 14:08:21 -07:00
sample_binary.cpp Silenced unused variable warnings. 2016-01-19 15:30:41 -08:00
sample_binary.go Resolve Go fmt and vet warnings (#4134) 2017-01-09 17:13:44 -08:00
sample_binary.py Revamping the FlatBuffers docs. 2016-01-19 14:31:17 -08:00
sample_text.cpp Allow GenerateText() to indicate failure to encode flatbuffer to JSON (i.e., non-UTF-8 string data) 2016-08-18 10:23:26 -07:00
SampleBinary.cs Revamping the FlatBuffers docs. 2016-01-19 14:31:17 -08:00
SampleBinary.java Revamping the FlatBuffers docs. 2016-01-19 14:31:17 -08:00
samplebinary.js Revamping the FlatBuffers docs. 2016-01-19 14:31:17 -08:00
SampleBinary.php Revamping the FlatBuffers docs. 2016-01-19 14:31:17 -08:00