1 // <auto-generated> 2 // automatically generated by the FlatBuffers compiler, do not modify 3 // </auto-generated> 4 5 namespace MyGame.Example 6 { 7 8 using global::System; 9 using global::FlatBuffers; 10 11 public struct TypeAliases : IFlatbufferObject 12 { 13 private Table __p; 14 public ByteBuffer ByteBuffer { get { return __p.bb; } } GetRootAsTypeAliasesMyGame.Example.TypeAliases15 public static TypeAliases GetRootAsTypeAliases(ByteBuffer _bb) { return GetRootAsTypeAliases(_bb, new TypeAliases()); } GetRootAsTypeAliasesMyGame.Example.TypeAliases16 public static TypeAliases GetRootAsTypeAliases(ByteBuffer _bb, TypeAliases obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } __initMyGame.Example.TypeAliases17 public void __init(int _i, ByteBuffer _bb) { __p.bb_pos = _i; __p.bb = _bb; } __assignMyGame.Example.TypeAliases18 public TypeAliases __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } 19 20 public sbyte I8 { get { int o = __p.__offset(4); return o != 0 ? __p.bb.GetSbyte(o + __p.bb_pos) : (sbyte)0; } } MutateI8MyGame.Example.TypeAliases21 public bool MutateI8(sbyte i8) { int o = __p.__offset(4); if (o != 0) { __p.bb.PutSbyte(o + __p.bb_pos, i8); return true; } else { return false; } } 22 public byte U8 { get { int o = __p.__offset(6); return o != 0 ? __p.bb.Get(o + __p.bb_pos) : (byte)0; } } MutateU8MyGame.Example.TypeAliases23 public bool MutateU8(byte u8) { int o = __p.__offset(6); if (o != 0) { __p.bb.Put(o + __p.bb_pos, u8); return true; } else { return false; } } 24 public short I16 { get { int o = __p.__offset(8); return o != 0 ? __p.bb.GetShort(o + __p.bb_pos) : (short)0; } } MutateI16MyGame.Example.TypeAliases25 public bool MutateI16(short i16) { int o = __p.__offset(8); if (o != 0) { __p.bb.PutShort(o + __p.bb_pos, i16); return true; } else { return false; } } 26 public ushort U16 { get { int o = __p.__offset(10); return o != 0 ? __p.bb.GetUshort(o + __p.bb_pos) : (ushort)0; } } MutateU16MyGame.Example.TypeAliases27 public bool MutateU16(ushort u16) { int o = __p.__offset(10); if (o != 0) { __p.bb.PutUshort(o + __p.bb_pos, u16); return true; } else { return false; } } 28 public int I32 { get { int o = __p.__offset(12); return o != 0 ? __p.bb.GetInt(o + __p.bb_pos) : (int)0; } } MutateI32MyGame.Example.TypeAliases29 public bool MutateI32(int i32) { int o = __p.__offset(12); if (o != 0) { __p.bb.PutInt(o + __p.bb_pos, i32); return true; } else { return false; } } 30 public uint U32 { get { int o = __p.__offset(14); return o != 0 ? __p.bb.GetUint(o + __p.bb_pos) : (uint)0; } } MutateU32MyGame.Example.TypeAliases31 public bool MutateU32(uint u32) { int o = __p.__offset(14); if (o != 0) { __p.bb.PutUint(o + __p.bb_pos, u32); return true; } else { return false; } } 32 public long I64 { get { int o = __p.__offset(16); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } MutateI64MyGame.Example.TypeAliases33 public bool MutateI64(long i64) { int o = __p.__offset(16); if (o != 0) { __p.bb.PutLong(o + __p.bb_pos, i64); return true; } else { return false; } } 34 public ulong U64 { get { int o = __p.__offset(18); return o != 0 ? __p.bb.GetUlong(o + __p.bb_pos) : (ulong)0; } } MutateU64MyGame.Example.TypeAliases35 public bool MutateU64(ulong u64) { int o = __p.__offset(18); if (o != 0) { __p.bb.PutUlong(o + __p.bb_pos, u64); return true; } else { return false; } } 36 public float F32 { get { int o = __p.__offset(20); return o != 0 ? __p.bb.GetFloat(o + __p.bb_pos) : (float)0.0f; } } MutateF32MyGame.Example.TypeAliases37 public bool MutateF32(float f32) { int o = __p.__offset(20); if (o != 0) { __p.bb.PutFloat(o + __p.bb_pos, f32); return true; } else { return false; } } 38 public double F64 { get { int o = __p.__offset(22); return o != 0 ? __p.bb.GetDouble(o + __p.bb_pos) : (double)0.0; } } MutateF64MyGame.Example.TypeAliases39 public bool MutateF64(double f64) { int o = __p.__offset(22); if (o != 0) { __p.bb.PutDouble(o + __p.bb_pos, f64); return true; } else { return false; } } V8MyGame.Example.TypeAliases40 public sbyte V8(int j) { int o = __p.__offset(24); return o != 0 ? __p.bb.GetSbyte(__p.__vector(o) + j * 1) : (sbyte)0; } 41 public int V8Length { get { int o = __p.__offset(24); return o != 0 ? __p.__vector_len(o) : 0; } } 42 #if ENABLE_SPAN_T GetV8BytesMyGame.Example.TypeAliases43 public Span<byte> GetV8Bytes() { return __p.__vector_as_span(24); } 44 #else GetV8BytesMyGame.Example.TypeAliases45 public ArraySegment<byte>? GetV8Bytes() { return __p.__vector_as_arraysegment(24); } 46 #endif GetV8ArrayMyGame.Example.TypeAliases47 public sbyte[] GetV8Array() { return __p.__vector_as_array<sbyte>(24); } MutateV8MyGame.Example.TypeAliases48 public bool MutateV8(int j, sbyte v8) { int o = __p.__offset(24); if (o != 0) { __p.bb.PutSbyte(__p.__vector(o) + j * 1, v8); return true; } else { return false; } } Vf64MyGame.Example.TypeAliases49 public double Vf64(int j) { int o = __p.__offset(26); return o != 0 ? __p.bb.GetDouble(__p.__vector(o) + j * 8) : (double)0; } 50 public int Vf64Length { get { int o = __p.__offset(26); return o != 0 ? __p.__vector_len(o) : 0; } } 51 #if ENABLE_SPAN_T GetVf64BytesMyGame.Example.TypeAliases52 public Span<byte> GetVf64Bytes() { return __p.__vector_as_span(26); } 53 #else GetVf64BytesMyGame.Example.TypeAliases54 public ArraySegment<byte>? GetVf64Bytes() { return __p.__vector_as_arraysegment(26); } 55 #endif GetVf64ArrayMyGame.Example.TypeAliases56 public double[] GetVf64Array() { return __p.__vector_as_array<double>(26); } MutateVf64MyGame.Example.TypeAliases57 public bool MutateVf64(int j, double vf64) { int o = __p.__offset(26); if (o != 0) { __p.bb.PutDouble(__p.__vector(o) + j * 8, vf64); return true; } else { return false; } } 58 CreateTypeAliasesMyGame.Example.TypeAliases59 public static Offset<TypeAliases> CreateTypeAliases(FlatBufferBuilder builder, 60 sbyte i8 = 0, 61 byte u8 = 0, 62 short i16 = 0, 63 ushort u16 = 0, 64 int i32 = 0, 65 uint u32 = 0, 66 long i64 = 0, 67 ulong u64 = 0, 68 float f32 = 0.0f, 69 double f64 = 0.0, 70 VectorOffset v8Offset = default(VectorOffset), 71 VectorOffset vf64Offset = default(VectorOffset)) { 72 builder.StartObject(12); 73 TypeAliases.AddF64(builder, f64); 74 TypeAliases.AddU64(builder, u64); 75 TypeAliases.AddI64(builder, i64); 76 TypeAliases.AddVf64(builder, vf64Offset); 77 TypeAliases.AddV8(builder, v8Offset); 78 TypeAliases.AddF32(builder, f32); 79 TypeAliases.AddU32(builder, u32); 80 TypeAliases.AddI32(builder, i32); 81 TypeAliases.AddU16(builder, u16); 82 TypeAliases.AddI16(builder, i16); 83 TypeAliases.AddU8(builder, u8); 84 TypeAliases.AddI8(builder, i8); 85 return TypeAliases.EndTypeAliases(builder); 86 } 87 StartTypeAliasesMyGame.Example.TypeAliases88 public static void StartTypeAliases(FlatBufferBuilder builder) { builder.StartObject(12); } AddI8MyGame.Example.TypeAliases89 public static void AddI8(FlatBufferBuilder builder, sbyte i8) { builder.AddSbyte(0, i8, 0); } AddU8MyGame.Example.TypeAliases90 public static void AddU8(FlatBufferBuilder builder, byte u8) { builder.AddByte(1, u8, 0); } AddI16MyGame.Example.TypeAliases91 public static void AddI16(FlatBufferBuilder builder, short i16) { builder.AddShort(2, i16, 0); } AddU16MyGame.Example.TypeAliases92 public static void AddU16(FlatBufferBuilder builder, ushort u16) { builder.AddUshort(3, u16, 0); } AddI32MyGame.Example.TypeAliases93 public static void AddI32(FlatBufferBuilder builder, int i32) { builder.AddInt(4, i32, 0); } AddU32MyGame.Example.TypeAliases94 public static void AddU32(FlatBufferBuilder builder, uint u32) { builder.AddUint(5, u32, 0); } AddI64MyGame.Example.TypeAliases95 public static void AddI64(FlatBufferBuilder builder, long i64) { builder.AddLong(6, i64, 0); } AddU64MyGame.Example.TypeAliases96 public static void AddU64(FlatBufferBuilder builder, ulong u64) { builder.AddUlong(7, u64, 0); } AddF32MyGame.Example.TypeAliases97 public static void AddF32(FlatBufferBuilder builder, float f32) { builder.AddFloat(8, f32, 0.0f); } AddF64MyGame.Example.TypeAliases98 public static void AddF64(FlatBufferBuilder builder, double f64) { builder.AddDouble(9, f64, 0.0); } AddV8MyGame.Example.TypeAliases99 public static void AddV8(FlatBufferBuilder builder, VectorOffset v8Offset) { builder.AddOffset(10, v8Offset.Value, 0); } CreateV8VectorMyGame.Example.TypeAliases100 public static VectorOffset CreateV8Vector(FlatBufferBuilder builder, sbyte[] data) { builder.StartVector(1, data.Length, 1); for (int i = data.Length - 1; i >= 0; i--) builder.AddSbyte(data[i]); return builder.EndVector(); } CreateV8VectorBlockMyGame.Example.TypeAliases101 public static VectorOffset CreateV8VectorBlock(FlatBufferBuilder builder, sbyte[] data) { builder.StartVector(1, data.Length, 1); builder.Add(data); return builder.EndVector(); } StartV8VectorMyGame.Example.TypeAliases102 public static void StartV8Vector(FlatBufferBuilder builder, int numElems) { builder.StartVector(1, numElems, 1); } AddVf64MyGame.Example.TypeAliases103 public static void AddVf64(FlatBufferBuilder builder, VectorOffset vf64Offset) { builder.AddOffset(11, vf64Offset.Value, 0); } CreateVf64VectorMyGame.Example.TypeAliases104 public static VectorOffset CreateVf64Vector(FlatBufferBuilder builder, double[] data) { builder.StartVector(8, data.Length, 8); for (int i = data.Length - 1; i >= 0; i--) builder.AddDouble(data[i]); return builder.EndVector(); } CreateVf64VectorBlockMyGame.Example.TypeAliases105 public static VectorOffset CreateVf64VectorBlock(FlatBufferBuilder builder, double[] data) { builder.StartVector(8, data.Length, 8); builder.Add(data); return builder.EndVector(); } StartVf64VectorMyGame.Example.TypeAliases106 public static void StartVf64Vector(FlatBufferBuilder builder, int numElems) { builder.StartVector(8, numElems, 8); } EndTypeAliasesMyGame.Example.TypeAliases107 public static Offset<TypeAliases> EndTypeAliases(FlatBufferBuilder builder) { 108 int o = builder.EndObject(); 109 return new Offset<TypeAliases>(o); 110 } 111 }; 112 113 114 } 115