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

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

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

  ~OBRandom() {
    Dispose();
  }

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

  public OBRandom(bool useSys) : this(openbabelPINVOKE.new_OBRandom__SWIG_0(useSys), true) {
  }

  public OBRandom() : this(openbabelPINVOKE.new_OBRandom__SWIG_1(), true) {
  }

  public void Seed(int seed) {
    openbabelPINVOKE.OBRandom_Seed(swigCPtr, seed);
  }

  public void TimeSeed() {
    openbabelPINVOKE.OBRandom_TimeSeed(swigCPtr);
  }

  public int NextInt() {
    int ret = openbabelPINVOKE.OBRandom_NextInt(swigCPtr);
    return ret;
  }

  public double NextFloat() {
    double ret = openbabelPINVOKE.OBRandom_NextFloat(swigCPtr);
    return ret;
  }

}
