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