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 A token in an XML stream.
20  *
21  * @htmlinclude not-sbml-warning.html
22  *
23  * The libSBML XML parser interface can read an XML file or data stream and
24  * convert the contents into tokens.  The tokens represent items in the XML
25  * stream, either XML elements (start or end tags) or text that appears as
26  * content inside an element.  The XMLToken class is libSBML's low-level
27  * representation of these entities.
28  *
29  * Each XMLToken has the following information associated with it:
30  * <ol>
31  * <li> <em>Qualified name</em>: every XML element or XML attribute has a
32  * name (e.g., for the element <code>&lt;mytag&gt;</code>, the name is
33  * <code>'mytag'</code>), but this name may be qualified with a namespace
34  * (e.g., it may appear as <code>&lt;someNamespace:mytag&gt;</code> in the
35  * input).  An XMLToken stores the name of a token, along with any namespace
36  * qualification present, through the use of an XMLTriple object.  This
37  * object stores the bare name of the element, its XML namespace prefix (if
38  * any), and the XML namespace with which that prefix is associated.
39  * <li> @em Namespaces: An XML token can have one or more XML namespaces
40  * associated with it.  These namespaces may be specified explicitly on the
41  * element or inherited from parent elements.  In libSBML, a list of
42  * namespaces is stored in an XMLNamespaces object.  An XMLToken possesses a
43  * field for storing an XMLNamespaces object.
44  * <li> @em Attributes: XML elements can have attributes associated with
45  * them, and these attributes can have values assigned to them.  The set of
46  * attribute-value pairs is stored in an XMLAttributes object stored in an
47  * XMLToken object.  (Note: only elements can have attributes&mdash;text
48  * blocks cannot have them in XML.)
49  * <li> @em Line number: the line number in the input where the token appears.
50  * <li> @em Column number: the column number in the input where the token appears.
51  * </ol>
52  *
53  * The XMLToken class serves as base class for XMLNode.  XML lends itself to
54  * a tree-structured representation, and in libSBML, the nodes in an XML
55  * document tree are XMLNode objects.  Most higher-level libSBML classes and
56  * methods that offer XML-level functionality (such as the methods on SBase
57  * for interacting with annotations) work with XMLNode objects rather than
58  * XMLToken objects directly.
59  *
60  * @see XMLNode
61  * @see XMLTriple
62  * @see XMLAttributes
63  * @see XMLNamespaces
64  */
65 
66 public class XMLToken : global::System.IDisposable {
67 	private HandleRef swigCPtr;
68 	protected bool swigCMemOwn;
69 
XMLToken(IntPtr cPtr, bool cMemoryOwn)70 	internal XMLToken(IntPtr cPtr, bool cMemoryOwn)
71 	{
72 		swigCMemOwn = cMemoryOwn;
73 		swigCPtr    = new HandleRef(this, cPtr);
74 	}
75 
getCPtr(XMLToken obj)76 	internal static HandleRef getCPtr(XMLToken obj)
77 	{
78 		return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
79 	}
80 
getCPtrAndDisown(XMLToken obj)81 	internal static HandleRef getCPtrAndDisown (XMLToken obj)
82 	{
83 		HandleRef ptr = new HandleRef(null, IntPtr.Zero);
84 
85 		if (obj != null)
86 		{
87 			ptr             = obj.swigCPtr;
88 			obj.swigCMemOwn = false;
89 		}
90 
91 		return ptr;
92 	}
93 
~XMLToken()94   ~XMLToken() {
95     Dispose(false);
96   }
97 
Dispose()98   public void Dispose() {
99     Dispose(true);
100     global::System.GC.SuppressFinalize(this);
101   }
102 
Dispose(bool disposing)103   protected virtual void Dispose(bool disposing) {
104     lock(this) {
105       if (swigCPtr.Handle != global::System.IntPtr.Zero) {
106         if (swigCMemOwn) {
107           swigCMemOwn = false;
108           libsbmlPINVOKE.delete_XMLToken(swigCPtr);
109         }
110         swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
111       }
112     }
113   }
114 
operator ==(XMLToken lhs, XMLToken rhs)115   public static bool operator==(XMLToken lhs, XMLToken rhs)
116   {
117     if((Object)lhs == (Object)rhs)
118     {
119       return true;
120     }
121 
122     if( ((Object)lhs == null) || ((Object)rhs == null) )
123     {
124       return false;
125     }
126 
127     return (getCPtr(lhs).Handle.ToString() == getCPtr(rhs).Handle.ToString());
128   }
129 
operator !=(XMLToken lhs, XMLToken rhs)130   public static bool operator!=(XMLToken lhs, XMLToken rhs)
131   {
132     return !(lhs == rhs);
133   }
134 
Equals(Object sb)135   public override bool Equals(Object sb)
136   {
137     if ( ! (sb is XMLToken) )
138     {
139       return false;
140     }
141 
142     return this == (XMLToken)sb;
143   }
144 
GetHashCode()145   public override int GetHashCode()
146   {
147     return swigCPtr.Handle.ToInt32();
148   }
149 
150 
151 /**
152    * Creates a new empty XMLToken object.
153    */ public
XMLToken()154  XMLToken() : this(libsbmlPINVOKE.new_XMLToken__SWIG_0(), true) {
155     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
156   }
157 
158 
159 /**
160    * Creates an XML start element with attributes and namespace declarations.
161    *
162    * @param triple an XMLTriple object describing the start tag.
163    *
164    * @param attributes XMLAttributes, the attributes to set on the element to
165    * be created.
166    *
167    * @param namespaces XMLNamespaces, the namespaces to set on the element to
168    * be created.
169    *
170    * @param line a long integer, the line number to associate with the
171    * token (default = 0).
172    *
173    * @param column a long integer, the column number to associate with the
174    * token (default = 0).
175    *
176    * @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif
177    */ public
XMLToken(XMLTriple triple, XMLAttributes attributes, XMLNamespaces namespaces, long line, long column)178  XMLToken(XMLTriple triple, XMLAttributes attributes, XMLNamespaces namespaces, long line, long column) : this(libsbmlPINVOKE.new_XMLToken__SWIG_1(XMLTriple.getCPtr(triple), XMLAttributes.getCPtr(attributes), XMLNamespaces.getCPtr(namespaces), line, column), true) {
179     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
180   }
181 
182 
183 /**
184    * Creates an XML start element with attributes and namespace declarations.
185    *
186    * @param triple an XMLTriple object describing the start tag.
187    *
188    * @param attributes XMLAttributes, the attributes to set on the element to
189    * be created.
190    *
191    * @param namespaces XMLNamespaces, the namespaces to set on the element to
192    * be created.
193    *
194    * @param line a long integer, the line number to associate with the
195    * token (default = 0).
196    *
197    * @param column a long integer, the column number to associate with the
198    * token (default = 0).
199    *
200    * @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif
201    */ public
XMLToken(XMLTriple triple, XMLAttributes attributes, XMLNamespaces namespaces, long line)202  XMLToken(XMLTriple triple, XMLAttributes attributes, XMLNamespaces namespaces, long line) : this(libsbmlPINVOKE.new_XMLToken__SWIG_2(XMLTriple.getCPtr(triple), XMLAttributes.getCPtr(attributes), XMLNamespaces.getCPtr(namespaces), line), true) {
203     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
204   }
205 
206 
207 /**
208    * Creates an XML start element with attributes and namespace declarations.
209    *
210    * @param triple an XMLTriple object describing the start tag.
211    *
212    * @param attributes XMLAttributes, the attributes to set on the element to
213    * be created.
214    *
215    * @param namespaces XMLNamespaces, the namespaces to set on the element to
216    * be created.
217    *
218    * @param line a long integer, the line number to associate with the
219    * token (default = 0).
220    *
221    * @param column a long integer, the column number to associate with the
222    * token (default = 0).
223    *
224    * @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif
225    */ public
XMLToken(XMLTriple triple, XMLAttributes attributes, XMLNamespaces namespaces)226  XMLToken(XMLTriple triple, XMLAttributes attributes, XMLNamespaces namespaces) : this(libsbmlPINVOKE.new_XMLToken__SWIG_3(XMLTriple.getCPtr(triple), XMLAttributes.getCPtr(attributes), XMLNamespaces.getCPtr(namespaces)), true) {
227     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
228   }
229 
230 
231 /**
232    * Creates an XML start element with attributes.
233    *
234    * @param triple an XMLTriple object describing the start tag.
235    *
236    * @param attributes XMLAttributes, the attributes to set on the element to
237    * be created.
238    *
239    * @param line a long integer, the line number to associate with the
240    * token (default = 0).
241    *
242    * @param column a long integer, the column number to associate with the
243    * token (default = 0).
244    *
245    * The XML namespace component of this XMLToken object will be left empty.
246    * See the other variants of the XMLToken constructors for versions that
247    * take namespace arguments.
248    *
249    * @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif
250    */ public
XMLToken(XMLTriple triple, XMLAttributes attributes, long line, long column)251  XMLToken(XMLTriple triple, XMLAttributes attributes, long line, long column) : this(libsbmlPINVOKE.new_XMLToken__SWIG_4(XMLTriple.getCPtr(triple), XMLAttributes.getCPtr(attributes), line, column), true) {
252     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
253   }
254 
255 
256 /**
257    * Creates an XML start element with attributes.
258    *
259    * @param triple an XMLTriple object describing the start tag.
260    *
261    * @param attributes XMLAttributes, the attributes to set on the element to
262    * be created.
263    *
264    * @param line a long integer, the line number to associate with the
265    * token (default = 0).
266    *
267    * @param column a long integer, the column number to associate with the
268    * token (default = 0).
269    *
270    * The XML namespace component of this XMLToken object will be left empty.
271    * See the other variants of the XMLToken constructors for versions that
272    * take namespace arguments.
273    *
274    * @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif
275    */ public
XMLToken(XMLTriple triple, XMLAttributes attributes, long line)276  XMLToken(XMLTriple triple, XMLAttributes attributes, long line) : this(libsbmlPINVOKE.new_XMLToken__SWIG_5(XMLTriple.getCPtr(triple), XMLAttributes.getCPtr(attributes), line), true) {
277     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
278   }
279 
280 
281 /**
282    * Creates an XML start element with attributes.
283    *
284    * @param triple an XMLTriple object describing the start tag.
285    *
286    * @param attributes XMLAttributes, the attributes to set on the element to
287    * be created.
288    *
289    * @param line a long integer, the line number to associate with the
290    * token (default = 0).
291    *
292    * @param column a long integer, the column number to associate with the
293    * token (default = 0).
294    *
295    * The XML namespace component of this XMLToken object will be left empty.
296    * See the other variants of the XMLToken constructors for versions that
297    * take namespace arguments.
298    *
299    * @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif
300    */ public
XMLToken(XMLTriple triple, XMLAttributes attributes)301  XMLToken(XMLTriple triple, XMLAttributes attributes) : this(libsbmlPINVOKE.new_XMLToken__SWIG_6(XMLTriple.getCPtr(triple), XMLAttributes.getCPtr(attributes)), true) {
302     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
303   }
304 
305 
306 /**
307    * Creates an XML end element.
308    *
309    * @param triple an XMLTriple object describing the end tag.
310    *
311    * @param line a long integer, the line number to associate with the
312    * token (default = 0).
313    *
314    * @param column a long integer, the column number to associate with the
315    * token (default = 0).
316    *
317    * @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif
318    */ public
XMLToken(XMLTriple triple, long line, long column)319  XMLToken(XMLTriple triple, long line, long column) : this(libsbmlPINVOKE.new_XMLToken__SWIG_7(XMLTriple.getCPtr(triple), line, column), true) {
320     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
321   }
322 
323 
324 /**
325    * Creates an XML end element.
326    *
327    * @param triple an XMLTriple object describing the end tag.
328    *
329    * @param line a long integer, the line number to associate with the
330    * token (default = 0).
331    *
332    * @param column a long integer, the column number to associate with the
333    * token (default = 0).
334    *
335    * @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif
336    */ public
XMLToken(XMLTriple triple, long line)337  XMLToken(XMLTriple triple, long line) : this(libsbmlPINVOKE.new_XMLToken__SWIG_8(XMLTriple.getCPtr(triple), line), true) {
338     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
339   }
340 
341 
342 /**
343    * Creates an XML end element.
344    *
345    * @param triple an XMLTriple object describing the end tag.
346    *
347    * @param line a long integer, the line number to associate with the
348    * token (default = 0).
349    *
350    * @param column a long integer, the column number to associate with the
351    * token (default = 0).
352    *
353    * @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif
354    */ public
XMLToken(XMLTriple triple)355  XMLToken(XMLTriple triple) : this(libsbmlPINVOKE.new_XMLToken__SWIG_9(XMLTriple.getCPtr(triple)), true) {
356     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
357   }
358 
359 
360 /**
361    * Creates a text object.
362    *
363    * @param chars a string, the text to be added to the XMLToken object.
364    *
365    * @param line a long integer, the line number to associate with the
366    * token (default = 0).
367    *
368    * @param column a long integer, the column number to associate with the
369    * token (default = 0).
370    *
371    * @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif
372    */ public
XMLToken(string chars, long line, long column)373  XMLToken(string chars, long line, long column) : this(libsbmlPINVOKE.new_XMLToken__SWIG_10(chars, line, column), true) {
374     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
375   }
376 
377 
378 /**
379    * Creates a text object.
380    *
381    * @param chars a string, the text to be added to the XMLToken object.
382    *
383    * @param line a long integer, the line number to associate with the
384    * token (default = 0).
385    *
386    * @param column a long integer, the column number to associate with the
387    * token (default = 0).
388    *
389    * @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif
390    */ public
XMLToken(string chars, long line)391  XMLToken(string chars, long line) : this(libsbmlPINVOKE.new_XMLToken__SWIG_11(chars, line), true) {
392     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
393   }
394 
395 
396 /**
397    * Creates a text object.
398    *
399    * @param chars a string, the text to be added to the XMLToken object.
400    *
401    * @param line a long integer, the line number to associate with the
402    * token (default = 0).
403    *
404    * @param column a long integer, the column number to associate with the
405    * token (default = 0).
406    *
407    * @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif
408    */ public
XMLToken(string chars)409  XMLToken(string chars) : this(libsbmlPINVOKE.new_XMLToken__SWIG_12(chars), true) {
410     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
411   }
412 
413 
414 /**
415    * Copy constructor; creates a copy of this XMLToken object.
416    *
417    * @param orig the XMLToken object to copy.
418    */ public
XMLToken(XMLToken orig)419  XMLToken(XMLToken orig) : this(libsbmlPINVOKE.new_XMLToken__SWIG_13(XMLToken.getCPtr(orig)), true) {
420     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
421   }
422 
423 
424 /**
425    * Creates and returns a deep copy of this XMLToken object.
426    *
427    * @return the (deep) copy of this XMLToken object.
428    */ public
clone()429  XMLToken clone() {
430     global::System.IntPtr cPtr = libsbmlPINVOKE.XMLToken_clone(swigCPtr);
431     XMLToken ret = (cPtr == global::System.IntPtr.Zero) ? null : new XMLToken(cPtr, true);
432     return ret;
433   }
434 
435 
436 /**
437    * Returns the attributes of the XML element represented by this token.
438    *
439    * @return the attributes of this XML element, stored in an XMLAttributes
440    * object.
441    */ public
getAttributes()442  XMLAttributes getAttributes() {
443     XMLAttributes ret = new XMLAttributes(libsbmlPINVOKE.XMLToken_getAttributes(swigCPtr), false);
444     return ret;
445   }
446 
447 
448 /**
449    * Sets the attributes on the XML element represented by this token.
450    *
451    *
452  *
453  * This operation only makes sense for XML start elements.  This
454  * method will return @link libsbml#LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION@endlink if this XMLToken object is not an XML start
455  * element.
456  *
457  *
458    *
459    * @param attributes an XMLAttributes object to be assigned to this
460    * XMLToken object, thereby setting the XML attributes associated with this
461    * token.
462    *
463    *
464  * @return integer value indicating success/failure of the
465  * function.  @if clike The value is drawn from the
466  * enumeration #OperationReturnValues_t. @endif The possible values
467  * returned by this function are:
468  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
469    * @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
470    * @li @link libsbml#LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION@endlink
471    * @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
472    *
473    * @note This function replaces any existing XMLAttributes object
474    * on this XMLToken object with the one given by @p attributes.
475    */ public
setAttributes(XMLAttributes attributes)476  int setAttributes(XMLAttributes attributes) {
477     int ret = libsbmlPINVOKE.XMLToken_setAttributes(swigCPtr, XMLAttributes.getCPtr(attributes));
478     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
479     return ret;
480   }
481 
482 
483 /**
484    * Adds an attribute to the XML element represented by this token.
485    *
486    *
487  *
488  * This operation only makes sense for XML start elements.  This
489  * method will return @link libsbml#LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION@endlink if this XMLToken object is not an XML start
490  * element.
491  *
492  *
493    *
494    * @param name a string, the so-called 'local part' of the attribute name;
495    * that is, the attribute name without any namespace qualifier or prefix.
496    *
497    * @param value a string, the value assigned to the attribute.
498    *
499    * @param namespaceURI a string, the XML namespace URI of the attribute.
500    *
501    * @param prefix a string, the prefix for the XML namespace.
502    *
503    * Recall that in XML, the complete form of an attribute on an XML element
504    * is the following:
505    * <center>
506    * <code>prefix:name='value'</code>
507    * </center>
508    * The <code>name</code> part is the name of the attribute, the
509    * <code>'value'</code> part is the value assigned to the attribute (and
510    * it is always a quoted string), and the <code>prefix</code> part is
511    * an optional XML namespace prefix.  Internally in libSBML, this data
512    * is stored in an XMLAttributes object associated with this XMLToken.
513    *
514    *
515  * @return integer value indicating success/failure of the
516  * function.  @if clike The value is drawn from the
517  * enumeration #OperationReturnValues_t. @endif The possible values
518  * returned by this function are:
519  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
520    * @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
521    * @li @link libsbml#LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION@endlink
522    *
523    *
524  * @note If an attribute with the same name and XML namespace URI already
525  * exists on this XMLToken object, then the previous value will be replaced
526  * with the new value provided to this method.
527  *
528  *
529    *
530    * @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif
531    */ public
addAttr(string name, string value, string namespaceURI, string prefix)532  int addAttr(string name, string value, string namespaceURI, string prefix) {
533     int ret = libsbmlPINVOKE.XMLToken_addAttr__SWIG_0(swigCPtr, name, value, namespaceURI, prefix);
534     return ret;
535   }
536 
537 
538 /**
539    * Adds an attribute to the XML element represented by this token.
540    *
541    *
542  *
543  * This operation only makes sense for XML start elements.  This
544  * method will return @link libsbml#LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION@endlink if this XMLToken object is not an XML start
545  * element.
546  *
547  *
548    *
549    * @param name a string, the so-called 'local part' of the attribute name;
550    * that is, the attribute name without any namespace qualifier or prefix.
551    *
552    * @param value a string, the value assigned to the attribute.
553    *
554    * @param namespaceURI a string, the XML namespace URI of the attribute.
555    *
556    * @param prefix a string, the prefix for the XML namespace.
557    *
558    * Recall that in XML, the complete form of an attribute on an XML element
559    * is the following:
560    * <center>
561    * <code>prefix:name='value'</code>
562    * </center>
563    * The <code>name</code> part is the name of the attribute, the
564    * <code>'value'</code> part is the value assigned to the attribute (and
565    * it is always a quoted string), and the <code>prefix</code> part is
566    * an optional XML namespace prefix.  Internally in libSBML, this data
567    * is stored in an XMLAttributes object associated with this XMLToken.
568    *
569    *
570  * @return integer value indicating success/failure of the
571  * function.  @if clike The value is drawn from the
572  * enumeration #OperationReturnValues_t. @endif The possible values
573  * returned by this function are:
574  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
575    * @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
576    * @li @link libsbml#LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION@endlink
577    *
578    *
579  * @note If an attribute with the same name and XML namespace URI already
580  * exists on this XMLToken object, then the previous value will be replaced
581  * with the new value provided to this method.
582  *
583  *
584    *
585    * @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif
586    */ public
addAttr(string name, string value, string namespaceURI)587  int addAttr(string name, string value, string namespaceURI) {
588     int ret = libsbmlPINVOKE.XMLToken_addAttr__SWIG_1(swigCPtr, name, value, namespaceURI);
589     return ret;
590   }
591 
592 
593 /**
594    * Adds an attribute to the XML element represented by this token.
595    *
596    *
597  *
598  * This operation only makes sense for XML start elements.  This
599  * method will return @link libsbml#LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION@endlink if this XMLToken object is not an XML start
600  * element.
601  *
602  *
603    *
604    * @param name a string, the so-called 'local part' of the attribute name;
605    * that is, the attribute name without any namespace qualifier or prefix.
606    *
607    * @param value a string, the value assigned to the attribute.
608    *
609    * @param namespaceURI a string, the XML namespace URI of the attribute.
610    *
611    * @param prefix a string, the prefix for the XML namespace.
612    *
613    * Recall that in XML, the complete form of an attribute on an XML element
614    * is the following:
615    * <center>
616    * <code>prefix:name='value'</code>
617    * </center>
618    * The <code>name</code> part is the name of the attribute, the
619    * <code>'value'</code> part is the value assigned to the attribute (and
620    * it is always a quoted string), and the <code>prefix</code> part is
621    * an optional XML namespace prefix.  Internally in libSBML, this data
622    * is stored in an XMLAttributes object associated with this XMLToken.
623    *
624    *
625  * @return integer value indicating success/failure of the
626  * function.  @if clike The value is drawn from the
627  * enumeration #OperationReturnValues_t. @endif The possible values
628  * returned by this function are:
629  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
630    * @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
631    * @li @link libsbml#LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION@endlink
632    *
633    *
634  * @note If an attribute with the same name and XML namespace URI already
635  * exists on this XMLToken object, then the previous value will be replaced
636  * with the new value provided to this method.
637  *
638  *
639    *
640    * @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif
641    */ public
addAttr(string name, string value)642  int addAttr(string name, string value) {
643     int ret = libsbmlPINVOKE.XMLToken_addAttr__SWIG_2(swigCPtr, name, value);
644     return ret;
645   }
646 
647 
648 /**
649    * Adds an attribute to the XML element represented by this token.
650    *
651    *
652  *
653  * This operation only makes sense for XML start elements.  This
654  * method will return @link libsbml#LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION@endlink if this XMLToken object is not an XML start
655  * element.
656  *
657  *
658    *
659    * @param triple an XMLTriple object defining the attribute, its value,
660    * and optionally its XML namespace (if any is provided).
661    *
662    * @param value a string, the value assigned to the attribute.
663    *
664    *
665  * @return integer value indicating success/failure of the
666  * function.  @if clike The value is drawn from the
667  * enumeration #OperationReturnValues_t. @endif The possible values
668  * returned by this function are:
669  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
670    * @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
671    * @li @link libsbml#LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION@endlink
672    *
673    *
674  * @note If an attribute with the same name and XML namespace URI already
675  * exists on this XMLToken object, then the previous value will be replaced
676  * with the new value provided to this method.
677  *
678  *
679    */ public
addAttr(XMLTriple triple, string value)680  int addAttr(XMLTriple triple, string value) {
681     int ret = libsbmlPINVOKE.XMLToken_addAttr__SWIG_3(swigCPtr, XMLTriple.getCPtr(triple), value);
682     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
683     return ret;
684   }
685 
686 
687 /**
688    * Removes the <em>n</em>th attribute from the XML element represented by
689    * this token.
690    *
691    *
692  *
693  * This operation only makes sense for XML start elements.  This
694  * method will return @link libsbml#LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION@endlink if this XMLToken object is not an XML start
695  * element.
696  *
697  *
698    *
699    * @param n an integer the index of the resource to be deleted.
700    *
701    *
702  * @return integer value indicating success/failure of the
703  * function.  @if clike The value is drawn from the
704  * enumeration #OperationReturnValues_t. @endif The possible values
705  * returned by this function are:
706  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
707    * @li @link libsbml#LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION@endlink
708    * @li @link libsbml#LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE@endlink
709    *
710    * The value @link libsbml#LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE@endlink is returned if there is no attribute on this
711    * element at the given index @p n.
712    *
713    * @see getAttrIndex(XMLTriple triple)
714    * @see getAttrIndex(string name, string uri)
715    * @see getAttributesLength()
716    */ public
removeAttr(int n)717  int removeAttr(int n) {
718     int ret = libsbmlPINVOKE.XMLToken_removeAttr__SWIG_0(swigCPtr, n);
719     return ret;
720   }
721 
722 
723 /**
724    * Removes an attribute from the XML element represented by this token.
725    *
726    *
727  *
728  * This operation only makes sense for XML start elements.  This
729  * method will return @link libsbml#LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION@endlink if this XMLToken object is not an XML start
730  * element.
731  *
732  *
733    *
734    * @param name   a string, the name of the attribute to be removed.
735    * @param uri    a string, the XML namespace URI of the attribute to be removed.
736    *
737    *
738  * @return integer value indicating success/failure of the
739  * function.  @if clike The value is drawn from the
740  * enumeration #OperationReturnValues_t. @endif The possible values
741  * returned by this function are:
742  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
743    * @li @link libsbml#LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION@endlink
744    * @li @link libsbml#LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE@endlink
745    *
746    * The value @link libsbml#LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE@endlink is returned if there is no attribute on this
747    * element with the given @p name (and @p uri if specified).
748    *
749    * @see hasAttr(string name, string uri)
750    */ public
removeAttr(string name, string uri)751  int removeAttr(string name, string uri) {
752     int ret = libsbmlPINVOKE.XMLToken_removeAttr__SWIG_1(swigCPtr, name, uri);
753     return ret;
754   }
755 
756 
757 /**
758    * Removes an attribute from the XML element represented by this token.
759    *
760    *
761  *
762  * This operation only makes sense for XML start elements.  This
763  * method will return @link libsbml#LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION@endlink if this XMLToken object is not an XML start
764  * element.
765  *
766  *
767    *
768    * @param name   a string, the name of the attribute to be removed.
769    * @param uri    a string, the XML namespace URI of the attribute to be removed.
770    *
771    *
772  * @return integer value indicating success/failure of the
773  * function.  @if clike The value is drawn from the
774  * enumeration #OperationReturnValues_t. @endif The possible values
775  * returned by this function are:
776  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
777    * @li @link libsbml#LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION@endlink
778    * @li @link libsbml#LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE@endlink
779    *
780    * The value @link libsbml#LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE@endlink is returned if there is no attribute on this
781    * element with the given @p name (and @p uri if specified).
782    *
783    * @see hasAttr(string name, string uri)
784    */ public
removeAttr(string name)785  int removeAttr(string name) {
786     int ret = libsbmlPINVOKE.XMLToken_removeAttr__SWIG_2(swigCPtr, name);
787     return ret;
788   }
789 
790 
791 /**
792    * Removes an attribute from the XML element represented by this token.
793    *
794    *
795  *
796  * This operation only makes sense for XML start elements.  This
797  * method will return @link libsbml#LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION@endlink if this XMLToken object is not an XML start
798  * element.
799  *
800  *
801    *
802    * @param triple an XMLTriple describing the attribute to be removed.
803    *
804    *
805  * @return integer value indicating success/failure of the
806  * function.  @if clike The value is drawn from the
807  * enumeration #OperationReturnValues_t. @endif The possible values
808  * returned by this function are:
809  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
810    * @li @link libsbml#LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION@endlink
811    * @li @link libsbml#LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE@endlink
812    *
813    * The value @link libsbml#LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE@endlink is returned if there is no attribute on this
814    * element matching the properties of the given @p triple.
815    *
816    * @see hasAttr(XMLTriple triple)
817    */ public
removeAttr(XMLTriple triple)818  int removeAttr(XMLTriple triple) {
819     int ret = libsbmlPINVOKE.XMLToken_removeAttr__SWIG_3(swigCPtr, XMLTriple.getCPtr(triple));
820     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
821     return ret;
822   }
823 
824 
825 /**
826    * Removes all attributes of this XMLToken object.
827    *
828    *
829  *
830  * This operation only makes sense for XML start elements.  This
831  * method will return @link libsbml#LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION@endlink if this XMLToken object is not an XML start
832  * element.
833  *
834  *
835    *
836    *
837  * @return integer value indicating success/failure of the
838  * function.  @if clike The value is drawn from the
839  * enumeration #OperationReturnValues_t. @endif The possible values
840  * returned by this function are:
841  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
842    * @li @link libsbml#LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION@endlink
843    */ public
clearAttributes()844  int clearAttributes() {
845     int ret = libsbmlPINVOKE.XMLToken_clearAttributes(swigCPtr);
846     return ret;
847   }
848 
849 
850 /**
851    * Returns the index of the attribute with the given name and namespace
852    * URI.
853    *
854    * @param name a string, the name of the attribute.
855    * @param uri  a string, the namespace URI of the attribute.
856    *
857    * @return the index of an attribute with the given local name and
858    * namespace URI, or <code>-1</code> if it is not present on this token.
859    *
860    * @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif
861    */ public
getAttrIndex(string name, string uri)862  int getAttrIndex(string name, string uri) {
863     int ret = libsbmlPINVOKE.XMLToken_getAttrIndex__SWIG_0(swigCPtr, name, uri);
864     return ret;
865   }
866 
867 
868 /**
869    * Returns the index of the attribute with the given name and namespace
870    * URI.
871    *
872    * @param name a string, the name of the attribute.
873    * @param uri  a string, the namespace URI of the attribute.
874    *
875    * @return the index of an attribute with the given local name and
876    * namespace URI, or <code>-1</code> if it is not present on this token.
877    *
878    * @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif
879    */ public
getAttrIndex(string name)880  int getAttrIndex(string name) {
881     int ret = libsbmlPINVOKE.XMLToken_getAttrIndex__SWIG_1(swigCPtr, name);
882     return ret;
883   }
884 
885 
886 /**
887    * Returns the index of the attribute defined by the given XMLTriple
888    * object.
889    *
890    * @param triple the XMLTriple object that defines the attribute whose
891    * index is being sought.
892    *
893    * @return the index of an attribute with the given XMLTriple object, or
894    * <code>-1</code> if no such attribute is present on this token.
895    */ public
getAttrIndex(XMLTriple triple)896  int getAttrIndex(XMLTriple triple) {
897     int ret = libsbmlPINVOKE.XMLToken_getAttrIndex__SWIG_2(swigCPtr, XMLTriple.getCPtr(triple));
898     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
899     return ret;
900   }
901 
902 
903 /**
904    * Returns the number of attributes on this XMLToken object.
905    *
906    * @return the number of attributes possessed by this token.
907    *
908    * @see hasAttr(@if java int@endif)
909    */ public
getAttributesLength()910  int getAttributesLength() {
911     int ret = libsbmlPINVOKE.XMLToken_getAttributesLength(swigCPtr);
912     return ret;
913   }
914 
915 
916 /**
917    * Returns the name of the <em>n</em>th attribute in this token's list of
918    * attributes.
919    *
920    * @param index an integer, the position of the attribute whose name
921    * is being sought.
922    *
923    * @return the name of the attribute located at position @p n in the list
924    * of attributes possessed by this XMLToken object.
925    *
926    *
927  * @note If @p index is out of range, this method will return an empty
928  * string.  XMLToken::hasAttr(@if java int@endif) can be used to test for an
929  * attribute's existence explicitly, and XMLToken::getAttributesLength() can
930  * be used to find out the number of attributes possessed by this token.
931    *
932    * @see hasAttr(@if java int@endif)
933    * @see getAttributesLength()
934    */ public
getAttrName(int index)935  string getAttrName(int index) {
936     string ret = libsbmlPINVOKE.XMLToken_getAttrName(swigCPtr, index);
937     return ret;
938   }
939 
940 
941 /**
942    * Returns the prefix of the <em>n</em>th attribute in this token's list of
943    * attributes.
944    *
945    * @param index an integer, the position of the attribute whose prefix is
946    * being sought.
947    *
948    * @return the XML namespace prefix of the attribute located at position @p
949    * n in the list of attributes possessed by this XMLToken object.
950    *
951    *
952  * @note If @p index is out of range, this method will return an empty
953  * string.  XMLToken::hasAttr(@if java int@endif) can be used to test for an
954  * attribute's existence explicitly, and XMLToken::getAttributesLength() can
955  * be used to find out the number of attributes possessed by this token.
956    *
957    * @see hasAttr(@if java int@endif)
958    * @see getAttributesLength()
959    */ public
getAttrPrefix(int index)960  string getAttrPrefix(int index) {
961     string ret = libsbmlPINVOKE.XMLToken_getAttrPrefix(swigCPtr, index);
962     return ret;
963   }
964 
965 
966 /**
967    * Returns the prefixed name of the <em>n</em>th attribute in this token's
968    * list of attributes.
969    *
970    * In this context, <em>prefixed name</em> means the name of the attribute
971    * prefixed with the XML namespace prefix assigned to the attribute.  This
972    * will be a string of the form <code>prefix:name</code>.
973    *
974    * @param index an integer, the position of the attribute whose prefixed
975    * name is being sought.
976    *
977    * @return the prefixed name of the attribute located at position @p
978    * n in the list of attributes possessed by this XMLToken object.
979    *
980    *
981  * @note If @p index is out of range, this method will return an empty
982  * string.  XMLToken::hasAttr(@if java int@endif) can be used to test for an
983  * attribute's existence explicitly, and XMLToken::getAttributesLength() can
984  * be used to find out the number of attributes possessed by this token.
985    */ public
getAttrPrefixedName(int index)986  string getAttrPrefixedName(int index) {
987     string ret = libsbmlPINVOKE.XMLToken_getAttrPrefixedName(swigCPtr, index);
988     return ret;
989   }
990 
991 
992 /**
993    * Returns the XML namespace URI of the <em>n</em>th attribute in this
994    * token's list of attributes.
995    *
996    * @param index an integer, the position of the attribute whose namespace
997    * URI is being sought.
998    *
999    * @return the XML namespace URI of the attribute located at position @p n
1000    * in the list of attributes possessed by this XMLToken object.
1001    *
1002    *
1003  * @note If @p index is out of range, this method will return an empty
1004  * string.  XMLToken::hasAttr(@if java int@endif) can be used to test for an
1005  * attribute's existence explicitly, and XMLToken::getAttributesLength() can
1006  * be used to find out the number of attributes possessed by this token.
1007    */ public
getAttrURI(int index)1008  string getAttrURI(int index) {
1009     string ret = libsbmlPINVOKE.XMLToken_getAttrURI(swigCPtr, index);
1010     return ret;
1011   }
1012 
1013 
1014 /**
1015    * Returns the value of the <em>n</em>th attribute in this token's list of
1016    * attributes.
1017    *
1018    * @param index an integer, the position of the attribute whose value is
1019    * required.
1020    *
1021    * @return the value of the attribute located at position @p n in the list
1022    * of attributes possessed by this XMLToken object.
1023    *
1024    *
1025  * @note If @p index is out of range, this method will return an empty
1026  * string.  XMLToken::hasAttr(@if java int@endif) can be used to test for an
1027  * attribute's existence explicitly, and XMLToken::getAttributesLength() can
1028  * be used to find out the number of attributes possessed by this token.
1029    */ public
getAttrValue(int index)1030  string getAttrValue(int index) {
1031     string ret = libsbmlPINVOKE.XMLToken_getAttrValue__SWIG_0(swigCPtr, index);
1032     return ret;
1033   }
1034 
1035 
1036 /**
1037    * Returns the value of the attribute with a given name and XML namespace URI.
1038    *
1039    * @param name a string, the name of the attribute whose value is being
1040    * sought.
1041    *
1042    * @param uri a string, the XML namespace URI of the attribute.
1043    *
1044    * @return The value of the attribute, as a string.
1045    *
1046    * @note If an attribute with the given @p name and @p uri does not exist
1047    * on this token object, this method will return an empty string.
1048    * XMLToken::hasAttr(@if java String, String@endif) can be used to test
1049    * explicitly for the presence of an attribute with a given name and
1050    * namespace.
1051    *
1052    * @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif
1053    */ public
getAttrValue(string name, string uri)1054  string getAttrValue(string name, string uri) {
1055     string ret = libsbmlPINVOKE.XMLToken_getAttrValue__SWIG_1(swigCPtr, name, uri);
1056     return ret;
1057   }
1058 
1059 
1060 /**
1061    * Returns the value of the attribute with a given name and XML namespace URI.
1062    *
1063    * @param name a string, the name of the attribute whose value is being
1064    * sought.
1065    *
1066    * @param uri a string, the XML namespace URI of the attribute.
1067    *
1068    * @return The value of the attribute, as a string.
1069    *
1070    * @note If an attribute with the given @p name and @p uri does not exist
1071    * on this token object, this method will return an empty string.
1072    * XMLToken::hasAttr(@if java String, String@endif) can be used to test
1073    * explicitly for the presence of an attribute with a given name and
1074    * namespace.
1075    *
1076    * @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif
1077    */ public
getAttrValue(string name)1078  string getAttrValue(string name) {
1079     string ret = libsbmlPINVOKE.XMLToken_getAttrValue__SWIG_2(swigCPtr, name);
1080     return ret;
1081   }
1082 
1083 
1084 /**
1085    * Returns the value of the attribute specified by a given XMLTriple object.
1086    *
1087    * @param triple an XMLTriple describing the attribute whose value is being
1088    * sought.
1089    *
1090    * @return The value of the attribute, as a string.
1091    *
1092    * @note If an attribute defined by the given @p triple does not exist on
1093    * this token object, this method will return an empty string.
1094    * XMLToken::hasAttr(@if java XMLTriple@endif) can be used to test
1095    * explicitly for the existence of an attribute with the properties of
1096    * a given triple.
1097    */ public
getAttrValue(XMLTriple triple)1098  string getAttrValue(XMLTriple triple) {
1099     string ret = libsbmlPINVOKE.XMLToken_getAttrValue__SWIG_3(swigCPtr, XMLTriple.getCPtr(triple));
1100     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
1101     return ret;
1102   }
1103 
1104 
1105 /**
1106    * Returns @c true if an attribute with the given index exists.
1107    *
1108    * @param index an integer, the position of the attribute.
1109    *
1110    * @return @c true if this token object possesses an attribute with the
1111    * given index, @c false otherwise.
1112    */ public
hasAttr(int index)1113  bool hasAttr(int index) {
1114     bool ret = libsbmlPINVOKE.XMLToken_hasAttr__SWIG_0(swigCPtr, index);
1115     return ret;
1116   }
1117 
1118 
1119 /**
1120    * Returns @c true if an attribute with a given name and namespace URI
1121    * exists.
1122    *
1123    * @param name a string, the name of the attribute being sought.
1124    *
1125    * @param uri a string, the XML namespace URI of the attribute being
1126    * sought.
1127    *
1128    * @return @c true if an attribute with the given local name and namespace
1129    * URI exists in the list of attributes on this token object, @c false
1130    * otherwise.
1131    *
1132    * @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif
1133    */ public
hasAttr(string name, string uri)1134  bool hasAttr(string name, string uri) {
1135     bool ret = libsbmlPINVOKE.XMLToken_hasAttr__SWIG_1(swigCPtr, name, uri);
1136     return ret;
1137   }
1138 
1139 
1140 /**
1141    * Returns @c true if an attribute with a given name and namespace URI
1142    * exists.
1143    *
1144    * @param name a string, the name of the attribute being sought.
1145    *
1146    * @param uri a string, the XML namespace URI of the attribute being
1147    * sought.
1148    *
1149    * @return @c true if an attribute with the given local name and namespace
1150    * URI exists in the list of attributes on this token object, @c false
1151    * otherwise.
1152    *
1153    * @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif
1154    */ public
hasAttr(string name)1155  bool hasAttr(string name) {
1156     bool ret = libsbmlPINVOKE.XMLToken_hasAttr__SWIG_2(swigCPtr, name);
1157     return ret;
1158   }
1159 
1160 
1161 /**
1162    * Returns @c true if an attribute defined by a given XMLTriple object
1163    * exists.
1164    *
1165    * @param triple an XMLTriple object describing the attribute being sought.
1166    *
1167    * @return @c true if an attribute matching the properties of the given
1168    * XMLTriple object exists in the list of attributes on this token,
1169    * @c false otherwise.
1170    */ public
hasAttr(XMLTriple triple)1171  bool hasAttr(XMLTriple triple) {
1172     bool ret = libsbmlPINVOKE.XMLToken_hasAttr__SWIG_3(swigCPtr, XMLTriple.getCPtr(triple));
1173     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
1174     return ret;
1175   }
1176 
1177 
1178 /**
1179    * Returns @c true if this token has no attributes.
1180    *
1181    * @return @c true if the list of attributes on XMLToken object is empty,
1182    * @c false otherwise.
1183    */ public
isAttributesEmpty()1184  bool isAttributesEmpty() {
1185     bool ret = libsbmlPINVOKE.XMLToken_isAttributesEmpty(swigCPtr);
1186     return ret;
1187   }
1188 
1189 
1190 /**
1191    * Returns the XML namespaces declared for this token.
1192    *
1193    * @return the XML namespace declarations for this XML element.
1194    */ public
getNamespaces()1195  XMLNamespaces getNamespaces() {
1196     XMLNamespaces ret = new XMLNamespaces(libsbmlPINVOKE.XMLToken_getNamespaces(swigCPtr), false);
1197     return ret;
1198   }
1199 
1200 
1201 /**
1202    * Sets the XML namespaces on this XML element.
1203    *
1204    *
1205  *
1206  * This operation only makes sense for XML start elements.  This
1207  * method will return @link libsbml#LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION@endlink if this XMLToken object is not an XML start
1208  * element.
1209  *
1210  *
1211    *
1212    * @param namespaces the XMLNamespaces object to be assigned to this XMLToken object.
1213    *
1214    *
1215  * @return integer value indicating success/failure of the
1216  * function.  @if clike The value is drawn from the
1217  * enumeration #OperationReturnValues_t. @endif The possible values
1218  * returned by this function are:
1219  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
1220    * @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
1221    * @li @link libsbml#LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION@endlink
1222    * @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
1223    *
1224    * @note This function replaces any existing XMLNamespaces object on this
1225    * XMLToken object with the new one given by @p namespaces.
1226    */ public
setNamespaces(XMLNamespaces namespaces)1227  int setNamespaces(XMLNamespaces namespaces) {
1228     int ret = libsbmlPINVOKE.XMLToken_setNamespaces(swigCPtr, XMLNamespaces.getCPtr(namespaces));
1229     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
1230     return ret;
1231   }
1232 
1233 
1234 /**
1235    * Appends an XML namespace declaration to this token.
1236    *
1237    * The namespace added will be defined by the given XML namespace URI and
1238    * an optional prefix.  If this XMLToken object already possesses an XML
1239    * namespace declaration with the given @p prefix, then the existing XML
1240    * namespace URI will be overwritten by the new one given by @p uri.
1241    *
1242    *
1243  *
1244  * This operation only makes sense for XML start elements.  This
1245  * method will return @link libsbml#LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION@endlink if this XMLToken object is not an XML start
1246  * element.
1247  *
1248  *
1249    *
1250    * @param uri a string, the XML namespace URI for the namespace.
1251    *
1252    * @param prefix a string, the namespace prefix to use.
1253    *
1254    *
1255  * @return integer value indicating success/failure of the
1256  * function.  @if clike The value is drawn from the
1257  * enumeration #OperationReturnValues_t. @endif The possible values
1258  * returned by this function are:
1259  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
1260    * @li @link libsbml#LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION@endlink
1261    *
1262    * @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif
1263    */ public
addNamespace(string uri, string prefix)1264  int addNamespace(string uri, string prefix) {
1265     int ret = libsbmlPINVOKE.XMLToken_addNamespace__SWIG_0(swigCPtr, uri, prefix);
1266     return ret;
1267   }
1268 
1269 
1270 /**
1271    * Appends an XML namespace declaration to this token.
1272    *
1273    * The namespace added will be defined by the given XML namespace URI and
1274    * an optional prefix.  If this XMLToken object already possesses an XML
1275    * namespace declaration with the given @p prefix, then the existing XML
1276    * namespace URI will be overwritten by the new one given by @p uri.
1277    *
1278    *
1279  *
1280  * This operation only makes sense for XML start elements.  This
1281  * method will return @link libsbml#LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION@endlink if this XMLToken object is not an XML start
1282  * element.
1283  *
1284  *
1285    *
1286    * @param uri a string, the XML namespace URI for the namespace.
1287    *
1288    * @param prefix a string, the namespace prefix to use.
1289    *
1290    *
1291  * @return integer value indicating success/failure of the
1292  * function.  @if clike The value is drawn from the
1293  * enumeration #OperationReturnValues_t. @endif The possible values
1294  * returned by this function are:
1295  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
1296    * @li @link libsbml#LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION@endlink
1297    *
1298    * @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif
1299    */ public
addNamespace(string uri)1300  int addNamespace(string uri) {
1301     int ret = libsbmlPINVOKE.XMLToken_addNamespace__SWIG_1(swigCPtr, uri);
1302     return ret;
1303   }
1304 
1305 
1306 /**
1307    * Removes the <em>n</em>th XML namespace declaration.
1308    *
1309    *
1310  *
1311  * This operation only makes sense for XML start elements.  This
1312  * method will return @link libsbml#LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION@endlink if this XMLToken object is not an XML start
1313  * element.
1314  *
1315  *
1316    *
1317    * @param index an integer, the position of the namespace to be removed.
1318    * The position in this context refers to the position of the namespace in
1319    * the XMLNamespaces object stored in this XMLToken object.  Callers can
1320    * use one of the <code>getNamespace___()</code> methods to find the index
1321    * number of a given namespace.
1322    *
1323    *
1324  * @return integer value indicating success/failure of the
1325  * function.  @if clike The value is drawn from the
1326  * enumeration #OperationReturnValues_t. @endif The possible values
1327  * returned by this function are:
1328  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
1329    * @li @link libsbml#LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION@endlink
1330    * @li @link libsbml#LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE@endlink
1331    *
1332    * @see getNamespaceIndex(@if java String uri@endif)
1333    * @see getNamespaceIndexByPrefix(@if java String prefix@endif)
1334    * @see getNamespacesLength()
1335    */ public
removeNamespace(int index)1336  int removeNamespace(int index) {
1337     int ret = libsbmlPINVOKE.XMLToken_removeNamespace__SWIG_0(swigCPtr, index);
1338     return ret;
1339   }
1340 
1341 
1342 /**
1343    * Removes an XML namespace declaration having a given prefix.
1344    *
1345    *
1346  *
1347  * This operation only makes sense for XML start elements.  This
1348  * method will return @link libsbml#LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION@endlink if this XMLToken object is not an XML start
1349  * element.
1350  *
1351  *
1352    *
1353    * @param prefix a string, the prefix of the namespace to be removed.
1354    *
1355    *
1356  * @return integer value indicating success/failure of the
1357  * function.  @if clike The value is drawn from the
1358  * enumeration #OperationReturnValues_t. @endif The possible values
1359  * returned by this function are:
1360  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
1361    * @li @link libsbml#LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION@endlink
1362    * @li @link libsbml#LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE@endlink
1363    *
1364    * The value @link libsbml#LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE@endlink
1365    * is returned if there is no namespace with the given @p prefix on this
1366    * element.
1367    *
1368    * @see getNamespaceIndexByPrefix(@if java String prefix@endif)
1369    */ public
removeNamespace(string prefix)1370  int removeNamespace(string prefix) {
1371     int ret = libsbmlPINVOKE.XMLToken_removeNamespace__SWIG_1(swigCPtr, prefix);
1372     return ret;
1373   }
1374 
1375 
1376 /**
1377    * Removes all XML namespace declarations from this token.
1378    *
1379    *
1380  *
1381  * This operation only makes sense for XML start elements.  This
1382  * method will return @link libsbml#LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION@endlink if this XMLToken object is not an XML start
1383  * element.
1384  *
1385  *
1386    *
1387    *
1388  * @return integer value indicating success/failure of the
1389  * function.  @if clike The value is drawn from the
1390  * enumeration #OperationReturnValues_t. @endif The possible values
1391  * returned by this function are:
1392  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
1393    * @li @link libsbml#LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION@endlink
1394    * @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
1395    */ public
clearNamespaces()1396  int clearNamespaces() {
1397     int ret = libsbmlPINVOKE.XMLToken_clearNamespaces(swigCPtr);
1398     return ret;
1399   }
1400 
1401 
1402 /**
1403    * Returns the index of an XML namespace declaration based on its URI.
1404    *
1405    * @param uri a string, the XML namespace URI of the sought-after namespace.
1406    *
1407    * @return the index of the given declaration, or <code>-1</code> if
1408    * no such namespace URI is present on this XMLToken object.
1409    */ public
getNamespaceIndex(string uri)1410  int getNamespaceIndex(string uri) {
1411     int ret = libsbmlPINVOKE.XMLToken_getNamespaceIndex(swigCPtr, uri);
1412     return ret;
1413   }
1414 
1415 
1416 /**
1417    * Returns the index of an XML namespace declaration based on its prefix.
1418    *
1419    * @param prefix a string, the prefix of the sought-after XML namespace.
1420    *
1421    * @return the index of the given declaration, or <code>-1</code> if
1422    * no such namespace URI is present on this XMLToken object.
1423    */ public
getNamespaceIndexByPrefix(string prefix)1424  int getNamespaceIndexByPrefix(string prefix) {
1425     int ret = libsbmlPINVOKE.XMLToken_getNamespaceIndexByPrefix(swigCPtr, prefix);
1426     return ret;
1427   }
1428 
1429 
1430 /**
1431    * Returns the number of XML namespaces declared on this token.
1432    *
1433    * @return the number of XML namespaces stored in the XMLNamespaces
1434    * object of this XMLToken object.
1435    */ public
getNamespacesLength()1436  int getNamespacesLength() {
1437     int ret = libsbmlPINVOKE.XMLToken_getNamespacesLength(swigCPtr);
1438     return ret;
1439   }
1440 
1441 
1442 /**
1443    * Returns the prefix of the <em>n</em>th XML namespace declaration.
1444    *
1445    * @param index an integer, position of the required prefix.
1446    *
1447    * @return the prefix of an XML namespace declaration in the XMLNamespaces
1448    * (by position).
1449    *
1450    * @note If @p index is out of range, this method will return an empty
1451    * string.  XMLToken::getNamespacesLength() can be used to find out how
1452    * many namespaces are defined on this XMLToken object.
1453    *
1454    * @see getNamespacesLength()
1455    */ public
getNamespacePrefix(int index)1456  string getNamespacePrefix(int index) {
1457     string ret = libsbmlPINVOKE.XMLToken_getNamespacePrefix__SWIG_0(swigCPtr, index);
1458     return ret;
1459   }
1460 
1461 
1462 /**
1463    * Returns the prefix associated with a given XML namespace URI on this
1464    * token.
1465    *
1466    * @param uri a string, the URI of the namespace whose prefix is being
1467    * sought.
1468    *
1469    * @return the prefix of an XML namespace declaration on this XMLToken object.
1470    *
1471    * @note If there is no XML namespace with the given @p uri declared on
1472    * this XMLToken object, this method will return an empty string.
1473    */ public
getNamespacePrefix(string uri)1474  string getNamespacePrefix(string uri) {
1475     string ret = libsbmlPINVOKE.XMLToken_getNamespacePrefix__SWIG_1(swigCPtr, uri);
1476     return ret;
1477   }
1478 
1479 
1480 /**
1481    * Returns the URI of the <em>n</em>th XML namespace declared on this token.
1482    *
1483    * @param index an integer, the position of the sought-after XML namespace URI.
1484    *
1485    * @return the URI of the <em>n</em>th XML namespace stored in the
1486    * XMLNamespaces object in this XMLToken object.
1487    *
1488    * @note If @p index is out of range, this method will return an empty string.
1489    *
1490    * @see getNamespacesLength()
1491    */ public
getNamespaceURI(int index)1492  string getNamespaceURI(int index) {
1493     string ret = libsbmlPINVOKE.XMLToken_getNamespaceURI__SWIG_0(swigCPtr, index);
1494     return ret;
1495   }
1496 
1497 
1498 /**
1499    * Returns the URI of an XML namespace with a given prefix.
1500    *
1501    * @param prefix a string, the prefix of the sought-after XML namespace URI.
1502    *
1503    * @return the URI of an XML namespace declaration given its prefix.
1504    *
1505    * @note If there is no XML namespace with the given @p prefix stored in
1506    * the XMLNamespaces object of this XMLToken object, this method will
1507    * return an empty string.
1508    *
1509    * @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif
1510    */ public
getNamespaceURI(string prefix)1511  string getNamespaceURI(string prefix) {
1512     string ret = libsbmlPINVOKE.XMLToken_getNamespaceURI__SWIG_1(swigCPtr, prefix);
1513     return ret;
1514   }
1515 
1516 
1517 /**
1518    * Returns the URI of an XML namespace with a given prefix.
1519    *
1520    * @param prefix a string, the prefix of the sought-after XML namespace URI.
1521    *
1522    * @return the URI of an XML namespace declaration given its prefix.
1523    *
1524    * @note If there is no XML namespace with the given @p prefix stored in
1525    * the XMLNamespaces object of this XMLToken object, this method will
1526    * return an empty string.
1527    *
1528    * @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif
1529    */ public
getNamespaceURI()1530  string getNamespaceURI() {
1531     string ret = libsbmlPINVOKE.XMLToken_getNamespaceURI__SWIG_2(swigCPtr);
1532     return ret;
1533   }
1534 
1535 
1536 /**
1537    * Returns @c true if there are no namespaces declared on this token.
1538    *
1539    * @return @c true if the XMLNamespaces object stored in this XMLToken
1540    * token is empty, @c false otherwise.
1541    */ public
isNamespacesEmpty()1542  bool isNamespacesEmpty() {
1543     bool ret = libsbmlPINVOKE.XMLToken_isNamespacesEmpty(swigCPtr);
1544     return ret;
1545   }
1546 
1547 
1548 /**
1549    * Returns @c true if this token has an XML namespace with a given URI.
1550    *
1551    * @param uri a string, the URI of the XML namespace.
1552    *
1553    * @return @c true if an XML namespace with the given URI is contained in
1554    * the XMLNamespaces object of this XMLToken object, @c false otherwise.
1555    */ public
hasNamespaceURI(string uri)1556  bool hasNamespaceURI(string uri) {
1557     bool ret = libsbmlPINVOKE.XMLToken_hasNamespaceURI(swigCPtr, uri);
1558     return ret;
1559   }
1560 
1561 
1562 /**
1563    * Returns @c true if this token has an XML namespace with a given prefix.
1564    *
1565    * @param prefix a string, the prefix for the XML namespace.
1566    *
1567    * @return @c true if an XML Namespace with the given URI is contained in the
1568    * XMLNamespaces of this XMLToken, @c false otherwise.
1569    */ public
hasNamespacePrefix(string prefix)1570  bool hasNamespacePrefix(string prefix) {
1571     bool ret = libsbmlPINVOKE.XMLToken_hasNamespacePrefix(swigCPtr, prefix);
1572     return ret;
1573   }
1574 
1575 
1576 /**
1577    * Returns @c true if this token has an XML namespace with a given prefix
1578    * and URI combination.
1579    *
1580    * @param uri a string, the URI for the namespace.
1581    * @param prefix a string, the prefix for the namespace.
1582    *
1583    * @return @c true if an XML namespace with the given URI/prefix pair is
1584    * contained in the XMLNamespaces object of this XMLToken object, @c false
1585    * otherwise.
1586    */ public
hasNamespaceNS(string uri, string prefix)1587  bool hasNamespaceNS(string uri, string prefix) {
1588     bool ret = libsbmlPINVOKE.XMLToken_hasNamespaceNS(swigCPtr, uri, prefix);
1589     return ret;
1590   }
1591 
1592 
1593 /**
1594    * Sets the name, namespace prefix and namespace URI of this token.
1595    *
1596    *
1597  *
1598  * This operation only makes sense for XML start elements.  This
1599  * method will return @link libsbml#LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION@endlink if this XMLToken object is not an XML start
1600  * element.
1601  *
1602  *
1603    *
1604    * @param triple the new XMLTriple to use for this XMLToken object.  If
1605    * this XMLToken already had an XMLTriple object stored within it, that
1606    * object will be replaced.
1607    *
1608    *
1609  * @return integer value indicating success/failure of the
1610  * function.  @if clike The value is drawn from the
1611  * enumeration #OperationReturnValues_t. @endif The possible values
1612  * returned by this function are:
1613  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
1614    * @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
1615    * @li @link libsbml#LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION@endlink
1616    * @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
1617    */ public
setTriple(XMLTriple triple)1618  int setTriple(XMLTriple triple) {
1619     int ret = libsbmlPINVOKE.XMLToken_setTriple(swigCPtr, XMLTriple.getCPtr(triple));
1620     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
1621     return ret;
1622   }
1623 
1624 
1625 /**
1626    * Returns the (unqualified) name of token.
1627    *
1628    * @return the (unqualified) name of token.
1629    */ public
getName()1630  string getName() {
1631     string ret = libsbmlPINVOKE.XMLToken_getName(swigCPtr);
1632     return ret;
1633   }
1634 
1635 
1636 /**
1637    * Returns the XML namespace prefix of token.
1638    *
1639    * @return the XML namespace prefix of token.
1640    *
1641    * @note If no XML namespace prefix has been assigned to this token, this
1642    * method will return an empty string.
1643    */ public
getPrefix()1644  string getPrefix() {
1645     string ret = libsbmlPINVOKE.XMLToken_getPrefix(swigCPtr);
1646     return ret;
1647   }
1648 
1649 
1650 /**
1651    * Returns the XML namespace URI of token.
1652    *
1653    * @return the XML namespace URI of token.
1654    */ public
getURI()1655  string getURI() {
1656     string ret = libsbmlPINVOKE.XMLToken_getURI(swigCPtr);
1657     return ret;
1658   }
1659 
1660 
1661 /**
1662    * Returns the character text of token.
1663    *
1664    * @return the characters of this XML token.  If this token is not a
1665    * text token (i.e., it's an XML element and not character content),
1666    * then this will return an empty string.
1667    *
1668    * @see isText()
1669    * @see isElement()
1670    */ public
getCharacters()1671  string getCharacters() {
1672     string ret = libsbmlPINVOKE.XMLToken_getCharacters(swigCPtr);
1673     return ret;
1674   }
1675 
1676 
1677 /**
1678   * Sets the characters for this XMLToken
1679   *
1680   * This method only makes sense for XMLToken objects that contains text.
1681   * If this method is called on a token that represents an XML start or end
1682   * tag, it will return the code @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink.
1683   *
1684   * @param chars string, characters to append to the text of this token.
1685   *
1686   *
1687  * @return integer value indicating success/failure of the
1688  * function.  @if clike The value is drawn from the
1689  * enumeration #OperationReturnValues_t. @endif The possible values
1690  * returned by this function are:
1691  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
1692   * @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
1693   *
1694   * @see isText()
1695   * @see isElement()
1696   */ public
setCharacters(string chars)1697  int setCharacters(string chars) {
1698     int ret = libsbmlPINVOKE.XMLToken_setCharacters(swigCPtr, chars);
1699     return ret;
1700   }
1701 
1702 
1703 /**
1704    * Appends characters to the text content of token.
1705    *
1706    * This method only makes sense for XMLToken objects that contains text.
1707    * If this method is called on a token that represents an XML start or end
1708    * tag, it will return the code @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink.
1709    *
1710    * @param chars string, characters to append to the text of this token.
1711    *
1712    *
1713  * @return integer value indicating success/failure of the
1714  * function.  @if clike The value is drawn from the
1715  * enumeration #OperationReturnValues_t. @endif The possible values
1716  * returned by this function are:
1717  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
1718    * @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
1719    *
1720    * @see isText()
1721    * @see isElement()
1722    */ public
append(string chars)1723  int append(string chars) {
1724     int ret = libsbmlPINVOKE.XMLToken_append(swigCPtr, chars);
1725     return ret;
1726   }
1727 
1728 
1729 /**
1730    * Returns the column number at which this token occurs in the input.
1731    *
1732    * @return the column at which this XMLToken occurred.
1733    */ public
getColumn()1734  long getColumn() { return (long)libsbmlPINVOKE.XMLToken_getColumn(swigCPtr); }
1735 
1736 
1737 /**
1738    * Returns the line number at which this token occurs in the input.
1739    *
1740    * @return the line at which this XMLToken occurred.
1741    */ public
getLine()1742  long getLine() { return (long)libsbmlPINVOKE.XMLToken_getLine(swigCPtr); }
1743 
1744 
1745 /**
1746    * Returns @c true if this token represents an XML element.
1747    *
1748    * This generic predicate returns @c true if the element is either a start
1749    * or end tag, and @c false if it's a text object.  The related methods
1750    * XMLToken:isStart(), XMLToken::isEnd() and XMLToken::isText() are more
1751    * specific predicates.
1752    *
1753    * @return @c true if this XMLToken object represents an XML element,
1754    * @c false otherwise.
1755    *
1756    * @see isStart()
1757    * @see isEnd()
1758    * @see isText()
1759    */ public
isElement()1760  bool isElement() {
1761     bool ret = libsbmlPINVOKE.XMLToken_isElement(swigCPtr);
1762     return ret;
1763   }
1764 
1765 
1766 /**
1767    * Returns @c true if this token represents an XML end element.
1768    *
1769    * @return @c true if this XMLToken object represents an XML end element,
1770    * @c false otherwise.
1771    *
1772    * @see isStart()
1773    * @see isElement()
1774    * @see isText()
1775    */ public
isEnd()1776  bool isEnd() {
1777     bool ret = libsbmlPINVOKE.XMLToken_isEnd(swigCPtr);
1778     return ret;
1779   }
1780 
1781 
1782 /**
1783    * Returns @c true if this token represents an XML end element for a
1784    * particular start element.
1785    *
1786    * @param element XMLToken, the element with which the current object
1787    * should be compared to determined whether the current object is a
1788    * start element for the given one.
1789    *
1790    * @return @c true if this XMLToken object represents an XML end tag for
1791    * the start tag given by @p element, @c false otherwise.
1792    *
1793    * @see isElement()
1794    * @see isStart()
1795    * @see isEnd()
1796    * @see isText()
1797    */ public
isEndFor(XMLToken element)1798  bool isEndFor(XMLToken element) {
1799     bool ret = libsbmlPINVOKE.XMLToken_isEndFor(swigCPtr, XMLToken.getCPtr(element));
1800     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
1801     return ret;
1802   }
1803 
1804 
1805 /**
1806    * Returns @c true if this token is an end of file marker.
1807    *
1808    * @return @c true if this XMLToken object represents the end of the input,
1809    * @c false otherwise.
1810    *
1811    * @see setEOF()
1812    */ public
isEOF()1813  bool isEOF() {
1814     bool ret = libsbmlPINVOKE.XMLToken_isEOF(swigCPtr);
1815     return ret;
1816   }
1817 
1818 
1819 /**
1820    * Returns @c true if this token represents an XML start element.
1821    *
1822    * @return @c true if this XMLToken is an XML start element, @c false otherwise.
1823    *
1824    * @see isElement()
1825    * @see isEnd()
1826    * @see isText()
1827    */ public
isStart()1828  bool isStart() {
1829     bool ret = libsbmlPINVOKE.XMLToken_isStart(swigCPtr);
1830     return ret;
1831   }
1832 
1833 
1834 /**
1835    * Returns @c true if this token represents an XML text element.
1836    *
1837    * @return @c true if this XMLToken is an XML text element, @c false otherwise.
1838    *
1839    * @see isElement()
1840    * @see isStart()
1841    * @see isEnd()
1842    */ public
isText()1843  bool isText() {
1844     bool ret = libsbmlPINVOKE.XMLToken_isText(swigCPtr);
1845     return ret;
1846   }
1847 
1848 
1849 /**
1850    * Declares that this token represents an XML element end tag.
1851    *
1852    *
1853  * @return integer value indicating success/failure of the
1854  * function.  @if clike The value is drawn from the
1855  * enumeration #OperationReturnValues_t. @endif The possible values
1856  * returned by this function are:
1857  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
1858    * @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
1859    *
1860    * @see isStart()
1861    * @see isEnd()
1862    */ public
setEnd()1863  int setEnd() {
1864     int ret = libsbmlPINVOKE.XMLToken_setEnd(swigCPtr);
1865     return ret;
1866   }
1867 
1868 
1869 /**
1870    * Declares that this token is an end-of-file/input marker.
1871    *
1872    *
1873  * @return integer value indicating success/failure of the
1874  * function.  @if clike The value is drawn from the
1875  * enumeration #OperationReturnValues_t. @endif The possible values
1876  * returned by this function are:
1877  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
1878    * @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
1879    *
1880    * @see isEOF()
1881    */ public
setEOF()1882  int setEOF() {
1883     int ret = libsbmlPINVOKE.XMLToken_setEOF(swigCPtr);
1884     return ret;
1885   }
1886 
1887 
1888 /**
1889    * Declares that this token no longer represents an XML start/end element.
1890    *
1891    *
1892  * @return integer value indicating success/failure of the
1893  * function.  @if clike The value is drawn from the
1894  * enumeration #OperationReturnValues_t. @endif The possible values
1895  * returned by this function are:
1896  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
1897    * @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
1898    */ public
unsetEnd()1899  int unsetEnd() {
1900     int ret = libsbmlPINVOKE.XMLToken_unsetEnd(swigCPtr);
1901     return ret;
1902   }
1903 
1904 
1905 /**
1906    * Prints a string representation of the underlying token stream.
1907    *
1908    * This method is intended for debugging purposes.
1909    *
1910    * @return a text string representing this XMLToken object.
1911    */ public
toString()1912  string toString() {
1913     string ret = libsbmlPINVOKE.XMLToken_toString(swigCPtr);
1914     return ret;
1915   }
1916 
1917 }
1918 
1919 }
1920