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 <em>species type</em> in SBML Level 2.
20  *
21  * The term @em species @em type refers to reacting entities independent of
22  * location.  These include simple ions (e.g., protons, calcium), simple
23  * molecules (e.g., glucose, ATP), large molecules (e.g., RNA,
24  * polysaccharides, and proteins), and others.
25  *
26  * SBML Level&nbsp;2 Versions&nbsp;2&ndash;4 provide an explicit
27  * SpeciesType class of object to enable Species objects of the same type
28  * to be related together.  SpeciesType is a conceptual construct; the
29  * existence of SpeciesType objects in a model has no effect on the model's
30  * numerical interpretation.  Except for the requirement for uniqueness of
31  * species/species type combinations located in compartments, simulators
32  * and other numerical analysis software may ignore SpeciesType definitions
33  * and references to them in a model.
34  *
35  * There is no mechanism in SBML Level 2 for representing hierarchies of
36  * species types.  One SpeciesType object cannot be the subtype of another
37  * SpeciesType object; SBML provides no means of defining such
38  * relationships.
39  *
40  * As with other major structures in SBML, SpeciesType has a mandatory
41  * attribute, 'id', used to give the species type an identifier.  The
42  * identifier must be a text string conforming to the identifer syntax
43  * permitted in SBML.  SpeciesType also has an optional 'name' attribute,
44  * of type @c string.  The 'id' and 'name' must be used according to the
45  * guidelines described in the SBML specification (e.g., Section 3.3 in
46  * the Level&nbsp;2 Version&nbsp;4 specification).
47  *
48  * SpeciesType was introduced in SBML Level 2 Version 2.  It is not
49  * available in SBML Level&nbsp;1 nor in Level&nbsp;3.
50  *
51  * @see Species
52  * @see ListOfSpeciesTypes
53  * @see CompartmentType
54  * @see ListOfCompartmentTypes
55  *
56  *
57  */
58 
59 public class SpeciesType : SBase {
60 	private HandleRef swigCPtr;
61 
SpeciesType(IntPtr cPtr, bool cMemoryOwn)62 	internal SpeciesType(IntPtr cPtr, bool cMemoryOwn) : base(libsbmlPINVOKE.SpeciesType_SWIGUpcast(cPtr), cMemoryOwn)
63 	{
64 		//super(libsbmlPINVOKE.SpeciesTypeUpcast(cPtr), cMemoryOwn);
65 		swigCPtr = new HandleRef(this, cPtr);
66 	}
67 
getCPtr(SpeciesType obj)68 	internal static HandleRef getCPtr(SpeciesType obj)
69 	{
70 		return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
71 	}
72 
getCPtrAndDisown(SpeciesType obj)73 	internal static HandleRef getCPtrAndDisown (SpeciesType obj)
74 	{
75 		HandleRef ptr = new HandleRef(null, IntPtr.Zero);
76 
77 		if (obj != null)
78 		{
79 			ptr             = obj.swigCPtr;
80 			obj.swigCMemOwn = false;
81 		}
82 
83 		return ptr;
84 	}
85 
Dispose(bool disposing)86   protected override void Dispose(bool disposing) {
87     lock(this) {
88       if (swigCPtr.Handle != global::System.IntPtr.Zero) {
89         if (swigCMemOwn) {
90           swigCMemOwn = false;
91           libsbmlPINVOKE.delete_SpeciesType(swigCPtr);
92         }
93         swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
94       }
95       base.Dispose(disposing);
96     }
97   }
98 
99 
100 /**
101    * Creates a new SpeciesType using the given SBML @p level and @p version
102    * values.
103    *
104    * @param level a long integer, the SBML Level to assign to this SpeciesType.
105    *
106    * @param version a long integer, the SBML Version to assign to this
107    * SpeciesType.
108    *
109    *
110  * @throws SBMLConstructorException
111  * Thrown if the given @p level and @p version combination are invalid
112  * or if this object is incompatible with the given level and version.
113  *
114  *
115    *
116    *
117  * @note Attempting to add an object to an SBMLDocument having a different
118  * combination of SBML Level, Version and XML namespaces than the object
119  * itself will result in an error at the time a caller attempts to make the
120  * addition.  A parent object must have compatible Level, Version and XML
121  * namespaces.  (Strictly speaking, a parent may also have more XML
122  * namespaces than a child, but the reverse is not permitted.)  The
123  * restriction is necessary to ensure that an SBML model has a consistent
124  * overall structure.  This requires callers to manage their objects
125  * carefully, but the benefit is increased flexibility in how models can be
126  * created by permitting callers to create objects bottom-up if desired.  In
127  * situations where objects are not yet attached to parents (e.g.,
128  * SBMLDocument), knowledge of the intented SBML Level and Version help
129  * libSBML determine such things as whether it is valid to assign a
130  * particular value to an attribute.
131  *
132  *
133    */ public
SpeciesType(long level, long version)134  SpeciesType(long level, long version) : this(libsbmlPINVOKE.new_SpeciesType__SWIG_0(level, version), true) {
135     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
136   }
137 
138 
139 /**
140    * Creates a new SpeciesType using the given SBMLNamespaces object
141    * @p sbmlns.
142    *
143    *
144  *
145  * The SBMLNamespaces object encapsulates SBML Level/Version/namespaces
146  * information.  It is used to communicate the SBML Level, Version, and (in
147  * Level&nbsp;3) packages used in addition to SBML Level&nbsp;3 Core.  A
148  * common approach to using libSBML's SBMLNamespaces facilities is to create an
149  * SBMLNamespaces object somewhere in a program once, then hand that object
150  * as needed to object constructors that accept SBMLNamespaces as arguments.
151  *
152  *
153    *
154    * It is worth emphasizing that although this constructor does not take
155    * an identifier argument, in SBML Level&nbsp;2 and beyond, the 'id'
156    * (identifier) attribute of a SpeciesType object is required to have a value.
157    * Thus, callers are cautioned to assign a value after calling this
158    * constructor.  Setting the identifier can be accomplished using the
159    * method SBase::setId(@if java String@endif).
160    *
161    * @param sbmlns an SBMLNamespaces object.
162    *
163    *
164  * @throws SBMLConstructorException
165  * Thrown if the given @p sbmlns is inconsistent or incompatible
166  * with this object.
167  *
168  *
169    *
170    *
171  * @note Attempting to add an object to an SBMLDocument having a different
172  * combination of SBML Level, Version and XML namespaces than the object
173  * itself will result in an error at the time a caller attempts to make the
174  * addition.  A parent object must have compatible Level, Version and XML
175  * namespaces.  (Strictly speaking, a parent may also have more XML
176  * namespaces than a child, but the reverse is not permitted.)  The
177  * restriction is necessary to ensure that an SBML model has a consistent
178  * overall structure.  This requires callers to manage their objects
179  * carefully, but the benefit is increased flexibility in how models can be
180  * created by permitting callers to create objects bottom-up if desired.  In
181  * situations where objects are not yet attached to parents (e.g.,
182  * SBMLDocument), knowledge of the intented SBML Level and Version help
183  * libSBML determine such things as whether it is valid to assign a
184  * particular value to an attribute.
185  *
186  *
187    */ public
SpeciesType(SBMLNamespaces sbmlns)188  SpeciesType(SBMLNamespaces sbmlns) : this(libsbmlPINVOKE.new_SpeciesType__SWIG_1(SBMLNamespaces.getCPtr(sbmlns)), true) {
189     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
190   }
191 
192 
193 /**
194    * Copy constructor; creates a copy of this SpeciesType.
195    *
196    * @param orig the object to copy.
197    */ public
SpeciesType(SpeciesType orig)198  SpeciesType(SpeciesType orig) : this(libsbmlPINVOKE.new_SpeciesType__SWIG_2(SpeciesType.getCPtr(orig)), true) {
199     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
200   }
201 
202 
203 /**
204    * Creates and returns a deep copy of this SpeciesType object.
205    *
206    * @return the (deep) copy of this SpeciesType object.
207    */ public new
clone()208  SpeciesType clone() {
209     global::System.IntPtr cPtr = libsbmlPINVOKE.SpeciesType_clone(swigCPtr);
210     SpeciesType ret = (cPtr == global::System.IntPtr.Zero) ? null : new SpeciesType(cPtr, true);
211     return ret;
212   }
213 
214 
215 /**
216    * Returns the value of the 'id' attribute of this SpeciesType.
217    *
218    * @note Because of the inconsistent behavior of this function with
219    * respect to assignments and rules, it is now recommended to
220    * use the getIdAttribute() function instead.
221    *
222    *
223  *
224  * The identifier given by an object's 'id' attribute value
225  * is used to identify the object within the SBML model definition.
226  * Other objects can refer to the component using this identifier.  The
227  * data type of 'id' is always <code>SId</code> or a type derived
228  * from that, such as <code>UnitSId</code>, depending on the object in
229  * question.  All data types are defined as follows:
230  * <pre style='margin-left: 2em; border: none; font-weight: bold; color: black'>
231  *   letter ::= 'a'..'z','A'..'Z'
232  *   digit  ::= '0'..'9'
233  *   idChar ::= letter | digit | '_'
234  *   SId    ::= ( letter | '_' ) idChar*
235  * </pre>
236  * The characters <code>(</code> and <code>)</code> are used for grouping,
237  * the character <code>*</code> 'zero or more times', and the character
238  * <code>|</code> indicates logical 'or'.  The equality of SBML identifiers
239  * is determined by an exact character sequence match; i.e., comparisons must
240  * be performed in a case-sensitive manner.  This applies to all uses of
241  * <code>SId</code>, <code>SIdRef</code>, and derived types.
242  *
243  * Users need to be aware of some important API issues that are the result of
244  * the history of SBML and libSBML.  Prior to SBML Level&nbsp;3
245  * Version&nbsp;2, SBML defined 'id' and 'name' attributes on only a subset
246  * of SBML objects.  To simplify the work of programmers, libSBML's API
247  * provided get, set, check, and unset on the SBase object class itself
248  * instead of on individual subobject classes. This made the
249  * get/set/etc. methods uniformly available on all objects in the libSBML
250  * API.  LibSBML simply returned empty strings or otherwise did not act when
251  * the methods were applied to SBML objects that were not defined by the SBML
252  * specification to have 'id' or 'name' attributes.  Additional complications
253  * arose with the rule and assignment objects: InitialAssignment,
254  * EventAssignment, AssignmentRule, and RateRule.  In early versions of SBML,
255  * the rule object hierarchy was different, and in addition, then as now,
256  * they possess different attributes: 'variable' (for the rules and event
257  * assignments), 'symbol' (for initial assignments), or neither (for
258  * algebraic rules).  Prior to SBML Level&nbsp;3 Version&nbsp;2, getId()
259  * would always return an empty string, and isSetId() would always return @c
260  * false for objects of these classes.
261  *
262  * With the addition of 'id' and 'name' attributes on SBase in Level&nbsp;3
263  * Version&nbsp;2, it became necessary to introduce a new way to interact
264  * with the attributes more consistently in libSBML to avoid breaking
265  * backward compatibility in the behavior of the original 'id' methods.  For
266  * this reason, libSBML provides four functions (getIdAttribute(),
267  * setIdAttribute(@if java String@endif), isSetIdAttribute(), and
268  * unsetIdAttribute()) that always act on the actual 'id' attribute inherited
269  * from SBase, regardless of the object's type.  <strong>These new methods
270  * should be used instead of the older getId()/setId()/etc. methods</strong>
271  * unless the old behavior is somehow necessary.  Regardless of the Level and
272  * Version of the SBML, these functions allow client applications to use more
273  * generalized code in some situations (for instance, when manipulating
274  * objects that are all known to have identifiers).  If the object in
275  * question does not posess an 'id' attribute according to the SBML
276  * specification for the Level and Version in use, libSBML will not allow the
277  * identifier to be set, nor will it read or write 'id' attributes for those
278  * objects.
279  *
280  *
281    *
282    * @return the id of this SpeciesType.
283    *
284    * @see getIdAttribute()
285    * @see setIdAttribute(string sid)
286    * @see isSetIdAttribute()
287    * @see unsetIdAttribute()
288    */ public new
getId()289  string getId() {
290     string ret = libsbmlPINVOKE.SpeciesType_getId(swigCPtr);
291     return ret;
292   }
293 
294 
295 /**
296    * Returns the value of the 'name' attribute of this SpeciesType object.
297    *
298    *
299  *
300  *
301  * In SBML Level&nbsp;3 Version&nbsp;2, the 'id' and 'name' attributes were
302  * moved to SBase directly, instead of being defined individually for many
303  * (but not all) objects.  LibSBML has for a long time provided functions
304  * defined on SBase itself to get, set, and unset those attributes, which
305  * would fail or otherwise return empty strings if executed on any object
306  * for which those attributes were not defined.  Now that all SBase objects
307  * define those attributes, those functions now succeed for any object with
308  * the appropriate level and version.
309  *
310  * The 'name' attribute is
311  * optional and is not intended to be used for cross-referencing purposes
312  * within a model.  Its purpose instead is to provide a human-readable
313  * label for the component.  The data type of 'name' is the type
314  * <code>string</code> defined in XML Schema.  SBML imposes no
315  * restrictions as to the content of 'name' attributes beyond those
316  * restrictions defined by the <code>string</code> type in XML Schema.
317  *
318  * The recommended practice for handling 'name' is as follows.  If a
319  * software tool has the capability for displaying the content of 'name'
320  * attributes, it should display this content to the user as a
321  * component's label instead of the component's 'id'.  If the user
322  * interface does not have this capability (e.g., because it cannot
323  * display or use special characters in symbol names), or if the 'name'
324  * attribute is missing on a given component, then the user interface
325  * should display the value of the 'id' attribute instead.  (Script
326  * language interpreters are especially likely to display 'id' instead of
327  * 'name'.)
328  *
329  * As a consequence of the above, authors of systems that automatically
330  * generate the values of 'id' attributes should be aware some systems
331  * may display the 'id''s to the user.  Authors therefore may wish to
332  * take some care to have their software create 'id' values that are: (a)
333  * reasonably easy for humans to type and read; and (b) likely to be
334  * meaningful, for example by making the 'id' attribute be an abbreviated
335  * form of the name attribute value.
336  *
337  * An additional point worth mentioning is although there are
338  * restrictions on the uniqueness of 'id' values, there are no
339  * restrictions on the uniqueness of 'name' values in a model.  This
340  * allows software applications leeway in assigning component identifiers.
341  *
342  * Regardless of the level and version of the SBML, these functions allow
343  * client applications to use more generalized code in some situations
344  * (for instance, when manipulating objects that are all known to have
345  * names).  If the object in question does not posess a 'name' attribute
346  * according to the SBML specification for the Level and Version in use,
347  * libSBML will not allow the name to be set, nor will it read or
348  * write 'name' attributes for those objects.
349  *
350  *
351  *
352  * @return the name of this SBML object, or the empty string if not set or unsettable.
353  *
354  * @see getIdAttribute()
355  * @see isSetName()
356  * @see setName(string sid)
357  * @see unsetName()
358  *
359  *
360    */ public new
getName()361  string getName() {
362     string ret = libsbmlPINVOKE.SpeciesType_getName(swigCPtr);
363     return ret;
364   }
365 
366 
367 /**
368    * Predicate returning @c true if this
369    * SpeciesType's 'id' attribute is set.
370    *
371    *
372  *
373  *
374  * The identifier given by an object's 'id' attribute value
375  * is used to identify the object within the SBML model definition.
376  * Other objects can refer to the component using this identifier.  The
377  * data type of 'id' is always <code>SId</code> or a type derived
378  * from that, such as <code>UnitSId</code>, depending on the object in
379  * question.  All data types are defined as follows:
380  * <pre style='margin-left: 2em; border: none; font-weight: bold; color: black'>
381  *   letter ::= 'a'..'z','A'..'Z'
382  *   digit  ::= '0'..'9'
383  *   idChar ::= letter | digit | '_'
384  *   SId    ::= ( letter | '_' ) idChar*
385  * </pre>
386  * The characters <code>(</code> and <code>)</code> are used for grouping,
387  * the character <code>*</code> 'zero or more times', and the character
388  * <code>|</code> indicates logical 'or'.  The equality of SBML identifiers
389  * is determined by an exact character sequence match; i.e., comparisons must
390  * be performed in a case-sensitive manner.  This applies to all uses of
391  * <code>SId</code>, <code>SIdRef</code>, and derived types.
392  *
393  * Users need to be aware of some important API issues that are the result of
394  * the history of SBML and libSBML.  Prior to SBML Level&nbsp;3
395  * Version&nbsp;2, SBML defined 'id' and 'name' attributes on only a subset
396  * of SBML objects.  To simplify the work of programmers, libSBML's API
397  * provided get, set, check, and unset on the SBase object class itself
398  * instead of on individual subobject classes. This made the
399  * get/set/etc. methods uniformly available on all objects in the libSBML
400  * API.  LibSBML simply returned empty strings or otherwise did not act when
401  * the methods were applied to SBML objects that were not defined by the SBML
402  * specification to have 'id' or 'name' attributes.  Additional complications
403  * arose with the rule and assignment objects: InitialAssignment,
404  * EventAssignment, AssignmentRule, and RateRule.  In early versions of SBML,
405  * the rule object hierarchy was different, and in addition, then as now,
406  * they possess different attributes: 'variable' (for the rules and event
407  * assignments), 'symbol' (for initial assignments), or neither (for
408  * algebraic rules).  Prior to SBML Level&nbsp;3 Version&nbsp;2, getId()
409  * would always return an empty string, and isSetId() would always return @c
410  * false for objects of these classes.
411  *
412  * With the addition of 'id' and 'name' attributes on SBase in Level&nbsp;3
413  * Version&nbsp;2, it became necessary to introduce a new way to interact
414  * with the attributes more consistently in libSBML to avoid breaking
415  * backward compatibility in the behavior of the original 'id' methods.  For
416  * this reason, libSBML provides four functions (getIdAttribute(),
417  * setIdAttribute(@if java String@endif), isSetIdAttribute(), and
418  * unsetIdAttribute()) that always act on the actual 'id' attribute inherited
419  * from SBase, regardless of the object's type.  <strong>These new methods
420  * should be used instead of the older getId()/setId()/etc. methods</strong>
421  * unless the old behavior is somehow necessary.  Regardless of the Level and
422  * Version of the SBML, these functions allow client applications to use more
423  * generalized code in some situations (for instance, when manipulating
424  * objects that are all known to have identifiers).  If the object in
425  * question does not posess an 'id' attribute according to the SBML
426  * specification for the Level and Version in use, libSBML will not allow the
427  * identifier to be set, nor will it read or write 'id' attributes for those
428  * objects.
429  *
430  *
431  *
432  * @return @c true if the 'id' attribute of this SBML object is
433  * set, @c false otherwise.
434  *
435  * @note Because of the inconsistent behavior of this function with
436  * respect to assignments and rules, it is recommended that callers
437  * use isSetIdAttribute() instead.
438  *
439  * @see getIdAttribute()
440  * @see setIdAttribute(string sid)
441  * @see unsetIdAttribute()
442  * @see isSetIdAttribute()
443  *
444  *
445    */ public new
isSetId()446  bool isSetId() {
447     bool ret = libsbmlPINVOKE.SpeciesType_isSetId(swigCPtr);
448     return ret;
449   }
450 
451 
452 /**
453    * Predicate returning @c true if this
454    * SpeciesType's 'name' attribute is set.
455    *
456    *
457  *
458  *
459  * In SBML Level&nbsp;3 Version&nbsp;2, the 'id' and 'name' attributes were
460  * moved to SBase directly, instead of being defined individually for many
461  * (but not all) objects.  LibSBML has for a long time provided functions
462  * defined on SBase itself to get, set, and unset those attributes, which
463  * would fail or otherwise return empty strings if executed on any object
464  * for which those attributes were not defined.  Now that all SBase objects
465  * define those attributes, those functions now succeed for any object with
466  * the appropriate level and version.
467  *
468  * The 'name' attribute is
469  * optional and is not intended to be used for cross-referencing purposes
470  * within a model.  Its purpose instead is to provide a human-readable
471  * label for the component.  The data type of 'name' is the type
472  * <code>string</code> defined in XML Schema.  SBML imposes no
473  * restrictions as to the content of 'name' attributes beyond those
474  * restrictions defined by the <code>string</code> type in XML Schema.
475  *
476  * The recommended practice for handling 'name' is as follows.  If a
477  * software tool has the capability for displaying the content of 'name'
478  * attributes, it should display this content to the user as a
479  * component's label instead of the component's 'id'.  If the user
480  * interface does not have this capability (e.g., because it cannot
481  * display or use special characters in symbol names), or if the 'name'
482  * attribute is missing on a given component, then the user interface
483  * should display the value of the 'id' attribute instead.  (Script
484  * language interpreters are especially likely to display 'id' instead of
485  * 'name'.)
486  *
487  * As a consequence of the above, authors of systems that automatically
488  * generate the values of 'id' attributes should be aware some systems
489  * may display the 'id''s to the user.  Authors therefore may wish to
490  * take some care to have their software create 'id' values that are: (a)
491  * reasonably easy for humans to type and read; and (b) likely to be
492  * meaningful, for example by making the 'id' attribute be an abbreviated
493  * form of the name attribute value.
494  *
495  * An additional point worth mentioning is although there are
496  * restrictions on the uniqueness of 'id' values, there are no
497  * restrictions on the uniqueness of 'name' values in a model.  This
498  * allows software applications leeway in assigning component identifiers.
499  *
500  * Regardless of the level and version of the SBML, these functions allow
501  * client applications to use more generalized code in some situations
502  * (for instance, when manipulating objects that are all known to have
503  * names).  If the object in question does not posess a 'name' attribute
504  * according to the SBML specification for the Level and Version in use,
505  * libSBML will not allow the name to be set, nor will it read or
506  * write 'name' attributes for those objects.
507  *
508  *
509  *
510  * @return @c true if the 'name' attribute of this SBML object is
511  * set, @c false otherwise.
512  *
513  * @see getName()
514  * @see setName(string sid)
515  * @see unsetName()
516  *
517  *
518    */ public new
isSetName()519  bool isSetName() {
520     bool ret = libsbmlPINVOKE.SpeciesType_isSetName(swigCPtr);
521     return ret;
522   }
523 
524 
525 /**
526    * Sets the value of the 'id' attribute of this SpeciesType.
527    *
528    *
529  *
530  * The string @p sid is copied.
531  *
532  *
533  *
534  * The identifier given by an object's 'id' attribute value
535  * is used to identify the object within the SBML model definition.
536  * Other objects can refer to the component using this identifier.  The
537  * data type of 'id' is always <code>SId</code> or a type derived
538  * from that, such as <code>UnitSId</code>, depending on the object in
539  * question.  All data types are defined as follows:
540  * <pre style='margin-left: 2em; border: none; font-weight: bold; color: black'>
541  *   letter ::= 'a'..'z','A'..'Z'
542  *   digit  ::= '0'..'9'
543  *   idChar ::= letter | digit | '_'
544  *   SId    ::= ( letter | '_' ) idChar*
545  * </pre>
546  * The characters <code>(</code> and <code>)</code> are used for grouping,
547  * the character <code>*</code> 'zero or more times', and the character
548  * <code>|</code> indicates logical 'or'.  The equality of SBML identifiers
549  * is determined by an exact character sequence match; i.e., comparisons must
550  * be performed in a case-sensitive manner.  This applies to all uses of
551  * <code>SId</code>, <code>SIdRef</code>, and derived types.
552  *
553  * Users need to be aware of some important API issues that are the result of
554  * the history of SBML and libSBML.  Prior to SBML Level&nbsp;3
555  * Version&nbsp;2, SBML defined 'id' and 'name' attributes on only a subset
556  * of SBML objects.  To simplify the work of programmers, libSBML's API
557  * provided get, set, check, and unset on the SBase object class itself
558  * instead of on individual subobject classes. This made the
559  * get/set/etc. methods uniformly available on all objects in the libSBML
560  * API.  LibSBML simply returned empty strings or otherwise did not act when
561  * the methods were applied to SBML objects that were not defined by the SBML
562  * specification to have 'id' or 'name' attributes.  Additional complications
563  * arose with the rule and assignment objects: InitialAssignment,
564  * EventAssignment, AssignmentRule, and RateRule.  In early versions of SBML,
565  * the rule object hierarchy was different, and in addition, then as now,
566  * they possess different attributes: 'variable' (for the rules and event
567  * assignments), 'symbol' (for initial assignments), or neither (for
568  * algebraic rules).  Prior to SBML Level&nbsp;3 Version&nbsp;2, getId()
569  * would always return an empty string, and isSetId() would always return @c
570  * false for objects of these classes.
571  *
572  * With the addition of 'id' and 'name' attributes on SBase in Level&nbsp;3
573  * Version&nbsp;2, it became necessary to introduce a new way to interact
574  * with the attributes more consistently in libSBML to avoid breaking
575  * backward compatibility in the behavior of the original 'id' methods.  For
576  * this reason, libSBML provides four functions (getIdAttribute(),
577  * setIdAttribute(@if java String@endif), isSetIdAttribute(), and
578  * unsetIdAttribute()) that always act on the actual 'id' attribute inherited
579  * from SBase, regardless of the object's type.  <strong>These new methods
580  * should be used instead of the older getId()/setId()/etc. methods</strong>
581  * unless the old behavior is somehow necessary.  Regardless of the Level and
582  * Version of the SBML, these functions allow client applications to use more
583  * generalized code in some situations (for instance, when manipulating
584  * objects that are all known to have identifiers).  If the object in
585  * question does not posess an 'id' attribute according to the SBML
586  * specification for the Level and Version in use, libSBML will not allow the
587  * identifier to be set, nor will it read or write 'id' attributes for those
588  * objects.
589  *
590  *
591  *
592  * @param sid the string to use as the identifier of this object.
593  *
594  *
595  * @return integer value indicating success/failure of the
596  * function.  @if clike The value is drawn from the
597  * enumeration #OperationReturnValues_t. @endif The possible values
598  * returned by this function are:
599  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
600  * @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
601  * @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
602  *
603  * @see getIdAttribute()
604  * @see setIdAttribute(string sid)
605  * @see isSetIdAttribute()
606  * @see unsetIdAttribute()
607  *
608  *
609    */ public new
setId(string sid)610  int setId(string sid) {
611     int ret = libsbmlPINVOKE.SpeciesType_setId(swigCPtr, sid);
612     return ret;
613   }
614 
615 
616 /**
617    * Sets the value of the 'name' attribute of this SpeciesType.
618    *
619    *
620  *
621  *
622  * The string in @p name is copied.
623  *
624  * @param name the new name for the SBML object.
625  *
626  *
627  * @return integer value indicating success/failure of the
628  * function.  @if clike The value is drawn from the
629  * enumeration #OperationReturnValues_t. @endif The possible values
630  * returned by this function are:
631  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
632  * @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
633  *
634  *
635    */ public new
setName(string name)636  int setName(string name) {
637     int ret = libsbmlPINVOKE.SpeciesType_setName(swigCPtr, name);
638     return ret;
639   }
640 
641 
642 /**
643    * Unsets the value of the 'name' attribute of this SpeciesType.
644    *
645    *
646  *
647  *
648  * In SBML Level&nbsp;3 Version&nbsp;2, the 'id' and 'name' attributes were
649  * moved to SBase directly, instead of being defined individually for many
650  * (but not all) objects.  LibSBML has for a long time provided functions
651  * defined on SBase itself to get, set, and unset those attributes, which
652  * would fail or otherwise return empty strings if executed on any object
653  * for which those attributes were not defined.  Now that all SBase objects
654  * define those attributes, those functions now succeed for any object with
655  * the appropriate level and version.
656  *
657  * The 'name' attribute is
658  * optional and is not intended to be used for cross-referencing purposes
659  * within a model.  Its purpose instead is to provide a human-readable
660  * label for the component.  The data type of 'name' is the type
661  * <code>string</code> defined in XML Schema.  SBML imposes no
662  * restrictions as to the content of 'name' attributes beyond those
663  * restrictions defined by the <code>string</code> type in XML Schema.
664  *
665  * The recommended practice for handling 'name' is as follows.  If a
666  * software tool has the capability for displaying the content of 'name'
667  * attributes, it should display this content to the user as a
668  * component's label instead of the component's 'id'.  If the user
669  * interface does not have this capability (e.g., because it cannot
670  * display or use special characters in symbol names), or if the 'name'
671  * attribute is missing on a given component, then the user interface
672  * should display the value of the 'id' attribute instead.  (Script
673  * language interpreters are especially likely to display 'id' instead of
674  * 'name'.)
675  *
676  * As a consequence of the above, authors of systems that automatically
677  * generate the values of 'id' attributes should be aware some systems
678  * may display the 'id''s to the user.  Authors therefore may wish to
679  * take some care to have their software create 'id' values that are: (a)
680  * reasonably easy for humans to type and read; and (b) likely to be
681  * meaningful, for example by making the 'id' attribute be an abbreviated
682  * form of the name attribute value.
683  *
684  * An additional point worth mentioning is although there are
685  * restrictions on the uniqueness of 'id' values, there are no
686  * restrictions on the uniqueness of 'name' values in a model.  This
687  * allows software applications leeway in assigning component identifiers.
688  *
689  * Regardless of the level and version of the SBML, these functions allow
690  * client applications to use more generalized code in some situations
691  * (for instance, when manipulating objects that are all known to have
692  * names).  If the object in question does not posess a 'name' attribute
693  * according to the SBML specification for the Level and Version in use,
694  * libSBML will not allow the name to be set, nor will it read or
695  * write 'name' attributes for those objects.
696  *
697  *
698  *
699  *
700  * @return integer value indicating success/failure of the
701  * function.  @if clike The value is drawn from the
702  * enumeration #OperationReturnValues_t. @endif The possible values
703  * returned by this function are:
704  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
705  * @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
706  *
707  * @see getName()
708  * @see setName(string sid)
709  * @see isSetName()
710  *
711  *
712    */ public new
unsetName()713  int unsetName() {
714     int ret = libsbmlPINVOKE.SpeciesType_unsetName(swigCPtr);
715     return ret;
716   }
717 
718 
719 /**
720    * Returns the libSBML type code for this SBML object.
721    *
722    *
723  *
724  * LibSBML attaches an identifying code to every kind of SBML object.  These
725  * are integer constants known as <em>SBML type codes</em>.  The names of all
726  * the codes begin with the characters <code>SBML_</code>.
727  * @if clike The set of possible type codes for core elements is defined in
728  * the enumeration #SBMLTypeCode_t, and in addition, libSBML plug-ins for
729  * SBML Level&nbsp;3 packages define their own extra enumerations of type
730  * codes (e.g., #SBMLLayoutTypeCode_t for the Level&nbsp;3 Layout
731  * package).@endif@if java In the Java language interface for libSBML, the
732  * type codes are defined as static integer constants in the interface class
733  * {@link libsbmlConstants}.  @endif@if python In the Python language
734  * interface for libSBML, the type codes are defined as static integer
735  * constants in the interface class @link libsbml@endlink.@endif@if csharp In
736  * the C# language interface for libSBML, the type codes are defined as
737  * static integer constants in the interface class
738  * @link libsbmlcs.libsbml@endlink.@endif  Note that different Level&nbsp;3
739  * package plug-ins may use overlapping type codes; to identify the package
740  * to which a given object belongs, call the
741  * <code>@if conly SBase_getPackageName()
742  * @else SBase::getPackageName()
743  * @endif</code>
744  * method on the object.
745  *
746  * The exception to this is lists:  all SBML-style list elements have the type
747  * @link libsbml#SBML_LIST_OF SBML_LIST_OF@endlink, regardless of what package they
748  * are from.
749  *
750  *
751    *
752    * @return the SBML type code for this object:
753    * @link libsbml#SBML_SPECIES_TYPE SBML_SPECIES_TYPE@endlink (default).
754    *
755    *
756  * @warning <span class='warning'>The specific integer values of the possible
757  * type codes may be reused by different libSBML plug-ins for SBML Level&nbsp;3.
758  * packages,  To fully identify the correct code, <strong>it is necessary to
759  * invoke both getPackageName() and getTypeCode()</strong> (or
760  * ListOf::getItemTypeCode()).</span>
761  *
762  *
763    *
764    * @see getElementName()
765    * @see getPackageName()
766    */ public new
getTypeCode()767  int getTypeCode() {
768     int ret = libsbmlPINVOKE.SpeciesType_getTypeCode(swigCPtr);
769     return ret;
770   }
771 
772 
773 /**
774    * Returns the XML element name of this object, which for
775    * SpeciesType, is always @c 'compartmentType'.
776    *
777    * @return the name of this element, i.e., @c 'compartmentType'.
778    */ public new
getElementName()779  string getElementName() {
780     string ret = libsbmlPINVOKE.SpeciesType_getElementName(swigCPtr);
781     return ret;
782   }
783 
784 
785 /**
786    * Predicate returning @c true if
787    * all the required attributes for this SpeciesType object
788    * have been set.
789    *
790    * The required attributes for a SpeciesType object are:
791    * @li 'id'
792    *
793    * @return @c true if the required attributes have been set, @c false
794    * otherwise.
795    */ public new
hasRequiredAttributes()796  bool hasRequiredAttributes() {
797     bool ret = libsbmlPINVOKE.SpeciesType_hasRequiredAttributes(swigCPtr);
798     return ret;
799   }
800 
801 }
802 
803 }
804