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

  ~InitialAssignment() {
    Dispose();
  }

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

  public InitialAssignment(string symbol) : this(libsbmlPINVOKE.new_InitialAssignment__SWIG_0(symbol), true) {
    if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
  }

  public InitialAssignment() : this(libsbmlPINVOKE.new_InitialAssignment__SWIG_1(), true) {
  }

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

  public InitialAssignment(long level, long version) : this(libsbmlPINVOKE.new_InitialAssignment__SWIG_3(level, version), true) {
  }

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

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

  public string getSymbol() {
    string ret = libsbmlPINVOKE.InitialAssignment_getSymbol(swigCPtr);
    return ret;
  }

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

  public bool isSetSymbol() {
    bool ret = libsbmlPINVOKE.InitialAssignment_isSetSymbol(swigCPtr);
    return ret;
  }

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

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

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

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

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

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

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

}

}
