1 // automatically generated by the FlatBuffers compiler, do not modify 2 3 namespace NamespaceA 4 { 5 6 using System; 7 using FlatBuffers; 8 9 public struct TableInFirstNS : IFlatbufferObject 10 { 11 private Table __p; 12 public ByteBuffer ByteBuffer { get { return __p.bb; } } GetRootAsTableInFirstNSNamespaceA.TableInFirstNS13 public static TableInFirstNS GetRootAsTableInFirstNS(ByteBuffer _bb) { return GetRootAsTableInFirstNS(_bb, new TableInFirstNS()); } GetRootAsTableInFirstNSNamespaceA.TableInFirstNS14 public static TableInFirstNS GetRootAsTableInFirstNS(ByteBuffer _bb, TableInFirstNS obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } __initNamespaceA.TableInFirstNS15 public void __init(int _i, ByteBuffer _bb) { __p.bb_pos = _i; __p.bb = _bb; } __assignNamespaceA.TableInFirstNS16 public TableInFirstNS __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } 17 18 public NamespaceA.NamespaceB.TableInNestedNS? FooTable { get { int o = __p.__offset(4); return o != 0 ? (NamespaceA.NamespaceB.TableInNestedNS?)(new NamespaceA.NamespaceB.TableInNestedNS()).__assign(__p.__indirect(o + __p.bb_pos), __p.bb) : null; } } 19 public NamespaceA.NamespaceB.EnumInNestedNS FooEnum { get { int o = __p.__offset(6); return o != 0 ? (NamespaceA.NamespaceB.EnumInNestedNS)__p.bb.GetSbyte(o + __p.bb_pos) : NamespaceA.NamespaceB.EnumInNestedNS.A; } } MutateFooEnumNamespaceA.TableInFirstNS20 public bool MutateFooEnum(NamespaceA.NamespaceB.EnumInNestedNS foo_enum) { int o = __p.__offset(6); if (o != 0) { __p.bb.PutSbyte(o + __p.bb_pos, (sbyte)foo_enum); return true; } else { return false; } } 21 public NamespaceA.NamespaceB.StructInNestedNS? FooStruct { get { int o = __p.__offset(8); return o != 0 ? (NamespaceA.NamespaceB.StructInNestedNS?)(new NamespaceA.NamespaceB.StructInNestedNS()).__assign(o + __p.bb_pos, __p.bb) : null; } } 22 StartTableInFirstNSNamespaceA.TableInFirstNS23 public static void StartTableInFirstNS(FlatBufferBuilder builder) { builder.StartObject(3); } AddFooTableNamespaceA.TableInFirstNS24 public static void AddFooTable(FlatBufferBuilder builder, Offset<NamespaceA.NamespaceB.TableInNestedNS> fooTableOffset) { builder.AddOffset(0, fooTableOffset.Value, 0); } AddFooEnumNamespaceA.TableInFirstNS25 public static void AddFooEnum(FlatBufferBuilder builder, NamespaceA.NamespaceB.EnumInNestedNS fooEnum) { builder.AddSbyte(1, (sbyte)fooEnum, 0); } AddFooStructNamespaceA.TableInFirstNS26 public static void AddFooStruct(FlatBufferBuilder builder, Offset<NamespaceA.NamespaceB.StructInNestedNS> fooStructOffset) { builder.AddStruct(2, fooStructOffset.Value, 0); } EndTableInFirstNSNamespaceA.TableInFirstNS27 public static Offset<TableInFirstNS> EndTableInFirstNS(FlatBufferBuilder builder) { 28 int o = builder.EndObject(); 29 return new Offset<TableInFirstNS>(o); 30 } 31 }; 32 33 34 } 35