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

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

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

  ~OBRTree() {
    Dispose();
  }

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

  public OBRTree(OBAtom arg0, OBRTree arg1) : this(openbabelPINVOKE.new_OBRTree(OBAtom.getCPtr(arg0), OBRTree.getCPtr(arg1)), true) {
  }

  public int GetAtomIdx() {
    int ret = openbabelPINVOKE.OBRTree_GetAtomIdx(swigCPtr);
    return ret;
  }

  public void PathToRoot(SWIGTYPE_p_std__vectorT_OpenBabel__OBAtom_p_t arg0) {
    openbabelPINVOKE.OBRTree_PathToRoot(swigCPtr, SWIGTYPE_p_std__vectorT_OpenBabel__OBAtom_p_t.getCPtr(arg0));
    if (openbabelPINVOKE.SWIGPendingException.Pending) throw openbabelPINVOKE.SWIGPendingException.Retrieve();
  }

}
