/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 2.0.0
 *
 * 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) {
        if (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 int setYear(long year) {
    int ret = libsbmlPINVOKE.Date_setYear(swigCPtr, year);
    return ret;
  }

  public int setMonth(long month) {
    int ret = libsbmlPINVOKE.Date_setMonth(swigCPtr, month);
    return ret;
  }

  public int setDay(long day) {
    int ret = libsbmlPINVOKE.Date_setDay(swigCPtr, day);
    return ret;
  }

  public int setHour(long hour) {
    int ret = libsbmlPINVOKE.Date_setHour(swigCPtr, hour);
    return ret;
  }

  public int setMinute(long minute) {
    int ret = libsbmlPINVOKE.Date_setMinute(swigCPtr, minute);
    return ret;
  }

  public int setSecond(long second) {
    int ret = libsbmlPINVOKE.Date_setSecond(swigCPtr, second);
    return ret;
  }

  public int setSignOffset(long sign) {
    int ret = libsbmlPINVOKE.Date_setSignOffset(swigCPtr, sign);
    return ret;
  }

  public int setHoursOffset(long hoursOffset) {
    int ret = libsbmlPINVOKE.Date_setHoursOffset(swigCPtr, hoursOffset);
    return ret;
  }

  public int setMinutesOffset(long minutesOffset) {
    int ret = libsbmlPINVOKE.Date_setMinutesOffset(swigCPtr, minutesOffset);
    return ret;
  }

  public int setDateAsString(string date) {
    int ret = libsbmlPINVOKE.Date_setDateAsString(swigCPtr, date);
    if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public bool representsValidDate() {
    bool ret = libsbmlPINVOKE.Date_representsValidDate(swigCPtr);
    return ret;
  }

}

}
