/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 1.3.40
 *
 * 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) {
        if (swigCMemOwn) {
          swigCMemOwn = false;
          libsbmlPINVOKE.delete_Compartment(swigCPtr);
        }
        swigCPtr = new HandleRef(null, IntPtr.Zero);
      }
      GC.SuppressFinalize(this);
      base.Dispose();
    }
  }

  public Compartment(long level, long version) : this(libsbmlPINVOKE.new_Compartment__SWIG_0(level, version), true) {
    if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
  }

  public Compartment(SBMLNamespaces sbmlns) : this(libsbmlPINVOKE.new_Compartment__SWIG_1(SBMLNamespaces.getCPtr(sbmlns)), true) {
    if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
  }

  public Compartment(Compartment orig) : this(libsbmlPINVOKE.new_Compartment__SWIG_2(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 new string getId() {
    string ret = libsbmlPINVOKE.Compartment_getId(swigCPtr);
    return ret;
  }

  public new string getName() {
    string ret = libsbmlPINVOKE.Compartment_getName(swigCPtr);
    return ret;
  }

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

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

  public double getSpatialDimensionsAsDouble() {
    double ret = libsbmlPINVOKE.Compartment_getSpatialDimensionsAsDouble(swigCPtr);
    return ret;
  }

  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 new bool isSetId() {
    bool ret = libsbmlPINVOKE.Compartment_isSetId(swigCPtr);
    return ret;
  }

  public new bool isSetName() {
    bool ret = libsbmlPINVOKE.Compartment_isSetName(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 bool isSetSpatialDimensions() {
    bool ret = libsbmlPINVOKE.Compartment_isSetSpatialDimensions(swigCPtr);
    return ret;
  }

  public bool isSetConstant() {
    bool ret = libsbmlPINVOKE.Compartment_isSetConstant(swigCPtr);
    return ret;
  }

  public new int setId(string sid) {
    int ret = libsbmlPINVOKE.Compartment_setId(swigCPtr, sid);
    if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public new int setName(string name) {
    int ret = libsbmlPINVOKE.Compartment_setName(swigCPtr, name);
    if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int setCompartmentType(string sid) {
    int ret = libsbmlPINVOKE.Compartment_setCompartmentType(swigCPtr, sid);
    if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int setSpatialDimensions(long value) {
    int ret = libsbmlPINVOKE.Compartment_setSpatialDimensions__SWIG_0(swigCPtr, value);
    return ret;
  }

  public int setSpatialDimensions(double value) {
    int ret = libsbmlPINVOKE.Compartment_setSpatialDimensions__SWIG_1(swigCPtr, value);
    return ret;
  }

  public int setSize(double value) {
    int ret = libsbmlPINVOKE.Compartment_setSize(swigCPtr, value);
    return ret;
  }

  public int setVolume(double value) {
    int ret = libsbmlPINVOKE.Compartment_setVolume(swigCPtr, value);
    return ret;
  }

  public int setUnits(string sid) {
    int ret = libsbmlPINVOKE.Compartment_setUnits(swigCPtr, sid);
    if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int setOutside(string sid) {
    int ret = libsbmlPINVOKE.Compartment_setOutside(swigCPtr, sid);
    if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int setConstant(bool value) {
    int ret = libsbmlPINVOKE.Compartment_setConstant(swigCPtr, value);
    return ret;
  }

  public int unsetName() {
    int ret = libsbmlPINVOKE.Compartment_unsetName(swigCPtr);
    return ret;
  }

  public int unsetCompartmentType() {
    int ret = libsbmlPINVOKE.Compartment_unsetCompartmentType(swigCPtr);
    return ret;
  }

  public int unsetSize() {
    int ret = libsbmlPINVOKE.Compartment_unsetSize(swigCPtr);
    return ret;
  }

  public int unsetVolume() {
    int ret = libsbmlPINVOKE.Compartment_unsetVolume(swigCPtr);
    return ret;
  }

  public int unsetUnits() {
    int ret = libsbmlPINVOKE.Compartment_unsetUnits(swigCPtr);
    return ret;
  }

  public int unsetOutside() {
    int ret = libsbmlPINVOKE.Compartment_unsetOutside(swigCPtr);
    return ret;
  }

  public int unsetSpatialDimensions() {
    int ret = libsbmlPINVOKE.Compartment_unsetSpatialDimensions(swigCPtr);
    return ret;
  }

  public UnitDefinition getDerivedUnitDefinition() {
    IntPtr cPtr = libsbmlPINVOKE.Compartment_getDerivedUnitDefinition__SWIG_0(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;
  }

  public override bool hasRequiredAttributes() {
    bool ret = libsbmlPINVOKE.Compartment_hasRequiredAttributes(swigCPtr);
    return ret;
  }

}

}
