2016-05-26 13:26:58 +00:00
|
|
|
// automatically generated by the FlatBuffers compiler, do not modify
|
2014-09-25 22:53:56 +00:00
|
|
|
|
|
|
|
package MyGame.Example;
|
|
|
|
|
|
|
|
import java.nio.*;
|
|
|
|
import java.lang.*;
|
|
|
|
import java.util.*;
|
|
|
|
import com.google.flatbuffers.*;
|
|
|
|
|
2015-10-06 00:39:08 +00:00
|
|
|
@SuppressWarnings("unused")
|
2015-04-06 23:42:08 +00:00
|
|
|
public final class Stat extends Table {
|
2015-01-30 22:09:59 +00:00
|
|
|
public static Stat getRootAsStat(ByteBuffer _bb) { return getRootAsStat(_bb, new Stat()); }
|
2016-08-13 01:01:38 +00:00
|
|
|
public static Stat getRootAsStat(ByteBuffer _bb, Stat obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); }
|
|
|
|
public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; }
|
|
|
|
public Stat __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
|
2014-09-25 22:53:56 +00:00
|
|
|
|
|
|
|
public String id() { int o = __offset(4); return o != 0 ? __string(o + bb_pos) : null; }
|
|
|
|
public ByteBuffer idAsByteBuffer() { return __vector_as_bytebuffer(4, 1); }
|
2016-10-21 21:27:15 +00:00
|
|
|
public long val() { int o = __offset(6); return o != 0 ? bb.getLong(o + bb_pos) : 0L; }
|
2015-08-01 16:07:10 +00:00
|
|
|
public boolean mutateVal(long val) { int o = __offset(6); if (o != 0) { bb.putLong(o + bb_pos, val); return true; } else { return false; } }
|
2015-03-19 00:52:39 +00:00
|
|
|
public int count() { int o = __offset(8); return o != 0 ? bb.getShort(o + bb_pos) & 0xFFFF : 0; }
|
2015-08-07 06:05:08 +00:00
|
|
|
public boolean mutateCount(int count) { int o = __offset(8); if (o != 0) { bb.putShort(o + bb_pos, (short)count); return true; } else { return false; } }
|
2014-09-25 22:53:56 +00:00
|
|
|
|
|
|
|
public static int createStat(FlatBufferBuilder builder,
|
2015-11-14 04:39:46 +00:00
|
|
|
int idOffset,
|
2015-03-19 00:52:39 +00:00
|
|
|
long val,
|
|
|
|
int count) {
|
|
|
|
builder.startObject(3);
|
2014-09-25 22:53:56 +00:00
|
|
|
Stat.addVal(builder, val);
|
2015-11-14 04:39:46 +00:00
|
|
|
Stat.addId(builder, idOffset);
|
2015-03-19 00:52:39 +00:00
|
|
|
Stat.addCount(builder, count);
|
2014-09-25 22:53:56 +00:00
|
|
|
return Stat.endStat(builder);
|
|
|
|
}
|
|
|
|
|
2015-03-19 00:52:39 +00:00
|
|
|
public static void startStat(FlatBufferBuilder builder) { builder.startObject(3); }
|
2014-09-25 22:53:56 +00:00
|
|
|
public static void addId(FlatBufferBuilder builder, int idOffset) { builder.addOffset(0, idOffset, 0); }
|
2016-10-21 21:27:15 +00:00
|
|
|
public static void addVal(FlatBufferBuilder builder, long val) { builder.addLong(1, val, 0L); }
|
|
|
|
public static void addCount(FlatBufferBuilder builder, int count) { builder.addShort(2, (short)count, (short)0); }
|
2014-09-25 22:53:56 +00:00
|
|
|
public static int endStat(FlatBufferBuilder builder) {
|
|
|
|
int o = builder.endObject();
|
|
|
|
return o;
|
|
|
|
}
|
2016-07-15 13:35:24 +00:00
|
|
|
}
|
2014-09-25 22:53:56 +00:00
|
|
|
|