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

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

  protected static long getCPtr(ConstantDefinition 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_ConstantDefinition(swigCPtr);
      }
      swigCPtr = 0;
    }
  }

  public void setName(String value) {
    RobotRaconteurJavaJNI.ConstantDefinition_Name_set(swigCPtr, this, value);
  }

  public String getName() {
    return RobotRaconteurJavaJNI.ConstantDefinition_Name_get(swigCPtr, this);
  }

  public void setDocString(String value) {
    RobotRaconteurJavaJNI.ConstantDefinition_DocString_set(swigCPtr, this, value);
  }

  public String getDocString() {
    return RobotRaconteurJavaJNI.ConstantDefinition_DocString_get(swigCPtr, this);
  }

  public void setType(TypeDefinition value) {
    RobotRaconteurJavaJNI.ConstantDefinition_Type_set(swigCPtr, this, TypeDefinition.getCPtr(value), value);
  }

  public TypeDefinition getType() {
    long cPtr = RobotRaconteurJavaJNI.ConstantDefinition_Type_get(swigCPtr, this);
    return (cPtr == 0) ? null : new TypeDefinition(cPtr, true);
  }

  public void setValue(String value) {
    RobotRaconteurJavaJNI.ConstantDefinition_Value_set(swigCPtr, this, value);
  }

  public String getValue() {
    return RobotRaconteurJavaJNI.ConstantDefinition_Value_get(swigCPtr, this);
  }

  public void setParseInfo(ServiceDefinitionParseInfo value) {
    RobotRaconteurJavaJNI.ConstantDefinition_ParseInfo_set(swigCPtr, this, ServiceDefinitionParseInfo.getCPtr(value), value);
  }

  public ServiceDefinitionParseInfo getParseInfo() {
    long cPtr = RobotRaconteurJavaJNI.ConstantDefinition_ParseInfo_get(swigCPtr, this);
    return (cPtr == 0) ? null : new ServiceDefinitionParseInfo(cPtr, false);
  }

  public ServiceDefinition getService() {
    long cPtr = RobotRaconteurJavaJNI.ConstantDefinition_getService(swigCPtr, this);
    return (cPtr == 0) ? null : new ServiceDefinition(cPtr, true);
  }

  public void setService(ServiceDefinition value) {
    RobotRaconteurJavaJNI.ConstantDefinition_setService(swigCPtr, this, ServiceDefinition.getCPtr(value), value);
  }

  public ServiceEntryDefinition getServiceEntry() {
    long cPtr = RobotRaconteurJavaJNI.ConstantDefinition_getServiceEntry(swigCPtr, this);
    return (cPtr == 0) ? null : new ServiceEntryDefinition(cPtr, true);
  }

  public void setServiceEntry(ServiceEntryDefinition value) {
    RobotRaconteurJavaJNI.ConstantDefinition_setServiceEntry(swigCPtr, this, ServiceEntryDefinition.getCPtr(value), value);
  }

  public ConstantDefinition(ServiceDefinition service) {
    this(RobotRaconteurJavaJNI.new_ConstantDefinition__SWIG_0(ServiceDefinition.getCPtr(service), service), true);
  }

  public ConstantDefinition(ServiceEntryDefinition service_entry) {
    this(RobotRaconteurJavaJNI.new_ConstantDefinition__SWIG_1(ServiceEntryDefinition.getCPtr(service_entry), service_entry), true);
  }

  public String toString() {
    return RobotRaconteurJavaJNI.ConstantDefinition_toString(swigCPtr, this);
  }

  public void fromString(String s, ServiceDefinitionParseInfo parse_info) {
    RobotRaconteurJavaJNI.ConstantDefinition_fromString__SWIG_0(swigCPtr, this, s, ServiceDefinitionParseInfo.getCPtr(parse_info), parse_info);
  }

  public void fromString(String s) {
    RobotRaconteurJavaJNI.ConstantDefinition_fromString__SWIG_1(swigCPtr, this, s);
  }

  public void reset() {
    RobotRaconteurJavaJNI.ConstantDefinition_reset(swigCPtr, this);
  }

  public boolean verifyValue() {
    return RobotRaconteurJavaJNI.ConstantDefinition_verifyValue(swigCPtr, this);
  }

  public String valueToString() {
    return RobotRaconteurJavaJNI.ConstantDefinition_valueToString(swigCPtr, this);
  }

  public vector_constantdefinition_structfield valueToStructFields() {
    return new vector_constantdefinition_structfield(RobotRaconteurJavaJNI.ConstantDefinition_valueToStructFields(swigCPtr, this), true);
  }

  public static String unescapeString(String in) {
    return RobotRaconteurJavaJNI.ConstantDefinition_unescapeString(in);
  }

  public static String escapeString(String in) {
    return RobotRaconteurJavaJNI.ConstantDefinition_escapeString(in);
  }

}
