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

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

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

  ~OBError() {
    Dispose();
  }

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

  public OBError(string method, string errorMsg, string explanation, string possibleCause, string suggestedRemedy, obMessageLevel arg5) : this(openbabelPINVOKE.new_OBError__SWIG_0(method, errorMsg, explanation, possibleCause, suggestedRemedy, (int)arg5), true) {
    if (openbabelPINVOKE.SWIGPendingException.Pending) throw openbabelPINVOKE.SWIGPendingException.Retrieve();
  }

  public OBError(string method, string errorMsg, string explanation, string possibleCause, string suggestedRemedy) : this(openbabelPINVOKE.new_OBError__SWIG_1(method, errorMsg, explanation, possibleCause, suggestedRemedy), true) {
    if (openbabelPINVOKE.SWIGPendingException.Pending) throw openbabelPINVOKE.SWIGPendingException.Retrieve();
  }

  public OBError(string method, string errorMsg, string explanation, string possibleCause) : this(openbabelPINVOKE.new_OBError__SWIG_2(method, errorMsg, explanation, possibleCause), true) {
    if (openbabelPINVOKE.SWIGPendingException.Pending) throw openbabelPINVOKE.SWIGPendingException.Retrieve();
  }

  public OBError(string method, string errorMsg, string explanation) : this(openbabelPINVOKE.new_OBError__SWIG_3(method, errorMsg, explanation), true) {
    if (openbabelPINVOKE.SWIGPendingException.Pending) throw openbabelPINVOKE.SWIGPendingException.Retrieve();
  }

  public OBError(string method, string errorMsg) : this(openbabelPINVOKE.new_OBError__SWIG_4(method, errorMsg), true) {
    if (openbabelPINVOKE.SWIGPendingException.Pending) throw openbabelPINVOKE.SWIGPendingException.Retrieve();
  }

  public OBError(string method) : this(openbabelPINVOKE.new_OBError__SWIG_5(method), true) {
    if (openbabelPINVOKE.SWIGPendingException.Pending) throw openbabelPINVOKE.SWIGPendingException.Retrieve();
  }

  public OBError() : this(openbabelPINVOKE.new_OBError__SWIG_6(), true) {
  }

  public string message() {
    string ret = openbabelPINVOKE.OBError_message(swigCPtr);
    return ret;
  }

  public string GetMethod() {
    string ret = openbabelPINVOKE.OBError_GetMethod(swigCPtr);
    return ret;
  }

  public string GetError() {
    string ret = openbabelPINVOKE.OBError_GetError(swigCPtr);
    return ret;
  }

  public string GetExplanation() {
    string ret = openbabelPINVOKE.OBError_GetExplanation(swigCPtr);
    return ret;
  }

  public string GetPossibleCause() {
    string ret = openbabelPINVOKE.OBError_GetPossibleCause(swigCPtr);
    return ret;
  }

  public string GetSuggestedRemedy() {
    string ret = openbabelPINVOKE.OBError_GetSuggestedRemedy(swigCPtr);
    return ret;
  }

  public obMessageLevel GetLevel() {
    obMessageLevel ret = (obMessageLevel)openbabelPINVOKE.OBError_GetLevel(swigCPtr);
    return ret;
  }

}
