1 //------------------------------------------------------------------------------
2 // <auto-generated />
3 //
4 // This file was automatically generated by SWIG (http://www.swig.org).
5 // Version 4.0.2
6 //
7 // Do not make changes to this file unless you know what you are doing--modify
8 // the SWIG interface file instead.
9 //------------------------------------------------------------------------------
10 
11 namespace libsbml {
12 
13  using System;
14  using System.Runtime.InteropServices;
15 
16 /**
17  * @sbmlpackage{core}
18  *
19 @htmlinclude pkg-marker-core.html Exception used by package extensions
20  *
21  * @htmlinclude not-sbml-warning.html
22  *
23  *
24  *
25  * Certain situations can result in an exception being thrown by libSBML
26  * package extensions.  A prominent example involves the constructor for
27  * SBMLNamespaces (and its subclasses), which will throw
28  * SBMLExtensionException if the arguments it is given refer to an unknown
29  * SBML Level&nbsp;3 package.  The situation can arise for legitimate SBML
30  * files if the necessary package extension has not been registered with
31  * a given copy of libSBML.
32  *
33  *
34  *
35  * @see SBMLNamespaces
36  */
37 
38 public class SBMLExtensionException : global::System.IDisposable {
39 	private HandleRef swigCPtr;
40 	protected bool swigCMemOwn;
41 
SBMLExtensionException(IntPtr cPtr, bool cMemoryOwn)42 	internal SBMLExtensionException(IntPtr cPtr, bool cMemoryOwn)
43 	{
44 		swigCMemOwn = cMemoryOwn;
45 		swigCPtr    = new HandleRef(this, cPtr);
46 	}
47 
getCPtr(SBMLExtensionException obj)48 	internal static HandleRef getCPtr(SBMLExtensionException obj)
49 	{
50 		return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
51 	}
52 
getCPtrAndDisown(SBMLExtensionException obj)53 	internal static HandleRef getCPtrAndDisown (SBMLExtensionException obj)
54 	{
55 		HandleRef ptr = new HandleRef(null, IntPtr.Zero);
56 
57 		if (obj != null)
58 		{
59 			ptr             = obj.swigCPtr;
60 			obj.swigCMemOwn = false;
61 		}
62 
63 		return ptr;
64 	}
65 
~SBMLExtensionException()66   ~SBMLExtensionException() {
67     Dispose(false);
68   }
69 
Dispose()70   public void Dispose() {
71     Dispose(true);
72     global::System.GC.SuppressFinalize(this);
73   }
74 
Dispose(bool disposing)75   protected virtual void Dispose(bool disposing) {
76     lock(this) {
77       if (swigCPtr.Handle != global::System.IntPtr.Zero) {
78         if (swigCMemOwn) {
79           swigCMemOwn = false;
80           libsbmlPINVOKE.delete_SBMLExtensionException(swigCPtr);
81         }
82         swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
83       }
84     }
85   }
86 
87 
88 /**
89    * Creates a new SBMLExtensionException object with a given message.
90    *
91    * @param errmsg a string, the text of the error message to store
92    * with this exception.
93    */ public
SBMLExtensionException(string errmsg)94  SBMLExtensionException(string errmsg) : this(libsbmlPINVOKE.new_SBMLExtensionException(errmsg), true) {
95   }
96 
97 }
98 
99 }
100