All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.lionweb.serialization.flatbuffers.gen.FBBulkImport Maven / Gradle / Ivy

The newest version!
// automatically generated by the FlatBuffers compiler, do not modify

package io.lionweb.serialization.flatbuffers.gen;

import com.google.flatbuffers.BaseVector;
import com.google.flatbuffers.Constants;
import com.google.flatbuffers.FlatBufferBuilder;
import com.google.flatbuffers.Table;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;

@SuppressWarnings("unused")
public final class FBBulkImport extends Table {
  public static void ValidateVersion() {
    Constants.FLATBUFFERS_24_3_25();
  }

  public static FBBulkImport getRootAsFBBulkImport(ByteBuffer _bb) {
    return getRootAsFBBulkImport(_bb, new FBBulkImport());
  }

  public static FBBulkImport getRootAsFBBulkImport(ByteBuffer _bb, FBBulkImport obj) {
    _bb.order(ByteOrder.LITTLE_ENDIAN);
    return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb));
  }

  public void __init(int _i, ByteBuffer _bb) {
    __reset(_i, _bb);
  }

  public FBBulkImport __assign(int _i, ByteBuffer _bb) {
    __init(_i, _bb);
    return this;
  }

  public io.lionweb.serialization.flatbuffers.gen.FBAttachPoint attachPoints(int j) {
    return attachPoints(new io.lionweb.serialization.flatbuffers.gen.FBAttachPoint(), j);
  }

  public io.lionweb.serialization.flatbuffers.gen.FBAttachPoint attachPoints(
      io.lionweb.serialization.flatbuffers.gen.FBAttachPoint obj, int j) {
    int o = __offset(4);
    return o != 0 ? obj.__assign(__indirect(__vector(o) + j * 4), bb) : null;
  }

  public int attachPointsLength() {
    int o = __offset(4);
    return o != 0 ? __vector_len(o) : 0;
  }

  public io.lionweb.serialization.flatbuffers.gen.FBAttachPoint.Vector attachPointsVector() {
    return attachPointsVector(new io.lionweb.serialization.flatbuffers.gen.FBAttachPoint.Vector());
  }

  public io.lionweb.serialization.flatbuffers.gen.FBAttachPoint.Vector attachPointsVector(
      io.lionweb.serialization.flatbuffers.gen.FBAttachPoint.Vector obj) {
    int o = __offset(4);
    return o != 0 ? obj.__assign(__vector(o), 4, bb) : null;
  }

  public io.lionweb.serialization.flatbuffers.gen.FBNode nodes(int j) {
    return nodes(new io.lionweb.serialization.flatbuffers.gen.FBNode(), j);
  }

  public io.lionweb.serialization.flatbuffers.gen.FBNode nodes(
      io.lionweb.serialization.flatbuffers.gen.FBNode obj, int j) {
    int o = __offset(6);
    return o != 0 ? obj.__assign(__indirect(__vector(o) + j * 4), bb) : null;
  }

  public int nodesLength() {
    int o = __offset(6);
    return o != 0 ? __vector_len(o) : 0;
  }

  public io.lionweb.serialization.flatbuffers.gen.FBNode.Vector nodesVector() {
    return nodesVector(new io.lionweb.serialization.flatbuffers.gen.FBNode.Vector());
  }

  public io.lionweb.serialization.flatbuffers.gen.FBNode.Vector nodesVector(
      io.lionweb.serialization.flatbuffers.gen.FBNode.Vector obj) {
    int o = __offset(6);
    return o != 0 ? obj.__assign(__vector(o), 4, bb) : null;
  }

  public static int createFBBulkImport(
      FlatBufferBuilder builder, int attachPointsOffset, int nodesOffset) {
    builder.startTable(2);
    FBBulkImport.addNodes(builder, nodesOffset);
    FBBulkImport.addAttachPoints(builder, attachPointsOffset);
    return FBBulkImport.endFBBulkImport(builder);
  }

  public static void startFBBulkImport(FlatBufferBuilder builder) {
    builder.startTable(2);
  }

  public static void addAttachPoints(FlatBufferBuilder builder, int attachPointsOffset) {
    builder.addOffset(0, attachPointsOffset, 0);
  }

  public static int createAttachPointsVector(FlatBufferBuilder builder, int[] data) {
    builder.startVector(4, data.length, 4);
    for (int i = data.length - 1; i >= 0; i--) builder.addOffset(data[i]);
    return builder.endVector();
  }

  public static void startAttachPointsVector(FlatBufferBuilder builder, int numElems) {
    builder.startVector(4, numElems, 4);
  }

  public static void addNodes(FlatBufferBuilder builder, int nodesOffset) {
    builder.addOffset(1, nodesOffset, 0);
  }

  public static int createNodesVector(FlatBufferBuilder builder, int[] data) {
    builder.startVector(4, data.length, 4);
    for (int i = data.length - 1; i >= 0; i--) builder.addOffset(data[i]);
    return builder.endVector();
  }

  public static void startNodesVector(FlatBufferBuilder builder, int numElems) {
    builder.startVector(4, numElems, 4);
  }

  public static int endFBBulkImport(FlatBufferBuilder builder) {
    int o = builder.endTable();
    return o;
  }

  public static void finishFBBulkImportBuffer(FlatBufferBuilder builder, int offset) {
    builder.finish(offset);
  }

  public static void finishSizePrefixedFBBulkImportBuffer(FlatBufferBuilder builder, int offset) {
    builder.finishSizePrefixed(offset);
  }

  public static final class Vector extends BaseVector {
    public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) {
      __reset(_vector, _element_size, _bb);
      return this;
    }

    public FBBulkImport get(int j) {
      return get(new FBBulkImport(), j);
    }

    public FBBulkImport get(FBBulkImport obj, int j) {
      return obj.__assign(__indirect(__element(j), bb), bb);
    }
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy