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

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

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

  ~OBConversion() {
    Dispose();
  }

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

  public OBConversion(SWIGTYPE_p_std__istream arg0, SWIGTYPE_p_std__ostream os) : this(openbabelPINVOKE.new_OBConversion__SWIG_0(SWIGTYPE_p_std__istream.getCPtr(arg0), SWIGTYPE_p_std__ostream.getCPtr(os)), true) {
  }

  public OBConversion(SWIGTYPE_p_std__istream arg0) : this(openbabelPINVOKE.new_OBConversion__SWIG_1(SWIGTYPE_p_std__istream.getCPtr(arg0)), true) {
  }

  public OBConversion() : this(openbabelPINVOKE.new_OBConversion__SWIG_2(), true) {
  }

  public OBConversion(OBConversion o) : this(openbabelPINVOKE.new_OBConversion__SWIG_3(OBConversion.getCPtr(o)), true) {
    if (openbabelPINVOKE.SWIGPendingException.Pending) throw openbabelPINVOKE.SWIGPendingException.Retrieve();
  }

  public static int RegisterFormat(string ID, OBFormat pFormat, string MIME) {
    int ret = openbabelPINVOKE.OBConversion_RegisterFormat__SWIG_0(ID, OBFormat.getCPtr(pFormat), MIME);
    return ret;
  }

  public static int RegisterFormat(string ID, OBFormat pFormat) {
    int ret = openbabelPINVOKE.OBConversion_RegisterFormat__SWIG_1(ID, OBFormat.getCPtr(pFormat));
    return ret;
  }

  public static OBFormat FindFormat(string ID) {
    IntPtr cPtr = openbabelPINVOKE.OBConversion_FindFormat(ID);
    OBFormat ret = (cPtr == IntPtr.Zero) ? null : new OBFormat(cPtr, false);
    return ret;
  }

  public static OBFormat FormatFromExt(string filename) {
    IntPtr cPtr = openbabelPINVOKE.OBConversion_FormatFromExt(filename);
    OBFormat ret = (cPtr == IntPtr.Zero) ? null : new OBFormat(cPtr, false);
    return ret;
  }

  public static OBFormat FormatFromMIME(string MIME) {
    IntPtr cPtr = openbabelPINVOKE.OBConversion_FormatFromMIME(MIME);
    OBFormat ret = (cPtr == IntPtr.Zero) ? null : new OBFormat(cPtr, false);
    return ret;
  }

  public static bool GetNextFormat(SWIGTYPE_p_OpenBabel__OBPlugin__PluginMapType__const_iterator itr, string str, OBFormat pFormat) {
    bool ret = openbabelPINVOKE.OBConversion_GetNextFormat(SWIGTYPE_p_OpenBabel__OBPlugin__PluginMapType__const_iterator.getCPtr(itr), str, OBFormat.getCPtr(pFormat));
    if (openbabelPINVOKE.SWIGPendingException.Pending) throw openbabelPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public static string Description() {
    string ret = openbabelPINVOKE.OBConversion_Description();
    return ret;
  }

  public SWIGTYPE_p_std__istream GetInStream() {
    IntPtr cPtr = openbabelPINVOKE.OBConversion_GetInStream(swigCPtr);
    SWIGTYPE_p_std__istream ret = (cPtr == IntPtr.Zero) ? null : new SWIGTYPE_p_std__istream(cPtr, false);
    return ret;
  }

  public SWIGTYPE_p_std__ostream GetOutStream() {
    IntPtr cPtr = openbabelPINVOKE.OBConversion_GetOutStream(swigCPtr);
    SWIGTYPE_p_std__ostream ret = (cPtr == IntPtr.Zero) ? null : new SWIGTYPE_p_std__ostream(cPtr, false);
    return ret;
  }

  public void SetInStream(SWIGTYPE_p_std__istream pIn) {
    openbabelPINVOKE.OBConversion_SetInStream(swigCPtr, SWIGTYPE_p_std__istream.getCPtr(pIn));
  }

  public void SetOutStream(SWIGTYPE_p_std__ostream pOut) {
    openbabelPINVOKE.OBConversion_SetOutStream(swigCPtr, SWIGTYPE_p_std__ostream.getCPtr(pOut));
  }

  public bool SetInAndOutFormats(string inID, string outID) {
    bool ret = openbabelPINVOKE.OBConversion_SetInAndOutFormats__SWIG_0(swigCPtr, inID, outID);
    return ret;
  }

  public bool SetInAndOutFormats(OBFormat pIn, OBFormat pOut) {
    bool ret = openbabelPINVOKE.OBConversion_SetInAndOutFormats__SWIG_1(swigCPtr, OBFormat.getCPtr(pIn), OBFormat.getCPtr(pOut));
    return ret;
  }

  public bool SetInFormat(string inID) {
    bool ret = openbabelPINVOKE.OBConversion_SetInFormat__SWIG_0(swigCPtr, inID);
    return ret;
  }

  public bool SetInFormat(OBFormat pIn) {
    bool ret = openbabelPINVOKE.OBConversion_SetInFormat__SWIG_1(swigCPtr, OBFormat.getCPtr(pIn));
    return ret;
  }

  public bool SetOutFormat(string outID) {
    bool ret = openbabelPINVOKE.OBConversion_SetOutFormat__SWIG_0(swigCPtr, outID);
    return ret;
  }

  public bool SetOutFormat(OBFormat pOut) {
    bool ret = openbabelPINVOKE.OBConversion_SetOutFormat__SWIG_1(swigCPtr, OBFormat.getCPtr(pOut));
    return ret;
  }

  public OBFormat GetInFormat() {
    IntPtr cPtr = openbabelPINVOKE.OBConversion_GetInFormat(swigCPtr);
    OBFormat ret = (cPtr == IntPtr.Zero) ? null : new OBFormat(cPtr, false);
    return ret;
  }

  public OBFormat GetOutFormat() {
    IntPtr cPtr = openbabelPINVOKE.OBConversion_GetOutFormat(swigCPtr);
    OBFormat ret = (cPtr == IntPtr.Zero) ? null : new OBFormat(cPtr, false);
    return ret;
  }

  public string GetInFilename() {
    string ret = openbabelPINVOKE.OBConversion_GetInFilename(swigCPtr);
    return ret;
  }

  public SWIGTYPE_p_std__streampos GetInPos() {
    SWIGTYPE_p_std__streampos ret = new SWIGTYPE_p_std__streampos(openbabelPINVOKE.OBConversion_GetInPos(swigCPtr), true);
    return ret;
  }

  public uint GetInLen() {
    uint ret = openbabelPINVOKE.OBConversion_GetInLen(swigCPtr);
    return ret;
  }

  public string GetTitle() {
    string ret = openbabelPINVOKE.OBConversion_GetTitle(swigCPtr);
    return ret;
  }

  public OBConversion GetAuxConv() {
    IntPtr cPtr = openbabelPINVOKE.OBConversion_GetAuxConv(swigCPtr);
    OBConversion ret = (cPtr == IntPtr.Zero) ? null : new OBConversion(cPtr, false);
    return ret;
  }

  public void SetAuxConv(OBConversion pConv) {
    openbabelPINVOKE.OBConversion_SetAuxConv(swigCPtr, OBConversion.getCPtr(pConv));
  }

  public string IsOption(string opt, OBConversion.Option_type opttyp) {
    string ret = openbabelPINVOKE.OBConversion_IsOption__SWIG_0(swigCPtr, opt, (int)opttyp);
    return ret;
  }

  public string IsOption(string opt) {
    string ret = openbabelPINVOKE.OBConversion_IsOption__SWIG_1(swigCPtr, opt);
    return ret;
  }

  public SWIGTYPE_p_std__mapT_std__string_std__string_t GetOptions(OBConversion.Option_type opttyp) {
    IntPtr cPtr = openbabelPINVOKE.OBConversion_GetOptions(swigCPtr, (int)opttyp);
    SWIGTYPE_p_std__mapT_std__string_std__string_t ret = (cPtr == IntPtr.Zero) ? null : new SWIGTYPE_p_std__mapT_std__string_std__string_t(cPtr, false);
    return ret;
  }

  public void AddOption(string opt, OBConversion.Option_type opttyp, string txt) {
    openbabelPINVOKE.OBConversion_AddOption__SWIG_0(swigCPtr, opt, (int)opttyp, txt);
  }

  public void AddOption(string opt, OBConversion.Option_type opttyp) {
    openbabelPINVOKE.OBConversion_AddOption__SWIG_1(swigCPtr, opt, (int)opttyp);
  }

  public void AddOption(string opt) {
    openbabelPINVOKE.OBConversion_AddOption__SWIG_2(swigCPtr, opt);
  }

  public bool RemoveOption(string opt, OBConversion.Option_type optype) {
    bool ret = openbabelPINVOKE.OBConversion_RemoveOption(swigCPtr, opt, (int)optype);
    return ret;
  }

  public void SetOptions(string options, OBConversion.Option_type opttyp) {
    openbabelPINVOKE.OBConversion_SetOptions(swigCPtr, options, (int)opttyp);
  }

  public static void RegisterOptionParam(string name, OBFormat pFormat, int numberParams, OBConversion.Option_type typ) {
    openbabelPINVOKE.OBConversion_RegisterOptionParam__SWIG_0(name, OBFormat.getCPtr(pFormat), numberParams, (int)typ);
    if (openbabelPINVOKE.SWIGPendingException.Pending) throw openbabelPINVOKE.SWIGPendingException.Retrieve();
  }

  public static void RegisterOptionParam(string name, OBFormat pFormat, int numberParams) {
    openbabelPINVOKE.OBConversion_RegisterOptionParam__SWIG_1(name, OBFormat.getCPtr(pFormat), numberParams);
    if (openbabelPINVOKE.SWIGPendingException.Pending) throw openbabelPINVOKE.SWIGPendingException.Retrieve();
  }

  public static void RegisterOptionParam(string name, OBFormat pFormat) {
    openbabelPINVOKE.OBConversion_RegisterOptionParam__SWIG_2(name, OBFormat.getCPtr(pFormat));
    if (openbabelPINVOKE.SWIGPendingException.Pending) throw openbabelPINVOKE.SWIGPendingException.Retrieve();
  }

  public static int GetOptionParams(string name, OBConversion.Option_type typ) {
    int ret = openbabelPINVOKE.OBConversion_GetOptionParams(name, (int)typ);
    if (openbabelPINVOKE.SWIGPendingException.Pending) throw openbabelPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public void CopyOptions(OBConversion pSourceConv, OBConversion.Option_type typ) {
    openbabelPINVOKE.OBConversion_CopyOptions__SWIG_0(swigCPtr, OBConversion.getCPtr(pSourceConv), (int)typ);
  }

  public void CopyOptions(OBConversion pSourceConv) {
    openbabelPINVOKE.OBConversion_CopyOptions__SWIG_1(swigCPtr, OBConversion.getCPtr(pSourceConv));
  }

  public vectorString GetSupportedInputFormat() {
    vectorString ret = new vectorString(openbabelPINVOKE.OBConversion_GetSupportedInputFormat(swigCPtr), true);
    return ret;
  }

  public vectorString GetSupportedOutputFormat() {
    vectorString ret = new vectorString(openbabelPINVOKE.OBConversion_GetSupportedOutputFormat(swigCPtr), true);
    return ret;
  }

  public int Convert(SWIGTYPE_p_std__istream arg0, SWIGTYPE_p_std__ostream os) {
    int ret = openbabelPINVOKE.OBConversion_Convert__SWIG_0(swigCPtr, SWIGTYPE_p_std__istream.getCPtr(arg0), SWIGTYPE_p_std__ostream.getCPtr(os));
    return ret;
  }

  public int Convert() {
    int ret = openbabelPINVOKE.OBConversion_Convert__SWIG_1(swigCPtr);
    return ret;
  }

  public int FullConvert(vectorString FileList, SWIGTYPE_p_std__string OutputFileName, vectorString OutputFileList) {
    int ret = openbabelPINVOKE.OBConversion_FullConvert(swigCPtr, vectorString.getCPtr(FileList), SWIGTYPE_p_std__string.getCPtr(OutputFileName), vectorString.getCPtr(OutputFileList));
    if (openbabelPINVOKE.SWIGPendingException.Pending) throw openbabelPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int AddChemObject(OBBase pOb) {
    int ret = openbabelPINVOKE.OBConversion_AddChemObject(swigCPtr, OBBase.getCPtr(pOb));
    return ret;
  }

  public OBBase GetChemObject() {
    IntPtr cPtr = openbabelPINVOKE.OBConversion_GetChemObject(swigCPtr);
    OBBase ret = (cPtr == IntPtr.Zero) ? null : new OBBase(cPtr, false);
    return ret;
  }

  public bool IsLast() {
    bool ret = openbabelPINVOKE.OBConversion_IsLast(swigCPtr);
    return ret;
  }

  public bool IsFirstInput() {
    bool ret = openbabelPINVOKE.OBConversion_IsFirstInput(swigCPtr);
    return ret;
  }

  public void SetFirstInput(bool b) {
    openbabelPINVOKE.OBConversion_SetFirstInput__SWIG_0(swigCPtr, b);
  }

  public void SetFirstInput() {
    openbabelPINVOKE.OBConversion_SetFirstInput__SWIG_1(swigCPtr);
  }

  public int GetOutputIndex() {
    int ret = openbabelPINVOKE.OBConversion_GetOutputIndex(swigCPtr);
    return ret;
  }

  public void SetOutputIndex(int indx) {
    openbabelPINVOKE.OBConversion_SetOutputIndex(swigCPtr, indx);
  }

  public void SetMoreFilesToCome() {
    openbabelPINVOKE.OBConversion_SetMoreFilesToCome(swigCPtr);
  }

  public void SetOneObjectOnly(bool b) {
    openbabelPINVOKE.OBConversion_SetOneObjectOnly__SWIG_0(swigCPtr, b);
  }

  public void SetOneObjectOnly() {
    openbabelPINVOKE.OBConversion_SetOneObjectOnly__SWIG_1(swigCPtr);
  }

  public void SetLast(bool b) {
    openbabelPINVOKE.OBConversion_SetLast(swigCPtr, b);
  }

  public bool IsLastFile() {
    bool ret = openbabelPINVOKE.OBConversion_IsLastFile(swigCPtr);
    return ret;
  }

  public static OBFormat GetDefaultFormat() {
    IntPtr cPtr = openbabelPINVOKE.OBConversion_GetDefaultFormat();
    OBFormat ret = (cPtr == IntPtr.Zero) ? null : new OBFormat(cPtr, false);
    return ret;
  }

  public bool Write(OBBase pOb, SWIGTYPE_p_std__ostream pout) {
    bool ret = openbabelPINVOKE.OBConversion_Write__SWIG_0(swigCPtr, OBBase.getCPtr(pOb), SWIGTYPE_p_std__ostream.getCPtr(pout));
    return ret;
  }

  public bool Write(OBBase pOb) {
    bool ret = openbabelPINVOKE.OBConversion_Write__SWIG_1(swigCPtr, OBBase.getCPtr(pOb));
    return ret;
  }

  public string WriteString(OBBase pOb, bool trimWhitespace) {
    string ret = openbabelPINVOKE.OBConversion_WriteString__SWIG_0(swigCPtr, OBBase.getCPtr(pOb), trimWhitespace);
    return ret;
  }

  public string WriteString(OBBase pOb) {
    string ret = openbabelPINVOKE.OBConversion_WriteString__SWIG_1(swigCPtr, OBBase.getCPtr(pOb));
    return ret;
  }

  public bool WriteFile(OBBase pOb, string filePath) {
    bool ret = openbabelPINVOKE.OBConversion_WriteFile(swigCPtr, OBBase.getCPtr(pOb), filePath);
    if (openbabelPINVOKE.SWIGPendingException.Pending) throw openbabelPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public void CloseOutFile() {
    openbabelPINVOKE.OBConversion_CloseOutFile(swigCPtr);
  }

  public bool Read(OBBase pOb, SWIGTYPE_p_std__istream pin) {
    bool ret = openbabelPINVOKE.OBConversion_Read__SWIG_0(swigCPtr, OBBase.getCPtr(pOb), SWIGTYPE_p_std__istream.getCPtr(pin));
    return ret;
  }

  public bool Read(OBBase pOb) {
    bool ret = openbabelPINVOKE.OBConversion_Read__SWIG_1(swigCPtr, OBBase.getCPtr(pOb));
    return ret;
  }

  public bool ReadString(OBBase pOb, string input) {
    bool ret = openbabelPINVOKE.OBConversion_ReadString(swigCPtr, OBBase.getCPtr(pOb), input);
    if (openbabelPINVOKE.SWIGPendingException.Pending) throw openbabelPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public bool ReadFile(OBBase pOb, string filePath) {
    bool ret = openbabelPINVOKE.OBConversion_ReadFile(swigCPtr, OBBase.getCPtr(pOb), filePath);
    if (openbabelPINVOKE.SWIGPendingException.Pending) throw openbabelPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public bool OpenInAndOutFiles(string infilepath, string outfilepath) {
    bool ret = openbabelPINVOKE.OBConversion_OpenInAndOutFiles(swigCPtr, infilepath, outfilepath);
    if (openbabelPINVOKE.SWIGPendingException.Pending) throw openbabelPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public void ReportNumberConverted(int count, OBFormat pFormat) {
    openbabelPINVOKE.OBConversion_ReportNumberConverted__SWIG_0(swigCPtr, count, OBFormat.getCPtr(pFormat));
  }

  public void ReportNumberConverted(int count) {
    openbabelPINVOKE.OBConversion_ReportNumberConverted__SWIG_1(swigCPtr, count);
  }

  public enum Option_type {
    INOPTIONS,
    OUTOPTIONS,
    GENOPTIONS,
    ALL
  }

}
