...

Text file src/github.com/google/flatbuffers/tests/union_vector/HandFan.cs

Documentation: github.com/google/flatbuffers/tests/union_vector

     1// <auto-generated>
     2//  automatically generated by the FlatBuffers compiler, do not modify
     3// </auto-generated>
     4
     5using global::System;
     6using global::System.Collections.Generic;
     7using global::Google.FlatBuffers;
     8
     9public struct HandFan : IFlatbufferObject
    10{
    11  private Table __p;
    12  public ByteBuffer ByteBuffer { get { return __p.bb; } }
    13  public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_23_5_26(); }
    14  public static HandFan GetRootAsHandFan(ByteBuffer _bb) { return GetRootAsHandFan(_bb, new HandFan()); }
    15  public static HandFan GetRootAsHandFan(ByteBuffer _bb, HandFan obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); }
    16  public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); }
    17  public HandFan __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
    18
    19  public int Length { get { int o = __p.__offset(4); return o != 0 ? __p.bb.GetInt(o + __p.bb_pos) : (int)0; } }
    20  public bool MutateLength(int length) { int o = __p.__offset(4); if (o != 0) { __p.bb.PutInt(o + __p.bb_pos, length); return true; } else { return false; } }
    21
    22  public static Offset<HandFan> CreateHandFan(FlatBufferBuilder builder,
    23      int length = 0) {
    24    builder.StartTable(1);
    25    HandFan.AddLength(builder, length);
    26    return HandFan.EndHandFan(builder);
    27  }
    28
    29  public static void StartHandFan(FlatBufferBuilder builder) { builder.StartTable(1); }
    30  public static void AddLength(FlatBufferBuilder builder, int length) { builder.AddInt(0, length, 0); }
    31  public static Offset<HandFan> EndHandFan(FlatBufferBuilder builder) {
    32    int o = builder.EndTable();
    33    return new Offset<HandFan>(o);
    34  }
    35  public HandFanT UnPack() {
    36    var _o = new HandFanT();
    37    this.UnPackTo(_o);
    38    return _o;
    39  }
    40  public void UnPackTo(HandFanT _o) {
    41    _o.Length = this.Length;
    42  }
    43  public static Offset<HandFan> Pack(FlatBufferBuilder builder, HandFanT _o) {
    44    if (_o == null) return default(Offset<HandFan>);
    45    return CreateHandFan(
    46      builder,
    47      _o.Length);
    48  }
    49}
    50
    51public class HandFanT
    52{
    53  [Newtonsoft.Json.JsonProperty("length")]
    54  public int Length { get; set; }
    55
    56  public HandFanT() {
    57    this.Length = 0;
    58  }
    59}
    60
    61
    62static public class HandFanVerify
    63{
    64  static public bool Verify(Google.FlatBuffers.Verifier verifier, uint tablePos)
    65  {
    66    return verifier.VerifyTableStart(tablePos)
    67      && verifier.VerifyField(tablePos, 4 /*Length*/, 4 /*int*/, 4, false)
    68      && verifier.VerifyTableEnd(tablePos);
    69  }
    70}

View as plain text