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

  ~KineticLaw() {
    Dispose();
  }

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

  public KineticLaw(string formula, string timeUnits, string substanceUnits) : this(libsbmlPINVOKE.new_KineticLaw__SWIG_0(formula, timeUnits, substanceUnits), true) {
    if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
  }

  public KineticLaw(string formula, string timeUnits) : this(libsbmlPINVOKE.new_KineticLaw__SWIG_1(formula, timeUnits), true) {
    if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
  }

  public KineticLaw(string formula) : this(libsbmlPINVOKE.new_KineticLaw__SWIG_2(formula), true) {
    if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
  }

  public KineticLaw() : this(libsbmlPINVOKE.new_KineticLaw__SWIG_3(), true) {
  }

  public KineticLaw(ASTNode math, string timeUnits, string substanceUnits) : this(libsbmlPINVOKE.new_KineticLaw__SWIG_4(ASTNode.getCPtr(math), timeUnits, substanceUnits), true) {
    if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
  }

  public KineticLaw(ASTNode math, string timeUnits) : this(libsbmlPINVOKE.new_KineticLaw__SWIG_5(ASTNode.getCPtr(math), timeUnits), true) {
    if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
  }

  public KineticLaw(ASTNode math) : this(libsbmlPINVOKE.new_KineticLaw__SWIG_6(ASTNode.getCPtr(math)), true) {
  }

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

  public KineticLaw(long level, long version) : this(libsbmlPINVOKE.new_KineticLaw__SWIG_8(level, version), true) {
  }

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

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

  public string getFormula() {
    string ret = libsbmlPINVOKE.KineticLaw_getFormula(swigCPtr);
    return ret;
  }

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

  public string getTimeUnits() {
    string ret = libsbmlPINVOKE.KineticLaw_getTimeUnits(swigCPtr);
    return ret;
  }

  public string getSubstanceUnits() {
    string ret = libsbmlPINVOKE.KineticLaw_getSubstanceUnits(swigCPtr);
    return ret;
  }

  public bool isSetFormula() {
    bool ret = libsbmlPINVOKE.KineticLaw_isSetFormula(swigCPtr);
    return ret;
  }

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

  public bool isSetTimeUnits() {
    bool ret = libsbmlPINVOKE.KineticLaw_isSetTimeUnits(swigCPtr);
    return ret;
  }

  public bool isSetSubstanceUnits() {
    bool ret = libsbmlPINVOKE.KineticLaw_isSetSubstanceUnits(swigCPtr);
    return ret;
  }

  public void setFormula(string formula) {
    libsbmlPINVOKE.KineticLaw_setFormula(swigCPtr, formula);
    if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
  }

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

  public void setTimeUnits(string sid) {
    libsbmlPINVOKE.KineticLaw_setTimeUnits(swigCPtr, sid);
    if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
  }

  public void setSubstanceUnits(string sid) {
    libsbmlPINVOKE.KineticLaw_setSubstanceUnits(swigCPtr, sid);
    if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
  }

  public void unsetTimeUnits() {
    libsbmlPINVOKE.KineticLaw_unsetTimeUnits(swigCPtr);
  }

  public void unsetSubstanceUnits() {
    libsbmlPINVOKE.KineticLaw_unsetSubstanceUnits(swigCPtr);
  }

  public void addParameter(Parameter p) {
    libsbmlPINVOKE.KineticLaw_addParameter(swigCPtr, Parameter.getCPtr(p));
  }

  public Parameter createParameter() {
    IntPtr cPtr = libsbmlPINVOKE.KineticLaw_createParameter(swigCPtr);
    Parameter ret = (cPtr == IntPtr.Zero) ? null : new Parameter(cPtr, false);
    return ret;
  }

  public ListOfParameters getListOfParameters() {
    IntPtr cPtr = libsbmlPINVOKE.KineticLaw_getListOfParameters__SWIG_0(swigCPtr);
    ListOfParameters ret = (cPtr == IntPtr.Zero) ? null : new ListOfParameters(cPtr, false);
    return ret;
  }

  public Parameter getParameter(long n) {
    IntPtr cPtr = libsbmlPINVOKE.KineticLaw_getParameter__SWIG_0(swigCPtr, n);
    Parameter ret = (cPtr == IntPtr.Zero) ? null : new Parameter(cPtr, false);
    return ret;
  }

  public Parameter getParameter(string sid) {
    IntPtr cPtr = libsbmlPINVOKE.KineticLaw_getParameter__SWIG_2(swigCPtr, sid);
    Parameter ret = (cPtr == IntPtr.Zero) ? null : new Parameter(cPtr, false);
    if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public long getNumParameters() { return (long)libsbmlPINVOKE.KineticLaw_getNumParameters(swigCPtr); }

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

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

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

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

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

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

}

}
