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

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

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

  ~OBDescriptor() {
    Dispose();
  }

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

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

  public OBDescriptor(string ID, bool IsDefault) : this(openbabelPINVOKE.new_OBDescriptor__SWIG_0(ID, IsDefault), true) {
  }

  public OBDescriptor(string ID) : this(openbabelPINVOKE.new_OBDescriptor__SWIG_1(ID), true) {
  }

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

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

  public virtual double Predict(OBBase pOb) {
    double ret = openbabelPINVOKE.OBDescriptor_Predict(swigCPtr, OBBase.getCPtr(pOb));
    return ret;
  }

  public double PredictAndSave(OBBase pOb) {
    double ret = openbabelPINVOKE.OBDescriptor_PredictAndSave(swigCPtr, OBBase.getCPtr(pOb));
    return ret;
  }

  public virtual double GetStringValue(OBBase pOb, SWIGTYPE_p_std__string svalue) {
    double ret = openbabelPINVOKE.OBDescriptor_GetStringValue(swigCPtr, OBBase.getCPtr(pOb), SWIGTYPE_p_std__string.getCPtr(svalue));
    if (openbabelPINVOKE.SWIGPendingException.Pending) throw openbabelPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public virtual bool Compare(OBBase pOb, SWIGTYPE_p_std__istream ss, bool noEval) {
    bool ret = openbabelPINVOKE.OBDescriptor_Compare(swigCPtr, OBBase.getCPtr(pOb), SWIGTYPE_p_std__istream.getCPtr(ss), noEval);
    if (openbabelPINVOKE.SWIGPendingException.Pending) throw openbabelPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public override bool Display(SWIGTYPE_p_std__string txt, string param, string ID) {
    bool ret = openbabelPINVOKE.OBDescriptor_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.OBDescriptor_Display__SWIG_1(swigCPtr, SWIGTYPE_p_std__string.getCPtr(txt), param);
    if (openbabelPINVOKE.SWIGPendingException.Pending) throw openbabelPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public static bool FilterCompare(OBBase pOb, SWIGTYPE_p_std__istream ss, bool noEval) {
    bool ret = openbabelPINVOKE.OBDescriptor_FilterCompare(OBBase.getCPtr(pOb), SWIGTYPE_p_std__istream.getCPtr(ss), noEval);
    if (openbabelPINVOKE.SWIGPendingException.Pending) throw openbabelPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public static void AddProperties(OBBase pOb, string DescrList) {
    openbabelPINVOKE.OBDescriptor_AddProperties(OBBase.getCPtr(pOb), DescrList);
    if (openbabelPINVOKE.SWIGPendingException.Pending) throw openbabelPINVOKE.SWIGPendingException.Retrieve();
  }

  public static void DeleteProperties(OBBase pOb, string DescrList) {
    openbabelPINVOKE.OBDescriptor_DeleteProperties(OBBase.getCPtr(pOb), DescrList);
    if (openbabelPINVOKE.SWIGPendingException.Pending) throw openbabelPINVOKE.SWIGPendingException.Retrieve();
  }

  public static string GetValues(OBBase pOb, string DescrList) {
    string ret = openbabelPINVOKE.OBDescriptor_GetValues(OBBase.getCPtr(pOb), DescrList);
    if (openbabelPINVOKE.SWIGPendingException.Pending) throw openbabelPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

}
