/* ----------------------------------------------------------------------------
 * 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 OBRingData : OBGenericData {
  private HandleRef swigCPtr;

  internal OBRingData(IntPtr cPtr, bool cMemoryOwn) : base(openbabelPINVOKE.OBRingDataUpcast(cPtr), cMemoryOwn) {
    swigCPtr = new HandleRef(this, cPtr);
  }

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

  ~OBRingData() {
    Dispose();
  }

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

  public OBRingData() : this(openbabelPINVOKE.new_OBRingData__SWIG_0(), true) {
  }

  public OBRingData(OBRingData arg0) : this(openbabelPINVOKE.new_OBRingData__SWIG_1(OBRingData.getCPtr(arg0)), true) {
    if (openbabelPINVOKE.SWIGPendingException.Pending) throw openbabelPINVOKE.SWIGPendingException.Retrieve();
  }

  public void SetData(vectorpRing vr) {
    openbabelPINVOKE.OBRingData_SetData(swigCPtr, vectorpRing.getCPtr(vr));
    if (openbabelPINVOKE.SWIGPendingException.Pending) throw openbabelPINVOKE.SWIGPendingException.Retrieve();
  }

  public void PushBack(OBRing r) {
    openbabelPINVOKE.OBRingData_PushBack(swigCPtr, OBRing.getCPtr(r));
  }

  public vectorpRing GetData() {
    vectorpRing ret = new vectorpRing(openbabelPINVOKE.OBRingData_GetData(swigCPtr), false);
    return ret;
  }

  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.OBRingData_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.OBRingData_EndRings(swigCPtr), true);
    return ret;
  }

  public OBRing BeginRing(SWIGTYPE_p_std__vectorT_OpenBabel__OBRing_p_t__iterator i) {
    IntPtr cPtr = openbabelPINVOKE.OBRingData_BeginRing(swigCPtr, SWIGTYPE_p_std__vectorT_OpenBabel__OBRing_p_t__iterator.getCPtr(i));
    OBRing ret = (cPtr == IntPtr.Zero) ? null : new OBRing(cPtr, false);
    if (openbabelPINVOKE.SWIGPendingException.Pending) throw openbabelPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public OBRing NextRing(SWIGTYPE_p_std__vectorT_OpenBabel__OBRing_p_t__iterator i) {
    IntPtr cPtr = openbabelPINVOKE.OBRingData_NextRing(swigCPtr, SWIGTYPE_p_std__vectorT_OpenBabel__OBRing_p_t__iterator.getCPtr(i));
    OBRing ret = (cPtr == IntPtr.Zero) ? null : new OBRing(cPtr, false);
    if (openbabelPINVOKE.SWIGPendingException.Pending) throw openbabelPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

}
