/* ----------------------------------------------------------------------------
 * 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 MessageElementData extends RRValue {
  private transient long swigCPtr;
  private transient boolean swigCMemOwnDerived;

  protected MessageElementData(long cPtr, boolean cMemoryOwn) {
    super(RobotRaconteurJavaJNI.MessageElementData_SWIGSmartPtrUpcast(cPtr), true);
    swigCMemOwnDerived = cMemoryOwn;
    swigCPtr = cPtr;
  }

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

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

  public synchronized void delete() {
    if(swigCPtr != 0 && swigCMemOwnDerived) {
      swigCMemOwnDerived = false;
      RobotRaconteurJavaJNI.delete_MessageElementData(swigCPtr);
    }
    swigCPtr = 0;
    super.delete();
  }

  public String getTypeString() {
    return RobotRaconteurJavaJNI.MessageElementData_getTypeString(swigCPtr, this);
  }

  public DataTypes getTypeID() {
    return DataTypes.swigToEnum(RobotRaconteurJavaJNI.MessageElementData_getTypeID(swigCPtr, this));
  }

}
