1 // <auto-generated>
2 //  automatically generated by the FlatBuffers compiler, do not modify
3 // </auto-generated>
4 
5 namespace Apache.Arrow.Flatbuf
6 {
7 
8 using global::System;
9 using global::FlatBuffers;
10 
11 internal struct Decimal : IFlatbufferObject
12 {
13   private Table __p;
14   public ByteBuffer ByteBuffer { get { return __p.bb; } }
GetRootAsDecimalApache.Arrow.Flatbuf.Decimal15   public static Decimal GetRootAsDecimal(ByteBuffer _bb) { return GetRootAsDecimal(_bb, new Decimal()); }
GetRootAsDecimalApache.Arrow.Flatbuf.Decimal16   public static Decimal GetRootAsDecimal(ByteBuffer _bb, Decimal obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); }
__initApache.Arrow.Flatbuf.Decimal17   public void __init(int _i, ByteBuffer _bb) { __p.bb_pos = _i; __p.bb = _bb; }
__assignApache.Arrow.Flatbuf.Decimal18   public Decimal __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
19 
20   /// Total number of decimal digits
21   public int Precision { get { int o = __p.__offset(4); return o != 0 ? __p.bb.GetInt(o + __p.bb_pos) : (int)0; } }
22   /// Number of digits after the decimal point "."
23   public int Scale { get { int o = __p.__offset(6); return o != 0 ? __p.bb.GetInt(o + __p.bb_pos) : (int)0; } }
24 
CreateDecimalApache.Arrow.Flatbuf.Decimal25   public static Offset<Decimal> CreateDecimal(FlatBufferBuilder builder,
26       int precision = 0,
27       int scale = 0) {
28     builder.StartObject(2);
29     Decimal.AddScale(builder, scale);
30     Decimal.AddPrecision(builder, precision);
31     return Decimal.EndDecimal(builder);
32   }
33 
StartDecimalApache.Arrow.Flatbuf.Decimal34   public static void StartDecimal(FlatBufferBuilder builder) { builder.StartObject(2); }
AddPrecisionApache.Arrow.Flatbuf.Decimal35   public static void AddPrecision(FlatBufferBuilder builder, int precision) { builder.AddInt(0, precision, 0); }
AddScaleApache.Arrow.Flatbuf.Decimal36   public static void AddScale(FlatBufferBuilder builder, int scale) { builder.AddInt(1, scale, 0); }
EndDecimalApache.Arrow.Flatbuf.Decimal37   public static Offset<Decimal> EndDecimal(FlatBufferBuilder builder) {
38     int o = builder.EndObject();
39     return new Offset<Decimal>(o);
40   }
41 };
42 
43 
44 }
45