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

namespace RakNet {

using System;
using System.Runtime.InteropServices;

public class FilterQuery : IDisposable {
  private HandleRef swigCPtr;
  protected bool swigCMemOwn;

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

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

  ~FilterQuery() {
    Dispose();
  }

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

  public FilterQuery() : this(RakNetPINVOKE.new_FilterQuery__SWIG_0(), true) {
  }

  public FilterQuery(uint column, Cell cell, Table.FilterQueryType op) : this(RakNetPINVOKE.new_FilterQuery__SWIG_1(column, Cell.getCPtr(cell), (int)op), true) {
  }

  public string columnName {
    set {
      RakNetPINVOKE.FilterQuery_columnName_set(swigCPtr, value);
    } 
    get {
      string ret = RakNetPINVOKE.FilterQuery_columnName_get(swigCPtr);
      return ret;
    } 
  }

  public uint columnIndex {
    set {
      RakNetPINVOKE.FilterQuery_columnIndex_set(swigCPtr, value);
    } 
    get {
      uint ret = RakNetPINVOKE.FilterQuery_columnIndex_get(swigCPtr);
      return ret;
    } 
  }

  public Cell cellValue {
    set {
      RakNetPINVOKE.FilterQuery_cellValue_set(swigCPtr, Cell.getCPtr(value));
    } 
    get {
      IntPtr cPtr = RakNetPINVOKE.FilterQuery_cellValue_get(swigCPtr);
      Cell ret = (cPtr == IntPtr.Zero) ? null : new Cell(cPtr, false);
      return ret;
    } 
  }

  public Table.FilterQueryType operation {
    set {
      RakNetPINVOKE.FilterQuery_operation_set(swigCPtr, (int)value);
    } 
    get {
      Table.FilterQueryType ret = (Table.FilterQueryType)RakNetPINVOKE.FilterQuery_operation_get(swigCPtr);
      return ret;
    } 
  }

}

}
