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 XML-level errors, warnings and other diagnostics.
20  *
21  * @htmlinclude not-sbml-warning.html
22  *
23  * LibSBML can be configured to use any of a number of XML parsers; at the
24  * time of this writing, libSBML supports Xerces versions 2.4 through 3.1,
25  * Expat version 1.95.x and higher, and libxml2 version 2.6.16 and higher.
26  * These parsers each report different status codes for the various
27  * exceptions that can occur during XML processing.  The XMLError object
28  * class abstracts away from the particular diagnostics reported by the
29  * different parsers and presents a single uniform interface and set of
30  * status codes, along with operations for manipulating the error objects.
31  *
32  * When the libSBML XML parser layer encounters an error in the XML content
33  * being processed, or when there is something else wrong (such as an
34  * out-of-memory condition), the problems are reported as XMLError objects.
35  * Each XMLError object instance has an identification number that
36  * identifies the nature of the problem.
37  * @if clike This error identifier will be up to five digits
38  * long and drawn from the enumeration <a class='el'
39  * href='#error-codes'>XMLErrorCode_t</a>.  Applications can use the
40  * error identifiers as a means of recognizing the error encountered and
41  * changing their behavior if desired. @else This
42  * error identifier is one of the constants listed in the next section below.
43  * Applications can use the error identifiers as a means of recognizing the
44  * error encountered and changing their behavior if desired.  @endif
45  *
46  * Integer error codes are useful for software, but not so much for telling
47  * humans what happened.  For this reason, XMLError also provides two text
48  * messages describing the nature of the error.  These messages are
49  * accessible by means of the methods XMLError::getShortMessage() and
50  * XMLError::getMessage().  The method XMLError::getShortMessage() returns
51  * a very brief synopsis of the warning or error condition, whereas
52  * XMLError::getMessage() returns a longer explanation.  These text strings
53  * are suitable for displaying to human users.
54  *
55  * Each XMLError object also contains a category code; its value may be
56  * retrieved using the method XMLError::getCategory().  Category values
57  * are drawn from @if clike the enumeration <a class='el' href='#XMLErrorCategory_t'>XMLErrorCategory_t</a> described below.@else a
58  * set of constants whose names begin with the characters @c LIBSBML_CAT_, described below.@endif&nbsp;Categories
59  * are used by libSBML to provide more information to calling programs about
60  * the nature of a given error.
61  *
62  * In addition to category codes, each XMLError object also has a severity
63  * code; its value may be retrieved using the method
64  * XMLError::getSeverity().  Severity code values are drawn from
65  * @if clike the enumeration <a class='el' href='#XMLErrorSeverity_t'>XMLErrorSeverity_t</a>@else a
66  * set of constants whose names begin with the characters @c LIBSBML_SEV_@endif,
67  * described below. Severity levels range from informational
68  * (@link libsbml#LIBSBML_SEV_INFO LIBSBML_SEV_INFO@endlink) to
69  * fatal errors (@link libsbml#LIBSBML_SEV_FATAL LIBSBML_SEV_FATAL@endlink).
70  *
71  * Finally, XMLError objects record the line and column near where the
72  * problem occurred in the XML content.  The values can be retrieved using
73  * the methods XMLError::getLine() and XMLError::getColumn().  We say 'near
74  * where the problem occurred', because many factors affect how accurate
75  * the line/column information ultimately is.  For example, sometimes, the
76  * underlying XML parsers can only report such information for the parent
77  * XML element where an error occurs, and not for the specific point where
78  * the problem occurs.  In other situations, some parsers report invalid
79  * line and/or column numbers altogether.  If this occurs, libSBML sets the
80  * line and/or column number in the XMLError object to either
81  * <code>0</code> or the value of the maximum unsigned long integer
82  * representable on the platform where libSBML is running.  The probability
83  * that a true line or column number in an SBML model would equal this
84  * value is vanishingly small; thus, if an application encounters these
85  * values in an XMLError object, it can assume no valid line/column number
86  * could be provided by libSBML in that situation.
87  *
88  * @if clike
89  * <h3><a class='anchor' name='error-codes'>XMLErrorCode_t</a></h3>
90  *
91  * This is an enumeration of all the error and warning codes returned by
92  * the XML layer in libSBML.  Each code is an integer with a 4-digit value
93  * less than 10000.  The following table lists each possible value and a
94  * brief description of its meaning.
95  * @endif@if java <h3><a class='anchor'
96  * name='error-codes'>Error codes associated with XMLError objects</a></h3>
97  *
98  * The error and warning codes returned by the XML layer in libSBML are
99  * listed in the table below.  In the libSBML Java language interface,
100  * these error identifiers are currently implemented as static integer
101  * constants defined in the interface class <code><a
102  * href='libsbml.libsbml.html'>libsbmlConstants</a></code>.  This is
103  * admittedly not an ideal approach from the standpoint of modern Java
104  * programming, but it was necessary to work around the lack of
105  * enumerations in Java prior to JDK 1.5.  Future versions of libSBML may
106  * use a proper Java enumeration type to define the error
107  * identifiers. @endif@if csharp <h3><a class='anchor'
108  * name='error-codes'>Error codes associated with XMLError objects</a></h3>
109  *
110  * The error and warning codes returned by the XML layer in libSBML are
111  * listed in the table below.  In the libSBML C# language interface,
112  * these error identifiers are currently implemented as static integer
113  * constants defined in the interface class @link libsbmlcs.libsbml@endlink.@endif
114  *
115  * <center>
116  * <table cellspacing='1' cellpadding='1' border='0' width='95%'
117           class='text-table normal-font alt-row-colors'>
118  * <caption>Possible XMLError error codes.  Depending on the programming
119  * language in use, the <em>Enumerator</em> values will be defined either
120  * as a value from an enumeration type @if clike (XMLErrorCode_t)@endif
121  * or as integer constants.
122  * To make this table more compact, we have shortened the identifiers for
123  * the category and severity codes to their essential parts.  To get the
124  * actual names of the constants, prepend <code>LIBSBML_CAT_</code> to the
125  * category names and <code>LIBSBML_SEV_</code> to the severity names
126  * shown in the two right-hand columns.
127  * </caption>
128  *  <tr style='background: lightgray' class='normal-font'>
129  *      <th style='text-align: left'>Enumerator</th>
130  *      <th>Meaning</th>
131  *      <th width='90' style='text-align: left'>Category</th>
132  *      <th width='90' style='text-align: left'>Severity</th>
133  *  </tr>
134  * <tr><td>@link libsbml#XMLUnknownError XMLUnknownError@endlink</td><td>Unrecognized error encountered internally</td><td>INTERNAL</td><td>FATAL</td></tr>
135  * <tr><td>@link libsbml#XMLOutOfMemory XMLOutOfMemory@endlink</td> <td>Out of memory</td><td>SYSTEM</td><td>FATAL</td></tr>
136  * <tr><td>@link libsbml#XMLFileUnreadable XMLFileUnreadable@endlink</td> <td>File unreadable</td><td>SYSTEM</td><td>ERROR</td></tr>
137  * <tr><td>@link libsbml#XMLFileUnwritable XMLFileUnwritable@endlink</td> <td>File unwritable</td><td>SYSTEM</td><td>ERROR</td></tr>
138  * <tr><td>@link libsbml#XMLFileOperationError XMLFileOperationError@endlink</td><td>Error encountered while attempting file operation</td><td>SYSTEM</td><td>ERROR</td></tr>
139  * <tr><td>@link libsbml#XMLNetworkAccessError XMLNetworkAccessError@endlink</td><td>Network access error</td><td>SYSTEM</td><td>ERROR</td></tr>
140  * <tr><td>@link libsbml#InternalXMLParserError InternalXMLParserError@endlink</td><td>Internal XML parser state error</td><td>INTERNAL</td><td>FATAL</td></tr>
141  * <tr><td>@link libsbml#UnrecognizedXMLParserCode UnrecognizedXMLParserCode@endlink</td><td>XML parser returned an unrecognized error code</td><td>INTERNAL</td><td>FATAL</td></tr>
142  * <tr><td>@link libsbml#XMLTranscoderError XMLTranscoderError@endlink</td><td>Character transcoder error</td><td>INTERNAL</td><td>FATAL</td></tr>
143  * <tr><td>@link libsbml#MissingXMLDecl MissingXMLDecl@endlink</td><td>Missing XML declaration at beginning of XML input</td><td>XML</td><td>ERROR</td></tr>
144  * <tr><td>@link libsbml#MissingXMLEncoding MissingXMLEncoding@endlink</td><td>Missing encoding attribute in XML declaration</td><td>XML</td><td>ERROR</td></tr>
145  * <tr><td>@link libsbml#BadXMLDecl BadXMLDecl@endlink</td><td>Invalid or unrecognized XML declaration or XML encoding</td><td>XML</td><td>ERROR</td></tr>
146  * <tr><td>@link libsbml#BadXMLDOCTYPE BadXMLDOCTYPE@endlink</td><td>Invalid, malformed or unrecognized XML DOCTYPE declaration</td><td>XML</td><td>ERROR</td></tr>
147  * <tr><td>@link libsbml#InvalidCharInXML InvalidCharInXML@endlink</td><td>Invalid character in XML content</td><td>XML</td><td>ERROR</td></tr>
148  * <tr><td>@link libsbml#BadlyFormedXML BadlyFormedXML@endlink</td><td>XML content is not well-formed</td><td>XML</td><td>ERROR</td></tr>
149  * <tr><td>@link libsbml#UnclosedXMLToken UnclosedXMLToken@endlink</td><td>Unclosed XML token</td><td>XML</td><td>ERROR</td></tr>
150  * <tr><td>@link libsbml#InvalidXMLConstruct InvalidXMLConstruct@endlink</td><td>XML construct is invalid or not permitted</td><td>XML</td><td>ERROR</td></tr>
151  * <tr><td>@link libsbml#XMLTagMismatch XMLTagMismatch@endlink</td><td>Element tag mismatch or missing tag</td><td>XML</td><td>ERROR</td></tr>
152  * <tr><td>@link libsbml#DuplicateXMLAttribute DuplicateXMLAttribute@endlink</td><td>Duplicate XML attribute</td><td>XML</td><td>ERROR</td></tr>
153  * <tr><td>@link libsbml#UndefinedXMLEntity UndefinedXMLEntity@endlink</td><td>Undefined XML entity</td><td>XML</td><td>ERROR</td></tr>
154  * <tr><td>@link libsbml#BadProcessingInstruction BadProcessingInstruction@endlink</td><td>Invalid, malformed or unrecognized XML processing instruction</td><td>XML</td><td>ERROR</td></tr>
155  * <tr><td>@link libsbml#BadXMLPrefix BadXMLPrefix@endlink</td><td>Invalid or undefined XML namespace prefix</td><td>XML</td><td>ERROR</td></tr>
156  * <tr><td>@link libsbml#BadXMLPrefixValue BadXMLPrefixValue@endlink</td><td>Invalid XML namespace prefix value</td><td>XML</td><td>ERROR</td></tr>
157  * <tr><td>@link libsbml#MissingXMLRequiredAttribute MissingXMLRequiredAttribute@endlink</td><td>Missing a required XML attribute</td><td>XML</td><td>ERROR</td></tr>
158  * <tr><td>@link libsbml#XMLAttributeTypeMismatch XMLAttributeTypeMismatch@endlink</td><td>Data type mismatch for the value of an attribute</td><td>XML</td><td>ERROR</td></tr>
159  * <tr><td>@link libsbml#XMLBadUTF8Content XMLBadUTF8Content@endlink</td><td>Invalid UTF8 content</td><td>XML</td><td>ERROR</td></tr>
160  * <tr><td>@link libsbml#MissingXMLAttributeValue MissingXMLAttributeValue@endlink</td><td>Missing or improperly formed attribute value</td><td>XML</td><td>ERROR</td></tr>
161  * <tr><td>@link libsbml#BadXMLAttributeValue BadXMLAttributeValue@endlink</td><td>Invalid or unrecognizable attribute value</td><td>XML</td><td>ERROR</td></tr>
162  * <tr><td>@link libsbml#BadXMLAttribute BadXMLAttribute@endlink</td><td>Invalid, unrecognized or malformed attribute</td><td>XML</td><td>ERROR</td></tr>
163  * <tr><td>@link libsbml#UnrecognizedXMLElement UnrecognizedXMLElement@endlink</td><td>Element either not recognized or not permitted</td><td>XML</td><td>ERROR</td></tr>
164  * <tr><td>@link libsbml#BadXMLComment BadXMLComment@endlink</td><td>Badly formed XML comment</td><td>XML</td><td>ERROR</td></tr>
165  * <tr><td>@link libsbml#BadXMLDeclLocation BadXMLDeclLocation@endlink</td><td>XML declaration not permitted in this location</td><td>XML</td><td>ERROR</td></tr>
166  * <tr><td>@link libsbml#XMLUnexpectedEOF XMLUnexpectedEOF@endlink</td><td>Reached end of input unexpectedly</td><td>XML</td><td>ERROR</td></tr>
167  * <tr><td>@link libsbml#BadXMLIDValue BadXMLIDValue@endlink</td><td>Value is invalid for XML ID, or has already been used</td><td>XML</td><td>ERROR</td></tr>
168  * <tr><td>@link libsbml#BadXMLIDRef BadXMLIDRef@endlink</td><td>XML ID value was never declared</td><td>XML</td><td>ERROR</td></tr>
169  * <tr><td>@link libsbml#UninterpretableXMLContent UninterpretableXMLContent@endlink</td><td>Unable to interpret content</td><td>XML</td><td>ERROR</td></tr>
170  * <tr><td>@link libsbml#BadXMLDocumentStructure BadXMLDocumentStructure@endlink</td><td>Bad XML document structure</td><td>XML</td><td>ERROR</td></tr>
171  * <tr><td>@link libsbml#InvalidAfterXMLContent InvalidAfterXMLContent@endlink</td><td>Encountered invalid content after expected content</td><td>XML</td><td>ERROR</td></tr>
172  * <tr><td>@link libsbml#XMLExpectedQuotedString XMLExpectedQuotedString@endlink</td><td>Expected to find a quoted string</td><td>XML</td><td>ERROR</td></tr>
173  * <tr><td>@link libsbml#XMLEmptyValueNotPermitted XMLEmptyValueNotPermitted@endlink</td><td>An empty value is not permitted in this context</td><td>XML</td><td>ERROR</td></tr>
174  * <tr><td>@link libsbml#XMLBadNumber XMLBadNumber@endlink</td><td>Invalid or unrecognized number</td><td>XML</td><td>ERROR</td></tr>
175  * <tr><td>@link libsbml#XMLBadColon XMLBadColon@endlink</td><td>Colon characters are invalid in this context</td><td>XML</td><td>ERROR</td></tr>
176  * <tr><td>@link libsbml#MissingXMLElements MissingXMLElements@endlink</td><td>One or more expected elements are missing</td><td>XML</td><td>ERROR</td></tr>
177  * <tr><td>@link libsbml#XMLContentEmpty XMLContentEmpty@endlink</td><td>Main XML content is empty</td><td>XML</td><td>ERROR</td></tr>
178  * </table>
179  * </center>
180  *
181  *
182  * @if clike
183  * <h3><a class='anchor' name='error-categories'>XMLErrorCategory_t</a></h3>
184  *
185  * As discussed above, each XMLError object contains a value for a category
186  * identifier, describing the type of issue that the XMLError object
187  * represents.  The category can be retrieved from an XMLError object using
188  * the method XMLError::getCategory().  The value is chosen from the
189  * enumeration of category codes <a class='el' href='#XMLErrorCategory_t'>
190  * XMLErrorCategory_t</a>.  The following table
191  * lists each possible value and a brief description of its meaning.
192  * @endif@if java <h3><a class='anchor'
193  * name='error-categories'>Category codes associated with XMLError objects</a></h3>
194  *
195  * As discussed above, each XMLError object contains a value for a category
196  * identifier, describing the type of issue that the XMLError object represents.
197  * The category can be retrieved from an XMLError object using the method
198  * XMLError::getCategory(). The following table lists each possible value
199  * and a brief description of its meaning.
200  *
201  * As is the case with the error codes, in the libSBML Java language
202  * interface, the category identifiers are currently implemented as static
203  * integer constants defined in the interface class
204  * <code>libsbmlConstants</code> in the file '<a
205  * href='libsbml.libsbml.html'>libsbml.libsbml.java</a>'.
206  * @endif@if csharp <h3><a class='anchor'
207  * name='error-categories'>Category codes associated with XMLError objects</a></h3>
208  *
209  * As discussed above, each XMLError object contains a value for a category
210  * identifier, describing the type of issue that the XMLError object represents.
211  * The category can be retrieved from an XMLError object using the method
212  * XMLError::getCategory(). The following table lists each possible value
213  * and a brief description of its meaning.
214  *
215  * As is the case with the error codes, in the libSBML C# language
216  * interface, the category identifiers are currently implemented as static
217  * integer constants defined in the interface
218  * class @link libsbmlcs.libsbml@endlink. @endif
219  *
220  * <center>
221  * <table width='95%' cellspacing='1' cellpadding='1' border='0'
222  *        class='text-table normal-font alt-row-colors'>
223  *  <tr style='background: lightgray' class='normal-font'>
224  *      <th style='text-align: left'>Enumerator</th>
225  *      <th>Meaning</th>
226  *  </tr>
227  * <tr><td>@link libsbml#LIBSBML_CAT_INTERNAL LIBSBML_CAT_INTERNAL@endlink</td>
228  * <td>A problem involving the libSBML
229  * software itself or the underlying XML parser.  This almost certainly
230  * indicates a software defect (i.e., bug) in libSBML.  Please report
231  * instances of this to the libSBML developers.</td></tr>
232  * <tr><td>@link libsbml#LIBSBML_CAT_SYSTEM LIBSBML_CAT_SYSTEM@endlink</td>
233  * <td>A problem reported by the operating
234  * system, such as an inability to read or write a file.  This indicates
235  * something that is not a program error but is outside of the control of
236  * libSBML.</td></tr>
237  * <tr><td>@link libsbml#LIBSBML_CAT_XML LIBSBML_CAT_XML@endlink</td>
238  * <td>A problem in the XML content itself.  This
239  * usually arises from malformed XML or the use of
240  * constructs not permitted in SBML.</td></tr>
241  * </table>
242  * </center>
243  *
244  *
245  * @if clike
246  * <h3><a class='anchor' name='error-severities'>XMLErrorSeverity_t</a></h3>
247  *
248  * As described above, each XMLError object contains a value for a severity
249  * code, describing how critical is the issue that the XMLError object
250  * represents.  The severity can be retrieved from an XMLError object using
251  * the method XMLError::getSeverity().  The value is chosen from the
252  * enumeration of category codes <a class='el' href='#XMLErrorSeverity_t'>
253  * XMLErrorSeverity_t</a>.  The following table
254  * lists each possible value and a brief description of its meaning.
255  * @endif@if java <h3><a class='anchor'
256  * name='error-severities'>Severity codes associated with XMLError objects</a></h3>
257  *
258  * As described above, each XMLError object contains a value for a severity
259  * code, describing how severe is the issue that the XMLError object
260  * represents.  The severity be retrieved from an XMLError object using the
261  * method XMLError::getSeverity(). The following table lists each possible
262  * value and a brief description of its meaning.
263  *
264  * As is the case with the category codes, in the libSBML Java language
265  * interface, these severity codes are currently
266  * implemented as static integer constants defined in the interface class
267  * <code>libsbmlConstants</code> in the file '<a
268  * href='libsbml.libsbml.html'>libsbml.libsbml.java</a>'.  This
269  * is admittedly not an ideal approach from the standpoint of modern Java
270  * programming, but it was necessary to work around the lack of
271  * enumerations in Java prior to JDK 1.5.  Future versions of libSBML may
272  * use a proper Java enumeration type to define the severity
273  * codes. @endif@if csharp <h3><a class='anchor'
274  * name='error-severities'>Severity codes associated with XMLError objects</a></h3>
275  *
276  * As described above, each XMLError object contains a value for a severity
277  * code, describing how severe is the issue that the XMLError object
278  * represents.  The severity be retrieved from an XMLError object using the
279  * method XMLError::getSeverity(). The following table lists each possible
280  * value and a brief description of its meaning.
281  *
282  * As is the case with the category codes, in the libSBML C# language
283  * interface, these severity codes are currently
284  * implemented as static integer constants defined in the interface class
285  * @link libsbmlcs.libsbml@endlink.@endif
286  *
287  * <center>
288  * <table width='95%' cellspacing='1' cellpadding='1' border='0'
289  *        class='text-table normal-font alt-row-colors'>
290  *  <tr style='background: lightgray' class='normal-font'>
291  *      <th style='text-align: left'>Enumerator</th>
292  *      <th>Meaning</th>
293  *  </tr>
294  * <tr><td>@link libsbml#LIBSBML_SEV_INFO LIBSBML_SEV_INFO@endlink</td>
295  * <td>The error is actually informational and
296  * not necessarily a serious problem.</td></tr>
297  * <tr><td>@link libsbml#LIBSBML_SEV_WARNING LIBSBML_SEV_WARNING@endlink</td>
298  * <td>The error object represents a problem
299  * that is not serious enough to necessarily stop the problem, but
300  * applications should take note of the problem and evaluate what its
301  * implications may be.</td></tr>
302  * <tr><td>@link libsbml#LIBSBML_SEV_ERROR LIBSBML_SEV_ERROR@endlink</td>
303  * <td>The error object represents a serious
304  * error.  The application may continue running but it is unlikely to be
305  * able to continue processing the same XML file or data stream.</td></tr>
306  * <tr><td>@link libsbml#LIBSBML_SEV_FATAL LIBSBML_SEV_FATAL@endlink</td>
307  * <td>A serious error occurred, such as an
308  * out-of-memory condition, and the software should terminate
309  * immediately.</td></tr>
310  * </table>
311  * </center>
312  */
313 
314 public class XMLError : global::System.IDisposable {
315 	private HandleRef swigCPtr;
316 	protected bool swigCMemOwn;
317 
XMLError(IntPtr cPtr, bool cMemoryOwn)318 	internal XMLError(IntPtr cPtr, bool cMemoryOwn)
319 	{
320 		swigCMemOwn = cMemoryOwn;
321 		swigCPtr    = new HandleRef(this, cPtr);
322 	}
323 
getCPtr(XMLError obj)324 	internal static HandleRef getCPtr(XMLError obj)
325 	{
326 		return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
327 	}
328 
getCPtrAndDisown(XMLError obj)329 	internal static HandleRef getCPtrAndDisown (XMLError obj)
330 	{
331 		HandleRef ptr = new HandleRef(null, IntPtr.Zero);
332 
333 		if (obj != null)
334 		{
335 			ptr             = obj.swigCPtr;
336 			obj.swigCMemOwn = false;
337 		}
338 
339 		return ptr;
340 	}
341 
~XMLError()342   ~XMLError() {
343     Dispose(false);
344   }
345 
Dispose()346   public void Dispose() {
347     Dispose(true);
348     global::System.GC.SuppressFinalize(this);
349   }
350 
Dispose(bool disposing)351   protected virtual void Dispose(bool disposing) {
352     lock(this) {
353       if (swigCPtr.Handle != global::System.IntPtr.Zero) {
354         if (swigCMemOwn) {
355           swigCMemOwn = false;
356           libsbmlPINVOKE.delete_XMLError(swigCPtr);
357         }
358         swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
359       }
360     }
361   }
362 
operator ==(XMLError lhs, XMLError rhs)363   public static bool operator==(XMLError lhs, XMLError rhs)
364   {
365     if((Object)lhs == (Object)rhs)
366     {
367       return true;
368     }
369 
370     if( ((Object)lhs == null) || ((Object)rhs == null) )
371     {
372       return false;
373     }
374 
375     return (getCPtr(lhs).Handle.ToString() == getCPtr(rhs).Handle.ToString());
376   }
377 
operator !=(XMLError lhs, XMLError rhs)378   public static bool operator!=(XMLError lhs, XMLError rhs)
379   {
380     return !(lhs == rhs);
381   }
382 
Equals(Object sb)383   public override bool Equals(Object sb)
384   {
385     if ( ! (sb is XMLError) )
386     {
387       return false;
388     }
389 
390     return this == (XMLError)sb;
391   }
392 
GetHashCode()393   public override int GetHashCode()
394   {
395     return swigCPtr.Handle.ToInt32();
396   }
397 
398 
399 /**
400    * Creates a new XMLError to report that something occurred during XML
401    * processing.
402    *
403    * XMLError objects have identification numbers to indicate the nature of
404    * the exception.  @if clike These numbers are drawn from
405    * the enumeration <a class='el'
406    * href='#error-codes'>XMLErrorCode_t</a>.
407    * @else These numbers are defined as unsigned
408    * integer constants in the file
409    * 'libsbml.libsbml.java'.  See the <a class='el'
410    * href='#error-codes'>top of this documentation</a> for a table
411    * listing the possible values and their meanings. @endif The argument @p
412    * errorId to this constructor @em can be (but does not have to be) a
413    * value from this @if clike enumeration. If it is a value
414    * from <a class='el' href='#error-codes'>XMLErrorCode_t</a>, the
415    * XMLError class assumes the error is a low-level system or XML layer
416    * error and <em>prepends</em> a built-in, predefined error message to
417    * any string passed in the argument @p details to this constructor.  In
418    * addition, all <a class='el' href='#error-codes'>XMLErrorCode_t</a>
419    * errors have associated values for the @p severity and @p category
420    * codes, and these fields are filled-in as well from the enumerations <a
421    * class='el' href='#error-severities'>XMLErrorSeverity_t</a> and <a
422    * class='el' href='#error-categories'>XMLErrorCategory_t</a>,
423    * respectively. @else set of constants.  If it is
424    * one of the predefined error identifiers, the XMLError class assumes
425    * the error is a low-level system or XML layer error and
426    * <em>prepends</em> a built-in, predefined error message to any string
427    * passed in the argument @p details to this constructor.  In addition,
428    * all the predefined error identifiers have associated values for the @p
429    * severity and @p category codes, and these fields are filled-in as
430    * well. @endif
431    *
432    * If the error identifier @p errorId is a number greater than 9999, this
433    * constructor assumes that the error was generated from another part of
434    * the software, and does not do additional filling in of values beyond
435    * the defaults in the constructor itself.  This allows XMLError to serve
436    * as a base class for other errors (and is used in this way elsewhere in
437    * libSBML).  Callers should fill in all the parameters with suitable
438    * values if generating errors with codes greater than 9999 to make
439    * maximum use of the XMLError facilities.
440    *
441    * @if clike As mentioned above, there are two other
442    * enumerations, <a class='el'
443    * href='#error-severities'>XMLErrorSeverity_t</a> and <a class='el'
444    * href='#error-categories'>XMLErrorCategory_t</a>, used for indicating
445    * the severity and category of error for the predefined XMLError codes.
446    * The values passed in @p severity and @p category override the defaults
447    * assigned based on the error code.  If the value of @p errorId is a
448    * value from <a class='el' href='#error-codes'>XMLErrorCode_t</a>,
449    * callers do not need to fill in @p severity and @p category.
450    * Conversely, if @p errorId is not a value from <a class='el'
451    * href='#error-codes'>XMLErrorCode_t</a>, callers can use other
452    * values (not just those from <a class='el'
453    * href='#error-severities'>XMLErrorSeverity_t</a> and <a class='el'
454    * href='#error-categories'>XMLErrorCategory_t</a>, but their own
455    * special values) for @p severity and @p
456    * category. @else As mentioned above,
457    * there are additional constants defined for <a class='el'
458    * href='#error-severities'>standard severity</a> and <a class='el'
459    * href='#error-categories'>standard category</a> codes, and every predefined
460    * error in libSBML has an associated value for severity and category taken
461    * from these predefined sets.  These constants have symbol names
462    * prefixed with <code>LIBSBML_SEV_</code> and <code>LIBSBML_CAT_</code>,
463    * respectively.  If the value of @p errorId is one of the standard error
464    * codes, callers do not need to fill in @p severity and @p category in a
465    * call to this constructor.  Conversely, if @p errorId is not an existing
466    * XML-level error code, callers can use other values for @p severity and
467    * @p category. @endif
468    *
469    * @param errorId a long integer, the identification number of the error.
470    *
471    * @param details a string containing additional details about the error.
472    * If the error code in @p errorId is one that is recognized by XMLError,
473    * the given message is @em appended to a predefined message associated
474    * with the given code.  If the error code is not recognized, the message
475    * is stored as-is as the text of the error.
476    *
477    * @param line a long integer, the line number at which the error occured.
478    *
479    * @param column a long integer, the column number at which the error occured.
480    *
481    * @param severity an integer indicating severity of the error.
482    *
483    * @param category an integer indicating the category to which the error
484    * belongs.
485    *
486    * @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif
487    */ public
XMLError(int errorId, string details, long line, long column, long severity, long category)488  XMLError(int errorId, string details, long line, long column, long severity, long category) : this(libsbmlPINVOKE.new_XMLError__SWIG_0(errorId, details, line, column, severity, category), true) {
489     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
490   }
491 
492 
493 /**
494    * Creates a new XMLError to report that something occurred during XML
495    * processing.
496    *
497    * XMLError objects have identification numbers to indicate the nature of
498    * the exception.  @if clike These numbers are drawn from
499    * the enumeration <a class='el'
500    * href='#error-codes'>XMLErrorCode_t</a>.
501    * @else These numbers are defined as unsigned
502    * integer constants in the file
503    * 'libsbml.libsbml.java'.  See the <a class='el'
504    * href='#error-codes'>top of this documentation</a> for a table
505    * listing the possible values and their meanings. @endif The argument @p
506    * errorId to this constructor @em can be (but does not have to be) a
507    * value from this @if clike enumeration. If it is a value
508    * from <a class='el' href='#error-codes'>XMLErrorCode_t</a>, the
509    * XMLError class assumes the error is a low-level system or XML layer
510    * error and <em>prepends</em> a built-in, predefined error message to
511    * any string passed in the argument @p details to this constructor.  In
512    * addition, all <a class='el' href='#error-codes'>XMLErrorCode_t</a>
513    * errors have associated values for the @p severity and @p category
514    * codes, and these fields are filled-in as well from the enumerations <a
515    * class='el' href='#error-severities'>XMLErrorSeverity_t</a> and <a
516    * class='el' href='#error-categories'>XMLErrorCategory_t</a>,
517    * respectively. @else set of constants.  If it is
518    * one of the predefined error identifiers, the XMLError class assumes
519    * the error is a low-level system or XML layer error and
520    * <em>prepends</em> a built-in, predefined error message to any string
521    * passed in the argument @p details to this constructor.  In addition,
522    * all the predefined error identifiers have associated values for the @p
523    * severity and @p category codes, and these fields are filled-in as
524    * well. @endif
525    *
526    * If the error identifier @p errorId is a number greater than 9999, this
527    * constructor assumes that the error was generated from another part of
528    * the software, and does not do additional filling in of values beyond
529    * the defaults in the constructor itself.  This allows XMLError to serve
530    * as a base class for other errors (and is used in this way elsewhere in
531    * libSBML).  Callers should fill in all the parameters with suitable
532    * values if generating errors with codes greater than 9999 to make
533    * maximum use of the XMLError facilities.
534    *
535    * @if clike As mentioned above, there are two other
536    * enumerations, <a class='el'
537    * href='#error-severities'>XMLErrorSeverity_t</a> and <a class='el'
538    * href='#error-categories'>XMLErrorCategory_t</a>, used for indicating
539    * the severity and category of error for the predefined XMLError codes.
540    * The values passed in @p severity and @p category override the defaults
541    * assigned based on the error code.  If the value of @p errorId is a
542    * value from <a class='el' href='#error-codes'>XMLErrorCode_t</a>,
543    * callers do not need to fill in @p severity and @p category.
544    * Conversely, if @p errorId is not a value from <a class='el'
545    * href='#error-codes'>XMLErrorCode_t</a>, callers can use other
546    * values (not just those from <a class='el'
547    * href='#error-severities'>XMLErrorSeverity_t</a> and <a class='el'
548    * href='#error-categories'>XMLErrorCategory_t</a>, but their own
549    * special values) for @p severity and @p
550    * category. @else As mentioned above,
551    * there are additional constants defined for <a class='el'
552    * href='#error-severities'>standard severity</a> and <a class='el'
553    * href='#error-categories'>standard category</a> codes, and every predefined
554    * error in libSBML has an associated value for severity and category taken
555    * from these predefined sets.  These constants have symbol names
556    * prefixed with <code>LIBSBML_SEV_</code> and <code>LIBSBML_CAT_</code>,
557    * respectively.  If the value of @p errorId is one of the standard error
558    * codes, callers do not need to fill in @p severity and @p category in a
559    * call to this constructor.  Conversely, if @p errorId is not an existing
560    * XML-level error code, callers can use other values for @p severity and
561    * @p category. @endif
562    *
563    * @param errorId a long integer, the identification number of the error.
564    *
565    * @param details a string containing additional details about the error.
566    * If the error code in @p errorId is one that is recognized by XMLError,
567    * the given message is @em appended to a predefined message associated
568    * with the given code.  If the error code is not recognized, the message
569    * is stored as-is as the text of the error.
570    *
571    * @param line a long integer, the line number at which the error occured.
572    *
573    * @param column a long integer, the column number at which the error occured.
574    *
575    * @param severity an integer indicating severity of the error.
576    *
577    * @param category an integer indicating the category to which the error
578    * belongs.
579    *
580    * @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif
581    */ public
XMLError(int errorId, string details, long line, long column, long severity)582  XMLError(int errorId, string details, long line, long column, long severity) : this(libsbmlPINVOKE.new_XMLError__SWIG_1(errorId, details, line, column, severity), true) {
583     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
584   }
585 
586 
587 /**
588    * Creates a new XMLError to report that something occurred during XML
589    * processing.
590    *
591    * XMLError objects have identification numbers to indicate the nature of
592    * the exception.  @if clike These numbers are drawn from
593    * the enumeration <a class='el'
594    * href='#error-codes'>XMLErrorCode_t</a>.
595    * @else These numbers are defined as unsigned
596    * integer constants in the file
597    * 'libsbml.libsbml.java'.  See the <a class='el'
598    * href='#error-codes'>top of this documentation</a> for a table
599    * listing the possible values and their meanings. @endif The argument @p
600    * errorId to this constructor @em can be (but does not have to be) a
601    * value from this @if clike enumeration. If it is a value
602    * from <a class='el' href='#error-codes'>XMLErrorCode_t</a>, the
603    * XMLError class assumes the error is a low-level system or XML layer
604    * error and <em>prepends</em> a built-in, predefined error message to
605    * any string passed in the argument @p details to this constructor.  In
606    * addition, all <a class='el' href='#error-codes'>XMLErrorCode_t</a>
607    * errors have associated values for the @p severity and @p category
608    * codes, and these fields are filled-in as well from the enumerations <a
609    * class='el' href='#error-severities'>XMLErrorSeverity_t</a> and <a
610    * class='el' href='#error-categories'>XMLErrorCategory_t</a>,
611    * respectively. @else set of constants.  If it is
612    * one of the predefined error identifiers, the XMLError class assumes
613    * the error is a low-level system or XML layer error and
614    * <em>prepends</em> a built-in, predefined error message to any string
615    * passed in the argument @p details to this constructor.  In addition,
616    * all the predefined error identifiers have associated values for the @p
617    * severity and @p category codes, and these fields are filled-in as
618    * well. @endif
619    *
620    * If the error identifier @p errorId is a number greater than 9999, this
621    * constructor assumes that the error was generated from another part of
622    * the software, and does not do additional filling in of values beyond
623    * the defaults in the constructor itself.  This allows XMLError to serve
624    * as a base class for other errors (and is used in this way elsewhere in
625    * libSBML).  Callers should fill in all the parameters with suitable
626    * values if generating errors with codes greater than 9999 to make
627    * maximum use of the XMLError facilities.
628    *
629    * @if clike As mentioned above, there are two other
630    * enumerations, <a class='el'
631    * href='#error-severities'>XMLErrorSeverity_t</a> and <a class='el'
632    * href='#error-categories'>XMLErrorCategory_t</a>, used for indicating
633    * the severity and category of error for the predefined XMLError codes.
634    * The values passed in @p severity and @p category override the defaults
635    * assigned based on the error code.  If the value of @p errorId is a
636    * value from <a class='el' href='#error-codes'>XMLErrorCode_t</a>,
637    * callers do not need to fill in @p severity and @p category.
638    * Conversely, if @p errorId is not a value from <a class='el'
639    * href='#error-codes'>XMLErrorCode_t</a>, callers can use other
640    * values (not just those from <a class='el'
641    * href='#error-severities'>XMLErrorSeverity_t</a> and <a class='el'
642    * href='#error-categories'>XMLErrorCategory_t</a>, but their own
643    * special values) for @p severity and @p
644    * category. @else As mentioned above,
645    * there are additional constants defined for <a class='el'
646    * href='#error-severities'>standard severity</a> and <a class='el'
647    * href='#error-categories'>standard category</a> codes, and every predefined
648    * error in libSBML has an associated value for severity and category taken
649    * from these predefined sets.  These constants have symbol names
650    * prefixed with <code>LIBSBML_SEV_</code> and <code>LIBSBML_CAT_</code>,
651    * respectively.  If the value of @p errorId is one of the standard error
652    * codes, callers do not need to fill in @p severity and @p category in a
653    * call to this constructor.  Conversely, if @p errorId is not an existing
654    * XML-level error code, callers can use other values for @p severity and
655    * @p category. @endif
656    *
657    * @param errorId a long integer, the identification number of the error.
658    *
659    * @param details a string containing additional details about the error.
660    * If the error code in @p errorId is one that is recognized by XMLError,
661    * the given message is @em appended to a predefined message associated
662    * with the given code.  If the error code is not recognized, the message
663    * is stored as-is as the text of the error.
664    *
665    * @param line a long integer, the line number at which the error occured.
666    *
667    * @param column a long integer, the column number at which the error occured.
668    *
669    * @param severity an integer indicating severity of the error.
670    *
671    * @param category an integer indicating the category to which the error
672    * belongs.
673    *
674    * @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif
675    */ public
XMLError(int errorId, string details, long line, long column)676  XMLError(int errorId, string details, long line, long column) : this(libsbmlPINVOKE.new_XMLError__SWIG_2(errorId, details, line, column), true) {
677     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
678   }
679 
680 
681 /**
682    * Creates a new XMLError to report that something occurred during XML
683    * processing.
684    *
685    * XMLError objects have identification numbers to indicate the nature of
686    * the exception.  @if clike These numbers are drawn from
687    * the enumeration <a class='el'
688    * href='#error-codes'>XMLErrorCode_t</a>.
689    * @else These numbers are defined as unsigned
690    * integer constants in the file
691    * 'libsbml.libsbml.java'.  See the <a class='el'
692    * href='#error-codes'>top of this documentation</a> for a table
693    * listing the possible values and their meanings. @endif The argument @p
694    * errorId to this constructor @em can be (but does not have to be) a
695    * value from this @if clike enumeration. If it is a value
696    * from <a class='el' href='#error-codes'>XMLErrorCode_t</a>, the
697    * XMLError class assumes the error is a low-level system or XML layer
698    * error and <em>prepends</em> a built-in, predefined error message to
699    * any string passed in the argument @p details to this constructor.  In
700    * addition, all <a class='el' href='#error-codes'>XMLErrorCode_t</a>
701    * errors have associated values for the @p severity and @p category
702    * codes, and these fields are filled-in as well from the enumerations <a
703    * class='el' href='#error-severities'>XMLErrorSeverity_t</a> and <a
704    * class='el' href='#error-categories'>XMLErrorCategory_t</a>,
705    * respectively. @else set of constants.  If it is
706    * one of the predefined error identifiers, the XMLError class assumes
707    * the error is a low-level system or XML layer error and
708    * <em>prepends</em> a built-in, predefined error message to any string
709    * passed in the argument @p details to this constructor.  In addition,
710    * all the predefined error identifiers have associated values for the @p
711    * severity and @p category codes, and these fields are filled-in as
712    * well. @endif
713    *
714    * If the error identifier @p errorId is a number greater than 9999, this
715    * constructor assumes that the error was generated from another part of
716    * the software, and does not do additional filling in of values beyond
717    * the defaults in the constructor itself.  This allows XMLError to serve
718    * as a base class for other errors (and is used in this way elsewhere in
719    * libSBML).  Callers should fill in all the parameters with suitable
720    * values if generating errors with codes greater than 9999 to make
721    * maximum use of the XMLError facilities.
722    *
723    * @if clike As mentioned above, there are two other
724    * enumerations, <a class='el'
725    * href='#error-severities'>XMLErrorSeverity_t</a> and <a class='el'
726    * href='#error-categories'>XMLErrorCategory_t</a>, used for indicating
727    * the severity and category of error for the predefined XMLError codes.
728    * The values passed in @p severity and @p category override the defaults
729    * assigned based on the error code.  If the value of @p errorId is a
730    * value from <a class='el' href='#error-codes'>XMLErrorCode_t</a>,
731    * callers do not need to fill in @p severity and @p category.
732    * Conversely, if @p errorId is not a value from <a class='el'
733    * href='#error-codes'>XMLErrorCode_t</a>, callers can use other
734    * values (not just those from <a class='el'
735    * href='#error-severities'>XMLErrorSeverity_t</a> and <a class='el'
736    * href='#error-categories'>XMLErrorCategory_t</a>, but their own
737    * special values) for @p severity and @p
738    * category. @else As mentioned above,
739    * there are additional constants defined for <a class='el'
740    * href='#error-severities'>standard severity</a> and <a class='el'
741    * href='#error-categories'>standard category</a> codes, and every predefined
742    * error in libSBML has an associated value for severity and category taken
743    * from these predefined sets.  These constants have symbol names
744    * prefixed with <code>LIBSBML_SEV_</code> and <code>LIBSBML_CAT_</code>,
745    * respectively.  If the value of @p errorId is one of the standard error
746    * codes, callers do not need to fill in @p severity and @p category in a
747    * call to this constructor.  Conversely, if @p errorId is not an existing
748    * XML-level error code, callers can use other values for @p severity and
749    * @p category. @endif
750    *
751    * @param errorId a long integer, the identification number of the error.
752    *
753    * @param details a string containing additional details about the error.
754    * If the error code in @p errorId is one that is recognized by XMLError,
755    * the given message is @em appended to a predefined message associated
756    * with the given code.  If the error code is not recognized, the message
757    * is stored as-is as the text of the error.
758    *
759    * @param line a long integer, the line number at which the error occured.
760    *
761    * @param column a long integer, the column number at which the error occured.
762    *
763    * @param severity an integer indicating severity of the error.
764    *
765    * @param category an integer indicating the category to which the error
766    * belongs.
767    *
768    * @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif
769    */ public
XMLError(int errorId, string details, long line)770  XMLError(int errorId, string details, long line) : this(libsbmlPINVOKE.new_XMLError__SWIG_3(errorId, details, line), true) {
771     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
772   }
773 
774 
775 /**
776    * Creates a new XMLError to report that something occurred during XML
777    * processing.
778    *
779    * XMLError objects have identification numbers to indicate the nature of
780    * the exception.  @if clike These numbers are drawn from
781    * the enumeration <a class='el'
782    * href='#error-codes'>XMLErrorCode_t</a>.
783    * @else These numbers are defined as unsigned
784    * integer constants in the file
785    * 'libsbml.libsbml.java'.  See the <a class='el'
786    * href='#error-codes'>top of this documentation</a> for a table
787    * listing the possible values and their meanings. @endif The argument @p
788    * errorId to this constructor @em can be (but does not have to be) a
789    * value from this @if clike enumeration. If it is a value
790    * from <a class='el' href='#error-codes'>XMLErrorCode_t</a>, the
791    * XMLError class assumes the error is a low-level system or XML layer
792    * error and <em>prepends</em> a built-in, predefined error message to
793    * any string passed in the argument @p details to this constructor.  In
794    * addition, all <a class='el' href='#error-codes'>XMLErrorCode_t</a>
795    * errors have associated values for the @p severity and @p category
796    * codes, and these fields are filled-in as well from the enumerations <a
797    * class='el' href='#error-severities'>XMLErrorSeverity_t</a> and <a
798    * class='el' href='#error-categories'>XMLErrorCategory_t</a>,
799    * respectively. @else set of constants.  If it is
800    * one of the predefined error identifiers, the XMLError class assumes
801    * the error is a low-level system or XML layer error and
802    * <em>prepends</em> a built-in, predefined error message to any string
803    * passed in the argument @p details to this constructor.  In addition,
804    * all the predefined error identifiers have associated values for the @p
805    * severity and @p category codes, and these fields are filled-in as
806    * well. @endif
807    *
808    * If the error identifier @p errorId is a number greater than 9999, this
809    * constructor assumes that the error was generated from another part of
810    * the software, and does not do additional filling in of values beyond
811    * the defaults in the constructor itself.  This allows XMLError to serve
812    * as a base class for other errors (and is used in this way elsewhere in
813    * libSBML).  Callers should fill in all the parameters with suitable
814    * values if generating errors with codes greater than 9999 to make
815    * maximum use of the XMLError facilities.
816    *
817    * @if clike As mentioned above, there are two other
818    * enumerations, <a class='el'
819    * href='#error-severities'>XMLErrorSeverity_t</a> and <a class='el'
820    * href='#error-categories'>XMLErrorCategory_t</a>, used for indicating
821    * the severity and category of error for the predefined XMLError codes.
822    * The values passed in @p severity and @p category override the defaults
823    * assigned based on the error code.  If the value of @p errorId is a
824    * value from <a class='el' href='#error-codes'>XMLErrorCode_t</a>,
825    * callers do not need to fill in @p severity and @p category.
826    * Conversely, if @p errorId is not a value from <a class='el'
827    * href='#error-codes'>XMLErrorCode_t</a>, callers can use other
828    * values (not just those from <a class='el'
829    * href='#error-severities'>XMLErrorSeverity_t</a> and <a class='el'
830    * href='#error-categories'>XMLErrorCategory_t</a>, but their own
831    * special values) for @p severity and @p
832    * category. @else As mentioned above,
833    * there are additional constants defined for <a class='el'
834    * href='#error-severities'>standard severity</a> and <a class='el'
835    * href='#error-categories'>standard category</a> codes, and every predefined
836    * error in libSBML has an associated value for severity and category taken
837    * from these predefined sets.  These constants have symbol names
838    * prefixed with <code>LIBSBML_SEV_</code> and <code>LIBSBML_CAT_</code>,
839    * respectively.  If the value of @p errorId is one of the standard error
840    * codes, callers do not need to fill in @p severity and @p category in a
841    * call to this constructor.  Conversely, if @p errorId is not an existing
842    * XML-level error code, callers can use other values for @p severity and
843    * @p category. @endif
844    *
845    * @param errorId a long integer, the identification number of the error.
846    *
847    * @param details a string containing additional details about the error.
848    * If the error code in @p errorId is one that is recognized by XMLError,
849    * the given message is @em appended to a predefined message associated
850    * with the given code.  If the error code is not recognized, the message
851    * is stored as-is as the text of the error.
852    *
853    * @param line a long integer, the line number at which the error occured.
854    *
855    * @param column a long integer, the column number at which the error occured.
856    *
857    * @param severity an integer indicating severity of the error.
858    *
859    * @param category an integer indicating the category to which the error
860    * belongs.
861    *
862    * @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif
863    */ public
XMLError(int errorId, string details)864  XMLError(int errorId, string details) : this(libsbmlPINVOKE.new_XMLError__SWIG_4(errorId, details), true) {
865     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
866   }
867 
868 
869 /**
870    * Creates a new XMLError to report that something occurred during XML
871    * processing.
872    *
873    * XMLError objects have identification numbers to indicate the nature of
874    * the exception.  @if clike These numbers are drawn from
875    * the enumeration <a class='el'
876    * href='#error-codes'>XMLErrorCode_t</a>.
877    * @else These numbers are defined as unsigned
878    * integer constants in the file
879    * 'libsbml.libsbml.java'.  See the <a class='el'
880    * href='#error-codes'>top of this documentation</a> for a table
881    * listing the possible values and their meanings. @endif The argument @p
882    * errorId to this constructor @em can be (but does not have to be) a
883    * value from this @if clike enumeration. If it is a value
884    * from <a class='el' href='#error-codes'>XMLErrorCode_t</a>, the
885    * XMLError class assumes the error is a low-level system or XML layer
886    * error and <em>prepends</em> a built-in, predefined error message to
887    * any string passed in the argument @p details to this constructor.  In
888    * addition, all <a class='el' href='#error-codes'>XMLErrorCode_t</a>
889    * errors have associated values for the @p severity and @p category
890    * codes, and these fields are filled-in as well from the enumerations <a
891    * class='el' href='#error-severities'>XMLErrorSeverity_t</a> and <a
892    * class='el' href='#error-categories'>XMLErrorCategory_t</a>,
893    * respectively. @else set of constants.  If it is
894    * one of the predefined error identifiers, the XMLError class assumes
895    * the error is a low-level system or XML layer error and
896    * <em>prepends</em> a built-in, predefined error message to any string
897    * passed in the argument @p details to this constructor.  In addition,
898    * all the predefined error identifiers have associated values for the @p
899    * severity and @p category codes, and these fields are filled-in as
900    * well. @endif
901    *
902    * If the error identifier @p errorId is a number greater than 9999, this
903    * constructor assumes that the error was generated from another part of
904    * the software, and does not do additional filling in of values beyond
905    * the defaults in the constructor itself.  This allows XMLError to serve
906    * as a base class for other errors (and is used in this way elsewhere in
907    * libSBML).  Callers should fill in all the parameters with suitable
908    * values if generating errors with codes greater than 9999 to make
909    * maximum use of the XMLError facilities.
910    *
911    * @if clike As mentioned above, there are two other
912    * enumerations, <a class='el'
913    * href='#error-severities'>XMLErrorSeverity_t</a> and <a class='el'
914    * href='#error-categories'>XMLErrorCategory_t</a>, used for indicating
915    * the severity and category of error for the predefined XMLError codes.
916    * The values passed in @p severity and @p category override the defaults
917    * assigned based on the error code.  If the value of @p errorId is a
918    * value from <a class='el' href='#error-codes'>XMLErrorCode_t</a>,
919    * callers do not need to fill in @p severity and @p category.
920    * Conversely, if @p errorId is not a value from <a class='el'
921    * href='#error-codes'>XMLErrorCode_t</a>, callers can use other
922    * values (not just those from <a class='el'
923    * href='#error-severities'>XMLErrorSeverity_t</a> and <a class='el'
924    * href='#error-categories'>XMLErrorCategory_t</a>, but their own
925    * special values) for @p severity and @p
926    * category. @else As mentioned above,
927    * there are additional constants defined for <a class='el'
928    * href='#error-severities'>standard severity</a> and <a class='el'
929    * href='#error-categories'>standard category</a> codes, and every predefined
930    * error in libSBML has an associated value for severity and category taken
931    * from these predefined sets.  These constants have symbol names
932    * prefixed with <code>LIBSBML_SEV_</code> and <code>LIBSBML_CAT_</code>,
933    * respectively.  If the value of @p errorId is one of the standard error
934    * codes, callers do not need to fill in @p severity and @p category in a
935    * call to this constructor.  Conversely, if @p errorId is not an existing
936    * XML-level error code, callers can use other values for @p severity and
937    * @p category. @endif
938    *
939    * @param errorId a long integer, the identification number of the error.
940    *
941    * @param details a string containing additional details about the error.
942    * If the error code in @p errorId is one that is recognized by XMLError,
943    * the given message is @em appended to a predefined message associated
944    * with the given code.  If the error code is not recognized, the message
945    * is stored as-is as the text of the error.
946    *
947    * @param line a long integer, the line number at which the error occured.
948    *
949    * @param column a long integer, the column number at which the error occured.
950    *
951    * @param severity an integer indicating severity of the error.
952    *
953    * @param category an integer indicating the category to which the error
954    * belongs.
955    *
956    * @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif
957    */ public
XMLError(int errorId)958  XMLError(int errorId) : this(libsbmlPINVOKE.new_XMLError__SWIG_5(errorId), true) {
959     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
960   }
961 
962 
963 /**
964    * Creates a new XMLError to report that something occurred during XML
965    * processing.
966    *
967    * XMLError objects have identification numbers to indicate the nature of
968    * the exception.  @if clike These numbers are drawn from
969    * the enumeration <a class='el'
970    * href='#error-codes'>XMLErrorCode_t</a>.
971    * @else These numbers are defined as unsigned
972    * integer constants in the file
973    * 'libsbml.libsbml.java'.  See the <a class='el'
974    * href='#error-codes'>top of this documentation</a> for a table
975    * listing the possible values and their meanings. @endif The argument @p
976    * errorId to this constructor @em can be (but does not have to be) a
977    * value from this @if clike enumeration. If it is a value
978    * from <a class='el' href='#error-codes'>XMLErrorCode_t</a>, the
979    * XMLError class assumes the error is a low-level system or XML layer
980    * error and <em>prepends</em> a built-in, predefined error message to
981    * any string passed in the argument @p details to this constructor.  In
982    * addition, all <a class='el' href='#error-codes'>XMLErrorCode_t</a>
983    * errors have associated values for the @p severity and @p category
984    * codes, and these fields are filled-in as well from the enumerations <a
985    * class='el' href='#error-severities'>XMLErrorSeverity_t</a> and <a
986    * class='el' href='#error-categories'>XMLErrorCategory_t</a>,
987    * respectively. @else set of constants.  If it is
988    * one of the predefined error identifiers, the XMLError class assumes
989    * the error is a low-level system or XML layer error and
990    * <em>prepends</em> a built-in, predefined error message to any string
991    * passed in the argument @p details to this constructor.  In addition,
992    * all the predefined error identifiers have associated values for the @p
993    * severity and @p category codes, and these fields are filled-in as
994    * well. @endif
995    *
996    * If the error identifier @p errorId is a number greater than 9999, this
997    * constructor assumes that the error was generated from another part of
998    * the software, and does not do additional filling in of values beyond
999    * the defaults in the constructor itself.  This allows XMLError to serve
1000    * as a base class for other errors (and is used in this way elsewhere in
1001    * libSBML).  Callers should fill in all the parameters with suitable
1002    * values if generating errors with codes greater than 9999 to make
1003    * maximum use of the XMLError facilities.
1004    *
1005    * @if clike As mentioned above, there are two other
1006    * enumerations, <a class='el'
1007    * href='#error-severities'>XMLErrorSeverity_t</a> and <a class='el'
1008    * href='#error-categories'>XMLErrorCategory_t</a>, used for indicating
1009    * the severity and category of error for the predefined XMLError codes.
1010    * The values passed in @p severity and @p category override the defaults
1011    * assigned based on the error code.  If the value of @p errorId is a
1012    * value from <a class='el' href='#error-codes'>XMLErrorCode_t</a>,
1013    * callers do not need to fill in @p severity and @p category.
1014    * Conversely, if @p errorId is not a value from <a class='el'
1015    * href='#error-codes'>XMLErrorCode_t</a>, callers can use other
1016    * values (not just those from <a class='el'
1017    * href='#error-severities'>XMLErrorSeverity_t</a> and <a class='el'
1018    * href='#error-categories'>XMLErrorCategory_t</a>, but their own
1019    * special values) for @p severity and @p
1020    * category. @else As mentioned above,
1021    * there are additional constants defined for <a class='el'
1022    * href='#error-severities'>standard severity</a> and <a class='el'
1023    * href='#error-categories'>standard category</a> codes, and every predefined
1024    * error in libSBML has an associated value for severity and category taken
1025    * from these predefined sets.  These constants have symbol names
1026    * prefixed with <code>LIBSBML_SEV_</code> and <code>LIBSBML_CAT_</code>,
1027    * respectively.  If the value of @p errorId is one of the standard error
1028    * codes, callers do not need to fill in @p severity and @p category in a
1029    * call to this constructor.  Conversely, if @p errorId is not an existing
1030    * XML-level error code, callers can use other values for @p severity and
1031    * @p category. @endif
1032    *
1033    * @param errorId a long integer, the identification number of the error.
1034    *
1035    * @param details a string containing additional details about the error.
1036    * If the error code in @p errorId is one that is recognized by XMLError,
1037    * the given message is @em appended to a predefined message associated
1038    * with the given code.  If the error code is not recognized, the message
1039    * is stored as-is as the text of the error.
1040    *
1041    * @param line a long integer, the line number at which the error occured.
1042    *
1043    * @param column a long integer, the column number at which the error occured.
1044    *
1045    * @param severity an integer indicating severity of the error.
1046    *
1047    * @param category an integer indicating the category to which the error
1048    * belongs.
1049    *
1050    * @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif
1051    */ public
XMLError()1052  XMLError() : this(libsbmlPINVOKE.new_XMLError__SWIG_6(), true) {
1053     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
1054   }
1055 
1056 
1057 /**
1058    * Copy constructor; creates a copy of this XMLError.
1059    *
1060    * @p orig the XMLError object to copy.
1061    */ public
XMLError(XMLError orig)1062  XMLError(XMLError orig) : this(libsbmlPINVOKE.new_XMLError__SWIG_7(XMLError.getCPtr(orig)), true) {
1063     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
1064   }
1065 
1066 
1067 /**
1068    * Returns the identifier of this error.
1069    *
1070    * @return the error code for this error.
1071    *
1072    * @see getMessage()
1073    * @see getShortMessage()
1074    * @see getCategory()
1075    * @see getSeverity()
1076    */ public
getErrorId()1077  long getErrorId() { return (long)libsbmlPINVOKE.XMLError_getErrorId(swigCPtr); }
1078 
1079 
1080 /**
1081    * Returns the message text of this error.
1082    *
1083    * The message associated with an error object describes the nature of
1084    * the problem.  The message returned by this method is generally longer
1085    * and clearer than the message returned by XMLError::getShortMessage(),
1086    * but not in all cases.
1087    *
1088    * Callers may use XMLError::getCategory() and XMLError::getSeverity() to
1089    * obtain additional information about the nature and severity of the
1090    * problem.
1091    *
1092    * @return the message text.
1093    *
1094    * @see getErrorId()
1095    * @see getShortMessage()
1096    * @see getCategory()
1097    * @see getSeverity()
1098    */ public
getMessage()1099  string getMessage() {
1100     string ret = libsbmlPINVOKE.XMLError_getMessage(swigCPtr);
1101     return ret;
1102   }
1103 
1104 
1105 /**
1106    * Returns a brief message for this error.
1107    *
1108    * This is an alternative error message that, in general, is as short as
1109    * the authors could make it.  However, brevity is often inversely
1110    * proportional to clarity, so this short message may not be sufficiently
1111    * informative to understand the nature of the error.  Calling
1112    * applications may wish to check XMLError::getMessage() in addition or
1113    * instead.
1114    *
1115    * @return the short error message text.
1116    *
1117    * @see getErrorId()
1118    * @see getMessage()
1119    * @see getCategory()
1120    * @see getSeverity()
1121    */ public
getShortMessage()1122  string getShortMessage() {
1123     string ret = libsbmlPINVOKE.XMLError_getShortMessage(swigCPtr);
1124     return ret;
1125   }
1126 
1127 
1128 /**
1129    * Returns the line number in the XML input near where the error, warning
1130    * or other diagnostic occurred.
1131    *
1132    * We say 'near where the problem occurred', because many factors affect
1133    * how accurate the line/column information ultimately is.  For example,
1134    * sometimes, the underlying XML parsers can only report such information
1135    * for the parent XML element where an error occurs, and not for the
1136    * specific point where the problem occurs.  In other situations, some
1137    * parsers report invalid line and/or column numbers altogether.  If this
1138    * occurs, libSBML sets the line and/or column number in the XMLError
1139    * object to either <code>0</code> or the value of the maximum unsigned
1140    * long integer representable on the platform where libSBML is running.
1141    * The probability that a true line or column number in an SBML model
1142    * would equal this value is vanishingly small; thus, if an application
1143    * encounters these values in an XMLError object, it can assume no valid
1144    * line/column number could be provided by libSBML in that situation.
1145    *
1146    * @return the line number.
1147    *
1148    * @see getColumn()
1149    */ public
getLine()1150  long getLine() { return (long)libsbmlPINVOKE.XMLError_getLine(swigCPtr); }
1151 
1152 
1153 /**
1154    * Returns the column number in the XML input near where the error,
1155    * warning or other diagnostic occurred.
1156    *
1157    * We say 'near where the problem occurred', because many factors affect
1158    * how accurate the line/column information ultimately is.  For example,
1159    * sometimes, the underlying XML parsers can only report such information
1160    * for the parent XML element where an error occurs, and not for the
1161    * specific point where the problem occurs.  In other situations, some
1162    * parsers report invalid line and/or column numbers altogether.  If this
1163    * occurs, libSBML sets the line and/or column number in the XMLError
1164    * object to either <code>0</code> or the value of the maximum unsigned
1165    * long integer representable on the platform where libSBML is running.
1166    * The probability that a true line or column number in an SBML model
1167    * would equal this value is vanishingly small; thus, if an application
1168    * encounters these values in an XMLError object, it can assume no valid
1169    * line/column number could be provided by libSBML in that situation.
1170    *
1171    * @return the column number.
1172    *
1173    * @see getLine()
1174    */ public
getColumn()1175  long getColumn() { return (long)libsbmlPINVOKE.XMLError_getColumn(swigCPtr); }
1176 
1177 
1178 /**
1179    * Returns the severity of this error.
1180    *
1181    * XMLError defines an enumeration of severity codes for the XML layer.
1182    * Applications that build on XMLError by subclassing it may add their
1183    * own severity codes with numbers higher than those in the predefined
1184    * set of severity codes.
1185    *
1186    * @return the severity of this XMLError.
1187    *
1188    * @see getSeverityAsString()
1189    * @see getCategory()
1190    */ public
getSeverity()1191  long getSeverity() { return (long)libsbmlPINVOKE.XMLError_getSeverity(swigCPtr); }
1192 
1193 
1194 /**
1195    * Returns a string describing the severity level of this error.
1196    *
1197    * XMLError defines an enumeration of severity codes for the XML layer.
1198    * Applications that build on XMLError by subclassing it may add their
1199    * own severity codes with numbers higher than those in the predefined
1200    * set of severity codes.
1201    *
1202    * @return string representing the severity of this XMLError.
1203    *
1204    * @see getSeverity()
1205    * @see getCategoryAsString()
1206    */ public
getSeverityAsString()1207  string getSeverityAsString() {
1208     string ret = libsbmlPINVOKE.XMLError_getSeverityAsString(swigCPtr);
1209     return ret;
1210   }
1211 
1212 
1213 /**
1214    * Returns the category of this error.
1215    *
1216    * XMLError defines an enumeration of category codes for the XML layer.
1217    * Applications that build on XMLError by subclassing it may add their
1218    * own categories with numbers higher than those in the predefined
1219    * set of category codes.
1220    *
1221    * Categories can be used to partition errors into distinct groups.
1222    * Among other things, this can be used to prevent id conflicts by
1223    * uniquely identifying an XMLError by both id and category.
1224    *
1225    * @return the category of this XMLError.
1226    *
1227    * @see getSeverity()
1228    * @see getCategoryAsString()
1229    */ public
getCategory()1230  long getCategory() { return (long)libsbmlPINVOKE.XMLError_getCategory(swigCPtr); }
1231 
1232 
1233 /**
1234    * Returns a string describing the category of this error.
1235    *
1236    * XMLError defines an enumeration of category codes for the XML layer.
1237    * Applications that build on XMLError by subclassing it may add their
1238    * own categories with numbers higher than those in the predefined
1239    * set of category codes.
1240    *
1241    * Categories can be used to partition errors into distinct groups.
1242    * Among other things, this can be used to prevent id conflicts by
1243    * uniquely identifying an XMLError by both id and category.
1244    *
1245    * @return string representing the category of this XMLError.
1246    *
1247    * @see getCategory()
1248    * @see getSeverityAsString()
1249    */ public
getCategoryAsString()1250  string getCategoryAsString() {
1251     string ret = libsbmlPINVOKE.XMLError_getCategoryAsString(swigCPtr);
1252     return ret;
1253   }
1254 
1255 
1256 /**
1257    * Predicate returning @c true or @c false depending on whether this
1258    * error object is for information purposes only.
1259    *
1260    * This is equivalent to obtaining the severity code from an XMLError
1261    * object (via XMLError::getSeverity()) and then comparing it to the
1262    * value @link libsbml#LIBSBML_SEV_INFO LIBSBML_SEV_INFO@endlink from the
1263    * @if clike enumeration #XMLErrorSeverity_t. @else set of predefined
1264    * severity codes.@endif
1265    *
1266    * @return @c true if this XMLError is for informational purposes only,
1267    * @c false otherwise.
1268    *
1269    * @see isWarning()
1270    * @see isError()
1271    * @see isFatal()
1272    */ public
isInfo()1273  bool isInfo() {
1274     bool ret = libsbmlPINVOKE.XMLError_isInfo(swigCPtr);
1275     return ret;
1276   }
1277 
1278 
1279 /**
1280    * Predicate returning @c true or @c false depending on whether
1281    * this error object is a warning.
1282    *
1283    * This is equivalent to obtaining the severity code from an XMLError
1284    * object (via XMLError::getSeverity()) and then comparing it to the
1285    * value @link libsbml#LIBSBML_SEV_WARNING LIBSBML_SEV_WARNING@endlink from the
1286    * @if clike enumeration #XMLErrorSeverity_t. @else set of predefined
1287    * severity codes.@endif
1288    *
1289    * @return @c true if this error is a warning, @c false otherwise.
1290    *
1291    * @see isInfo()
1292    * @see isError()
1293    * @see isFatal()
1294    */ public
isWarning()1295  bool isWarning() {
1296     bool ret = libsbmlPINVOKE.XMLError_isWarning(swigCPtr);
1297     return ret;
1298   }
1299 
1300 
1301 /**
1302    * Predicate returning @c true or @c false depending on whether this
1303    * error is a significant error.
1304    *
1305    * This is equivalent to obtaining the severity code from an XMLError
1306    * object (via XMLError::getSeverity()) and then comparing it to the
1307    * value @link libsbml#LIBSBML_SEV_ERROR LIBSBML_SEV_ERROR@endlink from the
1308    * @if clike enumeration #XMLErrorSeverity_t. @else set of predefined
1309    * severity codes.@endif
1310    *
1311    * @return @c true if this error is an error, @c false otherwise.
1312    *
1313    * @see isInfo()
1314    * @see isWarning()
1315    * @see isFatal()
1316    */ public
isError()1317  bool isError() {
1318     bool ret = libsbmlPINVOKE.XMLError_isError(swigCPtr);
1319     return ret;
1320   }
1321 
1322 
1323 /**
1324    * Predicate returning @c true or @c false depending on whether this
1325    * error is a fatal run-time error.
1326    *
1327    * This is equivalent to obtaining the severity code from an XMLError
1328    * object (via XMLError::getSeverity()) and then comparing it to the
1329    * value @link libsbml#LIBSBML_SEV_FATAL LIBSBML_SEV_FATAL@endlink from the
1330    * @if clike enumeration #XMLErrorSeverity_t. @else set of predefined severity codes.@endif
1331    *
1332    * @return @c true if this error is a fatal error, @c false otherwise.
1333    *
1334    * @see isInfo()
1335    * @see isWarning()
1336    * @see isError()
1337    */ public
isFatal()1338  bool isFatal() {
1339     bool ret = libsbmlPINVOKE.XMLError_isFatal(swigCPtr);
1340     return ret;
1341   }
1342 
1343 
1344 /**
1345    * Predicate returning @c true or @c false depending on whether this
1346    * error resulted from an internal program error.
1347    *
1348    * This is equivalent to obtaining the category identifier from an
1349    * XMLError object (via XMLError::getCategory()) and then comparing it to
1350    * the value @link libsbml#LIBSBML_CAT_INTERNAL LIBSBML_CAT_INTERNAL@endlink from the
1351    * @if clike enumeration #XMLErrorCategory_t. @else set of predefined category codes.@endif
1352    *
1353    * @return a boolean indicating whether the error is an internal error.
1354    *
1355    * @see isSystem()
1356    * @see isXML()
1357    */ public
isInternal()1358  bool isInternal() {
1359     bool ret = libsbmlPINVOKE.XMLError_isInternal(swigCPtr);
1360     return ret;
1361   }
1362 
1363 
1364 /**
1365    * Predicate returning @c true or @c false depending on whether this
1366    * error was generated by the operating system.
1367    *
1368    * This is equivalent to obtaining the category identifier from an
1369    * XMLError object (via XMLError::getCategory()) and then comparing it to
1370    * the value @link libsbml#LIBSBML_CAT_SYSTEM LIBSBML_CAT_SYSTEM@endlink from the
1371    * @if clike enumeration #XMLErrorCategory_t. @else set of predefined category codes.@endif
1372    *
1373    * @return boolean indicating whether the error is a system error.
1374    *
1375    * @see isInternal()
1376    * @see isXML()
1377    */ public
isSystem()1378  bool isSystem() {
1379     bool ret = libsbmlPINVOKE.XMLError_isSystem(swigCPtr);
1380     return ret;
1381   }
1382 
1383 
1384 /**
1385    * Predicate returning @c true or @c false depending on whether this
1386    * error resulted from a problem in the XML input (e.g., an XML syntax
1387    * error).
1388    *
1389    * This is equivalent to obtaining the category identifier from an
1390    * XMLError object (via XMLError::getCategory()) and then comparing it to
1391    * the value @link libsbml#LIBSBML_CAT_XML LIBSBML_CAT_XML@endlink from the
1392    * @if clike enumeration #XMLErrorCategory_t. @else set of predefined category codes.@endif
1393    *
1394    * @return a boolean indicating whether the error is an XML catetory error.
1395    *
1396    * @see isInternal()
1397    * @see isSystem()
1398    */ public
isXML()1399  bool isXML() {
1400     bool ret = libsbmlPINVOKE.XMLError_isXML(swigCPtr);
1401     return ret;
1402   }
1403 
1404 
1405 /**
1406    * Predicate returning @c true or @c false depending on whether this
1407    * error resulted from a problem or whether it was logged as an unknown
1408    * error.
1409    *
1410    * This is equivalent to obtaining the error identifier from an
1411    * XMLError object (via XMLError::getErrorId()) and then comparing it to
1412    * the value XMLUnknownError or UnknownError from the
1413    * @if clike enumeration #XMLErrorCode_t. @else set of predefined error codes.@endif
1414    *
1415    * @return a boolean indicating whether the error is a valid error (@c true)
1416    * or whether it is unknown (@c false).
1417    */ public
isValid()1418  bool isValid() {
1419     bool ret = libsbmlPINVOKE.XMLError_isValid(swigCPtr);
1420     return ret;
1421   }
1422 
1423 
1424 /**
1425    * Sets the line number where this error occurred.
1426    *
1427    * @param line a long integer, the line number to set.
1428    *
1429    *
1430  * @return integer value indicating success/failure of the
1431  * function.  @if clike The value is drawn from the
1432  * enumeration #OperationReturnValues_t. @endif This particular
1433  * function only does one thing irrespective of user input or
1434  * object state, and thus will only return a single value:
1435  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
1436    *
1437    * @see setColumn(unsigned int column)
1438    */ public
setLine(long line)1439  int setLine(long line) {
1440     int ret = libsbmlPINVOKE.XMLError_setLine(swigCPtr, line);
1441     return ret;
1442   }
1443 
1444 
1445 /**
1446    * Sets the column number where this error occurred.
1447    *
1448    * @param column a long integer, the column number to set.
1449    *
1450    *
1451  * @return integer value indicating success/failure of the
1452  * function.  @if clike The value is drawn from the
1453  * enumeration #OperationReturnValues_t. @endif This particular
1454  * function only does one thing irrespective of user input or
1455  * object state, and thus will only return a single value:
1456  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
1457    *
1458    * @see setLine(unsigned int line)
1459    */ public
setColumn(long column)1460  int setColumn(long column) {
1461     int ret = libsbmlPINVOKE.XMLError_setColumn(swigCPtr, column);
1462     return ret;
1463   }
1464 
1465 
1466 /**
1467    * Returns a copy of the message string associated with the given
1468    * predefined XMLError code.
1469    *
1470    * @param code the error code whose message is sought; it must be a
1471    * predefined value from @if clike <a class='el' href='#error-codes'>
1472    * XMLErrorCode_t</a>. @else <a class='el' href='#error-codes'>the set
1473    * of predefined error identifiers</a>.@endif
1474    */ public
getStandardMessage(int code)1475  static string getStandardMessage(int code) {
1476     string ret = libsbmlPINVOKE.XMLError_getStandardMessage(code);
1477     return ret;
1478   }
1479 
1480 
1481 /**
1482    * Returns the SBML Level&nbsp;3 package extension (if any) that logged
1483    * this error.
1484    *
1485    * Each error logged by an libSBML extension for SBML Level&nbsp;3 packages
1486    * includes a record of the package that logged it.  The field is a simple
1487    * text string.  If the string is empty or has the value @c 'core', then
1488    * the error came from libSBML core; otherwise, the string will be the
1489    * short-form name of the package (e.g., @c 'comp' for the Hierarchical
1490    * Model Composition package).
1491    *
1492    * @return a string representing the name of the package that logged this
1493    * error.  If the error did not come from a package extension, the value
1494    * will be the empty string or @c 'core'.
1495    */ public
getPackage()1496  string getPackage() {
1497     string ret = libsbmlPINVOKE.XMLError_getPackage(swigCPtr);
1498     return ret;
1499   }
1500 
1501 
1502 /**
1503    * Returns libSBML's internal numerical offset for the error code
1504    * associated with this error.
1505    *
1506    * In the SBML Level&nbsp;3 package specifications, package validation
1507    * rules are identified by 5-digit numbers prefixed with the nickname of
1508    * the package itself---e.g., &ldquo;comp-10101&rdquo;,
1509    * &ldquo;fbc-20301&rdquo;, etc.  Historically, libSBML reported error
1510    * codes as pure integers, and some application software systems make
1511    * decisions based on the numerical values of the error codes.  To permit
1512    * these applications to continue to function in this fashion, libSBML
1513    * internally continues to maintain error identifiers as pure integers.  To
1514    * handle the possibility that errors may come from package extensions,
1515    * libSBML uses numerical offsets added to the internal error codes.  These
1516    * offsets add two leading digits to the regular 5-digit error codes; for
1517    * example, &ldquo;comp&rdquo; error codes are stored as 1010101, 1020102,
1518    * etc.  The offset in this case is 1000000.  Another package will have the
1519    * offset 2000000, yet another will have 3000000, etc.
1520    *
1521    * This method returns the integer offset in this error's error code.
1522    * Calling applications can get the 5-digit package-specific number for a
1523    * given error code by subtracting the offset from the value reported by
1524    * getErrorId():
1525    * @verbatim
1526  getErrorId() - getErrorIdOffset()
1527  @endverbatim
1528    * When libSBML produces error messages, it combines the text string
1529    * returned by getPackage() with the subtracted value of the error code,
1530    * to produce a text string of the form &ldquo;comp-10101&rdquo;.
1531    *
1532    * @see getErrorId()
1533    * @see getPackage()
1534    */ public
getErrorIdOffset()1535  long getErrorIdOffset() { return (long)libsbmlPINVOKE.XMLError_getErrorIdOffset(swigCPtr); }
1536 
1537 }
1538 
1539 }
1540