/* ----------------------------------------------------------------------------
 * 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 WrappedMultiDimArrayMemoryDirector {
  private transient long swigCPtr;
  protected transient boolean swigCMemOwn;

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

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

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

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

  protected void swigDirectorDisconnect() {
    swigCMemOwn = false;
    delete();
  }

  public void swigReleaseOwnership() {
    swigCMemOwn = false;
    RobotRaconteurJavaJNI.WrappedMultiDimArrayMemoryDirector_change_ownership(this, swigCPtr, false);
  }

  public void swigTakeOwnership() {
    swigCMemOwn = true;
    RobotRaconteurJavaJNI.WrappedMultiDimArrayMemoryDirector_change_ownership(this, swigCPtr, true);
  }

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

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

  public void read(WrappedMultiDimArrayMemoryParams p) {
    RobotRaconteurJavaJNI.WrappedMultiDimArrayMemoryDirector_read(swigCPtr, this, WrappedMultiDimArrayMemoryParams.getCPtr(p), p);
  }

  public void write(WrappedMultiDimArrayMemoryParams p) {
    RobotRaconteurJavaJNI.WrappedMultiDimArrayMemoryDirector_write(swigCPtr, this, WrappedMultiDimArrayMemoryParams.getCPtr(p), p);
  }

  public void setObjectheapid(int value) {
    RobotRaconteurJavaJNI.WrappedMultiDimArrayMemoryDirector_objectheapid_set(swigCPtr, this, value);
  }

  public int getObjectheapid() {
    return RobotRaconteurJavaJNI.WrappedMultiDimArrayMemoryDirector_objectheapid_get(swigCPtr, this);
  }

  public WrappedMultiDimArrayMemoryDirector() {
    this(RobotRaconteurJavaJNI.new_WrappedMultiDimArrayMemoryDirector(), true);
    RobotRaconteurJavaJNI.WrappedMultiDimArrayMemoryDirector_director_connect(this, swigCPtr, true, true);
  }

}
