org.nd4j.graph.FlatTiming Maven / Gradle / Ivy
// automatically generated by the FlatBuffers compiler, do not modify
package org.nd4j.graph;
import java.nio.*;
import java.lang.*;
import java.nio.ByteOrder;
import java.util.*;
import com.google.flatbuffers.*;
@SuppressWarnings("unused")
public final class FlatTiming extends Table {
public static FlatTiming getRootAsFlatTiming(ByteBuffer _bb) { return getRootAsFlatTiming(_bb, new FlatTiming()); }
public static FlatTiming getRootAsFlatTiming(ByteBuffer _bb, FlatTiming 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 FlatTiming __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
public int id() { int o = __offset(4); return o != 0 ? bb.getInt(o + bb_pos) : 0; }
public String name() { int o = __offset(6); return o != 0 ? __string(o + bb_pos) : null; }
public ByteBuffer nameAsByteBuffer() { return __vector_as_bytebuffer(6, 1); }
public LongPair timing() { return timing(new LongPair()); }
public LongPair timing(LongPair obj) { int o = __offset(8); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; }
public static int createFlatTiming(FlatBufferBuilder builder,
int id,
int nameOffset,
int timingOffset) {
builder.startObject(3);
FlatTiming.addTiming(builder, timingOffset);
FlatTiming.addName(builder, nameOffset);
FlatTiming.addId(builder, id);
return FlatTiming.endFlatTiming(builder);
}
public static void startFlatTiming(FlatBufferBuilder builder) { builder.startObject(3); }
public static void addId(FlatBufferBuilder builder, int id) { builder.addInt(0, id, 0); }
public static void addName(FlatBufferBuilder builder, int nameOffset) { builder.addOffset(1, nameOffset, 0); }
public static void addTiming(FlatBufferBuilder builder, int timingOffset) { builder.addOffset(2, timingOffset, 0); }
public static int endFlatTiming(FlatBufferBuilder builder) {
int o = builder.endObject();
return o;
}
}