1 using System;
2 using System.Runtime.InteropServices;
3 
4 //------------------------------------------------------------------------------
5 // <auto-generated />
6 //
7 // This file was automatically generated by SWIG (http://www.swig.org).
8 // Version 4.0.2
9 //
10 // Do not make changes to this file unless you know what you are doing--modify
11 // the SWIG interface file instead.
12 //------------------------------------------------------------------------------
13 
14 namespace libsbmlcs {
15 
16  using System;
17  using System.Runtime.InteropServices;
18 
19 /**
20  * @sbmlpackage{core}
21  *
22 @htmlinclude pkg-marker-core.html An SBML <em>species</em> &ndash; a pool of entities.
23  *
24  * A @em species in SBML refers to a pool of entities that (a) are
25  * considered indistinguishable from each other for the purposes of the
26  * model, (b) participate in reactions, and (c) are located in a specific
27  * @em compartment.  The SBML Species object class is intended to represent
28  * these pools.
29  *
30  * As with other major constructs in SBML, Species has a mandatory
31  * attribute, 'id', used to give the species type an identifier in the
32  * model.  The identifier must be a text string conforming to the identifer
33  * syntax permitted in SBML.  Species also has an optional 'name'
34  * attribute, of type @c string.  The 'id' and 'name' must be used
35  * according to the guidelines described in the SBML specifications.
36  *
37  * The required attribute 'compartment' is used to identify the compartment
38  * in which the species is located.  The attribute's value must be the
39  * identifier of an existing Compartment object.  It is important to note
40  * that there is no default value for the 'compartment' attribute on
41  * Species; every species in an SBML model must be assigned a compartment
42  * @em explicitly.  (This also implies that every model with one or more
43  * Species objects must define at least one Compartment object.)
44  *
45  *
46  * @section species-amounts The initial amount and concentration of a species
47  *
48  * The optional attributes 'initialAmount' and 'initialConcentration', both
49  * having a data type of @c double, can be used to set the @em initial
50  * quantity of the species in the compartment where the species is located.
51  * These attributes are mutually exclusive; i.e., <em>only one</em> can
52  * have a value on any given instance of a Species object.  Missing
53  * 'initialAmount' and 'initialConcentration' values implies that their
54  * values either are unknown, or to be obtained from an external source, or
55  * determined by an InitialAssignment or other SBML construct elsewhere in
56  * the model.
57  *
58  * A species' initial quantity in SBML is set by the 'initialAmount' or
59  * 'initialConcentration' attribute exactly once.  If the 'constant'
60  * attribute is @c true, then the value of the species' quantity is fixed
61  * and cannot be changed except by an InitialAssignment.  These methods
62  * differ in that the 'initialAmount' and 'initialConcentration' attributes
63  * can only be used to set the species quantity to a literal floating-point
64  * number, whereas the use of an InitialAssignment object allows the value
65  * to be set using an arbitrary mathematical expression (which, thanks to
66  * MathML's expressiveness, may evaluate to a rational number).  If the
67  * species' 'constant' attribute is @c false, the species' quantity value
68  * may be overridden by an InitialAssignment or changed by AssignmentRule
69  * or AlgebraicRule, and in addition, for <em>t &gt; 0</em>, it may also be
70  * changed by a RateRule, Event objects, and as a result of being a
71  * reactant or product in one or more Reaction objects.  (However, some
72  * constructs are mutually exclusive; see the SBML specifications for the
73  * precise details.)  It is not an error to define 'initialAmount' or
74  * 'initialConcentration' on a species and also redefine the value using an
75  * InitialAssignment, but the 'initialAmount' or 'initialConcentration'
76  * setting in that case is ignored.  The SBML specifications provide
77  * additional information about the semantics of assignments, rules and
78  * values for simulation time <em>t</em> <= <em>0</em>.
79  *
80  * SBML Level&nbsp;2 additionally stipulates that in cases where a species'
81  * compartment has a 'spatialDimensions' value of @c 0 (zero), the species
82  * cannot have a value for 'initialConcentration' because the concepts of
83  * concentration and density break down when a container has zero
84  * dimensions.
85  *
86  * @section species-units The units of a species' amount or concentration
87  *
88  * When the attribute 'initialAmount' is set, the unit of measurement
89  * associated with the value of 'initialAmount' is specified by the Species
90  * attribute 'substanceUnits'.  When the 'initialConcentration' attribute
91  * is set, the unit of measurement associated with this concentration value
92  * is {<em>unit of amount</em>} divided by {<em>unit of size</em>}, where
93  * the {<em>unit of amount</em>} is specified by the Species
94  * 'substanceUnits' attribute, and the {<em>unit of size</em>} is specified
95  * by the 'units' attribute of the Compartment object in which the species
96  * is located.  Note that in either case, a unit of <em>amount</em> is
97  * involved and determined by the 'substanceUnits' attribute.  Note
98  * <strong>these two attributes alone do not determine the units of the
99  * species when the species identifier appears in a mathematical
100  * expression</strong>; <em>that</em> aspect is determined by the attribute
101  * 'hasOnlySubstanceUnits' discussed below.
102  *
103  * In SBML Level&nbsp;3, if the 'substanceUnits' attribute is not set on a
104  * given Species object instance, then the unit of <em>amount</em> for that
105  * species is inherited from the 'substanceUnits' attribute on the
106  * enclosing Model object instance.  If that attribute on Model is not set
107  * either, then the unit associated with the species' quantity is
108  * undefined.
109  *
110  * In SBML Level&nbsp;2, if the 'substanceUnits' attribute is not set on a
111  * given Species object instance, then the unit of <em>amount</em> for that
112  * species is taken from the predefined SBML unit identifier
113  * @c 'substance'.  The value assigned to 'substanceUnits' must be chosen from
114  * one of the following possibilities: one of the base unit identifiers
115  * defined in SBML, the built-in unit identifier @c 'substance', or the
116  * identifier of a new unit defined in the list of unit definitions in the
117  * enclosing Model object.  The chosen units for 'substanceUnits' must be
118  * be @c 'dimensionless', @c 'mole', @c 'item', @c 'kilogram', @c 'gram',
119  * or units derived from these.
120  *
121  * As noted at the beginning of this section, simply setting
122  * 'initialAmount' or 'initialConcentration' alone does @em not determine
123  * whether a species identifier represents an amount or a concentration
124  * when it appears elsewhere in an SBML model.  The role of the attribute
125  * 'hasOnlySubstanceUnits' is to indicate whether the units of the species,
126  * when the species identifier appears in mathematical formulas, are
127  * intended to be concentration or amount.  The attribute takes on a
128  * boolean value.  In SBML Level&nbsp;3, the attribute has no default value
129  * and must always be set in a model; in SBML Level&nbsp;2, it has a
130  * default value of @c false.
131  *
132  * The <em>units of the species</em> are used in the following ways:
133  * <ul>
134 
135  * <li> When the species' identifier appears in a MathML formula, it
136  * represents the species' quantity, and the unit of measurement associated
137  * with the quantity is as described above.
138  *
139  * <li> The 'math' elements of AssignmentRule, InitialAssignment and
140  * EventAssignment objects referring to this species should all have the
141  * same units as the unit of measurement associated with the species
142  * quantity.
143  *
144  * <li> In a RateRule object that defines the rate of change of the
145  * species' quantity, the unit associated with the rule's 'math' element
146  * should be equal to the unit of the species' quantity divided by the
147  * model-wide unit of <em>time</em>; in other words, {<em>unit of species
148  * quantity</em>}/{<em>unit of time</em>}.
149  *
150  * </ul>
151  *
152  *
153  * @section species-constant The 'constant' and 'boundaryCondition' attributes
154  *
155  * The Species object class has two boolean attributes named 'constant' and
156  * 'boundaryCondition', used to indicate whether and how the quantity of
157  * that species can vary during a simulation.  In SBML Level&nbsp;2 they
158  * are optional; in SBML Level&nbsp;3 they are mandatory.  The following
159  * table shows how to interpret the combined values of these attributes.
160  *
161  * @htmlinclude species-boundarycondition.html
162  *
163  * By default, when a species is a product or reactant of one or more
164  * reactions, its quantity is determined by those reactions.  In SBML, it
165  * is possible to indicate that a given species' quantity is <em>not</em>
166  * determined by the set of reactions even when that species occurs as a
167  * product or reactant; i.e., the species is on the <em>boundary</em> of
168  * the reaction system, and its quantity is not determined by the
169  * reactions.  The boolean attribute 'boundaryCondition' can be used to
170  * indicate this.  A value of @c false indicates that the species @em is
171  * part of the reaction system.  In SBML Level&nbsp;2, the attribute has a
172  * default value of @c false, while in SBML Level&nbsp;3, it has no
173  * default.
174  *
175  * The 'constant' attribute indicates whether the species' quantity can be
176  * changed at all, regardless of whether by reactions, rules, or constructs
177  * other than InitialAssignment.  A value of @c false indicates that the
178  * species' quantity can be changed.  (This is also a common value because
179  * the purpose of most simulations is precisely to calculate changes in
180  * species quantities.)  In SBML Level&nbsp;2, the attribute has a default
181  * value of @c false, while in SBML Level&nbsp;3, it has no default.  Note
182  * that the initial quantity of a species can be set by an
183  * InitialAssignment irrespective of the value of the 'constant' attribute.
184  *
185  * In practice, a 'boundaryCondition' value of @c true means a differential
186  * equation derived from the reaction definitions should not be generated
187  * for the species.  However, the species' quantity may still be changed by
188  * AssignmentRule, RateRule, AlgebraicRule, Event, and InitialAssignment
189  * constructs if its 'constant' attribute is @c false.  Conversely, if the
190  * species' 'constant' attribute is @c true, then its value cannot be
191  * changed by anything except InitialAssignment.
192  *
193  * A species having 'boundaryCondition'=@c false and 'constant'=@c false
194  * can appear as a product and/or reactant of one or more reactions in the
195  * model.  If the species is a reactant or product of a reaction, it must
196  * @em not also appear as the target of any AssignmentRule or RateRule
197  * object in the model.  If instead the species has 'boundaryCondition'=
198  * @c false and 'constant'=@c true, then it cannot appear as a reactant or
199  * product, or as the target of any AssignmentRule, RateRule or
200  * EventAssignment object in the model.
201  *
202  * Finally, it is worth clarifying that while the constant and
203  * boundaryCondition attributes restrict whether and how the species
204  * amount changes, the same is not true of a species' concentration. In
205  * SBML, the concentration of a species is a quantity that depends on the
206  * size of the compartment in which it is located. A compartment's size
207  * may change, and therefore, so can the concentration of a species even
208  * if the amount of the species remains unchanged. A species' concentration
209  * may therefore vary even if the Species object's constant attribute is
210  * set to @c true in a model.
211  *
212  * @section species-l2-convfactor The conversionFactor attribute in SBML Level&nbsp;3
213  *
214  * In SBML Level&nbsp;3, Species has an additional optional attribute,
215  * 'conversionFactor', that defines a conversion factor that applies to a
216  * particular species.  The value must be the identifier of a Parameter
217  * object instance defined in the model.  That Parameter object must be a
218  * constant, meaning its 'constant' attribute must be set to @c true.
219  * If a given Species object definition defines a value for its
220  * 'conversionFactor' attribute, it takes precedence over any factor
221  * defined by the Model object's 'conversionFactor' attribute.
222  *
223  * The unit of measurement associated with a species' quantity can be
224  * different from the unit of extent of reactions in the model.  SBML
225  * Level&nbsp;3 avoids implicit unit conversions by providing an explicit
226  * way to indicate any unit conversion that might be required.  The use of
227  * a conversion factor in computing the effects of reactions on a species'
228  * quantity is explained in detail in the SBML Level&nbsp;3 specification
229  * document.  Because the value of the 'conversionFactor' attribute is the
230  * identifier of a Parameter object, and because parameters can have units
231  * attached to them, the transformation from reaction extent units to
232  * species units can be completely specified using this approach.
233  *
234  * Note that the unit conversion factor is <strong>only applied when
235  * calculating the effect of a reaction on a species</strong>.  It is not
236  * used in any rules or other SBML constructs that affect the species, and
237  * it is also not used when the value of the species is referenced in a
238  * mathematical expression.
239  *
240  *
241  * @section species-l2-type The speciesType attribute in SBML Level&nbsp;2 Versions&nbsp;2&ndash;4
242  *
243  * In SBML Level&nbsp;2 Versions&nbsp;2&ndash;4, each species in a model
244  * may optionally be designated as belonging to a particular species type.
245  * The optional attribute 'speciesType' is used to identify the species
246  * type of the chemical entities that make up the pool represented by the
247  * Species objects.  The attribute's value must be the identifier of an
248  * existing SpeciesType object in the model.  If the 'speciesType'
249  * attribute is not present on a particular species definition, it means
250  * the pool contains chemical entities of a type unique to that pool; in
251  * effect, a virtual species type is assumed for that species, and no other
252  * species can belong to that species type.  The value of 'speciesType'
253  * attributes on species have no effect on the numerical interpretation of
254  * a model; simulators and other numerical analysis software may ignore
255  * 'speciesType' attributes.
256  *
257  * There can be only one species of a given species type in any given
258  * compartment of a model.  More specifically, for all Species objects
259  * having a value for the 'speciesType' attribute, the pair
260  * <center>
261  * ('speciesType' attribute value, 'compartment' attribute value)
262  * </center>
263  *
264  * must be unique across the set of all Species object in a model.
265  *
266  *
267  * @section species-other The spatialSizeUnits attribute in SBML Level&nbsp;2 Versions&nbsp;1&ndash;2
268  *
269  * In versions of SBML Level&nbsp;2 before Version&nbsp;3, the class
270  * Species included an attribute called 'spatialSizeUnits', which allowed
271  * explicitly setting the units of size for initial concentration.  LibSBML
272  * retains this attribute for compatibility with older definitions of
273  * Level&nbsp;2, but its use is strongly discouraged because many software
274  * tools do no properly interpret this unit declaration and it is
275  * incompatible with all SBML specifications after Level&nbsp;2
276  * Version&nbsp;3.
277  *
278  *
279  * @section species-math Additional considerations for interpreting the numerical value of a species
280  *
281  * Species are unique in SBML in that they have a kind of duality: a
282  * species identifier may stand for either substance amount (meaning, a
283  * count of the number of individual entities) or a concentration or
284  * density (meaning, amount divided by a compartment size).  The previous
285  * sections explain the meaning of a species identifier when it is
286  * referenced in a mathematical formula or in rules or other SBML
287  * constructs; however, it remains to specify what happens to a species
288  * when the compartment in which it is located changes in size.
289  *
290  * When a species definition has a 'hasOnlySubstanceUnits' attribute value
291  * of @c false and the size of the compartment in which the species is
292  * located changes, the default in SBML is to assume that it is the
293  * concentration that must be updated to account for the size change.  This
294  * follows from the principle that, all other things held constant, if a
295  * compartment simply changes in size, the size change does not in itself
296  * cause an increase or decrease in the number of entities of any species
297  * in that compartment.  In a sense, the default is that the @em amount of
298  * a species is preserved across compartment size changes.  Upon such size
299  * changes, the value of the concentration or density must be recalculated
300  * from the simple relationship <em>concentration = amount / size</em> if
301  * the value of the concentration is needed (for example, if the species
302  * identifier appears in a mathematical formula or is otherwise referenced
303  * in an SBML construct).  There is one exception: if the species' quantity
304  * is determined by an AssignmentRule, RateRule, AlgebraicRule, or an
305  * EventAssignment and the species has a 'hasOnlySubstanceUnits' attribute
306  * value of @c false, it means that the <em>concentration</em> is assigned
307  * by the rule or event; in that case, the <em>amount</em> must be
308  * calculated when the compartment size changes.  (Events also require
309  * additional care in this situation, because an event with multiple
310  * assignments could conceivably reassign both a species quantity and a
311  * compartment size simultaneously.  Please refer to the SBML
312  * specifications for the details.)
313  *
314  * Note that the above only matters if a species has a
315  * 'hasOnlySubstanceUnits' attribute value of @c false, meaning that the
316  * species identifier refers to a concentration wherever the identifier
317  * appears in a mathematical formula.  If instead the attribute's value is
318  * @c true, then the identifier of the species <em>always</em> stands for
319  * an amount wherever it appears in a mathematical formula or is referenced
320  * by an SBML construct.  In that case, there is never a question about
321  * whether an assignment or event is meant to affect the amount or
322  * concentration: it is always the amount.
323  *
324  * A particularly confusing situation can occur when the species has
325  * 'constant' attribute value of @c true in combination with a
326  * 'hasOnlySubstanceUnits' attribute value of @c false.  Suppose this
327  * species is given a value for 'initialConcentration'.  Does a 'constant'
328  * value of @c true mean that the concentration is held constant if the
329  * compartment size changes?  No; it is still the amount that is kept
330  * constant across a compartment size change.  The fact that the species
331  * was initialized using a concentration value is irrelevant.
332  *
333  *
334  *
335  */
336 
337 public class Species : SBase {
338 	private HandleRef swigCPtr;
339 
Species(IntPtr cPtr, bool cMemoryOwn)340 	internal Species(IntPtr cPtr, bool cMemoryOwn) : base(libsbmlPINVOKE.Species_SWIGUpcast(cPtr), cMemoryOwn)
341 	{
342 		//super(libsbmlPINVOKE.SpeciesUpcast(cPtr), cMemoryOwn);
343 		swigCPtr = new HandleRef(this, cPtr);
344 	}
345 
getCPtr(Species obj)346 	internal static HandleRef getCPtr(Species obj)
347 	{
348 		return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
349 	}
350 
getCPtrAndDisown(Species obj)351 	internal static HandleRef getCPtrAndDisown (Species obj)
352 	{
353 		HandleRef ptr = new HandleRef(null, IntPtr.Zero);
354 
355 		if (obj != null)
356 		{
357 			ptr             = obj.swigCPtr;
358 			obj.swigCMemOwn = false;
359 		}
360 
361 		return ptr;
362 	}
363 
Dispose(bool disposing)364   protected override void Dispose(bool disposing) {
365     lock(this) {
366       if (swigCPtr.Handle != global::System.IntPtr.Zero) {
367         if (swigCMemOwn) {
368           swigCMemOwn = false;
369           libsbmlPINVOKE.delete_Species(swigCPtr);
370         }
371         swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
372       }
373       base.Dispose(disposing);
374     }
375   }
376 
377 
378 /**
379    * Creates a new Species using the given SBML @p level and @p version
380    * values.
381    *
382    * @param level a long integer, the SBML Level to assign to this Species.
383    *
384    * @param version a long integer, the SBML Version to assign to this
385    * Species.
386    *
387    *
388  * @throws SBMLConstructorException
389  * Thrown if the given @p level and @p version combination are invalid
390  * or if this object is incompatible with the given level and version.
391  *
392  *
393    *
394    *
395  * @note Attempting to add an object to an SBMLDocument having a different
396  * combination of SBML Level, Version and XML namespaces than the object
397  * itself will result in an error at the time a caller attempts to make the
398  * addition.  A parent object must have compatible Level, Version and XML
399  * namespaces.  (Strictly speaking, a parent may also have more XML
400  * namespaces than a child, but the reverse is not permitted.)  The
401  * restriction is necessary to ensure that an SBML model has a consistent
402  * overall structure.  This requires callers to manage their objects
403  * carefully, but the benefit is increased flexibility in how models can be
404  * created by permitting callers to create objects bottom-up if desired.  In
405  * situations where objects are not yet attached to parents (e.g.,
406  * SBMLDocument), knowledge of the intented SBML Level and Version help
407  * libSBML determine such things as whether it is valid to assign a
408  * particular value to an attribute.
409  *
410  *
411    */ public
Species(long level, long version)412  Species(long level, long version) : this(libsbmlPINVOKE.new_Species__SWIG_0(level, version), true) {
413     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
414   }
415 
416 
417 /**
418    * Creates a new Species using the given SBMLNamespaces object
419    * @p sbmlns.
420    *
421    *
422  *
423  * The SBMLNamespaces object encapsulates SBML Level/Version/namespaces
424  * information.  It is used to communicate the SBML Level, Version, and (in
425  * Level&nbsp;3) packages used in addition to SBML Level&nbsp;3 Core.  A
426  * common approach to using libSBML's SBMLNamespaces facilities is to create an
427  * SBMLNamespaces object somewhere in a program once, then hand that object
428  * as needed to object constructors that accept SBMLNamespaces as arguments.
429  *
430  *
431    *
432    * It is worth emphasizing that although this constructor does not take
433    * an identifier argument, in SBML Level&nbsp;2 and beyond, the 'id'
434    * (identifier) attribute of a Species is required to have a value.
435    * Thus, callers are cautioned to assign a value after calling this
436    * constructor.  Setting the identifier can be accomplished using the
437    * method Species::setId(@if java String@endif).
438    *
439    * @param sbmlns an SBMLNamespaces object.
440    *
441    *
442  * @throws SBMLConstructorException
443  * Thrown if the given @p sbmlns is inconsistent or incompatible
444  * with this object.
445  *
446  *
447    *
448    *
449  * @note Attempting to add an object to an SBMLDocument having a different
450  * combination of SBML Level, Version and XML namespaces than the object
451  * itself will result in an error at the time a caller attempts to make the
452  * addition.  A parent object must have compatible Level, Version and XML
453  * namespaces.  (Strictly speaking, a parent may also have more XML
454  * namespaces than a child, but the reverse is not permitted.)  The
455  * restriction is necessary to ensure that an SBML model has a consistent
456  * overall structure.  This requires callers to manage their objects
457  * carefully, but the benefit is increased flexibility in how models can be
458  * created by permitting callers to create objects bottom-up if desired.  In
459  * situations where objects are not yet attached to parents (e.g.,
460  * SBMLDocument), knowledge of the intented SBML Level and Version help
461  * libSBML determine such things as whether it is valid to assign a
462  * particular value to an attribute.
463  *
464  *
465    */ public
Species(SBMLNamespaces sbmlns)466  Species(SBMLNamespaces sbmlns) : this(libsbmlPINVOKE.new_Species__SWIG_1(SBMLNamespaces.getCPtr(sbmlns)), true) {
467     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
468   }
469 
470 
471 /**
472    * Copy constructor; creates a copy of this Species object.
473    *
474    * @param orig the object to copy.
475    */ public
Species(Species orig)476  Species(Species orig) : this(libsbmlPINVOKE.new_Species__SWIG_2(Species.getCPtr(orig)), true) {
477     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
478   }
479 
480 
481 /**
482    * Creates and returns a deep copy of this Species object.
483    *
484    * @return the (deep) copy of this Species object.
485    */ public new
clone()486  Species clone() {
487     global::System.IntPtr cPtr = libsbmlPINVOKE.Species_clone(swigCPtr);
488     Species ret = (cPtr == global::System.IntPtr.Zero) ? null : new Species(cPtr, true);
489     return ret;
490   }
491 
492 
493 /**
494    * Initializes the fields of this Species object to 'typical' defaults
495    * values.
496    *
497    * The SBML Species component has slightly different aspects and
498    * default attribute values in different SBML Levels and Versions.
499    * This method sets the values to certain common defaults, based
500    * mostly on what they are in SBML Level&nbsp;2.  Specifically:
501    * <ul>
502    * <li> Sets 'boundaryCondition' to @c false
503    * <li> Sets 'constant' to @c false
504    * <li> sets 'hasOnlySubstanceUnits' to @c false
505    * <li> (Applies to Level&nbsp;3 models only) Sets attribute 'substanceUnits' to @c mole
506    * </ul>
507    */ public
initDefaults()508  void initDefaults() {
509     libsbmlPINVOKE.Species_initDefaults(swigCPtr);
510   }
511 
512 
513 /**
514    * Returns the value of the 'id' attribute of this Species.
515    *
516    * @note Because of the inconsistent behavior of this function with
517    * respect to assignments and rules, it is now recommended to
518    * use the getIdAttribute() function instead.
519    *
520    *
521  *
522  * The identifier given by an object's 'id' attribute value
523  * is used to identify the object within the SBML model definition.
524  * Other objects can refer to the component using this identifier.  The
525  * data type of 'id' is always <code>SId</code> or a type derived
526  * from that, such as <code>UnitSId</code>, depending on the object in
527  * question.  All data types are defined as follows:
528  * <pre style='margin-left: 2em; border: none; font-weight: bold; color: black'>
529  *   letter ::= 'a'..'z','A'..'Z'
530  *   digit  ::= '0'..'9'
531  *   idChar ::= letter | digit | '_'
532  *   SId    ::= ( letter | '_' ) idChar*
533  * </pre>
534  * The characters <code>(</code> and <code>)</code> are used for grouping,
535  * the character <code>*</code> 'zero or more times', and the character
536  * <code>|</code> indicates logical 'or'.  The equality of SBML identifiers
537  * is determined by an exact character sequence match; i.e., comparisons must
538  * be performed in a case-sensitive manner.  This applies to all uses of
539  * <code>SId</code>, <code>SIdRef</code>, and derived types.
540  *
541  * Users need to be aware of some important API issues that are the result of
542  * the history of SBML and libSBML.  Prior to SBML Level&nbsp;3
543  * Version&nbsp;2, SBML defined 'id' and 'name' attributes on only a subset
544  * of SBML objects.  To simplify the work of programmers, libSBML's API
545  * provided get, set, check, and unset on the SBase object class itself
546  * instead of on individual subobject classes. This made the
547  * get/set/etc. methods uniformly available on all objects in the libSBML
548  * API.  LibSBML simply returned empty strings or otherwise did not act when
549  * the methods were applied to SBML objects that were not defined by the SBML
550  * specification to have 'id' or 'name' attributes.  Additional complications
551  * arose with the rule and assignment objects: InitialAssignment,
552  * EventAssignment, AssignmentRule, and RateRule.  In early versions of SBML,
553  * the rule object hierarchy was different, and in addition, then as now,
554  * they possess different attributes: 'variable' (for the rules and event
555  * assignments), 'symbol' (for initial assignments), or neither (for
556  * algebraic rules).  Prior to SBML Level&nbsp;3 Version&nbsp;2, getId()
557  * would always return an empty string, and isSetId() would always return @c
558  * false for objects of these classes.
559  *
560  * With the addition of 'id' and 'name' attributes on SBase in Level&nbsp;3
561  * Version&nbsp;2, it became necessary to introduce a new way to interact
562  * with the attributes more consistently in libSBML to avoid breaking
563  * backward compatibility in the behavior of the original 'id' methods.  For
564  * this reason, libSBML provides four functions (getIdAttribute(),
565  * setIdAttribute(@if java String@endif), isSetIdAttribute(), and
566  * unsetIdAttribute()) that always act on the actual 'id' attribute inherited
567  * from SBase, regardless of the object's type.  <strong>These new methods
568  * should be used instead of the older getId()/setId()/etc. methods</strong>
569  * unless the old behavior is somehow necessary.  Regardless of the Level and
570  * Version of the SBML, these functions allow client applications to use more
571  * generalized code in some situations (for instance, when manipulating
572  * objects that are all known to have identifiers).  If the object in
573  * question does not posess an 'id' attribute according to the SBML
574  * specification for the Level and Version in use, libSBML will not allow the
575  * identifier to be set, nor will it read or write 'id' attributes for those
576  * objects.
577  *
578  *
579    *
580    * @return the id of this Species.
581    *
582    * @see getIdAttribute()
583    * @see setIdAttribute(string sid)
584    * @see isSetIdAttribute()
585    * @see unsetIdAttribute()
586    */ public new
getId()587  string getId() {
588     string ret = libsbmlPINVOKE.Species_getId(swigCPtr);
589     return ret;
590   }
591 
592 
593 /**
594    * Returns the value of the 'name' attribute of this Species object.
595    *
596    *
597  *
598  *
599  * In SBML Level&nbsp;3 Version&nbsp;2, the 'id' and 'name' attributes were
600  * moved to SBase directly, instead of being defined individually for many
601  * (but not all) objects.  LibSBML has for a long time provided functions
602  * defined on SBase itself to get, set, and unset those attributes, which
603  * would fail or otherwise return empty strings if executed on any object
604  * for which those attributes were not defined.  Now that all SBase objects
605  * define those attributes, those functions now succeed for any object with
606  * the appropriate level and version.
607  *
608  * The 'name' attribute is
609  * optional and is not intended to be used for cross-referencing purposes
610  * within a model.  Its purpose instead is to provide a human-readable
611  * label for the component.  The data type of 'name' is the type
612  * <code>string</code> defined in XML Schema.  SBML imposes no
613  * restrictions as to the content of 'name' attributes beyond those
614  * restrictions defined by the <code>string</code> type in XML Schema.
615  *
616  * The recommended practice for handling 'name' is as follows.  If a
617  * software tool has the capability for displaying the content of 'name'
618  * attributes, it should display this content to the user as a
619  * component's label instead of the component's 'id'.  If the user
620  * interface does not have this capability (e.g., because it cannot
621  * display or use special characters in symbol names), or if the 'name'
622  * attribute is missing on a given component, then the user interface
623  * should display the value of the 'id' attribute instead.  (Script
624  * language interpreters are especially likely to display 'id' instead of
625  * 'name'.)
626  *
627  * As a consequence of the above, authors of systems that automatically
628  * generate the values of 'id' attributes should be aware some systems
629  * may display the 'id''s to the user.  Authors therefore may wish to
630  * take some care to have their software create 'id' values that are: (a)
631  * reasonably easy for humans to type and read; and (b) likely to be
632  * meaningful, for example by making the 'id' attribute be an abbreviated
633  * form of the name attribute value.
634  *
635  * An additional point worth mentioning is although there are
636  * restrictions on the uniqueness of 'id' values, there are no
637  * restrictions on the uniqueness of 'name' values in a model.  This
638  * allows software applications leeway in assigning component identifiers.
639  *
640  * Regardless of the level and version of the SBML, these functions allow
641  * client applications to use more generalized code in some situations
642  * (for instance, when manipulating objects that are all known to have
643  * names).  If the object in question does not posess a 'name' attribute
644  * according to the SBML specification for the Level and Version in use,
645  * libSBML will not allow the name to be set, nor will it read or
646  * write 'name' attributes for those objects.
647  *
648  *
649  *
650  * @return the name of this SBML object, or the empty string if not set or unsettable.
651  *
652  * @see getIdAttribute()
653  * @see isSetName()
654  * @see setName(string sid)
655  * @see unsetName()
656  *
657  *
658    */ public new
getName()659  string getName() {
660     string ret = libsbmlPINVOKE.Species_getName(swigCPtr);
661     return ret;
662   }
663 
664 
665 /**
666    * Get the type of this Species object object.
667    *
668    * @return the value of the 'speciesType' attribute of this
669    * Species as a string.
670    *
671    * @note The 'speciesType' attribute is only available in SBML
672    * Level&nbsp;2 Versions&nbsp;2&ndash;4.
673    */ public
getSpeciesType()674  string getSpeciesType() {
675     string ret = libsbmlPINVOKE.Species_getSpeciesType(swigCPtr);
676     return ret;
677   }
678 
679 
680 /**
681    * Get the compartment in which this species is located.
682    *
683    * The compartment is designated by its identifier.
684    *
685    * @return the value of the 'compartment' attribute of this Species
686    * object, as a string.
687    */ public
getCompartment()688  string getCompartment() {
689     string ret = libsbmlPINVOKE.Species_getCompartment(swigCPtr);
690     return ret;
691   }
692 
693 
694 /**
695    * Get the value of the 'initialAmount' attribute.
696    *
697    * @return the initialAmount of this Species, as a floating point number.
698    */ public
getInitialAmount()699  double getInitialAmount() {
700     double ret = libsbmlPINVOKE.Species_getInitialAmount(swigCPtr);
701     return ret;
702   }
703 
704 
705 /**
706    * Get the value of the 'initialConcentration' attribute.
707    *
708    * @return the initialConcentration of this Species,, as a floating point
709    * number.
710    *
711    * @note The attribute 'initialConcentration' is only available in SBML
712    * Level&nbsp;2 and&nbsp;3.  It does not exist on Species in Level&nbsp;1.
713    */ public
getInitialConcentration()714  double getInitialConcentration() {
715     double ret = libsbmlPINVOKE.Species_getInitialConcentration(swigCPtr);
716     return ret;
717   }
718 
719 
720 /**
721    * Get the value of the 'substanceUnits' attribute.
722    *
723    * @return the value of the 'substanceUnits' attribute of this Species,
724    * as a string.  An empty string indicates that no units have been
725    * assigned.
726    *
727    *
728  * @note There is an important distinction to be made between <em>no units
729  * assigned</em>, and assuming a value without units has any specific unit
730  * such as <code>dimensionless</code>.  In SBML, default units are never
731  * attributed to numbers, and numbers without units are not automatically
732  * assumed to have the unit <code>dimensionless</code>.  Please consult the
733  * relevant SBML specification document for a more in-depth explanation of
734  * this topic and the SBML unit system.
735  *
736  *
737    *
738    * @see isSetSubstanceUnits()
739    * @see setSubstanceUnits(string sid)
740    */ public
getSubstanceUnits()741  string getSubstanceUnits() {
742     string ret = libsbmlPINVOKE.Species_getSubstanceUnits(swigCPtr);
743     return ret;
744   }
745 
746 
747 /**
748    * Get the value of the 'spatialSizeUnits' attribute.
749    *
750    * @return the value of the 'spatialSizeUnits' attribute of this Species
751    * object, as a string.
752    *
753    *
754  * @warning <span class='warning'>In versions of SBML Level&nbsp;2 before
755  * Version&nbsp;3, the class Species included an attribute called
756  * 'spatialSizeUnits', which allowed explicitly setting the units of size for
757  * initial concentration.  This attribute was removed in SBML Level&nbsp;2
758  * Version&nbsp;3.  LibSBML retains this attribute for compatibility with
759  * older definitions of Level&nbsp;2, but its use is strongly discouraged
760  * because it is incompatible with levels and versions of SBML beyond
761  * Level&nbsp;2 Version&nbsp;2.</span>
762  *
763    */ public
getSpatialSizeUnits()764  string getSpatialSizeUnits() {
765     string ret = libsbmlPINVOKE.Species_getSpatialSizeUnits(swigCPtr);
766     return ret;
767   }
768 
769 
770 /**
771    * Get the value of the 'units' attribute.
772    *
773    * @return the units of this Species (L1 only).
774    *
775    *
776  * @note The 'units' attribute is defined only in SBML Level&nbsp;1.  In
777  * SBML Level&nbsp;2 and Level&nbsp;3, it has been replaced by a
778  * combination of 'substanceUnits' and the units of the Compartment
779  * object in which a species is located.  In SBML Level&nbsp;2
780  * Versions&nbsp;1&ndash;2, an additional attribute 'spatialSizeUnits'
781  * helps determine the units of the species quantity, but this attribute
782  * was removed in later versions of SBML Level&nbsp;2.
783  *
784    */ public
getUnits()785  string getUnits() {
786     string ret = libsbmlPINVOKE.Species_getUnits(swigCPtr);
787     return ret;
788   }
789 
790 
791 /**
792    * Get the value of the 'hasOnlySubstanceUnits' attribute.
793    *
794    * @return @c true if this Species' 'hasOnlySubstanceUnits' attribute
795    * value is @c true, @c false otherwise.
796    *
797    * @note The 'hasOnlySubstanceUnits' attribute does not exist in SBML
798    * Level&nbsp;1.
799    */ public
getHasOnlySubstanceUnits()800  bool getHasOnlySubstanceUnits() {
801     bool ret = libsbmlPINVOKE.Species_getHasOnlySubstanceUnits(swigCPtr);
802     return ret;
803   }
804 
805 
806 /**
807    * Get the value of the 'boundaryCondition' attribute.
808    *
809    * @return @c true if this Species' 'boundaryCondition' attribute value
810    * is @c true, @c false otherwise.
811    */ public
getBoundaryCondition()812  bool getBoundaryCondition() {
813     bool ret = libsbmlPINVOKE.Species_getBoundaryCondition(swigCPtr);
814     return ret;
815   }
816 
817 
818 /**
819    * Get the value of the 'charge' attribute.
820    *
821    * @return the charge of this Species object.
822    *
823    *
824  * @note Beginning in SBML Level&nbsp;2 Version&nbsp;2, the 'charge'
825  * attribute on Species is deprecated and in SBML Level&nbsp;3 it does
826  * not exist at all.  Its use strongly discouraged.  Its presence is
827  * considered a misfeature in earlier definitions of SBML because its
828  * implications for the mathematics of a model were never defined, and in
829  * any case, no known modeling system ever used it.  Instead, models take
830  * account of charge values directly in their definitions of species by
831  * (for example) having separate species identities for the charged and
832  * uncharged versions of the same species.  This allows the condition to
833  * affect model mathematics directly.  LibSBML retains this method for
834  * easier compatibility with SBML Level&nbsp;1.
835    */ public
getCharge()836  int getCharge() {
837     int ret = libsbmlPINVOKE.Species_getCharge(swigCPtr);
838     return ret;
839   }
840 
841 
842 /**
843    * Get the value of the 'constant' attribute.
844    *
845    * @return @c true if this Species's 'constant' attribute value is
846    * @c true, @c false otherwise.
847    *
848    * @note The attribute 'constant' is only available in SBML Levels&nbsp;2
849    * and&nbsp;3.  It does not exist on Species in Level&nbsp;1.
850    */ public
getConstant()851  bool getConstant() {
852     bool ret = libsbmlPINVOKE.Species_getConstant(swigCPtr);
853     return ret;
854   }
855 
856 
857 /**
858    * Get the value of the 'conversionFactor' attribute.
859    *
860    * @return the conversionFactor of this Species, as a string.
861    *
862    * @note The 'conversionFactor' attribute was introduced in SBML
863    * Level&nbsp;3.  It does not exist on Species in SBML Levels&nbsp;1
864    * and&nbsp;2.
865    */ public
getConversionFactor()866  string getConversionFactor() {
867     string ret = libsbmlPINVOKE.Species_getConversionFactor(swigCPtr);
868     return ret;
869   }
870 
871 
872 /**
873    * Predicate returning @c true if this
874    * Species object's 'id' attribute is set.
875    *
876    *
877  *
878  *
879  * The identifier given by an object's 'id' attribute value
880  * is used to identify the object within the SBML model definition.
881  * Other objects can refer to the component using this identifier.  The
882  * data type of 'id' is always <code>SId</code> or a type derived
883  * from that, such as <code>UnitSId</code>, depending on the object in
884  * question.  All data types are defined as follows:
885  * <pre style='margin-left: 2em; border: none; font-weight: bold; color: black'>
886  *   letter ::= 'a'..'z','A'..'Z'
887  *   digit  ::= '0'..'9'
888  *   idChar ::= letter | digit | '_'
889  *   SId    ::= ( letter | '_' ) idChar*
890  * </pre>
891  * The characters <code>(</code> and <code>)</code> are used for grouping,
892  * the character <code>*</code> 'zero or more times', and the character
893  * <code>|</code> indicates logical 'or'.  The equality of SBML identifiers
894  * is determined by an exact character sequence match; i.e., comparisons must
895  * be performed in a case-sensitive manner.  This applies to all uses of
896  * <code>SId</code>, <code>SIdRef</code>, and derived types.
897  *
898  * Users need to be aware of some important API issues that are the result of
899  * the history of SBML and libSBML.  Prior to SBML Level&nbsp;3
900  * Version&nbsp;2, SBML defined 'id' and 'name' attributes on only a subset
901  * of SBML objects.  To simplify the work of programmers, libSBML's API
902  * provided get, set, check, and unset on the SBase object class itself
903  * instead of on individual subobject classes. This made the
904  * get/set/etc. methods uniformly available on all objects in the libSBML
905  * API.  LibSBML simply returned empty strings or otherwise did not act when
906  * the methods were applied to SBML objects that were not defined by the SBML
907  * specification to have 'id' or 'name' attributes.  Additional complications
908  * arose with the rule and assignment objects: InitialAssignment,
909  * EventAssignment, AssignmentRule, and RateRule.  In early versions of SBML,
910  * the rule object hierarchy was different, and in addition, then as now,
911  * they possess different attributes: 'variable' (for the rules and event
912  * assignments), 'symbol' (for initial assignments), or neither (for
913  * algebraic rules).  Prior to SBML Level&nbsp;3 Version&nbsp;2, getId()
914  * would always return an empty string, and isSetId() would always return @c
915  * false for objects of these classes.
916  *
917  * With the addition of 'id' and 'name' attributes on SBase in Level&nbsp;3
918  * Version&nbsp;2, it became necessary to introduce a new way to interact
919  * with the attributes more consistently in libSBML to avoid breaking
920  * backward compatibility in the behavior of the original 'id' methods.  For
921  * this reason, libSBML provides four functions (getIdAttribute(),
922  * setIdAttribute(@if java String@endif), isSetIdAttribute(), and
923  * unsetIdAttribute()) that always act on the actual 'id' attribute inherited
924  * from SBase, regardless of the object's type.  <strong>These new methods
925  * should be used instead of the older getId()/setId()/etc. methods</strong>
926  * unless the old behavior is somehow necessary.  Regardless of the Level and
927  * Version of the SBML, these functions allow client applications to use more
928  * generalized code in some situations (for instance, when manipulating
929  * objects that are all known to have identifiers).  If the object in
930  * question does not posess an 'id' attribute according to the SBML
931  * specification for the Level and Version in use, libSBML will not allow the
932  * identifier to be set, nor will it read or write 'id' attributes for those
933  * objects.
934  *
935  *
936  *
937  * @return @c true if the 'id' attribute of this SBML object is
938  * set, @c false otherwise.
939  *
940  * @note Because of the inconsistent behavior of this function with
941  * respect to assignments and rules, it is recommended that callers
942  * use isSetIdAttribute() instead.
943  *
944  * @see getIdAttribute()
945  * @see setIdAttribute(string sid)
946  * @see unsetIdAttribute()
947  * @see isSetIdAttribute()
948  *
949  *
950    */ public new
isSetId()951  bool isSetId() {
952     bool ret = libsbmlPINVOKE.Species_isSetId(swigCPtr);
953     return ret;
954   }
955 
956 
957 /**
958    * Predicate returning @c true if this
959    * Species object's 'name' attribute is set.
960    *
961    *
962  *
963  *
964  * In SBML Level&nbsp;3 Version&nbsp;2, the 'id' and 'name' attributes were
965  * moved to SBase directly, instead of being defined individually for many
966  * (but not all) objects.  LibSBML has for a long time provided functions
967  * defined on SBase itself to get, set, and unset those attributes, which
968  * would fail or otherwise return empty strings if executed on any object
969  * for which those attributes were not defined.  Now that all SBase objects
970  * define those attributes, those functions now succeed for any object with
971  * the appropriate level and version.
972  *
973  * The 'name' attribute is
974  * optional and is not intended to be used for cross-referencing purposes
975  * within a model.  Its purpose instead is to provide a human-readable
976  * label for the component.  The data type of 'name' is the type
977  * <code>string</code> defined in XML Schema.  SBML imposes no
978  * restrictions as to the content of 'name' attributes beyond those
979  * restrictions defined by the <code>string</code> type in XML Schema.
980  *
981  * The recommended practice for handling 'name' is as follows.  If a
982  * software tool has the capability for displaying the content of 'name'
983  * attributes, it should display this content to the user as a
984  * component's label instead of the component's 'id'.  If the user
985  * interface does not have this capability (e.g., because it cannot
986  * display or use special characters in symbol names), or if the 'name'
987  * attribute is missing on a given component, then the user interface
988  * should display the value of the 'id' attribute instead.  (Script
989  * language interpreters are especially likely to display 'id' instead of
990  * 'name'.)
991  *
992  * As a consequence of the above, authors of systems that automatically
993  * generate the values of 'id' attributes should be aware some systems
994  * may display the 'id''s to the user.  Authors therefore may wish to
995  * take some care to have their software create 'id' values that are: (a)
996  * reasonably easy for humans to type and read; and (b) likely to be
997  * meaningful, for example by making the 'id' attribute be an abbreviated
998  * form of the name attribute value.
999  *
1000  * An additional point worth mentioning is although there are
1001  * restrictions on the uniqueness of 'id' values, there are no
1002  * restrictions on the uniqueness of 'name' values in a model.  This
1003  * allows software applications leeway in assigning component identifiers.
1004  *
1005  * Regardless of the level and version of the SBML, these functions allow
1006  * client applications to use more generalized code in some situations
1007  * (for instance, when manipulating objects that are all known to have
1008  * names).  If the object in question does not posess a 'name' attribute
1009  * according to the SBML specification for the Level and Version in use,
1010  * libSBML will not allow the name to be set, nor will it read or
1011  * write 'name' attributes for those objects.
1012  *
1013  *
1014  *
1015  * @return @c true if the 'name' attribute of this SBML object is
1016  * set, @c false otherwise.
1017  *
1018  * @see getName()
1019  * @see setName(string sid)
1020  * @see unsetName()
1021  *
1022  *
1023    */ public new
isSetName()1024  bool isSetName() {
1025     bool ret = libsbmlPINVOKE.Species_isSetName(swigCPtr);
1026     return ret;
1027   }
1028 
1029 
1030 /**
1031    * Predicate returning @c true if this Species object's
1032    * 'speciesType' attribute is set.
1033    *
1034    * @return @c true if the 'speciesType' attribute of this Species is
1035    * set, @c false otherwise.
1036    *
1037    * @note The 'speciesType' attribute is only available in SBML
1038    * Level&nbsp;2 Versions&nbsp;2&ndash;4.
1039    */ public
isSetSpeciesType()1040  bool isSetSpeciesType() {
1041     bool ret = libsbmlPINVOKE.Species_isSetSpeciesType(swigCPtr);
1042     return ret;
1043   }
1044 
1045 
1046 /**
1047    * Predicate returning @c true if this
1048    * Species object's 'compartment' attribute is set.
1049    *
1050    * @return @c true if the 'compartment' attribute of this Species is
1051    * set, @c false otherwise.
1052    */ public
isSetCompartment()1053  bool isSetCompartment() {
1054     bool ret = libsbmlPINVOKE.Species_isSetCompartment(swigCPtr);
1055     return ret;
1056   }
1057 
1058 
1059 /**
1060    * Predicate returning @c true if this
1061    * Species object's 'initialAmount' attribute is set.
1062    *
1063    * @return @c true if the 'initialAmount' attribute of this Species is
1064    * set, @c false otherwise.
1065    *
1066    * @note In SBML Level&nbsp;1, Species' 'initialAmount' is required and
1067    * therefore <em>should always be set</em>.  (However, in Level&nbsp;1, the
1068    * attribute has no default value either, so this method will not return
1069    * @c true until a value has been assigned.)  In SBML Level&nbsp;2,
1070    * 'initialAmount' is optional and as such may or may not be set.
1071    */ public
isSetInitialAmount()1072  bool isSetInitialAmount() {
1073     bool ret = libsbmlPINVOKE.Species_isSetInitialAmount(swigCPtr);
1074     return ret;
1075   }
1076 
1077 
1078 /**
1079    * Predicate returning @c true if this
1080    * Species object's 'initialConcentration' attribute is set.
1081    *
1082    * @return @c true if the 'initialConcentration' attribute of this Species is
1083    * set, @c false otherwise.
1084    *
1085    * @note The attribute 'initialConcentration' is only available in SBML
1086    * Level&nbsp;2 and&nbsp;3.  It does not exist on Species in Level&nbsp;1.
1087    */ public
isSetInitialConcentration()1088  bool isSetInitialConcentration() {
1089     bool ret = libsbmlPINVOKE.Species_isSetInitialConcentration(swigCPtr);
1090     return ret;
1091   }
1092 
1093 
1094 /**
1095    * Predicate returning @c true if this
1096    * Species object's 'substanceUnits' attribute is set.
1097    *
1098    * @return @c true if the 'substanceUnits' attribute of this Species is
1099    * set, @c false otherwise.
1100    */ public
isSetSubstanceUnits()1101  bool isSetSubstanceUnits() {
1102     bool ret = libsbmlPINVOKE.Species_isSetSubstanceUnits(swigCPtr);
1103     return ret;
1104   }
1105 
1106 
1107 /**
1108    * Predicate returning @c true if this
1109    * Species object's 'spatialSizeUnits' attribute is set.
1110    *
1111    * @return @c true if the 'spatialSizeUnits' attribute of this Species is
1112    * set, @c false otherwise.
1113    *
1114    *
1115  * @warning <span class='warning'>In versions of SBML Level&nbsp;2 before
1116  * Version&nbsp;3, the class Species included an attribute called
1117  * 'spatialSizeUnits', which allowed explicitly setting the units of size for
1118  * initial concentration.  This attribute was removed in SBML Level&nbsp;2
1119  * Version&nbsp;3.  LibSBML retains this attribute for compatibility with
1120  * older definitions of Level&nbsp;2, but its use is strongly discouraged
1121  * because it is incompatible with levels and versions of SBML beyond
1122  * Level&nbsp;2 Version&nbsp;2.</span>
1123  *
1124    */ public
isSetSpatialSizeUnits()1125  bool isSetSpatialSizeUnits() {
1126     bool ret = libsbmlPINVOKE.Species_isSetSpatialSizeUnits(swigCPtr);
1127     return ret;
1128   }
1129 
1130 
1131 /**
1132    * Predicate returning @c true if
1133    * this Species object's 'units' attribute is set.
1134    *
1135    * @return @c true if the 'units' attribute of this Species is
1136    * set, @c false otherwise.
1137    */ public
isSetUnits()1138  bool isSetUnits() {
1139     bool ret = libsbmlPINVOKE.Species_isSetUnits(swigCPtr);
1140     return ret;
1141   }
1142 
1143 
1144 /**
1145    * Predicate returning @c true if this
1146    * Species object's 'charge' attribute is set.
1147    *
1148    * @return @c true if the 'charge' attribute of this Species is
1149    * set, @c false otherwise.
1150    *
1151    *
1152  * @note Beginning in SBML Level&nbsp;2 Version&nbsp;2, the 'charge'
1153  * attribute on Species is deprecated and in SBML Level&nbsp;3 it does
1154  * not exist at all.  Its use strongly discouraged.  Its presence is
1155  * considered a misfeature in earlier definitions of SBML because its
1156  * implications for the mathematics of a model were never defined, and in
1157  * any case, no known modeling system ever used it.  Instead, models take
1158  * account of charge values directly in their definitions of species by
1159  * (for example) having separate species identities for the charged and
1160  * uncharged versions of the same species.  This allows the condition to
1161  * affect model mathematics directly.  LibSBML retains this method for
1162  * easier compatibility with SBML Level&nbsp;1.
1163    */ public
isSetCharge()1164  bool isSetCharge() {
1165     bool ret = libsbmlPINVOKE.Species_isSetCharge(swigCPtr);
1166     return ret;
1167   }
1168 
1169 
1170 /**
1171    * Predicate returning @c true if this
1172    * Species object's 'conversionFactor' attribute is set.
1173    *
1174    * @return @c true if the 'conversionFactor' attribute of this Species is
1175    * set, @c false otherwise.
1176    *
1177    * @note The 'conversionFactor' attribute was introduced in SBML
1178    * Level&nbsp;3.  It does not exist on Species in SBML Levels&nbsp;1
1179    * and&nbsp;2.
1180    */ public
isSetConversionFactor()1181  bool isSetConversionFactor() {
1182     bool ret = libsbmlPINVOKE.Species_isSetConversionFactor(swigCPtr);
1183     return ret;
1184   }
1185 
1186 
1187 /**
1188    * Predicate returning @c true if this
1189    * Species object's 'boundaryCondition' attribute is set.
1190    *
1191    * @return @c true if the 'boundaryCondition' attribute of this Species is
1192    * set, @c false otherwise.
1193    */ public
isSetBoundaryCondition()1194  bool isSetBoundaryCondition() {
1195     bool ret = libsbmlPINVOKE.Species_isSetBoundaryCondition(swigCPtr);
1196     return ret;
1197   }
1198 
1199 
1200 /**
1201    * Predicate returning @c true if this
1202    * Species object's 'hasOnlySubstanceUnits' attribute is set.
1203    *
1204    * @return @c true if the 'hasOnlySubstanceUnits' attribute of this Species is
1205    * set, @c false otherwise.
1206    *
1207    * @note The 'hasOnlySubstanceUnits' attribute does not exist in SBML
1208    * Level&nbsp;1.
1209    */ public
isSetHasOnlySubstanceUnits()1210  bool isSetHasOnlySubstanceUnits() {
1211     bool ret = libsbmlPINVOKE.Species_isSetHasOnlySubstanceUnits(swigCPtr);
1212     return ret;
1213   }
1214 
1215 
1216 /**
1217    * Predicate returning @c true if this
1218    * Species object's 'constant' attribute is set.
1219    *
1220    * @return @c true if the 'constant' attribute of this Species is
1221    * set, @c false otherwise.
1222    *
1223    * @note The attribute 'constant' is only available in SBML Levels&nbsp;2
1224    * and&nbsp;3.  It does not exist on Species in Level&nbsp;1.
1225    */ public
isSetConstant()1226  bool isSetConstant() {
1227     bool ret = libsbmlPINVOKE.Species_isSetConstant(swigCPtr);
1228     return ret;
1229   }
1230 
1231 
1232 /**
1233    * Sets the value of the 'id' attribute of this Species.
1234    *
1235    *
1236  *
1237  * The string @p sid is copied.
1238  *
1239  *
1240  *
1241  * The identifier given by an object's 'id' attribute value
1242  * is used to identify the object within the SBML model definition.
1243  * Other objects can refer to the component using this identifier.  The
1244  * data type of 'id' is always <code>SId</code> or a type derived
1245  * from that, such as <code>UnitSId</code>, depending on the object in
1246  * question.  All data types are defined as follows:
1247  * <pre style='margin-left: 2em; border: none; font-weight: bold; color: black'>
1248  *   letter ::= 'a'..'z','A'..'Z'
1249  *   digit  ::= '0'..'9'
1250  *   idChar ::= letter | digit | '_'
1251  *   SId    ::= ( letter | '_' ) idChar*
1252  * </pre>
1253  * The characters <code>(</code> and <code>)</code> are used for grouping,
1254  * the character <code>*</code> 'zero or more times', and the character
1255  * <code>|</code> indicates logical 'or'.  The equality of SBML identifiers
1256  * is determined by an exact character sequence match; i.e., comparisons must
1257  * be performed in a case-sensitive manner.  This applies to all uses of
1258  * <code>SId</code>, <code>SIdRef</code>, and derived types.
1259  *
1260  * Users need to be aware of some important API issues that are the result of
1261  * the history of SBML and libSBML.  Prior to SBML Level&nbsp;3
1262  * Version&nbsp;2, SBML defined 'id' and 'name' attributes on only a subset
1263  * of SBML objects.  To simplify the work of programmers, libSBML's API
1264  * provided get, set, check, and unset on the SBase object class itself
1265  * instead of on individual subobject classes. This made the
1266  * get/set/etc. methods uniformly available on all objects in the libSBML
1267  * API.  LibSBML simply returned empty strings or otherwise did not act when
1268  * the methods were applied to SBML objects that were not defined by the SBML
1269  * specification to have 'id' or 'name' attributes.  Additional complications
1270  * arose with the rule and assignment objects: InitialAssignment,
1271  * EventAssignment, AssignmentRule, and RateRule.  In early versions of SBML,
1272  * the rule object hierarchy was different, and in addition, then as now,
1273  * they possess different attributes: 'variable' (for the rules and event
1274  * assignments), 'symbol' (for initial assignments), or neither (for
1275  * algebraic rules).  Prior to SBML Level&nbsp;3 Version&nbsp;2, getId()
1276  * would always return an empty string, and isSetId() would always return @c
1277  * false for objects of these classes.
1278  *
1279  * With the addition of 'id' and 'name' attributes on SBase in Level&nbsp;3
1280  * Version&nbsp;2, it became necessary to introduce a new way to interact
1281  * with the attributes more consistently in libSBML to avoid breaking
1282  * backward compatibility in the behavior of the original 'id' methods.  For
1283  * this reason, libSBML provides four functions (getIdAttribute(),
1284  * setIdAttribute(@if java String@endif), isSetIdAttribute(), and
1285  * unsetIdAttribute()) that always act on the actual 'id' attribute inherited
1286  * from SBase, regardless of the object's type.  <strong>These new methods
1287  * should be used instead of the older getId()/setId()/etc. methods</strong>
1288  * unless the old behavior is somehow necessary.  Regardless of the Level and
1289  * Version of the SBML, these functions allow client applications to use more
1290  * generalized code in some situations (for instance, when manipulating
1291  * objects that are all known to have identifiers).  If the object in
1292  * question does not posess an 'id' attribute according to the SBML
1293  * specification for the Level and Version in use, libSBML will not allow the
1294  * identifier to be set, nor will it read or write 'id' attributes for those
1295  * objects.
1296  *
1297  *
1298  *
1299  * @param sid the string to use as the identifier of this object.
1300  *
1301  *
1302  * @return integer value indicating success/failure of the
1303  * function.  @if clike The value is drawn from the
1304  * enumeration #OperationReturnValues_t. @endif The possible values
1305  * returned by this function are:
1306  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
1307  * @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
1308  * @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
1309  *
1310  * @see getIdAttribute()
1311  * @see setIdAttribute(string sid)
1312  * @see isSetIdAttribute()
1313  * @see unsetIdAttribute()
1314  *
1315  *
1316    */ public new
setId(string sid)1317  int setId(string sid) {
1318     int ret = libsbmlPINVOKE.Species_setId(swigCPtr, sid);
1319     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
1320     return ret;
1321   }
1322 
1323 
1324 /**
1325    * Sets the value of the 'name' attribute of this Species.
1326    *
1327    *
1328  *
1329  *
1330  * The string in @p name is copied.
1331  *
1332  * @param name the new name for the SBML object.
1333  *
1334  *
1335  * @return integer value indicating success/failure of the
1336  * function.  @if clike The value is drawn from the
1337  * enumeration #OperationReturnValues_t. @endif The possible values
1338  * returned by this function are:
1339  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
1340  * @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
1341  *
1342  *
1343    */ public new
setName(string name)1344  int setName(string name) {
1345     int ret = libsbmlPINVOKE.Species_setName(swigCPtr, name);
1346     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
1347     return ret;
1348   }
1349 
1350 
1351 /**
1352    * Sets the 'speciesType' attribute of this Species object.
1353    *
1354    * @param sid the identifier of a SpeciesType object defined elsewhere
1355    * in this Model.
1356    *
1357    *
1358  * @return integer value indicating success/failure of the
1359  * function.  @if clike The value is drawn from the
1360  * enumeration #OperationReturnValues_t. @endif The possible values
1361  * returned by this function are:
1362  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
1363    * @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
1364    * @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
1365    *
1366    * @note The 'speciesType' attribute is only available in SBML
1367    * Level&nbsp;2 Versions&nbsp;2&ndash;4.
1368    */ public
setSpeciesType(string sid)1369  int setSpeciesType(string sid) {
1370     int ret = libsbmlPINVOKE.Species_setSpeciesType(swigCPtr, sid);
1371     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
1372     return ret;
1373   }
1374 
1375 
1376 /**
1377    * Sets the 'compartment' attribute of this Species object.
1378    *
1379    * @param sid the identifier of a Compartment object defined elsewhere
1380    * in this Model.
1381    *
1382    *
1383  * @return integer value indicating success/failure of the
1384  * function.  @if clike The value is drawn from the
1385  * enumeration #OperationReturnValues_t. @endif The possible values
1386  * returned by this function are:
1387  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
1388    * @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
1389    */ public
setCompartment(string sid)1390  int setCompartment(string sid) {
1391     int ret = libsbmlPINVOKE.Species_setCompartment(swigCPtr, sid);
1392     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
1393     return ret;
1394   }
1395 
1396 
1397 /**
1398    * Sets the 'initialAmount' attribute of this Species and marks the field
1399    * as set.
1400    *
1401    * This method also unsets the 'initialConcentration' attribute.
1402    *
1403    * @param value the value to which the 'initialAmount' attribute should
1404    * be set.
1405    *
1406    *
1407  * @return integer value indicating success/failure of the
1408  * function.  @if clike The value is drawn from the
1409  * enumeration #OperationReturnValues_t. @endif The possible values
1410  * returned by this function are:
1411  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
1412    */ public
setInitialAmount(double value)1413  int setInitialAmount(double value) {
1414     int ret = libsbmlPINVOKE.Species_setInitialAmount(swigCPtr, value);
1415     return ret;
1416   }
1417 
1418 
1419 /**
1420    * Sets the 'initialConcentration' attribute of this Species and marks
1421    * the field as set.
1422    *
1423    * This method also unsets the 'initialAmount' attribute.
1424    *
1425    * @param value the value to which the 'initialConcentration' attribute
1426    * should be set.
1427    *
1428    *
1429  * @return integer value indicating success/failure of the
1430  * function.  @if clike The value is drawn from the
1431  * enumeration #OperationReturnValues_t. @endif The possible values
1432  * returned by this function are:
1433  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
1434    * @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
1435    *
1436    * @note The attribute 'initialConcentration' is only available in SBML
1437    * Level&nbsp;2 and&nbsp;3.  It does not exist on Species in Level&nbsp;1.
1438    */ public
setInitialConcentration(double value)1439  int setInitialConcentration(double value) {
1440     int ret = libsbmlPINVOKE.Species_setInitialConcentration(swigCPtr, value);
1441     return ret;
1442   }
1443 
1444 
1445 /**
1446    * Sets the 'substanceUnits' attribute of this Species object.
1447    *
1448    * @param sid the identifier of the unit to use.
1449    *
1450    *
1451  * @return integer value indicating success/failure of the
1452  * function.  @if clike The value is drawn from the
1453  * enumeration #OperationReturnValues_t. @endif The possible values
1454  * returned by this function are:
1455  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
1456    * @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
1457    */ public
setSubstanceUnits(string sid)1458  int setSubstanceUnits(string sid) {
1459     int ret = libsbmlPINVOKE.Species_setSubstanceUnits(swigCPtr, sid);
1460     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
1461     return ret;
1462   }
1463 
1464 
1465 /**
1466    * (SBML Level&nbsp;2 Versions&nbsp;1&ndash;2) Sets the 'spatialSizeUnits' attribute of this Species object.
1467    *
1468    * @param sid the identifier of the unit to use.
1469    *
1470    *
1471  * @return integer value indicating success/failure of the
1472  * function.  @if clike The value is drawn from the
1473  * enumeration #OperationReturnValues_t. @endif The possible values
1474  * returned by this function are:
1475  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
1476    * @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
1477    * @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
1478    *
1479    *
1480  * @warning <span class='warning'>In versions of SBML Level&nbsp;2 before
1481  * Version&nbsp;3, the class Species included an attribute called
1482  * 'spatialSizeUnits', which allowed explicitly setting the units of size for
1483  * initial concentration.  This attribute was removed in SBML Level&nbsp;2
1484  * Version&nbsp;3.  LibSBML retains this attribute for compatibility with
1485  * older definitions of Level&nbsp;2, but its use is strongly discouraged
1486  * because it is incompatible with levels and versions of SBML beyond
1487  * Level&nbsp;2 Version&nbsp;2.</span>
1488  *
1489    */ public
setSpatialSizeUnits(string sid)1490  int setSpatialSizeUnits(string sid) {
1491     int ret = libsbmlPINVOKE.Species_setSpatialSizeUnits(swigCPtr, sid);
1492     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
1493     return ret;
1494   }
1495 
1496 
1497 /**
1498    * (SBML Level&nbsp;1 only) Sets the units of this Species object.
1499    *
1500    * @param sname the identifier of the unit to use.
1501    *
1502    *
1503  * @return integer value indicating success/failure of the
1504  * function.  @if clike The value is drawn from the
1505  * enumeration #OperationReturnValues_t. @endif The possible values
1506  * returned by this function are:
1507  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
1508    * @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
1509   */ public
setUnits(string sname)1510  int setUnits(string sname) {
1511     int ret = libsbmlPINVOKE.Species_setUnits(swigCPtr, sname);
1512     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
1513     return ret;
1514   }
1515 
1516 
1517 /**
1518    * Sets the 'hasOnlySubstanceUnits' attribute of this Species object.
1519    *
1520    * @param value boolean value for the 'hasOnlySubstanceUnits' attribute.
1521    *
1522    *
1523  * @return integer value indicating success/failure of the
1524  * function.  @if clike The value is drawn from the
1525  * enumeration #OperationReturnValues_t. @endif The possible values
1526  * returned by this function are:
1527  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
1528    * @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
1529    *
1530    * @note The 'hasOnlySubstanceUnits' attribute does not exist in SBML
1531    * Level&nbsp;1.
1532    */ public
setHasOnlySubstanceUnits(bool value)1533  int setHasOnlySubstanceUnits(bool value) {
1534     int ret = libsbmlPINVOKE.Species_setHasOnlySubstanceUnits(swigCPtr, value);
1535     return ret;
1536   }
1537 
1538 
1539 /**
1540    * Sets the 'boundaryCondition' attribute of this Species object.
1541    *
1542    * @param value boolean value for the 'boundaryCondition' attribute.
1543    *
1544    *
1545  * @return integer value indicating success/failure of the
1546  * function.  @if clike The value is drawn from the
1547  * enumeration #OperationReturnValues_t. @endif The possible values
1548  * returned by this function are:
1549  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
1550    */ public
setBoundaryCondition(bool value)1551  int setBoundaryCondition(bool value) {
1552     int ret = libsbmlPINVOKE.Species_setBoundaryCondition(swigCPtr, value);
1553     return ret;
1554   }
1555 
1556 
1557 /**
1558    * Sets the 'charge' attribute of this Species object.
1559    *
1560    * @param value an integer to which to set the 'charge' to.
1561    *
1562    *
1563  * @note Beginning in SBML Level&nbsp;2 Version&nbsp;2, the 'charge'
1564  * attribute on Species is deprecated and in SBML Level&nbsp;3 it does
1565  * not exist at all.  Its use strongly discouraged.  Its presence is
1566  * considered a misfeature in earlier definitions of SBML because its
1567  * implications for the mathematics of a model were never defined, and in
1568  * any case, no known modeling system ever used it.  Instead, models take
1569  * account of charge values directly in their definitions of species by
1570  * (for example) having separate species identities for the charged and
1571  * uncharged versions of the same species.  This allows the condition to
1572  * affect model mathematics directly.  LibSBML retains this method for
1573  * easier compatibility with SBML Level&nbsp;1.
1574    *
1575    *
1576  * @return integer value indicating success/failure of the
1577  * function.  @if clike The value is drawn from the
1578  * enumeration #OperationReturnValues_t. @endif The possible values
1579  * returned by this function are:
1580  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
1581    * @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
1582    */ public
setCharge(int value)1583  int setCharge(int value) {
1584     int ret = libsbmlPINVOKE.Species_setCharge(swigCPtr, value);
1585     return ret;
1586   }
1587 
1588 
1589 /**
1590    * Sets the 'constant' attribute of this Species object.
1591    *
1592    * @param value a boolean value for the 'constant' attribute.
1593    *
1594    *
1595  * @return integer value indicating success/failure of the
1596  * function.  @if clike The value is drawn from the
1597  * enumeration #OperationReturnValues_t. @endif The possible values
1598  * returned by this function are:
1599  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
1600    * @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
1601    *
1602    * @note The attribute 'constant' is only available in SBML Levels&nbsp;2
1603    * and&nbsp;3.  It does not exist on Species in Level&nbsp;1.
1604    */ public
setConstant(bool value)1605  int setConstant(bool value) {
1606     int ret = libsbmlPINVOKE.Species_setConstant(swigCPtr, value);
1607     return ret;
1608   }
1609 
1610 
1611 /**
1612    * Sets the value of the 'conversionFactor' attribute of this Species object.
1613    *
1614    * The string in @p sid is copied.
1615    *
1616    * @param sid the new conversionFactor for the Species.
1617    *
1618    *
1619  * @return integer value indicating success/failure of the
1620  * function.  @if clike The value is drawn from the
1621  * enumeration #OperationReturnValues_t. @endif The possible values
1622  * returned by this function are:
1623  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
1624    * @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
1625    * @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
1626    *
1627    * @note The 'conversionFactor' attribute was introduced in SBML
1628    * Level&nbsp;3.  It does not exist on Species in SBML Levels&nbsp;1
1629    * and&nbsp;2.
1630    */ public
setConversionFactor(string sid)1631  int setConversionFactor(string sid) {
1632     int ret = libsbmlPINVOKE.Species_setConversionFactor(swigCPtr, sid);
1633     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
1634     return ret;
1635   }
1636 
1637 
1638 /**
1639    * Unsets the value of the 'name' attribute of this Species object.
1640    *
1641    *
1642  *
1643  *
1644  * In SBML Level&nbsp;3 Version&nbsp;2, the 'id' and 'name' attributes were
1645  * moved to SBase directly, instead of being defined individually for many
1646  * (but not all) objects.  LibSBML has for a long time provided functions
1647  * defined on SBase itself to get, set, and unset those attributes, which
1648  * would fail or otherwise return empty strings if executed on any object
1649  * for which those attributes were not defined.  Now that all SBase objects
1650  * define those attributes, those functions now succeed for any object with
1651  * the appropriate level and version.
1652  *
1653  * The 'name' attribute is
1654  * optional and is not intended to be used for cross-referencing purposes
1655  * within a model.  Its purpose instead is to provide a human-readable
1656  * label for the component.  The data type of 'name' is the type
1657  * <code>string</code> defined in XML Schema.  SBML imposes no
1658  * restrictions as to the content of 'name' attributes beyond those
1659  * restrictions defined by the <code>string</code> type in XML Schema.
1660  *
1661  * The recommended practice for handling 'name' is as follows.  If a
1662  * software tool has the capability for displaying the content of 'name'
1663  * attributes, it should display this content to the user as a
1664  * component's label instead of the component's 'id'.  If the user
1665  * interface does not have this capability (e.g., because it cannot
1666  * display or use special characters in symbol names), or if the 'name'
1667  * attribute is missing on a given component, then the user interface
1668  * should display the value of the 'id' attribute instead.  (Script
1669  * language interpreters are especially likely to display 'id' instead of
1670  * 'name'.)
1671  *
1672  * As a consequence of the above, authors of systems that automatically
1673  * generate the values of 'id' attributes should be aware some systems
1674  * may display the 'id''s to the user.  Authors therefore may wish to
1675  * take some care to have their software create 'id' values that are: (a)
1676  * reasonably easy for humans to type and read; and (b) likely to be
1677  * meaningful, for example by making the 'id' attribute be an abbreviated
1678  * form of the name attribute value.
1679  *
1680  * An additional point worth mentioning is although there are
1681  * restrictions on the uniqueness of 'id' values, there are no
1682  * restrictions on the uniqueness of 'name' values in a model.  This
1683  * allows software applications leeway in assigning component identifiers.
1684  *
1685  * Regardless of the level and version of the SBML, these functions allow
1686  * client applications to use more generalized code in some situations
1687  * (for instance, when manipulating objects that are all known to have
1688  * names).  If the object in question does not posess a 'name' attribute
1689  * according to the SBML specification for the Level and Version in use,
1690  * libSBML will not allow the name to be set, nor will it read or
1691  * write 'name' attributes for those objects.
1692  *
1693  *
1694  *
1695  *
1696  * @return integer value indicating success/failure of the
1697  * function.  @if clike The value is drawn from the
1698  * enumeration #OperationReturnValues_t. @endif The possible values
1699  * returned by this function are:
1700  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
1701  * @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
1702  *
1703  * @see getName()
1704  * @see setName(string sid)
1705  * @see isSetName()
1706  *
1707  *
1708    */ public new
unsetName()1709  int unsetName() {
1710     int ret = libsbmlPINVOKE.Species_unsetName(swigCPtr);
1711     return ret;
1712   }
1713 
1714 
1715 /**
1716    * Unsets the value of the 'constant' attribute of this Species object.
1717    *
1718    *
1719  * @return integer value indicating success/failure of the
1720  * function.  @if clike The value is drawn from the
1721  * enumeration #OperationReturnValues_t. @endif The possible values
1722  * returned by this function are:
1723  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
1724    * @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
1725    *
1726    * @see isSetConstant()
1727    * @see setConstant(@if java boolean@endif)
1728    * @see getConstant()
1729    */ public
unsetConstant()1730  int unsetConstant() {
1731     int ret = libsbmlPINVOKE.Species_unsetConstant(swigCPtr);
1732     return ret;
1733   }
1734 
1735 
1736 /**
1737    * Unsets the 'speciesType' attribute value of this Species object.
1738    *
1739    *
1740  * @return integer value indicating success/failure of the
1741  * function.  @if clike The value is drawn from the
1742  * enumeration #OperationReturnValues_t. @endif The possible values
1743  * returned by this function are:
1744  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
1745    * @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
1746    *
1747    * @note The attribute 'speciesType' is only available in SBML
1748    * Level&nbsp;2 Versions&nbsp;2&ndash;4.
1749    */ public
unsetSpeciesType()1750  int unsetSpeciesType() {
1751     int ret = libsbmlPINVOKE.Species_unsetSpeciesType(swigCPtr);
1752     return ret;
1753   }
1754 
1755 
1756 /**
1757    * Unsets the 'initialAmount' attribute value of this Species object.
1758    *
1759    *
1760  * @return integer value indicating success/failure of the
1761  * function.  @if clike The value is drawn from the
1762  * enumeration #OperationReturnValues_t. @endif The possible values
1763  * returned by this function are:
1764  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
1765    * @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
1766    */ public
unsetInitialAmount()1767  int unsetInitialAmount() {
1768     int ret = libsbmlPINVOKE.Species_unsetInitialAmount(swigCPtr);
1769     return ret;
1770   }
1771 
1772 
1773 /**
1774    * Unsets the 'initialConcentration' attribute value of this Species object.
1775    *
1776    *
1777  * @return integer value indicating success/failure of the
1778  * function.  @if clike The value is drawn from the
1779  * enumeration #OperationReturnValues_t. @endif The possible values
1780  * returned by this function are:
1781  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
1782    * @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
1783    *
1784    * @note The attribute 'initialConcentration' is only available in SBML
1785    * Level&nbsp;2 and&nbsp;3.  It does not exist on Species in Level&nbsp;1.
1786    */ public
unsetInitialConcentration()1787  int unsetInitialConcentration() {
1788     int ret = libsbmlPINVOKE.Species_unsetInitialConcentration(swigCPtr);
1789     return ret;
1790   }
1791 
1792 
1793 /**
1794    * Unsets the 'substanceUnits' attribute value of this Species object.
1795    *
1796    *
1797  * @return integer value indicating success/failure of the
1798  * function.  @if clike The value is drawn from the
1799  * enumeration #OperationReturnValues_t. @endif The possible values
1800  * returned by this function are:
1801  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
1802    * @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
1803    */ public
unsetSubstanceUnits()1804  int unsetSubstanceUnits() {
1805     int ret = libsbmlPINVOKE.Species_unsetSubstanceUnits(swigCPtr);
1806     return ret;
1807   }
1808 
1809 
1810 /**
1811    * Unsets the 'spatialSizeUnits' attribute value of this Species object.
1812    *
1813    *
1814  * @return integer value indicating success/failure of the
1815  * function.  @if clike The value is drawn from the
1816  * enumeration #OperationReturnValues_t. @endif The possible values
1817  * returned by this function are:
1818  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
1819    * @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
1820    *
1821    *
1822  * @warning <span class='warning'>In versions of SBML Level&nbsp;2 before
1823  * Version&nbsp;3, the class Species included an attribute called
1824  * 'spatialSizeUnits', which allowed explicitly setting the units of size for
1825  * initial concentration.  This attribute was removed in SBML Level&nbsp;2
1826  * Version&nbsp;3.  LibSBML retains this attribute for compatibility with
1827  * older definitions of Level&nbsp;2, but its use is strongly discouraged
1828  * because it is incompatible with levels and versions of SBML beyond
1829  * Level&nbsp;2 Version&nbsp;2.</span>
1830  *
1831    */ public
unsetSpatialSizeUnits()1832  int unsetSpatialSizeUnits() {
1833     int ret = libsbmlPINVOKE.Species_unsetSpatialSizeUnits(swigCPtr);
1834     return ret;
1835   }
1836 
1837 
1838 /**
1839    * Unsets the 'units' attribute value of this Species object.
1840    *
1841    *
1842  * @return integer value indicating success/failure of the
1843  * function.  @if clike The value is drawn from the
1844  * enumeration #OperationReturnValues_t. @endif The possible values
1845  * returned by this function are:
1846  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
1847    * @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
1848    */ public
unsetUnits()1849  int unsetUnits() {
1850     int ret = libsbmlPINVOKE.Species_unsetUnits(swigCPtr);
1851     return ret;
1852   }
1853 
1854 
1855 /**
1856    * Unsets the 'charge' attribute
1857    * value of this Species object.
1858    *
1859    *
1860  * @return integer value indicating success/failure of the
1861  * function.  @if clike The value is drawn from the
1862  * enumeration #OperationReturnValues_t. @endif The possible values
1863  * returned by this function are:
1864  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
1865    * @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
1866    * @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
1867    *
1868    *
1869  * @note Beginning in SBML Level&nbsp;2 Version&nbsp;2, the 'charge'
1870  * attribute on Species is deprecated and in SBML Level&nbsp;3 it does
1871  * not exist at all.  Its use strongly discouraged.  Its presence is
1872  * considered a misfeature in earlier definitions of SBML because its
1873  * implications for the mathematics of a model were never defined, and in
1874  * any case, no known modeling system ever used it.  Instead, models take
1875  * account of charge values directly in their definitions of species by
1876  * (for example) having separate species identities for the charged and
1877  * uncharged versions of the same species.  This allows the condition to
1878  * affect model mathematics directly.  LibSBML retains this method for
1879  * easier compatibility with SBML Level&nbsp;1.
1880    */ public
unsetCharge()1881  int unsetCharge() {
1882     int ret = libsbmlPINVOKE.Species_unsetCharge(swigCPtr);
1883     return ret;
1884   }
1885 
1886 
1887 /**
1888    * Unsets the 'conversionFactor' attribute value of this Species object.
1889    *
1890    *
1891  * @return integer value indicating success/failure of the
1892  * function.  @if clike The value is drawn from the
1893  * enumeration #OperationReturnValues_t. @endif The possible values
1894  * returned by this function are:
1895  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
1896    * @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
1897    * @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
1898    *
1899    * @note The 'conversionFactor' attribute was introduced in SBML
1900    * Level&nbsp;3.  It does not exist on Species in SBML Levels&nbsp;1
1901    * and&nbsp;2.
1902    */ public
unsetConversionFactor()1903  int unsetConversionFactor() {
1904     int ret = libsbmlPINVOKE.Species_unsetConversionFactor(swigCPtr);
1905     return ret;
1906   }
1907 
1908 
1909 /**
1910    * Unsets the 'compartment' attribute value of this Species object.
1911    *
1912    *
1913  * @return integer value indicating success/failure of the
1914  * function.  @if clike The value is drawn from the
1915  * enumeration #OperationReturnValues_t. @endif The possible values
1916  * returned by this function are:
1917  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
1918    * @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
1919    */ public
unsetCompartment()1920  int unsetCompartment() {
1921     int ret = libsbmlPINVOKE.Species_unsetCompartment(swigCPtr);
1922     return ret;
1923   }
1924 
1925 
1926 /**
1927    * Unsets the 'boundaryCondition' attribute value of this Species object.
1928    *
1929    *
1930  * @return integer value indicating success/failure of the
1931  * function.  @if clike The value is drawn from the
1932  * enumeration #OperationReturnValues_t. @endif The possible values
1933  * returned by this function are:
1934  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
1935    * @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
1936    */ public
unsetBoundaryCondition()1937  int unsetBoundaryCondition() {
1938     int ret = libsbmlPINVOKE.Species_unsetBoundaryCondition(swigCPtr);
1939     return ret;
1940   }
1941 
1942 
1943 /**
1944    * Unsets the 'hasOnlySubstanceUnits' attribute value of this Species object.
1945    *
1946    *
1947  * @return integer value indicating success/failure of the
1948  * function.  @if clike The value is drawn from the
1949  * enumeration #OperationReturnValues_t. @endif The possible values
1950  * returned by this function are:
1951  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
1952    * @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
1953    */ public
unsetHasOnlySubstanceUnits()1954  int unsetHasOnlySubstanceUnits() {
1955     int ret = libsbmlPINVOKE.Species_unsetHasOnlySubstanceUnits(swigCPtr);
1956     return ret;
1957   }
1958 
1959 
1960 /**
1961    * Constructs and returns a UnitDefinition that corresponds to the units
1962    * of this Species' amount or concentration.
1963    *
1964    * Species in SBML have an attribute ('substanceUnits') for declaring the
1965    * units of measurement intended for the species' amount or concentration
1966    * (depending on which one applies).  In the absence of a value given for
1967    * 'substanceUnits', the units are taken from the enclosing Model's
1968    * definition of @c 'substance' or @c 'substance'/<em>(size of the
1969    * compartment)</em> in which the species is located, or finally, if
1970    * these are not redefined by the Model, the relevant SBML default units
1971    * for those quantities.  Following that procedure, the method
1972    * @if java Species::getDerivedUnitDefinition()@else getDerivedUnitDefinition()@endif
1973    * returns a UnitDefinition based on the
1974    * interpreted units of this species's amount or concentration.
1975    *
1976    * Note that the functionality that facilitates unit analysis depends
1977    * on the model as a whole.  Thus, in cases where the object has not
1978    * been added to a model or the model itself is incomplete,
1979    * unit analysis is not possible and this method will return @c null.
1980    *
1981    * Note also that unit declarations for Species are in terms of the @em
1982    * identifier of a unit, but this method returns a UnitDefinition object,
1983    * not a unit identifier.  It does this by constructing an appropriate
1984    * UnitDefinition.  Callers may find this particularly useful when used
1985    * in conjunction with the helper methods on UnitDefinition for comparing
1986    * different UnitDefinition objects.
1987    *
1988    * In SBML Level&nbsp;2 specifications prior to Version&nbsp;3, Species
1989    * includes an additional attribute named 'spatialSizeUnits', which
1990    * allows explicitly setting the units of size for initial concentration.
1991    * The @if java Species::getDerivedUnitDefinition()@else getDerivedUnitDefinition()@endif
1992    * takes this into account for models
1993    * expressed in SBML Level&nbsp;2 Versions&nbsp;1 and&nbsp;2.
1994    *
1995    * @return a UnitDefinition that expresses the units of this
1996    * Species, or @c null if one cannot be constructed.
1997    *
1998    * @see getSubstanceUnits()
1999    */ public
getDerivedUnitDefinition()2000  UnitDefinition getDerivedUnitDefinition() {
2001     global::System.IntPtr cPtr = libsbmlPINVOKE.Species_getDerivedUnitDefinition__SWIG_0(swigCPtr);
2002     UnitDefinition ret = (cPtr == global::System.IntPtr.Zero) ? null : new UnitDefinition(cPtr, false);
2003     return ret;
2004   }
2005 
2006 
2007 /**
2008    * Returns the libSBML type code for this SBML object.
2009    *
2010    *
2011  *
2012  * LibSBML attaches an identifying code to every kind of SBML object.  These
2013  * are integer constants known as <em>SBML type codes</em>.  The names of all
2014  * the codes begin with the characters <code>SBML_</code>.
2015  * @if clike The set of possible type codes for core elements is defined in
2016  * the enumeration #SBMLTypeCode_t, and in addition, libSBML plug-ins for
2017  * SBML Level&nbsp;3 packages define their own extra enumerations of type
2018  * codes (e.g., #SBMLLayoutTypeCode_t for the Level&nbsp;3 Layout
2019  * package).@endif@if java In the Java language interface for libSBML, the
2020  * type codes are defined as static integer constants in the interface class
2021  * {@link libsbmlConstants}.  @endif@if python In the Python language
2022  * interface for libSBML, the type codes are defined as static integer
2023  * constants in the interface class @link libsbml@endlink.@endif@if csharp In
2024  * the C# language interface for libSBML, the type codes are defined as
2025  * static integer constants in the interface class
2026  * @link libsbmlcs.libsbml@endlink.@endif  Note that different Level&nbsp;3
2027  * package plug-ins may use overlapping type codes; to identify the package
2028  * to which a given object belongs, call the
2029  * <code>@if conly SBase_getPackageName()
2030  * @else SBase::getPackageName()
2031  * @endif</code>
2032  * method on the object.
2033  *
2034  * The exception to this is lists:  all SBML-style list elements have the type
2035  * @link libsbml#SBML_LIST_OF SBML_LIST_OF@endlink, regardless of what package they
2036  * are from.
2037  *
2038  *
2039    *
2040    * @return the SBML type code for this object:
2041    * @link libsbml#SBML_SPECIES SBML_SPECIES@endlink (default).
2042    *
2043    *
2044  * @warning <span class='warning'>The specific integer values of the possible
2045  * type codes may be reused by different libSBML plug-ins for SBML Level&nbsp;3.
2046  * packages,  To fully identify the correct code, <strong>it is necessary to
2047  * invoke both getPackageName() and getTypeCode()</strong> (or
2048  * ListOf::getItemTypeCode()).</span>
2049  *
2050  *
2051    *
2052    * @see getElementName()
2053    * @see getPackageName()
2054    */ public new
getTypeCode()2055  int getTypeCode() {
2056     int ret = libsbmlPINVOKE.Species_getTypeCode(swigCPtr);
2057     return ret;
2058   }
2059 
2060 
2061 /**
2062    * Returns the XML element name of this object, which for Species, is
2063    * always @c 'species'.
2064    *
2065    * @return the name of this element, i.e., @c 'species'.
2066    */ public new
getElementName()2067  string getElementName() {
2068     string ret = libsbmlPINVOKE.Species_getElementName(swigCPtr);
2069     return ret;
2070   }
2071 
2072 
2073 /**
2074    * Predicate returning @c true if
2075    * all the required attributes for this Species object
2076    * have been set.
2077    *
2078    * The required attributes for a Species object are:
2079    * @li 'id' (or 'name' in SBML Level&nbsp;1)
2080    * @li 'compartment'
2081    * @li 'initialAmount' (required in SBML Level&nbsp;1 only; optional otherwise)
2082    * @li 'hasOnlySubstanceUnits' (required in SBML Level&nbsp;3; optional in SBML Level&nbsp;2)
2083    * @li 'boundaryCondition' (required in SBML Level&nbsp;3; optional in Levels&nbsp;1 and&nbsp;2)
2084    * @li 'constant' (required in SBML Level&nbsp;3; optional in SBML Level&nbsp;2)
2085    *
2086    * @return @c true if the required attributes have been set, @c false
2087    * otherwise.
2088    */ public new
hasRequiredAttributes()2089  bool hasRequiredAttributes() {
2090     bool ret = libsbmlPINVOKE.Species_hasRequiredAttributes(swigCPtr);
2091     return ret;
2092   }
2093 
2094 
2095 /**
2096    *
2097  * Replaces all uses of a given @c SIdRef type attribute value with another
2098  * value.
2099  *
2100  *
2101  *
2102 
2103  * In SBML, object identifiers are of a data type called <code>SId</code>.
2104  * In SBML Level&nbsp;3, an explicit data type called <code>SIdRef</code> was
2105  * introduced for attribute values that refer to <code>SId</code> values; in
2106  * previous Levels of SBML, this data type did not exist and attributes were
2107  * simply described to as 'referring to an identifier', but the effective
2108  * data type was the same as <code>SIdRef</code> in Level&nbsp;3.  These and
2109  * other methods of libSBML refer to the type <code>SIdRef</code> for all
2110  * Levels of SBML, even if the corresponding SBML specification did not
2111  * explicitly name the data type.
2112  *
2113  *
2114  *
2115  * This method works by looking at all attributes and (if appropriate)
2116  * mathematical formulas in MathML content, comparing the referenced
2117  * identifiers to the value of @p oldid.  If any matches are found, the
2118  * matching values are replaced with @p newid.  The method does @em not
2119  * descend into child elements.
2120  *
2121  * @param oldid the old identifier.
2122  * @param newid the new identifier.
2123  *
2124  *
2125    */ public new
renameSIdRefs(string oldid, string newid)2126  void renameSIdRefs(string oldid, string newid) {
2127     libsbmlPINVOKE.Species_renameSIdRefs(swigCPtr, oldid, newid);
2128     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
2129   }
2130 
2131 
2132 /**
2133    *
2134  * Replaces all uses of a given @c UnitSIdRef type attribute value with
2135  * another value.
2136  *
2137  *
2138  *
2139  * In SBML, unit definitions have identifiers of type <code>UnitSId</code>.  In
2140  * SBML Level&nbsp;3, an explicit data type called <code>UnitSIdRef</code> was
2141  * introduced for attribute values that refer to <code>UnitSId</code> values; in
2142  * previous Levels of SBML, this data type did not exist and attributes were
2143  * simply described to as 'referring to a unit identifier', but the effective
2144  * data type was the same as <code>UnitSIdRef</code> in Level&nbsp;3.  These and
2145  * other methods of libSBML refer to the type <code>UnitSIdRef</code> for all
2146  * Levels of SBML, even if the corresponding SBML specification did not
2147  * explicitly name the data type.
2148  *
2149  *
2150  *
2151  * This method works by looking at all unit identifier attribute values
2152  * (including, if appropriate, inside mathematical formulas), comparing the
2153  * referenced unit identifiers to the value of @p oldid.  If any matches
2154  * are found, the matching values are replaced with @p newid.  The method
2155  * does @em not descend into child elements.
2156  *
2157  * @param oldid the old identifier.
2158  * @param newid the new identifier.
2159  *
2160  *
2161    */ public new
renameUnitSIdRefs(string oldid, string newid)2162  void renameUnitSIdRefs(string oldid, string newid) {
2163     libsbmlPINVOKE.Species_renameUnitSIdRefs(swigCPtr, oldid, newid);
2164     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
2165   }
2166 
2167 }
2168 
2169 }
2170