/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 4.0.2
 *
 * Do not make changes to this file unless you know what you are doing--modify
 * the SWIG interface file instead.
 * ----------------------------------------------------------------------------- */

package com.robotraconteur;

public class WrappedNamedMultiDimArrayMemoryClient {
  private transient long swigCPtr;
  private transient boolean swigCMemOwn;

  protected WrappedNamedMultiDimArrayMemoryClient(long cPtr, boolean cMemoryOwn) {
    swigCMemOwn = cMemoryOwn;
    swigCPtr = cPtr;
  }

  protected static long getCPtr(WrappedNamedMultiDimArrayMemoryClient obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }

  protected void swigSetCMemOwn(boolean own) {
    swigCMemOwn = own;
  }

  @SuppressWarnings("deprecation")
  protected void finalize() {
    delete();
  }

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwn) {
        swigCMemOwn = false;
        RobotRaconteurJavaJNI.delete_WrappedNamedMultiDimArrayMemoryClient(swigCPtr);
      }
      swigCPtr = 0;
    }
  }

  public vector_uint64_t dimensions() {
    return new vector_uint64_t(RobotRaconteurJavaJNI.WrappedNamedMultiDimArrayMemoryClient_dimensions(swigCPtr, this), true);
  }

  public java.math.BigInteger dimCount() {
    return RobotRaconteurJavaJNI.WrappedNamedMultiDimArrayMemoryClient_dimCount(swigCPtr, this);
  }

  public MemberDefinition_Direction direction() {
    return MemberDefinition_Direction.swigToEnum(RobotRaconteurJavaJNI.WrappedNamedMultiDimArrayMemoryClient_direction(swigCPtr, this));
  }

  public void read(vector_uint64_t memorypos, WrappedNamedMultiDimArrayMemoryClientBuffer buffer, vector_uint64_t bufferpos, vector_uint64_t count) {
    RobotRaconteurJavaJNI.WrappedNamedMultiDimArrayMemoryClient_read(swigCPtr, this, vector_uint64_t.getCPtr(memorypos), memorypos, WrappedNamedMultiDimArrayMemoryClientBuffer.getCPtr(buffer), buffer, vector_uint64_t.getCPtr(bufferpos), bufferpos, vector_uint64_t.getCPtr(count), count);
  }

  public void write(vector_uint64_t memorypos, WrappedNamedMultiDimArrayMemoryClientBuffer buffer, vector_uint64_t bufferpos, vector_uint64_t count) {
    RobotRaconteurJavaJNI.WrappedNamedMultiDimArrayMemoryClient_write(swigCPtr, this, vector_uint64_t.getCPtr(memorypos), memorypos, WrappedNamedMultiDimArrayMemoryClientBuffer.getCPtr(buffer), buffer, vector_uint64_t.getCPtr(bufferpos), bufferpos, vector_uint64_t.getCPtr(count), count);
  }

}
