• Wouter van Oortmerssen's avatar
    More native code gen functionality. · 3f936c56
    Wouter van Oortmerssen authored
    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
    3f936c56
Name
Last commit
Last update
..
FlatBuffers.Test Loading commit data...
MyGame Loading commit data...
fuzzer Loading commit data...
namespace_test Loading commit data...
prototest Loading commit data...
GoTest.sh Loading commit data...
JavaScriptTest.js Loading commit data...
JavaScriptTest.sh Loading commit data...
JavaTest.bat Loading commit data...
JavaTest.java Loading commit data...
JavaTest.sh Loading commit data...
PythonTest.sh Loading commit data...
generate_code.bat Loading commit data...
generate_code.sh Loading commit data...
go_test.go Loading commit data...
include_test1.fbs Loading commit data...
include_test2.fbs Loading commit data...
monster_test.bfbs Loading commit data...
monster_test.fbs Loading commit data...
monster_test.grpc.fb.cc Loading commit data...
monster_test.grpc.fb.h Loading commit data...
monster_test_generated.h Loading commit data...
monster_test_generated.js Loading commit data...
monsterdata_python_wire.mon Loading commit data...
monsterdata_test.golden Loading commit data...
monsterdata_test.json Loading commit data...
monsterdata_test.mon Loading commit data...
phpTest.php Loading commit data...
py_test.py Loading commit data...
test.cpp Loading commit data...
unicode_test.json Loading commit data...