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

  ~Delay() {
    Dispose();
  }

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

  public Delay(ASTNode math) : this(libsbmlPINVOKE.new_Delay__SWIG_0(ASTNode.getCPtr(math)), true) {
  }

  public Delay() : this(libsbmlPINVOKE.new_Delay__SWIG_1(), true) {
  }

  public Delay(long level, long version, XMLNamespaces xmlns) : this(libsbmlPINVOKE.new_Delay__SWIG_2(level, version, XMLNamespaces.getCPtr(xmlns)), true) {
  }

  public Delay(long level, long version) : this(libsbmlPINVOKE.new_Delay__SWIG_3(level, version), true) {
  }

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

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

  public ASTNode getMath() {
    IntPtr cPtr = libsbmlPINVOKE.Delay_getMath(swigCPtr);
    ASTNode ret = (cPtr == IntPtr.Zero) ? null : new ASTNode(cPtr, false);
    return ret;
  }

  public bool isSetMath() {
    bool ret = libsbmlPINVOKE.Delay_isSetMath(swigCPtr);
    return ret;
  }

  public void setMath(ASTNode math) {
    libsbmlPINVOKE.Delay_setMath(swigCPtr, ASTNode.getCPtr(math));
  }

  public UnitDefinition getDerivedUnitDefinition() {
    IntPtr cPtr = libsbmlPINVOKE.Delay_getDerivedUnitDefinition(swigCPtr);
    UnitDefinition ret = (cPtr == IntPtr.Zero) ? null : new UnitDefinition(cPtr, false);
    return ret;
  }

  public bool containsUndeclaredUnits() {
    bool ret = libsbmlPINVOKE.Delay_containsUndeclaredUnits(swigCPtr);
    return ret;
  }

  public override void setSBMLDocument(SBMLDocument d) {
    libsbmlPINVOKE.Delay_setSBMLDocument(swigCPtr, SBMLDocument.getCPtr(d));
  }

  public override void setParentSBMLObject(SBase sb) {
    libsbmlPINVOKE.Delay_setParentSBMLObject(swigCPtr, SBase.getCPtr(sb));
  }

  public override int getTypeCode() {
    int ret = libsbmlPINVOKE.Delay_getTypeCode(swigCPtr);
    return ret;
  }

  public override string getElementName() {
    string ret = libsbmlPINVOKE.Delay_getElementName(swigCPtr);
    return ret;
  }

}

}
