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

  ~Compartment() {
    Dispose();
  }

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

  public Compartment(string id, string name) : this(libsbmlPINVOKE.new_Compartment__SWIG_0(id, name), true) {
  }

  public Compartment(string id) : this(libsbmlPINVOKE.new_Compartment__SWIG_1(id), true) {
  }

  public Compartment() : this(libsbmlPINVOKE.new_Compartment__SWIG_2(), true) {
  }

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

  public Compartment(long level, long version) : this(libsbmlPINVOKE.new_Compartment__SWIG_4(level, version), true) {
  }

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

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

  public void initDefaults() {
    libsbmlPINVOKE.Compartment_initDefaults(swigCPtr);
  }

  public string getCompartmentType() {
    string ret = libsbmlPINVOKE.Compartment_getCompartmentType(swigCPtr);
    return ret;
  }

  public long getSpatialDimensions() { return (long)libsbmlPINVOKE.Compartment_getSpatialDimensions(swigCPtr); }

  public double getSize() {
    double ret = libsbmlPINVOKE.Compartment_getSize(swigCPtr);
    return ret;
  }

  public double getVolume() {
    double ret = libsbmlPINVOKE.Compartment_getVolume(swigCPtr);
    return ret;
  }

  public string getUnits() {
    string ret = libsbmlPINVOKE.Compartment_getUnits(swigCPtr);
    return ret;
  }

  public string getOutside() {
    string ret = libsbmlPINVOKE.Compartment_getOutside(swigCPtr);
    return ret;
  }

  public bool getConstant() {
    bool ret = libsbmlPINVOKE.Compartment_getConstant(swigCPtr);
    return ret;
  }

  public bool isSetCompartmentType() {
    bool ret = libsbmlPINVOKE.Compartment_isSetCompartmentType(swigCPtr);
    return ret;
  }

  public bool isSetSize() {
    bool ret = libsbmlPINVOKE.Compartment_isSetSize(swigCPtr);
    return ret;
  }

  public bool isSetVolume() {
    bool ret = libsbmlPINVOKE.Compartment_isSetVolume(swigCPtr);
    return ret;
  }

  public bool isSetUnits() {
    bool ret = libsbmlPINVOKE.Compartment_isSetUnits(swigCPtr);
    return ret;
  }

  public bool isSetOutside() {
    bool ret = libsbmlPINVOKE.Compartment_isSetOutside(swigCPtr);
    return ret;
  }

  public void setCompartmentType(string sid) {
    libsbmlPINVOKE.Compartment_setCompartmentType(swigCPtr, sid);
  }

  public void setSpatialDimensions(long value) {
    libsbmlPINVOKE.Compartment_setSpatialDimensions(swigCPtr, value);
  }

  public void setSize(double value) {
    libsbmlPINVOKE.Compartment_setSize(swigCPtr, value);
  }

  public void setVolume(double value) {
    libsbmlPINVOKE.Compartment_setVolume(swigCPtr, value);
  }

  public void setUnits(string sid) {
    libsbmlPINVOKE.Compartment_setUnits(swigCPtr, sid);
  }

  public void setOutside(string sid) {
    libsbmlPINVOKE.Compartment_setOutside(swigCPtr, sid);
  }

  public void setConstant(bool value) {
    libsbmlPINVOKE.Compartment_setConstant(swigCPtr, value);
  }

  public void unsetCompartmentType() {
    libsbmlPINVOKE.Compartment_unsetCompartmentType(swigCPtr);
  }

  public void unsetSize() {
    libsbmlPINVOKE.Compartment_unsetSize(swigCPtr);
  }

  public void unsetVolume() {
    libsbmlPINVOKE.Compartment_unsetVolume(swigCPtr);
  }

  public void unsetUnits() {
    libsbmlPINVOKE.Compartment_unsetUnits(swigCPtr);
  }

  public void unsetOutside() {
    libsbmlPINVOKE.Compartment_unsetOutside(swigCPtr);
  }

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

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

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

}

}
