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

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

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

  ~OBFormat() {
    Dispose();
  }

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

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

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

  public string TypeID() {
    string ret = openbabelPINVOKE.OBFormat_TypeID(swigCPtr);
    return ret;
  }

  public virtual bool ReadMolecule(OBBase arg0, OBConversion arg1) {
    bool ret = openbabelPINVOKE.OBFormat_ReadMolecule(swigCPtr, OBBase.getCPtr(arg0), OBConversion.getCPtr(arg1));
    return ret;
  }

  public virtual bool ReadChemObject(OBConversion arg0) {
    bool ret = openbabelPINVOKE.OBFormat_ReadChemObject(swigCPtr, OBConversion.getCPtr(arg0));
    return ret;
  }

  public virtual bool WriteMolecule(OBBase arg0, OBConversion arg1) {
    bool ret = openbabelPINVOKE.OBFormat_WriteMolecule(swigCPtr, OBBase.getCPtr(arg0), OBConversion.getCPtr(arg1));
    return ret;
  }

  public virtual bool WriteChemObject(OBConversion arg0) {
    bool ret = openbabelPINVOKE.OBFormat_WriteChemObject(swigCPtr, OBConversion.getCPtr(arg0));
    return ret;
  }

  public virtual string TargetClassDescription() {
    string ret = openbabelPINVOKE.OBFormat_TargetClassDescription(swigCPtr);
    return ret;
  }

  public virtual SWIGTYPE_p_std__type_info GetType() {
    SWIGTYPE_p_std__type_info ret = new SWIGTYPE_p_std__type_info(openbabelPINVOKE.OBFormat_GetType(swigCPtr), false);
    return ret;
  }

  public virtual string SpecificationURL() {
    string ret = openbabelPINVOKE.OBFormat_SpecificationURL(swigCPtr);
    return ret;
  }

  public string GetMIMEType() {
    string ret = openbabelPINVOKE.OBFormat_GetMIMEType(swigCPtr);
    return ret;
  }

  public virtual uint Flags() {
    uint ret = openbabelPINVOKE.OBFormat_Flags(swigCPtr);
    return ret;
  }

  public virtual int SkipObjects(int arg0, OBConversion arg1) {
    int ret = openbabelPINVOKE.OBFormat_SkipObjects(swigCPtr, arg0, OBConversion.getCPtr(arg1));
    return ret;
  }

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

  public int RegisterFormat(string ID, string MIME) {
    int ret = openbabelPINVOKE.OBFormat_RegisterFormat__SWIG_0(swigCPtr, ID, MIME);
    return ret;
  }

  public int RegisterFormat(string ID) {
    int ret = openbabelPINVOKE.OBFormat_RegisterFormat__SWIG_1(swigCPtr, ID);
    return ret;
  }

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

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

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

}
