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

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

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

  ~OBBitVec() {
    Dispose();
  }

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

  public OBBitVec() : this(openbabelPINVOKE.new_OBBitVec__SWIG_0(), true) {
  }

  public OBBitVec(uint size_in_bits) : this(openbabelPINVOKE.new_OBBitVec__SWIG_1(size_in_bits), true) {
  }

  public OBBitVec(OBBitVec bv) : this(openbabelPINVOKE.new_OBBitVec__SWIG_2(OBBitVec.getCPtr(bv)), true) {
    if (openbabelPINVOKE.SWIGPendingException.Pending) throw openbabelPINVOKE.SWIGPendingException.Retrieve();
  }

  public void SetBitOn(uint bit_offset) {
    openbabelPINVOKE.OBBitVec_SetBitOn(swigCPtr, bit_offset);
  }

  public void SetBitOff(uint bit_offset) {
    openbabelPINVOKE.OBBitVec_SetBitOff(swigCPtr, bit_offset);
  }

  public void SetRangeOn(uint lo_bit_offset, uint hi_bit_offset) {
    openbabelPINVOKE.OBBitVec_SetRangeOn(swigCPtr, lo_bit_offset, hi_bit_offset);
  }

  public void SetRangeOff(uint lo_bit_offset, uint hi_bit_offset) {
    openbabelPINVOKE.OBBitVec_SetRangeOff(swigCPtr, lo_bit_offset, hi_bit_offset);
  }

  public void Fold(uint new_bit_size) {
    openbabelPINVOKE.OBBitVec_Fold(swigCPtr, new_bit_size);
  }

  public int FirstBit(uint bit_offset) {
    int ret = openbabelPINVOKE.OBBitVec_FirstBit__SWIG_0(swigCPtr, bit_offset);
    return ret;
  }

  public int FirstBit() {
    int ret = openbabelPINVOKE.OBBitVec_FirstBit__SWIG_1(swigCPtr);
    return ret;
  }

  public int NextBit(int last_bit_offset) {
    int ret = openbabelPINVOKE.OBBitVec_NextBit(swigCPtr, last_bit_offset);
    return ret;
  }

  public int EndBit() {
    int ret = openbabelPINVOKE.OBBitVec_EndBit(swigCPtr);
    return ret;
  }

  public uint GetSize() {
    uint ret = openbabelPINVOKE.OBBitVec_GetSize(swigCPtr);
    return ret;
  }

  public uint CountBits() {
    uint ret = openbabelPINVOKE.OBBitVec_CountBits(swigCPtr);
    return ret;
  }

  public bool Empty() {
    bool ret = openbabelPINVOKE.OBBitVec_Empty(swigCPtr);
    return ret;
  }

  public bool IsEmpty() {
    bool ret = openbabelPINVOKE.OBBitVec_IsEmpty(swigCPtr);
    return ret;
  }

  public bool Resize(uint size_in_bits) {
    bool ret = openbabelPINVOKE.OBBitVec_Resize(swigCPtr, size_in_bits);
    return ret;
  }

  public bool ResizeWords(uint size_in_words) {
    bool ret = openbabelPINVOKE.OBBitVec_ResizeWords(swigCPtr, size_in_words);
    return ret;
  }

  public bool BitIsSet(uint bit_offset) {
    bool ret = openbabelPINVOKE.OBBitVec_BitIsSet(swigCPtr, bit_offset);
    return ret;
  }

  public bool BitIsOn(int bit_offset) {
    bool ret = openbabelPINVOKE.OBBitVec_BitIsOn(swigCPtr, bit_offset);
    return ret;
  }

  public void FromVecInt(vectorInt bit_offsets) {
    openbabelPINVOKE.OBBitVec_FromVecInt(swigCPtr, vectorInt.getCPtr(bit_offsets));
    if (openbabelPINVOKE.SWIGPendingException.Pending) throw openbabelPINVOKE.SWIGPendingException.Retrieve();
  }

  public void FromString(string line, int bits) {
    openbabelPINVOKE.OBBitVec_FromString(swigCPtr, line, bits);
    if (openbabelPINVOKE.SWIGPendingException.Pending) throw openbabelPINVOKE.SWIGPendingException.Retrieve();
  }

  public void ToVecInt(vectorInt bit_offsets) {
    openbabelPINVOKE.OBBitVec_ToVecInt(swigCPtr, vectorInt.getCPtr(bit_offsets));
    if (openbabelPINVOKE.SWIGPendingException.Pending) throw openbabelPINVOKE.SWIGPendingException.Retrieve();
  }

  public void Clear() {
    openbabelPINVOKE.OBBitVec_Clear(swigCPtr);
  }

  public void Negate() {
    openbabelPINVOKE.OBBitVec_Negate(swigCPtr);
  }

  public void GetWords(vectorUnsignedInt vec) {
    openbabelPINVOKE.OBBitVec_GetWords(swigCPtr, vectorUnsignedInt.getCPtr(vec));
    if (openbabelPINVOKE.SWIGPendingException.Pending) throw openbabelPINVOKE.SWIGPendingException.Retrieve();
  }

}
