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 File and text-string SBML reader.
20  *
21  * @htmlinclude not-sbml-warning.html
22  *
23  * The SBMLReader class provides the main interface for reading SBML content
24  * from files and strings.  The methods for reading SBML all return an
25  * SBMLDocument object representing the results.  In the case of failures
26  * (such as if the SBML contains errors or a file cannot be read), the errors
27  * will be recorded with the SBMLErrorLog object kept in the SBMLDocument
28  * returned by SBMLReader.  Consequently, immediately after calling a method
29  * on SBMLReader, callers should always check for errors and warnings using
30  * the methods for this purpose provided by SBMLDocument.
31  *
32  * For convenience as well as easy access from other languages besides C++,
33  * this file also defines two global functions,
34  * @sbmlglobalfunction{readSBML, String} and
35  * @sbmlglobalfunction{readSBMLFromString, String}.  They are
36  * equivalent to creating an SBMLReader object and then calling the
37  * @if python @link SBMLReader::readSBML() SBMLReader.readSBML()@endlink@endif@if java SBMLReader::readSBML(String)@endif@if cpp SBMLReader::readSBML()@endif@if csharp SBMLReader.readSBML()@endif and
38  * @if python @link SBMLReader::readSBMLFromString() SBMLReader.readSBMLFromString()@endlink@endif@if java SBMLReader::readSBMLFromString(String)@endif@if cpp SBMLReader::readSBMLFromString()@endif@if csharp SBMLReader.readSBMLFromString()@endif methods, respectively.
39  *
40  * @section compression Support for reading compressed files
41  *
42  * LibSBML provides support for reading (as well as writing) compressed
43  * SBML files.  The process is transparent to the calling
44  * application---the application does not need to do anything
45  * deliberate to invoke the functionality.  If a given SBML filename ends
46  * with an extension for the @em gzip, @em zip or @em bzip2 compression
47  * formats (respectively, @c .gz, @c .zip, or @c .bz2), then the methods
48  * @if python @link SBMLReader::readSBML() SBMLReader.readSBML()@endlink@endif@if java @link SBMLReader::readSBML(String) SBMLReader.readSBML(String)@endlink@endif@if cpp SBMLReader::readSBML()@endif@if csharp SBMLReader.readSBML()@endif and
49  * @if python @link SBMLWriter::writeSBML() SBMLWriter.writeSBML()@endlink@endif@if java @link SBMLWriter::writeSBML(String) SBMLWriter.writeSBML(String)@endlink@endif@if cpp SBMLWriter::writeSBML()@endif@if csharp SBMLWriter.writeSBML()@endif
50  * will automatically decompress and compress the file while reading and
51  * writing it.  If the filename has no such extension, it will be read and
52  * written uncompressed as normal.
53  *
54  * The compression feature requires that the @em zlib (for @em gzip and @em
55  * zip formats) and/or @em bzip2 (for @em bzip2 format) be available on the
56  * system running libSBML, and that libSBML was configured with their
57  * support compiled-in.  Please see the libSBML
58  * @if java <a href='../../../libsbml-installation.html'>installation instructions</a> @else <a href='libsbml-installation.html'>installation instructions</a>@endif
59  * for more information about this.  The methods
60  * @if java SBMLReader::hasZlib()@else hasZlib()@endif and
61  * @if java SBMLReader::hasBzip2()@else hasBzip2()@endif
62  * can be used by an application to query at run-time whether support
63  * for the compression libraries is available in the present copy of
64  * libSBML.
65  *
66  * Support for compression is not mandated by the SBML standard, but
67  * applications may find it helpful, particularly when large SBML models
68  * are being communicated across data links of limited bandwidth.
69  */
70 
71 public class SBMLReader : global::System.IDisposable {
72 	private HandleRef swigCPtr;
73 	protected bool swigCMemOwn;
74 
SBMLReader(IntPtr cPtr, bool cMemoryOwn)75 	internal SBMLReader(IntPtr cPtr, bool cMemoryOwn)
76 	{
77 		swigCMemOwn = cMemoryOwn;
78 		swigCPtr    = new HandleRef(this, cPtr);
79 	}
80 
getCPtr(SBMLReader obj)81 	internal static HandleRef getCPtr(SBMLReader obj)
82 	{
83 		return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
84 	}
85 
getCPtrAndDisown(SBMLReader obj)86 	internal static HandleRef getCPtrAndDisown (SBMLReader obj)
87 	{
88 		HandleRef ptr = new HandleRef(null, IntPtr.Zero);
89 
90 		if (obj != null)
91 		{
92 			ptr             = obj.swigCPtr;
93 			obj.swigCMemOwn = false;
94 		}
95 
96 		return ptr;
97 	}
98 
~SBMLReader()99   ~SBMLReader() {
100     Dispose(false);
101   }
102 
Dispose()103   public void Dispose() {
104     Dispose(true);
105     global::System.GC.SuppressFinalize(this);
106   }
107 
Dispose(bool disposing)108   protected virtual void Dispose(bool disposing) {
109     lock(this) {
110       if (swigCPtr.Handle != global::System.IntPtr.Zero) {
111         if (swigCMemOwn) {
112           swigCMemOwn = false;
113           libsbmlPINVOKE.delete_SBMLReader(swigCPtr);
114         }
115         swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
116       }
117     }
118   }
119 
operator ==(SBMLReader lhs, SBMLReader rhs)120   public static bool operator==(SBMLReader lhs, SBMLReader rhs)
121   {
122     if((Object)lhs == (Object)rhs)
123     {
124       return true;
125     }
126 
127     if( ((Object)lhs == null) || ((Object)rhs == null) )
128     {
129       return false;
130     }
131 
132     return (getCPtr(lhs).Handle.ToString() == getCPtr(rhs).Handle.ToString());
133   }
134 
operator !=(SBMLReader lhs, SBMLReader rhs)135   public static bool operator!=(SBMLReader lhs, SBMLReader rhs)
136   {
137     return !(lhs == rhs);
138   }
139 
Equals(Object sb)140   public override bool Equals(Object sb)
141   {
142     if ( ! (sb is SBMLReader) )
143     {
144       return false;
145     }
146 
147     return this == (SBMLReader)sb;
148   }
149 
GetHashCode()150   public override int GetHashCode()
151   {
152     return swigCPtr.Handle.ToInt32();
153   }
154 
155 
156 /**
157    * Creates a new SBMLReader object and returns it.
158    *
159    * The libSBML SBMLReader object offers methods for reading SBML in
160    * XML form from files and text strings.
161    */ public
SBMLReader()162  SBMLReader() : this(libsbmlPINVOKE.new_SBMLReader(), true) {
163   }
164 
165 
166 /**
167    *
168  * Reads an SBML document from the given file.
169  *
170  * If the file named @p filename does not exist or its content is not valid
171  * SBML, one or more errors will be logged with the SBMLDocument object
172  * returned by this method.  Callers can use the methods on SBMLDocument such
173  * as
174  * @if python @link libsbml.SBMLDocument.getNumErrors() SBMLDocument.getNumErrors()@endlink@endif,
175  * @if conly SBMLDocument_getNumErrors() @else SBMLDocument::getNumErrors()@endif
176  * and
177  * @if python @link libsbml.SBMLDocument.getError() SBMLDocument.getError()@endlink@endif
178  * @if java SBMLDocument::getError(long)@endif
179  * @if cpp SBMLDocument::getError()@endif
180  * @if csharp SBMLDocument::getError()@endif
181  * @if conly SBMLDocument_getError()@endif
182  * to get the errors.  The object returned by
183  * @if python @link libsbml.SBMLDocument.getError() SBMLDocument.getError()@endlink@endif
184  * @if java SBMLDocument::getError(long)@endif
185  * @if cpp SBMLDocument::getError()@endif
186  * @if csharp SBMLDocument::getError()@endif
187  * @if conly SBMLDocument_getError()@endif
188  * is an SBMLError object, and it has methods to get the error code,
189  * category, and severity level of the problem, as well as a textual
190  * description of the problem.  The possible severity levels range from
191  * informational messages to fatal errors; see the documentation for
192  * @if conly SBMLError_t @else SBMLError@endif
193  * for more information.
194  *
195  * If the file @p filename could not be read, the file-reading error will
196  * appear first.  The error code @if clike (a value drawn from the
197  * enumeration #XMLErrorCode_t)@endif can provide a clue about what
198  * happened.  For example, a file might be unreadable (either because it does
199  * not actually exist or because the user does not have the necessary access
200  * privileges to read it) or some sort of file operation error may have been
201  * reported by the underlying operating system.  Callers can check for these
202  * situations using a program fragment such as the following:
203  * @if cpp
204 @code{.cpp}
205 SBMLReader reader;
206 SBMLDocument doc  = reader.readSBMLFromFile(filename);
207 
208 if (doc->getNumErrors() > 0)
209 {
210   if (doc->getError(0)->getErrorId() == XMLError::XMLFileUnreadable)
211   {
212     // Handle case of unreadable file here.
213   }
214   else if (doc->getError(0)->getErrorId() == XMLError::XMLFileOperationError)
215   {
216     // Handle case of other file operation error here.
217   }
218   else
219   {
220     // Handle other cases -- see error codes defined in XMLErrorCode_t
221     // for other possible cases to check.
222   }
223 }
224 @endcode
225 @endif
226 @if conly
227 @code{.c}
228 SBMLReader_t   *sr;
229 SBMLDocument_t *d;
230 
231 sr = SBMLReader_create();
232 
233 d = SBMLReader_readSBML(sr, filename);
234 
235 if (SBMLDocument_getNumErrors(d) > 0)
236 {
237   if (XMLError_getId(SBMLDocument_getError(d, 0))
238       == SBML_READ_ERROR_FILE_NOT_FOUND)
239   {
240      ...
241   }
242   if (XMLError_getId(SBMLDocument_getError(d, 0))
243       == SBML_READ_ERROR_NOT_SBML)
244   {
245      ...
246   }
247 }
248 @endcode
249 @endif
250 @if java
251 @code{.java}
252 SBMLReader reader = new SBMLReader();
253 SBMLDocument doc  = reader.readSBMLFromFile(filename);
254 
255 if (doc.getNumErrors() > 0)
256 {
257     if (doc.getError(0).getErrorId() == libsbml.libsbml.XMLFileUnreadable)
258     {
259         // Handle case of unreadable file here.
260     }
261     else if (doc.getError(0).getErrorId() == libsbml.libsbml.XMLFileOperationError)
262     {
263         // Handle case of other file operation error here.
264     }
265     else
266     {
267         // Handle other error cases.
268     }
269 }
270 @endcode
271 @endif
272 @if python
273 @code{.py}
274 reader = SBMLReader()
275 if reader == None:
276   # Handle the truly exceptional case of no object created here.
277 
278 doc = reader.readSBMLFromFile(filename)
279 if doc.getNumErrors() > 0:
280   if doc.getError(0).getErrorId() == XMLFileUnreadable:
281     # Handle case of unreadable file here.
282   elif doc.getError(0).getErrorId() == XMLFileOperationError:
283     # Handle case of other file error here.
284   else:
285     # Handle other error cases here.
286 @endcode
287 @endif
288 @if csharp
289 @code{.cs}
290 SBMLReader reader = new SBMLReader();
291 SBMLDocument doc = reader.readSBMLFromFile(filename);
292 
293 if (doc.getNumErrors() > 0)
294 {
295     if (doc.getError(0).getErrorId() == libsbmlcs.libsbml.XMLFileUnreadable)
296     {
297          // Handle case of unreadable file here.
298     }
299     else if (doc.getError(0).getErrorId() == libsbmlcs.libsbml.XMLFileOperationError)
300     {
301          // Handle case of other file operation error here.
302     }
303     else
304     {
305          // Handle other cases -- see error codes defined in XMLErrorCode_t
306          // for other possible cases to check.
307     }
308  }
309 @endcode
310 @endif
311  *
312  *
313  *
314  * If the given filename ends with the suffix @c '.gz' (for example,
315  * @c 'myfile.xml.gz'), the file is assumed to be compressed in @em gzip
316  * format and will be automatically decompressed upon reading.
317  * Similarly, if the given filename ends with @c '.zip' or @c '.bz2', the
318  * file is assumed to be compressed in @em zip or @em bzip2 format
319  * (respectively).  Files whose names lack these suffixes will be read
320  * uncompressed.  Note that if the file is in @em zip format but the
321  * archive contains more than one file, only the first file in the
322  * archive will be read and the rest ignored.
323  *
324  *
325  *
326  *
327  *
328  * To read a gzip/zip file, libSBML needs to be configured and linked with the
329  * <a target='_blank' href='http://www.zlib.net/'>zlib</a> library at compile
330  * time.  It also needs to be linked with the <a target='_blank'
331  * href=''>bzip2</a> library to read files in <em>bzip2</em> format.  (Both of
332  * these are the default configurations for libSBML.)  Errors about unreadable
333  * files will be logged if a compressed filename is given and libSBML was
334  * <em>not</em> linked with the corresponding required library.
335  *
336  *
337  *
338  *
339    *
340    * This method is identical to
341    * @if python @link SBMLReader::readSBMLFromFile() SBMLReader.readSBMLFromFile()@endlink@endif@if java @link SBMLReader::readSBMLFromFile(String) SBMLReader.readSBMLFromFile(String)@endlink@endif@if cpp SBMLReader::readSBMLFromFile()@endif@if csharp SBMLReader.readSBMLFromFile()@endif.
342    *
343    * @param filename the name or full pathname of the file to be read.
344    *
345    * @return a pointer to the SBMLDocument object created from the SBML
346    * content in @p filename.
347    *
348    *
349  * @note LibSBML versions 2.x and later versions behave differently in
350  * error handling in several respects.  One difference is how early some
351  * errors are caught and whether libSBML continues processing a file in
352  * the face of some early errors.  In general, libSBML versions after 2.x
353  * stop parsing SBML inputs sooner than libSBML version 2.x in the face
354  * of XML errors, because the errors may invalidate any further SBML
355  * content.  For example, a missing XML declaration at the beginning of
356  * the file was ignored by libSBML 2.x but in version 3.x and later, it
357  * will cause libSBML to stop parsing the rest of the input altogether.
358  * While this behavior may seem more severe and intolerant, it was
359  * necessary in order to provide uniform behavior regardless of which
360  * underlying XML parser (Expat, Xerces, libxml2) is being used by
361  * libSBML.  The XML parsers themselves behave differently in their error
362  * reporting, and sometimes libSBML has to resort to the lowest common
363  * denominator.
364  *
365  *
366    *
367    * @see readSBMLFromString(@if java String@endif)
368    * @see SBMLError
369    * @see SBMLDocument
370    */ public
readSBML(string filename)371  SBMLDocument readSBML(string filename) {
372     global::System.IntPtr cPtr = libsbmlPINVOKE.SBMLReader_readSBML(swigCPtr, filename);
373     SBMLDocument ret = (cPtr == global::System.IntPtr.Zero) ? null : new SBMLDocument(cPtr, true);
374     return ret;
375   }
376 
377 
378 /**
379    *
380  * Reads an SBML document from the given file.
381  *
382  * If the file named @p filename does not exist or its content is not valid
383  * SBML, one or more errors will be logged with the SBMLDocument object
384  * returned by this method.  Callers can use the methods on SBMLDocument such
385  * as
386  * @if python @link libsbml.SBMLDocument.getNumErrors() SBMLDocument.getNumErrors()@endlink@endif,
387  * @if conly SBMLDocument_getNumErrors() @else SBMLDocument::getNumErrors()@endif
388  * and
389  * @if python @link libsbml.SBMLDocument.getError() SBMLDocument.getError()@endlink@endif
390  * @if java SBMLDocument::getError(long)@endif
391  * @if cpp SBMLDocument::getError()@endif
392  * @if csharp SBMLDocument::getError()@endif
393  * @if conly SBMLDocument_getError()@endif
394  * to get the errors.  The object returned by
395  * @if python @link libsbml.SBMLDocument.getError() SBMLDocument.getError()@endlink@endif
396  * @if java SBMLDocument::getError(long)@endif
397  * @if cpp SBMLDocument::getError()@endif
398  * @if csharp SBMLDocument::getError()@endif
399  * @if conly SBMLDocument_getError()@endif
400  * is an SBMLError object, and it has methods to get the error code,
401  * category, and severity level of the problem, as well as a textual
402  * description of the problem.  The possible severity levels range from
403  * informational messages to fatal errors; see the documentation for
404  * @if conly SBMLError_t @else SBMLError@endif
405  * for more information.
406  *
407  * If the file @p filename could not be read, the file-reading error will
408  * appear first.  The error code @if clike (a value drawn from the
409  * enumeration #XMLErrorCode_t)@endif can provide a clue about what
410  * happened.  For example, a file might be unreadable (either because it does
411  * not actually exist or because the user does not have the necessary access
412  * privileges to read it) or some sort of file operation error may have been
413  * reported by the underlying operating system.  Callers can check for these
414  * situations using a program fragment such as the following:
415  * @if cpp
416 @code{.cpp}
417 SBMLReader reader;
418 SBMLDocument doc  = reader.readSBMLFromFile(filename);
419 
420 if (doc->getNumErrors() > 0)
421 {
422   if (doc->getError(0)->getErrorId() == XMLError::XMLFileUnreadable)
423   {
424     // Handle case of unreadable file here.
425   }
426   else if (doc->getError(0)->getErrorId() == XMLError::XMLFileOperationError)
427   {
428     // Handle case of other file operation error here.
429   }
430   else
431   {
432     // Handle other cases -- see error codes defined in XMLErrorCode_t
433     // for other possible cases to check.
434   }
435 }
436 @endcode
437 @endif
438 @if conly
439 @code{.c}
440 SBMLReader_t   *sr;
441 SBMLDocument_t *d;
442 
443 sr = SBMLReader_create();
444 
445 d = SBMLReader_readSBML(sr, filename);
446 
447 if (SBMLDocument_getNumErrors(d) > 0)
448 {
449   if (XMLError_getId(SBMLDocument_getError(d, 0))
450       == SBML_READ_ERROR_FILE_NOT_FOUND)
451   {
452      ...
453   }
454   if (XMLError_getId(SBMLDocument_getError(d, 0))
455       == SBML_READ_ERROR_NOT_SBML)
456   {
457      ...
458   }
459 }
460 @endcode
461 @endif
462 @if java
463 @code{.java}
464 SBMLReader reader = new SBMLReader();
465 SBMLDocument doc  = reader.readSBMLFromFile(filename);
466 
467 if (doc.getNumErrors() > 0)
468 {
469     if (doc.getError(0).getErrorId() == libsbml.libsbml.XMLFileUnreadable)
470     {
471         // Handle case of unreadable file here.
472     }
473     else if (doc.getError(0).getErrorId() == libsbml.libsbml.XMLFileOperationError)
474     {
475         // Handle case of other file operation error here.
476     }
477     else
478     {
479         // Handle other error cases.
480     }
481 }
482 @endcode
483 @endif
484 @if python
485 @code{.py}
486 reader = SBMLReader()
487 if reader == None:
488   # Handle the truly exceptional case of no object created here.
489 
490 doc = reader.readSBMLFromFile(filename)
491 if doc.getNumErrors() > 0:
492   if doc.getError(0).getErrorId() == XMLFileUnreadable:
493     # Handle case of unreadable file here.
494   elif doc.getError(0).getErrorId() == XMLFileOperationError:
495     # Handle case of other file error here.
496   else:
497     # Handle other error cases here.
498 @endcode
499 @endif
500 @if csharp
501 @code{.cs}
502 SBMLReader reader = new SBMLReader();
503 SBMLDocument doc = reader.readSBMLFromFile(filename);
504 
505 if (doc.getNumErrors() > 0)
506 {
507     if (doc.getError(0).getErrorId() == libsbmlcs.libsbml.XMLFileUnreadable)
508     {
509          // Handle case of unreadable file here.
510     }
511     else if (doc.getError(0).getErrorId() == libsbmlcs.libsbml.XMLFileOperationError)
512     {
513          // Handle case of other file operation error here.
514     }
515     else
516     {
517          // Handle other cases -- see error codes defined in XMLErrorCode_t
518          // for other possible cases to check.
519     }
520  }
521 @endcode
522 @endif
523  *
524  *
525  *
526  * If the given filename ends with the suffix @c '.gz' (for example,
527  * @c 'myfile.xml.gz'), the file is assumed to be compressed in @em gzip
528  * format and will be automatically decompressed upon reading.
529  * Similarly, if the given filename ends with @c '.zip' or @c '.bz2', the
530  * file is assumed to be compressed in @em zip or @em bzip2 format
531  * (respectively).  Files whose names lack these suffixes will be read
532  * uncompressed.  Note that if the file is in @em zip format but the
533  * archive contains more than one file, only the first file in the
534  * archive will be read and the rest ignored.
535  *
536  *
537  *
538  *
539  *
540  * To read a gzip/zip file, libSBML needs to be configured and linked with the
541  * <a target='_blank' href='http://www.zlib.net/'>zlib</a> library at compile
542  * time.  It also needs to be linked with the <a target='_blank'
543  * href=''>bzip2</a> library to read files in <em>bzip2</em> format.  (Both of
544  * these are the default configurations for libSBML.)  Errors about unreadable
545  * files will be logged if a compressed filename is given and libSBML was
546  * <em>not</em> linked with the corresponding required library.
547  *
548  *
549  *
550  *
551    *
552    * This method is identical to
553    * @if python @link SBMLReader::readSBML() SBMLReader.readSBML()@endlink@endif@if java @link SBMLReader::readSBML(String) SBMLReader.readSBML(String)@endlink@endif@if cpp SBMLReader::readSBML()@endif@if csharp SBMLReader.readSBML()@endif.
554    *
555    * @param filename the name or full pathname of the file to be read.
556    *
557    * @return a pointer to the SBMLDocument object created from the SBML
558    * content in @p filename.
559    *
560    *
561  * @note LibSBML versions 2.x and later versions behave differently in
562  * error handling in several respects.  One difference is how early some
563  * errors are caught and whether libSBML continues processing a file in
564  * the face of some early errors.  In general, libSBML versions after 2.x
565  * stop parsing SBML inputs sooner than libSBML version 2.x in the face
566  * of XML errors, because the errors may invalidate any further SBML
567  * content.  For example, a missing XML declaration at the beginning of
568  * the file was ignored by libSBML 2.x but in version 3.x and later, it
569  * will cause libSBML to stop parsing the rest of the input altogether.
570  * While this behavior may seem more severe and intolerant, it was
571  * necessary in order to provide uniform behavior regardless of which
572  * underlying XML parser (Expat, Xerces, libxml2) is being used by
573  * libSBML.  The XML parsers themselves behave differently in their error
574  * reporting, and sometimes libSBML has to resort to the lowest common
575  * denominator.
576  *
577  *
578    *
579    * @see readSBMLFromString(@if java String@endif)
580    * @see SBMLError
581    * @see SBMLDocument
582    */ public
readSBMLFromFile(string filename)583  SBMLDocument readSBMLFromFile(string filename) {
584     global::System.IntPtr cPtr = libsbmlPINVOKE.SBMLReader_readSBMLFromFile(swigCPtr, filename);
585     SBMLDocument ret = (cPtr == global::System.IntPtr.Zero) ? null : new SBMLDocument(cPtr, true);
586     return ret;
587   }
588 
589 
590 /**
591    *
592  * Reads an SBML document from a text string.
593  *
594  * This method is flexible with respect to the presence of an XML
595  * declaration at the beginning of the string.  In particular, if the
596  * string in @p xml does not begin with the XML declaration
597  * @verbatim
598 <?xml version='1.0' encoding='UTF-8'?>
599 @endverbatim
600  * then this method will automatically prepend the declaration
601  * to @p xml.
602  *
603  * This method will log a fatal error if the content given in the parameter
604  * @p xml is not in SBML format.  See the method documentation for
605  * @if conly SBMLReader_readSBML()
606  * @elseif java SBMLReader::readSBML( String )
607  * @else SBMLReader::readSBML()
608  * @endif
609  * for an example of code for testing the returned error code.
610  *
611  *
612    *
613    * @param xml a string containing a full SBML model.
614    *
615    * @return a pointer to the SBMLDocument created from the SBML content,
616    * or a null pointer if @p xml is @c null.
617    *
618    *
619  * @note When using this method to read an SBMLDocument that uses the SBML
620  * Level&nbsp;3 Hierarchical %Model Composition package (comp) the document
621  * location cannot be set automatically. Thus, if the model contains
622  * references to ExternalModelDefinition objects, it will be necessary to
623  * manually set the document URI location
624  * (@if conly SBMLDocument_setLocationURI()
625  * @elseif java SBMLDocument::setLocationURI( String )
626  * @else SBMLDocument::setLocationURI()
627  * @endif
628  * ) in order to facilitate resolving these models.
629    *
630    * @see SBMLReader::readSBML(@if java String@endif)
631    */ public
readSBMLFromString(string xml)632  SBMLDocument readSBMLFromString(string xml) {
633     global::System.IntPtr cPtr = libsbmlPINVOKE.SBMLReader_readSBMLFromString(swigCPtr, xml);
634     SBMLDocument ret = (cPtr == global::System.IntPtr.Zero) ? null : new SBMLDocument(cPtr, true);
635     return ret;
636   }
637 
638 
639 /**
640    * Static method; returns @c true if this copy of libSBML supports
641    * <i>gzip</I> and <i>zip</i> format compression.
642    *
643    * @return @c true if libSBML has been linked with the <i>zlib</i>
644    * library, @c false otherwise.
645    *
646    *
647  * @if python @note Because this is a static method on a class, the Python
648  * language interface for libSBML will contain two variants.  One will be the
649  * expected, normal static method on the class (i.e., a regular
650  * <em>methodName</em>), and the other will be a standalone top-level
651  * function with the name <em>ClassName_methodName()</em>. This is merely an
652  * artifact of how the language interfaces are created in libSBML.  The
653  * methods are functionally identical. @endif
654  *
655  *
656    *
657    * @see @if clike hasBzip2() @else SBMLReader::hasBzip2()@endif
658    */ public
hasZlib()659  static bool hasZlib() {
660     bool ret = libsbmlPINVOKE.SBMLReader_hasZlib();
661     return ret;
662   }
663 
664 
665 /**
666    * Static method; returns @c true if this copy of libSBML supports
667    * <i>bzip2</i> format compression.
668    *
669    * @return @c true if libSBML is linked with the <i>bzip2</i>
670    * libraries, @c false otherwise.
671    *
672    *
673  * @if python @note Because this is a static method on a class, the Python
674  * language interface for libSBML will contain two variants.  One will be the
675  * expected, normal static method on the class (i.e., a regular
676  * <em>methodName</em>), and the other will be a standalone top-level
677  * function with the name <em>ClassName_methodName()</em>. This is merely an
678  * artifact of how the language interfaces are created in libSBML.  The
679  * methods are functionally identical. @endif
680  *
681  *
682    *
683    * @see @if clike hasZlib() @else SBMLReader::hasZlib()@endif
684    */ public
hasBzip2()685  static bool hasBzip2() {
686     bool ret = libsbmlPINVOKE.SBMLReader_hasBzip2();
687     return ret;
688   }
689 
690 }
691 
692 }
693