/* ----------------------------------------------------------------------------
 * 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 OBRingSearch : IDisposable {
  private HandleRef swigCPtr;
  protected bool swigCMemOwn;

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

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

  ~OBRingSearch() {
    Dispose();
  }

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

  public OBRingSearch() : this(openbabelPINVOKE.new_OBRingSearch(), true) {
  }

  public void SortRings() {
    openbabelPINVOKE.OBRingSearch_SortRings(swigCPtr);
  }

  public void RemoveRedundant(int arg0) {
    openbabelPINVOKE.OBRingSearch_RemoveRedundant(swigCPtr, arg0);
  }

  public void AddRingFromClosure(OBMol arg0, OBBond arg1) {
    openbabelPINVOKE.OBRingSearch_AddRingFromClosure(swigCPtr, OBMol.getCPtr(arg0), OBBond.getCPtr(arg1));
    if (openbabelPINVOKE.SWIGPendingException.Pending) throw openbabelPINVOKE.SWIGPendingException.Retrieve();
  }

  public bool SaveUniqueRing(SWIGTYPE_p_std__dequeT_int_t arg0, SWIGTYPE_p_std__dequeT_int_t arg1) {
    bool ret = openbabelPINVOKE.OBRingSearch_SaveUniqueRing(swigCPtr, SWIGTYPE_p_std__dequeT_int_t.getCPtr(arg0), SWIGTYPE_p_std__dequeT_int_t.getCPtr(arg1));
    if (openbabelPINVOKE.SWIGPendingException.Pending) throw openbabelPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public void WriteRings() {
    openbabelPINVOKE.OBRingSearch_WriteRings(swigCPtr);
  }

  public SWIGTYPE_p_std__vectorT_OpenBabel__OBRing_p_t__iterator BeginRings() {
    SWIGTYPE_p_std__vectorT_OpenBabel__OBRing_p_t__iterator ret = new SWIGTYPE_p_std__vectorT_OpenBabel__OBRing_p_t__iterator(openbabelPINVOKE.OBRingSearch_BeginRings(swigCPtr), true);
    return ret;
  }

  public SWIGTYPE_p_std__vectorT_OpenBabel__OBRing_p_t__iterator EndRings() {
    SWIGTYPE_p_std__vectorT_OpenBabel__OBRing_p_t__iterator ret = new SWIGTYPE_p_std__vectorT_OpenBabel__OBRing_p_t__iterator(openbabelPINVOKE.OBRingSearch_EndRings(swigCPtr), true);
    return ret;
  }

}
