//------------------------------------------------------------------------------
// <auto-generated />
//
// 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.
//------------------------------------------------------------------------------

namespace  Nlc {

public class OdTypesHelper : global::System.IDisposable {
  private global::System.Runtime.InteropServices.HandleRef swigCPtr;
  protected bool swigCMemOwn;

  internal OdTypesHelper(global::System.IntPtr cPtr, bool cMemoryOwn) {
    swigCMemOwn = cMemoryOwn;
    swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
  }

  internal static global::System.Runtime.InteropServices.HandleRef getCPtr(OdTypesHelper obj) {
    return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
  }

  ~OdTypesHelper() {
    Dispose(false);
  }

  public void Dispose() {
    Dispose(true);
    global::System.GC.SuppressFinalize(this);
  }

  protected virtual void Dispose(bool disposing) {
    lock(this) {
      if (swigCPtr.Handle != global::System.IntPtr.Zero) {
        if (swigCMemOwn) {
          swigCMemOwn = false;
          throw new global::System.MethodAccessException("C++ destructor does not have public access");
        }
        swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
      }
    }
  }

  public static ObjectCode uintToObjectCode(uint objectCode) {
    ObjectCode ret = (ObjectCode)NanolibPINVOKE.OdTypesHelper_uintToObjectCode(objectCode);
    return ret;
  }

  public static bool isNumericDataType(ObjectEntryDataType dataType) {
    bool ret = NanolibPINVOKE.OdTypesHelper_isNumericDataType((int)dataType);
    return ret;
  }

  public static bool isDefstructIndex(ushort typeNum) {
    bool ret = NanolibPINVOKE.OdTypesHelper_isDefstructIndex(typeNum);
    return ret;
  }

  public static bool isDeftypeIndex(ushort typeNum) {
    bool ret = NanolibPINVOKE.OdTypesHelper_isDeftypeIndex(typeNum);
    return ret;
  }

  public static bool isComplexDataType(ObjectEntryDataType dataType) {
    bool ret = NanolibPINVOKE.OdTypesHelper_isComplexDataType((int)dataType);
    return ret;
  }

  public static ObjectEntryDataType uintToObjectEntryDataType(ushort objectDataType) {
    ObjectEntryDataType ret = (ObjectEntryDataType)NanolibPINVOKE.OdTypesHelper_uintToObjectEntryDataType(objectDataType);
    return ret;
  }

  public static string objectEntryDataTypeToString(ObjectEntryDataType odDataType) {
    string ret = NanolibPINVOKE.OdTypesHelper_objectEntryDataTypeToString((int)odDataType);
    return ret;
  }

  public static ObjectEntryDataType stringToObjectEntryDatatype(string dataTypeString) {
    ObjectEntryDataType ret = (ObjectEntryDataType)NanolibPINVOKE.OdTypesHelper_stringToObjectEntryDatatype(dataTypeString);
    if (NanolibPINVOKE.SWIGPendingException.Pending) throw NanolibPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public static uint objectEntryDataTypeBitLength(ObjectEntryDataType dataType) {
    uint ret = NanolibPINVOKE.OdTypesHelper_objectEntryDataTypeBitLength((int)dataType);
    return ret;
  }

}

}
