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 Interface to an XML output stream.
20  *
21  * @htmlinclude not-sbml-warning.html
22  *
23  * SBML content is serialized using XML; the resulting data can be stored and
24  * read to/from a file or data stream.  Low-level XML parsers such as Xerces
25  * provide facilities to read XML data.  To permit the use of different XML
26  * parsers (Xerces, Expat or libxml2), libSBML implements an abstraction
27  * layer.  XMLInputStream and XMLOutputStream are two parts of that
28  * abstraction layer.
29  *
30  * XMLOutputStream provides a wrapper above output streams to facilitate
31  * writing XML.  XMLOutputStream keeps track of start and end elements,
32  * indentation, XML namespace prefixes, and more.  The interface provides
33  * features for converting non-text data types into appropriate textual form;
34  * this takes the form of overloaded <code>writeAttribute(...)</code> methods
35  * that allow users to simply use the same method with any data type.  For
36  * example, suppose an element @c testElement has two attributes, @c size and
37  * @c id, and the attributes are variables in your code as follows:
38 @if cpp
39 @code{.cpp}
40 double size = 3.2;
41 string id = 'id';
42 @endcode
43 @endif
44 @if java
45 @code
46 double size = 3.2;
47 String id = 'id';
48 @endcode
49 @endif
50 @if python
51 @code
52 size = 3.2;
53 id = 'id';
54 @endcode
55 @endif
56   * Then, the element and the attributes can be written to the
57   * standard output stream @ifnot cpp (provided as @c cout in the libSBML
58   * language bindings)@endif as follows:
59 @if cpp
60 @code{.cpp}
61 double size = 3.2;
62 string id = 'id';
63 
64 // Create an XMLOutputStream object that will write to the
65 // standard output stream:
66 
67 XMLOutputStream xos = new XMLOutputStream(cout);
68 
69 // Create the start element, write the attributes, and close
70 // the element.  The output will be written immediately as
71 // each method is called.
72 
73 xos.startElement('testElement')
74 xos.writeAttribute('size', size)
75 xos.writeAttribute('id', id)
76 xos.endElement('testElement')
77 @endcode
78 @endif
79 @if java
80 @code{.java}
81 import org.sbml.libsbml.XMLOutputStream;
82 import org.sbml.libsbml.libsbml;
83 
84 public class test
85 {
86     public static void main (String[] args)
87     {
88         double size = 3.2;
89         String id = 'id';
90 
91         // Create an XMLOutputStream object that will write to the
92         // standard output stream, which is provide in libSBML's
93         // Java language interface as the object 'libsbml.cout'.
94 
95         XMLOutputStream xos = new XMLOutputStream(libsbml.cout);
96 
97         // Create the start element, write the attributes, and close
98         // the element.  The output will be written immediately as
99         // each method is called.
100 
101         xos.startElement('testElement');
102         xos.writeAttribute('size', size);
103         xos.writeAttribute('id', id);
104         xos.endElement('testElement');
105     }
106 
107     static
108     {
109         System.loadLibrary('sbmlj');
110     }
111 }
112 @endcode
113 @endif
114 @if python
115 @code{.py}
116 from libsbml import *
117 
118 size = 3.2;
119 id = 'id';
120 
121 # Create an XMLOutputStream object that will write to the standard
122 # output stream, which is provide in libSBML's Python language
123 # interface as the object 'libsbml.cout'.  Since we imported * from
124 # the libsbml module, we can simply refer to it as 'cout' here:
125 
126 output_stream = XMLOutputStream(cout)
127 
128 # Create the start element, write the attributes, and close the
129 # element.  The output is written immediately by each method.
130 
131 output_stream.startElement('testElement')
132 output_stream.writeAttribute('size', size)
133 output_stream.writeAttribute('id', id)
134 output_stream.endElement('testElement')
135 @endcode
136 @endif
137  *
138  * Other classes in SBML take XMLOutputStream objects as arguments, and use
139  * that to write elements and attributes seamlessly to the XML output stream.
140  *
141  * It is also worth noting that unlike XMLInputStream, XMLOutputStream is
142  * actually independent of the underlying XML parsers.  It does not use the
143  * XML parser libraries at all.
144  *
145  * @note The convenience of the XMLInputStream and XMLOutputStream
146  * abstraction may be useful for developers interested in creating parsers
147  * for other XML formats besides SBML.  It can provide developers with a
148  * layer above more basic XML parsers, as well as some useful programmatic
149  * elements such as XMLToken, XMLError, etc.
150  *
151  * @see XMLInputStream
152  */
153 
154 public class XMLOutputStream : global::System.IDisposable {
155 	private HandleRef swigCPtr;
156 	protected bool swigCMemOwn;
157 
XMLOutputStream(IntPtr cPtr, bool cMemoryOwn)158 	internal XMLOutputStream(IntPtr cPtr, bool cMemoryOwn)
159 	{
160 		swigCMemOwn = cMemoryOwn;
161 		swigCPtr    = new HandleRef(this, cPtr);
162 	}
163 
getCPtr(XMLOutputStream obj)164 	internal static HandleRef getCPtr(XMLOutputStream obj)
165 	{
166 		return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
167 	}
168 
getCPtrAndDisown(XMLOutputStream obj)169 	internal static HandleRef getCPtrAndDisown (XMLOutputStream obj)
170 	{
171 		HandleRef ptr = new HandleRef(null, IntPtr.Zero);
172 
173 		if (obj != null)
174 		{
175 			ptr             = obj.swigCPtr;
176 			obj.swigCMemOwn = false;
177 		}
178 
179 		return ptr;
180 	}
181 
~XMLOutputStream()182   ~XMLOutputStream() {
183     Dispose(false);
184   }
185 
Dispose()186   public void Dispose() {
187     Dispose(true);
188     global::System.GC.SuppressFinalize(this);
189   }
190 
Dispose(bool disposing)191   protected virtual void Dispose(bool disposing) {
192     lock(this) {
193       if (swigCPtr.Handle != global::System.IntPtr.Zero) {
194         if (swigCMemOwn) {
195           swigCMemOwn = false;
196           libsbmlPINVOKE.delete_XMLOutputStream(swigCPtr);
197         }
198         swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
199       }
200     }
201   }
202 
operator ==(XMLOutputStream lhs, XMLOutputStream rhs)203   public static bool operator==(XMLOutputStream lhs, XMLOutputStream rhs)
204   {
205     if((Object)lhs == (Object)rhs)
206     {
207       return true;
208     }
209 
210     if( ((Object)lhs == null) || ((Object)rhs == null) )
211     {
212       return false;
213     }
214 
215     return (getCPtr(lhs).Handle.ToString() == getCPtr(rhs).Handle.ToString());
216   }
217 
operator !=(XMLOutputStream lhs, XMLOutputStream rhs)218   public static bool operator!=(XMLOutputStream lhs, XMLOutputStream rhs)
219   {
220     return !(lhs == rhs);
221   }
222 
Equals(Object sb)223   public override bool Equals(Object sb)
224   {
225     if ( ! (sb is XMLOutputStream) )
226     {
227       return false;
228     }
229 
230     return this == (XMLOutputStream)sb;
231   }
232 
GetHashCode()233   public override int GetHashCode()
234   {
235     return swigCPtr.Handle.ToInt32();
236   }
237 
238 
239 /**
240    * Creates a new XMLOutputStream that wraps the given @p stream.
241    *
242    *
243  *
244  * The functionality associated with the @p programName and @p
245  * programVersion arguments concerns an optional comment that libSBML can
246  * write at the beginning of the output stream.  The comment is intended
247  * for human readers of the XML file, and has the following form:
248  * @verbatim
249 <!-- Created by <program name> version <program version>
250 on yyyy-MM-dd HH:mm with libSBML version <libsbml version>. -->
251 @endverbatim
252  *
253  * This program information comment is a separate item from the XML
254  * declaration that this method can also write to this output stream.  The
255  * comment is also not mandated by any SBML specification.  This libSBML
256  * functionality is provided for the convenience of calling programs, and to
257  * help humans trace the origin of SBML files.
258  *
259  *
260    *
261    *
262  *
263  * The XML declaration has the form
264  * @verbatim
265 <?xml version='1.0' encoding='UTF-8'?>
266 @endverbatim
267  * Note that the SBML specifications require the use of UTF-8 encoding and
268  * version 1.0, so for SBML documents, the above is the standard XML
269  * declaration.
270  *
271  *
272    *
273    * @param stream the input stream to wrap.
274    *
275    * @param encoding the XML encoding to declare in the output. This value
276    * should be <code>'UTF-8'</code> for SBML documents.  The default value
277    * is <code>'UTF-8'</code> if no value is supplied for this parameter.
278    *
279    * @param writeXMLDecl whether to write a standard XML declaration at
280    * the beginning of the content written on @p stream.  The default is
281    * @c true.
282    *
283    * @param programName an optional program name to write as a comment
284    * in the output stream.
285    *
286    * @param programVersion an optional version identification string to write
287    * as a comment in the output stream.
288    *
289    * @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif
290    */ public
XMLOutputStream(OStream stream, string encoding, bool writeXMLDecl, string programName, string programVersion)291  XMLOutputStream(OStream stream, string encoding, bool writeXMLDecl, string programName, string programVersion) : this(libsbmlPINVOKE.new_XMLOutputStream__SWIG_0(SWIGTYPE_p_std__ostream.getCPtr(stream.get_ostream()), encoding, writeXMLDecl, programName, programVersion), true) {
292     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
293   }
294 
295 
296 /**
297    * Creates a new XMLOutputStream that wraps the given @p stream.
298    *
299    *
300  *
301  * The functionality associated with the @p programName and @p
302  * programVersion arguments concerns an optional comment that libSBML can
303  * write at the beginning of the output stream.  The comment is intended
304  * for human readers of the XML file, and has the following form:
305  * @verbatim
306 <!-- Created by <program name> version <program version>
307 on yyyy-MM-dd HH:mm with libSBML version <libsbml version>. -->
308 @endverbatim
309  *
310  * This program information comment is a separate item from the XML
311  * declaration that this method can also write to this output stream.  The
312  * comment is also not mandated by any SBML specification.  This libSBML
313  * functionality is provided for the convenience of calling programs, and to
314  * help humans trace the origin of SBML files.
315  *
316  *
317    *
318    *
319  *
320  * The XML declaration has the form
321  * @verbatim
322 <?xml version='1.0' encoding='UTF-8'?>
323 @endverbatim
324  * Note that the SBML specifications require the use of UTF-8 encoding and
325  * version 1.0, so for SBML documents, the above is the standard XML
326  * declaration.
327  *
328  *
329    *
330    * @param stream the input stream to wrap.
331    *
332    * @param encoding the XML encoding to declare in the output. This value
333    * should be <code>'UTF-8'</code> for SBML documents.  The default value
334    * is <code>'UTF-8'</code> if no value is supplied for this parameter.
335    *
336    * @param writeXMLDecl whether to write a standard XML declaration at
337    * the beginning of the content written on @p stream.  The default is
338    * @c true.
339    *
340    * @param programName an optional program name to write as a comment
341    * in the output stream.
342    *
343    * @param programVersion an optional version identification string to write
344    * as a comment in the output stream.
345    *
346    * @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif
347    */ public
XMLOutputStream(OStream stream, string encoding, bool writeXMLDecl, string programName)348  XMLOutputStream(OStream stream, string encoding, bool writeXMLDecl, string programName) : this(libsbmlPINVOKE.new_XMLOutputStream__SWIG_1(SWIGTYPE_p_std__ostream.getCPtr(stream.get_ostream()), encoding, writeXMLDecl, programName), true) {
349     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
350   }
351 
352 
353 /**
354    * Creates a new XMLOutputStream that wraps the given @p stream.
355    *
356    *
357  *
358  * The functionality associated with the @p programName and @p
359  * programVersion arguments concerns an optional comment that libSBML can
360  * write at the beginning of the output stream.  The comment is intended
361  * for human readers of the XML file, and has the following form:
362  * @verbatim
363 <!-- Created by <program name> version <program version>
364 on yyyy-MM-dd HH:mm with libSBML version <libsbml version>. -->
365 @endverbatim
366  *
367  * This program information comment is a separate item from the XML
368  * declaration that this method can also write to this output stream.  The
369  * comment is also not mandated by any SBML specification.  This libSBML
370  * functionality is provided for the convenience of calling programs, and to
371  * help humans trace the origin of SBML files.
372  *
373  *
374    *
375    *
376  *
377  * The XML declaration has the form
378  * @verbatim
379 <?xml version='1.0' encoding='UTF-8'?>
380 @endverbatim
381  * Note that the SBML specifications require the use of UTF-8 encoding and
382  * version 1.0, so for SBML documents, the above is the standard XML
383  * declaration.
384  *
385  *
386    *
387    * @param stream the input stream to wrap.
388    *
389    * @param encoding the XML encoding to declare in the output. This value
390    * should be <code>'UTF-8'</code> for SBML documents.  The default value
391    * is <code>'UTF-8'</code> if no value is supplied for this parameter.
392    *
393    * @param writeXMLDecl whether to write a standard XML declaration at
394    * the beginning of the content written on @p stream.  The default is
395    * @c true.
396    *
397    * @param programName an optional program name to write as a comment
398    * in the output stream.
399    *
400    * @param programVersion an optional version identification string to write
401    * as a comment in the output stream.
402    *
403    * @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif
404    */ public
XMLOutputStream(OStream stream, string encoding, bool writeXMLDecl)405  XMLOutputStream(OStream stream, string encoding, bool writeXMLDecl) : this(libsbmlPINVOKE.new_XMLOutputStream__SWIG_2(SWIGTYPE_p_std__ostream.getCPtr(stream.get_ostream()), encoding, writeXMLDecl), true) {
406     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
407   }
408 
409 
410 /**
411    * Creates a new XMLOutputStream that wraps the given @p stream.
412    *
413    *
414  *
415  * The functionality associated with the @p programName and @p
416  * programVersion arguments concerns an optional comment that libSBML can
417  * write at the beginning of the output stream.  The comment is intended
418  * for human readers of the XML file, and has the following form:
419  * @verbatim
420 <!-- Created by <program name> version <program version>
421 on yyyy-MM-dd HH:mm with libSBML version <libsbml version>. -->
422 @endverbatim
423  *
424  * This program information comment is a separate item from the XML
425  * declaration that this method can also write to this output stream.  The
426  * comment is also not mandated by any SBML specification.  This libSBML
427  * functionality is provided for the convenience of calling programs, and to
428  * help humans trace the origin of SBML files.
429  *
430  *
431    *
432    *
433  *
434  * The XML declaration has the form
435  * @verbatim
436 <?xml version='1.0' encoding='UTF-8'?>
437 @endverbatim
438  * Note that the SBML specifications require the use of UTF-8 encoding and
439  * version 1.0, so for SBML documents, the above is the standard XML
440  * declaration.
441  *
442  *
443    *
444    * @param stream the input stream to wrap.
445    *
446    * @param encoding the XML encoding to declare in the output. This value
447    * should be <code>'UTF-8'</code> for SBML documents.  The default value
448    * is <code>'UTF-8'</code> if no value is supplied for this parameter.
449    *
450    * @param writeXMLDecl whether to write a standard XML declaration at
451    * the beginning of the content written on @p stream.  The default is
452    * @c true.
453    *
454    * @param programName an optional program name to write as a comment
455    * in the output stream.
456    *
457    * @param programVersion an optional version identification string to write
458    * as a comment in the output stream.
459    *
460    * @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif
461    */ public
XMLOutputStream(OStream stream, string encoding)462  XMLOutputStream(OStream stream, string encoding) : this(libsbmlPINVOKE.new_XMLOutputStream__SWIG_3(SWIGTYPE_p_std__ostream.getCPtr(stream.get_ostream()), encoding), true) {
463     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
464   }
465 
466 
467 /**
468    * Creates a new XMLOutputStream that wraps the given @p stream.
469    *
470    *
471  *
472  * The functionality associated with the @p programName and @p
473  * programVersion arguments concerns an optional comment that libSBML can
474  * write at the beginning of the output stream.  The comment is intended
475  * for human readers of the XML file, and has the following form:
476  * @verbatim
477 <!-- Created by <program name> version <program version>
478 on yyyy-MM-dd HH:mm with libSBML version <libsbml version>. -->
479 @endverbatim
480  *
481  * This program information comment is a separate item from the XML
482  * declaration that this method can also write to this output stream.  The
483  * comment is also not mandated by any SBML specification.  This libSBML
484  * functionality is provided for the convenience of calling programs, and to
485  * help humans trace the origin of SBML files.
486  *
487  *
488    *
489    *
490  *
491  * The XML declaration has the form
492  * @verbatim
493 <?xml version='1.0' encoding='UTF-8'?>
494 @endverbatim
495  * Note that the SBML specifications require the use of UTF-8 encoding and
496  * version 1.0, so for SBML documents, the above is the standard XML
497  * declaration.
498  *
499  *
500    *
501    * @param stream the input stream to wrap.
502    *
503    * @param encoding the XML encoding to declare in the output. This value
504    * should be <code>'UTF-8'</code> for SBML documents.  The default value
505    * is <code>'UTF-8'</code> if no value is supplied for this parameter.
506    *
507    * @param writeXMLDecl whether to write a standard XML declaration at
508    * the beginning of the content written on @p stream.  The default is
509    * @c true.
510    *
511    * @param programName an optional program name to write as a comment
512    * in the output stream.
513    *
514    * @param programVersion an optional version identification string to write
515    * as a comment in the output stream.
516    *
517    * @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif
518    */ public
XMLOutputStream(OStream stream)519  XMLOutputStream(OStream stream) : this(libsbmlPINVOKE.new_XMLOutputStream__SWIG_4(SWIGTYPE_p_std__ostream.getCPtr(stream.get_ostream())), true) {
520     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
521   }
522 
523 
524 /**
525    * Writes the given XML end element name to this XMLOutputStream.
526    *
527    * @param name the name of the element.
528    *
529    * @param prefix an optional XML namespace prefix to write in front of the
530    * @p element name.  (The result has the form
531    * <code><em>prefix</em>:<em>name</em></code>.)
532    *
533    * @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif
534    */ public
endElement(string name, string prefix)535  void endElement(string name, string prefix) {
536     libsbmlPINVOKE.XMLOutputStream_endElement__SWIG_0(swigCPtr, name, prefix);
537   }
538 
539 
540 /**
541    * Writes the given XML end element name to this XMLOutputStream.
542    *
543    * @param name the name of the element.
544    *
545    * @param prefix an optional XML namespace prefix to write in front of the
546    * @p element name.  (The result has the form
547    * <code><em>prefix</em>:<em>name</em></code>.)
548    *
549    * @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif
550    */ public
endElement(string name)551  void endElement(string name) {
552     libsbmlPINVOKE.XMLOutputStream_endElement__SWIG_1(swigCPtr, name);
553   }
554 
555 
556 /**
557    * Writes the given element to the stream.
558    *
559    * @param triple the XML element to write.
560    * @param text the text to put
561    */ public
endElement(XMLTriple triple, bool text)562  void endElement(XMLTriple triple, bool text) {
563     libsbmlPINVOKE.XMLOutputStream_endElement__SWIG_2(swigCPtr, XMLTriple.getCPtr(triple), text);
564     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
565   }
566 
567 
568 /**
569    * Writes the given element to the stream.
570    *
571    * @param triple the XML element to write.
572    * @param text the text to put
573    */ public
endElement(XMLTriple triple)574  void endElement(XMLTriple triple) {
575     libsbmlPINVOKE.XMLOutputStream_endElement__SWIG_3(swigCPtr, XMLTriple.getCPtr(triple));
576     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
577   }
578 
579 
580 /**
581    * Turns automatic indentation on or off for this XMLOutputStream.
582    *
583    * @param indent if @c true, automatic indentation is turned on.
584    */ public
setAutoIndent(bool indent)585  void setAutoIndent(bool indent) {
586     libsbmlPINVOKE.XMLOutputStream_setAutoIndent(swigCPtr, indent);
587   }
588 
589 
590 /**
591    * Writes the given XML start element name to this XMLOutputStream.
592    *
593    * @param name the name of the element.
594    *
595    * @param prefix an optional XML namespace prefix to write in front of the
596    * @p element name.  (The result has the form
597    * <code><em>prefix</em>:<em>name</em></code>.)
598    *
599    * @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif
600    */ public
startElement(string name, string prefix)601  void startElement(string name, string prefix) {
602     libsbmlPINVOKE.XMLOutputStream_startElement__SWIG_0(swigCPtr, name, prefix);
603   }
604 
605 
606 /**
607    * Writes the given XML start element name to this XMLOutputStream.
608    *
609    * @param name the name of the element.
610    *
611    * @param prefix an optional XML namespace prefix to write in front of the
612    * @p element name.  (The result has the form
613    * <code><em>prefix</em>:<em>name</em></code>.)
614    *
615    * @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif
616    */ public
startElement(string name)617  void startElement(string name) {
618     libsbmlPINVOKE.XMLOutputStream_startElement__SWIG_1(swigCPtr, name);
619   }
620 
621 
622 /**
623    * Writes the given XML start element
624    * <code><em>prefix</em>:<em>name</em></code> on this output stream.
625    *
626    * @param triple the start element to write.
627    */ public
startElement(XMLTriple triple)628  void startElement(XMLTriple triple) {
629     libsbmlPINVOKE.XMLOutputStream_startElement__SWIG_2(swigCPtr, XMLTriple.getCPtr(triple));
630     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
631   }
632 
633 
634 /**
635    * Writes the given XML start and end element name to this XMLOutputStream.
636    *
637    * @param name the name of the element.
638    *
639    * @param prefix an optional XML namespace prefix to write in front of the
640    * @p element name.  (The result has the form
641    * <code><em>prefix</em>:<em>name</em></code>.)
642    *
643    * @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif
644    */ public
startEndElement(string name, string prefix)645  void startEndElement(string name, string prefix) {
646     libsbmlPINVOKE.XMLOutputStream_startEndElement__SWIG_0(swigCPtr, name, prefix);
647   }
648 
649 
650 /**
651    * Writes the given XML start and end element name to this XMLOutputStream.
652    *
653    * @param name the name of the element.
654    *
655    * @param prefix an optional XML namespace prefix to write in front of the
656    * @p element name.  (The result has the form
657    * <code><em>prefix</em>:<em>name</em></code>.)
658    *
659    * @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif
660    */ public
startEndElement(string name)661  void startEndElement(string name) {
662     libsbmlPINVOKE.XMLOutputStream_startEndElement__SWIG_1(swigCPtr, name);
663   }
664 
665 
666 /**
667    * Writes the given start element to this output stream.
668    *
669    * @param triple the XML element to write.
670    */ public
startEndElement(XMLTriple triple)671  void startEndElement(XMLTriple triple) {
672     libsbmlPINVOKE.XMLOutputStream_startEndElement__SWIG_2(swigCPtr, XMLTriple.getCPtr(triple));
673     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
674   }
675 
676 
677 /**
678    * Writes the given attribute and value to this output stream.
679    *
680    * @param name the name of the attribute.
681    *
682    * @param value the value of the attribute.
683    */ public
writeAttribute(string name, string value)684  void writeAttribute(string name, string value) {
685     libsbmlPINVOKE.XMLOutputStream_writeAttribute__SWIG_0(swigCPtr, name, value);
686   }
687 
688 
689 /**
690    * Writes the given namespace-prefixed attribute value to this output stream.
691    *
692    * @param name the name of the attribute.
693    *
694    * @param prefix an XML namespace prefix to write in front of the
695    * @p element name.  (The result has the form
696    * <code><em>prefix</em>:<em>name</em></code>.)  See other versions of
697    * this method for a variant that does not require a prefix.
698    *
699    * @param value the value of the attribute.
700    */ public
writeAttribute(string name, string prefix, string value)701  void writeAttribute(string name, string prefix, string value) {
702     libsbmlPINVOKE.XMLOutputStream_writeAttribute__SWIG_1(swigCPtr, name, prefix, value);
703   }
704 
705 
706 /**
707    * Writes the given attribute and value to this output stream.
708    *
709    * @param triple the attribute, in the form of an XMLTriple.
710    *
711    * @param value the value of the attribute.
712    */ public
writeAttribute(XMLTriple triple, string value)713  void writeAttribute(XMLTriple triple, string value) {
714     libsbmlPINVOKE.XMLOutputStream_writeAttribute__SWIG_2(swigCPtr, XMLTriple.getCPtr(triple), value);
715     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
716   }
717 
718 
719 /**
720    * Writes the given attribute and value to this output stream.
721    *
722    * @param name the name of the attribute.
723    *
724    * @param value the value of the attribute.
725    */ public
writeAttribute(string name, bool value)726  void writeAttribute(string name, bool value) {
727     libsbmlPINVOKE.XMLOutputStream_writeAttribute__SWIG_6(swigCPtr, name, value);
728   }
729 
730 
731 /**
732    * Writes the given namespace-prefixed attribute value to this output stream.
733    *
734    * @param name the name of the attribute.
735    *
736    * @param prefix an XML namespace prefix to write in front of the
737    * @p element name.  (The result has the form
738    * <code><em>prefix</em>:<em>name</em></code>.)  See other versions of
739    * this method for a variant that does not require a prefix.
740    *
741    * @param value the value of the attribute.
742    */ public
writeAttribute(string name, string prefix, bool value)743  void writeAttribute(string name, string prefix, bool value) {
744     libsbmlPINVOKE.XMLOutputStream_writeAttribute__SWIG_7(swigCPtr, name, prefix, value);
745   }
746 
747 
748 /**
749    * Writes the given attribute and value to this output stream.
750    *
751    * @param triple the attribute, in the form of an XMLTriple.
752    *
753    * @param value the value of the attribute.
754    */ public
writeAttribute(XMLTriple triple, bool value)755  void writeAttribute(XMLTriple triple, bool value) {
756     libsbmlPINVOKE.XMLOutputStream_writeAttribute__SWIG_8(swigCPtr, XMLTriple.getCPtr(triple), value);
757     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
758   }
759 
760 
761 /**
762    * Writes the given attribute and value to this output stream.
763    *
764    * @param name the name of the attribute.
765    *
766    * @param value the value of the attribute.
767    */ public
writeAttribute(string name, double value)768  void writeAttribute(string name, double value) {
769     libsbmlPINVOKE.XMLOutputStream_writeAttribute__SWIG_9(swigCPtr, name, value);
770   }
771 
772 
773 /**
774    * Writes the given namespace-prefixed attribute value to this output stream.
775    *
776    * @param name the name of the attribute.
777    *
778    * @param prefix an XML namespace prefix to write in front of the
779    * @p element name.  (The result has the form
780    * <code><em>prefix</em>:<em>name</em></code>.)  See other versions of
781    * this method for a variant that does not require a prefix.
782    *
783    * @param value the value of the attribute.
784    */ public
writeAttribute(string name, string prefix, double value)785  void writeAttribute(string name, string prefix, double value) {
786     libsbmlPINVOKE.XMLOutputStream_writeAttribute__SWIG_10(swigCPtr, name, prefix, value);
787   }
788 
789 
790 /**
791    * Writes the given attribute and value to this output stream.
792    *
793    * @param triple the attribute, in the form of an XMLTriple.
794    *
795    * @param value the value of the attribute.
796    */ public
writeAttribute(XMLTriple triple, double value)797  void writeAttribute(XMLTriple triple, double value) {
798     libsbmlPINVOKE.XMLOutputStream_writeAttribute__SWIG_11(swigCPtr, XMLTriple.getCPtr(triple), value);
799     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
800   }
801 
802 
803 /**
804    * Writes the given attribute and value to this output stream.
805    *
806    * @param name the name of the attribute.
807    *
808    * @param value the value of the attribute.
809    */ public
writeAttribute(string name, int value)810  void writeAttribute(string name, int value) {
811     libsbmlPINVOKE.XMLOutputStream_writeAttribute__SWIG_12(swigCPtr, name, value);
812   }
813 
814 
815 /**
816    * Writes the given namespace-prefixed attribute value to this output stream.
817    *
818    * @param name the name of the attribute.
819    *
820    * @param prefix an XML namespace prefix to write in front of the
821    * @p element name.  (The result has the form
822    * <code><em>prefix</em>:<em>name</em></code>.)  See other versions of
823    * this method for a variant that does not require a prefix.
824    *
825    * @param value the value of the attribute.
826    */ public
writeAttribute(string name, string prefix, int value)827  void writeAttribute(string name, string prefix, int value) {
828     libsbmlPINVOKE.XMLOutputStream_writeAttribute__SWIG_13(swigCPtr, name, prefix, value);
829   }
830 
831 
832 /**
833    * Writes the given attribute and value to this output stream.
834    *
835    * @param triple the attribute, in the form of an XMLTriple.
836    *
837    * @param value the value of the attribute.
838    */ public
writeAttribute(XMLTriple triple, int value)839  void writeAttribute(XMLTriple triple, int value) {
840     libsbmlPINVOKE.XMLOutputStream_writeAttribute__SWIG_14(swigCPtr, XMLTriple.getCPtr(triple), value);
841     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
842   }
843 
844 
845 /**
846    * Writes the given namespace-prefixed attribute value to this output stream.
847    *
848    * @param name the name of the attribute.
849    *
850    * @param prefix an XML namespace prefix to write in front of the
851    * @p element name.  (The result has the form
852    * <code><em>prefix</em>:<em>name</em></code>.)  See other versions of
853    * this method for a variant that does not require a prefix.
854    *
855    * @param value the value of the attribute.
856    */ public
writeAttribute(string name, string prefix, long value)857  void writeAttribute(string name, string prefix, long value) {
858     libsbmlPINVOKE.XMLOutputStream_writeAttribute__SWIG_18(swigCPtr, name, prefix, value);
859   }
860 
861 
862 /**
863    * Writes a standard XML declaration to this output stream.
864    *
865    *
866  *
867  * The XML declaration has the form
868  * @verbatim
869 <?xml version='1.0' encoding='UTF-8'?>
870 @endverbatim
871  * Note that the SBML specifications require the use of UTF-8 encoding and
872  * version 1.0, so for SBML documents, the above is the standard XML
873  * declaration.
874  *
875  *
876    */ public
writeXMLDecl()877  void writeXMLDecl() {
878     libsbmlPINVOKE.XMLOutputStream_writeXMLDecl(swigCPtr);
879   }
880 
881 
882 /**
883    * Writes an XML comment with the name and version of this program.
884    *
885    * The XML comment has the following form:
886    * @verbatim
887 <!-- Created by <program name> version <program version>
888 on yyyy-MM-dd HH:mm with libSBML version <libsbml version>. -->
889 @endverbatim
890    *
891    * See the class constructor for more information about this program
892    * comment.
893    *
894    * @param programName an optional program name to write as a comment
895    * in the output stream.
896    *
897    * @param programVersion an optional version identification string to write
898    * as a comment in the output stream.
899    *
900    * @param writeTimestamp an optional flag indicating that a timestamp should
901    * be written.
902    */ public
writeComment(string programName, string programVersion, bool writeTimestamp)903  void writeComment(string programName, string programVersion, bool writeTimestamp) {
904     libsbmlPINVOKE.XMLOutputStream_writeComment__SWIG_0(swigCPtr, programName, programVersion, writeTimestamp);
905   }
906 
907 
908 /**
909    * Writes an XML comment with the name and version of this program.
910    *
911    * The XML comment has the following form:
912    * @verbatim
913 <!-- Created by <program name> version <program version>
914 on yyyy-MM-dd HH:mm with libSBML version <libsbml version>. -->
915 @endverbatim
916    *
917    * See the class constructor for more information about this program
918    * comment.
919    *
920    * @param programName an optional program name to write as a comment
921    * in the output stream.
922    *
923    * @param programVersion an optional version identification string to write
924    * as a comment in the output stream.
925    *
926    * @param writeTimestamp an optional flag indicating that a timestamp should
927    * be written.
928    */ public
writeComment(string programName, string programVersion)929  void writeComment(string programName, string programVersion) {
930     libsbmlPINVOKE.XMLOutputStream_writeComment__SWIG_1(swigCPtr, programName, programVersion);
931   }
932 
933 
934 /**
935    * Decreases the indentation level for this XMLOutputStream.
936    *
937    *
938  * LibSBML tries to produce human-readable XML output by automatically
939  * indenting the bodies of elements.  Callers can manually control
940  * indentation further by using the XMLOutputStream::upIndent()
941  * and XMLOutputStream::downIndent() methods to increase and
942  * decrease, respectively, the current level of indentation in the
943  * XML output.
944    *
945    * @see upIndent()
946    */ public
downIndent()947  void downIndent() {
948     libsbmlPINVOKE.XMLOutputStream_downIndent(swigCPtr);
949   }
950 
951 
952 /**
953    * Increases the indentation level for this XMLOutputStream.
954    *
955    *
956  * LibSBML tries to produce human-readable XML output by automatically
957  * indenting the bodies of elements.  Callers can manually control
958  * indentation further by using the XMLOutputStream::upIndent()
959  * and XMLOutputStream::downIndent() methods to increase and
960  * decrease, respectively, the current level of indentation in the
961  * XML output.
962    *
963    * @see downIndent()
964    */ public
upIndent()965  void upIndent() {
966     libsbmlPINVOKE.XMLOutputStream_upIndent(swigCPtr);
967   }
968 
969 
970 /**
971    * Returns the SBMLNamespaces object attached to this output stream.
972    *
973    * @return the SBMLNamespaces object, or @c null if none has been set.
974    */ public
getSBMLNamespaces()975  SBMLNamespaces getSBMLNamespaces() {
976 	SBMLNamespaces ret
977 	    = (SBMLNamespaces) libsbml.DowncastSBMLNamespaces(libsbmlPINVOKE.XMLOutputStream_getSBMLNamespaces(swigCPtr), false);
978 	return ret;
979 }
980 
981 
982 /**
983    * Sets the SBMLNamespaces object associated with this output stream.
984    *
985    * @param sbmlns the namespace object.
986    */ public
setSBMLNamespaces(SBMLNamespaces sbmlns)987  void setSBMLNamespaces(SBMLNamespaces sbmlns) {
988     libsbmlPINVOKE.XMLOutputStream_setSBMLNamespaces(swigCPtr, SBMLNamespaces.getCPtr(sbmlns));
989   }
990 
991 
992 /**
993    * @return a boolean, whether the output stream will write an XML
994    * comment at the top of the file. (Enabled by default.)
995    */ public
getWriteComment()996  static bool getWriteComment() {
997     bool ret = libsbmlPINVOKE.XMLOutputStream_getWriteComment();
998     return ret;
999   }
1000 
1001 
1002 /**
1003    * sets a flag, whether the output stream will write an XML
1004    * comment at the top of the file. (Enabled by default.)
1005    *
1006    * @param writeComment the flag.
1007    */ public
setWriteComment(bool writeComment)1008  static void setWriteComment(bool writeComment) {
1009     libsbmlPINVOKE.XMLOutputStream_setWriteComment(writeComment);
1010   }
1011 
1012 
1013 /**
1014    * @return a boolean, whether the output stream will write an XML
1015    * comment with a timestamp at the top of the file. (Enabled by default.)
1016    */ public
getWriteTimestamp()1017  static bool getWriteTimestamp() {
1018     bool ret = libsbmlPINVOKE.XMLOutputStream_getWriteTimestamp();
1019     return ret;
1020   }
1021 
1022 
1023 /**
1024    * sets a flag, whether the output stream will write an XML
1025    * comment with a timestamp at the top of the file. (Enabled by default.)
1026    *
1027    * @param writeTimestamp the flag.
1028    */ public
setWriteTimestamp(bool writeTimestamp)1029  static void setWriteTimestamp(bool writeTimestamp) {
1030     libsbmlPINVOKE.XMLOutputStream_setWriteTimestamp(writeTimestamp);
1031   }
1032 
1033 
1034 /**
1035    * @return the name of the library to be used in comments ('libSBML' by default).
1036    */ public
getLibraryName()1037  static string getLibraryName() {
1038     string ret = libsbmlPINVOKE.XMLOutputStream_getLibraryName();
1039     return ret;
1040   }
1041 
1042 
1043 /**
1044    * sets the name of the library writing the XML
1045 
1046    * @param libraryName the name of the library to be used in comments.
1047    */ public
setLibraryName(string libraryName)1048  static void setLibraryName(string libraryName) {
1049     libsbmlPINVOKE.XMLOutputStream_setLibraryName(libraryName);
1050   }
1051 
1052 
1053 /**
1054    * @return a string representing the version of the library writing the output.
1055    *         This is the value of getLibSBMLDottedVersion() by default.
1056    */ public
getLibraryVersion()1057  static string getLibraryVersion() {
1058     string ret = libsbmlPINVOKE.XMLOutputStream_getLibraryVersion();
1059     return ret;
1060   }
1061 
1062 
1063 /**
1064    * sets the name of the library writing the output
1065    *
1066    * @param libraryVersion the version information as string.
1067    */ public
setLibraryVersion(string libraryVersion)1068  static void setLibraryVersion(string libraryVersion) {
1069     libsbmlPINVOKE.XMLOutputStream_setLibraryVersion(libraryVersion);
1070   }
1071 
1072 
1073 /** */ /* libsbml-internal */ public
getIndent()1074  long getIndent() { return (long)libsbmlPINVOKE.XMLOutputStream_getIndent(swigCPtr); }
1075 
1076 
1077 /** */ /* libsbml-internal */ public
setIndent(long indent)1078  void setIndent(long indent) {
1079     libsbmlPINVOKE.XMLOutputStream_setIndent(swigCPtr, indent);
1080   }
1081 
1082 }
1083 
1084 }
1085