/* ----------------------------------------------------------------------------
 * 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 Date : IDisposable {
	private HandleRef swigCPtr;
	protected bool swigCMemOwn;
	
	internal Date(IntPtr cPtr, bool cMemoryOwn)
	{
		swigCMemOwn = cMemoryOwn;
		swigCPtr    = new HandleRef(this, cPtr);
	}
	
	internal static HandleRef getCPtr(Date obj)
	{
		return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
	}
	
	internal static HandleRef getCPtrAndDisown (Date obj)
	{
		HandleRef ptr = new HandleRef(null, IntPtr.Zero);
		
		if (obj != null)
		{
			ptr             = obj.swigCPtr;
			obj.swigCMemOwn = false;
		}
		
		return ptr;
	}

  ~Date() {
    Dispose();
  }

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

  public static bool operator==(Date lhs, Date 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!=(Date lhs, Date rhs)
  {
    return !(lhs == rhs);
  }

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

    return this == (Date)sb;
  }

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

  public Date(long year, long month, long day, long hour, long minute, long second, long sign, long hoursOffset, long minutesOffset) : this(libsbmlPINVOKE.new_Date__SWIG_0(year, month, day, hour, minute, second, sign, hoursOffset, minutesOffset), true) {
  }

  public Date(long year, long month, long day, long hour, long minute, long second, long sign, long hoursOffset) : this(libsbmlPINVOKE.new_Date__SWIG_1(year, month, day, hour, minute, second, sign, hoursOffset), true) {
  }

  public Date(long year, long month, long day, long hour, long minute, long second, long sign) : this(libsbmlPINVOKE.new_Date__SWIG_2(year, month, day, hour, minute, second, sign), true) {
  }

  public Date(long year, long month, long day, long hour, long minute, long second) : this(libsbmlPINVOKE.new_Date__SWIG_3(year, month, day, hour, minute, second), true) {
  }

  public Date(long year, long month, long day, long hour, long minute) : this(libsbmlPINVOKE.new_Date__SWIG_4(year, month, day, hour, minute), true) {
  }

  public Date(long year, long month, long day, long hour) : this(libsbmlPINVOKE.new_Date__SWIG_5(year, month, day, hour), true) {
  }

  public Date(long year, long month, long day) : this(libsbmlPINVOKE.new_Date__SWIG_6(year, month, day), true) {
  }

  public Date(long year, long month) : this(libsbmlPINVOKE.new_Date__SWIG_7(year, month), true) {
  }

  public Date(long year) : this(libsbmlPINVOKE.new_Date__SWIG_8(year), true) {
  }

  public Date() : this(libsbmlPINVOKE.new_Date__SWIG_9(), true) {
  }

  public Date(string date) : this(libsbmlPINVOKE.new_Date__SWIG_10(date), true) {
    if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
  }

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

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

  public long getYear() { return (long)libsbmlPINVOKE.Date_getYear(swigCPtr); }

  public long getMonth() { return (long)libsbmlPINVOKE.Date_getMonth(swigCPtr); }

  public long getDay() { return (long)libsbmlPINVOKE.Date_getDay(swigCPtr); }

  public long getHour() { return (long)libsbmlPINVOKE.Date_getHour(swigCPtr); }

  public long getMinute() { return (long)libsbmlPINVOKE.Date_getMinute(swigCPtr); }

  public long getSecond() { return (long)libsbmlPINVOKE.Date_getSecond(swigCPtr); }

  public long getSignOffset() { return (long)libsbmlPINVOKE.Date_getSignOffset(swigCPtr); }

  public long getHoursOffset() { return (long)libsbmlPINVOKE.Date_getHoursOffset(swigCPtr); }

  public long getMinutesOffset() { return (long)libsbmlPINVOKE.Date_getMinutesOffset(swigCPtr); }

  public string getDateAsString() {
    string ret = libsbmlPINVOKE.Date_getDateAsString(swigCPtr);
    return ret;
  }

  public void setYear(long year) {
    libsbmlPINVOKE.Date_setYear(swigCPtr, year);
  }

  public void setMonth(long month) {
    libsbmlPINVOKE.Date_setMonth(swigCPtr, month);
  }

  public void setDay(long day) {
    libsbmlPINVOKE.Date_setDay(swigCPtr, day);
  }

  public void setHour(long hour) {
    libsbmlPINVOKE.Date_setHour(swigCPtr, hour);
  }

  public void setMinute(long minute) {
    libsbmlPINVOKE.Date_setMinute(swigCPtr, minute);
  }

  public void setSecond(long second) {
    libsbmlPINVOKE.Date_setSecond(swigCPtr, second);
  }

  public void setSignOffset(long sign) {
    libsbmlPINVOKE.Date_setSignOffset(swigCPtr, sign);
  }

  public void setHoursOffset(long hoursOffset) {
    libsbmlPINVOKE.Date_setHoursOffset(swigCPtr, hoursOffset);
  }

  public void setMinutesOffset(long minutesOffset) {
    libsbmlPINVOKE.Date_setMinutesOffset(swigCPtr, minutesOffset);
  }

  public void setDateAsString(string date) {
    libsbmlPINVOKE.Date_setDateAsString(swigCPtr, date);
    if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
  }

}

}
