/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 1.3.36
 *
 * Do not make changes to this file unless you know what you are doing--modify
 * the SWIG interface file instead.
 * ----------------------------------------------------------------------------- */


using System;
using System.Runtime.InteropServices;

public class OBMolPairIter : IDisposable {
  private HandleRef swigCPtr;
  protected bool swigCMemOwn;

  internal OBMolPairIter(IntPtr cPtr, bool cMemoryOwn) {
    swigCMemOwn = cMemoryOwn;
    swigCPtr = new HandleRef(this, cPtr);
  }

  internal static HandleRef getCPtr(OBMolPairIter obj) {
    return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
  }

  ~OBMolPairIter() {
    Dispose();
  }

  public virtual void Dispose() {
    lock(this) {
      if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) {
        swigCMemOwn = false;
        openbabelPINVOKE.delete_OBMolPairIter(swigCPtr);
      }
      swigCPtr = new HandleRef(null, IntPtr.Zero);
      GC.SuppressFinalize(this);
    }
  }

  public OBMolPairIter() : this(openbabelPINVOKE.new_OBMolPairIter__SWIG_0(), true) {
  }

  public OBMolPairIter(OBMol mol) : this(openbabelPINVOKE.new_OBMolPairIter__SWIG_1(OBMol.getCPtr(mol)), true) {
  }

  public OBMolPairIter(OBMolPairIter ai) : this(openbabelPINVOKE.new_OBMolPairIter__SWIG_2(OBMolPairIter.getCPtr(ai)), true) {
    if (openbabelPINVOKE.SWIGPendingException.Pending) throw openbabelPINVOKE.SWIGPendingException.Retrieve();
  }

  public vectorUnsignedInt __ref__() {
    vectorUnsignedInt ret = new vectorUnsignedInt(openbabelPINVOKE.OBMolPairIter___ref__(swigCPtr), true);
    return ret;
  }

}
