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

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

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

  ~OBResidueIter() {
    Dispose();
  }

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

  public OBResidueIter() : this(openbabelPINVOKE.new_OBResidueIter__SWIG_0(), true) {
  }

  public OBResidueIter(OBMol mol) : this(openbabelPINVOKE.new_OBResidueIter__SWIG_1(OBMol.getCPtr(mol)), true) {
  }

  public OBResidueIter(OBResidueIter ri) : this(openbabelPINVOKE.new_OBResidueIter__SWIG_2(OBResidueIter.getCPtr(ri)), true) {
    if (openbabelPINVOKE.SWIGPendingException.Pending) throw openbabelPINVOKE.SWIGPendingException.Retrieve();
  }

  public OBResidue __deref__() {
    IntPtr cPtr = openbabelPINVOKE.OBResidueIter___deref__(swigCPtr);
    OBResidue ret = (cPtr == IntPtr.Zero) ? null : new OBResidue(cPtr, false);
    return ret;
  }

  public OBResidue __ref__() {
    OBResidue ret = new OBResidue(openbabelPINVOKE.OBResidueIter___ref__(swigCPtr), false);
    return ret;
  }

  public void AddAtom(OBAtom atom) {
    openbabelPINVOKE.OBResidueIter_AddAtom(swigCPtr, OBAtom.getCPtr(atom));
  }

  public void InsertAtom(OBAtom atom) {
    openbabelPINVOKE.OBResidueIter_InsertAtom(swigCPtr, OBAtom.getCPtr(atom));
  }

  public void RemoveAtom(OBAtom atom) {
    openbabelPINVOKE.OBResidueIter_RemoveAtom(swigCPtr, OBAtom.getCPtr(atom));
  }

  public void SetName(string resname) {
    openbabelPINVOKE.OBResidueIter_SetName(swigCPtr, resname);
    if (openbabelPINVOKE.SWIGPendingException.Pending) throw openbabelPINVOKE.SWIGPendingException.Retrieve();
  }

  public void SetNum(uint resnum) {
    openbabelPINVOKE.OBResidueIter_SetNum__SWIG_0(swigCPtr, resnum);
  }

  public void SetNum(string resnum) {
    openbabelPINVOKE.OBResidueIter_SetNum__SWIG_1(swigCPtr, resnum);
    if (openbabelPINVOKE.SWIGPendingException.Pending) throw openbabelPINVOKE.SWIGPendingException.Retrieve();
  }

  public void SetChain(char chain) {
    openbabelPINVOKE.OBResidueIter_SetChain(swigCPtr, chain);
  }

  public void SetChainNum(uint chainnum) {
    openbabelPINVOKE.OBResidueIter_SetChainNum(swigCPtr, chainnum);
  }

  public void SetIdx(uint idx) {
    openbabelPINVOKE.OBResidueIter_SetIdx(swigCPtr, idx);
  }

  public void SetAtomID(OBAtom atom, string id) {
    openbabelPINVOKE.OBResidueIter_SetAtomID(swigCPtr, OBAtom.getCPtr(atom), id);
    if (openbabelPINVOKE.SWIGPendingException.Pending) throw openbabelPINVOKE.SWIGPendingException.Retrieve();
  }

  public void SetHetAtom(OBAtom atom, bool hetatm) {
    openbabelPINVOKE.OBResidueIter_SetHetAtom(swigCPtr, OBAtom.getCPtr(atom), hetatm);
  }

  public void SetSerialNum(OBAtom atom, uint sernum) {
    openbabelPINVOKE.OBResidueIter_SetSerialNum(swigCPtr, OBAtom.getCPtr(atom), sernum);
  }

  public string GetName() {
    string ret = openbabelPINVOKE.OBResidueIter_GetName(swigCPtr);
    return ret;
  }

  public uint GetNum() {
    uint ret = openbabelPINVOKE.OBResidueIter_GetNum(swigCPtr);
    return ret;
  }

  public string GetNumString() {
    string ret = openbabelPINVOKE.OBResidueIter_GetNumString(swigCPtr);
    return ret;
  }

  public uint GetNumAtoms() {
    uint ret = openbabelPINVOKE.OBResidueIter_GetNumAtoms(swigCPtr);
    return ret;
  }

  public char GetChain() {
    char ret = openbabelPINVOKE.OBResidueIter_GetChain(swigCPtr);
    return ret;
  }

  public uint GetChainNum() {
    uint ret = openbabelPINVOKE.OBResidueIter_GetChainNum(swigCPtr);
    return ret;
  }

  public uint GetIdx() {
    uint ret = openbabelPINVOKE.OBResidueIter_GetIdx(swigCPtr);
    return ret;
  }

  public uint GetResKey() {
    uint ret = openbabelPINVOKE.OBResidueIter_GetResKey(swigCPtr);
    return ret;
  }

  public SWIGTYPE_p_std__vectorT_OpenBabel__OBAtom_p_t GetAtoms() {
    SWIGTYPE_p_std__vectorT_OpenBabel__OBAtom_p_t ret = new SWIGTYPE_p_std__vectorT_OpenBabel__OBAtom_p_t(openbabelPINVOKE.OBResidueIter_GetAtoms(swigCPtr), true);
    return ret;
  }

  public SWIGTYPE_p_std__vectorT_OpenBabel__OBBond_p_t GetBonds(bool exterior) {
    SWIGTYPE_p_std__vectorT_OpenBabel__OBBond_p_t ret = new SWIGTYPE_p_std__vectorT_OpenBabel__OBBond_p_t(openbabelPINVOKE.OBResidueIter_GetBonds__SWIG_0(swigCPtr, exterior), true);
    return ret;
  }

  public SWIGTYPE_p_std__vectorT_OpenBabel__OBBond_p_t GetBonds() {
    SWIGTYPE_p_std__vectorT_OpenBabel__OBBond_p_t ret = new SWIGTYPE_p_std__vectorT_OpenBabel__OBBond_p_t(openbabelPINVOKE.OBResidueIter_GetBonds__SWIG_1(swigCPtr), true);
    return ret;
  }

  public string GetAtomID(OBAtom atom) {
    string ret = openbabelPINVOKE.OBResidueIter_GetAtomID(swigCPtr, OBAtom.getCPtr(atom));
    return ret;
  }

  public uint GetSerialNum(OBAtom atom) {
    uint ret = openbabelPINVOKE.OBResidueIter_GetSerialNum(swigCPtr, OBAtom.getCPtr(atom));
    return ret;
  }

  public bool GetAminoAcidProperty(int arg0) {
    bool ret = openbabelPINVOKE.OBResidueIter_GetAminoAcidProperty(swigCPtr, arg0);
    return ret;
  }

  public bool GetAtomProperty(OBAtom a, int arg1) {
    bool ret = openbabelPINVOKE.OBResidueIter_GetAtomProperty(swigCPtr, OBAtom.getCPtr(a), arg1);
    return ret;
  }

  public bool GetResidueProperty(int arg0) {
    bool ret = openbabelPINVOKE.OBResidueIter_GetResidueProperty(swigCPtr, arg0);
    return ret;
  }

  public bool IsHetAtom(OBAtom atom) {
    bool ret = openbabelPINVOKE.OBResidueIter_IsHetAtom(swigCPtr, OBAtom.getCPtr(atom));
    return ret;
  }

  public bool IsResidueType(int arg0) {
    bool ret = openbabelPINVOKE.OBResidueIter_IsResidueType(swigCPtr, arg0);
    return ret;
  }

  public SWIGTYPE_p_std__vectorT_OpenBabel__OBAtom_p_t__iterator BeginAtoms() {
    SWIGTYPE_p_std__vectorT_OpenBabel__OBAtom_p_t__iterator ret = new SWIGTYPE_p_std__vectorT_OpenBabel__OBAtom_p_t__iterator(openbabelPINVOKE.OBResidueIter_BeginAtoms(swigCPtr), true);
    return ret;
  }

  public SWIGTYPE_p_std__vectorT_OpenBabel__OBAtom_p_t__iterator EndAtoms() {
    SWIGTYPE_p_std__vectorT_OpenBabel__OBAtom_p_t__iterator ret = new SWIGTYPE_p_std__vectorT_OpenBabel__OBAtom_p_t__iterator(openbabelPINVOKE.OBResidueIter_EndAtoms(swigCPtr), true);
    return ret;
  }

  public OBAtom BeginAtom(SWIGTYPE_p_std__vectorT_OpenBabel__OBAtom_p_t__iterator i) {
    IntPtr cPtr = openbabelPINVOKE.OBResidueIter_BeginAtom(swigCPtr, SWIGTYPE_p_std__vectorT_OpenBabel__OBAtom_p_t__iterator.getCPtr(i));
    OBAtom ret = (cPtr == IntPtr.Zero) ? null : new OBAtom(cPtr, false);
    if (openbabelPINVOKE.SWIGPendingException.Pending) throw openbabelPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public OBAtom NextAtom(SWIGTYPE_p_std__vectorT_OpenBabel__OBAtom_p_t__iterator i) {
    IntPtr cPtr = openbabelPINVOKE.OBResidueIter_NextAtom(swigCPtr, SWIGTYPE_p_std__vectorT_OpenBabel__OBAtom_p_t__iterator.getCPtr(i));
    OBAtom ret = (cPtr == IntPtr.Zero) ? null : new OBAtom(cPtr, false);
    if (openbabelPINVOKE.SWIGPendingException.Pending) throw openbabelPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public bool Clear() {
    bool ret = openbabelPINVOKE.OBResidueIter_Clear(swigCPtr);
    return ret;
  }

  public OBBase DoTransformations(SWIGTYPE_p_std__mapT_std__string_std__string_t arg0) {
    IntPtr cPtr = openbabelPINVOKE.OBResidueIter_DoTransformations(swigCPtr, SWIGTYPE_p_std__mapT_std__string_std__string_t.getCPtr(arg0));
    OBBase ret = (cPtr == IntPtr.Zero) ? null : new OBBase(cPtr, false);
    return ret;
  }

  public string ClassDescription() {
    string ret = openbabelPINVOKE.OBResidueIter_ClassDescription(swigCPtr);
    return ret;
  }

  public bool HasData(uint type) {
    bool ret = openbabelPINVOKE.OBResidueIter_HasData__SWIG_2(swigCPtr, type);
    return ret;
  }

  public void DeleteData(uint type) {
    openbabelPINVOKE.OBResidueIter_DeleteData__SWIG_0(swigCPtr, type);
  }

  public void DeleteData(OBGenericData arg0) {
    openbabelPINVOKE.OBResidueIter_DeleteData__SWIG_1(swigCPtr, OBGenericData.getCPtr(arg0));
  }

  public void DeleteData(vectorData arg0) {
    openbabelPINVOKE.OBResidueIter_DeleteData__SWIG_2(swigCPtr, vectorData.getCPtr(arg0));
    if (openbabelPINVOKE.SWIGPendingException.Pending) throw openbabelPINVOKE.SWIGPendingException.Retrieve();
  }

  public bool DeleteData(string s) {
    bool ret = openbabelPINVOKE.OBResidueIter_DeleteData__SWIG_3(swigCPtr, s);
    if (openbabelPINVOKE.SWIGPendingException.Pending) throw openbabelPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public void SetData(OBGenericData d) {
    openbabelPINVOKE.OBResidueIter_SetData(swigCPtr, OBGenericData.getCPtr(d));
  }

  public void CloneData(OBGenericData d) {
    openbabelPINVOKE.OBResidueIter_CloneData(swigCPtr, OBGenericData.getCPtr(d));
  }

  public uint DataSize() {
    uint ret = openbabelPINVOKE.OBResidueIter_DataSize(swigCPtr);
    return ret;
  }

  public OBGenericData GetData(uint type) {
    IntPtr cPtr = openbabelPINVOKE.OBResidueIter_GetData__SWIG_0(swigCPtr, type);
    OBGenericData ret = (cPtr == IntPtr.Zero) ? null : new OBGenericData(cPtr, false);
    return ret;
  }

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

  public vectorData GetData(DataOrigin source) {
    vectorData ret = new vectorData(openbabelPINVOKE.OBResidueIter_GetData__SWIG_4(swigCPtr, (int)source), true);
    return ret;
  }

  public vectorData GetAllData(uint type) {
    vectorData ret = new vectorData(openbabelPINVOKE.OBResidueIter_GetAllData(swigCPtr, type), true);
    return ret;
  }

  public SWIGTYPE_p_std__vectorT_OpenBabel__OBGenericData_p_t__iterator BeginData() {
    SWIGTYPE_p_std__vectorT_OpenBabel__OBGenericData_p_t__iterator ret = new SWIGTYPE_p_std__vectorT_OpenBabel__OBGenericData_p_t__iterator(openbabelPINVOKE.OBResidueIter_BeginData(swigCPtr), true);
    return ret;
  }

  public SWIGTYPE_p_std__vectorT_OpenBabel__OBGenericData_p_t__iterator EndData() {
    SWIGTYPE_p_std__vectorT_OpenBabel__OBGenericData_p_t__iterator ret = new SWIGTYPE_p_std__vectorT_OpenBabel__OBGenericData_p_t__iterator(openbabelPINVOKE.OBResidueIter_EndData(swigCPtr), true);
    return ret;
  }

}
