Squashed 'third_party/flatbuffers/' changes from bc44fad35..8aa8b9139
8aa8b9139 Fix handling of +/-inf defaults in TS/rust/go/dart codegen (#7588)
001adf782 Add support for parsing proto map fields (#7613)
dbc58ab77 Fix help output for --gen-includes (#7611)
2facfeec7 Fix missing spaces in flatc help text (#7612)
4de2814c7 Fix: arduino platform build (#7625)
37b1acdaf Fix current official name of macOS (#7627)
a22434e2a Add missing #include <algorithm> for std::min/std::max uses, and #include <limits> for std::numeric_limits<> (#7624)
214cc9468 Bump Rust version to 22.10.26 before publication (#7622)
a4ff275d9 Added option to not requires an EoF token when parsing JSON (#7620)
15f32c690 python: object generation prefix and suffix (#7565)
051afd882 Add CreateSharedString to python builder (#7608)
728c033ad Add check for presence of realpath to CMakeLists.txt to support more platforms (#7603)
4c514483d Update DartTest.sh golden files (#7606)
c2d9c2080 [TS] Add support for fixed length arrays on Typescript (#5864) (#7021) (#7581)
e34ae4c6b `build.yml`: Fix missing 'v' in version
e54536127 `build.yml` Update to Kotlin Wrapper 1.0.5
49d9f941c `release.yml` Use env var for passphrase
cefc21c1f `release.yml` Add GPG key for Maven
3e64fa724 `release.yml`: Add Maven Steps
b15f3c57e `release_yml` Use new dotnet version
ff802c680 `release.yml` Use NuGet Key directly
b401957d5 `release.yml` Changed Push to follow examples
8c8151f8f `release.yml` Fix nuget push command
ebb7c203d `release.yml` Add Nuget support
203241ed3 FlatBuffers Version 22.10.26 (#7607)
ac485609c `setup.py`: Define version directly
de5b85aa6 `release.yml`: Switch to `python` directory
de3df2d88 `release.yml`: Add publishing to PyPi
043a24f2e [Python] Fixed the issue with nested unions relying on InitFromBuf. (#7576)
5a48b0d7d release.yml: Typo
ce307556f release.yml: Remove `npm ci`
cb616e27c Create release.yml (#7605)
a54ca1e75 FlatBuffers Version 22.10.25 (#7604)
5b3fadcc1 [vector] Allow to iterate with mutables (#7586)
872a49746 [Nim] Bfbs Nim Generator (#7534)
e30170296 Make type conversions explicit. (#7595)
f7b734438 Fix LongEnum definitions (#7596)
5792623df Rust fix compilation for no_std targets #2 (#7553)
0edb27528 Update Rust version (#7574)
acc6a20d3 tests/test.cpp contains a couple of tests that are only executed (#7571)
04cd037ba Fix #7580 by documenting union schema evolution rules (#7585)
e1c5db988 Turn on clippy for Rust and fix lints for non-generated code (#7575)
b80142b90 Update documentation to mention enum value attributes (#7570)
54418f371 Add support for metadata attributes for enum values (#7567) (#7568)
c92e78a9f FlatBuffers Version 22.9.29 (#7557)
d243b904c [TS] Make strict compliant and improve typings (#7549)
374f8fb5f Rust soundness fixes (#7518)
dadbff571 Moves swift package to root of repository so it can be used directly … (#7548)
76ddae006 FlatBuffers Version 22.9.24 (#7547)
cfe157ec5 Emit internal enums when swift_implementation_only (#7545)
413115858 [Python] Python fixed size array (#7529)
88046190e Upgrade grpc to 1.49.0 and make sure it builds (#7538)
72aa85a75 [C++] Rare bad buffer content alignment if sizeof(T) != alignof(T) (#7520)
bfceebb7f Fix conform (#7532)
git-subtree-dir: third_party/flatbuffers
git-subtree-split: 8aa8b9139eb330f27816a5b8b5bbef402fbe3632
Signed-off-by: James Kuszmaul <james.kuszmaul@bluerivertech.com>
Change-Id: I943faba499baf58e9f561b1e4734922188ba8626
diff --git a/tests/ts/my-game/example/monster.ts b/tests/ts/my-game/example/monster.ts
index 63e5768..7e205ee 100644
--- a/tests/ts/my-game/example/monster.ts
+++ b/tests/ts/my-game/example/monster.ts
@@ -20,7 +20,7 @@
/**
* an example documentation comment: "monster object"
*/
-export class Monster {
+export class Monster implements flatbuffers.IUnpackableObject<MonsterT> {
bb: flatbuffers.ByteBuffer|null = null;
bb_pos = 0;
__init(i:number, bb:flatbuffers.ByteBuffer):Monster {
@@ -683,12 +683,140 @@
return true;
}
+nanDefault():number {
+ const offset = this.bb!.__offset(this.bb_pos, 112);
+ return offset ? this.bb!.readFloat32(this.bb_pos + offset) : NaN;
+}
+
+mutate_nan_default(value:number):boolean {
+ const offset = this.bb!.__offset(this.bb_pos, 112);
+
+ if (offset === 0) {
+ return false;
+ }
+
+ this.bb!.writeFloat32(this.bb_pos + offset, value);
+ return true;
+}
+
+infDefault():number {
+ const offset = this.bb!.__offset(this.bb_pos, 114);
+ return offset ? this.bb!.readFloat32(this.bb_pos + offset) : Infinity;
+}
+
+mutate_inf_default(value:number):boolean {
+ const offset = this.bb!.__offset(this.bb_pos, 114);
+
+ if (offset === 0) {
+ return false;
+ }
+
+ this.bb!.writeFloat32(this.bb_pos + offset, value);
+ return true;
+}
+
+positiveInfDefault():number {
+ const offset = this.bb!.__offset(this.bb_pos, 116);
+ return offset ? this.bb!.readFloat32(this.bb_pos + offset) : Infinity;
+}
+
+mutate_positive_inf_default(value:number):boolean {
+ const offset = this.bb!.__offset(this.bb_pos, 116);
+
+ if (offset === 0) {
+ return false;
+ }
+
+ this.bb!.writeFloat32(this.bb_pos + offset, value);
+ return true;
+}
+
+infinityDefault():number {
+ const offset = this.bb!.__offset(this.bb_pos, 118);
+ return offset ? this.bb!.readFloat32(this.bb_pos + offset) : Infinity;
+}
+
+mutate_infinity_default(value:number):boolean {
+ const offset = this.bb!.__offset(this.bb_pos, 118);
+
+ if (offset === 0) {
+ return false;
+ }
+
+ this.bb!.writeFloat32(this.bb_pos + offset, value);
+ return true;
+}
+
+positiveInfinityDefault():number {
+ const offset = this.bb!.__offset(this.bb_pos, 120);
+ return offset ? this.bb!.readFloat32(this.bb_pos + offset) : Infinity;
+}
+
+mutate_positive_infinity_default(value:number):boolean {
+ const offset = this.bb!.__offset(this.bb_pos, 120);
+
+ if (offset === 0) {
+ return false;
+ }
+
+ this.bb!.writeFloat32(this.bb_pos + offset, value);
+ return true;
+}
+
+negativeInfDefault():number {
+ const offset = this.bb!.__offset(this.bb_pos, 122);
+ return offset ? this.bb!.readFloat32(this.bb_pos + offset) : -Infinity;
+}
+
+mutate_negative_inf_default(value:number):boolean {
+ const offset = this.bb!.__offset(this.bb_pos, 122);
+
+ if (offset === 0) {
+ return false;
+ }
+
+ this.bb!.writeFloat32(this.bb_pos + offset, value);
+ return true;
+}
+
+negativeInfinityDefault():number {
+ const offset = this.bb!.__offset(this.bb_pos, 124);
+ return offset ? this.bb!.readFloat32(this.bb_pos + offset) : -Infinity;
+}
+
+mutate_negative_infinity_default(value:number):boolean {
+ const offset = this.bb!.__offset(this.bb_pos, 124);
+
+ if (offset === 0) {
+ return false;
+ }
+
+ this.bb!.writeFloat32(this.bb_pos + offset, value);
+ return true;
+}
+
+doubleInfDefault():number {
+ const offset = this.bb!.__offset(this.bb_pos, 126);
+ return offset ? this.bb!.readFloat64(this.bb_pos + offset) : Infinity;
+}
+
+mutate_double_inf_default(value:number):boolean {
+ const offset = this.bb!.__offset(this.bb_pos, 126);
+
+ if (offset === 0) {
+ return false;
+ }
+
+ this.bb!.writeFloat64(this.bb_pos + offset, value);
+ return true;
+}
+
static getFullyQualifiedName():string {
return 'MyGame_Example_Monster';
}
static startMonster(builder:flatbuffers.Builder) {
- builder.startObject(54);
+ builder.startObject(62);
}
static addPos(builder:flatbuffers.Builder, posOffset:flatbuffers.Offset) {
@@ -1124,6 +1252,38 @@
builder.addFieldInt64(53, longEnumNormalDefault, BigInt('2'));
}
+static addNanDefault(builder:flatbuffers.Builder, nanDefault:number) {
+ builder.addFieldFloat32(54, nanDefault, NaN);
+}
+
+static addInfDefault(builder:flatbuffers.Builder, infDefault:number) {
+ builder.addFieldFloat32(55, infDefault, Infinity);
+}
+
+static addPositiveInfDefault(builder:flatbuffers.Builder, positiveInfDefault:number) {
+ builder.addFieldFloat32(56, positiveInfDefault, Infinity);
+}
+
+static addInfinityDefault(builder:flatbuffers.Builder, infinityDefault:number) {
+ builder.addFieldFloat32(57, infinityDefault, Infinity);
+}
+
+static addPositiveInfinityDefault(builder:flatbuffers.Builder, positiveInfinityDefault:number) {
+ builder.addFieldFloat32(58, positiveInfinityDefault, Infinity);
+}
+
+static addNegativeInfDefault(builder:flatbuffers.Builder, negativeInfDefault:number) {
+ builder.addFieldFloat32(59, negativeInfDefault, -Infinity);
+}
+
+static addNegativeInfinityDefault(builder:flatbuffers.Builder, negativeInfinityDefault:number) {
+ builder.addFieldFloat32(60, negativeInfinityDefault, -Infinity);
+}
+
+static addDoubleInfDefault(builder:flatbuffers.Builder, doubleInfDefault:number) {
+ builder.addFieldFloat64(61, doubleInfDefault, Infinity);
+}
+
static endMonster(builder:flatbuffers.Builder):flatbuffers.Offset {
const offset = builder.endObject();
builder.requiredField(offset, 10) // name
@@ -1153,19 +1313,19 @@
this.mana(),
this.hp(),
this.name(),
- this.bb!.createScalarList(this.inventory.bind(this), this.inventoryLength()),
+ this.bb!.createScalarList<number>(this.inventory.bind(this), this.inventoryLength()),
this.color(),
this.testType(),
(() => {
- let temp = unionToAny(this.testType(), this.test.bind(this));
+ const temp = unionToAny(this.testType(), this.test.bind(this));
if(temp === null) { return null; }
return temp.unpack()
})(),
- this.bb!.createObjList(this.test4.bind(this), this.test4Length()),
- this.bb!.createScalarList(this.testarrayofstring.bind(this), this.testarrayofstringLength()),
- this.bb!.createObjList(this.testarrayoftables.bind(this), this.testarrayoftablesLength()),
+ this.bb!.createObjList<Test, TestT>(this.test4.bind(this), this.test4Length()),
+ this.bb!.createScalarList<string>(this.testarrayofstring.bind(this), this.testarrayofstringLength()),
+ this.bb!.createObjList<Monster, MonsterT>(this.testarrayoftables.bind(this), this.testarrayoftablesLength()),
(this.enemy() !== null ? this.enemy()!.unpack() : null),
- this.bb!.createScalarList(this.testnestedflatbuffer.bind(this), this.testnestedflatbufferLength()),
+ this.bb!.createScalarList<number>(this.testnestedflatbuffer.bind(this), this.testnestedflatbufferLength()),
(this.testempty() !== null ? this.testempty()!.unpack() : null),
this.testbool(),
this.testhashs32Fnv1(),
@@ -1176,44 +1336,52 @@
this.testhashu32Fnv1a(),
this.testhashs64Fnv1a(),
this.testhashu64Fnv1a(),
- this.bb!.createScalarList(this.testarrayofbools.bind(this), this.testarrayofboolsLength()),
+ this.bb!.createScalarList<boolean>(this.testarrayofbools.bind(this), this.testarrayofboolsLength()),
this.testf(),
this.testf2(),
this.testf3(),
- this.bb!.createScalarList(this.testarrayofstring2.bind(this), this.testarrayofstring2Length()),
- this.bb!.createObjList(this.testarrayofsortedstruct.bind(this), this.testarrayofsortedstructLength()),
- this.bb!.createScalarList(this.flex.bind(this), this.flexLength()),
- this.bb!.createObjList(this.test5.bind(this), this.test5Length()),
- this.bb!.createScalarList(this.vectorOfLongs.bind(this), this.vectorOfLongsLength()),
- this.bb!.createScalarList(this.vectorOfDoubles.bind(this), this.vectorOfDoublesLength()),
+ this.bb!.createScalarList<string>(this.testarrayofstring2.bind(this), this.testarrayofstring2Length()),
+ this.bb!.createObjList<Ability, AbilityT>(this.testarrayofsortedstruct.bind(this), this.testarrayofsortedstructLength()),
+ this.bb!.createScalarList<number>(this.flex.bind(this), this.flexLength()),
+ this.bb!.createObjList<Test, TestT>(this.test5.bind(this), this.test5Length()),
+ this.bb!.createScalarList<bigint>(this.vectorOfLongs.bind(this), this.vectorOfLongsLength()),
+ this.bb!.createScalarList<number>(this.vectorOfDoubles.bind(this), this.vectorOfDoublesLength()),
(this.parentNamespaceTest() !== null ? this.parentNamespaceTest()!.unpack() : null),
- this.bb!.createObjList(this.vectorOfReferrables.bind(this), this.vectorOfReferrablesLength()),
+ this.bb!.createObjList<Referrable, ReferrableT>(this.vectorOfReferrables.bind(this), this.vectorOfReferrablesLength()),
this.singleWeakReference(),
- this.bb!.createScalarList(this.vectorOfWeakReferences.bind(this), this.vectorOfWeakReferencesLength()),
- this.bb!.createObjList(this.vectorOfStrongReferrables.bind(this), this.vectorOfStrongReferrablesLength()),
+ this.bb!.createScalarList<bigint>(this.vectorOfWeakReferences.bind(this), this.vectorOfWeakReferencesLength()),
+ this.bb!.createObjList<Referrable, ReferrableT>(this.vectorOfStrongReferrables.bind(this), this.vectorOfStrongReferrablesLength()),
this.coOwningReference(),
- this.bb!.createScalarList(this.vectorOfCoOwningReferences.bind(this), this.vectorOfCoOwningReferencesLength()),
+ this.bb!.createScalarList<bigint>(this.vectorOfCoOwningReferences.bind(this), this.vectorOfCoOwningReferencesLength()),
this.nonOwningReference(),
- this.bb!.createScalarList(this.vectorOfNonOwningReferences.bind(this), this.vectorOfNonOwningReferencesLength()),
+ this.bb!.createScalarList<bigint>(this.vectorOfNonOwningReferences.bind(this), this.vectorOfNonOwningReferencesLength()),
this.anyUniqueType(),
(() => {
- let temp = unionToAnyUniqueAliases(this.anyUniqueType(), this.anyUnique.bind(this));
+ const temp = unionToAnyUniqueAliases(this.anyUniqueType(), this.anyUnique.bind(this));
if(temp === null) { return null; }
return temp.unpack()
})(),
this.anyAmbiguousType(),
(() => {
- let temp = unionToAnyAmbiguousAliases(this.anyAmbiguousType(), this.anyAmbiguous.bind(this));
+ const temp = unionToAnyAmbiguousAliases(this.anyAmbiguousType(), this.anyAmbiguous.bind(this));
if(temp === null) { return null; }
return temp.unpack()
})(),
- this.bb!.createScalarList(this.vectorOfEnums.bind(this), this.vectorOfEnumsLength()),
+ this.bb!.createScalarList<Color>(this.vectorOfEnums.bind(this), this.vectorOfEnumsLength()),
this.signedEnum(),
- this.bb!.createScalarList(this.testrequirednestedflatbuffer.bind(this), this.testrequirednestedflatbufferLength()),
- this.bb!.createObjList(this.scalarKeySortedTables.bind(this), this.scalarKeySortedTablesLength()),
+ this.bb!.createScalarList<number>(this.testrequirednestedflatbuffer.bind(this), this.testrequirednestedflatbufferLength()),
+ this.bb!.createObjList<Stat, StatT>(this.scalarKeySortedTables.bind(this), this.scalarKeySortedTablesLength()),
(this.nativeInline() !== null ? this.nativeInline()!.unpack() : null),
this.longEnumNonEnumDefault(),
- this.longEnumNormalDefault()
+ this.longEnumNormalDefault(),
+ this.nanDefault(),
+ this.infDefault(),
+ this.positiveInfDefault(),
+ this.infinityDefault(),
+ this.positiveInfinityDefault(),
+ this.negativeInfDefault(),
+ this.negativeInfinityDefault(),
+ this.doubleInfDefault()
);
}
@@ -1223,19 +1391,19 @@
_o.mana = this.mana();
_o.hp = this.hp();
_o.name = this.name();
- _o.inventory = this.bb!.createScalarList(this.inventory.bind(this), this.inventoryLength());
+ _o.inventory = this.bb!.createScalarList<number>(this.inventory.bind(this), this.inventoryLength());
_o.color = this.color();
_o.testType = this.testType();
_o.test = (() => {
- let temp = unionToAny(this.testType(), this.test.bind(this));
+ const temp = unionToAny(this.testType(), this.test.bind(this));
if(temp === null) { return null; }
return temp.unpack()
})();
- _o.test4 = this.bb!.createObjList(this.test4.bind(this), this.test4Length());
- _o.testarrayofstring = this.bb!.createScalarList(this.testarrayofstring.bind(this), this.testarrayofstringLength());
- _o.testarrayoftables = this.bb!.createObjList(this.testarrayoftables.bind(this), this.testarrayoftablesLength());
+ _o.test4 = this.bb!.createObjList<Test, TestT>(this.test4.bind(this), this.test4Length());
+ _o.testarrayofstring = this.bb!.createScalarList<string>(this.testarrayofstring.bind(this), this.testarrayofstringLength());
+ _o.testarrayoftables = this.bb!.createObjList<Monster, MonsterT>(this.testarrayoftables.bind(this), this.testarrayoftablesLength());
_o.enemy = (this.enemy() !== null ? this.enemy()!.unpack() : null);
- _o.testnestedflatbuffer = this.bb!.createScalarList(this.testnestedflatbuffer.bind(this), this.testnestedflatbufferLength());
+ _o.testnestedflatbuffer = this.bb!.createScalarList<number>(this.testnestedflatbuffer.bind(this), this.testnestedflatbufferLength());
_o.testempty = (this.testempty() !== null ? this.testempty()!.unpack() : null);
_o.testbool = this.testbool();
_o.testhashs32Fnv1 = this.testhashs32Fnv1();
@@ -1246,48 +1414,56 @@
_o.testhashu32Fnv1a = this.testhashu32Fnv1a();
_o.testhashs64Fnv1a = this.testhashs64Fnv1a();
_o.testhashu64Fnv1a = this.testhashu64Fnv1a();
- _o.testarrayofbools = this.bb!.createScalarList(this.testarrayofbools.bind(this), this.testarrayofboolsLength());
+ _o.testarrayofbools = this.bb!.createScalarList<boolean>(this.testarrayofbools.bind(this), this.testarrayofboolsLength());
_o.testf = this.testf();
_o.testf2 = this.testf2();
_o.testf3 = this.testf3();
- _o.testarrayofstring2 = this.bb!.createScalarList(this.testarrayofstring2.bind(this), this.testarrayofstring2Length());
- _o.testarrayofsortedstruct = this.bb!.createObjList(this.testarrayofsortedstruct.bind(this), this.testarrayofsortedstructLength());
- _o.flex = this.bb!.createScalarList(this.flex.bind(this), this.flexLength());
- _o.test5 = this.bb!.createObjList(this.test5.bind(this), this.test5Length());
- _o.vectorOfLongs = this.bb!.createScalarList(this.vectorOfLongs.bind(this), this.vectorOfLongsLength());
- _o.vectorOfDoubles = this.bb!.createScalarList(this.vectorOfDoubles.bind(this), this.vectorOfDoublesLength());
+ _o.testarrayofstring2 = this.bb!.createScalarList<string>(this.testarrayofstring2.bind(this), this.testarrayofstring2Length());
+ _o.testarrayofsortedstruct = this.bb!.createObjList<Ability, AbilityT>(this.testarrayofsortedstruct.bind(this), this.testarrayofsortedstructLength());
+ _o.flex = this.bb!.createScalarList<number>(this.flex.bind(this), this.flexLength());
+ _o.test5 = this.bb!.createObjList<Test, TestT>(this.test5.bind(this), this.test5Length());
+ _o.vectorOfLongs = this.bb!.createScalarList<bigint>(this.vectorOfLongs.bind(this), this.vectorOfLongsLength());
+ _o.vectorOfDoubles = this.bb!.createScalarList<number>(this.vectorOfDoubles.bind(this), this.vectorOfDoublesLength());
_o.parentNamespaceTest = (this.parentNamespaceTest() !== null ? this.parentNamespaceTest()!.unpack() : null);
- _o.vectorOfReferrables = this.bb!.createObjList(this.vectorOfReferrables.bind(this), this.vectorOfReferrablesLength());
+ _o.vectorOfReferrables = this.bb!.createObjList<Referrable, ReferrableT>(this.vectorOfReferrables.bind(this), this.vectorOfReferrablesLength());
_o.singleWeakReference = this.singleWeakReference();
- _o.vectorOfWeakReferences = this.bb!.createScalarList(this.vectorOfWeakReferences.bind(this), this.vectorOfWeakReferencesLength());
- _o.vectorOfStrongReferrables = this.bb!.createObjList(this.vectorOfStrongReferrables.bind(this), this.vectorOfStrongReferrablesLength());
+ _o.vectorOfWeakReferences = this.bb!.createScalarList<bigint>(this.vectorOfWeakReferences.bind(this), this.vectorOfWeakReferencesLength());
+ _o.vectorOfStrongReferrables = this.bb!.createObjList<Referrable, ReferrableT>(this.vectorOfStrongReferrables.bind(this), this.vectorOfStrongReferrablesLength());
_o.coOwningReference = this.coOwningReference();
- _o.vectorOfCoOwningReferences = this.bb!.createScalarList(this.vectorOfCoOwningReferences.bind(this), this.vectorOfCoOwningReferencesLength());
+ _o.vectorOfCoOwningReferences = this.bb!.createScalarList<bigint>(this.vectorOfCoOwningReferences.bind(this), this.vectorOfCoOwningReferencesLength());
_o.nonOwningReference = this.nonOwningReference();
- _o.vectorOfNonOwningReferences = this.bb!.createScalarList(this.vectorOfNonOwningReferences.bind(this), this.vectorOfNonOwningReferencesLength());
+ _o.vectorOfNonOwningReferences = this.bb!.createScalarList<bigint>(this.vectorOfNonOwningReferences.bind(this), this.vectorOfNonOwningReferencesLength());
_o.anyUniqueType = this.anyUniqueType();
_o.anyUnique = (() => {
- let temp = unionToAnyUniqueAliases(this.anyUniqueType(), this.anyUnique.bind(this));
+ const temp = unionToAnyUniqueAliases(this.anyUniqueType(), this.anyUnique.bind(this));
if(temp === null) { return null; }
return temp.unpack()
})();
_o.anyAmbiguousType = this.anyAmbiguousType();
_o.anyAmbiguous = (() => {
- let temp = unionToAnyAmbiguousAliases(this.anyAmbiguousType(), this.anyAmbiguous.bind(this));
+ const temp = unionToAnyAmbiguousAliases(this.anyAmbiguousType(), this.anyAmbiguous.bind(this));
if(temp === null) { return null; }
return temp.unpack()
})();
- _o.vectorOfEnums = this.bb!.createScalarList(this.vectorOfEnums.bind(this), this.vectorOfEnumsLength());
+ _o.vectorOfEnums = this.bb!.createScalarList<Color>(this.vectorOfEnums.bind(this), this.vectorOfEnumsLength());
_o.signedEnum = this.signedEnum();
- _o.testrequirednestedflatbuffer = this.bb!.createScalarList(this.testrequirednestedflatbuffer.bind(this), this.testrequirednestedflatbufferLength());
- _o.scalarKeySortedTables = this.bb!.createObjList(this.scalarKeySortedTables.bind(this), this.scalarKeySortedTablesLength());
+ _o.testrequirednestedflatbuffer = this.bb!.createScalarList<number>(this.testrequirednestedflatbuffer.bind(this), this.testrequirednestedflatbufferLength());
+ _o.scalarKeySortedTables = this.bb!.createObjList<Stat, StatT>(this.scalarKeySortedTables.bind(this), this.scalarKeySortedTablesLength());
_o.nativeInline = (this.nativeInline() !== null ? this.nativeInline()!.unpack() : null);
_o.longEnumNonEnumDefault = this.longEnumNonEnumDefault();
_o.longEnumNormalDefault = this.longEnumNormalDefault();
+ _o.nanDefault = this.nanDefault();
+ _o.infDefault = this.infDefault();
+ _o.positiveInfDefault = this.positiveInfDefault();
+ _o.infinityDefault = this.infinityDefault();
+ _o.positiveInfinityDefault = this.positiveInfinityDefault();
+ _o.negativeInfDefault = this.negativeInfDefault();
+ _o.negativeInfinityDefault = this.negativeInfinityDefault();
+ _o.doubleInfDefault = this.doubleInfDefault();
}
}
-export class MonsterT {
+export class MonsterT implements flatbuffers.IGeneratedObject {
constructor(
public pos: Vec3T|null = null,
public mana: number = 150,
@@ -1341,7 +1517,15 @@
public scalarKeySortedTables: (StatT)[] = [],
public nativeInline: TestT|null = null,
public longEnumNonEnumDefault: bigint = BigInt('0'),
- public longEnumNormalDefault: bigint = BigInt('2')
+ public longEnumNormalDefault: bigint = BigInt('2'),
+ public nanDefault: number = NaN,
+ public infDefault: number = Infinity,
+ public positiveInfDefault: number = Infinity,
+ public infinityDefault: number = Infinity,
+ public positiveInfinityDefault: number = Infinity,
+ public negativeInfDefault: number = -Infinity,
+ public negativeInfinityDefault: number = -Infinity,
+ public doubleInfDefault: number = Infinity
){}
@@ -1428,6 +1612,14 @@
Monster.addNativeInline(builder, (this.nativeInline !== null ? this.nativeInline!.pack(builder) : 0));
Monster.addLongEnumNonEnumDefault(builder, this.longEnumNonEnumDefault);
Monster.addLongEnumNormalDefault(builder, this.longEnumNormalDefault);
+ Monster.addNanDefault(builder, this.nanDefault);
+ Monster.addInfDefault(builder, this.infDefault);
+ Monster.addPositiveInfDefault(builder, this.positiveInfDefault);
+ Monster.addInfinityDefault(builder, this.infinityDefault);
+ Monster.addPositiveInfinityDefault(builder, this.positiveInfinityDefault);
+ Monster.addNegativeInfDefault(builder, this.negativeInfDefault);
+ Monster.addNegativeInfinityDefault(builder, this.negativeInfinityDefault);
+ Monster.addDoubleInfDefault(builder, this.doubleInfDefault);
return Monster.endMonster(builder);
}