fixed comparator for native_inline (#7076)

* fixed comparator for native_inline

* added native_inline data

* updated more tests for the new field

* more fixes
This commit is contained in:
Derek Bailey
2022-02-02 23:44:43 -08:00
committed by GitHub
parent 826193ff68
commit 39c8a19ce2
26 changed files with 937 additions and 636 deletions

View File

@@ -729,22 +729,29 @@ class Monster extends Table
return $o != 0 ? $this->__vector_len($o) : 0;
}
public function getNativeInline()
{
$obj = new Test();
$o = $this->__offset(106);
return $o != 0 ? $obj->init($o + $this->bb_pos, $this->bb) : 0;
}
/**
* @param FlatBufferBuilder $builder
* @return void
*/
public static function startMonster(FlatBufferBuilder $builder)
{
$builder->StartObject(51);
$builder->StartObject(52);
}
/**
* @param FlatBufferBuilder $builder
* @return Monster
*/
public static function createMonster(FlatBufferBuilder $builder, $pos, $mana, $hp, $name, $inventory, $color, $test_type, $test, $test4, $testarrayofstring, $testarrayoftables, $enemy, $testnestedflatbuffer, $testempty, $testbool, $testhashs32_fnv1, $testhashu32_fnv1, $testhashs64_fnv1, $testhashu64_fnv1, $testhashs32_fnv1a, $testhashu32_fnv1a, $testhashs64_fnv1a, $testhashu64_fnv1a, $testarrayofbools, $testf, $testf2, $testf3, $testarrayofstring2, $testarrayofsortedstruct, $flex, $test5, $vector_of_longs, $vector_of_doubles, $parent_namespace_test, $vector_of_referrables, $single_weak_reference, $vector_of_weak_references, $vector_of_strong_referrables, $co_owning_reference, $vector_of_co_owning_references, $non_owning_reference, $vector_of_non_owning_references, $any_unique_type, $any_unique, $any_ambiguous_type, $any_ambiguous, $vector_of_enums, $signed_enum, $testrequirednestedflatbuffer, $scalar_key_sorted_tables)
public static function createMonster(FlatBufferBuilder $builder, $pos, $mana, $hp, $name, $inventory, $color, $test_type, $test, $test4, $testarrayofstring, $testarrayoftables, $enemy, $testnestedflatbuffer, $testempty, $testbool, $testhashs32_fnv1, $testhashu32_fnv1, $testhashs64_fnv1, $testhashu64_fnv1, $testhashs32_fnv1a, $testhashu32_fnv1a, $testhashs64_fnv1a, $testhashu64_fnv1a, $testarrayofbools, $testf, $testf2, $testf3, $testarrayofstring2, $testarrayofsortedstruct, $flex, $test5, $vector_of_longs, $vector_of_doubles, $parent_namespace_test, $vector_of_referrables, $single_weak_reference, $vector_of_weak_references, $vector_of_strong_referrables, $co_owning_reference, $vector_of_co_owning_references, $non_owning_reference, $vector_of_non_owning_references, $any_unique_type, $any_unique, $any_ambiguous_type, $any_ambiguous, $vector_of_enums, $signed_enum, $testrequirednestedflatbuffer, $scalar_key_sorted_tables, $native_inline)
{
$builder->startObject(51);
$builder->startObject(52);
self::addPos($builder, $pos);
self::addMana($builder, $mana);
self::addHp($builder, $hp);
@@ -795,6 +802,7 @@ class Monster extends Table
self::addSignedEnum($builder, $signed_enum);
self::addTestrequirednestedflatbuffer($builder, $testrequirednestedflatbuffer);
self::addScalarKeySortedTables($builder, $scalar_key_sorted_tables);
self::addNativeInline($builder, $native_inline);
$o = $builder->endObject();
$builder->required($o, 10); // name
return $o;
@@ -1765,6 +1773,16 @@ class Monster extends Table
$builder->startVector(4, $numElems, 4);
}
/**
* @param FlatBufferBuilder $builder
* @param int
* @return void
*/
public static function addNativeInline(FlatBufferBuilder $builder, $nativeInline)
{
$builder->addStructX(51, $nativeInline, 0);
}
/**
* @param FlatBufferBuilder $builder
* @return int table offset