mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-29 07:30:00 +00:00
Only generate @kotlin.ExperimentalUnsigned annotation on create*Vector methods having an unsigned array type parameter. (#7881)
Co-authored-by: Derek Bailey <derekbailey@google.com>
This commit is contained in:
@@ -289,7 +289,6 @@ class KotlinGenerator : public BaseGenerator {
|
|||||||
GenerateComment(enum_def.doc_comment, writer, &comment_config);
|
GenerateComment(enum_def.doc_comment, writer, &comment_config);
|
||||||
|
|
||||||
writer += "@Suppress(\"unused\")";
|
writer += "@Suppress(\"unused\")";
|
||||||
writer += "@kotlin.ExperimentalUnsignedTypes";
|
|
||||||
writer += "class " + namer_.Type(enum_def) + " private constructor() {";
|
writer += "class " + namer_.Type(enum_def) + " private constructor() {";
|
||||||
writer.IncrementIdentLevel();
|
writer.IncrementIdentLevel();
|
||||||
|
|
||||||
@@ -495,7 +494,6 @@ class KotlinGenerator : public BaseGenerator {
|
|||||||
writer.SetValue("superclass", fixed ? "Struct" : "Table");
|
writer.SetValue("superclass", fixed ? "Struct" : "Table");
|
||||||
|
|
||||||
writer += "@Suppress(\"unused\")";
|
writer += "@Suppress(\"unused\")";
|
||||||
writer += "@kotlin.ExperimentalUnsignedTypes";
|
|
||||||
writer += "class {{struct_name}} : {{superclass}}() {\n";
|
writer += "class {{struct_name}} : {{superclass}}() {\n";
|
||||||
|
|
||||||
writer.IncrementIdentLevel();
|
writer.IncrementIdentLevel();
|
||||||
@@ -703,6 +701,9 @@ class KotlinGenerator : public BaseGenerator {
|
|||||||
writer.SetValue("root", GenMethod(vector_type));
|
writer.SetValue("root", GenMethod(vector_type));
|
||||||
writer.SetValue("cast", CastToSigned(vector_type));
|
writer.SetValue("cast", CastToSigned(vector_type));
|
||||||
|
|
||||||
|
if (IsUnsigned(vector_type.base_type)) {
|
||||||
|
writer += "@kotlin.ExperimentalUnsignedTypes";
|
||||||
|
}
|
||||||
GenerateFun(
|
GenerateFun(
|
||||||
writer, method_name, params, "Int",
|
writer, method_name, params, "Int",
|
||||||
[&]() {
|
[&]() {
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ import java.nio.ByteOrder
|
|||||||
import kotlin.math.sign
|
import kotlin.math.sign
|
||||||
|
|
||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
@kotlin.ExperimentalUnsignedTypes
|
|
||||||
class LongFloatEntry : Table() {
|
class LongFloatEntry : Table() {
|
||||||
|
|
||||||
fun __init(_i: Int, _bb: ByteBuffer) {
|
fun __init(_i: Int, _bb: ByteBuffer) {
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ import java.nio.ByteOrder
|
|||||||
import kotlin.math.sign
|
import kotlin.math.sign
|
||||||
|
|
||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
@kotlin.ExperimentalUnsignedTypes
|
|
||||||
class LongFloatMap : Table() {
|
class LongFloatMap : Table() {
|
||||||
|
|
||||||
fun __init(_i: Int, _bb: ByteBuffer) {
|
fun __init(_i: Int, _bb: ByteBuffer) {
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ import java.nio.ByteOrder
|
|||||||
import kotlin.math.sign
|
import kotlin.math.sign
|
||||||
|
|
||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
@kotlin.ExperimentalUnsignedTypes
|
|
||||||
class Ability : Struct() {
|
class Ability : Struct() {
|
||||||
|
|
||||||
fun __init(_i: Int, _bb: ByteBuffer) {
|
fun __init(_i: Int, _bb: ByteBuffer) {
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
package MyGame.Example
|
package MyGame.Example
|
||||||
|
|
||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
@kotlin.ExperimentalUnsignedTypes
|
|
||||||
class Any_ private constructor() {
|
class Any_ private constructor() {
|
||||||
companion object {
|
companion object {
|
||||||
const val NONE: UByte = 0u
|
const val NONE: UByte = 0u
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
package MyGame.Example
|
package MyGame.Example
|
||||||
|
|
||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
@kotlin.ExperimentalUnsignedTypes
|
|
||||||
class AnyAmbiguousAliases private constructor() {
|
class AnyAmbiguousAliases private constructor() {
|
||||||
companion object {
|
companion object {
|
||||||
const val NONE: UByte = 0u
|
const val NONE: UByte = 0u
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
package MyGame.Example
|
package MyGame.Example
|
||||||
|
|
||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
@kotlin.ExperimentalUnsignedTypes
|
|
||||||
class AnyUniqueAliases private constructor() {
|
class AnyUniqueAliases private constructor() {
|
||||||
companion object {
|
companion object {
|
||||||
const val NONE: UByte = 0u
|
const val NONE: UByte = 0u
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ package MyGame.Example
|
|||||||
* Composite components of Monster color.
|
* Composite components of Monster color.
|
||||||
*/
|
*/
|
||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
@kotlin.ExperimentalUnsignedTypes
|
|
||||||
class Color private constructor() {
|
class Color private constructor() {
|
||||||
companion object {
|
companion object {
|
||||||
const val Red: UByte = 1u
|
const val Red: UByte = 1u
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
package MyGame.Example
|
package MyGame.Example
|
||||||
|
|
||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
@kotlin.ExperimentalUnsignedTypes
|
|
||||||
class LongEnum private constructor() {
|
class LongEnum private constructor() {
|
||||||
companion object {
|
companion object {
|
||||||
const val LongOne: ULong = 2UL
|
const val LongOne: ULong = 2UL
|
||||||
|
|||||||
@@ -22,7 +22,6 @@ import kotlin.math.sign
|
|||||||
* an example documentation comment: "monster object"
|
* an example documentation comment: "monster object"
|
||||||
*/
|
*/
|
||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
@kotlin.ExperimentalUnsignedTypes
|
|
||||||
class Monster : Table() {
|
class Monster : Table() {
|
||||||
|
|
||||||
fun __init(_i: Int, _bb: ByteBuffer) {
|
fun __init(_i: Int, _bb: ByteBuffer) {
|
||||||
@@ -1019,6 +1018,7 @@ class Monster : Table() {
|
|||||||
builder.slot(3)
|
builder.slot(3)
|
||||||
}
|
}
|
||||||
fun addInventory(builder: FlatBufferBuilder, inventory: Int) = builder.addOffset(5, inventory, 0)
|
fun addInventory(builder: FlatBufferBuilder, inventory: Int) = builder.addOffset(5, inventory, 0)
|
||||||
|
@kotlin.ExperimentalUnsignedTypes
|
||||||
fun createInventoryVector(builder: FlatBufferBuilder, data: UByteArray) : Int {
|
fun createInventoryVector(builder: FlatBufferBuilder, data: UByteArray) : Int {
|
||||||
builder.startVector(1, data.size, 1)
|
builder.startVector(1, data.size, 1)
|
||||||
for (i in data.size - 1 downTo 0) {
|
for (i in data.size - 1 downTo 0) {
|
||||||
@@ -1052,6 +1052,7 @@ class Monster : Table() {
|
|||||||
fun startTestarrayoftablesVector(builder: FlatBufferBuilder, numElems: Int) = builder.startVector(4, numElems, 4)
|
fun startTestarrayoftablesVector(builder: FlatBufferBuilder, numElems: Int) = builder.startVector(4, numElems, 4)
|
||||||
fun addEnemy(builder: FlatBufferBuilder, enemy: Int) = builder.addOffset(12, enemy, 0)
|
fun addEnemy(builder: FlatBufferBuilder, enemy: Int) = builder.addOffset(12, enemy, 0)
|
||||||
fun addTestnestedflatbuffer(builder: FlatBufferBuilder, testnestedflatbuffer: Int) = builder.addOffset(13, testnestedflatbuffer, 0)
|
fun addTestnestedflatbuffer(builder: FlatBufferBuilder, testnestedflatbuffer: Int) = builder.addOffset(13, testnestedflatbuffer, 0)
|
||||||
|
@kotlin.ExperimentalUnsignedTypes
|
||||||
fun createTestnestedflatbufferVector(builder: FlatBufferBuilder, data: UByteArray) : Int {
|
fun createTestnestedflatbufferVector(builder: FlatBufferBuilder, data: UByteArray) : Int {
|
||||||
builder.startVector(1, data.size, 1)
|
builder.startVector(1, data.size, 1)
|
||||||
for (i in data.size - 1 downTo 0) {
|
for (i in data.size - 1 downTo 0) {
|
||||||
@@ -1094,6 +1095,7 @@ class Monster : Table() {
|
|||||||
fun addTestarrayofsortedstruct(builder: FlatBufferBuilder, testarrayofsortedstruct: Int) = builder.addOffset(29, testarrayofsortedstruct, 0)
|
fun addTestarrayofsortedstruct(builder: FlatBufferBuilder, testarrayofsortedstruct: Int) = builder.addOffset(29, testarrayofsortedstruct, 0)
|
||||||
fun startTestarrayofsortedstructVector(builder: FlatBufferBuilder, numElems: Int) = builder.startVector(8, numElems, 4)
|
fun startTestarrayofsortedstructVector(builder: FlatBufferBuilder, numElems: Int) = builder.startVector(8, numElems, 4)
|
||||||
fun addFlex(builder: FlatBufferBuilder, flex: Int) = builder.addOffset(30, flex, 0)
|
fun addFlex(builder: FlatBufferBuilder, flex: Int) = builder.addOffset(30, flex, 0)
|
||||||
|
@kotlin.ExperimentalUnsignedTypes
|
||||||
fun createFlexVector(builder: FlatBufferBuilder, data: UByteArray) : Int {
|
fun createFlexVector(builder: FlatBufferBuilder, data: UByteArray) : Int {
|
||||||
builder.startVector(1, data.size, 1)
|
builder.startVector(1, data.size, 1)
|
||||||
for (i in data.size - 1 downTo 0) {
|
for (i in data.size - 1 downTo 0) {
|
||||||
@@ -1134,6 +1136,7 @@ class Monster : Table() {
|
|||||||
fun startVectorOfReferrablesVector(builder: FlatBufferBuilder, numElems: Int) = builder.startVector(4, numElems, 4)
|
fun startVectorOfReferrablesVector(builder: FlatBufferBuilder, numElems: Int) = builder.startVector(4, numElems, 4)
|
||||||
fun addSingleWeakReference(builder: FlatBufferBuilder, singleWeakReference: ULong) = builder.addLong(36, singleWeakReference.toLong(), 0)
|
fun addSingleWeakReference(builder: FlatBufferBuilder, singleWeakReference: ULong) = builder.addLong(36, singleWeakReference.toLong(), 0)
|
||||||
fun addVectorOfWeakReferences(builder: FlatBufferBuilder, vectorOfWeakReferences: Int) = builder.addOffset(37, vectorOfWeakReferences, 0)
|
fun addVectorOfWeakReferences(builder: FlatBufferBuilder, vectorOfWeakReferences: Int) = builder.addOffset(37, vectorOfWeakReferences, 0)
|
||||||
|
@kotlin.ExperimentalUnsignedTypes
|
||||||
fun createVectorOfWeakReferencesVector(builder: FlatBufferBuilder, data: ULongArray) : Int {
|
fun createVectorOfWeakReferencesVector(builder: FlatBufferBuilder, data: ULongArray) : Int {
|
||||||
builder.startVector(8, data.size, 8)
|
builder.startVector(8, data.size, 8)
|
||||||
for (i in data.size - 1 downTo 0) {
|
for (i in data.size - 1 downTo 0) {
|
||||||
@@ -1153,6 +1156,7 @@ class Monster : Table() {
|
|||||||
fun startVectorOfStrongReferrablesVector(builder: FlatBufferBuilder, numElems: Int) = builder.startVector(4, numElems, 4)
|
fun startVectorOfStrongReferrablesVector(builder: FlatBufferBuilder, numElems: Int) = builder.startVector(4, numElems, 4)
|
||||||
fun addCoOwningReference(builder: FlatBufferBuilder, coOwningReference: ULong) = builder.addLong(39, coOwningReference.toLong(), 0)
|
fun addCoOwningReference(builder: FlatBufferBuilder, coOwningReference: ULong) = builder.addLong(39, coOwningReference.toLong(), 0)
|
||||||
fun addVectorOfCoOwningReferences(builder: FlatBufferBuilder, vectorOfCoOwningReferences: Int) = builder.addOffset(40, vectorOfCoOwningReferences, 0)
|
fun addVectorOfCoOwningReferences(builder: FlatBufferBuilder, vectorOfCoOwningReferences: Int) = builder.addOffset(40, vectorOfCoOwningReferences, 0)
|
||||||
|
@kotlin.ExperimentalUnsignedTypes
|
||||||
fun createVectorOfCoOwningReferencesVector(builder: FlatBufferBuilder, data: ULongArray) : Int {
|
fun createVectorOfCoOwningReferencesVector(builder: FlatBufferBuilder, data: ULongArray) : Int {
|
||||||
builder.startVector(8, data.size, 8)
|
builder.startVector(8, data.size, 8)
|
||||||
for (i in data.size - 1 downTo 0) {
|
for (i in data.size - 1 downTo 0) {
|
||||||
@@ -1163,6 +1167,7 @@ class Monster : Table() {
|
|||||||
fun startVectorOfCoOwningReferencesVector(builder: FlatBufferBuilder, numElems: Int) = builder.startVector(8, numElems, 8)
|
fun startVectorOfCoOwningReferencesVector(builder: FlatBufferBuilder, numElems: Int) = builder.startVector(8, numElems, 8)
|
||||||
fun addNonOwningReference(builder: FlatBufferBuilder, nonOwningReference: ULong) = builder.addLong(41, nonOwningReference.toLong(), 0)
|
fun addNonOwningReference(builder: FlatBufferBuilder, nonOwningReference: ULong) = builder.addLong(41, nonOwningReference.toLong(), 0)
|
||||||
fun addVectorOfNonOwningReferences(builder: FlatBufferBuilder, vectorOfNonOwningReferences: Int) = builder.addOffset(42, vectorOfNonOwningReferences, 0)
|
fun addVectorOfNonOwningReferences(builder: FlatBufferBuilder, vectorOfNonOwningReferences: Int) = builder.addOffset(42, vectorOfNonOwningReferences, 0)
|
||||||
|
@kotlin.ExperimentalUnsignedTypes
|
||||||
fun createVectorOfNonOwningReferencesVector(builder: FlatBufferBuilder, data: ULongArray) : Int {
|
fun createVectorOfNonOwningReferencesVector(builder: FlatBufferBuilder, data: ULongArray) : Int {
|
||||||
builder.startVector(8, data.size, 8)
|
builder.startVector(8, data.size, 8)
|
||||||
for (i in data.size - 1 downTo 0) {
|
for (i in data.size - 1 downTo 0) {
|
||||||
@@ -1176,6 +1181,7 @@ class Monster : Table() {
|
|||||||
fun addAnyAmbiguousType(builder: FlatBufferBuilder, anyAmbiguousType: UByte) = builder.addByte(45, anyAmbiguousType.toByte(), 0)
|
fun addAnyAmbiguousType(builder: FlatBufferBuilder, anyAmbiguousType: UByte) = builder.addByte(45, anyAmbiguousType.toByte(), 0)
|
||||||
fun addAnyAmbiguous(builder: FlatBufferBuilder, anyAmbiguous: Int) = builder.addOffset(46, anyAmbiguous, 0)
|
fun addAnyAmbiguous(builder: FlatBufferBuilder, anyAmbiguous: Int) = builder.addOffset(46, anyAmbiguous, 0)
|
||||||
fun addVectorOfEnums(builder: FlatBufferBuilder, vectorOfEnums: Int) = builder.addOffset(47, vectorOfEnums, 0)
|
fun addVectorOfEnums(builder: FlatBufferBuilder, vectorOfEnums: Int) = builder.addOffset(47, vectorOfEnums, 0)
|
||||||
|
@kotlin.ExperimentalUnsignedTypes
|
||||||
fun createVectorOfEnumsVector(builder: FlatBufferBuilder, data: UByteArray) : Int {
|
fun createVectorOfEnumsVector(builder: FlatBufferBuilder, data: UByteArray) : Int {
|
||||||
builder.startVector(1, data.size, 1)
|
builder.startVector(1, data.size, 1)
|
||||||
for (i in data.size - 1 downTo 0) {
|
for (i in data.size - 1 downTo 0) {
|
||||||
@@ -1186,6 +1192,7 @@ class Monster : Table() {
|
|||||||
fun startVectorOfEnumsVector(builder: FlatBufferBuilder, numElems: Int) = builder.startVector(1, numElems, 1)
|
fun startVectorOfEnumsVector(builder: FlatBufferBuilder, numElems: Int) = builder.startVector(1, numElems, 1)
|
||||||
fun addSignedEnum(builder: FlatBufferBuilder, signedEnum: Byte) = builder.addByte(48, signedEnum, -1)
|
fun addSignedEnum(builder: FlatBufferBuilder, signedEnum: Byte) = builder.addByte(48, signedEnum, -1)
|
||||||
fun addTestrequirednestedflatbuffer(builder: FlatBufferBuilder, testrequirednestedflatbuffer: Int) = builder.addOffset(49, testrequirednestedflatbuffer, 0)
|
fun addTestrequirednestedflatbuffer(builder: FlatBufferBuilder, testrequirednestedflatbuffer: Int) = builder.addOffset(49, testrequirednestedflatbuffer, 0)
|
||||||
|
@kotlin.ExperimentalUnsignedTypes
|
||||||
fun createTestrequirednestedflatbufferVector(builder: FlatBufferBuilder, data: UByteArray) : Int {
|
fun createTestrequirednestedflatbufferVector(builder: FlatBufferBuilder, data: UByteArray) : Int {
|
||||||
builder.startVector(1, data.size, 1)
|
builder.startVector(1, data.size, 1)
|
||||||
for (i in data.size - 1 downTo 0) {
|
for (i in data.size - 1 downTo 0) {
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
package MyGame.Example
|
package MyGame.Example
|
||||||
|
|
||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
@kotlin.ExperimentalUnsignedTypes
|
|
||||||
class Race private constructor() {
|
class Race private constructor() {
|
||||||
companion object {
|
companion object {
|
||||||
const val None: Byte = -1
|
const val None: Byte = -1
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ import java.nio.ByteOrder
|
|||||||
import kotlin.math.sign
|
import kotlin.math.sign
|
||||||
|
|
||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
@kotlin.ExperimentalUnsignedTypes
|
|
||||||
class Referrable : Table() {
|
class Referrable : Table() {
|
||||||
|
|
||||||
fun __init(_i: Int, _bb: ByteBuffer) {
|
fun __init(_i: Int, _bb: ByteBuffer) {
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ import java.nio.ByteOrder
|
|||||||
import kotlin.math.sign
|
import kotlin.math.sign
|
||||||
|
|
||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
@kotlin.ExperimentalUnsignedTypes
|
|
||||||
class Stat : Table() {
|
class Stat : Table() {
|
||||||
|
|
||||||
fun __init(_i: Int, _bb: ByteBuffer) {
|
fun __init(_i: Int, _bb: ByteBuffer) {
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ import java.nio.ByteOrder
|
|||||||
import kotlin.math.sign
|
import kotlin.math.sign
|
||||||
|
|
||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
@kotlin.ExperimentalUnsignedTypes
|
|
||||||
class StructOfStructs : Struct() {
|
class StructOfStructs : Struct() {
|
||||||
|
|
||||||
fun __init(_i: Int, _bb: ByteBuffer) {
|
fun __init(_i: Int, _bb: ByteBuffer) {
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ import java.nio.ByteOrder
|
|||||||
import kotlin.math.sign
|
import kotlin.math.sign
|
||||||
|
|
||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
@kotlin.ExperimentalUnsignedTypes
|
|
||||||
class StructOfStructsOfStructs : Struct() {
|
class StructOfStructsOfStructs : Struct() {
|
||||||
|
|
||||||
fun __init(_i: Int, _bb: ByteBuffer) {
|
fun __init(_i: Int, _bb: ByteBuffer) {
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ import java.nio.ByteOrder
|
|||||||
import kotlin.math.sign
|
import kotlin.math.sign
|
||||||
|
|
||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
@kotlin.ExperimentalUnsignedTypes
|
|
||||||
class Test : Struct() {
|
class Test : Struct() {
|
||||||
|
|
||||||
fun __init(_i: Int, _bb: ByteBuffer) {
|
fun __init(_i: Int, _bb: ByteBuffer) {
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ import java.nio.ByteOrder
|
|||||||
import kotlin.math.sign
|
import kotlin.math.sign
|
||||||
|
|
||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
@kotlin.ExperimentalUnsignedTypes
|
|
||||||
class TestSimpleTableWithEnum : Table() {
|
class TestSimpleTableWithEnum : Table() {
|
||||||
|
|
||||||
fun __init(_i: Int, _bb: ByteBuffer) {
|
fun __init(_i: Int, _bb: ByteBuffer) {
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ import java.nio.ByteOrder
|
|||||||
import kotlin.math.sign
|
import kotlin.math.sign
|
||||||
|
|
||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
@kotlin.ExperimentalUnsignedTypes
|
|
||||||
class TypeAliases : Table() {
|
class TypeAliases : Table() {
|
||||||
|
|
||||||
fun __init(_i: Int, _bb: ByteBuffer) {
|
fun __init(_i: Int, _bb: ByteBuffer) {
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ import java.nio.ByteOrder
|
|||||||
import kotlin.math.sign
|
import kotlin.math.sign
|
||||||
|
|
||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
@kotlin.ExperimentalUnsignedTypes
|
|
||||||
class Vec3 : Struct() {
|
class Vec3 : Struct() {
|
||||||
|
|
||||||
fun __init(_i: Int, _bb: ByteBuffer) {
|
fun __init(_i: Int, _bb: ByteBuffer) {
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ import java.nio.ByteOrder
|
|||||||
import kotlin.math.sign
|
import kotlin.math.sign
|
||||||
|
|
||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
@kotlin.ExperimentalUnsignedTypes
|
|
||||||
class Monster : Table() {
|
class Monster : Table() {
|
||||||
|
|
||||||
fun __init(_i: Int, _bb: ByteBuffer) {
|
fun __init(_i: Int, _bb: ByteBuffer) {
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ import java.nio.ByteOrder
|
|||||||
import kotlin.math.sign
|
import kotlin.math.sign
|
||||||
|
|
||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
@kotlin.ExperimentalUnsignedTypes
|
|
||||||
class InParentNamespace : Table() {
|
class InParentNamespace : Table() {
|
||||||
|
|
||||||
fun __init(_i: Int, _bb: ByteBuffer) {
|
fun __init(_i: Int, _bb: ByteBuffer) {
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ import java.nio.ByteOrder
|
|||||||
import kotlin.math.sign
|
import kotlin.math.sign
|
||||||
|
|
||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
@kotlin.ExperimentalUnsignedTypes
|
|
||||||
class MonsterExtra : Table() {
|
class MonsterExtra : Table() {
|
||||||
|
|
||||||
fun __init(_i: Int, _bb: ByteBuffer) {
|
fun __init(_i: Int, _bb: ByteBuffer) {
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
package optional_scalars
|
package optional_scalars
|
||||||
|
|
||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
@kotlin.ExperimentalUnsignedTypes
|
|
||||||
class OptionalByte private constructor() {
|
class OptionalByte private constructor() {
|
||||||
companion object {
|
companion object {
|
||||||
const val None: Byte = 0
|
const val None: Byte = 0
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ import java.nio.ByteOrder
|
|||||||
import kotlin.math.sign
|
import kotlin.math.sign
|
||||||
|
|
||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
@kotlin.ExperimentalUnsignedTypes
|
|
||||||
class ScalarStuff : Table() {
|
class ScalarStuff : Table() {
|
||||||
|
|
||||||
fun __init(_i: Int, _bb: ByteBuffer) {
|
fun __init(_i: Int, _bb: ByteBuffer) {
|
||||||
|
|||||||
@@ -17,7 +17,6 @@ import java.nio.ByteOrder
|
|||||||
import kotlin.math.sign
|
import kotlin.math.sign
|
||||||
|
|
||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
@kotlin.ExperimentalUnsignedTypes
|
|
||||||
class Attacker : Table() {
|
class Attacker : Table() {
|
||||||
|
|
||||||
fun __init(_i: Int, _bb: ByteBuffer) {
|
fun __init(_i: Int, _bb: ByteBuffer) {
|
||||||
|
|||||||
@@ -17,7 +17,6 @@ import java.nio.ByteOrder
|
|||||||
import kotlin.math.sign
|
import kotlin.math.sign
|
||||||
|
|
||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
@kotlin.ExperimentalUnsignedTypes
|
|
||||||
class BookReader : Struct() {
|
class BookReader : Struct() {
|
||||||
|
|
||||||
fun __init(_i: Int, _bb: ByteBuffer) {
|
fun __init(_i: Int, _bb: ByteBuffer) {
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
// automatically generated by the FlatBuffers compiler, do not modify
|
// automatically generated by the FlatBuffers compiler, do not modify
|
||||||
|
|
||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
@kotlin.ExperimentalUnsignedTypes
|
|
||||||
class Character_ private constructor() {
|
class Character_ private constructor() {
|
||||||
companion object {
|
companion object {
|
||||||
const val NONE: UByte = 0u
|
const val NONE: UByte = 0u
|
||||||
|
|||||||
@@ -17,7 +17,6 @@ import java.nio.ByteOrder
|
|||||||
import kotlin.math.sign
|
import kotlin.math.sign
|
||||||
|
|
||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
@kotlin.ExperimentalUnsignedTypes
|
|
||||||
class FallingTub : Struct() {
|
class FallingTub : Struct() {
|
||||||
|
|
||||||
fun __init(_i: Int, _bb: ByteBuffer) {
|
fun __init(_i: Int, _bb: ByteBuffer) {
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
// automatically generated by the FlatBuffers compiler, do not modify
|
// automatically generated by the FlatBuffers compiler, do not modify
|
||||||
|
|
||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
@kotlin.ExperimentalUnsignedTypes
|
|
||||||
class Gadget private constructor() {
|
class Gadget private constructor() {
|
||||||
companion object {
|
companion object {
|
||||||
const val NONE: UByte = 0u
|
const val NONE: UByte = 0u
|
||||||
|
|||||||
@@ -17,7 +17,6 @@ import java.nio.ByteOrder
|
|||||||
import kotlin.math.sign
|
import kotlin.math.sign
|
||||||
|
|
||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
@kotlin.ExperimentalUnsignedTypes
|
|
||||||
class HandFan : Table() {
|
class HandFan : Table() {
|
||||||
|
|
||||||
fun __init(_i: Int, _bb: ByteBuffer) {
|
fun __init(_i: Int, _bb: ByteBuffer) {
|
||||||
|
|||||||
@@ -17,7 +17,6 @@ import java.nio.ByteOrder
|
|||||||
import kotlin.math.sign
|
import kotlin.math.sign
|
||||||
|
|
||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
@kotlin.ExperimentalUnsignedTypes
|
|
||||||
class Movie : Table() {
|
class Movie : Table() {
|
||||||
|
|
||||||
fun __init(_i: Int, _bb: ByteBuffer) {
|
fun __init(_i: Int, _bb: ByteBuffer) {
|
||||||
@@ -99,6 +98,7 @@ class Movie : Table() {
|
|||||||
fun addMainCharacterType(builder: FlatBufferBuilder, mainCharacterType: UByte) = builder.addByte(0, mainCharacterType.toByte(), 0)
|
fun addMainCharacterType(builder: FlatBufferBuilder, mainCharacterType: UByte) = builder.addByte(0, mainCharacterType.toByte(), 0)
|
||||||
fun addMainCharacter(builder: FlatBufferBuilder, mainCharacter: Int) = builder.addOffset(1, mainCharacter, 0)
|
fun addMainCharacter(builder: FlatBufferBuilder, mainCharacter: Int) = builder.addOffset(1, mainCharacter, 0)
|
||||||
fun addCharactersType(builder: FlatBufferBuilder, charactersType: Int) = builder.addOffset(2, charactersType, 0)
|
fun addCharactersType(builder: FlatBufferBuilder, charactersType: Int) = builder.addOffset(2, charactersType, 0)
|
||||||
|
@kotlin.ExperimentalUnsignedTypes
|
||||||
fun createCharactersTypeVector(builder: FlatBufferBuilder, data: UByteArray) : Int {
|
fun createCharactersTypeVector(builder: FlatBufferBuilder, data: UByteArray) : Int {
|
||||||
builder.startVector(1, data.size, 1)
|
builder.startVector(1, data.size, 1)
|
||||||
for (i in data.size - 1 downTo 0) {
|
for (i in data.size - 1 downTo 0) {
|
||||||
|
|||||||
@@ -17,7 +17,6 @@ import java.nio.ByteOrder
|
|||||||
import kotlin.math.sign
|
import kotlin.math.sign
|
||||||
|
|
||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
@kotlin.ExperimentalUnsignedTypes
|
|
||||||
class Rapunzel : Struct() {
|
class Rapunzel : Struct() {
|
||||||
|
|
||||||
fun __init(_i: Int, _bb: ByteBuffer) {
|
fun __init(_i: Int, _bb: ByteBuffer) {
|
||||||
|
|||||||
Reference in New Issue
Block a user