Austin Schuh | e89fa2d | 2019-08-14 20:24:23 -0700 | [diff] [blame^] | 1 | // <auto-generated> |
| 2 | // automatically generated by the FlatBuffers compiler, do not modify |
| 3 | // </auto-generated> |
| 4 | |
| 5 | namespace MyGame |
| 6 | { |
| 7 | |
| 8 | using global::System; |
| 9 | using global::FlatBuffers; |
| 10 | |
| 11 | public struct MonsterExtra : IFlatbufferObject |
| 12 | { |
| 13 | private Table __p; |
| 14 | public ByteBuffer ByteBuffer { get { return __p.bb; } } |
| 15 | public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_1_11_1(); } |
| 16 | public static MonsterExtra GetRootAsMonsterExtra(ByteBuffer _bb) { return GetRootAsMonsterExtra(_bb, new MonsterExtra()); } |
| 17 | public static MonsterExtra GetRootAsMonsterExtra(ByteBuffer _bb, MonsterExtra obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } |
| 18 | public static bool MonsterExtraBufferHasIdentifier(ByteBuffer _bb) { return Table.__has_identifier(_bb, "MONE"); } |
| 19 | public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); } |
| 20 | public MonsterExtra __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } |
| 21 | |
| 22 | public double D0 { get { int o = __p.__offset(4); return o != 0 ? __p.bb.GetDouble(o + __p.bb_pos) : (double)Double.NaN; } } |
| 23 | public bool MutateD0(double d0) { int o = __p.__offset(4); if (o != 0) { __p.bb.PutDouble(o + __p.bb_pos, d0); return true; } else { return false; } } |
| 24 | public double D1 { get { int o = __p.__offset(6); return o != 0 ? __p.bb.GetDouble(o + __p.bb_pos) : (double)Double.NaN; } } |
| 25 | public bool MutateD1(double d1) { int o = __p.__offset(6); if (o != 0) { __p.bb.PutDouble(o + __p.bb_pos, d1); return true; } else { return false; } } |
| 26 | public double D2 { get { int o = __p.__offset(8); return o != 0 ? __p.bb.GetDouble(o + __p.bb_pos) : (double)Double.PositiveInfinity; } } |
| 27 | public bool MutateD2(double d2) { int o = __p.__offset(8); if (o != 0) { __p.bb.PutDouble(o + __p.bb_pos, d2); return true; } else { return false; } } |
| 28 | public double D3 { get { int o = __p.__offset(10); return o != 0 ? __p.bb.GetDouble(o + __p.bb_pos) : (double)Double.NegativeInfinity; } } |
| 29 | public bool MutateD3(double d3) { int o = __p.__offset(10); if (o != 0) { __p.bb.PutDouble(o + __p.bb_pos, d3); return true; } else { return false; } } |
| 30 | public float F0 { get { int o = __p.__offset(12); return o != 0 ? __p.bb.GetFloat(o + __p.bb_pos) : (float)Single.NaN; } } |
| 31 | public bool MutateF0(float f0) { int o = __p.__offset(12); if (o != 0) { __p.bb.PutFloat(o + __p.bb_pos, f0); return true; } else { return false; } } |
| 32 | public float F1 { get { int o = __p.__offset(14); return o != 0 ? __p.bb.GetFloat(o + __p.bb_pos) : (float)Single.NaN; } } |
| 33 | public bool MutateF1(float f1) { int o = __p.__offset(14); if (o != 0) { __p.bb.PutFloat(o + __p.bb_pos, f1); return true; } else { return false; } } |
| 34 | public float F2 { get { int o = __p.__offset(16); return o != 0 ? __p.bb.GetFloat(o + __p.bb_pos) : (float)Single.PositiveInfinity; } } |
| 35 | public bool MutateF2(float f2) { int o = __p.__offset(16); if (o != 0) { __p.bb.PutFloat(o + __p.bb_pos, f2); return true; } else { return false; } } |
| 36 | public float F3 { get { int o = __p.__offset(18); return o != 0 ? __p.bb.GetFloat(o + __p.bb_pos) : (float)Single.NegativeInfinity; } } |
| 37 | public bool MutateF3(float f3) { int o = __p.__offset(18); if (o != 0) { __p.bb.PutFloat(o + __p.bb_pos, f3); return true; } else { return false; } } |
| 38 | public double Dvec(int j) { int o = __p.__offset(20); return o != 0 ? __p.bb.GetDouble(__p.__vector(o) + j * 8) : (double)0; } |
| 39 | public int DvecLength { get { int o = __p.__offset(20); return o != 0 ? __p.__vector_len(o) : 0; } } |
| 40 | #if ENABLE_SPAN_T |
| 41 | public Span<byte> GetDvecBytes() { return __p.__vector_as_span(20); } |
| 42 | #else |
| 43 | public ArraySegment<byte>? GetDvecBytes() { return __p.__vector_as_arraysegment(20); } |
| 44 | #endif |
| 45 | public double[] GetDvecArray() { return __p.__vector_as_array<double>(20); } |
| 46 | public bool MutateDvec(int j, double dvec) { int o = __p.__offset(20); if (o != 0) { __p.bb.PutDouble(__p.__vector(o) + j * 8, dvec); return true; } else { return false; } } |
| 47 | public float Fvec(int j) { int o = __p.__offset(22); return o != 0 ? __p.bb.GetFloat(__p.__vector(o) + j * 4) : (float)0; } |
| 48 | public int FvecLength { get { int o = __p.__offset(22); return o != 0 ? __p.__vector_len(o) : 0; } } |
| 49 | #if ENABLE_SPAN_T |
| 50 | public Span<byte> GetFvecBytes() { return __p.__vector_as_span(22); } |
| 51 | #else |
| 52 | public ArraySegment<byte>? GetFvecBytes() { return __p.__vector_as_arraysegment(22); } |
| 53 | #endif |
| 54 | public float[] GetFvecArray() { return __p.__vector_as_array<float>(22); } |
| 55 | public bool MutateFvec(int j, float fvec) { int o = __p.__offset(22); if (o != 0) { __p.bb.PutFloat(__p.__vector(o) + j * 4, fvec); return true; } else { return false; } } |
| 56 | |
| 57 | public static Offset<MyGame.MonsterExtra> CreateMonsterExtra(FlatBufferBuilder builder, |
| 58 | double d0 = Double.NaN, |
| 59 | double d1 = Double.NaN, |
| 60 | double d2 = Double.PositiveInfinity, |
| 61 | double d3 = Double.NegativeInfinity, |
| 62 | float f0 = Single.NaN, |
| 63 | float f1 = Single.NaN, |
| 64 | float f2 = Single.PositiveInfinity, |
| 65 | float f3 = Single.NegativeInfinity, |
| 66 | VectorOffset dvecOffset = default(VectorOffset), |
| 67 | VectorOffset fvecOffset = default(VectorOffset)) { |
| 68 | builder.StartTable(10); |
| 69 | MonsterExtra.AddD3(builder, d3); |
| 70 | MonsterExtra.AddD2(builder, d2); |
| 71 | MonsterExtra.AddD1(builder, d1); |
| 72 | MonsterExtra.AddD0(builder, d0); |
| 73 | MonsterExtra.AddFvec(builder, fvecOffset); |
| 74 | MonsterExtra.AddDvec(builder, dvecOffset); |
| 75 | MonsterExtra.AddF3(builder, f3); |
| 76 | MonsterExtra.AddF2(builder, f2); |
| 77 | MonsterExtra.AddF1(builder, f1); |
| 78 | MonsterExtra.AddF0(builder, f0); |
| 79 | return MonsterExtra.EndMonsterExtra(builder); |
| 80 | } |
| 81 | |
| 82 | public static void StartMonsterExtra(FlatBufferBuilder builder) { builder.StartTable(10); } |
| 83 | public static void AddD0(FlatBufferBuilder builder, double d0) { builder.AddDouble(0, d0, Double.NaN); } |
| 84 | public static void AddD1(FlatBufferBuilder builder, double d1) { builder.AddDouble(1, d1, Double.NaN); } |
| 85 | public static void AddD2(FlatBufferBuilder builder, double d2) { builder.AddDouble(2, d2, Double.PositiveInfinity); } |
| 86 | public static void AddD3(FlatBufferBuilder builder, double d3) { builder.AddDouble(3, d3, Double.NegativeInfinity); } |
| 87 | public static void AddF0(FlatBufferBuilder builder, float f0) { builder.AddFloat(4, f0, Single.NaN); } |
| 88 | public static void AddF1(FlatBufferBuilder builder, float f1) { builder.AddFloat(5, f1, Single.NaN); } |
| 89 | public static void AddF2(FlatBufferBuilder builder, float f2) { builder.AddFloat(6, f2, Single.PositiveInfinity); } |
| 90 | public static void AddF3(FlatBufferBuilder builder, float f3) { builder.AddFloat(7, f3, Single.NegativeInfinity); } |
| 91 | public static void AddDvec(FlatBufferBuilder builder, VectorOffset dvecOffset) { builder.AddOffset(8, dvecOffset.Value, 0); } |
| 92 | public static VectorOffset CreateDvecVector(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(); } |
| 93 | public static VectorOffset CreateDvecVectorBlock(FlatBufferBuilder builder, double[] data) { builder.StartVector(8, data.Length, 8); builder.Add(data); return builder.EndVector(); } |
| 94 | public static void StartDvecVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(8, numElems, 8); } |
| 95 | public static void AddFvec(FlatBufferBuilder builder, VectorOffset fvecOffset) { builder.AddOffset(9, fvecOffset.Value, 0); } |
| 96 | public static VectorOffset CreateFvecVector(FlatBufferBuilder builder, float[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddFloat(data[i]); return builder.EndVector(); } |
| 97 | public static VectorOffset CreateFvecVectorBlock(FlatBufferBuilder builder, float[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); } |
| 98 | public static void StartFvecVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); } |
| 99 | public static Offset<MyGame.MonsterExtra> EndMonsterExtra(FlatBufferBuilder builder) { |
| 100 | int o = builder.EndTable(); |
| 101 | return new Offset<MyGame.MonsterExtra>(o); |
| 102 | } |
| 103 | public static void FinishMonsterExtraBuffer(FlatBufferBuilder builder, Offset<MyGame.MonsterExtra> offset) { builder.Finish(offset.Value, "MONE"); } |
| 104 | public static void FinishSizePrefixedMonsterExtraBuffer(FlatBufferBuilder builder, Offset<MyGame.MonsterExtra> offset) { builder.FinishSizePrefixed(offset.Value, "MONE"); } |
| 105 | }; |
| 106 | |
| 107 | |
| 108 | } |