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

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

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

  ~OBPlugin() {
    Dispose();
  }

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

  public virtual string Description() {
    string ret = openbabelPINVOKE.OBPlugin_Description(swigCPtr);
    return ret;
  }

  public virtual bool Display(SWIGTYPE_p_std__string txt, string param, string ID) {
    bool ret = openbabelPINVOKE.OBPlugin_Display__SWIG_0(swigCPtr, SWIGTYPE_p_std__string.getCPtr(txt), param, ID);
    if (openbabelPINVOKE.SWIGPendingException.Pending) throw openbabelPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public virtual bool Display(SWIGTYPE_p_std__string txt, string param) {
    bool ret = openbabelPINVOKE.OBPlugin_Display__SWIG_1(swigCPtr, SWIGTYPE_p_std__string.getCPtr(txt), param);
    if (openbabelPINVOKE.SWIGPendingException.Pending) throw openbabelPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public virtual OBPlugin MakeInstance(vectorString arg0) {
    IntPtr cPtr = openbabelPINVOKE.OBPlugin_MakeInstance(swigCPtr, vectorString.getCPtr(arg0));
    OBPlugin ret = (cPtr == IntPtr.Zero) ? null : new OBPlugin(cPtr, false);
    if (openbabelPINVOKE.SWIGPendingException.Pending) throw openbabelPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public static OBPlugin GetPlugin(string Type, string ID) {
    IntPtr cPtr = openbabelPINVOKE.OBPlugin_GetPlugin(Type, ID);
    OBPlugin ret = (cPtr == IntPtr.Zero) ? null : new OBPlugin(cPtr, false);
    return ret;
  }

  public string GetID() {
    string ret = openbabelPINVOKE.OBPlugin_GetID(swigCPtr);
    return ret;
  }

  public static bool ListAsVector(string PluginID, string param, vectorString vlist) {
    bool ret = openbabelPINVOKE.OBPlugin_ListAsVector(PluginID, param, vectorString.getCPtr(vlist));
    if (openbabelPINVOKE.SWIGPendingException.Pending) throw openbabelPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public static void List(string PluginID, string param, SWIGTYPE_p_std__ostream os) {
    openbabelPINVOKE.OBPlugin_List__SWIG_0(PluginID, param, SWIGTYPE_p_std__ostream.getCPtr(os));
  }

  public static void List(string PluginID, string param) {
    openbabelPINVOKE.OBPlugin_List__SWIG_1(PluginID, param);
  }

  public static void List(string PluginID) {
    openbabelPINVOKE.OBPlugin_List__SWIG_2(PluginID);
  }

  public static string ListAsString(string PluginID, string param) {
    string ret = openbabelPINVOKE.OBPlugin_ListAsString__SWIG_0(PluginID, param);
    return ret;
  }

  public static string ListAsString(string PluginID) {
    string ret = openbabelPINVOKE.OBPlugin_ListAsString__SWIG_1(PluginID);
    return ret;
  }

  public static string FirstLine(string txt) {
    string ret = openbabelPINVOKE.OBPlugin_FirstLine(txt);
    return ret;
  }

  public static SWIGTYPE_p_OpenBabel__OBPlugin__PluginMapType__const_iterator Begin(string PluginID) {
    SWIGTYPE_p_OpenBabel__OBPlugin__PluginMapType__const_iterator ret = new SWIGTYPE_p_OpenBabel__OBPlugin__PluginMapType__const_iterator(openbabelPINVOKE.OBPlugin_Begin(PluginID), true);
    return ret;
  }

  public static SWIGTYPE_p_OpenBabel__OBPlugin__PluginMapType__const_iterator End(string PluginID) {
    SWIGTYPE_p_OpenBabel__OBPlugin__PluginMapType__const_iterator ret = new SWIGTYPE_p_OpenBabel__OBPlugin__PluginMapType__const_iterator(openbabelPINVOKE.OBPlugin_End(PluginID), true);
    return ret;
  }

  public virtual SWIGTYPE_p_std__mapT_char_const_p_OpenBabel__OBPlugin_p_OpenBabel__CharPtrLess_t GetMap() {
    SWIGTYPE_p_std__mapT_char_const_p_OpenBabel__OBPlugin_p_OpenBabel__CharPtrLess_t ret = new SWIGTYPE_p_std__mapT_char_const_p_OpenBabel__OBPlugin_p_OpenBabel__CharPtrLess_t(openbabelPINVOKE.OBPlugin_GetMap(swigCPtr), false);
    return ret;
  }

}
