/* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). * Version 1.3.39 * * 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 CompartmentType : SBase { private HandleRef swigCPtr; internal CompartmentType(IntPtr cPtr, bool cMemoryOwn) : base(libsbmlPINVOKE.CompartmentTypeUpcast(cPtr), cMemoryOwn) { //super(libsbmlPINVOKE.CompartmentTypeUpcast(cPtr), cMemoryOwn); swigCPtr = new HandleRef(this, cPtr); } internal static HandleRef getCPtr(CompartmentType obj) { return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr; } internal static HandleRef getCPtrAndDisown (CompartmentType obj) { HandleRef ptr = new HandleRef(null, IntPtr.Zero); if (obj != null) { ptr = obj.swigCPtr; obj.swigCMemOwn = false; } return ptr; } ~CompartmentType() { Dispose(); } public override void Dispose() { lock(this) { if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { swigCMemOwn = false; libsbmlPINVOKE.delete_CompartmentType(swigCPtr); } swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); base.Dispose(); } } public CompartmentType(string id, string name) : this(libsbmlPINVOKE.new_CompartmentType__SWIG_0(id, name), true) { } public CompartmentType(string id) : this(libsbmlPINVOKE.new_CompartmentType__SWIG_1(id), true) { } public CompartmentType() : this(libsbmlPINVOKE.new_CompartmentType__SWIG_2(), true) { } public CompartmentType(long level, long version, XMLNamespaces xmlns) : this(libsbmlPINVOKE.new_CompartmentType__SWIG_3(level, version, XMLNamespaces.getCPtr(xmlns)), true) { } public CompartmentType(long level, long version) : this(libsbmlPINVOKE.new_CompartmentType__SWIG_4(level, version), true) { } public CompartmentType(SBMLNamespaces sbmlns) : this(libsbmlPINVOKE.new_CompartmentType__SWIG_5(SBMLNamespaces.getCPtr(sbmlns)), true) { } public CompartmentType(CompartmentType orig) : this(libsbmlPINVOKE.new_CompartmentType__SWIG_6(CompartmentType.getCPtr(orig)), true) { if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve(); } public new CompartmentType clone() { IntPtr cPtr = libsbmlPINVOKE.CompartmentType_clone(swigCPtr); CompartmentType ret = (cPtr == IntPtr.Zero) ? null : new CompartmentType(cPtr, true); return ret; } public override int getTypeCode() { int ret = libsbmlPINVOKE.CompartmentType_getTypeCode(swigCPtr); return ret; } public override string getElementName() { string ret = libsbmlPINVOKE.CompartmentType_getElementName(swigCPtr); return ret; } } }