/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version: 1.3.19
 *
 * Do not make changes to this file unless you know what you are doing--modify
 * the SWIG interface file instead.
 * ----------------------------------------------------------------------------- */

using System;
public class XmlResults : IDisposable {
  private IntPtr swigCPtr;
  protected bool swigCMemOwn;

  internal XmlResults(IntPtr cPtr, bool cMemoryOwn) {
    swigCMemOwn = cMemoryOwn;
    swigCPtr = cPtr;
  }

  protected XmlResults() : this(IntPtr.Zero, false) {
  }

  public virtual void Dispose() {
    delete();
  }

  protected virtual void delete() {
    if(swigCPtr != IntPtr.Zero && swigCMemOwn) {
      dbxml_dotnetPINVOKE.delete_XmlResults(swigCPtr);
      swigCMemOwn = false;
    }
    swigCPtr = IntPtr.Zero;
  }

  internal static IntPtr getCPtr(XmlResults obj) {
    return (obj == null) ? IntPtr.Zero : obj.swigCPtr;
  }

  public XmlResults(XmlQueryContext context, DbTxn txn) : this(dbxml_dotnetPINVOKE.new_XmlResults(XmlQueryContext.getCPtr(context), DbTxn.getCPtr(txn)), true) {
  }

  public bool next(XmlValue value) {
    return dbxml_dotnetPINVOKE.XmlResults_next__SWIG_0(swigCPtr, XmlValue.getCPtr(value));
  }

  public bool next(XmlDocument document) {
    return dbxml_dotnetPINVOKE.XmlResults_next__SWIG_1(swigCPtr, XmlDocument.getCPtr(document));
  }

  public bool next(XmlDocument document, XmlValue value) {
    return dbxml_dotnetPINVOKE.XmlResults_next__SWIG_2(swigCPtr, XmlDocument.getCPtr(document), XmlValue.getCPtr(value));
  }

  public void reset() {
    dbxml_dotnetPINVOKE.XmlResults_reset(swigCPtr);
  }

  public int size() {
    return dbxml_dotnetPINVOKE.XmlResults_size(swigCPtr);
  }

  public void add(XmlValue value) {
    dbxml_dotnetPINVOKE.XmlResults_add(swigCPtr, XmlValue.getCPtr(value));
  }

}
