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

namespace libsbml {

using System;
using System.Runtime.InteropServices;

public class ModelHistory : IDisposable {
	private HandleRef swigCPtr;
	protected bool swigCMemOwn;
	
	internal ModelHistory(IntPtr cPtr, bool cMemoryOwn)
	{
		swigCMemOwn = cMemoryOwn;
		swigCPtr    = new HandleRef(this, cPtr);
	}
	
	internal static HandleRef getCPtr(ModelHistory obj)
	{
		return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
	}
	
	internal static HandleRef getCPtrAndDisown (ModelHistory obj)
	{
		HandleRef ptr = new HandleRef(null, IntPtr.Zero);
		
		if (obj != null)
		{
			ptr             = obj.swigCPtr;
			obj.swigCMemOwn = false;
		}
		
		return ptr;
	}

  ~ModelHistory() {
    Dispose();
  }

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

  public static bool operator==(ModelHistory lhs, ModelHistory rhs)
  {
    if((Object)lhs == (Object)rhs)
    {
      return true;
    }

    if( ((Object)lhs == null) || ((Object)rhs == null) )
    {
      return false;
    }

    return (getCPtr(lhs).Handle.ToString() == getCPtr(rhs).Handle.ToString());
  }

  public static bool operator!=(ModelHistory lhs, ModelHistory rhs)
  {
    return !(lhs == rhs);
  }

  public override bool Equals(Object sb)
  {
    if ( ! (sb is ModelHistory) )
    {
      return false;
    }

    return this == (ModelHistory)sb;
  }

  public override int GetHashCode()
  {
    return swigCPtr.Handle.ToInt32();
  }

  public ModelHistory() : this(libsbmlPINVOKE.new_ModelHistory__SWIG_0(), true) {
  }

  public ModelHistory(ModelHistory orig) : this(libsbmlPINVOKE.new_ModelHistory__SWIG_1(ModelHistory.getCPtr(orig)), true) {
    if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
  }

  public ModelHistory clone() {
    IntPtr cPtr = libsbmlPINVOKE.ModelHistory_clone(swigCPtr);
    ModelHistory ret = (cPtr == IntPtr.Zero) ? null : new ModelHistory(cPtr, true);
    return ret;
  }

  public Date getCreatedDate() {
    IntPtr cPtr = libsbmlPINVOKE.ModelHistory_getCreatedDate(swigCPtr);
    Date ret = (cPtr == IntPtr.Zero) ? null : new Date(cPtr, false);
    return ret;
  }

  public Date getModifiedDate() {
    IntPtr cPtr = libsbmlPINVOKE.ModelHistory_getModifiedDate__SWIG_0(swigCPtr);
    Date ret = (cPtr == IntPtr.Zero) ? null : new Date(cPtr, false);
    return ret;
  }

  public bool isSetCreatedDate() {
    bool ret = libsbmlPINVOKE.ModelHistory_isSetCreatedDate(swigCPtr);
    return ret;
  }

  public bool isSetModifiedDate() {
    bool ret = libsbmlPINVOKE.ModelHistory_isSetModifiedDate(swigCPtr);
    return ret;
  }

  public void setCreatedDate(Date date) {
    libsbmlPINVOKE.ModelHistory_setCreatedDate(swigCPtr, Date.getCPtr(date));
  }

  public void setModifiedDate(Date date) {
    libsbmlPINVOKE.ModelHistory_setModifiedDate(swigCPtr, Date.getCPtr(date));
  }

  public void addModifiedDate(Date date) {
    libsbmlPINVOKE.ModelHistory_addModifiedDate(swigCPtr, Date.getCPtr(date));
  }

  public Date getModifiedDate(long n) {
    IntPtr cPtr = libsbmlPINVOKE.ModelHistory_getModifiedDate__SWIG_1(swigCPtr, n);
    Date ret = (cPtr == IntPtr.Zero) ? null : new Date(cPtr, false);
    return ret;
  }

  public long getNumModifiedDates() { return (long)libsbmlPINVOKE.ModelHistory_getNumModifiedDates(swigCPtr); }

  public void addCreator(ModelCreator mc) {
    libsbmlPINVOKE.ModelHistory_addCreator(swigCPtr, ModelCreator.getCPtr(mc));
  }

  public ModelCreator getCreator(long n) {
    IntPtr cPtr = libsbmlPINVOKE.ModelHistory_getCreator(swigCPtr, n);
    ModelCreator ret = (cPtr == IntPtr.Zero) ? null : new ModelCreator(cPtr, false);
    return ret;
  }

  public long getNumCreators() { return (long)libsbmlPINVOKE.ModelHistory_getNumCreators(swigCPtr); }

}

}
