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 reaction between species in an SBML model.
20  *
21  * A @em reaction represents any transformation, transport or binding
22  * process, typically a chemical reaction, that can change the quantity of
23  * one or more species.  In SBML, a reaction is defined primarily in terms
24  * of the participating reactants and products (and their corresponding
25  * stoichiometries), along with optional modifier species, an optional rate
26  * at which the reaction takes place, and optional parameters.
27  *
28  * As with other major objects in SBML, Reaction has a mandatory attribute,
29  * 'id', used to give the reaction an identifier.  The identifier
30  * must be a text string conforming to the identifer syntax permitted in
31  * SBML.  In SBML Level&nbsp;2 and Level&nbsp;3, the reaction 'id'
32  * identifier can be used in mathematical formulas elsewhere in an SBML
33  * model to represent the rate of that reaction; this usage is explained
34  * below.  Reaction also has an optional 'name' attribute, of type
35  * @c string.  The 'id' and 'name' must be used according to the guidelines
36  * described in the SBML specification.
37  *
38  * The species participating as reactants, products, and/or modifiers in a
39  * reaction are declared using lists of SpeciesReference and/or
40  * ModifierSpeciesReference instances stored in subelements
41  * 'listOfReactants', 'listOfProducts' and 'listOfModifiers'.  Certain
42  * restrictions are placed on the appearance of species in reaction
43  * definitions:
44  * <ul>
45  * <li> The ability of a species to appear as a reactant or product of any
46  * reaction in a model is governed by certain flags in that species'
47  * definition; see the definition of Species for more information.
48  *
49  * <li> Any species appearing in the mathematical formula of the subelement
50  * 'kineticLaw' (described below) of a Reaction must be declared in at
51  * least one of that Reaction's lists of reactants, products, and/or
52  * modifiers.  Put another way, it is an error for a reaction's kinetic law
53  * formula to refer to species that have not been declared for that
54  * reaction.
55  *
56  * <li> For SBML Levels 1, 2, and SBML Level&nbsp;3 Version&nbsp;1, a
57  * reaction definition can contain an empty list of reactants
58  * <em>or</em> an empty list of products, but it must have at least one
59  * reactant or product; in other words, a reaction without any reactant or
60  * product species is not permitted.  (This restriction does not apply to
61  * modifier species, which remain optional in all cases.)  In SBML
62  * Level&nbsp;3 Version&nbsp;2, this requirement was dropped, allowing
63  * the creation of reactions with neither reactants nor products.
64  * </ul>
65  *
66  * A reaction can contain up to one KineticLaw object in a subelement named
67  * 'kineticLaw'.  It defines the speed at which the process defined by the
68  * reaction takes place.  The description of KineticLaw provides more
69  * details about its use.  Note that although the inclusion of a KineticLaw
70  * object in an instance of a Reaction component is optional, there is no
71  * useful default that can be substituted in place of a missing rate
72  * expression in a reaction.  Moreover, a reaction's rate cannot be defined
73  * in any other way in SBML---InitialAssignment, AssignmentRule,
74  * RateRule, AlgebraicRule, Event, and other constructs in SBML cannot be
75  * used to set the reaction rate separately.  Nevertheless, for some
76  * modeling applications, reactions without any defined rate can be
77  * perfectly acceptable.
78  *
79  * Reaction also has a boolean attribute named 'reversible' for indicating
80  * whether the reaction is reversible.  This attribute is optional in SBML
81  * Level&nbsp;2, with a default of @c true; it is mandatory in SBML
82  * Level&nbsp;3 (with no default value).  To say that a reaction is @em
83  * reversible is to say it can proceed in either the forward or the reverse
84  * direction.  Although the reversibility of a reaction can sometimes be
85  * deduced by inspecting its rate expression, this is not always the case,
86  * especially for complicated expressions.  Moreover, the need in SBML to
87  * allow rate expressions (i.e., KineticLaw) to be optional leads to the
88  * need for a separate flag indicating reversibility.  Note that labeling a
89  * reaction as irreversible is an assertion that the reaction always
90  * proceeds in the given forward direction.  (Why else would it be flagged
91  * as irreversible?)  This implies the rate expression in the KineticLaw
92  * always has a non-negative value during simulations.  Software tools
93  * could provide a means of optionally testing that this condition holds.
94  * The presence of reversibility information in two places (i.e., the rate
95  * expression and the 'reversible' attribute on Reaction) leaves open the
96  * possibility that a model could contain contradictory information, but
97  * the creation of such a model would be an error on the part of the
98  * software generating it.
99  *
100  * The Reaction object class has another boolean attribute called 'fast'.
101  * This attribute is optional in SBML Level&nbsp;2, with a default of
102  * @c false; it is mandatory in SBML Level&nbsp;3 (with no default value).
103  * In SBML Level&nbsp;3 Version&nbsp;2, a value of @c true for the 'fast'
104  * attribute is deprecated in favor of all reactions having a 'fast' value
105  * of @c false.  It
106  * is used to indicate that a reaction occurs on a vastly faster time scale
107  * than others in a system.  Readers are directed to the SBML Level&nbsp;2
108  * Version&nbsp;4 specification, which provides more detail about the
109  * conditions under which a reaction can be considered to be fast in this
110  * sense.  SBML Level&nbsp;1
111  * and Level&nbsp;2 Version&nbsp;1 incorrectly claimed that software tools
112  * could ignore this attribute if they did not implement support for the
113  * corresponding concept; however, further research in SBML has revealed
114  * that this is not true, and 'fast' <em>cannot be ignored</em> if it is
115  * set to @c true.  SBML Level&nbsp;2 Versions&nbsp;2&ndash;4 therefore
116  * stipulate that if a model has any reactions with 'fast' set to @c true,
117  * a software tool must be able to respect the attribute or else indicate
118  * to the user that it does not have the capacity to do so.  Analysis
119  * software cannot ignore the value of the 'fast' attribute because doing
120  * so may lead to different results as compared to a software system that
121  * <em>does</em> make use of 'fast'.
122  *
123  *
124  *
125  * In SBML Level&nbsp;3 Version&nbsp;2, the 'fast' attribute was
126  * removed.  All reactions are assumed to be equivalent to reactions
127  * in previous levels/versions that have a 'fast' attribute value
128  * of @c false.  Users should be aware that even for previous
129  * levels/versions of the specification, 'fast' attribute values of
130  * @c true never achieved widespread support, and many software
131  * packages may ignore it.  To achieve the same or similar
132  * effects as setting the fast attribute to @c true for a given
133  * reaction, the KineticLaw attribute should be constructed to
134  * produce a value in the desired time scale, or else the
135  * reaction could be replaced with an AssignmentRule or
136  * AlgebraicRule.
137  *
138  *
139  *
140  * In SBML Level&nbsp;3, the Reaction object has an
141  * additional optional attribute named 'compartment', whose value must be
142  * the identifier of a compartment defined in the enclosing Model object.
143  * The 'compartment' attribute can be used to indicate the compartment in
144  * which the reaction is assumed to take place.  If the attribute is
145  * present, its value must be the identifier of a Compartment object
146  * defined in the enclosing Model object.  Similar to the 'reversible'
147  * attribute, the value of the 'compartment' attribute has no direct impact
148  * on the construction of mathematical equations for the SBML model.  When
149  * a kinetic law is given for a reaction, the compartment location may
150  * already be implicit in the kinetic law (although this cannot always be
151  * guaranteed).  Nevertheless, software tools may find the 'compartment'
152  * attribute value useful for such purposes as analyzing the structure of
153  * the model, guiding the modeler in constructing correct rate formulas,
154  * and visualization purposes.
155  *
156  * Readers are urged to read the SBML specification for more details about
157  * the proper use of Reaction.
158  *
159  *
160  *
161  */
162 
163 public class Reaction : SBase {
164 	private HandleRef swigCPtr;
165 
Reaction(IntPtr cPtr, bool cMemoryOwn)166 	internal Reaction(IntPtr cPtr, bool cMemoryOwn) : base(libsbmlPINVOKE.Reaction_SWIGUpcast(cPtr), cMemoryOwn)
167 	{
168 		//super(libsbmlPINVOKE.ReactionUpcast(cPtr), cMemoryOwn);
169 		swigCPtr = new HandleRef(this, cPtr);
170 	}
171 
getCPtr(Reaction obj)172 	internal static HandleRef getCPtr(Reaction obj)
173 	{
174 		return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
175 	}
176 
getCPtrAndDisown(Reaction obj)177 	internal static HandleRef getCPtrAndDisown (Reaction obj)
178 	{
179 		HandleRef ptr = new HandleRef(null, IntPtr.Zero);
180 
181 		if (obj != null)
182 		{
183 			ptr             = obj.swigCPtr;
184 			obj.swigCMemOwn = false;
185 		}
186 
187 		return ptr;
188 	}
189 
Dispose(bool disposing)190   protected override void Dispose(bool disposing) {
191     lock(this) {
192       if (swigCPtr.Handle != global::System.IntPtr.Zero) {
193         if (swigCMemOwn) {
194           swigCMemOwn = false;
195           libsbmlPINVOKE.delete_Reaction(swigCPtr);
196         }
197         swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
198       }
199       base.Dispose(disposing);
200     }
201   }
202 
203 
204 /**
205    * Creates a new Reaction using the given SBML @p level and @p version
206    * values.
207    *
208    * @param level a long integer, the SBML Level to assign to this Reaction.
209    *
210    * @param version a long integer, the SBML Version to assign to this
211    * Reaction.
212    *
213    *
214  * @throws SBMLConstructorException
215  * Thrown if the given @p level and @p version combination are invalid
216  * or if this object is incompatible with the given level and version.
217  *
218  *
219    *
220    *
221  * @note Attempting to add an object to an SBMLDocument having a different
222  * combination of SBML Level, Version and XML namespaces than the object
223  * itself will result in an error at the time a caller attempts to make the
224  * addition.  A parent object must have compatible Level, Version and XML
225  * namespaces.  (Strictly speaking, a parent may also have more XML
226  * namespaces than a child, but the reverse is not permitted.)  The
227  * restriction is necessary to ensure that an SBML model has a consistent
228  * overall structure.  This requires callers to manage their objects
229  * carefully, but the benefit is increased flexibility in how models can be
230  * created by permitting callers to create objects bottom-up if desired.  In
231  * situations where objects are not yet attached to parents (e.g.,
232  * SBMLDocument), knowledge of the intented SBML Level and Version help
233  * libSBML determine such things as whether it is valid to assign a
234  * particular value to an attribute.
235  *
236  *
237    */ public
Reaction(long level, long version)238  Reaction(long level, long version) : this(libsbmlPINVOKE.new_Reaction__SWIG_0(level, version), true) {
239     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
240   }
241 
242 
243 /**
244    * Creates a new Reaction using the given SBMLNamespaces object
245    * @p  sbmlns.
246    *
247    *
248  *
249  * The SBMLNamespaces object encapsulates SBML Level/Version/namespaces
250  * information.  It is used to communicate the SBML Level, Version, and (in
251  * Level&nbsp;3) packages used in addition to SBML Level&nbsp;3 Core.  A
252  * common approach to using libSBML's SBMLNamespaces facilities is to create an
253  * SBMLNamespaces object somewhere in a program once, then hand that object
254  * as needed to object constructors that accept SBMLNamespaces as arguments.
255  *
256  *
257    *
258    * @param sbmlns an SBMLNamespaces object.
259    *
260    *
261  * @throws SBMLConstructorException
262  * Thrown if the given @p sbmlns is inconsistent or incompatible
263  * with this object.
264  *
265  *
266    *
267    *
268  * @note Attempting to add an object to an SBMLDocument having a different
269  * combination of SBML Level, Version and XML namespaces than the object
270  * itself will result in an error at the time a caller attempts to make the
271  * addition.  A parent object must have compatible Level, Version and XML
272  * namespaces.  (Strictly speaking, a parent may also have more XML
273  * namespaces than a child, but the reverse is not permitted.)  The
274  * restriction is necessary to ensure that an SBML model has a consistent
275  * overall structure.  This requires callers to manage their objects
276  * carefully, but the benefit is increased flexibility in how models can be
277  * created by permitting callers to create objects bottom-up if desired.  In
278  * situations where objects are not yet attached to parents (e.g.,
279  * SBMLDocument), knowledge of the intented SBML Level and Version help
280  * libSBML determine such things as whether it is valid to assign a
281  * particular value to an attribute.
282  *
283  *
284    */ public
Reaction(SBMLNamespaces sbmlns)285  Reaction(SBMLNamespaces sbmlns) : this(libsbmlPINVOKE.new_Reaction__SWIG_1(SBMLNamespaces.getCPtr(sbmlns)), true) {
286     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
287   }
288 
289 
290 /**
291    * Copy constructor; creates a copy of this Reaction.
292    *
293    * @param orig the object to copy.
294    */ public
Reaction(Reaction orig)295  Reaction(Reaction orig) : this(libsbmlPINVOKE.new_Reaction__SWIG_2(Reaction.getCPtr(orig)), true) {
296     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
297   }
298 
299 
300 /**
301    * Creates and returns a deep copy of this Reaction object.
302    *
303    * @return the (deep) copy of this Reaction object.
304    */ public new
clone()305  Reaction clone() {
306 	Reaction ret = (Reaction) libsbml.DowncastSBase(libsbmlPINVOKE.Reaction_clone(swigCPtr), true);
307 	return ret;
308 }
309 
310 
311 /**
312    * Returns the first child element found that has the given @p id in the
313    * model-wide SId namespace, or @c null if no such object is found.
314    *
315    * @param id string representing the id of the object to find.
316    *
317    * @return pointer to the first element found with the given @p id.
318    */ public new
getElementBySId(string id)319  SBase getElementBySId(string id) {
320 	SBase ret = (SBase) libsbml.DowncastSBase(libsbmlPINVOKE.Reaction_getElementBySId(swigCPtr, id), false);
321 	return ret;
322 }
323 
324 
325 /**
326    * Returns the first child element it can find with the given @p metaid, or
327    * @c null if no such object is found.
328    *
329    * @param metaid string representing the metaid of the object to find.
330    *
331    * @return pointer to the first element found with the given @p metaid.
332    */ public new
getElementByMetaId(string metaid)333  SBase getElementByMetaId(string metaid) {
334 	SBase ret = (SBase) libsbml.DowncastSBase(libsbmlPINVOKE.Reaction_getElementByMetaId(swigCPtr, metaid), false);
335 	return ret;
336 }
337 
338 
339 /**
340    *
341  * Replaces all uses of a given @c SIdRef type attribute value with another
342  * value.
343  *
344  *
345  *
346 
347  * In SBML, object identifiers are of a data type called <code>SId</code>.
348  * In SBML Level&nbsp;3, an explicit data type called <code>SIdRef</code> was
349  * introduced for attribute values that refer to <code>SId</code> values; in
350  * previous Levels of SBML, this data type did not exist and attributes were
351  * simply described to as 'referring to an identifier', but the effective
352  * data type was the same as <code>SIdRef</code> in Level&nbsp;3.  These and
353  * other methods of libSBML refer to the type <code>SIdRef</code> for all
354  * Levels of SBML, even if the corresponding SBML specification did not
355  * explicitly name the data type.
356  *
357  *
358  *
359  * This method works by looking at all attributes and (if appropriate)
360  * mathematical formulas in MathML content, comparing the referenced
361  * identifiers to the value of @p oldid.  If any matches are found, the
362  * matching values are replaced with @p newid.  The method does @em not
363  * descend into child elements.
364  *
365  * @param oldid the old identifier.
366  * @param newid the new identifier.
367  *
368  *
369    */ public new
renameSIdRefs(string oldid, string newid)370  void renameSIdRefs(string oldid, string newid) {
371     libsbmlPINVOKE.Reaction_renameSIdRefs(swigCPtr, oldid, newid);
372   }
373 
374 
375 /**
376    * Initializes the fields of this Reaction object to 'typical' default
377    * values.
378    *
379    * The SBML Reaction component has slightly different aspects and
380    * default attribute values in different SBML Levels and Versions.
381    * This method sets the values to certain common defaults, based
382    * mostly on what they are in SBML Level&nbsp;2.  Specifically:
383    *
384    * @li Sets the 'reversible' attribute to @c true
385    * @li Sets the 'fast' attribute to @c false
386    * @li Marks the 'fast' attribute as @em not having been set for
387    *     SBML Level&nbsp;2, but @em as having been set for
388    *     SBML Level&nbsp;1 and SBML Level&nbsp;3.
389    *
390    *
391  * @warning <span class='warning'>SBML definitions before SBML Level&nbsp;2
392  * Version&nbsp;2 incorrectly indicated that software tools could ignore the
393  * 'fast' attribute if they did not implement support for the corresponding
394  * concept; however, further research in SBML has revealed that this is not
395  * true, and 'fast' <em>cannot be ignored</em> if it is set to @c true.
396  * Beginning with SBML Level&nbsp;2 Versions&nbsp;2, the SBML specifications
397  * therefore stipulate that if a model has any reactions with 'fast' set to
398  * @c true, a software tool must be able to respect the attribute or else
399  * indicate to the user that it does not have the capacity to do so.  Readers
400  * are directed to the SBML specifications, which provides more detail about
401  * the conditions under which a reaction can be considered to be fast in this
402  * sense.</span>
403  *
404    */ public
initDefaults()405  void initDefaults() {
406     libsbmlPINVOKE.Reaction_initDefaults(swigCPtr);
407   }
408 
409 
410 /**
411    * Returns the value of the 'id' attribute of this Reaction.
412    *
413    * @note Because of the inconsistent behavior of this function with
414    * respect to assignments and rules, it is now recommended to
415    * use the getIdAttribute() function instead.
416    *
417    *
418  *
419  * The identifier given by an object's 'id' attribute value
420  * is used to identify the object within the SBML model definition.
421  * Other objects can refer to the component using this identifier.  The
422  * data type of 'id' is always <code>SId</code> or a type derived
423  * from that, such as <code>UnitSId</code>, depending on the object in
424  * question.  All data types are defined as follows:
425  * <pre style='margin-left: 2em; border: none; font-weight: bold; color: black'>
426  *   letter ::= 'a'..'z','A'..'Z'
427  *   digit  ::= '0'..'9'
428  *   idChar ::= letter | digit | '_'
429  *   SId    ::= ( letter | '_' ) idChar*
430  * </pre>
431  * The characters <code>(</code> and <code>)</code> are used for grouping,
432  * the character <code>*</code> 'zero or more times', and the character
433  * <code>|</code> indicates logical 'or'.  The equality of SBML identifiers
434  * is determined by an exact character sequence match; i.e., comparisons must
435  * be performed in a case-sensitive manner.  This applies to all uses of
436  * <code>SId</code>, <code>SIdRef</code>, and derived types.
437  *
438  * Users need to be aware of some important API issues that are the result of
439  * the history of SBML and libSBML.  Prior to SBML Level&nbsp;3
440  * Version&nbsp;2, SBML defined 'id' and 'name' attributes on only a subset
441  * of SBML objects.  To simplify the work of programmers, libSBML's API
442  * provided get, set, check, and unset on the SBase object class itself
443  * instead of on individual subobject classes. This made the
444  * get/set/etc. methods uniformly available on all objects in the libSBML
445  * API.  LibSBML simply returned empty strings or otherwise did not act when
446  * the methods were applied to SBML objects that were not defined by the SBML
447  * specification to have 'id' or 'name' attributes.  Additional complications
448  * arose with the rule and assignment objects: InitialAssignment,
449  * EventAssignment, AssignmentRule, and RateRule.  In early versions of SBML,
450  * the rule object hierarchy was different, and in addition, then as now,
451  * they possess different attributes: 'variable' (for the rules and event
452  * assignments), 'symbol' (for initial assignments), or neither (for
453  * algebraic rules).  Prior to SBML Level&nbsp;3 Version&nbsp;2, getId()
454  * would always return an empty string, and isSetId() would always return @c
455  * false for objects of these classes.
456  *
457  * With the addition of 'id' and 'name' attributes on SBase in Level&nbsp;3
458  * Version&nbsp;2, it became necessary to introduce a new way to interact
459  * with the attributes more consistently in libSBML to avoid breaking
460  * backward compatibility in the behavior of the original 'id' methods.  For
461  * this reason, libSBML provides four functions (getIdAttribute(),
462  * setIdAttribute(@if java String@endif), isSetIdAttribute(), and
463  * unsetIdAttribute()) that always act on the actual 'id' attribute inherited
464  * from SBase, regardless of the object's type.  <strong>These new methods
465  * should be used instead of the older getId()/setId()/etc. methods</strong>
466  * unless the old behavior is somehow necessary.  Regardless of the Level and
467  * Version of the SBML, these functions allow client applications to use more
468  * generalized code in some situations (for instance, when manipulating
469  * objects that are all known to have identifiers).  If the object in
470  * question does not posess an 'id' attribute according to the SBML
471  * specification for the Level and Version in use, libSBML will not allow the
472  * identifier to be set, nor will it read or write 'id' attributes for those
473  * objects.
474  *
475  *
476    *
477    * @return the id of this Reaction.
478    *
479    * @see getIdAttribute()
480    * @see setIdAttribute(string sid)
481    * @see isSetIdAttribute()
482    * @see unsetIdAttribute()
483    */ public new
getId()484  string getId() {
485     string ret = libsbmlPINVOKE.Reaction_getId(swigCPtr);
486     return ret;
487   }
488 
489 
490 /**
491    * Returns the value of the 'name' attribute of this Reaction object.
492    *
493    *
494  *
495  *
496  * In SBML Level&nbsp;3 Version&nbsp;2, the 'id' and 'name' attributes were
497  * moved to SBase directly, instead of being defined individually for many
498  * (but not all) objects.  LibSBML has for a long time provided functions
499  * defined on SBase itself to get, set, and unset those attributes, which
500  * would fail or otherwise return empty strings if executed on any object
501  * for which those attributes were not defined.  Now that all SBase objects
502  * define those attributes, those functions now succeed for any object with
503  * the appropriate level and version.
504  *
505  * The 'name' attribute is
506  * optional and is not intended to be used for cross-referencing purposes
507  * within a model.  Its purpose instead is to provide a human-readable
508  * label for the component.  The data type of 'name' is the type
509  * <code>string</code> defined in XML Schema.  SBML imposes no
510  * restrictions as to the content of 'name' attributes beyond those
511  * restrictions defined by the <code>string</code> type in XML Schema.
512  *
513  * The recommended practice for handling 'name' is as follows.  If a
514  * software tool has the capability for displaying the content of 'name'
515  * attributes, it should display this content to the user as a
516  * component's label instead of the component's 'id'.  If the user
517  * interface does not have this capability (e.g., because it cannot
518  * display or use special characters in symbol names), or if the 'name'
519  * attribute is missing on a given component, then the user interface
520  * should display the value of the 'id' attribute instead.  (Script
521  * language interpreters are especially likely to display 'id' instead of
522  * 'name'.)
523  *
524  * As a consequence of the above, authors of systems that automatically
525  * generate the values of 'id' attributes should be aware some systems
526  * may display the 'id''s to the user.  Authors therefore may wish to
527  * take some care to have their software create 'id' values that are: (a)
528  * reasonably easy for humans to type and read; and (b) likely to be
529  * meaningful, for example by making the 'id' attribute be an abbreviated
530  * form of the name attribute value.
531  *
532  * An additional point worth mentioning is although there are
533  * restrictions on the uniqueness of 'id' values, there are no
534  * restrictions on the uniqueness of 'name' values in a model.  This
535  * allows software applications leeway in assigning component identifiers.
536  *
537  * Regardless of the level and version of the SBML, these functions allow
538  * client applications to use more generalized code in some situations
539  * (for instance, when manipulating objects that are all known to have
540  * names).  If the object in question does not posess a 'name' attribute
541  * according to the SBML specification for the Level and Version in use,
542  * libSBML will not allow the name to be set, nor will it read or
543  * write 'name' attributes for those objects.
544  *
545  *
546  *
547  * @return the name of this SBML object, or the empty string if not set or unsettable.
548  *
549  * @see getIdAttribute()
550  * @see isSetName()
551  * @see setName(string sid)
552  * @see unsetName()
553  *
554  *
555    */ public new
getName()556  string getName() {
557     string ret = libsbmlPINVOKE.Reaction_getName(swigCPtr);
558     return ret;
559   }
560 
561 
562 /**
563    * Returns the KineticLaw object contained in this Reaction.
564    *
565    * @return the KineticLaw instance.
566    */ public
getKineticLaw()567  KineticLaw getKineticLaw() {
568     global::System.IntPtr cPtr = libsbmlPINVOKE.Reaction_getKineticLaw__SWIG_0(swigCPtr);
569     KineticLaw ret = (cPtr == global::System.IntPtr.Zero) ? null : new KineticLaw(cPtr, false);
570     return ret;
571   }
572 
573 
574 /**
575    * Returns the value of the 'reversible' attribute on the Reaction as a
576    * boolean value.
577    *
578    * @return the reversibility status of this Reaction.
579    */ public
getReversible()580  bool getReversible() {
581     bool ret = libsbmlPINVOKE.Reaction_getReversible(swigCPtr);
582     return ret;
583   }
584 
585 
586 /**
587    * Returns the value of the 'fast' attribute of this Reaction.
588    *
589    *
590  *
591  * In SBML Level&nbsp;3 Version&nbsp;2, the 'fast' attribute was
592  * removed.  All reactions are assumed to be equivalent to reactions
593  * in previous levels/versions that have a 'fast' attribute value
594  * of @c false.  Users should be aware that even for previous
595  * levels/versions of the specification, 'fast' attribute values of
596  * @c true never achieved widespread support, and many software
597  * packages may ignore it.  To achieve the same or similar
598  * effects as setting the fast attribute to @c true for a given
599  * reaction, the KineticLaw attribute should be constructed to
600  * produce a value in the desired time scale, or else the
601  * reaction could be replaced with an AssignmentRule or
602  * AlgebraicRule.
603  *
604  *
605    *
606    * @return the 'fast' status of this Reaction.
607    *
608    *
609  * @warning <span class='warning'>SBML definitions before SBML Level&nbsp;2
610  * Version&nbsp;2 incorrectly indicated that software tools could ignore the
611  * 'fast' attribute if they did not implement support for the corresponding
612  * concept; however, further research in SBML has revealed that this is not
613  * true, and 'fast' <em>cannot be ignored</em> if it is set to @c true.
614  * Beginning with SBML Level&nbsp;2 Versions&nbsp;2, the SBML specifications
615  * therefore stipulate that if a model has any reactions with 'fast' set to
616  * @c true, a software tool must be able to respect the attribute or else
617  * indicate to the user that it does not have the capacity to do so.  Readers
618  * are directed to the SBML specifications, which provides more detail about
619  * the conditions under which a reaction can be considered to be fast in this
620  * sense.</span>
621  *
622    */ public
getFast()623  bool getFast() {
624     bool ret = libsbmlPINVOKE.Reaction_getFast(swigCPtr);
625     return ret;
626   }
627 
628 
629 /**
630    * (SBML Level&nbsp;3 only) Returns the value of the 'compartment'
631    * attribute on the Reaction.
632    *
633    * @return the compartment of this Reaction.
634    *
635    * @note The 'compartment' attribute is available in SBML Level&nbsp;3,
636    * but is not present on Reaction in lower Levels of
637    * SBML.
638    */ public
getCompartment()639  string getCompartment() {
640     string ret = libsbmlPINVOKE.Reaction_getCompartment(swigCPtr);
641     return ret;
642   }
643 
644 
645 /**
646    * Predicate returning @c true if this
647    * Reaction's 'id' attribute is set.
648    *
649    *
650  *
651  *
652  * The identifier given by an object's 'id' attribute value
653  * is used to identify the object within the SBML model definition.
654  * Other objects can refer to the component using this identifier.  The
655  * data type of 'id' is always <code>SId</code> or a type derived
656  * from that, such as <code>UnitSId</code>, depending on the object in
657  * question.  All data types are defined as follows:
658  * <pre style='margin-left: 2em; border: none; font-weight: bold; color: black'>
659  *   letter ::= 'a'..'z','A'..'Z'
660  *   digit  ::= '0'..'9'
661  *   idChar ::= letter | digit | '_'
662  *   SId    ::= ( letter | '_' ) idChar*
663  * </pre>
664  * The characters <code>(</code> and <code>)</code> are used for grouping,
665  * the character <code>*</code> 'zero or more times', and the character
666  * <code>|</code> indicates logical 'or'.  The equality of SBML identifiers
667  * is determined by an exact character sequence match; i.e., comparisons must
668  * be performed in a case-sensitive manner.  This applies to all uses of
669  * <code>SId</code>, <code>SIdRef</code>, and derived types.
670  *
671  * Users need to be aware of some important API issues that are the result of
672  * the history of SBML and libSBML.  Prior to SBML Level&nbsp;3
673  * Version&nbsp;2, SBML defined 'id' and 'name' attributes on only a subset
674  * of SBML objects.  To simplify the work of programmers, libSBML's API
675  * provided get, set, check, and unset on the SBase object class itself
676  * instead of on individual subobject classes. This made the
677  * get/set/etc. methods uniformly available on all objects in the libSBML
678  * API.  LibSBML simply returned empty strings or otherwise did not act when
679  * the methods were applied to SBML objects that were not defined by the SBML
680  * specification to have 'id' or 'name' attributes.  Additional complications
681  * arose with the rule and assignment objects: InitialAssignment,
682  * EventAssignment, AssignmentRule, and RateRule.  In early versions of SBML,
683  * the rule object hierarchy was different, and in addition, then as now,
684  * they possess different attributes: 'variable' (for the rules and event
685  * assignments), 'symbol' (for initial assignments), or neither (for
686  * algebraic rules).  Prior to SBML Level&nbsp;3 Version&nbsp;2, getId()
687  * would always return an empty string, and isSetId() would always return @c
688  * false for objects of these classes.
689  *
690  * With the addition of 'id' and 'name' attributes on SBase in Level&nbsp;3
691  * Version&nbsp;2, it became necessary to introduce a new way to interact
692  * with the attributes more consistently in libSBML to avoid breaking
693  * backward compatibility in the behavior of the original 'id' methods.  For
694  * this reason, libSBML provides four functions (getIdAttribute(),
695  * setIdAttribute(@if java String@endif), isSetIdAttribute(), and
696  * unsetIdAttribute()) that always act on the actual 'id' attribute inherited
697  * from SBase, regardless of the object's type.  <strong>These new methods
698  * should be used instead of the older getId()/setId()/etc. methods</strong>
699  * unless the old behavior is somehow necessary.  Regardless of the Level and
700  * Version of the SBML, these functions allow client applications to use more
701  * generalized code in some situations (for instance, when manipulating
702  * objects that are all known to have identifiers).  If the object in
703  * question does not posess an 'id' attribute according to the SBML
704  * specification for the Level and Version in use, libSBML will not allow the
705  * identifier to be set, nor will it read or write 'id' attributes for those
706  * objects.
707  *
708  *
709  *
710  * @return @c true if the 'id' attribute of this SBML object is
711  * set, @c false otherwise.
712  *
713  * @note Because of the inconsistent behavior of this function with
714  * respect to assignments and rules, it is recommended that callers
715  * use isSetIdAttribute() instead.
716  *
717  * @see getIdAttribute()
718  * @see setIdAttribute(string sid)
719  * @see unsetIdAttribute()
720  * @see isSetIdAttribute()
721  *
722  *
723    */ public new
isSetId()724  bool isSetId() {
725     bool ret = libsbmlPINVOKE.Reaction_isSetId(swigCPtr);
726     return ret;
727   }
728 
729 
730 /**
731    * Predicate returning @c true if this
732    * Reaction's 'name' attribute is set.
733    *
734    *
735  *
736  *
737  * In SBML Level&nbsp;3 Version&nbsp;2, the 'id' and 'name' attributes were
738  * moved to SBase directly, instead of being defined individually for many
739  * (but not all) objects.  LibSBML has for a long time provided functions
740  * defined on SBase itself to get, set, and unset those attributes, which
741  * would fail or otherwise return empty strings if executed on any object
742  * for which those attributes were not defined.  Now that all SBase objects
743  * define those attributes, those functions now succeed for any object with
744  * the appropriate level and version.
745  *
746  * The 'name' attribute is
747  * optional and is not intended to be used for cross-referencing purposes
748  * within a model.  Its purpose instead is to provide a human-readable
749  * label for the component.  The data type of 'name' is the type
750  * <code>string</code> defined in XML Schema.  SBML imposes no
751  * restrictions as to the content of 'name' attributes beyond those
752  * restrictions defined by the <code>string</code> type in XML Schema.
753  *
754  * The recommended practice for handling 'name' is as follows.  If a
755  * software tool has the capability for displaying the content of 'name'
756  * attributes, it should display this content to the user as a
757  * component's label instead of the component's 'id'.  If the user
758  * interface does not have this capability (e.g., because it cannot
759  * display or use special characters in symbol names), or if the 'name'
760  * attribute is missing on a given component, then the user interface
761  * should display the value of the 'id' attribute instead.  (Script
762  * language interpreters are especially likely to display 'id' instead of
763  * 'name'.)
764  *
765  * As a consequence of the above, authors of systems that automatically
766  * generate the values of 'id' attributes should be aware some systems
767  * may display the 'id''s to the user.  Authors therefore may wish to
768  * take some care to have their software create 'id' values that are: (a)
769  * reasonably easy for humans to type and read; and (b) likely to be
770  * meaningful, for example by making the 'id' attribute be an abbreviated
771  * form of the name attribute value.
772  *
773  * An additional point worth mentioning is although there are
774  * restrictions on the uniqueness of 'id' values, there are no
775  * restrictions on the uniqueness of 'name' values in a model.  This
776  * allows software applications leeway in assigning component identifiers.
777  *
778  * Regardless of the level and version of the SBML, these functions allow
779  * client applications to use more generalized code in some situations
780  * (for instance, when manipulating objects that are all known to have
781  * names).  If the object in question does not posess a 'name' attribute
782  * according to the SBML specification for the Level and Version in use,
783  * libSBML will not allow the name to be set, nor will it read or
784  * write 'name' attributes for those objects.
785  *
786  *
787  *
788  * @return @c true if the 'name' attribute of this SBML object is
789  * set, @c false otherwise.
790  *
791  * @see getName()
792  * @see setName(string sid)
793  * @see unsetName()
794  *
795  *
796    */ public new
isSetName()797  bool isSetName() {
798     bool ret = libsbmlPINVOKE.Reaction_isSetName(swigCPtr);
799     return ret;
800   }
801 
802 
803 /**
804    * Predicate returning @c true if this
805    * Reaction contains a kinetic law object.
806    *
807    * @return @c true if a KineticLaw is present in this Reaction,, @c false
808    * otherwise.
809    */ public
isSetKineticLaw()810  bool isSetKineticLaw() {
811     bool ret = libsbmlPINVOKE.Reaction_isSetKineticLaw(swigCPtr);
812     return ret;
813   }
814 
815 
816 /**
817    * Predicate returning @c true if the value of
818    * the 'fast' attribute on this Reaction is set.
819    *
820    *
821  *
822  * In SBML Level&nbsp;3 Version&nbsp;2, the 'fast' attribute was
823  * removed.  All reactions are assumed to be equivalent to reactions
824  * in previous levels/versions that have a 'fast' attribute value
825  * of @c false.  Users should be aware that even for previous
826  * levels/versions of the specification, 'fast' attribute values of
827  * @c true never achieved widespread support, and many software
828  * packages may ignore it.  To achieve the same or similar
829  * effects as setting the fast attribute to @c true for a given
830  * reaction, the KineticLaw attribute should be constructed to
831  * produce a value in the desired time scale, or else the
832  * reaction could be replaced with an AssignmentRule or
833  * AlgebraicRule.
834  *
835  *
836    *
837    * @return @c true if the 'fast' attribute is set, @c false otherwise.
838    *
839    *
840  * @warning <span class='warning'>SBML definitions before SBML Level&nbsp;2
841  * Version&nbsp;2 incorrectly indicated that software tools could ignore the
842  * 'fast' attribute if they did not implement support for the corresponding
843  * concept; however, further research in SBML has revealed that this is not
844  * true, and 'fast' <em>cannot be ignored</em> if it is set to @c true.
845  * Beginning with SBML Level&nbsp;2 Versions&nbsp;2, the SBML specifications
846  * therefore stipulate that if a model has any reactions with 'fast' set to
847  * @c true, a software tool must be able to respect the attribute or else
848  * indicate to the user that it does not have the capacity to do so.  Readers
849  * are directed to the SBML specifications, which provides more detail about
850  * the conditions under which a reaction can be considered to be fast in this
851  * sense.</span>
852  *
853    */ public
isSetFast()854  bool isSetFast() {
855     bool ret = libsbmlPINVOKE.Reaction_isSetFast(swigCPtr);
856     return ret;
857   }
858 
859 
860 /**
861    * Predicate returning @c true if this
862    * Reaction's 'compartment' attribute is set.
863    *
864    * @return @c true if the 'compartment' attribute of this Reaction is
865    * set, @c false otherwise.
866    *
867    * @note The 'compartment' attribute is available in SBML
868    * Level&nbsp;3, but is not present on Reaction in
869    * lower Levels of SBML.
870    */ public
isSetCompartment()871  bool isSetCompartment() {
872     bool ret = libsbmlPINVOKE.Reaction_isSetCompartment(swigCPtr);
873     return ret;
874   }
875 
876 
877 /**
878    * Predicate returning @c true if this
879    * Reaction's 'reversible' attribute is set.
880    *
881    * @return @c true if the 'reversible' attribute of this Reaction is
882    * set, @c false otherwise.
883    */ public
isSetReversible()884  bool isSetReversible() {
885     bool ret = libsbmlPINVOKE.Reaction_isSetReversible(swigCPtr);
886     return ret;
887   }
888 
889 
890 /**
891    * Sets the value of the 'id' attribute of this Reaction.
892    *
893    *
894  *
895  * The string @p sid is copied.
896  *
897  *
898  *
899  * The identifier given by an object's 'id' attribute value
900  * is used to identify the object within the SBML model definition.
901  * Other objects can refer to the component using this identifier.  The
902  * data type of 'id' is always <code>SId</code> or a type derived
903  * from that, such as <code>UnitSId</code>, depending on the object in
904  * question.  All data types are defined as follows:
905  * <pre style='margin-left: 2em; border: none; font-weight: bold; color: black'>
906  *   letter ::= 'a'..'z','A'..'Z'
907  *   digit  ::= '0'..'9'
908  *   idChar ::= letter | digit | '_'
909  *   SId    ::= ( letter | '_' ) idChar*
910  * </pre>
911  * The characters <code>(</code> and <code>)</code> are used for grouping,
912  * the character <code>*</code> 'zero or more times', and the character
913  * <code>|</code> indicates logical 'or'.  The equality of SBML identifiers
914  * is determined by an exact character sequence match; i.e., comparisons must
915  * be performed in a case-sensitive manner.  This applies to all uses of
916  * <code>SId</code>, <code>SIdRef</code>, and derived types.
917  *
918  * Users need to be aware of some important API issues that are the result of
919  * the history of SBML and libSBML.  Prior to SBML Level&nbsp;3
920  * Version&nbsp;2, SBML defined 'id' and 'name' attributes on only a subset
921  * of SBML objects.  To simplify the work of programmers, libSBML's API
922  * provided get, set, check, and unset on the SBase object class itself
923  * instead of on individual subobject classes. This made the
924  * get/set/etc. methods uniformly available on all objects in the libSBML
925  * API.  LibSBML simply returned empty strings or otherwise did not act when
926  * the methods were applied to SBML objects that were not defined by the SBML
927  * specification to have 'id' or 'name' attributes.  Additional complications
928  * arose with the rule and assignment objects: InitialAssignment,
929  * EventAssignment, AssignmentRule, and RateRule.  In early versions of SBML,
930  * the rule object hierarchy was different, and in addition, then as now,
931  * they possess different attributes: 'variable' (for the rules and event
932  * assignments), 'symbol' (for initial assignments), or neither (for
933  * algebraic rules).  Prior to SBML Level&nbsp;3 Version&nbsp;2, getId()
934  * would always return an empty string, and isSetId() would always return @c
935  * false for objects of these classes.
936  *
937  * With the addition of 'id' and 'name' attributes on SBase in Level&nbsp;3
938  * Version&nbsp;2, it became necessary to introduce a new way to interact
939  * with the attributes more consistently in libSBML to avoid breaking
940  * backward compatibility in the behavior of the original 'id' methods.  For
941  * this reason, libSBML provides four functions (getIdAttribute(),
942  * setIdAttribute(@if java String@endif), isSetIdAttribute(), and
943  * unsetIdAttribute()) that always act on the actual 'id' attribute inherited
944  * from SBase, regardless of the object's type.  <strong>These new methods
945  * should be used instead of the older getId()/setId()/etc. methods</strong>
946  * unless the old behavior is somehow necessary.  Regardless of the Level and
947  * Version of the SBML, these functions allow client applications to use more
948  * generalized code in some situations (for instance, when manipulating
949  * objects that are all known to have identifiers).  If the object in
950  * question does not posess an 'id' attribute according to the SBML
951  * specification for the Level and Version in use, libSBML will not allow the
952  * identifier to be set, nor will it read or write 'id' attributes for those
953  * objects.
954  *
955  *
956  *
957  * @param sid the string to use as the identifier of this object.
958  *
959  *
960  * @return integer value indicating success/failure of the
961  * function.  @if clike The value is drawn from the
962  * enumeration #OperationReturnValues_t. @endif The possible values
963  * returned by this function are:
964  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
965  * @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
966  * @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
967  *
968  * @see getIdAttribute()
969  * @see setIdAttribute(string sid)
970  * @see isSetIdAttribute()
971  * @see unsetIdAttribute()
972  *
973  *
974    */ public new
setId(string sid)975  int setId(string sid) {
976     int ret = libsbmlPINVOKE.Reaction_setId(swigCPtr, sid);
977     return ret;
978   }
979 
980 
981 /**
982    * Sets the value of the 'name' attribute of this Reaction.
983    *
984    *
985  *
986  *
987  * The string in @p name is copied.
988  *
989  * @param name the new name for the SBML object.
990  *
991  *
992  * @return integer value indicating success/failure of the
993  * function.  @if clike The value is drawn from the
994  * enumeration #OperationReturnValues_t. @endif The possible values
995  * returned by this function are:
996  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
997  * @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
998  *
999  *
1000    */ public new
setName(string name)1001  int setName(string name) {
1002     int ret = libsbmlPINVOKE.Reaction_setName(swigCPtr, name);
1003     return ret;
1004   }
1005 
1006 
1007 /**
1008    * Sets the 'kineticLaw' subelement of this Reaction to a copy of the
1009    * given KineticLaw object.
1010    *
1011    * @param kl the KineticLaw object to use.
1012    *
1013    *
1014  * @return integer value indicating success/failure of the
1015  * function.  @if clike The value is drawn from the
1016  * enumeration #OperationReturnValues_t. @endif The possible values
1017  * returned by this function are:
1018  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
1019    * @li @link libsbml#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH@endlink
1020    * @li @link libsbml#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH@endlink
1021   */ public
setKineticLaw(KineticLaw kl)1022  int setKineticLaw(KineticLaw kl) {
1023     int ret = libsbmlPINVOKE.Reaction_setKineticLaw(swigCPtr, KineticLaw.getCPtr(kl));
1024     return ret;
1025   }
1026 
1027 
1028 /**
1029    * Sets the value of the 'reversible' attribute of this Reaction.
1030    *
1031    * @param value the value of the 'reversible' attribute.
1032    *
1033    *
1034  * @return integer value indicating success/failure of the
1035  * function.  @if clike The value is drawn from the
1036  * enumeration #OperationReturnValues_t. @endif The possible values
1037  * returned by this function are:
1038  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
1039    */ public
setReversible(bool value)1040  int setReversible(bool value) {
1041     int ret = libsbmlPINVOKE.Reaction_setReversible(swigCPtr, value);
1042     return ret;
1043   }
1044 
1045 
1046 /**
1047    * Sets the value of the 'fast' attribute of this Reaction.
1048    *
1049    *
1050  *
1051  * In SBML Level&nbsp;3 Version&nbsp;2, the 'fast' attribute was
1052  * removed.  All reactions are assumed to be equivalent to reactions
1053  * in previous levels/versions that have a 'fast' attribute value
1054  * of @c false.  Users should be aware that even for previous
1055  * levels/versions of the specification, 'fast' attribute values of
1056  * @c true never achieved widespread support, and many software
1057  * packages may ignore it.  To achieve the same or similar
1058  * effects as setting the fast attribute to @c true for a given
1059  * reaction, the KineticLaw attribute should be constructed to
1060  * produce a value in the desired time scale, or else the
1061  * reaction could be replaced with an AssignmentRule or
1062  * AlgebraicRule.
1063  *
1064  *
1065    *
1066    * Calling this function with an argument of @c true for an
1067    * SBML Level&nbsp;3 Version&nbsp;2 Reaction will not set
1068    * the value, as the attribute does not exist for that level/version.
1069    * @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
1070    *
1071    * @param value the value of the 'fast' attribute.
1072    *
1073    *
1074  * @return integer value indicating success/failure of the
1075  * function.  @if clike The value is drawn from the
1076  * enumeration #OperationReturnValues_t. @endif The possible values
1077  * returned by this function are:
1078  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
1079    * @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
1080    *
1081    *
1082  * @warning <span class='warning'>SBML definitions before SBML Level&nbsp;2
1083  * Version&nbsp;2 incorrectly indicated that software tools could ignore the
1084  * 'fast' attribute if they did not implement support for the corresponding
1085  * concept; however, further research in SBML has revealed that this is not
1086  * true, and 'fast' <em>cannot be ignored</em> if it is set to @c true.
1087  * Beginning with SBML Level&nbsp;2 Versions&nbsp;2, the SBML specifications
1088  * therefore stipulate that if a model has any reactions with 'fast' set to
1089  * @c true, a software tool must be able to respect the attribute or else
1090  * indicate to the user that it does not have the capacity to do so.  Readers
1091  * are directed to the SBML specifications, which provides more detail about
1092  * the conditions under which a reaction can be considered to be fast in this
1093  * sense.</span>
1094  *
1095    */ public
setFast(bool value)1096  int setFast(bool value) {
1097     int ret = libsbmlPINVOKE.Reaction_setFast(swigCPtr, value);
1098     return ret;
1099   }
1100 
1101 
1102 /**
1103    * Sets the value of the 'compartment' attribute of this Reaction.
1104    *
1105    * The string @p sid is copied.
1106    *
1107    * @param sid the string to use as the compartment of this Reaction.
1108    *
1109    *
1110  * @return integer value indicating success/failure of the
1111  * function.  @if clike The value is drawn from the
1112  * enumeration #OperationReturnValues_t. @endif The possible values
1113  * returned by this function are:
1114  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
1115    * @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
1116    * @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
1117    *
1118    * @note The 'compartment' attribute is available in SBML
1119    * Level&nbsp;3, but is not present on Reaction in
1120    * lower Levels of SBML.
1121    */ public
setCompartment(string sid)1122  int setCompartment(string sid) {
1123     int ret = libsbmlPINVOKE.Reaction_setCompartment(swigCPtr, sid);
1124     return ret;
1125   }
1126 
1127 
1128 /**
1129    * Unsets the value of the 'name' attribute of this Reaction.
1130    *
1131    *
1132  *
1133  *
1134  * In SBML Level&nbsp;3 Version&nbsp;2, the 'id' and 'name' attributes were
1135  * moved to SBase directly, instead of being defined individually for many
1136  * (but not all) objects.  LibSBML has for a long time provided functions
1137  * defined on SBase itself to get, set, and unset those attributes, which
1138  * would fail or otherwise return empty strings if executed on any object
1139  * for which those attributes were not defined.  Now that all SBase objects
1140  * define those attributes, those functions now succeed for any object with
1141  * the appropriate level and version.
1142  *
1143  * The 'name' attribute is
1144  * optional and is not intended to be used for cross-referencing purposes
1145  * within a model.  Its purpose instead is to provide a human-readable
1146  * label for the component.  The data type of 'name' is the type
1147  * <code>string</code> defined in XML Schema.  SBML imposes no
1148  * restrictions as to the content of 'name' attributes beyond those
1149  * restrictions defined by the <code>string</code> type in XML Schema.
1150  *
1151  * The recommended practice for handling 'name' is as follows.  If a
1152  * software tool has the capability for displaying the content of 'name'
1153  * attributes, it should display this content to the user as a
1154  * component's label instead of the component's 'id'.  If the user
1155  * interface does not have this capability (e.g., because it cannot
1156  * display or use special characters in symbol names), or if the 'name'
1157  * attribute is missing on a given component, then the user interface
1158  * should display the value of the 'id' attribute instead.  (Script
1159  * language interpreters are especially likely to display 'id' instead of
1160  * 'name'.)
1161  *
1162  * As a consequence of the above, authors of systems that automatically
1163  * generate the values of 'id' attributes should be aware some systems
1164  * may display the 'id''s to the user.  Authors therefore may wish to
1165  * take some care to have their software create 'id' values that are: (a)
1166  * reasonably easy for humans to type and read; and (b) likely to be
1167  * meaningful, for example by making the 'id' attribute be an abbreviated
1168  * form of the name attribute value.
1169  *
1170  * An additional point worth mentioning is although there are
1171  * restrictions on the uniqueness of 'id' values, there are no
1172  * restrictions on the uniqueness of 'name' values in a model.  This
1173  * allows software applications leeway in assigning component identifiers.
1174  *
1175  * Regardless of the level and version of the SBML, these functions allow
1176  * client applications to use more generalized code in some situations
1177  * (for instance, when manipulating objects that are all known to have
1178  * names).  If the object in question does not posess a 'name' attribute
1179  * according to the SBML specification for the Level and Version in use,
1180  * libSBML will not allow the name to be set, nor will it read or
1181  * write 'name' attributes for those objects.
1182  *
1183  *
1184  *
1185  *
1186  * @return integer value indicating success/failure of the
1187  * function.  @if clike The value is drawn from the
1188  * enumeration #OperationReturnValues_t. @endif The possible values
1189  * returned by this function are:
1190  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
1191  * @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
1192  *
1193  * @see getName()
1194  * @see setName(string sid)
1195  * @see isSetName()
1196  *
1197  *
1198    */ public new
unsetName()1199  int unsetName() {
1200     int ret = libsbmlPINVOKE.Reaction_unsetName(swigCPtr);
1201     return ret;
1202   }
1203 
1204 
1205 /**
1206    * Unsets the 'kineticLaw' subelement of this Reaction.
1207    *
1208    *
1209  * @return integer value indicating success/failure of the
1210  * function.  @if clike The value is drawn from the
1211  * enumeration #OperationReturnValues_t. @endif The possible values
1212  * returned by this function are:
1213  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
1214    * @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
1215    */ public
unsetKineticLaw()1216  int unsetKineticLaw() {
1217     int ret = libsbmlPINVOKE.Reaction_unsetKineticLaw(swigCPtr);
1218     return ret;
1219   }
1220 
1221 
1222 /**
1223    * Unsets the value of the 'fast' attribute of this Reaction.
1224    *
1225    *
1226  *
1227  * In SBML Level&nbsp;3 Version&nbsp;2, the 'fast' attribute was
1228  * removed.  All reactions are assumed to be equivalent to reactions
1229  * in previous levels/versions that have a 'fast' attribute value
1230  * of @c false.  Users should be aware that even for previous
1231  * levels/versions of the specification, 'fast' attribute values of
1232  * @c true never achieved widespread support, and many software
1233  * packages may ignore it.  To achieve the same or similar
1234  * effects as setting the fast attribute to @c true for a given
1235  * reaction, the KineticLaw attribute should be constructed to
1236  * produce a value in the desired time scale, or else the
1237  * reaction could be replaced with an AssignmentRule or
1238  * AlgebraicRule.
1239  *
1240  *
1241    *
1242    *
1243  * @return integer value indicating success/failure of the
1244  * function.  @if clike The value is drawn from the
1245  * enumeration #OperationReturnValues_t. @endif The possible values
1246  * returned by this function are:
1247  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
1248    * @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
1249    * @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
1250    *
1251    *
1252  * @warning <span class='warning'>SBML definitions before SBML Level&nbsp;2
1253  * Version&nbsp;2 incorrectly indicated that software tools could ignore the
1254  * 'fast' attribute if they did not implement support for the corresponding
1255  * concept; however, further research in SBML has revealed that this is not
1256  * true, and 'fast' <em>cannot be ignored</em> if it is set to @c true.
1257  * Beginning with SBML Level&nbsp;2 Versions&nbsp;2, the SBML specifications
1258  * therefore stipulate that if a model has any reactions with 'fast' set to
1259  * @c true, a software tool must be able to respect the attribute or else
1260  * indicate to the user that it does not have the capacity to do so.  Readers
1261  * are directed to the SBML specifications, which provides more detail about
1262  * the conditions under which a reaction can be considered to be fast in this
1263  * sense.</span>
1264  *
1265    */ public
unsetFast()1266  int unsetFast() {
1267     int ret = libsbmlPINVOKE.Reaction_unsetFast(swigCPtr);
1268     return ret;
1269   }
1270 
1271 
1272 /**
1273    * Unsets the value of the 'compartment' attribute of this Reaction.
1274    *
1275    *
1276  * @return integer value indicating success/failure of the
1277  * function.  @if clike The value is drawn from the
1278  * enumeration #OperationReturnValues_t. @endif The possible values
1279  * returned by this function are:
1280  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
1281    * @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
1282    * @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
1283    *
1284    * @note The 'compartment' attribute is available in SBML
1285    * Level&nbsp;3, but is not present on Reaction in
1286    * lower Levels of SBML.
1287    */ public
unsetCompartment()1288  int unsetCompartment() {
1289     int ret = libsbmlPINVOKE.Reaction_unsetCompartment(swigCPtr);
1290     return ret;
1291   }
1292 
1293 
1294 /**
1295    * Unsets the value of the 'reversible' attribute of this Reaction.
1296    *
1297    *
1298  * @return integer value indicating success/failure of the
1299  * function.  @if clike The value is drawn from the
1300  * enumeration #OperationReturnValues_t. @endif The possible values
1301  * returned by this function are:
1302  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
1303    * @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
1304    * @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
1305    */ public
unsetReversible()1306  int unsetReversible() {
1307     int ret = libsbmlPINVOKE.Reaction_unsetReversible(swigCPtr);
1308     return ret;
1309   }
1310 
1311 
1312 /**
1313    * Adds a given SpeciesReference object as a reactant in this Reaction.
1314    *
1315    * The SpeciesReference instance in @p sr is copied.
1316    *
1317    * @param sr a SpeciesReference object referring to a Species in the
1318    * enclosing Model.
1319    *
1320    *
1321  * @return integer value indicating success/failure of the
1322  * function.  @if clike The value is drawn from the
1323  * enumeration #OperationReturnValues_t. @endif The possible values
1324  * returned by this function are:
1325  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
1326    * @li @link libsbml#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH@endlink
1327    * @li @link libsbml#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH@endlink
1328    * @li @link libsbml#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID@endlink
1329    * @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
1330    * @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
1331    *
1332    *
1333  * @note This method should be used with some caution.  The fact that this
1334  * method @em copies the object passed to it means that the caller will be
1335  * left holding a physically different object instance than the one contained
1336  * inside this object.  Changes made to the original object instance (such as
1337  * resetting attribute values) will <em>not affect the instance in this
1338  * object</em>.  In addition, the caller should make sure to free the
1339  * original object if it is no longer being used, or else a memory leak will
1340  * result.  Please see other methods on this class (particularly a
1341  * corresponding method whose name begins with the word <code>create</code>)
1342  * for alternatives that do not lead to these issues.
1343  *
1344  *
1345    *
1346    * @see createReactant()
1347    */ public
addReactant(SpeciesReference sr)1348  int addReactant(SpeciesReference sr) {
1349     int ret = libsbmlPINVOKE.Reaction_addReactant__SWIG_0(swigCPtr, SpeciesReference.getCPtr(sr));
1350     return ret;
1351   }
1352 
1353 
1354 /**
1355    * Adds the given species as a reactant with the given stoichiometry
1356    *
1357    * @param species the species to be added as reactant.
1358    *
1359    * @param stoichiometry an optional parameter specifying the
1360    *        stoichiometry of the added reactant (defaulting to 1).
1361    *
1362    * @param id an optional id to be given to the species reference that will
1363    *        be created. (defaulting to empty string, i.e. not set).
1364    *
1365    * @param constant an attribute specifying whether the species reference is
1366    *        constant or not (defaulting to true).
1367    *
1368    *
1369  * @return integer value indicating success/failure of the
1370  * function.  @if clike The value is drawn from the
1371  * enumeration #OperationReturnValues_t. @endif The possible values
1372  * returned by this function are:
1373  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
1374    * @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
1375    * @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
1376    * @li @link libsbml#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID@endlink
1377    *
1378    *
1379  * @note This method should be used with some caution.  The fact that this
1380  * method @em copies the object passed to it means that the caller will be
1381  * left holding a physically different object instance than the one contained
1382  * inside this object.  Changes made to the original object instance (such as
1383  * resetting attribute values) will <em>not affect the instance in this
1384  * object</em>.  In addition, the caller should make sure to free the
1385  * original object if it is no longer being used, or else a memory leak will
1386  * result.  Please see other methods on this class (particularly a
1387  * corresponding method whose name begins with the word <code>create</code>)
1388  * for alternatives that do not lead to these issues.
1389  *
1390  *
1391    *
1392    * @note the Species object itself is NOT added to the model
1393    *
1394    * @see createProduct()
1395    */ public
addReactant(Species species, double stoichiometry, string id, bool constant)1396  int addReactant(Species species, double stoichiometry, string id, bool constant) {
1397     int ret = libsbmlPINVOKE.Reaction_addReactant__SWIG_1(swigCPtr, Species.getCPtr(species), stoichiometry, id, constant);
1398     return ret;
1399   }
1400 
1401 
1402 /**
1403    * Adds the given species as a reactant with the given stoichiometry
1404    *
1405    * @param species the species to be added as reactant.
1406    *
1407    * @param stoichiometry an optional parameter specifying the
1408    *        stoichiometry of the added reactant (defaulting to 1).
1409    *
1410    * @param id an optional id to be given to the species reference that will
1411    *        be created. (defaulting to empty string, i.e. not set).
1412    *
1413    * @param constant an attribute specifying whether the species reference is
1414    *        constant or not (defaulting to true).
1415    *
1416    *
1417  * @return integer value indicating success/failure of the
1418  * function.  @if clike The value is drawn from the
1419  * enumeration #OperationReturnValues_t. @endif The possible values
1420  * returned by this function are:
1421  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
1422    * @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
1423    * @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
1424    * @li @link libsbml#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID@endlink
1425    *
1426    *
1427  * @note This method should be used with some caution.  The fact that this
1428  * method @em copies the object passed to it means that the caller will be
1429  * left holding a physically different object instance than the one contained
1430  * inside this object.  Changes made to the original object instance (such as
1431  * resetting attribute values) will <em>not affect the instance in this
1432  * object</em>.  In addition, the caller should make sure to free the
1433  * original object if it is no longer being used, or else a memory leak will
1434  * result.  Please see other methods on this class (particularly a
1435  * corresponding method whose name begins with the word <code>create</code>)
1436  * for alternatives that do not lead to these issues.
1437  *
1438  *
1439    *
1440    * @note the Species object itself is NOT added to the model
1441    *
1442    * @see createProduct()
1443    */ public
addReactant(Species species, double stoichiometry, string id)1444  int addReactant(Species species, double stoichiometry, string id) {
1445     int ret = libsbmlPINVOKE.Reaction_addReactant__SWIG_2(swigCPtr, Species.getCPtr(species), stoichiometry, id);
1446     return ret;
1447   }
1448 
1449 
1450 /**
1451    * Adds the given species as a reactant with the given stoichiometry
1452    *
1453    * @param species the species to be added as reactant.
1454    *
1455    * @param stoichiometry an optional parameter specifying the
1456    *        stoichiometry of the added reactant (defaulting to 1).
1457    *
1458    * @param id an optional id to be given to the species reference that will
1459    *        be created. (defaulting to empty string, i.e. not set).
1460    *
1461    * @param constant an attribute specifying whether the species reference is
1462    *        constant or not (defaulting to true).
1463    *
1464    *
1465  * @return integer value indicating success/failure of the
1466  * function.  @if clike The value is drawn from the
1467  * enumeration #OperationReturnValues_t. @endif The possible values
1468  * returned by this function are:
1469  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
1470    * @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
1471    * @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
1472    * @li @link libsbml#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID@endlink
1473    *
1474    *
1475  * @note This method should be used with some caution.  The fact that this
1476  * method @em copies the object passed to it means that the caller will be
1477  * left holding a physically different object instance than the one contained
1478  * inside this object.  Changes made to the original object instance (such as
1479  * resetting attribute values) will <em>not affect the instance in this
1480  * object</em>.  In addition, the caller should make sure to free the
1481  * original object if it is no longer being used, or else a memory leak will
1482  * result.  Please see other methods on this class (particularly a
1483  * corresponding method whose name begins with the word <code>create</code>)
1484  * for alternatives that do not lead to these issues.
1485  *
1486  *
1487    *
1488    * @note the Species object itself is NOT added to the model
1489    *
1490    * @see createProduct()
1491    */ public
addReactant(Species species, double stoichiometry)1492  int addReactant(Species species, double stoichiometry) {
1493     int ret = libsbmlPINVOKE.Reaction_addReactant__SWIG_3(swigCPtr, Species.getCPtr(species), stoichiometry);
1494     return ret;
1495   }
1496 
1497 
1498 /**
1499    * Adds the given species as a reactant with the given stoichiometry
1500    *
1501    * @param species the species to be added as reactant.
1502    *
1503    * @param stoichiometry an optional parameter specifying the
1504    *        stoichiometry of the added reactant (defaulting to 1).
1505    *
1506    * @param id an optional id to be given to the species reference that will
1507    *        be created. (defaulting to empty string, i.e. not set).
1508    *
1509    * @param constant an attribute specifying whether the species reference is
1510    *        constant or not (defaulting to true).
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_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
1519    * @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
1520    * @li @link libsbml#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID@endlink
1521    *
1522    *
1523  * @note This method should be used with some caution.  The fact that this
1524  * method @em copies the object passed to it means that the caller will be
1525  * left holding a physically different object instance than the one contained
1526  * inside this object.  Changes made to the original object instance (such as
1527  * resetting attribute values) will <em>not affect the instance in this
1528  * object</em>.  In addition, the caller should make sure to free the
1529  * original object if it is no longer being used, or else a memory leak will
1530  * result.  Please see other methods on this class (particularly a
1531  * corresponding method whose name begins with the word <code>create</code>)
1532  * for alternatives that do not lead to these issues.
1533  *
1534  *
1535    *
1536    * @note the Species object itself is NOT added to the model
1537    *
1538    * @see createProduct()
1539    */ public
addReactant(Species species)1540  int addReactant(Species species) {
1541     int ret = libsbmlPINVOKE.Reaction_addReactant__SWIG_4(swigCPtr, Species.getCPtr(species));
1542     return ret;
1543   }
1544 
1545 
1546 /**
1547    * Adds a given SpeciesReference object as a product in this Reaction.
1548    *
1549    * The SpeciesReference instance in @p sr is copied.
1550    *
1551    * @param sr a SpeciesReference object referring to a Species in the
1552    * enclosing Model.
1553    *
1554    *
1555  * @return integer value indicating success/failure of the
1556  * function.  @if clike The value is drawn from the
1557  * enumeration #OperationReturnValues_t. @endif The possible values
1558  * returned by this function are:
1559  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
1560    * @li @link libsbml#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH@endlink
1561    * @li @link libsbml#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH@endlink
1562    * @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
1563    *
1564    *
1565  * @note This method should be used with some caution.  The fact that this
1566  * method @em copies the object passed to it means that the caller will be
1567  * left holding a physically different object instance than the one contained
1568  * inside this object.  Changes made to the original object instance (such as
1569  * resetting attribute values) will <em>not affect the instance in this
1570  * object</em>.  In addition, the caller should make sure to free the
1571  * original object if it is no longer being used, or else a memory leak will
1572  * result.  Please see other methods on this class (particularly a
1573  * corresponding method whose name begins with the word <code>create</code>)
1574  * for alternatives that do not lead to these issues.
1575  *
1576  *
1577    *
1578    * @see createProduct()
1579    */ public
addProduct(SpeciesReference sr)1580  int addProduct(SpeciesReference sr) {
1581     int ret = libsbmlPINVOKE.Reaction_addProduct__SWIG_0(swigCPtr, SpeciesReference.getCPtr(sr));
1582     return ret;
1583   }
1584 
1585 
1586 /**
1587    * Adds the given species as a product with the given stoichiometry
1588    *
1589    * @param species the species to be added as product.
1590    *
1591    * @param stoichiometry an optional parameter specifying the
1592    *        stoichiometry of the added product (defaulting to 1).
1593    *
1594    * @param id an optional id to be given to the species reference that will
1595    *        be created. (defaulting to empty string, i.e. not set).
1596    *
1597    * @param constant an attribute specifying whether the species reference is
1598    *        constant or not (defaulting to true).
1599    *
1600    *
1601  * @return integer value indicating success/failure of the
1602  * function.  @if clike The value is drawn from the
1603  * enumeration #OperationReturnValues_t. @endif The possible values
1604  * returned by this function are:
1605  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
1606    * @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
1607    * @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
1608    * @li @link libsbml#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID@endlink
1609    *
1610    *
1611  * @note This method should be used with some caution.  The fact that this
1612  * method @em copies the object passed to it means that the caller will be
1613  * left holding a physically different object instance than the one contained
1614  * inside this object.  Changes made to the original object instance (such as
1615  * resetting attribute values) will <em>not affect the instance in this
1616  * object</em>.  In addition, the caller should make sure to free the
1617  * original object if it is no longer being used, or else a memory leak will
1618  * result.  Please see other methods on this class (particularly a
1619  * corresponding method whose name begins with the word <code>create</code>)
1620  * for alternatives that do not lead to these issues.
1621  *
1622  *
1623    *
1624    * @note the Species object itself is NOT added to the model
1625    *
1626    * @see createProduct()
1627    */ public
addProduct(Species species, double stoichiometry, string id, bool constant)1628  int addProduct(Species species, double stoichiometry, string id, bool constant) {
1629     int ret = libsbmlPINVOKE.Reaction_addProduct__SWIG_1(swigCPtr, Species.getCPtr(species), stoichiometry, id, constant);
1630     return ret;
1631   }
1632 
1633 
1634 /**
1635    * Adds the given species as a product with the given stoichiometry
1636    *
1637    * @param species the species to be added as product.
1638    *
1639    * @param stoichiometry an optional parameter specifying the
1640    *        stoichiometry of the added product (defaulting to 1).
1641    *
1642    * @param id an optional id to be given to the species reference that will
1643    *        be created. (defaulting to empty string, i.e. not set).
1644    *
1645    * @param constant an attribute specifying whether the species reference is
1646    *        constant or not (defaulting to true).
1647    *
1648    *
1649  * @return integer value indicating success/failure of the
1650  * function.  @if clike The value is drawn from the
1651  * enumeration #OperationReturnValues_t. @endif The possible values
1652  * returned by this function are:
1653  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
1654    * @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
1655    * @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
1656    * @li @link libsbml#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID@endlink
1657    *
1658    *
1659  * @note This method should be used with some caution.  The fact that this
1660  * method @em copies the object passed to it means that the caller will be
1661  * left holding a physically different object instance than the one contained
1662  * inside this object.  Changes made to the original object instance (such as
1663  * resetting attribute values) will <em>not affect the instance in this
1664  * object</em>.  In addition, the caller should make sure to free the
1665  * original object if it is no longer being used, or else a memory leak will
1666  * result.  Please see other methods on this class (particularly a
1667  * corresponding method whose name begins with the word <code>create</code>)
1668  * for alternatives that do not lead to these issues.
1669  *
1670  *
1671    *
1672    * @note the Species object itself is NOT added to the model
1673    *
1674    * @see createProduct()
1675    */ public
addProduct(Species species, double stoichiometry, string id)1676  int addProduct(Species species, double stoichiometry, string id) {
1677     int ret = libsbmlPINVOKE.Reaction_addProduct__SWIG_2(swigCPtr, Species.getCPtr(species), stoichiometry, id);
1678     return ret;
1679   }
1680 
1681 
1682 /**
1683    * Adds the given species as a product with the given stoichiometry
1684    *
1685    * @param species the species to be added as product.
1686    *
1687    * @param stoichiometry an optional parameter specifying the
1688    *        stoichiometry of the added product (defaulting to 1).
1689    *
1690    * @param id an optional id to be given to the species reference that will
1691    *        be created. (defaulting to empty string, i.e. not set).
1692    *
1693    * @param constant an attribute specifying whether the species reference is
1694    *        constant or not (defaulting to true).
1695    *
1696    *
1697  * @return integer value indicating success/failure of the
1698  * function.  @if clike The value is drawn from the
1699  * enumeration #OperationReturnValues_t. @endif The possible values
1700  * returned by this function are:
1701  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
1702    * @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
1703    * @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
1704    * @li @link libsbml#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID@endlink
1705    *
1706    *
1707  * @note This method should be used with some caution.  The fact that this
1708  * method @em copies the object passed to it means that the caller will be
1709  * left holding a physically different object instance than the one contained
1710  * inside this object.  Changes made to the original object instance (such as
1711  * resetting attribute values) will <em>not affect the instance in this
1712  * object</em>.  In addition, the caller should make sure to free the
1713  * original object if it is no longer being used, or else a memory leak will
1714  * result.  Please see other methods on this class (particularly a
1715  * corresponding method whose name begins with the word <code>create</code>)
1716  * for alternatives that do not lead to these issues.
1717  *
1718  *
1719    *
1720    * @note the Species object itself is NOT added to the model
1721    *
1722    * @see createProduct()
1723    */ public
addProduct(Species species, double stoichiometry)1724  int addProduct(Species species, double stoichiometry) {
1725     int ret = libsbmlPINVOKE.Reaction_addProduct__SWIG_3(swigCPtr, Species.getCPtr(species), stoichiometry);
1726     return ret;
1727   }
1728 
1729 
1730 /**
1731    * Adds the given species as a product with the given stoichiometry
1732    *
1733    * @param species the species to be added as product.
1734    *
1735    * @param stoichiometry an optional parameter specifying the
1736    *        stoichiometry of the added product (defaulting to 1).
1737    *
1738    * @param id an optional id to be given to the species reference that will
1739    *        be created. (defaulting to empty string, i.e. not set).
1740    *
1741    * @param constant an attribute specifying whether the species reference is
1742    *        constant or not (defaulting to true).
1743    *
1744    *
1745  * @return integer value indicating success/failure of the
1746  * function.  @if clike The value is drawn from the
1747  * enumeration #OperationReturnValues_t. @endif The possible values
1748  * returned by this function are:
1749  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
1750    * @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
1751    * @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
1752    * @li @link libsbml#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID@endlink
1753    *
1754    *
1755  * @note This method should be used with some caution.  The fact that this
1756  * method @em copies the object passed to it means that the caller will be
1757  * left holding a physically different object instance than the one contained
1758  * inside this object.  Changes made to the original object instance (such as
1759  * resetting attribute values) will <em>not affect the instance in this
1760  * object</em>.  In addition, the caller should make sure to free the
1761  * original object if it is no longer being used, or else a memory leak will
1762  * result.  Please see other methods on this class (particularly a
1763  * corresponding method whose name begins with the word <code>create</code>)
1764  * for alternatives that do not lead to these issues.
1765  *
1766  *
1767    *
1768    * @note the Species object itself is NOT added to the model
1769    *
1770    * @see createProduct()
1771    */ public
addProduct(Species species)1772  int addProduct(Species species) {
1773     int ret = libsbmlPINVOKE.Reaction_addProduct__SWIG_4(swigCPtr, Species.getCPtr(species));
1774     return ret;
1775   }
1776 
1777 
1778 /**
1779    * Adds a given ModifierSpeciesReference object as a product in this
1780    * Reaction.
1781    *
1782    * The ModifierSpeciesReference instance in @p msr is copied.
1783    *
1784    * @param msr a ModifierSpeciesReference object referring to a Species in
1785    * the enclosing Model.
1786    *
1787    *
1788  * @return integer value indicating success/failure of the
1789  * function.  @if clike The value is drawn from the
1790  * enumeration #OperationReturnValues_t. @endif The possible values
1791  * returned by this function are:
1792  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
1793    * @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
1794    * @li @link libsbml#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH@endlink
1795    * @li @link libsbml#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID@endlink
1796    * @li @link libsbml#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH@endlink
1797    * @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
1798    *
1799    *
1800  * @note This method should be used with some caution.  The fact that this
1801  * method @em copies the object passed to it means that the caller will be
1802  * left holding a physically different object instance than the one contained
1803  * inside this object.  Changes made to the original object instance (such as
1804  * resetting attribute values) will <em>not affect the instance in this
1805  * object</em>.  In addition, the caller should make sure to free the
1806  * original object if it is no longer being used, or else a memory leak will
1807  * result.  Please see other methods on this class (particularly a
1808  * corresponding method whose name begins with the word <code>create</code>)
1809  * for alternatives that do not lead to these issues.
1810  *
1811  *
1812    *
1813    * @see createModifier()
1814    */ public
addModifier(ModifierSpeciesReference msr)1815  int addModifier(ModifierSpeciesReference msr) {
1816     int ret = libsbmlPINVOKE.Reaction_addModifier__SWIG_0(swigCPtr, ModifierSpeciesReference.getCPtr(msr));
1817     return ret;
1818   }
1819 
1820 
1821 /**
1822    * Adds the given species as a modifier to this reaction
1823    *
1824    * @param species the species to be added as modifier.
1825    *
1826    * @param id an optional id to be given to the species reference that will
1827    *        be created. (defaulting to empty string, i.e. not set).
1828    *
1829    *
1830  * @return integer value indicating success/failure of the
1831  * function.  @if clike The value is drawn from the
1832  * enumeration #OperationReturnValues_t. @endif The possible values
1833  * returned by this function are:
1834  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
1835    * @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
1836    * @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
1837    * @li @link libsbml#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID@endlink
1838    *
1839    *
1840  * @note This method should be used with some caution.  The fact that this
1841  * method @em copies the object passed to it means that the caller will be
1842  * left holding a physically different object instance than the one contained
1843  * inside this object.  Changes made to the original object instance (such as
1844  * resetting attribute values) will <em>not affect the instance in this
1845  * object</em>.  In addition, the caller should make sure to free the
1846  * original object if it is no longer being used, or else a memory leak will
1847  * result.  Please see other methods on this class (particularly a
1848  * corresponding method whose name begins with the word <code>create</code>)
1849  * for alternatives that do not lead to these issues.
1850  *
1851  *
1852    *
1853    * @note the Species object itself is NOT added to the model
1854    *
1855    * @see createModifier()
1856    */ public
addModifier(Species species, string id)1857  int addModifier(Species species, string id) {
1858     int ret = libsbmlPINVOKE.Reaction_addModifier__SWIG_1(swigCPtr, Species.getCPtr(species), id);
1859     return ret;
1860   }
1861 
1862 
1863 /**
1864    * Adds the given species as a modifier to this reaction
1865    *
1866    * @param species the species to be added as modifier.
1867    *
1868    * @param id an optional id to be given to the species reference that will
1869    *        be created. (defaulting to empty string, i.e. not set).
1870    *
1871    *
1872  * @return integer value indicating success/failure of the
1873  * function.  @if clike The value is drawn from the
1874  * enumeration #OperationReturnValues_t. @endif The possible values
1875  * returned by this function are:
1876  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
1877    * @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
1878    * @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
1879    * @li @link libsbml#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID@endlink
1880    *
1881    *
1882  * @note This method should be used with some caution.  The fact that this
1883  * method @em copies the object passed to it means that the caller will be
1884  * left holding a physically different object instance than the one contained
1885  * inside this object.  Changes made to the original object instance (such as
1886  * resetting attribute values) will <em>not affect the instance in this
1887  * object</em>.  In addition, the caller should make sure to free the
1888  * original object if it is no longer being used, or else a memory leak will
1889  * result.  Please see other methods on this class (particularly a
1890  * corresponding method whose name begins with the word <code>create</code>)
1891  * for alternatives that do not lead to these issues.
1892  *
1893  *
1894    *
1895    * @note the Species object itself is NOT added to the model
1896    *
1897    * @see createModifier()
1898    */ public
addModifier(Species species)1899  int addModifier(Species species) {
1900     int ret = libsbmlPINVOKE.Reaction_addModifier__SWIG_2(swigCPtr, Species.getCPtr(species));
1901     return ret;
1902   }
1903 
1904 
1905 /**
1906    * Creates a new SpeciesReference, adds it to this Reaction's list of
1907    * reactants, and returns it.
1908    *
1909    * @return a new SpeciesReference object.
1910    */ public
createReactant()1911  SpeciesReference createReactant() {
1912 	SpeciesReference ret
1913 	    = (SpeciesReference) libsbml.DowncastSBase(libsbmlPINVOKE.Reaction_createReactant(swigCPtr), false);
1914 	return ret;
1915 }
1916 
1917 
1918 /**
1919    * Creates a new SpeciesReference, adds it to this Reaction's list of
1920    * products, and returns it.
1921    *
1922    * @return a new SpeciesReference object.
1923    */ public
createProduct()1924  SpeciesReference createProduct() {
1925 	SpeciesReference ret
1926 	    = (SpeciesReference) libsbml.DowncastSBase(libsbmlPINVOKE.Reaction_createProduct(swigCPtr), false);
1927 	return ret;
1928 }
1929 
1930 
1931 /**
1932    * Creates a new ModifierSpeciesReference, adds it to this Reaction's
1933    * list of modifiers and returns it.
1934    *
1935    * @return a new ModifierSpeciesReference object.
1936    */ public
createModifier()1937  ModifierSpeciesReference createModifier() {
1938     global::System.IntPtr cPtr = libsbmlPINVOKE.Reaction_createModifier(swigCPtr);
1939     ModifierSpeciesReference ret = (cPtr == global::System.IntPtr.Zero) ? null : new ModifierSpeciesReference(cPtr, false);
1940     return ret;
1941   }
1942 
1943 
1944 /**
1945    * Creates a new KineticLaw object, installs it as this Reaction's
1946    * 'kineticLaw' subelement, and returns it.
1947    *
1948    * If this Reaction had a previous KineticLaw, it will be destroyed.
1949    *
1950    * @return the new KineticLaw object.
1951    */ public
createKineticLaw()1952  KineticLaw createKineticLaw() {
1953     global::System.IntPtr cPtr = libsbmlPINVOKE.Reaction_createKineticLaw(swigCPtr);
1954     KineticLaw ret = (cPtr == global::System.IntPtr.Zero) ? null : new KineticLaw(cPtr, false);
1955     return ret;
1956   }
1957 
1958 
1959 /**
1960    * Returns the list of reactants in this Reaction object.
1961    *
1962    * @return the ListOfSpeciesReferences containing the references to the
1963    * species acting as reactants in this reaction.
1964    */ public
getListOfReactants()1965  ListOfSpeciesReferences getListOfReactants() {
1966     global::System.IntPtr cPtr = libsbmlPINVOKE.Reaction_getListOfReactants__SWIG_0(swigCPtr);
1967     ListOfSpeciesReferences ret = (cPtr == global::System.IntPtr.Zero) ? null : new ListOfSpeciesReferences(cPtr, false);
1968     return ret;
1969   }
1970 
1971 
1972 /**
1973    * Returns the list of products in this Reaction object.
1974    *
1975    * @return the ListOfSpeciesReferences containing the references to the
1976    * species acting as products in this reaction.
1977    */ public
getListOfProducts()1978  ListOfSpeciesReferences getListOfProducts() {
1979     global::System.IntPtr cPtr = libsbmlPINVOKE.Reaction_getListOfProducts__SWIG_0(swigCPtr);
1980     ListOfSpeciesReferences ret = (cPtr == global::System.IntPtr.Zero) ? null : new ListOfSpeciesReferences(cPtr, false);
1981     return ret;
1982   }
1983 
1984 
1985 /**
1986    * Returns the list of modifiers in this Reaction object.
1987    *
1988    * @return the ListOfSpeciesReferences containing the references to the
1989    * species acting as modifiers in this reaction.
1990    */ public
getListOfModifiers()1991  ListOfSpeciesReferences getListOfModifiers() {
1992     global::System.IntPtr cPtr = libsbmlPINVOKE.Reaction_getListOfModifiers__SWIG_0(swigCPtr);
1993     ListOfSpeciesReferences ret = (cPtr == global::System.IntPtr.Zero) ? null : new ListOfSpeciesReferences(cPtr, false);
1994     return ret;
1995   }
1996 
1997 
1998 /**
1999    * Returns the nth reactant species (as a SpeciesReference object) in
2000    * the list of reactants in this Reaction.
2001    *
2002    * Callers should first call getNumReactants() to find out how many
2003    * reactants there are, to avoid using an invalid index number.
2004    *
2005    * @param n the index of the reactant sought.
2006    *
2007    * @return the nth reactant (as a SpeciesReference object) of this
2008    * Reaction.
2009    * If the index @p n is invalid, @c null is returned.
2010    */ public
getReactant(long n)2011  SpeciesReference getReactant(long n) {
2012 	SpeciesReference ret
2013 	    = (SpeciesReference) libsbml.DowncastSBase(libsbmlPINVOKE.Reaction_getReactant__SWIG_0(swigCPtr, n), false);
2014 	return ret;
2015 }
2016 
2017 
2018 /**
2019    * Returns the reactant species (as a SpeciesReference object) having
2020    * a specific identifier in this Reaction.
2021    *
2022    * @param species the identifier of the reactant Species ('species'
2023    * attribute of the reactant SpeciesReference object).
2024    *
2025    * @return a SpeciesReference object, or @c null if no species with the
2026    * given identifier @p species appears as a reactant in this Reaction.
2027    */ public
getReactant(string species)2028  SpeciesReference getReactant(string species) {
2029 	SpeciesReference ret
2030 	    = (SpeciesReference) libsbml.DowncastSBase(libsbmlPINVOKE.Reaction_getReactant__SWIG_2(swigCPtr, species), false);
2031 	return ret;
2032 }
2033 
2034 
2035 /**
2036    * Returns the nth product species (as a SpeciesReference object) in
2037    * the list of products in this Reaction.
2038    *
2039    * Callers should first call getNumProducts() to find out how many
2040    * products there are, to avoid using an invalid index number.
2041    *
2042    * @param n the index of the product sought.
2043    *
2044    * @return the nth product (as a SpeciesReference object) of this
2045    * Reaction.
2046    * If the index @p n is invalid, @c null is returned.
2047    */ public
getProduct(long n)2048  SpeciesReference getProduct(long n) {
2049 	SpeciesReference ret
2050 	    = (SpeciesReference) libsbml.DowncastSBase(libsbmlPINVOKE.Reaction_getProduct__SWIG_0(swigCPtr, n), false);
2051 	return ret;
2052 }
2053 
2054 
2055 /**
2056    * Returns the product species (as a SpeciesReference object) having
2057    * a specific identifier in this Reaction.
2058    *
2059    * @param species the identifier of the product Species ('species'
2060    * attribute of the product SpeciesReference object).
2061    *
2062    * @return a SpeciesReference object, or @c null if no species with the
2063    * given identifier @p species appears as a product in this Reaction.
2064    */ public
getProduct(string species)2065  SpeciesReference getProduct(string species) {
2066 	SpeciesReference ret
2067 	    = (SpeciesReference) libsbml.DowncastSBase(libsbmlPINVOKE.Reaction_getProduct__SWIG_2(swigCPtr, species), false);
2068 	return ret;
2069 }
2070 
2071 
2072 /**
2073    * Returns the nth modifier species (as a ModifierSpeciesReference object)
2074    * in the list of modifiers of this Reaction.
2075    *
2076    * Callers should first call getNumModifiers() to find out how many
2077    * modifiers there are, to avoid using an invalid index number.
2078    *
2079    * @param n the index of the modifier species sought.
2080    *
2081    * @return the nth modifier (as a ModifierSpeciesReference object) of
2082    * this Reaction.
2083    * If the index @p n is invalid, @c null is returned.
2084    */ public
getModifier(long n)2085  ModifierSpeciesReference getModifier(long n) {
2086     global::System.IntPtr cPtr = libsbmlPINVOKE.Reaction_getModifier__SWIG_0(swigCPtr, n);
2087     ModifierSpeciesReference ret = (cPtr == global::System.IntPtr.Zero) ? null : new ModifierSpeciesReference(cPtr, false);
2088     return ret;
2089   }
2090 
2091 
2092 /**
2093    * Returns the modifier species (as a ModifierSpeciesReference object)
2094    * having a specific identifier in this Reaction.
2095    *
2096    * @param species the identifier of the modifier Species ('species'
2097    * attribute of the ModifierSpeciesReference object).
2098    *
2099    * @return a ModifierSpeciesReference object, or @c null if no species with
2100    * the given identifier @p species appears as a modifier in this
2101    * Reaction.
2102    */ public
getModifier(string species)2103  ModifierSpeciesReference getModifier(string species) {
2104     global::System.IntPtr cPtr = libsbmlPINVOKE.Reaction_getModifier__SWIG_2(swigCPtr, species);
2105     ModifierSpeciesReference ret = (cPtr == global::System.IntPtr.Zero) ? null : new ModifierSpeciesReference(cPtr, false);
2106     return ret;
2107   }
2108 
2109 
2110 /**
2111    * Returns the number of reactant species in this Reaction.
2112    *
2113    * @return the number of reactants in this Reaction.
2114    */ public
getNumReactants()2115  long getNumReactants() { return (long)libsbmlPINVOKE.Reaction_getNumReactants(swigCPtr); }
2116 
2117 
2118 /**
2119    * Returns the number of product species in this Reaction.
2120    *
2121    * @return the number of products in this Reaction.
2122    */ public
getNumProducts()2123  long getNumProducts() { return (long)libsbmlPINVOKE.Reaction_getNumProducts(swigCPtr); }
2124 
2125 
2126 /**
2127    * Returns the number of modifier species in this Reaction.
2128    *
2129    * @return the number of modifiers in this Reaction.
2130    */ public
getNumModifiers()2131  long getNumModifiers() { return (long)libsbmlPINVOKE.Reaction_getNumModifiers(swigCPtr); }
2132 
2133 
2134 /**
2135    * Removes the nth reactant species (SpeciesReference object) in the list of
2136    * reactants in this Reaction and returns a pointer to it.
2137    *
2138    * The caller owns the returned object and is responsible for deleting it.
2139    * The caller should first call getNumReactants() to find out how many
2140    * reactants there are, to avoid using an invalid index number.
2141    *
2142    * @param n the index of the reactant SpeciesReference object to remove.
2143    *
2144    * @return the removed reactant SpeciesReference object, or @c null if the
2145    * given index is out of range.
2146    */ public
removeReactant(long n)2147  SpeciesReference removeReactant(long n) {
2148 	SpeciesReference ret
2149 	    = (SpeciesReference) libsbml.DowncastSBase(libsbmlPINVOKE.Reaction_removeReactant__SWIG_0(swigCPtr, n), true);
2150 	return ret;
2151 }
2152 
2153 
2154 /**
2155    * Removes the reactant species (SpeciesReference object) having the given
2156    * 'species' attribute in this Reaction and returns a pointer to it.
2157    *
2158    * The caller owns the returned object and is responsible for deleting it.
2159    *
2160    * @param species the 'species' attribute of the reactant SpeciesReference
2161    * object.
2162    *
2163    * @return the removed reactant SpeciesReference object, or @c null if no
2164    * reactant SpeciesReference object with the given 'species' attribute
2165    * @p species exists in this Reaction.
2166    */ public
removeReactant(string species)2167  SpeciesReference removeReactant(string species) {
2168 	SpeciesReference ret
2169 	    = (SpeciesReference) libsbml.DowncastSBase(libsbmlPINVOKE.Reaction_removeReactant__SWIG_1(swigCPtr, species), true);
2170 	return ret;
2171 }
2172 
2173 
2174 /**
2175    * Removes the nth product species (SpeciesReference object) in the list of
2176    * products in this Reaction and returns a pointer to it.
2177    *
2178    * The caller owns the returned object and is responsible for deleting it.
2179    * The caller should first call getNumProducts() to find out how many
2180    * products there are, to avoid using an invalid index number.
2181    *
2182    * @param n the index of the product SpeciesReference object to remove.
2183    *
2184    * @return the removed product SpeciesReference object, or @c null if the
2185    * given index is out of range.
2186    */ public
removeProduct(long n)2187  SpeciesReference removeProduct(long n) {
2188 	SpeciesReference ret
2189 	    = (SpeciesReference) libsbml.DowncastSBase(libsbmlPINVOKE.Reaction_removeProduct__SWIG_0(swigCPtr, n), true);
2190 	return ret;
2191 }
2192 
2193 
2194 /**
2195    * Removes the product species (SpeciesReference object) having the given
2196    * 'species' attribute in this Reaction and returns a pointer to it.
2197    *
2198    * The caller owns the returned object and is responsible for deleting it.
2199    *
2200    * @param species the 'species' attribute of the product SpeciesReference
2201    * object.
2202    *
2203    * @return the removed product SpeciesReference object, or @c null if no
2204    * product SpeciesReference object with the given 'species' attribute
2205    * @p species exists in this Reaction.
2206    */ public
removeProduct(string species)2207  SpeciesReference removeProduct(string species) {
2208 	SpeciesReference ret
2209 	    = (SpeciesReference) libsbml.DowncastSBase(libsbmlPINVOKE.Reaction_removeProduct__SWIG_1(swigCPtr, species), true);
2210 	return ret;
2211 }
2212 
2213 
2214 /**
2215    * Removes the nth modifier species (ModifierSpeciesReference object) in
2216    * the list of  modifiers in this Reaction and returns a pointer to it.
2217    *
2218    * The caller owns the returned object and is responsible for deleting it.
2219    * The caller should first call getNumModifiers() to find out how many
2220    * modifiers there are, to avoid using an invalid index number.
2221    *
2222    * @param n the index of the ModifierSpeciesReference object to remove.
2223    *
2224    * @return the removed ModifierSpeciesReference object, or @c null if the
2225    * given index is out of range.
2226    */ public
removeModifier(long n)2227  ModifierSpeciesReference removeModifier(long n) {
2228     global::System.IntPtr cPtr = libsbmlPINVOKE.Reaction_removeModifier__SWIG_0(swigCPtr, n);
2229     ModifierSpeciesReference ret = (cPtr == global::System.IntPtr.Zero) ? null : new ModifierSpeciesReference(cPtr, true);
2230     return ret;
2231   }
2232 
2233 
2234 /**
2235    * Removes the modifier species (ModifierSpeciesReference object) having
2236    * the given 'species' attribute in this Reaction and returns a pointer to it.
2237    *
2238    * The caller owns the returned object and is responsible for deleting it.
2239    *
2240    * @param species the 'species' attribute of the ModifierSpeciesReference
2241    * object.
2242    *
2243    * @return the removed ModifierSpeciesReference object, or @c null if no
2244    * ModifierSpeciesReference object with the given 'species' attribute @p
2245    * species exists in this Reaction.
2246    */ public
removeModifier(string species)2247  ModifierSpeciesReference removeModifier(string species) {
2248     global::System.IntPtr cPtr = libsbmlPINVOKE.Reaction_removeModifier__SWIG_1(swigCPtr, species);
2249     ModifierSpeciesReference ret = (cPtr == global::System.IntPtr.Zero) ? null : new ModifierSpeciesReference(cPtr, true);
2250     return ret;
2251   }
2252 
connectToChild()2253   public override void connectToChild() {
2254     libsbmlPINVOKE.Reaction_connectToChild(swigCPtr);
2255   }
2256 
2257 
2258 /** */ /* libsbml-internal */ public new
enablePackageInternal(string pkgURI, string pkgPrefix, bool flag)2259  void enablePackageInternal(string pkgURI, string pkgPrefix, bool flag) {
2260     libsbmlPINVOKE.Reaction_enablePackageInternal(swigCPtr, pkgURI, pkgPrefix, flag);
2261   }
2262 
2263 
2264 /** */ /* libsbml-internal */ public new
updateSBMLNamespace(string package, long level, long version)2265  void updateSBMLNamespace(string package, long level, long version) {
2266     libsbmlPINVOKE.Reaction_updateSBMLNamespace(swigCPtr, package, level, version);
2267   }
2268 
2269 
2270 /**
2271    * Returns the libSBML type code for this SBML object.
2272    *
2273    *
2274  *
2275  * LibSBML attaches an identifying code to every kind of SBML object.  These
2276  * are integer constants known as <em>SBML type codes</em>.  The names of all
2277  * the codes begin with the characters <code>SBML_</code>.
2278  * @if clike The set of possible type codes for core elements is defined in
2279  * the enumeration #SBMLTypeCode_t, and in addition, libSBML plug-ins for
2280  * SBML Level&nbsp;3 packages define their own extra enumerations of type
2281  * codes (e.g., #SBMLLayoutTypeCode_t for the Level&nbsp;3 Layout
2282  * package).@endif@if java In the Java language interface for libSBML, the
2283  * type codes are defined as static integer constants in the interface class
2284  * {@link libsbmlConstants}.  @endif@if python In the Python language
2285  * interface for libSBML, the type codes are defined as static integer
2286  * constants in the interface class @link libsbml@endlink.@endif@if csharp In
2287  * the C# language interface for libSBML, the type codes are defined as
2288  * static integer constants in the interface class
2289  * @link libsbmlcs.libsbml@endlink.@endif  Note that different Level&nbsp;3
2290  * package plug-ins may use overlapping type codes; to identify the package
2291  * to which a given object belongs, call the
2292  * <code>@if conly SBase_getPackageName()
2293  * @else SBase::getPackageName()
2294  * @endif</code>
2295  * method on the object.
2296  *
2297  * The exception to this is lists:  all SBML-style list elements have the type
2298  * @link libsbml#SBML_LIST_OF SBML_LIST_OF@endlink, regardless of what package they
2299  * are from.
2300  *
2301  *
2302    *
2303    * @return the SBML type code for this object:
2304    * @link libsbml#SBML_REACTION SBML_REACTION@endlink (default).
2305    *
2306    *
2307  * @warning <span class='warning'>The specific integer values of the possible
2308  * type codes may be reused by different libSBML plug-ins for SBML Level&nbsp;3.
2309  * packages,  To fully identify the correct code, <strong>it is necessary to
2310  * invoke both getPackageName() and getTypeCode()</strong> (or
2311  * ListOf::getItemTypeCode()).</span>
2312  *
2313  *
2314    *
2315    * @see getElementName()
2316    * @see getPackageName()
2317    */ public new
getTypeCode()2318  int getTypeCode() {
2319     int ret = libsbmlPINVOKE.Reaction_getTypeCode(swigCPtr);
2320     return ret;
2321   }
2322 
2323 
2324 /**
2325    * Returns the XML element name of this object, which for Reaction, is
2326    * always @c 'reaction'.
2327    *
2328    * @return the name of this element, i.e., @c 'reaction'.
2329    */ public new
getElementName()2330  string getElementName() {
2331     string ret = libsbmlPINVOKE.Reaction_getElementName(swigCPtr);
2332     return ret;
2333   }
2334 
2335 
2336 /**
2337    * Predicate returning @c true if all the required attributes for this
2338    * Reaction object have been set.
2339    *
2340    * The required attributes for a Reaction object are:
2341    * @li 'id' (or 'name' in SBML Level&nbsp;1)
2342    * @li 'fast' (in Level&nbsp;3 Version&nbsp;1 only, where it is defined as a required attribute)
2343    * @li 'reversible' (in Level&nbsp;3 only, where it is defined as a required attribute)
2344    *
2345    * @return @c true if the required attributes have been set, @c false
2346    * otherwise.
2347    */ public new
hasRequiredAttributes()2348  bool hasRequiredAttributes() {
2349     bool ret = libsbmlPINVOKE.Reaction_hasRequiredAttributes(swigCPtr);
2350     return ret;
2351   }
2352 
2353 }
2354 
2355 }
2356