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

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

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

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

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

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

  public XmlQueryContext(int returnType, int evaluationType) : this(dbxml_dotnetPINVOKE.new_XmlQueryContext(returnType, evaluationType), true) {
  }

  public void setNamespace(SWIGTYPE_p_std__string prefix, SWIGTYPE_p_std__string uri) {
    dbxml_dotnetPINVOKE.XmlQueryContext_setNamespace(swigCPtr, SWIGTYPE_p_std__string.getCPtr(prefix), SWIGTYPE_p_std__string.getCPtr(uri));
  }

  public SWIGTYPE_p_std__string getNamespace(SWIGTYPE_p_std__string prefix) {
    return new SWIGTYPE_p_std__string(dbxml_dotnetPINVOKE.XmlQueryContext_getNamespace(swigCPtr, SWIGTYPE_p_std__string.getCPtr(prefix)), true);
  }

  public void removeNamespace(SWIGTYPE_p_std__string prefix) {
    dbxml_dotnetPINVOKE.XmlQueryContext_removeNamespace(swigCPtr, SWIGTYPE_p_std__string.getCPtr(prefix));
  }

  public void clearNamespaces() {
    dbxml_dotnetPINVOKE.XmlQueryContext_clearNamespaces(swigCPtr);
  }

  public void setVariableValue(SWIGTYPE_p_std__string name, XmlValue value) {
    dbxml_dotnetPINVOKE.XmlQueryContext_setVariableValue(swigCPtr, SWIGTYPE_p_std__string.getCPtr(name), XmlValue.getCPtr(value));
  }

  public void setReturnType(int type) {
    dbxml_dotnetPINVOKE.XmlQueryContext_setReturnType(swigCPtr, type);
  }

  public int getReturnType() {
    return dbxml_dotnetPINVOKE.XmlQueryContext_getReturnType(swigCPtr);
  }

  public void setEvaluationType(int type) {
    dbxml_dotnetPINVOKE.XmlQueryContext_setEvaluationType(swigCPtr, type);
  }

  public int getEvaluationType() {
    return dbxml_dotnetPINVOKE.XmlQueryContext_getEvaluationType(swigCPtr);
  }

  public void setWithMetaData(bool withMetaData) {
    dbxml_dotnetPINVOKE.XmlQueryContext_setWithMetaData(swigCPtr, withMetaData);
  }

  public bool getWithMetaData() {
    return dbxml_dotnetPINVOKE.XmlQueryContext_getWithMetaData(swigCPtr);
  }

  public XmlValue getVariableValue(SWIGTYPE_p_std__string name) {
    IntPtr cPtr = dbxml_dotnetPINVOKE.XmlQueryContext_getVariableValue(swigCPtr, SWIGTYPE_p_std__string.getCPtr(name));
    return (cPtr == IntPtr.Zero) ? null : new XmlValue(cPtr, true);
  }

  // enums and constants
  public static int ResultDocuments = dbxml_dotnetPINVOKE.get_XmlQueryContext_ResultDocuments();
  public static int ResultValues = dbxml_dotnetPINVOKE.get_XmlQueryContext_ResultValues();
  public static int CandidateDocuments = dbxml_dotnetPINVOKE.get_XmlQueryContext_CandidateDocuments();
  public static int ResultDocumentsAndValues = dbxml_dotnetPINVOKE.get_XmlQueryContext_ResultDocumentsAndValues();
  public static int Eager = dbxml_dotnetPINVOKE.get_XmlQueryContext_Eager();
  public static int Lazy = dbxml_dotnetPINVOKE.get_XmlQueryContext_Lazy();
}
