//------------------------------------------------------------------------------
// <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 BusHardwareOptions : global::System.IDisposable {
  private global::System.Runtime.InteropServices.HandleRef swigCPtr;
  protected bool swigCMemOwn;

  internal BusHardwareOptions(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(BusHardwareOptions obj) {
    return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
  }

  ~BusHardwareOptions() {
    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;
          NanolibPINVOKE.delete_BusHardwareOptions(swigCPtr);
        }
        swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
      }
    }
  }

  public BusHardwareOptions() : this(NanolibPINVOKE.new_BusHardwareOptions__SWIG_0(), true) {
  }

  public BusHardwareOptions(StringStringMap options) : this(NanolibPINVOKE.new_BusHardwareOptions__SWIG_1(StringStringMap.getCPtr(options)), true) {
    if (NanolibPINVOKE.SWIGPendingException.Pending) throw NanolibPINVOKE.SWIGPendingException.Retrieve();
  }

  public void addOption(string key, string value) {
    NanolibPINVOKE.BusHardwareOptions_addOption(swigCPtr, key, value);
    if (NanolibPINVOKE.SWIGPendingException.Pending) throw NanolibPINVOKE.SWIGPendingException.Retrieve();
  }

  public StringStringMap getOptions() {
    StringStringMap ret = new StringStringMap(NanolibPINVOKE.BusHardwareOptions_getOptions(swigCPtr), true);
    return ret;
  }

  public bool equals(BusHardwareOptions other) {
    bool ret = NanolibPINVOKE.BusHardwareOptions_equals(swigCPtr, BusHardwareOptions.getCPtr(other));
    if (NanolibPINVOKE.SWIGPendingException.Pending) throw NanolibPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public string toString() {
    string ret = NanolibPINVOKE.BusHardwareOptions_toString(swigCPtr);
    return ret;
  }

}

}
