/* ----------------------------------------------------------------------------
 * 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.
 * ----------------------------------------------------------------------------- */


public class OBFingerprint extends OBPlugin {
  private long swigCPtr;

  protected OBFingerprint(long cPtr, boolean cMemoryOwn) {
    super(openbabelJNI.SWIGOBFingerprintUpcast(cPtr), cMemoryOwn);
    swigCPtr = cPtr;
  }

  protected static long getCPtr(OBFingerprint obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }

  protected void finalize() {
    delete();
  }

  public synchronized void delete() {
    if(swigCPtr != 0 && swigCMemOwn) {
      swigCMemOwn = false;
      openbabelJNI.delete_OBFingerprint(swigCPtr);
    }
    swigCPtr = 0;
    super.delete();
  }

  public static OBFingerprint Default() {
    long cPtr = openbabelJNI.OBFingerprint_Default();
    return (cPtr == 0) ? null : new OBFingerprint(cPtr, false);
  }

  public static OBFingerprint FindType(String ID) {
    long cPtr = openbabelJNI.OBFingerprint_FindType(ID);
    return (cPtr == 0) ? null : new OBFingerprint(cPtr, false);
  }

  public String TypeID() {
    return openbabelJNI.OBFingerprint_TypeID(swigCPtr, this);
  }

  public void SetBit(vectorUnsignedInt vec, long n) {
    openbabelJNI.OBFingerprint_SetBit(swigCPtr, this, vectorUnsignedInt.getCPtr(vec), vec, n);
  }

  public boolean GetBit(vectorUnsignedInt vec, long n) {
    return openbabelJNI.OBFingerprint_GetBit(swigCPtr, this, vectorUnsignedInt.getCPtr(vec), vec, n);
  }

  public void Fold(vectorUnsignedInt vec, long nbits) {
    openbabelJNI.OBFingerprint_Fold(swigCPtr, this, vectorUnsignedInt.getCPtr(vec), vec, nbits);
  }

  public boolean GetFingerprint(OBBase pOb, vectorUnsignedInt fp, int nbits) {
    return openbabelJNI.OBFingerprint_GetFingerprint__SWIG_0(swigCPtr, this, OBBase.getCPtr(pOb), pOb, vectorUnsignedInt.getCPtr(fp), fp, nbits);
  }

  public boolean GetFingerprint(OBBase pOb, vectorUnsignedInt fp) {
    return openbabelJNI.OBFingerprint_GetFingerprint__SWIG_1(swigCPtr, this, OBBase.getCPtr(pOb), pOb, vectorUnsignedInt.getCPtr(fp), fp);
  }

  public long Flags() {
    return openbabelJNI.OBFingerprint_Flags(swigCPtr, this);
  }

  public String DescribeBits(vectorUnsignedInt fp, boolean bSet) {
    return openbabelJNI.OBFingerprint_DescribeBits__SWIG_0(swigCPtr, this, vectorUnsignedInt.getCPtr(fp), fp, bSet);
  }

  public String DescribeBits(vectorUnsignedInt fp) {
    return openbabelJNI.OBFingerprint_DescribeBits__SWIG_1(swigCPtr, this, vectorUnsignedInt.getCPtr(fp), fp);
  }

  public static double Tanimoto(vectorUnsignedInt vec1, vectorUnsignedInt vec2) {
    return openbabelJNI.OBFingerprint_Tanimoto__SWIG_0(vectorUnsignedInt.getCPtr(vec1), vec1, vectorUnsignedInt.getCPtr(vec2), vec2);
  }

  public static double Tanimoto(vectorUnsignedInt vec1, SWIGTYPE_p_unsigned_int p2) {
    return openbabelJNI.OBFingerprint_Tanimoto__SWIG_1(vectorUnsignedInt.getCPtr(vec1), vec1, SWIGTYPE_p_unsigned_int.getCPtr(p2));
  }

  public static long Getbitsperint() {
    return openbabelJNI.OBFingerprint_Getbitsperint();
  }

  public static OBFingerprint FindFingerprint(String ID) {
    long cPtr = openbabelJNI.OBFingerprint_FindFingerprint(ID);
    return (cPtr == 0) ? null : new OBFingerprint(cPtr, false);
  }

  public final static class FptFlag {
    public final static FptFlag FPT_UNIQUEBITS = new FptFlag("FPT_UNIQUEBITS", openbabelJNI.OBFingerprint_FPT_UNIQUEBITS_get());

    public final int swigValue() {
      return swigValue;
    }

    public String toString() {
      return swigName;
    }

    public static FptFlag swigToEnum(int swigValue) {
      if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
        return swigValues[swigValue];
      for (int i = 0; i < swigValues.length; i++)
        if (swigValues[i].swigValue == swigValue)
          return swigValues[i];
      throw new IllegalArgumentException("No enum " + FptFlag.class + " with value " + swigValue);
    }

    private FptFlag(String swigName) {
      this.swigName = swigName;
      this.swigValue = swigNext++;
    }

    private FptFlag(String swigName, int swigValue) {
      this.swigName = swigName;
      this.swigValue = swigValue;
      swigNext = swigValue+1;
    }

    private FptFlag(String swigName, FptFlag swigEnum) {
      this.swigName = swigName;
      this.swigValue = swigEnum.swigValue;
      swigNext = this.swigValue+1;
    }

    private static FptFlag[] swigValues = { FPT_UNIQUEBITS };
    private static int swigNext = 0;
    private final int swigValue;
    private final String swigName;
  }

}
