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

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

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

  ~OBResidueData() {
    Dispose();
  }

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

  public OBResidueData() : this(openbabelPINVOKE.new_OBResidueData(), true) {
  }

  public bool SetResName(string arg0) {
    bool ret = openbabelPINVOKE.OBResidueData_SetResName(swigCPtr, arg0);
    if (openbabelPINVOKE.SWIGPendingException.Pending) throw openbabelPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int LookupBO(string arg0) {
    int ret = openbabelPINVOKE.OBResidueData_LookupBO__SWIG_0(swigCPtr, arg0);
    if (openbabelPINVOKE.SWIGPendingException.Pending) throw openbabelPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int LookupBO(string arg0, string arg1) {
    int ret = openbabelPINVOKE.OBResidueData_LookupBO__SWIG_1(swigCPtr, arg0, arg1);
    if (openbabelPINVOKE.SWIGPendingException.Pending) throw openbabelPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public bool LookupType(string arg0, SWIGTYPE_p_std__string arg1, SWIGTYPE_p_int arg2) {
    bool ret = openbabelPINVOKE.OBResidueData_LookupType(swigCPtr, arg0, SWIGTYPE_p_std__string.getCPtr(arg1), SWIGTYPE_p_int.getCPtr(arg2));
    if (openbabelPINVOKE.SWIGPendingException.Pending) throw openbabelPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public bool AssignBonds(OBMol arg0, OBBitVec arg1) {
    bool ret = openbabelPINVOKE.OBResidueData_AssignBonds(swigCPtr, OBMol.getCPtr(arg0), OBBitVec.getCPtr(arg1));
    if (openbabelPINVOKE.SWIGPendingException.Pending) throw openbabelPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

}
