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

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

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

  ~OBRing() {
    Dispose();
  }

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

  public vectorInt _path {
    set {
      openbabelPINVOKE.OBRing__path_set(swigCPtr, vectorInt.getCPtr(value));
      if (openbabelPINVOKE.SWIGPendingException.Pending) throw openbabelPINVOKE.SWIGPendingException.Retrieve();
    } 
    get {
      vectorInt ret = new vectorInt(openbabelPINVOKE.OBRing__path_get(swigCPtr), false);
      if (openbabelPINVOKE.SWIGPendingException.Pending) throw openbabelPINVOKE.SWIGPendingException.Retrieve();
      return ret;
    } 
  }

  public OBBitVec _pathset {
    set {
      openbabelPINVOKE.OBRing__pathset_set(swigCPtr, OBBitVec.getCPtr(value));
      if (openbabelPINVOKE.SWIGPendingException.Pending) throw openbabelPINVOKE.SWIGPendingException.Retrieve();
    } 
    get {
      OBBitVec ret = new OBBitVec(openbabelPINVOKE.OBRing__pathset_get(swigCPtr), false);
      if (openbabelPINVOKE.SWIGPendingException.Pending) throw openbabelPINVOKE.SWIGPendingException.Retrieve();
      return ret;
    } 
  }

  public OBRing() : this(openbabelPINVOKE.new_OBRing__SWIG_0(), true) {
  }

  public OBRing(vectorInt path, int size) : this(openbabelPINVOKE.new_OBRing__SWIG_1(vectorInt.getCPtr(path), size), true) {
    if (openbabelPINVOKE.SWIGPendingException.Pending) throw openbabelPINVOKE.SWIGPendingException.Retrieve();
  }

  public OBRing(vectorInt path, OBBitVec set) : this(openbabelPINVOKE.new_OBRing__SWIG_2(vectorInt.getCPtr(path), OBBitVec.getCPtr(set)), true) {
    if (openbabelPINVOKE.SWIGPendingException.Pending) throw openbabelPINVOKE.SWIGPendingException.Retrieve();
  }

  public OBRing(OBRing src) : this(openbabelPINVOKE.new_OBRing__SWIG_3(OBRing.getCPtr(src)), true) {
    if (openbabelPINVOKE.SWIGPendingException.Pending) throw openbabelPINVOKE.SWIGPendingException.Retrieve();
  }

  public int Size() {
    int ret = openbabelPINVOKE.OBRing_Size(swigCPtr);
    return ret;
  }

  public int PathSize() {
    int ret = openbabelPINVOKE.OBRing_PathSize(swigCPtr);
    return ret;
  }

  public bool IsAromatic() {
    bool ret = openbabelPINVOKE.OBRing_IsAromatic(swigCPtr);
    return ret;
  }

  public void SetType(string type) {
    openbabelPINVOKE.OBRing_SetType__SWIG_0(swigCPtr, type);
  }

  public void SetType(SWIGTYPE_p_std__string type) {
    openbabelPINVOKE.OBRing_SetType__SWIG_1(swigCPtr, SWIGTYPE_p_std__string.getCPtr(type));
    if (openbabelPINVOKE.SWIGPendingException.Pending) throw openbabelPINVOKE.SWIGPendingException.Retrieve();
  }

  public string GetType() {
    string ret = openbabelPINVOKE.OBRing_GetType(swigCPtr);
    return ret;
  }

  public uint GetRootAtom() {
    uint ret = openbabelPINVOKE.OBRing_GetRootAtom(swigCPtr);
    return ret;
  }

  public bool IsMember(OBAtom a) {
    bool ret = openbabelPINVOKE.OBRing_IsMember__SWIG_0(swigCPtr, OBAtom.getCPtr(a));
    return ret;
  }

  public bool IsMember(OBBond b) {
    bool ret = openbabelPINVOKE.OBRing_IsMember__SWIG_1(swigCPtr, OBBond.getCPtr(b));
    return ret;
  }

  public bool IsInRing(int i) {
    bool ret = openbabelPINVOKE.OBRing_IsInRing(swigCPtr, i);
    return ret;
  }

  public void SetParent(OBMol m) {
    openbabelPINVOKE.OBRing_SetParent(swigCPtr, OBMol.getCPtr(m));
  }

  public OBMol GetParent() {
    IntPtr cPtr = openbabelPINVOKE.OBRing_GetParent(swigCPtr);
    OBMol ret = (cPtr == IntPtr.Zero) ? null : new OBMol(cPtr, false);
    return ret;
  }

  public bool findCenterAndNormal(vector3 center, vector3 norm1, vector3 norm2) {
    bool ret = openbabelPINVOKE.OBRing_findCenterAndNormal(swigCPtr, vector3.getCPtr(center), vector3.getCPtr(norm1), vector3.getCPtr(norm2));
    if (openbabelPINVOKE.SWIGPendingException.Pending) throw openbabelPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

}
