1// Code generated by the FlatBuffers compiler. DO NOT EDIT. 2 3package Example 4 5import ( 6 flatbuffers "github.com/google/flatbuffers/go" 7 8 MyGame "MyGame" 9) 10 11/// an example documentation comment: "monster object" 12type MonsterT struct { 13 Pos *Vec3T `json:"pos"` 14 Mana int16 `json:"mana"` 15 Hp int16 `json:"hp"` 16 Name string `json:"name"` 17 Inventory []byte `json:"inventory"` 18 Color Color `json:"color"` 19 Test *AnyT `json:"test"` 20 Test4 []*TestT `json:"test4"` 21 Testarrayofstring []string `json:"testarrayofstring"` 22 Testarrayoftables []*MonsterT `json:"testarrayoftables"` 23 Enemy *MonsterT `json:"enemy"` 24 Testnestedflatbuffer []byte `json:"testnestedflatbuffer"` 25 Testempty *StatT `json:"testempty"` 26 Testbool bool `json:"testbool"` 27 Testhashs32Fnv1 int32 `json:"testhashs32_fnv1"` 28 Testhashu32Fnv1 uint32 `json:"testhashu32_fnv1"` 29 Testhashs64Fnv1 int64 `json:"testhashs64_fnv1"` 30 Testhashu64Fnv1 uint64 `json:"testhashu64_fnv1"` 31 Testhashs32Fnv1a int32 `json:"testhashs32_fnv1a"` 32 Testhashu32Fnv1a uint32 `json:"testhashu32_fnv1a"` 33 Testhashs64Fnv1a int64 `json:"testhashs64_fnv1a"` 34 Testhashu64Fnv1a uint64 `json:"testhashu64_fnv1a"` 35 Testarrayofbools []bool `json:"testarrayofbools"` 36 Testf float32 `json:"testf"` 37 Testf2 float32 `json:"testf2"` 38 Testf3 float32 `json:"testf3"` 39 Testarrayofstring2 []string `json:"testarrayofstring2"` 40 Testarrayofsortedstruct []*AbilityT `json:"testarrayofsortedstruct"` 41 Flex []byte `json:"flex"` 42 Test5 []*TestT `json:"test5"` 43 VectorOfLongs []int64 `json:"vector_of_longs"` 44 VectorOfDoubles []float64 `json:"vector_of_doubles"` 45 ParentNamespaceTest *MyGame.InParentNamespaceT `json:"parent_namespace_test"` 46 VectorOfReferrables []*ReferrableT `json:"vector_of_referrables"` 47 SingleWeakReference uint64 `json:"single_weak_reference"` 48 VectorOfWeakReferences []uint64 `json:"vector_of_weak_references"` 49 VectorOfStrongReferrables []*ReferrableT `json:"vector_of_strong_referrables"` 50 CoOwningReference uint64 `json:"co_owning_reference"` 51 VectorOfCoOwningReferences []uint64 `json:"vector_of_co_owning_references"` 52 NonOwningReference uint64 `json:"non_owning_reference"` 53 VectorOfNonOwningReferences []uint64 `json:"vector_of_non_owning_references"` 54 AnyUnique *AnyUniqueAliasesT `json:"any_unique"` 55 AnyAmbiguous *AnyAmbiguousAliasesT `json:"any_ambiguous"` 56 VectorOfEnums []Color `json:"vector_of_enums"` 57 SignedEnum Race `json:"signed_enum"` 58 Testrequirednestedflatbuffer []byte `json:"testrequirednestedflatbuffer"` 59 ScalarKeySortedTables []*StatT `json:"scalar_key_sorted_tables"` 60 NativeInline *TestT `json:"native_inline"` 61 LongEnumNonEnumDefault LongEnum `json:"long_enum_non_enum_default"` 62 LongEnumNormalDefault LongEnum `json:"long_enum_normal_default"` 63} 64 65func (t *MonsterT) Pack(builder *flatbuffers.Builder) flatbuffers.UOffsetT { 66 if t == nil { return 0 } 67 nameOffset := builder.CreateString(t.Name) 68 inventoryOffset := flatbuffers.UOffsetT(0) 69 if t.Inventory != nil { 70 inventoryOffset = builder.CreateByteString(t.Inventory) 71 } 72 testOffset := t.Test.Pack(builder) 73 74 test4Offset := flatbuffers.UOffsetT(0) 75 if t.Test4 != nil { 76 test4Length := len(t.Test4) 77 MonsterStartTest4Vector(builder, test4Length) 78 for j := test4Length - 1; j >= 0; j-- { 79 t.Test4[j].Pack(builder) 80 } 81 test4Offset = builder.EndVector(test4Length) 82 } 83 testarrayofstringOffset := flatbuffers.UOffsetT(0) 84 if t.Testarrayofstring != nil { 85 testarrayofstringLength := len(t.Testarrayofstring) 86 testarrayofstringOffsets := make([]flatbuffers.UOffsetT, testarrayofstringLength) 87 for j := 0; j < testarrayofstringLength; j++ { 88 testarrayofstringOffsets[j] = builder.CreateString(t.Testarrayofstring[j]) 89 } 90 MonsterStartTestarrayofstringVector(builder, testarrayofstringLength) 91 for j := testarrayofstringLength - 1; j >= 0; j-- { 92 builder.PrependUOffsetT(testarrayofstringOffsets[j]) 93 } 94 testarrayofstringOffset = builder.EndVector(testarrayofstringLength) 95 } 96 testarrayoftablesOffset := flatbuffers.UOffsetT(0) 97 if t.Testarrayoftables != nil { 98 testarrayoftablesLength := len(t.Testarrayoftables) 99 testarrayoftablesOffsets := make([]flatbuffers.UOffsetT, testarrayoftablesLength) 100 for j := 0; j < testarrayoftablesLength; j++ { 101 testarrayoftablesOffsets[j] = t.Testarrayoftables[j].Pack(builder) 102 } 103 MonsterStartTestarrayoftablesVector(builder, testarrayoftablesLength) 104 for j := testarrayoftablesLength - 1; j >= 0; j-- { 105 builder.PrependUOffsetT(testarrayoftablesOffsets[j]) 106 } 107 testarrayoftablesOffset = builder.EndVector(testarrayoftablesLength) 108 } 109 enemyOffset := t.Enemy.Pack(builder) 110 testnestedflatbufferOffset := flatbuffers.UOffsetT(0) 111 if t.Testnestedflatbuffer != nil { 112 testnestedflatbufferOffset = builder.CreateByteString(t.Testnestedflatbuffer) 113 } 114 testemptyOffset := t.Testempty.Pack(builder) 115 testarrayofboolsOffset := flatbuffers.UOffsetT(0) 116 if t.Testarrayofbools != nil { 117 testarrayofboolsLength := len(t.Testarrayofbools) 118 MonsterStartTestarrayofboolsVector(builder, testarrayofboolsLength) 119 for j := testarrayofboolsLength - 1; j >= 0; j-- { 120 builder.PrependBool(t.Testarrayofbools[j]) 121 } 122 testarrayofboolsOffset = builder.EndVector(testarrayofboolsLength) 123 } 124 testarrayofstring2Offset := flatbuffers.UOffsetT(0) 125 if t.Testarrayofstring2 != nil { 126 testarrayofstring2Length := len(t.Testarrayofstring2) 127 testarrayofstring2Offsets := make([]flatbuffers.UOffsetT, testarrayofstring2Length) 128 for j := 0; j < testarrayofstring2Length; j++ { 129 testarrayofstring2Offsets[j] = builder.CreateString(t.Testarrayofstring2[j]) 130 } 131 MonsterStartTestarrayofstring2Vector(builder, testarrayofstring2Length) 132 for j := testarrayofstring2Length - 1; j >= 0; j-- { 133 builder.PrependUOffsetT(testarrayofstring2Offsets[j]) 134 } 135 testarrayofstring2Offset = builder.EndVector(testarrayofstring2Length) 136 } 137 testarrayofsortedstructOffset := flatbuffers.UOffsetT(0) 138 if t.Testarrayofsortedstruct != nil { 139 testarrayofsortedstructLength := len(t.Testarrayofsortedstruct) 140 MonsterStartTestarrayofsortedstructVector(builder, testarrayofsortedstructLength) 141 for j := testarrayofsortedstructLength - 1; j >= 0; j-- { 142 t.Testarrayofsortedstruct[j].Pack(builder) 143 } 144 testarrayofsortedstructOffset = builder.EndVector(testarrayofsortedstructLength) 145 } 146 flexOffset := flatbuffers.UOffsetT(0) 147 if t.Flex != nil { 148 flexOffset = builder.CreateByteString(t.Flex) 149 } 150 test5Offset := flatbuffers.UOffsetT(0) 151 if t.Test5 != nil { 152 test5Length := len(t.Test5) 153 MonsterStartTest5Vector(builder, test5Length) 154 for j := test5Length - 1; j >= 0; j-- { 155 t.Test5[j].Pack(builder) 156 } 157 test5Offset = builder.EndVector(test5Length) 158 } 159 vectorOfLongsOffset := flatbuffers.UOffsetT(0) 160 if t.VectorOfLongs != nil { 161 vectorOfLongsLength := len(t.VectorOfLongs) 162 MonsterStartVectorOfLongsVector(builder, vectorOfLongsLength) 163 for j := vectorOfLongsLength - 1; j >= 0; j-- { 164 builder.PrependInt64(t.VectorOfLongs[j]) 165 } 166 vectorOfLongsOffset = builder.EndVector(vectorOfLongsLength) 167 } 168 vectorOfDoublesOffset := flatbuffers.UOffsetT(0) 169 if t.VectorOfDoubles != nil { 170 vectorOfDoublesLength := len(t.VectorOfDoubles) 171 MonsterStartVectorOfDoublesVector(builder, vectorOfDoublesLength) 172 for j := vectorOfDoublesLength - 1; j >= 0; j-- { 173 builder.PrependFloat64(t.VectorOfDoubles[j]) 174 } 175 vectorOfDoublesOffset = builder.EndVector(vectorOfDoublesLength) 176 } 177 parentNamespaceTestOffset := t.ParentNamespaceTest.Pack(builder) 178 vectorOfReferrablesOffset := flatbuffers.UOffsetT(0) 179 if t.VectorOfReferrables != nil { 180 vectorOfReferrablesLength := len(t.VectorOfReferrables) 181 vectorOfReferrablesOffsets := make([]flatbuffers.UOffsetT, vectorOfReferrablesLength) 182 for j := 0; j < vectorOfReferrablesLength; j++ { 183 vectorOfReferrablesOffsets[j] = t.VectorOfReferrables[j].Pack(builder) 184 } 185 MonsterStartVectorOfReferrablesVector(builder, vectorOfReferrablesLength) 186 for j := vectorOfReferrablesLength - 1; j >= 0; j-- { 187 builder.PrependUOffsetT(vectorOfReferrablesOffsets[j]) 188 } 189 vectorOfReferrablesOffset = builder.EndVector(vectorOfReferrablesLength) 190 } 191 vectorOfWeakReferencesOffset := flatbuffers.UOffsetT(0) 192 if t.VectorOfWeakReferences != nil { 193 vectorOfWeakReferencesLength := len(t.VectorOfWeakReferences) 194 MonsterStartVectorOfWeakReferencesVector(builder, vectorOfWeakReferencesLength) 195 for j := vectorOfWeakReferencesLength - 1; j >= 0; j-- { 196 builder.PrependUint64(t.VectorOfWeakReferences[j]) 197 } 198 vectorOfWeakReferencesOffset = builder.EndVector(vectorOfWeakReferencesLength) 199 } 200 vectorOfStrongReferrablesOffset := flatbuffers.UOffsetT(0) 201 if t.VectorOfStrongReferrables != nil { 202 vectorOfStrongReferrablesLength := len(t.VectorOfStrongReferrables) 203 vectorOfStrongReferrablesOffsets := make([]flatbuffers.UOffsetT, vectorOfStrongReferrablesLength) 204 for j := 0; j < vectorOfStrongReferrablesLength; j++ { 205 vectorOfStrongReferrablesOffsets[j] = t.VectorOfStrongReferrables[j].Pack(builder) 206 } 207 MonsterStartVectorOfStrongReferrablesVector(builder, vectorOfStrongReferrablesLength) 208 for j := vectorOfStrongReferrablesLength - 1; j >= 0; j-- { 209 builder.PrependUOffsetT(vectorOfStrongReferrablesOffsets[j]) 210 } 211 vectorOfStrongReferrablesOffset = builder.EndVector(vectorOfStrongReferrablesLength) 212 } 213 vectorOfCoOwningReferencesOffset := flatbuffers.UOffsetT(0) 214 if t.VectorOfCoOwningReferences != nil { 215 vectorOfCoOwningReferencesLength := len(t.VectorOfCoOwningReferences) 216 MonsterStartVectorOfCoOwningReferencesVector(builder, vectorOfCoOwningReferencesLength) 217 for j := vectorOfCoOwningReferencesLength - 1; j >= 0; j-- { 218 builder.PrependUint64(t.VectorOfCoOwningReferences[j]) 219 } 220 vectorOfCoOwningReferencesOffset = builder.EndVector(vectorOfCoOwningReferencesLength) 221 } 222 vectorOfNonOwningReferencesOffset := flatbuffers.UOffsetT(0) 223 if t.VectorOfNonOwningReferences != nil { 224 vectorOfNonOwningReferencesLength := len(t.VectorOfNonOwningReferences) 225 MonsterStartVectorOfNonOwningReferencesVector(builder, vectorOfNonOwningReferencesLength) 226 for j := vectorOfNonOwningReferencesLength - 1; j >= 0; j-- { 227 builder.PrependUint64(t.VectorOfNonOwningReferences[j]) 228 } 229 vectorOfNonOwningReferencesOffset = builder.EndVector(vectorOfNonOwningReferencesLength) 230 } 231 anyUniqueOffset := t.AnyUnique.Pack(builder) 232 233 anyAmbiguousOffset := t.AnyAmbiguous.Pack(builder) 234 235 vectorOfEnumsOffset := flatbuffers.UOffsetT(0) 236 if t.VectorOfEnums != nil { 237 vectorOfEnumsLength := len(t.VectorOfEnums) 238 MonsterStartVectorOfEnumsVector(builder, vectorOfEnumsLength) 239 for j := vectorOfEnumsLength - 1; j >= 0; j-- { 240 builder.PrependByte(byte(t.VectorOfEnums[j])) 241 } 242 vectorOfEnumsOffset = builder.EndVector(vectorOfEnumsLength) 243 } 244 testrequirednestedflatbufferOffset := flatbuffers.UOffsetT(0) 245 if t.Testrequirednestedflatbuffer != nil { 246 testrequirednestedflatbufferOffset = builder.CreateByteString(t.Testrequirednestedflatbuffer) 247 } 248 scalarKeySortedTablesOffset := flatbuffers.UOffsetT(0) 249 if t.ScalarKeySortedTables != nil { 250 scalarKeySortedTablesLength := len(t.ScalarKeySortedTables) 251 scalarKeySortedTablesOffsets := make([]flatbuffers.UOffsetT, scalarKeySortedTablesLength) 252 for j := 0; j < scalarKeySortedTablesLength; j++ { 253 scalarKeySortedTablesOffsets[j] = t.ScalarKeySortedTables[j].Pack(builder) 254 } 255 MonsterStartScalarKeySortedTablesVector(builder, scalarKeySortedTablesLength) 256 for j := scalarKeySortedTablesLength - 1; j >= 0; j-- { 257 builder.PrependUOffsetT(scalarKeySortedTablesOffsets[j]) 258 } 259 scalarKeySortedTablesOffset = builder.EndVector(scalarKeySortedTablesLength) 260 } 261 MonsterStart(builder) 262 posOffset := t.Pos.Pack(builder) 263 MonsterAddPos(builder, posOffset) 264 MonsterAddMana(builder, t.Mana) 265 MonsterAddHp(builder, t.Hp) 266 MonsterAddName(builder, nameOffset) 267 MonsterAddInventory(builder, inventoryOffset) 268 MonsterAddColor(builder, t.Color) 269 if t.Test != nil { 270 MonsterAddTestType(builder, t.Test.Type) 271 } 272 MonsterAddTest(builder, testOffset) 273 MonsterAddTest4(builder, test4Offset) 274 MonsterAddTestarrayofstring(builder, testarrayofstringOffset) 275 MonsterAddTestarrayoftables(builder, testarrayoftablesOffset) 276 MonsterAddEnemy(builder, enemyOffset) 277 MonsterAddTestnestedflatbuffer(builder, testnestedflatbufferOffset) 278 MonsterAddTestempty(builder, testemptyOffset) 279 MonsterAddTestbool(builder, t.Testbool) 280 MonsterAddTesthashs32Fnv1(builder, t.Testhashs32Fnv1) 281 MonsterAddTesthashu32Fnv1(builder, t.Testhashu32Fnv1) 282 MonsterAddTesthashs64Fnv1(builder, t.Testhashs64Fnv1) 283 MonsterAddTesthashu64Fnv1(builder, t.Testhashu64Fnv1) 284 MonsterAddTesthashs32Fnv1a(builder, t.Testhashs32Fnv1a) 285 MonsterAddTesthashu32Fnv1a(builder, t.Testhashu32Fnv1a) 286 MonsterAddTesthashs64Fnv1a(builder, t.Testhashs64Fnv1a) 287 MonsterAddTesthashu64Fnv1a(builder, t.Testhashu64Fnv1a) 288 MonsterAddTestarrayofbools(builder, testarrayofboolsOffset) 289 MonsterAddTestf(builder, t.Testf) 290 MonsterAddTestf2(builder, t.Testf2) 291 MonsterAddTestf3(builder, t.Testf3) 292 MonsterAddTestarrayofstring2(builder, testarrayofstring2Offset) 293 MonsterAddTestarrayofsortedstruct(builder, testarrayofsortedstructOffset) 294 MonsterAddFlex(builder, flexOffset) 295 MonsterAddTest5(builder, test5Offset) 296 MonsterAddVectorOfLongs(builder, vectorOfLongsOffset) 297 MonsterAddVectorOfDoubles(builder, vectorOfDoublesOffset) 298 MonsterAddParentNamespaceTest(builder, parentNamespaceTestOffset) 299 MonsterAddVectorOfReferrables(builder, vectorOfReferrablesOffset) 300 MonsterAddSingleWeakReference(builder, t.SingleWeakReference) 301 MonsterAddVectorOfWeakReferences(builder, vectorOfWeakReferencesOffset) 302 MonsterAddVectorOfStrongReferrables(builder, vectorOfStrongReferrablesOffset) 303 MonsterAddCoOwningReference(builder, t.CoOwningReference) 304 MonsterAddVectorOfCoOwningReferences(builder, vectorOfCoOwningReferencesOffset) 305 MonsterAddNonOwningReference(builder, t.NonOwningReference) 306 MonsterAddVectorOfNonOwningReferences(builder, vectorOfNonOwningReferencesOffset) 307 if t.AnyUnique != nil { 308 MonsterAddAnyUniqueType(builder, t.AnyUnique.Type) 309 } 310 MonsterAddAnyUnique(builder, anyUniqueOffset) 311 if t.AnyAmbiguous != nil { 312 MonsterAddAnyAmbiguousType(builder, t.AnyAmbiguous.Type) 313 } 314 MonsterAddAnyAmbiguous(builder, anyAmbiguousOffset) 315 MonsterAddVectorOfEnums(builder, vectorOfEnumsOffset) 316 MonsterAddSignedEnum(builder, t.SignedEnum) 317 MonsterAddTestrequirednestedflatbuffer(builder, testrequirednestedflatbufferOffset) 318 MonsterAddScalarKeySortedTables(builder, scalarKeySortedTablesOffset) 319 nativeInlineOffset := t.NativeInline.Pack(builder) 320 MonsterAddNativeInline(builder, nativeInlineOffset) 321 MonsterAddLongEnumNonEnumDefault(builder, t.LongEnumNonEnumDefault) 322 MonsterAddLongEnumNormalDefault(builder, t.LongEnumNormalDefault) 323 return MonsterEnd(builder) 324} 325 326func (rcv *Monster) UnPackTo(t *MonsterT) { 327 t.Pos = rcv.Pos(nil).UnPack() 328 t.Mana = rcv.Mana() 329 t.Hp = rcv.Hp() 330 t.Name = string(rcv.Name()) 331 t.Inventory = rcv.InventoryBytes() 332 t.Color = rcv.Color() 333 testTable := flatbuffers.Table{} 334 if rcv.Test(&testTable) { 335 t.Test = rcv.TestType().UnPack(testTable) 336 } 337 test4Length := rcv.Test4Length() 338 t.Test4 = make([]*TestT, test4Length) 339 for j := 0; j < test4Length; j++ { 340 x := Test{} 341 rcv.Test4(&x, j) 342 t.Test4[j] = x.UnPack() 343 } 344 testarrayofstringLength := rcv.TestarrayofstringLength() 345 t.Testarrayofstring = make([]string, testarrayofstringLength) 346 for j := 0; j < testarrayofstringLength; j++ { 347 t.Testarrayofstring[j] = string(rcv.Testarrayofstring(j)) 348 } 349 testarrayoftablesLength := rcv.TestarrayoftablesLength() 350 t.Testarrayoftables = make([]*MonsterT, testarrayoftablesLength) 351 for j := 0; j < testarrayoftablesLength; j++ { 352 x := Monster{} 353 rcv.Testarrayoftables(&x, j) 354 t.Testarrayoftables[j] = x.UnPack() 355 } 356 t.Enemy = rcv.Enemy(nil).UnPack() 357 t.Testnestedflatbuffer = rcv.TestnestedflatbufferBytes() 358 t.Testempty = rcv.Testempty(nil).UnPack() 359 t.Testbool = rcv.Testbool() 360 t.Testhashs32Fnv1 = rcv.Testhashs32Fnv1() 361 t.Testhashu32Fnv1 = rcv.Testhashu32Fnv1() 362 t.Testhashs64Fnv1 = rcv.Testhashs64Fnv1() 363 t.Testhashu64Fnv1 = rcv.Testhashu64Fnv1() 364 t.Testhashs32Fnv1a = rcv.Testhashs32Fnv1a() 365 t.Testhashu32Fnv1a = rcv.Testhashu32Fnv1a() 366 t.Testhashs64Fnv1a = rcv.Testhashs64Fnv1a() 367 t.Testhashu64Fnv1a = rcv.Testhashu64Fnv1a() 368 testarrayofboolsLength := rcv.TestarrayofboolsLength() 369 t.Testarrayofbools = make([]bool, testarrayofboolsLength) 370 for j := 0; j < testarrayofboolsLength; j++ { 371 t.Testarrayofbools[j] = rcv.Testarrayofbools(j) 372 } 373 t.Testf = rcv.Testf() 374 t.Testf2 = rcv.Testf2() 375 t.Testf3 = rcv.Testf3() 376 testarrayofstring2Length := rcv.Testarrayofstring2Length() 377 t.Testarrayofstring2 = make([]string, testarrayofstring2Length) 378 for j := 0; j < testarrayofstring2Length; j++ { 379 t.Testarrayofstring2[j] = string(rcv.Testarrayofstring2(j)) 380 } 381 testarrayofsortedstructLength := rcv.TestarrayofsortedstructLength() 382 t.Testarrayofsortedstruct = make([]*AbilityT, testarrayofsortedstructLength) 383 for j := 0; j < testarrayofsortedstructLength; j++ { 384 x := Ability{} 385 rcv.Testarrayofsortedstruct(&x, j) 386 t.Testarrayofsortedstruct[j] = x.UnPack() 387 } 388 t.Flex = rcv.FlexBytes() 389 test5Length := rcv.Test5Length() 390 t.Test5 = make([]*TestT, test5Length) 391 for j := 0; j < test5Length; j++ { 392 x := Test{} 393 rcv.Test5(&x, j) 394 t.Test5[j] = x.UnPack() 395 } 396 vectorOfLongsLength := rcv.VectorOfLongsLength() 397 t.VectorOfLongs = make([]int64, vectorOfLongsLength) 398 for j := 0; j < vectorOfLongsLength; j++ { 399 t.VectorOfLongs[j] = rcv.VectorOfLongs(j) 400 } 401 vectorOfDoublesLength := rcv.VectorOfDoublesLength() 402 t.VectorOfDoubles = make([]float64, vectorOfDoublesLength) 403 for j := 0; j < vectorOfDoublesLength; j++ { 404 t.VectorOfDoubles[j] = rcv.VectorOfDoubles(j) 405 } 406 t.ParentNamespaceTest = rcv.ParentNamespaceTest(nil).UnPack() 407 vectorOfReferrablesLength := rcv.VectorOfReferrablesLength() 408 t.VectorOfReferrables = make([]*ReferrableT, vectorOfReferrablesLength) 409 for j := 0; j < vectorOfReferrablesLength; j++ { 410 x := Referrable{} 411 rcv.VectorOfReferrables(&x, j) 412 t.VectorOfReferrables[j] = x.UnPack() 413 } 414 t.SingleWeakReference = rcv.SingleWeakReference() 415 vectorOfWeakReferencesLength := rcv.VectorOfWeakReferencesLength() 416 t.VectorOfWeakReferences = make([]uint64, vectorOfWeakReferencesLength) 417 for j := 0; j < vectorOfWeakReferencesLength; j++ { 418 t.VectorOfWeakReferences[j] = rcv.VectorOfWeakReferences(j) 419 } 420 vectorOfStrongReferrablesLength := rcv.VectorOfStrongReferrablesLength() 421 t.VectorOfStrongReferrables = make([]*ReferrableT, vectorOfStrongReferrablesLength) 422 for j := 0; j < vectorOfStrongReferrablesLength; j++ { 423 x := Referrable{} 424 rcv.VectorOfStrongReferrables(&x, j) 425 t.VectorOfStrongReferrables[j] = x.UnPack() 426 } 427 t.CoOwningReference = rcv.CoOwningReference() 428 vectorOfCoOwningReferencesLength := rcv.VectorOfCoOwningReferencesLength() 429 t.VectorOfCoOwningReferences = make([]uint64, vectorOfCoOwningReferencesLength) 430 for j := 0; j < vectorOfCoOwningReferencesLength; j++ { 431 t.VectorOfCoOwningReferences[j] = rcv.VectorOfCoOwningReferences(j) 432 } 433 t.NonOwningReference = rcv.NonOwningReference() 434 vectorOfNonOwningReferencesLength := rcv.VectorOfNonOwningReferencesLength() 435 t.VectorOfNonOwningReferences = make([]uint64, vectorOfNonOwningReferencesLength) 436 for j := 0; j < vectorOfNonOwningReferencesLength; j++ { 437 t.VectorOfNonOwningReferences[j] = rcv.VectorOfNonOwningReferences(j) 438 } 439 anyUniqueTable := flatbuffers.Table{} 440 if rcv.AnyUnique(&anyUniqueTable) { 441 t.AnyUnique = rcv.AnyUniqueType().UnPack(anyUniqueTable) 442 } 443 anyAmbiguousTable := flatbuffers.Table{} 444 if rcv.AnyAmbiguous(&anyAmbiguousTable) { 445 t.AnyAmbiguous = rcv.AnyAmbiguousType().UnPack(anyAmbiguousTable) 446 } 447 vectorOfEnumsLength := rcv.VectorOfEnumsLength() 448 t.VectorOfEnums = make([]Color, vectorOfEnumsLength) 449 for j := 0; j < vectorOfEnumsLength; j++ { 450 t.VectorOfEnums[j] = rcv.VectorOfEnums(j) 451 } 452 t.SignedEnum = rcv.SignedEnum() 453 t.Testrequirednestedflatbuffer = rcv.TestrequirednestedflatbufferBytes() 454 scalarKeySortedTablesLength := rcv.ScalarKeySortedTablesLength() 455 t.ScalarKeySortedTables = make([]*StatT, scalarKeySortedTablesLength) 456 for j := 0; j < scalarKeySortedTablesLength; j++ { 457 x := Stat{} 458 rcv.ScalarKeySortedTables(&x, j) 459 t.ScalarKeySortedTables[j] = x.UnPack() 460 } 461 t.NativeInline = rcv.NativeInline(nil).UnPack() 462 t.LongEnumNonEnumDefault = rcv.LongEnumNonEnumDefault() 463 t.LongEnumNormalDefault = rcv.LongEnumNormalDefault() 464} 465 466func (rcv *Monster) UnPack() *MonsterT { 467 if rcv == nil { return nil } 468 t := &MonsterT{} 469 rcv.UnPackTo(t) 470 return t 471} 472 473type Monster struct { 474 _tab flatbuffers.Table 475} 476 477func GetRootAsMonster(buf []byte, offset flatbuffers.UOffsetT) *Monster { 478 n := flatbuffers.GetUOffsetT(buf[offset:]) 479 x := &Monster{} 480 x.Init(buf, n+offset) 481 return x 482} 483 484func GetSizePrefixedRootAsMonster(buf []byte, offset flatbuffers.UOffsetT) *Monster { 485 n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:]) 486 x := &Monster{} 487 x.Init(buf, n+offset+flatbuffers.SizeUint32) 488 return x 489} 490 491func (rcv *Monster) Init(buf []byte, i flatbuffers.UOffsetT) { 492 rcv._tab.Bytes = buf 493 rcv._tab.Pos = i 494} 495 496func (rcv *Monster) Table() flatbuffers.Table { 497 return rcv._tab 498} 499 500func (rcv *Monster) Pos(obj *Vec3) *Vec3 { 501 o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) 502 if o != 0 { 503 x := o + rcv._tab.Pos 504 if obj == nil { 505 obj = new(Vec3) 506 } 507 obj.Init(rcv._tab.Bytes, x) 508 return obj 509 } 510 return nil 511} 512 513func (rcv *Monster) Mana() int16 { 514 o := flatbuffers.UOffsetT(rcv._tab.Offset(6)) 515 if o != 0 { 516 return rcv._tab.GetInt16(o + rcv._tab.Pos) 517 } 518 return 150 519} 520 521func (rcv *Monster) MutateMana(n int16) bool { 522 return rcv._tab.MutateInt16Slot(6, n) 523} 524 525func (rcv *Monster) Hp() int16 { 526 o := flatbuffers.UOffsetT(rcv._tab.Offset(8)) 527 if o != 0 { 528 return rcv._tab.GetInt16(o + rcv._tab.Pos) 529 } 530 return 100 531} 532 533func (rcv *Monster) MutateHp(n int16) bool { 534 return rcv._tab.MutateInt16Slot(8, n) 535} 536 537func (rcv *Monster) Name() []byte { 538 o := flatbuffers.UOffsetT(rcv._tab.Offset(10)) 539 if o != 0 { 540 return rcv._tab.ByteVector(o + rcv._tab.Pos) 541 } 542 return nil 543} 544 545func (rcv *Monster) Inventory(j int) byte { 546 o := flatbuffers.UOffsetT(rcv._tab.Offset(14)) 547 if o != 0 { 548 a := rcv._tab.Vector(o) 549 return rcv._tab.GetByte(a + flatbuffers.UOffsetT(j*1)) 550 } 551 return 0 552} 553 554func (rcv *Monster) InventoryLength() int { 555 o := flatbuffers.UOffsetT(rcv._tab.Offset(14)) 556 if o != 0 { 557 return rcv._tab.VectorLen(o) 558 } 559 return 0 560} 561 562func (rcv *Monster) InventoryBytes() []byte { 563 o := flatbuffers.UOffsetT(rcv._tab.Offset(14)) 564 if o != 0 { 565 return rcv._tab.ByteVector(o + rcv._tab.Pos) 566 } 567 return nil 568} 569 570func (rcv *Monster) MutateInventory(j int, n byte) bool { 571 o := flatbuffers.UOffsetT(rcv._tab.Offset(14)) 572 if o != 0 { 573 a := rcv._tab.Vector(o) 574 return rcv._tab.MutateByte(a+flatbuffers.UOffsetT(j*1), n) 575 } 576 return false 577} 578 579func (rcv *Monster) Color() Color { 580 o := flatbuffers.UOffsetT(rcv._tab.Offset(16)) 581 if o != 0 { 582 return Color(rcv._tab.GetByte(o + rcv._tab.Pos)) 583 } 584 return 8 585} 586 587func (rcv *Monster) MutateColor(n Color) bool { 588 return rcv._tab.MutateByteSlot(16, byte(n)) 589} 590 591func (rcv *Monster) TestType() Any { 592 o := flatbuffers.UOffsetT(rcv._tab.Offset(18)) 593 if o != 0 { 594 return Any(rcv._tab.GetByte(o + rcv._tab.Pos)) 595 } 596 return 0 597} 598 599func (rcv *Monster) MutateTestType(n Any) bool { 600 return rcv._tab.MutateByteSlot(18, byte(n)) 601} 602 603func (rcv *Monster) Test(obj *flatbuffers.Table) bool { 604 o := flatbuffers.UOffsetT(rcv._tab.Offset(20)) 605 if o != 0 { 606 rcv._tab.Union(obj, o) 607 return true 608 } 609 return false 610} 611 612func (rcv *Monster) Test4(obj *Test, j int) bool { 613 o := flatbuffers.UOffsetT(rcv._tab.Offset(22)) 614 if o != 0 { 615 x := rcv._tab.Vector(o) 616 x += flatbuffers.UOffsetT(j) * 4 617 obj.Init(rcv._tab.Bytes, x) 618 return true 619 } 620 return false 621} 622 623func (rcv *Monster) Test4Length() int { 624 o := flatbuffers.UOffsetT(rcv._tab.Offset(22)) 625 if o != 0 { 626 return rcv._tab.VectorLen(o) 627 } 628 return 0 629} 630 631func (rcv *Monster) Testarrayofstring(j int) []byte { 632 o := flatbuffers.UOffsetT(rcv._tab.Offset(24)) 633 if o != 0 { 634 a := rcv._tab.Vector(o) 635 return rcv._tab.ByteVector(a + flatbuffers.UOffsetT(j*4)) 636 } 637 return nil 638} 639 640func (rcv *Monster) TestarrayofstringLength() int { 641 o := flatbuffers.UOffsetT(rcv._tab.Offset(24)) 642 if o != 0 { 643 return rcv._tab.VectorLen(o) 644 } 645 return 0 646} 647 648/// an example documentation comment: this will end up in the generated code 649/// multiline too 650func (rcv *Monster) Testarrayoftables(obj *Monster, j int) bool { 651 o := flatbuffers.UOffsetT(rcv._tab.Offset(26)) 652 if o != 0 { 653 x := rcv._tab.Vector(o) 654 x += flatbuffers.UOffsetT(j) * 4 655 x = rcv._tab.Indirect(x) 656 obj.Init(rcv._tab.Bytes, x) 657 return true 658 } 659 return false 660} 661 662func (rcv *Monster) TestarrayoftablesLength() int { 663 o := flatbuffers.UOffsetT(rcv._tab.Offset(26)) 664 if o != 0 { 665 return rcv._tab.VectorLen(o) 666 } 667 return 0 668} 669 670/// an example documentation comment: this will end up in the generated code 671/// multiline too 672func (rcv *Monster) Enemy(obj *Monster) *Monster { 673 o := flatbuffers.UOffsetT(rcv._tab.Offset(28)) 674 if o != 0 { 675 x := rcv._tab.Indirect(o + rcv._tab.Pos) 676 if obj == nil { 677 obj = new(Monster) 678 } 679 obj.Init(rcv._tab.Bytes, x) 680 return obj 681 } 682 return nil 683} 684 685func (rcv *Monster) Testnestedflatbuffer(j int) byte { 686 o := flatbuffers.UOffsetT(rcv._tab.Offset(30)) 687 if o != 0 { 688 a := rcv._tab.Vector(o) 689 return rcv._tab.GetByte(a + flatbuffers.UOffsetT(j*1)) 690 } 691 return 0 692} 693 694func (rcv *Monster) TestnestedflatbufferLength() int { 695 o := flatbuffers.UOffsetT(rcv._tab.Offset(30)) 696 if o != 0 { 697 return rcv._tab.VectorLen(o) 698 } 699 return 0 700} 701 702func (rcv *Monster) TestnestedflatbufferBytes() []byte { 703 o := flatbuffers.UOffsetT(rcv._tab.Offset(30)) 704 if o != 0 { 705 return rcv._tab.ByteVector(o + rcv._tab.Pos) 706 } 707 return nil 708} 709 710func (rcv *Monster) MutateTestnestedflatbuffer(j int, n byte) bool { 711 o := flatbuffers.UOffsetT(rcv._tab.Offset(30)) 712 if o != 0 { 713 a := rcv._tab.Vector(o) 714 return rcv._tab.MutateByte(a+flatbuffers.UOffsetT(j*1), n) 715 } 716 return false 717} 718 719func (rcv *Monster) Testempty(obj *Stat) *Stat { 720 o := flatbuffers.UOffsetT(rcv._tab.Offset(32)) 721 if o != 0 { 722 x := rcv._tab.Indirect(o + rcv._tab.Pos) 723 if obj == nil { 724 obj = new(Stat) 725 } 726 obj.Init(rcv._tab.Bytes, x) 727 return obj 728 } 729 return nil 730} 731 732func (rcv *Monster) Testbool() bool { 733 o := flatbuffers.UOffsetT(rcv._tab.Offset(34)) 734 if o != 0 { 735 return rcv._tab.GetBool(o + rcv._tab.Pos) 736 } 737 return false 738} 739 740func (rcv *Monster) MutateTestbool(n bool) bool { 741 return rcv._tab.MutateBoolSlot(34, n) 742} 743 744func (rcv *Monster) Testhashs32Fnv1() int32 { 745 o := flatbuffers.UOffsetT(rcv._tab.Offset(36)) 746 if o != 0 { 747 return rcv._tab.GetInt32(o + rcv._tab.Pos) 748 } 749 return 0 750} 751 752func (rcv *Monster) MutateTesthashs32Fnv1(n int32) bool { 753 return rcv._tab.MutateInt32Slot(36, n) 754} 755 756func (rcv *Monster) Testhashu32Fnv1() uint32 { 757 o := flatbuffers.UOffsetT(rcv._tab.Offset(38)) 758 if o != 0 { 759 return rcv._tab.GetUint32(o + rcv._tab.Pos) 760 } 761 return 0 762} 763 764func (rcv *Monster) MutateTesthashu32Fnv1(n uint32) bool { 765 return rcv._tab.MutateUint32Slot(38, n) 766} 767 768func (rcv *Monster) Testhashs64Fnv1() int64 { 769 o := flatbuffers.UOffsetT(rcv._tab.Offset(40)) 770 if o != 0 { 771 return rcv._tab.GetInt64(o + rcv._tab.Pos) 772 } 773 return 0 774} 775 776func (rcv *Monster) MutateTesthashs64Fnv1(n int64) bool { 777 return rcv._tab.MutateInt64Slot(40, n) 778} 779 780func (rcv *Monster) Testhashu64Fnv1() uint64 { 781 o := flatbuffers.UOffsetT(rcv._tab.Offset(42)) 782 if o != 0 { 783 return rcv._tab.GetUint64(o + rcv._tab.Pos) 784 } 785 return 0 786} 787 788func (rcv *Monster) MutateTesthashu64Fnv1(n uint64) bool { 789 return rcv._tab.MutateUint64Slot(42, n) 790} 791 792func (rcv *Monster) Testhashs32Fnv1a() int32 { 793 o := flatbuffers.UOffsetT(rcv._tab.Offset(44)) 794 if o != 0 { 795 return rcv._tab.GetInt32(o + rcv._tab.Pos) 796 } 797 return 0 798} 799 800func (rcv *Monster) MutateTesthashs32Fnv1a(n int32) bool { 801 return rcv._tab.MutateInt32Slot(44, n) 802} 803 804func (rcv *Monster) Testhashu32Fnv1a() uint32 { 805 o := flatbuffers.UOffsetT(rcv._tab.Offset(46)) 806 if o != 0 { 807 return rcv._tab.GetUint32(o + rcv._tab.Pos) 808 } 809 return 0 810} 811 812func (rcv *Monster) MutateTesthashu32Fnv1a(n uint32) bool { 813 return rcv._tab.MutateUint32Slot(46, n) 814} 815 816func (rcv *Monster) Testhashs64Fnv1a() int64 { 817 o := flatbuffers.UOffsetT(rcv._tab.Offset(48)) 818 if o != 0 { 819 return rcv._tab.GetInt64(o + rcv._tab.Pos) 820 } 821 return 0 822} 823 824func (rcv *Monster) MutateTesthashs64Fnv1a(n int64) bool { 825 return rcv._tab.MutateInt64Slot(48, n) 826} 827 828func (rcv *Monster) Testhashu64Fnv1a() uint64 { 829 o := flatbuffers.UOffsetT(rcv._tab.Offset(50)) 830 if o != 0 { 831 return rcv._tab.GetUint64(o + rcv._tab.Pos) 832 } 833 return 0 834} 835 836func (rcv *Monster) MutateTesthashu64Fnv1a(n uint64) bool { 837 return rcv._tab.MutateUint64Slot(50, n) 838} 839 840func (rcv *Monster) Testarrayofbools(j int) bool { 841 o := flatbuffers.UOffsetT(rcv._tab.Offset(52)) 842 if o != 0 { 843 a := rcv._tab.Vector(o) 844 return rcv._tab.GetBool(a + flatbuffers.UOffsetT(j*1)) 845 } 846 return false 847} 848 849func (rcv *Monster) TestarrayofboolsLength() int { 850 o := flatbuffers.UOffsetT(rcv._tab.Offset(52)) 851 if o != 0 { 852 return rcv._tab.VectorLen(o) 853 } 854 return 0 855} 856 857func (rcv *Monster) MutateTestarrayofbools(j int, n bool) bool { 858 o := flatbuffers.UOffsetT(rcv._tab.Offset(52)) 859 if o != 0 { 860 a := rcv._tab.Vector(o) 861 return rcv._tab.MutateBool(a+flatbuffers.UOffsetT(j*1), n) 862 } 863 return false 864} 865 866func (rcv *Monster) Testf() float32 { 867 o := flatbuffers.UOffsetT(rcv._tab.Offset(54)) 868 if o != 0 { 869 return rcv._tab.GetFloat32(o + rcv._tab.Pos) 870 } 871 return 3.14159 872} 873 874func (rcv *Monster) MutateTestf(n float32) bool { 875 return rcv._tab.MutateFloat32Slot(54, n) 876} 877 878func (rcv *Monster) Testf2() float32 { 879 o := flatbuffers.UOffsetT(rcv._tab.Offset(56)) 880 if o != 0 { 881 return rcv._tab.GetFloat32(o + rcv._tab.Pos) 882 } 883 return 3.0 884} 885 886func (rcv *Monster) MutateTestf2(n float32) bool { 887 return rcv._tab.MutateFloat32Slot(56, n) 888} 889 890func (rcv *Monster) Testf3() float32 { 891 o := flatbuffers.UOffsetT(rcv._tab.Offset(58)) 892 if o != 0 { 893 return rcv._tab.GetFloat32(o + rcv._tab.Pos) 894 } 895 return 0.0 896} 897 898func (rcv *Monster) MutateTestf3(n float32) bool { 899 return rcv._tab.MutateFloat32Slot(58, n) 900} 901 902func (rcv *Monster) Testarrayofstring2(j int) []byte { 903 o := flatbuffers.UOffsetT(rcv._tab.Offset(60)) 904 if o != 0 { 905 a := rcv._tab.Vector(o) 906 return rcv._tab.ByteVector(a + flatbuffers.UOffsetT(j*4)) 907 } 908 return nil 909} 910 911func (rcv *Monster) Testarrayofstring2Length() int { 912 o := flatbuffers.UOffsetT(rcv._tab.Offset(60)) 913 if o != 0 { 914 return rcv._tab.VectorLen(o) 915 } 916 return 0 917} 918 919func (rcv *Monster) Testarrayofsortedstruct(obj *Ability, j int) bool { 920 o := flatbuffers.UOffsetT(rcv._tab.Offset(62)) 921 if o != 0 { 922 x := rcv._tab.Vector(o) 923 x += flatbuffers.UOffsetT(j) * 8 924 obj.Init(rcv._tab.Bytes, x) 925 return true 926 } 927 return false 928} 929 930func (rcv *Monster) TestarrayofsortedstructLength() int { 931 o := flatbuffers.UOffsetT(rcv._tab.Offset(62)) 932 if o != 0 { 933 return rcv._tab.VectorLen(o) 934 } 935 return 0 936} 937 938func (rcv *Monster) Flex(j int) byte { 939 o := flatbuffers.UOffsetT(rcv._tab.Offset(64)) 940 if o != 0 { 941 a := rcv._tab.Vector(o) 942 return rcv._tab.GetByte(a + flatbuffers.UOffsetT(j*1)) 943 } 944 return 0 945} 946 947func (rcv *Monster) FlexLength() int { 948 o := flatbuffers.UOffsetT(rcv._tab.Offset(64)) 949 if o != 0 { 950 return rcv._tab.VectorLen(o) 951 } 952 return 0 953} 954 955func (rcv *Monster) FlexBytes() []byte { 956 o := flatbuffers.UOffsetT(rcv._tab.Offset(64)) 957 if o != 0 { 958 return rcv._tab.ByteVector(o + rcv._tab.Pos) 959 } 960 return nil 961} 962 963func (rcv *Monster) MutateFlex(j int, n byte) bool { 964 o := flatbuffers.UOffsetT(rcv._tab.Offset(64)) 965 if o != 0 { 966 a := rcv._tab.Vector(o) 967 return rcv._tab.MutateByte(a+flatbuffers.UOffsetT(j*1), n) 968 } 969 return false 970} 971 972func (rcv *Monster) Test5(obj *Test, j int) bool { 973 o := flatbuffers.UOffsetT(rcv._tab.Offset(66)) 974 if o != 0 { 975 x := rcv._tab.Vector(o) 976 x += flatbuffers.UOffsetT(j) * 4 977 obj.Init(rcv._tab.Bytes, x) 978 return true 979 } 980 return false 981} 982 983func (rcv *Monster) Test5Length() int { 984 o := flatbuffers.UOffsetT(rcv._tab.Offset(66)) 985 if o != 0 { 986 return rcv._tab.VectorLen(o) 987 } 988 return 0 989} 990 991func (rcv *Monster) VectorOfLongs(j int) int64 { 992 o := flatbuffers.UOffsetT(rcv._tab.Offset(68)) 993 if o != 0 { 994 a := rcv._tab.Vector(o) 995 return rcv._tab.GetInt64(a + flatbuffers.UOffsetT(j*8)) 996 } 997 return 0 998} 999 1000func (rcv *Monster) VectorOfLongsLength() int { 1001 o := flatbuffers.UOffsetT(rcv._tab.Offset(68)) 1002 if o != 0 { 1003 return rcv._tab.VectorLen(o) 1004 } 1005 return 0 1006} 1007 1008func (rcv *Monster) MutateVectorOfLongs(j int, n int64) bool { 1009 o := flatbuffers.UOffsetT(rcv._tab.Offset(68)) 1010 if o != 0 { 1011 a := rcv._tab.Vector(o) 1012 return rcv._tab.MutateInt64(a+flatbuffers.UOffsetT(j*8), n) 1013 } 1014 return false 1015} 1016 1017func (rcv *Monster) VectorOfDoubles(j int) float64 { 1018 o := flatbuffers.UOffsetT(rcv._tab.Offset(70)) 1019 if o != 0 { 1020 a := rcv._tab.Vector(o) 1021 return rcv._tab.GetFloat64(a + flatbuffers.UOffsetT(j*8)) 1022 } 1023 return 0 1024} 1025 1026func (rcv *Monster) VectorOfDoublesLength() int { 1027 o := flatbuffers.UOffsetT(rcv._tab.Offset(70)) 1028 if o != 0 { 1029 return rcv._tab.VectorLen(o) 1030 } 1031 return 0 1032} 1033 1034func (rcv *Monster) MutateVectorOfDoubles(j int, n float64) bool { 1035 o := flatbuffers.UOffsetT(rcv._tab.Offset(70)) 1036 if o != 0 { 1037 a := rcv._tab.Vector(o) 1038 return rcv._tab.MutateFloat64(a+flatbuffers.UOffsetT(j*8), n) 1039 } 1040 return false 1041} 1042 1043func (rcv *Monster) ParentNamespaceTest(obj *MyGame.InParentNamespace) *MyGame.InParentNamespace { 1044 o := flatbuffers.UOffsetT(rcv._tab.Offset(72)) 1045 if o != 0 { 1046 x := rcv._tab.Indirect(o + rcv._tab.Pos) 1047 if obj == nil { 1048 obj = new(MyGame.InParentNamespace) 1049 } 1050 obj.Init(rcv._tab.Bytes, x) 1051 return obj 1052 } 1053 return nil 1054} 1055 1056func (rcv *Monster) VectorOfReferrables(obj *Referrable, j int) bool { 1057 o := flatbuffers.UOffsetT(rcv._tab.Offset(74)) 1058 if o != 0 { 1059 x := rcv._tab.Vector(o) 1060 x += flatbuffers.UOffsetT(j) * 4 1061 x = rcv._tab.Indirect(x) 1062 obj.Init(rcv._tab.Bytes, x) 1063 return true 1064 } 1065 return false 1066} 1067 1068func (rcv *Monster) VectorOfReferrablesLength() int { 1069 o := flatbuffers.UOffsetT(rcv._tab.Offset(74)) 1070 if o != 0 { 1071 return rcv._tab.VectorLen(o) 1072 } 1073 return 0 1074} 1075 1076func (rcv *Monster) SingleWeakReference() uint64 { 1077 o := flatbuffers.UOffsetT(rcv._tab.Offset(76)) 1078 if o != 0 { 1079 return rcv._tab.GetUint64(o + rcv._tab.Pos) 1080 } 1081 return 0 1082} 1083 1084func (rcv *Monster) MutateSingleWeakReference(n uint64) bool { 1085 return rcv._tab.MutateUint64Slot(76, n) 1086} 1087 1088func (rcv *Monster) VectorOfWeakReferences(j int) uint64 { 1089 o := flatbuffers.UOffsetT(rcv._tab.Offset(78)) 1090 if o != 0 { 1091 a := rcv._tab.Vector(o) 1092 return rcv._tab.GetUint64(a + flatbuffers.UOffsetT(j*8)) 1093 } 1094 return 0 1095} 1096 1097func (rcv *Monster) VectorOfWeakReferencesLength() int { 1098 o := flatbuffers.UOffsetT(rcv._tab.Offset(78)) 1099 if o != 0 { 1100 return rcv._tab.VectorLen(o) 1101 } 1102 return 0 1103} 1104 1105func (rcv *Monster) MutateVectorOfWeakReferences(j int, n uint64) bool { 1106 o := flatbuffers.UOffsetT(rcv._tab.Offset(78)) 1107 if o != 0 { 1108 a := rcv._tab.Vector(o) 1109 return rcv._tab.MutateUint64(a+flatbuffers.UOffsetT(j*8), n) 1110 } 1111 return false 1112} 1113 1114func (rcv *Monster) VectorOfStrongReferrables(obj *Referrable, j int) bool { 1115 o := flatbuffers.UOffsetT(rcv._tab.Offset(80)) 1116 if o != 0 { 1117 x := rcv._tab.Vector(o) 1118 x += flatbuffers.UOffsetT(j) * 4 1119 x = rcv._tab.Indirect(x) 1120 obj.Init(rcv._tab.Bytes, x) 1121 return true 1122 } 1123 return false 1124} 1125 1126func (rcv *Monster) VectorOfStrongReferrablesLength() int { 1127 o := flatbuffers.UOffsetT(rcv._tab.Offset(80)) 1128 if o != 0 { 1129 return rcv._tab.VectorLen(o) 1130 } 1131 return 0 1132} 1133 1134func (rcv *Monster) CoOwningReference() uint64 { 1135 o := flatbuffers.UOffsetT(rcv._tab.Offset(82)) 1136 if o != 0 { 1137 return rcv._tab.GetUint64(o + rcv._tab.Pos) 1138 } 1139 return 0 1140} 1141 1142func (rcv *Monster) MutateCoOwningReference(n uint64) bool { 1143 return rcv._tab.MutateUint64Slot(82, n) 1144} 1145 1146func (rcv *Monster) VectorOfCoOwningReferences(j int) uint64 { 1147 o := flatbuffers.UOffsetT(rcv._tab.Offset(84)) 1148 if o != 0 { 1149 a := rcv._tab.Vector(o) 1150 return rcv._tab.GetUint64(a + flatbuffers.UOffsetT(j*8)) 1151 } 1152 return 0 1153} 1154 1155func (rcv *Monster) VectorOfCoOwningReferencesLength() int { 1156 o := flatbuffers.UOffsetT(rcv._tab.Offset(84)) 1157 if o != 0 { 1158 return rcv._tab.VectorLen(o) 1159 } 1160 return 0 1161} 1162 1163func (rcv *Monster) MutateVectorOfCoOwningReferences(j int, n uint64) bool { 1164 o := flatbuffers.UOffsetT(rcv._tab.Offset(84)) 1165 if o != 0 { 1166 a := rcv._tab.Vector(o) 1167 return rcv._tab.MutateUint64(a+flatbuffers.UOffsetT(j*8), n) 1168 } 1169 return false 1170} 1171 1172func (rcv *Monster) NonOwningReference() uint64 { 1173 o := flatbuffers.UOffsetT(rcv._tab.Offset(86)) 1174 if o != 0 { 1175 return rcv._tab.GetUint64(o + rcv._tab.Pos) 1176 } 1177 return 0 1178} 1179 1180func (rcv *Monster) MutateNonOwningReference(n uint64) bool { 1181 return rcv._tab.MutateUint64Slot(86, n) 1182} 1183 1184func (rcv *Monster) VectorOfNonOwningReferences(j int) uint64 { 1185 o := flatbuffers.UOffsetT(rcv._tab.Offset(88)) 1186 if o != 0 { 1187 a := rcv._tab.Vector(o) 1188 return rcv._tab.GetUint64(a + flatbuffers.UOffsetT(j*8)) 1189 } 1190 return 0 1191} 1192 1193func (rcv *Monster) VectorOfNonOwningReferencesLength() int { 1194 o := flatbuffers.UOffsetT(rcv._tab.Offset(88)) 1195 if o != 0 { 1196 return rcv._tab.VectorLen(o) 1197 } 1198 return 0 1199} 1200 1201func (rcv *Monster) MutateVectorOfNonOwningReferences(j int, n uint64) bool { 1202 o := flatbuffers.UOffsetT(rcv._tab.Offset(88)) 1203 if o != 0 { 1204 a := rcv._tab.Vector(o) 1205 return rcv._tab.MutateUint64(a+flatbuffers.UOffsetT(j*8), n) 1206 } 1207 return false 1208} 1209 1210func (rcv *Monster) AnyUniqueType() AnyUniqueAliases { 1211 o := flatbuffers.UOffsetT(rcv._tab.Offset(90)) 1212 if o != 0 { 1213 return AnyUniqueAliases(rcv._tab.GetByte(o + rcv._tab.Pos)) 1214 } 1215 return 0 1216} 1217 1218func (rcv *Monster) MutateAnyUniqueType(n AnyUniqueAliases) bool { 1219 return rcv._tab.MutateByteSlot(90, byte(n)) 1220} 1221 1222func (rcv *Monster) AnyUnique(obj *flatbuffers.Table) bool { 1223 o := flatbuffers.UOffsetT(rcv._tab.Offset(92)) 1224 if o != 0 { 1225 rcv._tab.Union(obj, o) 1226 return true 1227 } 1228 return false 1229} 1230 1231func (rcv *Monster) AnyAmbiguousType() AnyAmbiguousAliases { 1232 o := flatbuffers.UOffsetT(rcv._tab.Offset(94)) 1233 if o != 0 { 1234 return AnyAmbiguousAliases(rcv._tab.GetByte(o + rcv._tab.Pos)) 1235 } 1236 return 0 1237} 1238 1239func (rcv *Monster) MutateAnyAmbiguousType(n AnyAmbiguousAliases) bool { 1240 return rcv._tab.MutateByteSlot(94, byte(n)) 1241} 1242 1243func (rcv *Monster) AnyAmbiguous(obj *flatbuffers.Table) bool { 1244 o := flatbuffers.UOffsetT(rcv._tab.Offset(96)) 1245 if o != 0 { 1246 rcv._tab.Union(obj, o) 1247 return true 1248 } 1249 return false 1250} 1251 1252func (rcv *Monster) VectorOfEnums(j int) Color { 1253 o := flatbuffers.UOffsetT(rcv._tab.Offset(98)) 1254 if o != 0 { 1255 a := rcv._tab.Vector(o) 1256 return Color(rcv._tab.GetByte(a + flatbuffers.UOffsetT(j*1))) 1257 } 1258 return 0 1259} 1260 1261func (rcv *Monster) VectorOfEnumsLength() int { 1262 o := flatbuffers.UOffsetT(rcv._tab.Offset(98)) 1263 if o != 0 { 1264 return rcv._tab.VectorLen(o) 1265 } 1266 return 0 1267} 1268 1269func (rcv *Monster) VectorOfEnumsBytes() []byte { 1270 o := flatbuffers.UOffsetT(rcv._tab.Offset(98)) 1271 if o != 0 { 1272 return rcv._tab.ByteVector(o + rcv._tab.Pos) 1273 } 1274 return nil 1275} 1276 1277func (rcv *Monster) MutateVectorOfEnums(j int, n Color) bool { 1278 o := flatbuffers.UOffsetT(rcv._tab.Offset(98)) 1279 if o != 0 { 1280 a := rcv._tab.Vector(o) 1281 return rcv._tab.MutateByte(a+flatbuffers.UOffsetT(j*1), byte(n)) 1282 } 1283 return false 1284} 1285 1286func (rcv *Monster) SignedEnum() Race { 1287 o := flatbuffers.UOffsetT(rcv._tab.Offset(100)) 1288 if o != 0 { 1289 return Race(rcv._tab.GetInt8(o + rcv._tab.Pos)) 1290 } 1291 return -1 1292} 1293 1294func (rcv *Monster) MutateSignedEnum(n Race) bool { 1295 return rcv._tab.MutateInt8Slot(100, int8(n)) 1296} 1297 1298func (rcv *Monster) Testrequirednestedflatbuffer(j int) byte { 1299 o := flatbuffers.UOffsetT(rcv._tab.Offset(102)) 1300 if o != 0 { 1301 a := rcv._tab.Vector(o) 1302 return rcv._tab.GetByte(a + flatbuffers.UOffsetT(j*1)) 1303 } 1304 return 0 1305} 1306 1307func (rcv *Monster) TestrequirednestedflatbufferLength() int { 1308 o := flatbuffers.UOffsetT(rcv._tab.Offset(102)) 1309 if o != 0 { 1310 return rcv._tab.VectorLen(o) 1311 } 1312 return 0 1313} 1314 1315func (rcv *Monster) TestrequirednestedflatbufferBytes() []byte { 1316 o := flatbuffers.UOffsetT(rcv._tab.Offset(102)) 1317 if o != 0 { 1318 return rcv._tab.ByteVector(o + rcv._tab.Pos) 1319 } 1320 return nil 1321} 1322 1323func (rcv *Monster) MutateTestrequirednestedflatbuffer(j int, n byte) bool { 1324 o := flatbuffers.UOffsetT(rcv._tab.Offset(102)) 1325 if o != 0 { 1326 a := rcv._tab.Vector(o) 1327 return rcv._tab.MutateByte(a+flatbuffers.UOffsetT(j*1), n) 1328 } 1329 return false 1330} 1331 1332func (rcv *Monster) ScalarKeySortedTables(obj *Stat, j int) bool { 1333 o := flatbuffers.UOffsetT(rcv._tab.Offset(104)) 1334 if o != 0 { 1335 x := rcv._tab.Vector(o) 1336 x += flatbuffers.UOffsetT(j) * 4 1337 x = rcv._tab.Indirect(x) 1338 obj.Init(rcv._tab.Bytes, x) 1339 return true 1340 } 1341 return false 1342} 1343 1344func (rcv *Monster) ScalarKeySortedTablesLength() int { 1345 o := flatbuffers.UOffsetT(rcv._tab.Offset(104)) 1346 if o != 0 { 1347 return rcv._tab.VectorLen(o) 1348 } 1349 return 0 1350} 1351 1352func (rcv *Monster) NativeInline(obj *Test) *Test { 1353 o := flatbuffers.UOffsetT(rcv._tab.Offset(106)) 1354 if o != 0 { 1355 x := o + rcv._tab.Pos 1356 if obj == nil { 1357 obj = new(Test) 1358 } 1359 obj.Init(rcv._tab.Bytes, x) 1360 return obj 1361 } 1362 return nil 1363} 1364 1365func (rcv *Monster) LongEnumNonEnumDefault() LongEnum { 1366 o := flatbuffers.UOffsetT(rcv._tab.Offset(108)) 1367 if o != 0 { 1368 return LongEnum(rcv._tab.GetUint64(o + rcv._tab.Pos)) 1369 } 1370 return 0 1371} 1372 1373func (rcv *Monster) MutateLongEnumNonEnumDefault(n LongEnum) bool { 1374 return rcv._tab.MutateUint64Slot(108, uint64(n)) 1375} 1376 1377func (rcv *Monster) LongEnumNormalDefault() LongEnum { 1378 o := flatbuffers.UOffsetT(rcv._tab.Offset(110)) 1379 if o != 0 { 1380 return LongEnum(rcv._tab.GetUint64(o + rcv._tab.Pos)) 1381 } 1382 return 2 1383} 1384 1385func (rcv *Monster) MutateLongEnumNormalDefault(n LongEnum) bool { 1386 return rcv._tab.MutateUint64Slot(110, uint64(n)) 1387} 1388 1389func MonsterStart(builder *flatbuffers.Builder) { 1390 builder.StartObject(54) 1391} 1392func MonsterAddPos(builder *flatbuffers.Builder, pos flatbuffers.UOffsetT) { 1393 builder.PrependStructSlot(0, flatbuffers.UOffsetT(pos), 0) 1394} 1395func MonsterAddMana(builder *flatbuffers.Builder, mana int16) { 1396 builder.PrependInt16Slot(1, mana, 150) 1397} 1398func MonsterAddHp(builder *flatbuffers.Builder, hp int16) { 1399 builder.PrependInt16Slot(2, hp, 100) 1400} 1401func MonsterAddName(builder *flatbuffers.Builder, name flatbuffers.UOffsetT) { 1402 builder.PrependUOffsetTSlot(3, flatbuffers.UOffsetT(name), 0) 1403} 1404func MonsterAddInventory(builder *flatbuffers.Builder, inventory flatbuffers.UOffsetT) { 1405 builder.PrependUOffsetTSlot(5, flatbuffers.UOffsetT(inventory), 0) 1406} 1407func MonsterStartInventoryVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT { 1408 return builder.StartVector(1, numElems, 1) 1409} 1410func MonsterAddColor(builder *flatbuffers.Builder, color Color) { 1411 builder.PrependByteSlot(6, byte(color), 8) 1412} 1413func MonsterAddTestType(builder *flatbuffers.Builder, testType Any) { 1414 builder.PrependByteSlot(7, byte(testType), 0) 1415} 1416func MonsterAddTest(builder *flatbuffers.Builder, test flatbuffers.UOffsetT) { 1417 builder.PrependUOffsetTSlot(8, flatbuffers.UOffsetT(test), 0) 1418} 1419func MonsterAddTest4(builder *flatbuffers.Builder, test4 flatbuffers.UOffsetT) { 1420 builder.PrependUOffsetTSlot(9, flatbuffers.UOffsetT(test4), 0) 1421} 1422func MonsterStartTest4Vector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT { 1423 return builder.StartVector(4, numElems, 2) 1424} 1425func MonsterAddTestarrayofstring(builder *flatbuffers.Builder, testarrayofstring flatbuffers.UOffsetT) { 1426 builder.PrependUOffsetTSlot(10, flatbuffers.UOffsetT(testarrayofstring), 0) 1427} 1428func MonsterStartTestarrayofstringVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT { 1429 return builder.StartVector(4, numElems, 4) 1430} 1431func MonsterAddTestarrayoftables(builder *flatbuffers.Builder, testarrayoftables flatbuffers.UOffsetT) { 1432 builder.PrependUOffsetTSlot(11, flatbuffers.UOffsetT(testarrayoftables), 0) 1433} 1434func MonsterStartTestarrayoftablesVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT { 1435 return builder.StartVector(4, numElems, 4) 1436} 1437func MonsterAddEnemy(builder *flatbuffers.Builder, enemy flatbuffers.UOffsetT) { 1438 builder.PrependUOffsetTSlot(12, flatbuffers.UOffsetT(enemy), 0) 1439} 1440func MonsterAddTestnestedflatbuffer(builder *flatbuffers.Builder, testnestedflatbuffer flatbuffers.UOffsetT) { 1441 builder.PrependUOffsetTSlot(13, flatbuffers.UOffsetT(testnestedflatbuffer), 0) 1442} 1443func MonsterStartTestnestedflatbufferVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT { 1444 return builder.StartVector(1, numElems, 1) 1445} 1446func MonsterAddTestempty(builder *flatbuffers.Builder, testempty flatbuffers.UOffsetT) { 1447 builder.PrependUOffsetTSlot(14, flatbuffers.UOffsetT(testempty), 0) 1448} 1449func MonsterAddTestbool(builder *flatbuffers.Builder, testbool bool) { 1450 builder.PrependBoolSlot(15, testbool, false) 1451} 1452func MonsterAddTesthashs32Fnv1(builder *flatbuffers.Builder, testhashs32Fnv1 int32) { 1453 builder.PrependInt32Slot(16, testhashs32Fnv1, 0) 1454} 1455func MonsterAddTesthashu32Fnv1(builder *flatbuffers.Builder, testhashu32Fnv1 uint32) { 1456 builder.PrependUint32Slot(17, testhashu32Fnv1, 0) 1457} 1458func MonsterAddTesthashs64Fnv1(builder *flatbuffers.Builder, testhashs64Fnv1 int64) { 1459 builder.PrependInt64Slot(18, testhashs64Fnv1, 0) 1460} 1461func MonsterAddTesthashu64Fnv1(builder *flatbuffers.Builder, testhashu64Fnv1 uint64) { 1462 builder.PrependUint64Slot(19, testhashu64Fnv1, 0) 1463} 1464func MonsterAddTesthashs32Fnv1a(builder *flatbuffers.Builder, testhashs32Fnv1a int32) { 1465 builder.PrependInt32Slot(20, testhashs32Fnv1a, 0) 1466} 1467func MonsterAddTesthashu32Fnv1a(builder *flatbuffers.Builder, testhashu32Fnv1a uint32) { 1468 builder.PrependUint32Slot(21, testhashu32Fnv1a, 0) 1469} 1470func MonsterAddTesthashs64Fnv1a(builder *flatbuffers.Builder, testhashs64Fnv1a int64) { 1471 builder.PrependInt64Slot(22, testhashs64Fnv1a, 0) 1472} 1473func MonsterAddTesthashu64Fnv1a(builder *flatbuffers.Builder, testhashu64Fnv1a uint64) { 1474 builder.PrependUint64Slot(23, testhashu64Fnv1a, 0) 1475} 1476func MonsterAddTestarrayofbools(builder *flatbuffers.Builder, testarrayofbools flatbuffers.UOffsetT) { 1477 builder.PrependUOffsetTSlot(24, flatbuffers.UOffsetT(testarrayofbools), 0) 1478} 1479func MonsterStartTestarrayofboolsVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT { 1480 return builder.StartVector(1, numElems, 1) 1481} 1482func MonsterAddTestf(builder *flatbuffers.Builder, testf float32) { 1483 builder.PrependFloat32Slot(25, testf, 3.14159) 1484} 1485func MonsterAddTestf2(builder *flatbuffers.Builder, testf2 float32) { 1486 builder.PrependFloat32Slot(26, testf2, 3.0) 1487} 1488func MonsterAddTestf3(builder *flatbuffers.Builder, testf3 float32) { 1489 builder.PrependFloat32Slot(27, testf3, 0.0) 1490} 1491func MonsterAddTestarrayofstring2(builder *flatbuffers.Builder, testarrayofstring2 flatbuffers.UOffsetT) { 1492 builder.PrependUOffsetTSlot(28, flatbuffers.UOffsetT(testarrayofstring2), 0) 1493} 1494func MonsterStartTestarrayofstring2Vector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT { 1495 return builder.StartVector(4, numElems, 4) 1496} 1497func MonsterAddTestarrayofsortedstruct(builder *flatbuffers.Builder, testarrayofsortedstruct flatbuffers.UOffsetT) { 1498 builder.PrependUOffsetTSlot(29, flatbuffers.UOffsetT(testarrayofsortedstruct), 0) 1499} 1500func MonsterStartTestarrayofsortedstructVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT { 1501 return builder.StartVector(8, numElems, 4) 1502} 1503func MonsterAddFlex(builder *flatbuffers.Builder, flex flatbuffers.UOffsetT) { 1504 builder.PrependUOffsetTSlot(30, flatbuffers.UOffsetT(flex), 0) 1505} 1506func MonsterStartFlexVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT { 1507 return builder.StartVector(1, numElems, 1) 1508} 1509func MonsterAddTest5(builder *flatbuffers.Builder, test5 flatbuffers.UOffsetT) { 1510 builder.PrependUOffsetTSlot(31, flatbuffers.UOffsetT(test5), 0) 1511} 1512func MonsterStartTest5Vector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT { 1513 return builder.StartVector(4, numElems, 2) 1514} 1515func MonsterAddVectorOfLongs(builder *flatbuffers.Builder, vectorOfLongs flatbuffers.UOffsetT) { 1516 builder.PrependUOffsetTSlot(32, flatbuffers.UOffsetT(vectorOfLongs), 0) 1517} 1518func MonsterStartVectorOfLongsVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT { 1519 return builder.StartVector(8, numElems, 8) 1520} 1521func MonsterAddVectorOfDoubles(builder *flatbuffers.Builder, vectorOfDoubles flatbuffers.UOffsetT) { 1522 builder.PrependUOffsetTSlot(33, flatbuffers.UOffsetT(vectorOfDoubles), 0) 1523} 1524func MonsterStartVectorOfDoublesVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT { 1525 return builder.StartVector(8, numElems, 8) 1526} 1527func MonsterAddParentNamespaceTest(builder *flatbuffers.Builder, parentNamespaceTest flatbuffers.UOffsetT) { 1528 builder.PrependUOffsetTSlot(34, flatbuffers.UOffsetT(parentNamespaceTest), 0) 1529} 1530func MonsterAddVectorOfReferrables(builder *flatbuffers.Builder, vectorOfReferrables flatbuffers.UOffsetT) { 1531 builder.PrependUOffsetTSlot(35, flatbuffers.UOffsetT(vectorOfReferrables), 0) 1532} 1533func MonsterStartVectorOfReferrablesVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT { 1534 return builder.StartVector(4, numElems, 4) 1535} 1536func MonsterAddSingleWeakReference(builder *flatbuffers.Builder, singleWeakReference uint64) { 1537 builder.PrependUint64Slot(36, singleWeakReference, 0) 1538} 1539func MonsterAddVectorOfWeakReferences(builder *flatbuffers.Builder, vectorOfWeakReferences flatbuffers.UOffsetT) { 1540 builder.PrependUOffsetTSlot(37, flatbuffers.UOffsetT(vectorOfWeakReferences), 0) 1541} 1542func MonsterStartVectorOfWeakReferencesVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT { 1543 return builder.StartVector(8, numElems, 8) 1544} 1545func MonsterAddVectorOfStrongReferrables(builder *flatbuffers.Builder, vectorOfStrongReferrables flatbuffers.UOffsetT) { 1546 builder.PrependUOffsetTSlot(38, flatbuffers.UOffsetT(vectorOfStrongReferrables), 0) 1547} 1548func MonsterStartVectorOfStrongReferrablesVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT { 1549 return builder.StartVector(4, numElems, 4) 1550} 1551func MonsterAddCoOwningReference(builder *flatbuffers.Builder, coOwningReference uint64) { 1552 builder.PrependUint64Slot(39, coOwningReference, 0) 1553} 1554func MonsterAddVectorOfCoOwningReferences(builder *flatbuffers.Builder, vectorOfCoOwningReferences flatbuffers.UOffsetT) { 1555 builder.PrependUOffsetTSlot(40, flatbuffers.UOffsetT(vectorOfCoOwningReferences), 0) 1556} 1557func MonsterStartVectorOfCoOwningReferencesVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT { 1558 return builder.StartVector(8, numElems, 8) 1559} 1560func MonsterAddNonOwningReference(builder *flatbuffers.Builder, nonOwningReference uint64) { 1561 builder.PrependUint64Slot(41, nonOwningReference, 0) 1562} 1563func MonsterAddVectorOfNonOwningReferences(builder *flatbuffers.Builder, vectorOfNonOwningReferences flatbuffers.UOffsetT) { 1564 builder.PrependUOffsetTSlot(42, flatbuffers.UOffsetT(vectorOfNonOwningReferences), 0) 1565} 1566func MonsterStartVectorOfNonOwningReferencesVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT { 1567 return builder.StartVector(8, numElems, 8) 1568} 1569func MonsterAddAnyUniqueType(builder *flatbuffers.Builder, anyUniqueType AnyUniqueAliases) { 1570 builder.PrependByteSlot(43, byte(anyUniqueType), 0) 1571} 1572func MonsterAddAnyUnique(builder *flatbuffers.Builder, anyUnique flatbuffers.UOffsetT) { 1573 builder.PrependUOffsetTSlot(44, flatbuffers.UOffsetT(anyUnique), 0) 1574} 1575func MonsterAddAnyAmbiguousType(builder *flatbuffers.Builder, anyAmbiguousType AnyAmbiguousAliases) { 1576 builder.PrependByteSlot(45, byte(anyAmbiguousType), 0) 1577} 1578func MonsterAddAnyAmbiguous(builder *flatbuffers.Builder, anyAmbiguous flatbuffers.UOffsetT) { 1579 builder.PrependUOffsetTSlot(46, flatbuffers.UOffsetT(anyAmbiguous), 0) 1580} 1581func MonsterAddVectorOfEnums(builder *flatbuffers.Builder, vectorOfEnums flatbuffers.UOffsetT) { 1582 builder.PrependUOffsetTSlot(47, flatbuffers.UOffsetT(vectorOfEnums), 0) 1583} 1584func MonsterStartVectorOfEnumsVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT { 1585 return builder.StartVector(1, numElems, 1) 1586} 1587func MonsterAddSignedEnum(builder *flatbuffers.Builder, signedEnum Race) { 1588 builder.PrependInt8Slot(48, int8(signedEnum), -1) 1589} 1590func MonsterAddTestrequirednestedflatbuffer(builder *flatbuffers.Builder, testrequirednestedflatbuffer flatbuffers.UOffsetT) { 1591 builder.PrependUOffsetTSlot(49, flatbuffers.UOffsetT(testrequirednestedflatbuffer), 0) 1592} 1593func MonsterStartTestrequirednestedflatbufferVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT { 1594 return builder.StartVector(1, numElems, 1) 1595} 1596func MonsterAddScalarKeySortedTables(builder *flatbuffers.Builder, scalarKeySortedTables flatbuffers.UOffsetT) { 1597 builder.PrependUOffsetTSlot(50, flatbuffers.UOffsetT(scalarKeySortedTables), 0) 1598} 1599func MonsterStartScalarKeySortedTablesVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT { 1600 return builder.StartVector(4, numElems, 4) 1601} 1602func MonsterAddNativeInline(builder *flatbuffers.Builder, nativeInline flatbuffers.UOffsetT) { 1603 builder.PrependStructSlot(51, flatbuffers.UOffsetT(nativeInline), 0) 1604} 1605func MonsterAddLongEnumNonEnumDefault(builder *flatbuffers.Builder, longEnumNonEnumDefault LongEnum) { 1606 builder.PrependUint64Slot(52, uint64(longEnumNonEnumDefault), 0) 1607} 1608func MonsterAddLongEnumNormalDefault(builder *flatbuffers.Builder, longEnumNormalDefault LongEnum) { 1609 builder.PrependUint64Slot(53, uint64(longEnumNormalDefault), 2) 1610} 1611func MonsterEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { 1612 return builder.EndObject() 1613} 1614