1 using System;
2 using System.Runtime.InteropServices;
3 
4 //------------------------------------------------------------------------------
5 // <auto-generated />
6 //
7 // This file was automatically generated by SWIG (http://www.swig.org).
8 // Version 4.0.2
9 //
10 // Do not make changes to this file unless you know what you are doing--modify
11 // the SWIG interface file instead.
12 //------------------------------------------------------------------------------
13 
14 namespace libsbmlcs {
15 
16  using System;
17  using System.Runtime.InteropServices;
18 
19 /**
20  * @sbmlpackage{core}
21  *
22 @htmlinclude pkg-marker-core.html An SBML model.
23  *
24  * In an SBML model definition, a single object of class Model serves as
25  * the overall container for the lists of the various model components.
26  * All of the lists are optional, but if a given list container is present
27  * within the model, the list must not be empty; that is, it must have
28  * length one or more.  The following are the components and lists
29  * permitted in different Levels and Versions of SBML in
30  * version @htmlinclude libsbml-version.html
31  * of libSBML:
32  * <ul>
33  * <li> In SBML Level 1, the components are: UnitDefinition, Compartment,
34  * Species, Parameter, Rule, and Reaction.  Instances of the classes are
35  * placed inside instances of classes ListOfUnitDefinitions,
36  * ListOfCompartments, ListOfSpecies, ListOfParameters, ListOfRules, and
37  * ListOfReactions.
38  *
39  * <li> In SBML Level 2 Version 1, the components are: FunctionDefinition,
40  * UnitDefinition, Compartment, Species, Parameter, Rule, Reaction and
41  * Event.  Instances of the classes are placed inside instances of classes
42  * ListOfFunctionDefinitions, ListOfUnitDefinitions, ListOfCompartments,
43  * ListOfSpecies, ListOfParameters, ListOfRules, ListOfReactions, and
44  * ListOfEvents.
45  *
46  * <li> In SBML Level 2 Versions 2, 3 and 4, the components are:
47  * FunctionDefinition, UnitDefinition, CompartmentType, SpeciesType,
48  * Compartment, Species, Parameter, InitialAssignment, Rule, Constraint,
49  * Reaction and Event.  Instances of the classes are placed inside
50  * instances of classes ListOfFunctionDefinitions, ListOfUnitDefinitions,
51  * ListOfCompartmentTypes, ListOfSpeciesTypes, ListOfCompartments,
52  * ListOfSpecies, ListOfParameters, ListOfInitialAssignments, ListOfRules,
53  * ListOfConstraints, ListOfReactions, and ListOfEvents.
54  *
55  * <li> In SBML Level 3 Version 1, the components are: FunctionDefinition,
56  * UnitDefinition, Compartment, Species, Parameter, InitialAssignment,
57  * Rule, Constraint, Reaction and Event.  Instances of the classes are
58  * placed inside instances of classes ListOfFunctionDefinitions,
59  * ListOfUnitDefinitions, ListOfCompartments, ListOfSpecies,
60  * ListOfParameters, ListOfInitialAssignments, ListOfRules,
61  * ListOfConstraints, ListOfReactions, and ListOfEvents.
62  * </ul>
63  *
64  * Although all the lists are optional, there are dependencies between SBML
65  * components such that defining some components requires defining others.
66  * An example is that defining a species requires defining a compartment,
67  * and defining a reaction requires defining a species.  The dependencies
68  * are explained in more detail in the SBML specifications.
69  *
70  * In addition to the above lists and attributes, the Model class in both
71  * SBML Level&nbsp;2 and Level&nbsp;3 has the usual two attributes of 'id'
72  * and 'name', and both are optional.  As is the case for other SBML
73  * components with 'id' and 'name' attributes, they must be used according
74  * to the guidelines described in the SBML specifications.  (Within the
75  * frameworks of SBML Level&nbsp;2 and Level&nbsp;3, a
76  * Model object identifier has no assigned meaning, but extension packages
77  * planned for SBML Level&nbsp;3 are likely to make use of this
78  * identifier.)
79  *
80  * Finally, SBML Level&nbsp;3 has introduced a number of additional Model
81  * attributes.  They are discussed in a separate section below.
82  *
83  *
84  * @section approaches Approaches to creating objects using the libSBML API
85  *
86  * LibSBML provides two main mechanisms for creating objects: class
87  * constructors
88  * (e.g., @if java <a href='org/sbml/libsbml/Species.html'>Species()</a> @else Species::Species() @endif),
89  * and <code>create<span class='placeholder-nospace'><em>Object</em></span>()</code>
90  * methods (such as Model::createSpecies()) provided by certain <span
91  * class='placeholder-nospace'><em>Object</em></span> classes such as Model.  These
92  * multiple mechanisms are provided by libSBML for flexibility and to
93  * support different use-cases, but they also have different implications
94  * for the overall model structure.
95  *
96  * In general, the recommended approach is to use the <code>create<span
97  * class='placeholder-nospace'><em>Object</em></span>()</code> methods.  These
98  * methods both create an object @em and link it to the parent in one step.
99  * Here is an example:@if clike
100  * @code{.cpp}
101 // Create an SBMLDocument object in Level 3 Version 1 format:
102 
103 SBMLDocument sbmlDoc = new SBMLDocument(3, 1);
104 
105 // Create a Model object inside the SBMLDocument object and set
106 // its identifier.  The call returns a pointer to the Model object
107 // created, and methods called on that object affect the attributes
108 // of the object attached to the model (as expected).
109 
110 Model model = sbmlDoc->createModel();
111 model->setId('BestModelEver');
112 
113 // Create a Species object inside the Model and set its identifier.
114 // Similar to the lines above, this call returns a pointer to the Species
115 // object created, and methods called on that object affect the attributes
116 // of the object attached to the model (as expected).
117 
118 Species sp = model->createSpecies();
119 sp->setId('MySpecies');
120 @endcode
121  * @endif@if java
122 @code{.java}
123 // Create an SBMLDocument object in Level 3 Version 1 format:
124 
125 SBMLDocument sbmlDoc = new SBMLDocument(3, 1);
126 
127 // Create a Model object inside the SBMLDocument object and set
128 // its identifier.  The call returns a pointer to the Model object
129 // created, and methods called on that object affect the attributes
130 // of the object attached to the model (as expected).  Note that
131 // the call to setId() returns a status code, and a real program
132 // should check this status code to make sure everything went okay.
133 
134 Model model = sbmlDoc.createModel();
135 model.setId(&#34;BestModelEver&#34;);
136 
137 // Create a Species object inside the Model and set its identifier.
138 // Similar to the lines above, this call returns a pointer to the Species
139 // object created, and methods called on that object affect the attributes
140 // of the object attached to the model (as expected).  Note that, like
141 // with Model, the call to setId() returns a status code, and a real program
142 // should check this status code to make sure everything went okay.
143 
144 Species sp = model.createSpecies();
145 sp.setId(&#34;BestSpeciesEver&#34;);
146 @endcode
147  * @endif@if python
148 @code{.py}
149 # Create an SBMLDocument object in Level 3 Version 1 format.
150 # Make sure to check for possible failures.
151 
152 try:
153   sbmlDoc = SBMLDocument(3, 1)
154 except ValueError:
155   print('Could not create SBMLDocument object')
156   sys.exit(1)
157 
158 # Create a Model object inside the SBMLDocument object and set its
159 # identifier, checking the returned values.  The call to setId() returns a
160 # status code to indicate whether the assignment was successful.
161 
162 model = sbmlDoc.createModel()
163 if model == None:
164   # Do something to handle the error here.
165   print('Unable to create Model object.')
166   sys.exit(1)
167 
168 status = model.setId('BestModelEver')
169 if status != LIBSBML_OPERATION_SUCCESS:
170   # Do something to handle the error here.
171   print('Unable to set identifier on the Model object')
172   sys.exit(1)
173 
174 # Create a Species object inside the Model and set its identifier.
175 # Again, the setId() returns a status code to indicate whether the
176 # assignment was successful.
177 
178 sp = model.createSpecies()
179 if sp == None:
180   # Do something to handle the error here.
181   print('Unable to create Species object.')
182   sys.exit(1)
183 
184 status = sp.setId('BestSpeciesEver')
185 if status != LIBSBML_OPERATION_SUCCESS:
186   # Do something to handle the error here.
187   print('Unable to set identifier on the Species object')
188   sys.exit(1)
189 @endcode
190  * @endif@if csharp
191 @code
192 // Create an SBMLDocument object in Level 3 Version 1 format:
193 
194 SBMLDocument sbmlDoc = new SBMLDocument(3, 1);
195 
196 // Create a Model object inside the SBMLDocument object and set
197 // its identifier.  The call returns a pointer to the Model object
198 // created, and methods called on that object affect the attributes
199 // of the object attached to the model (as expected).
200 
201 Model model = sbmlDoc.createModel();
202 model.setId('BestModelEver');
203 
204 // Create a Species object inside the Model and set its identifier.
205 // Similar to the lines above, this call returns a pointer to the Species
206 // object created, and methods called on that object affect the attributes
207 // of the object attached to the model (as expected).
208 
209 Species sp = model.createSpecies();
210 sp.setId('MySpecies');
211 @endcode
212  * @endif
213  *
214  * The <code>create<span
215  * class='placeholder-nospace'><em>Object</em></span>()</code> methods return a
216  * pointer to the object created, but they also add the object to the
217  * relevant list of object instances contained in the parent.  (These lists
218  * become the <code>&lt;listOf<span
219  * class='placeholder-nospace'><em>Object</em></span>s&gt;</code> elements in the
220  * finished XML rendition of SBML.)  In the example above,
221  * Model::createSpecies() adds the created species directly to the
222  * <code>&lt;listOfSpeciesgt;</code> list in the model.  Subsequently,
223  * methods called on the species change the species in the model (which is
224  * what is expected in most situations).
225  *
226  * @section model-checking Consistency and adherence to SBML specifications
227  *
228  * To make it easier for applications to do whatever they need,
229  * libSBML version @htmlinclude libsbml-version.html
230  * is relatively lax when it comes to enforcing correctness and
231  * completeness of models @em during model construction and editing.
232  * Essentially, libSBML @em will @em not in most cases check automatically
233  * that a model's components have valid attribute values, or that the
234  * overall model is consistent and free of errors---even obvious errors
235  * such as duplication of identifiers.  This allows applications great
236  * leeway in how they build their models, but it means that software
237  * authors must take deliberate steps to ensure that the model will be, in
238  * the end, valid SBML.  These steps include such things as keeping track
239  * of the identifiers used in a model, manually performing updates in
240  * certain situations where an entity is referenced in more than one place
241  * (e.g., a species that is referenced by multiple SpeciesReference
242  * objects), and so on.
243  *
244  * That said, libSBML does provide powerful features for deliberately
245  * performing validation of SBML when an application decides it is time to
246  * do so.  The interfaces to these facilities are on the SBMLDocument
247  * class, in the form of SBMLDocument::checkInternalConsistency() and
248  * SBMLDocument::checkConsistency().  Please refer to the documentation for
249  * SBMLDocument for more information about this.
250  *
251  * While applications may play fast and loose and live like free spirits
252  * during the construction and editing of SBML models, they should always
253  * make sure to call SBMLDocument::checkInternalConsistency() and/or
254  * SBMLDocument::checkConsistency() before writing out the final version of
255  * an SBML model.
256  *
257  *
258  * @section model-l3-attrib Model attributes introduced in SBML Level&nbsp;3
259  *
260  * As mentioned above, the Model class has a number of optional attributes
261  * in SBML Level&nbsp;3.  These are 'substanceUnits',
262  * 'timeUnits', 'volumeUnits', 'areaUnits', 'lengthUnits', 'extentUnits',
263  * and 'conversionFactor.  The following provide more information about
264  * them.
265  *
266  * @subsection model-l3-substanceunits The 'substanceUnits' attribute
267  *
268  * The 'substanceUnits' attribute is used to specify the unit of
269  * measurement associated with substance quantities of Species objects that
270  * do not specify units explicitly.  If a given Species object definition
271  * does not specify its unit of substance quantity via the 'substanceUnits'
272  * attribute on the Species object instance, then that species inherits the
273  * value of the Model 'substanceUnits' attribute.  If the Model does not
274  * define a value for this attribute, then there is no unit to inherit, and
275  * all species that do not specify individual 'substanceUnits' attribute
276  * values then have <em>no</em> declared units for their quantities.  The
277  * SBML Level&nbsp;3 specifications provide more details.
278  *
279  * Note that when the identifier of a species appears in a model's
280  * mathematical expressions, the unit of measurement associated with that
281  * identifier is <em>not solely determined</em> by setting 'substanceUnits'
282  * on Model or Species.  Please see the discussion about units given in
283  * the documentation for the Species class.
284  *
285  *
286  * @subsection model-l3-timeunits The 'timeUnits' attribute
287  *
288  * The 'timeUnits' attribute on SBML Level&nbsp;3's Model object is used to
289  * specify the unit in which time is measured in the model.  This attribute
290  * on Model is the <em>only</em> way to specify a unit for time in a model.
291  * It is a global attribute; time is measured in the model everywhere in
292  * the same way.  This is particularly relevant to Reaction and RateRule
293  * objects in a model: all Reaction and RateRule objects in SBML define
294  * per-time values, and the unit of time is given by the 'timeUnits'
295  * attribute on the Model object instance.  If the Model 'timeUnits'
296  * attribute has no value, it means that the unit of time is not defined
297  * for the model's reactions and rate rules.  Leaving it unspecified in an
298  * SBML model does not result in an invalid model in SBML Level&nbsp;3;
299  * however, as a matter of best practice, we strongly recommend that all
300  * models specify units of measurement for time.
301  *
302  *
303  * @subsection model-l3-voletc The 'volumeUnits', 'areaUnits', and 'lengthUnits' attributes
304  *
305  * The attributes 'volumeUnits', 'areaUnits' and 'lengthUnits' together are
306  * used to set the units of measurements for the sizes of Compartment
307  * objects in an SBML Level&nbsp;3 model when those objects do not
308  * otherwise specify units.  The three attributes correspond to the most
309  * common cases of compartment dimensions: 'volumeUnits' for compartments
310  * having a 'spatialDimensions' attribute value of @c '3', 'areaUnits' for
311  * compartments having a 'spatialDimensions' attribute value of @c '2', and
312  * 'lengthUnits' for compartments having a 'spatialDimensions' attribute
313  * value of @c '1'.  The attributes are not applicable to compartments
314  * whose 'spatialDimensions' attribute values are @em not one of @c '1',
315  * @c '2' or @c '3'.
316  *
317  * If a given Compartment object instance does not provide a value for its
318  * 'units' attribute, then the unit of measurement of that compartment's
319  * size is inherited from the value specified by the Model 'volumeUnits',
320  * 'areaUnits' or 'lengthUnits' attribute, as appropriate based on the
321  * Compartment object's 'spatialDimensions' attribute value.  If the Model
322  * object does not define the relevant attribute, then there are no units
323  * to inherit, and all Compartment objects that do not set a value for
324  * their 'units' attribute then have <em>no</em> units associated with
325  * their compartment sizes.
326  *
327  * The use of three separate attributes is a carry-over from SBML
328  * Level&nbsp;2.  Note that it is entirely possible for a model to define a
329  * value for two or more of the attributes 'volumeUnits', 'areaUnits' and
330  * 'lengthUnits' simultaneously, because SBML models may contain
331  * compartments with different numbers of dimensions.
332  *
333  *
334  * @subsection model-l3-extentunits The 'extentUnits' attribute
335  *
336  * Reactions are processes that occur over time.  These processes involve
337  * events of some sort, where a single ``reaction event'' is one in which
338  * some set of entities (known as reactants, products and modifiers in
339  * SBML) interact, once.  The <em>extent</em> of a reaction is a measure of
340  * how many times the reaction has occurred, while the time derivative of
341  * the extent gives the instantaneous rate at which the reaction is
342  * occurring.  Thus, what is colloquially referred to as the 'rate of the
343  * reaction' is in fact equal to the rate of change of reaction extent.
344  *
345  * In SBML Level&nbsp;3, the combination of 'extentUnits' and 'timeUnits'
346  * defines the units of kinetic laws in SBML and establishes how the
347  * numerical value of each KineticLaw object's mathematical formula is
348  * meant to be interpreted in a model.  The units of the kinetic laws are
349  * taken to be 'extentUnits' divided by 'timeUnits'.
350  *
351  * Note that this embodies an important principle in SBML Level&nbsp;3
352  * models: <em>all reactions in an SBML model must have the same units</em>
353  * for the rate of change of extent.  In other words, the units of all
354  * reaction rates in the model <em>must be the same</em>.  There is only
355  * one global value for 'extentUnits' and one global value for 'timeUnits'.
356  *
357  *
358  * @subsection model-l3-convfactor The 'conversionFactor' attribute
359  *
360  * The attribute 'conversionFactor' in SBML Level&nbsp;3's Model object
361  * defines a global value inherited by all Species object instances that do
362  * not define separate values for their 'conversionFactor' attributes.  The
363  * value of this attribute must refer to a Parameter object instance
364  * defined in the model.  The Parameter object in question must be a
365  * constant; ie it must have its 'constant' attribute value set to
366  * @c 'true'.
367  *
368  * If a given Species object definition does not specify a conversion
369  * factor via the 'conversionFactor' attribute on Species, then the species
370  * inherits the conversion factor specified by the Model 'conversionFactor'
371  * attribute.  If the Model does not define a value for this attribute,
372  * then there is no conversion factor to inherit.  More information about
373  * conversion factors is provided in the SBML Level&nbsp;3
374  * specifications.
375  */
376 
377 public class Model : SBase {
378 	private HandleRef swigCPtr;
379 
Model(IntPtr cPtr, bool cMemoryOwn)380 	internal Model(IntPtr cPtr, bool cMemoryOwn) : base(libsbmlPINVOKE.Model_SWIGUpcast(cPtr), cMemoryOwn)
381 	{
382 		//super(libsbmlPINVOKE.ModelUpcast(cPtr), cMemoryOwn);
383 		swigCPtr = new HandleRef(this, cPtr);
384 	}
385 
getCPtr(Model obj)386 	internal static HandleRef getCPtr(Model obj)
387 	{
388 		return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
389 	}
390 
getCPtrAndDisown(Model obj)391 	internal static HandleRef getCPtrAndDisown (Model obj)
392 	{
393 		HandleRef ptr = new HandleRef(null, IntPtr.Zero);
394 
395 		if (obj != null)
396 		{
397 			ptr             = obj.swigCPtr;
398 			obj.swigCMemOwn = false;
399 		}
400 
401 		return ptr;
402 	}
403 
Dispose(bool disposing)404   protected override void Dispose(bool disposing) {
405     lock(this) {
406       if (swigCPtr.Handle != global::System.IntPtr.Zero) {
407         if (swigCMemOwn) {
408           swigCMemOwn = false;
409           libsbmlPINVOKE.delete_Model(swigCPtr);
410         }
411         swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
412       }
413       base.Dispose(disposing);
414     }
415   }
416 
417 
418 /**
419    * Creates a new Model using the given SBML @p level and @p version
420    * values.
421    *
422    * @param level a long integer, the SBML Level to assign to this Model.
423    *
424    * @param version a long integer, the SBML Version to assign to this
425    * Model.
426    *
427    *
428  * @throws SBMLConstructorException
429  * Thrown if the given @p level and @p version combination are invalid
430  * or if this object is incompatible with the given level and version.
431  *
432  *
433    *
434    *
435  * @note Attempting to add an object to an SBMLDocument having a different
436  * combination of SBML Level, Version and XML namespaces than the object
437  * itself will result in an error at the time a caller attempts to make the
438  * addition.  A parent object must have compatible Level, Version and XML
439  * namespaces.  (Strictly speaking, a parent may also have more XML
440  * namespaces than a child, but the reverse is not permitted.)  The
441  * restriction is necessary to ensure that an SBML model has a consistent
442  * overall structure.  This requires callers to manage their objects
443  * carefully, but the benefit is increased flexibility in how models can be
444  * created by permitting callers to create objects bottom-up if desired.  In
445  * situations where objects are not yet attached to parents (e.g.,
446  * SBMLDocument), knowledge of the intented SBML Level and Version help
447  * libSBML determine such things as whether it is valid to assign a
448  * particular value to an attribute.
449  *
450  *
451    */ public
Model(long level, long version)452  Model(long level, long version) : this(libsbmlPINVOKE.new_Model__SWIG_0(level, version), true) {
453     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
454   }
455 
456 
457 /**
458    * Creates a new Model using the given SBMLNamespaces object
459    * @p sbmlns.
460    *
461    *
462  *
463  * The SBMLNamespaces object encapsulates SBML Level/Version/namespaces
464  * information.  It is used to communicate the SBML Level, Version, and (in
465  * Level&nbsp;3) packages used in addition to SBML Level&nbsp;3 Core.  A
466  * common approach to using libSBML's SBMLNamespaces facilities is to create an
467  * SBMLNamespaces object somewhere in a program once, then hand that object
468  * as needed to object constructors that accept SBMLNamespaces as arguments.
469  *
470  *
471    *
472    * @param sbmlns an SBMLNamespaces object.
473    *
474    *
475  * @throws SBMLConstructorException
476  * Thrown if the given @p sbmlns is inconsistent or incompatible
477  * with this object.
478  *
479  *
480    *
481    *
482  * @note Attempting to add an object to an SBMLDocument having a different
483  * combination of SBML Level, Version and XML namespaces than the object
484  * itself will result in an error at the time a caller attempts to make the
485  * addition.  A parent object must have compatible Level, Version and XML
486  * namespaces.  (Strictly speaking, a parent may also have more XML
487  * namespaces than a child, but the reverse is not permitted.)  The
488  * restriction is necessary to ensure that an SBML model has a consistent
489  * overall structure.  This requires callers to manage their objects
490  * carefully, but the benefit is increased flexibility in how models can be
491  * created by permitting callers to create objects bottom-up if desired.  In
492  * situations where objects are not yet attached to parents (e.g.,
493  * SBMLDocument), knowledge of the intented SBML Level and Version help
494  * libSBML determine such things as whether it is valid to assign a
495  * particular value to an attribute.
496  *
497  *
498    */ public
Model(SBMLNamespaces sbmlns)499  Model(SBMLNamespaces sbmlns) : this(libsbmlPINVOKE.new_Model__SWIG_1(SBMLNamespaces.getCPtr(sbmlns)), true) {
500     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
501   }
502 
503 
504 /**
505    * Copy constructor; creates a (deep) copy of the given Model object.
506    *
507    * @param orig the object to copy.
508    */ public
Model(Model orig)509  Model(Model orig) : this(libsbmlPINVOKE.new_Model__SWIG_2(Model.getCPtr(orig)), true) {
510     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
511   }
512 
513 
514 /**
515    * Creates and returns a deep copy of this Model object.
516    *
517    * @return the (deep) copy of this Model object.
518    */ public new
clone()519  Model clone() {
520     global::System.IntPtr cPtr = libsbmlPINVOKE.Model_clone(swigCPtr);
521     Model ret = (cPtr == global::System.IntPtr.Zero) ? null : new Model(cPtr, true);
522     return ret;
523   }
524 
525 
526 /**
527    * Returns the first child element found that has the given @p id.
528    *
529    * This operation searches the model-wide <code>SId</code> identifier
530    * type namespace
531    *
532    * @param id string representing the id of the object to find.
533    *
534    * @return pointer to the first element found with the given @p id, or
535    * @c null if no such object is found.
536    */ public new
getElementBySId(string id)537  SBase getElementBySId(string id) {
538 	SBase ret = (SBase) libsbml.DowncastSBase(libsbmlPINVOKE.Model_getElementBySId(swigCPtr, id), false);
539     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
540 	return ret;
541 }
542 
543 
544 /**
545    * Returns the first child element it can find with the given @p metaid.
546    *
547    * @param metaid string representing the meta-identifier of the object to
548    * find.
549    *
550    * @return pointer to the first element found with the given @p metaid, or
551    * null if no such object is found.
552    */ public new
getElementByMetaId(string metaid)553  SBase getElementByMetaId(string metaid) {
554 	SBase ret = (SBase) libsbml.DowncastSBase(libsbmlPINVOKE.Model_getElementByMetaId(swigCPtr, metaid), false);
555     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
556 	return ret;
557 }
558 
559 
560 /**
561    * Returns the value of the 'id' attribute of this Model.
562    *
563    * @note Because of the inconsistent behavior of this function with
564    * respect to assignments and rules, it is now recommended to
565    * use the getIdAttribute() function instead.
566    *
567    *
568  *
569  * The identifier given by an object's 'id' attribute value
570  * is used to identify the object within the SBML model definition.
571  * Other objects can refer to the component using this identifier.  The
572  * data type of 'id' is always <code>SId</code> or a type derived
573  * from that, such as <code>UnitSId</code>, depending on the object in
574  * question.  All data types are defined as follows:
575  * <pre style='margin-left: 2em; border: none; font-weight: bold; color: black'>
576  *   letter ::= 'a'..'z','A'..'Z'
577  *   digit  ::= '0'..'9'
578  *   idChar ::= letter | digit | '_'
579  *   SId    ::= ( letter | '_' ) idChar*
580  * </pre>
581  * The characters <code>(</code> and <code>)</code> are used for grouping,
582  * the character <code>*</code> 'zero or more times', and the character
583  * <code>|</code> indicates logical 'or'.  The equality of SBML identifiers
584  * is determined by an exact character sequence match; i.e., comparisons must
585  * be performed in a case-sensitive manner.  This applies to all uses of
586  * <code>SId</code>, <code>SIdRef</code>, and derived types.
587  *
588  * Users need to be aware of some important API issues that are the result of
589  * the history of SBML and libSBML.  Prior to SBML Level&nbsp;3
590  * Version&nbsp;2, SBML defined 'id' and 'name' attributes on only a subset
591  * of SBML objects.  To simplify the work of programmers, libSBML's API
592  * provided get, set, check, and unset on the SBase object class itself
593  * instead of on individual subobject classes. This made the
594  * get/set/etc. methods uniformly available on all objects in the libSBML
595  * API.  LibSBML simply returned empty strings or otherwise did not act when
596  * the methods were applied to SBML objects that were not defined by the SBML
597  * specification to have 'id' or 'name' attributes.  Additional complications
598  * arose with the rule and assignment objects: InitialAssignment,
599  * EventAssignment, AssignmentRule, and RateRule.  In early versions of SBML,
600  * the rule object hierarchy was different, and in addition, then as now,
601  * they possess different attributes: 'variable' (for the rules and event
602  * assignments), 'symbol' (for initial assignments), or neither (for
603  * algebraic rules).  Prior to SBML Level&nbsp;3 Version&nbsp;2, getId()
604  * would always return an empty string, and isSetId() would always return @c
605  * false for objects of these classes.
606  *
607  * With the addition of 'id' and 'name' attributes on SBase in Level&nbsp;3
608  * Version&nbsp;2, it became necessary to introduce a new way to interact
609  * with the attributes more consistently in libSBML to avoid breaking
610  * backward compatibility in the behavior of the original 'id' methods.  For
611  * this reason, libSBML provides four functions (getIdAttribute(),
612  * setIdAttribute(@if java String@endif), isSetIdAttribute(), and
613  * unsetIdAttribute()) that always act on the actual 'id' attribute inherited
614  * from SBase, regardless of the object's type.  <strong>These new methods
615  * should be used instead of the older getId()/setId()/etc. methods</strong>
616  * unless the old behavior is somehow necessary.  Regardless of the Level and
617  * Version of the SBML, these functions allow client applications to use more
618  * generalized code in some situations (for instance, when manipulating
619  * objects that are all known to have identifiers).  If the object in
620  * question does not posess an 'id' attribute according to the SBML
621  * specification for the Level and Version in use, libSBML will not allow the
622  * identifier to be set, nor will it read or write 'id' attributes for those
623  * objects.
624  *
625  *
626    *
627    * @return the id of this Model.
628    *
629    * @see getIdAttribute()
630    * @see setIdAttribute(string sid)
631    * @see isSetIdAttribute()
632    * @see unsetIdAttribute()
633    */ public new
getId()634  string getId() {
635     string ret = libsbmlPINVOKE.Model_getId(swigCPtr);
636     return ret;
637   }
638 
639 
640 /**
641    * Returns the value of the 'name' attribute of this Model object.
642    *
643    *
644  *
645  *
646  * In SBML Level&nbsp;3 Version&nbsp;2, the 'id' and 'name' attributes were
647  * moved to SBase directly, instead of being defined individually for many
648  * (but not all) objects.  LibSBML has for a long time provided functions
649  * defined on SBase itself to get, set, and unset those attributes, which
650  * would fail or otherwise return empty strings if executed on any object
651  * for which those attributes were not defined.  Now that all SBase objects
652  * define those attributes, those functions now succeed for any object with
653  * the appropriate level and version.
654  *
655  * The 'name' attribute is
656  * optional and is not intended to be used for cross-referencing purposes
657  * within a model.  Its purpose instead is to provide a human-readable
658  * label for the component.  The data type of 'name' is the type
659  * <code>string</code> defined in XML Schema.  SBML imposes no
660  * restrictions as to the content of 'name' attributes beyond those
661  * restrictions defined by the <code>string</code> type in XML Schema.
662  *
663  * The recommended practice for handling 'name' is as follows.  If a
664  * software tool has the capability for displaying the content of 'name'
665  * attributes, it should display this content to the user as a
666  * component's label instead of the component's 'id'.  If the user
667  * interface does not have this capability (e.g., because it cannot
668  * display or use special characters in symbol names), or if the 'name'
669  * attribute is missing on a given component, then the user interface
670  * should display the value of the 'id' attribute instead.  (Script
671  * language interpreters are especially likely to display 'id' instead of
672  * 'name'.)
673  *
674  * As a consequence of the above, authors of systems that automatically
675  * generate the values of 'id' attributes should be aware some systems
676  * may display the 'id''s to the user.  Authors therefore may wish to
677  * take some care to have their software create 'id' values that are: (a)
678  * reasonably easy for humans to type and read; and (b) likely to be
679  * meaningful, for example by making the 'id' attribute be an abbreviated
680  * form of the name attribute value.
681  *
682  * An additional point worth mentioning is although there are
683  * restrictions on the uniqueness of 'id' values, there are no
684  * restrictions on the uniqueness of 'name' values in a model.  This
685  * allows software applications leeway in assigning component identifiers.
686  *
687  * Regardless of the level and version of the SBML, these functions allow
688  * client applications to use more generalized code in some situations
689  * (for instance, when manipulating objects that are all known to have
690  * names).  If the object in question does not posess a 'name' attribute
691  * according to the SBML specification for the Level and Version in use,
692  * libSBML will not allow the name to be set, nor will it read or
693  * write 'name' attributes for those objects.
694  *
695  *
696  *
697  * @return the name of this SBML object, or the empty string if not set or unsettable.
698  *
699  * @see getIdAttribute()
700  * @see isSetName()
701  * @see setName(string sid)
702  * @see unsetName()
703  *
704  *
705    */ public new
getName()706  string getName() {
707     string ret = libsbmlPINVOKE.Model_getName(swigCPtr);
708     return ret;
709   }
710 
711 
712 /**
713    * Returns the value of the 'substanceUnits' attribute of this Model.
714    *
715    * @return the substanceUnits of this Model.
716    *
717    * @note The 'substanceUnits' attribute is available in
718    * SBML Level&nbsp;3 but is not present on Model in lower Levels of SBML.
719    */ public
getSubstanceUnits()720  string getSubstanceUnits() {
721     string ret = libsbmlPINVOKE.Model_getSubstanceUnits(swigCPtr);
722     return ret;
723   }
724 
725 
726 /**
727    * Returns the value of the 'timeUnits' attribute of this Model.
728    *
729    * @return the timeUnits of this Model.
730    *
731    * @note The 'timeUnits' attribute is available in
732    * SBML Level&nbsp;3 but is not present on Model in lower Levels of SBML.
733    */ public
getTimeUnits()734  string getTimeUnits() {
735     string ret = libsbmlPINVOKE.Model_getTimeUnits(swigCPtr);
736     return ret;
737   }
738 
739 
740 /**
741    * Returns the value of the 'volumeUnits' attribute of this Model.
742    *
743    * @return the volumeUnits of this Model.
744    *
745    * @note The 'volumeUnits' attribute is available in
746    * SBML Level&nbsp;3 but is not present on Model in lower Levels of SBML.
747    */ public
getVolumeUnits()748  string getVolumeUnits() {
749     string ret = libsbmlPINVOKE.Model_getVolumeUnits(swigCPtr);
750     return ret;
751   }
752 
753 
754 /**
755    * Returns the value of the 'areaUnits' attribute of this Model.
756    *
757    * @return the areaUnits of this Model.
758    *
759    * @note The 'areaUnits' attribute is available in
760    * SBML Level&nbsp;3 but is not present on Model in lower Levels of SBML.
761    */ public
getAreaUnits()762  string getAreaUnits() {
763     string ret = libsbmlPINVOKE.Model_getAreaUnits(swigCPtr);
764     return ret;
765   }
766 
767 
768 /**
769    * Returns the value of the 'lengthUnits' attribute of this Model.
770    *
771    * @return the lengthUnits of this Model.
772    *
773    * @note The 'lengthUnits' attribute is available in
774    * SBML Level&nbsp;3 but is not present on Model in lower Levels of SBML.
775    */ public
getLengthUnits()776  string getLengthUnits() {
777     string ret = libsbmlPINVOKE.Model_getLengthUnits(swigCPtr);
778     return ret;
779   }
780 
781 
782 /**
783    * Returns the value of the 'extentUnits' attribute of this Model.
784    *
785    * @return the extentUnits of this Model.
786    *
787    * @note The 'extentUnits' attribute is available in
788    * SBML Level&nbsp;3 but is not present on Model in lower Levels of SBML.
789    */ public
getExtentUnits()790  string getExtentUnits() {
791     string ret = libsbmlPINVOKE.Model_getExtentUnits(swigCPtr);
792     return ret;
793   }
794 
795 
796 /**
797    * Returns the value of the 'conversionFactor' attribute of this Model.
798    *
799    * @return the conversionFactor of this Model.
800    *
801    * @note The 'conversionFactor' attribute is available in
802    * SBML Level&nbsp;3 but is not present on Model in lower Levels of SBML.
803    */ public
getConversionFactor()804  string getConversionFactor() {
805     string ret = libsbmlPINVOKE.Model_getConversionFactor(swigCPtr);
806     return ret;
807   }
808 
809 
810 /**
811    * Predicate returning @c true if this
812    * Model's 'id' attribute is set.
813    *
814    *
815  *
816  *
817  * The identifier given by an object's 'id' attribute value
818  * is used to identify the object within the SBML model definition.
819  * Other objects can refer to the component using this identifier.  The
820  * data type of 'id' is always <code>SId</code> or a type derived
821  * from that, such as <code>UnitSId</code>, depending on the object in
822  * question.  All data types are defined as follows:
823  * <pre style='margin-left: 2em; border: none; font-weight: bold; color: black'>
824  *   letter ::= 'a'..'z','A'..'Z'
825  *   digit  ::= '0'..'9'
826  *   idChar ::= letter | digit | '_'
827  *   SId    ::= ( letter | '_' ) idChar*
828  * </pre>
829  * The characters <code>(</code> and <code>)</code> are used for grouping,
830  * the character <code>*</code> 'zero or more times', and the character
831  * <code>|</code> indicates logical 'or'.  The equality of SBML identifiers
832  * is determined by an exact character sequence match; i.e., comparisons must
833  * be performed in a case-sensitive manner.  This applies to all uses of
834  * <code>SId</code>, <code>SIdRef</code>, and derived types.
835  *
836  * Users need to be aware of some important API issues that are the result of
837  * the history of SBML and libSBML.  Prior to SBML Level&nbsp;3
838  * Version&nbsp;2, SBML defined 'id' and 'name' attributes on only a subset
839  * of SBML objects.  To simplify the work of programmers, libSBML's API
840  * provided get, set, check, and unset on the SBase object class itself
841  * instead of on individual subobject classes. This made the
842  * get/set/etc. methods uniformly available on all objects in the libSBML
843  * API.  LibSBML simply returned empty strings or otherwise did not act when
844  * the methods were applied to SBML objects that were not defined by the SBML
845  * specification to have 'id' or 'name' attributes.  Additional complications
846  * arose with the rule and assignment objects: InitialAssignment,
847  * EventAssignment, AssignmentRule, and RateRule.  In early versions of SBML,
848  * the rule object hierarchy was different, and in addition, then as now,
849  * they possess different attributes: 'variable' (for the rules and event
850  * assignments), 'symbol' (for initial assignments), or neither (for
851  * algebraic rules).  Prior to SBML Level&nbsp;3 Version&nbsp;2, getId()
852  * would always return an empty string, and isSetId() would always return @c
853  * false for objects of these classes.
854  *
855  * With the addition of 'id' and 'name' attributes on SBase in Level&nbsp;3
856  * Version&nbsp;2, it became necessary to introduce a new way to interact
857  * with the attributes more consistently in libSBML to avoid breaking
858  * backward compatibility in the behavior of the original 'id' methods.  For
859  * this reason, libSBML provides four functions (getIdAttribute(),
860  * setIdAttribute(@if java String@endif), isSetIdAttribute(), and
861  * unsetIdAttribute()) that always act on the actual 'id' attribute inherited
862  * from SBase, regardless of the object's type.  <strong>These new methods
863  * should be used instead of the older getId()/setId()/etc. methods</strong>
864  * unless the old behavior is somehow necessary.  Regardless of the Level and
865  * Version of the SBML, these functions allow client applications to use more
866  * generalized code in some situations (for instance, when manipulating
867  * objects that are all known to have identifiers).  If the object in
868  * question does not posess an 'id' attribute according to the SBML
869  * specification for the Level and Version in use, libSBML will not allow the
870  * identifier to be set, nor will it read or write 'id' attributes for those
871  * objects.
872  *
873  *
874  *
875  * @return @c true if the 'id' attribute of this SBML object is
876  * set, @c false otherwise.
877  *
878  * @note Because of the inconsistent behavior of this function with
879  * respect to assignments and rules, it is recommended that callers
880  * use isSetIdAttribute() instead.
881  *
882  * @see getIdAttribute()
883  * @see setIdAttribute(string sid)
884  * @see unsetIdAttribute()
885  * @see isSetIdAttribute()
886  *
887  *
888    */ public new
isSetId()889  bool isSetId() {
890     bool ret = libsbmlPINVOKE.Model_isSetId(swigCPtr);
891     return ret;
892   }
893 
894 
895 /**
896    * Predicate returning @c true if this
897    * Model's 'name' attribute is set.
898    *
899    *
900  *
901  *
902  * In SBML Level&nbsp;3 Version&nbsp;2, the 'id' and 'name' attributes were
903  * moved to SBase directly, instead of being defined individually for many
904  * (but not all) objects.  LibSBML has for a long time provided functions
905  * defined on SBase itself to get, set, and unset those attributes, which
906  * would fail or otherwise return empty strings if executed on any object
907  * for which those attributes were not defined.  Now that all SBase objects
908  * define those attributes, those functions now succeed for any object with
909  * the appropriate level and version.
910  *
911  * The 'name' attribute is
912  * optional and is not intended to be used for cross-referencing purposes
913  * within a model.  Its purpose instead is to provide a human-readable
914  * label for the component.  The data type of 'name' is the type
915  * <code>string</code> defined in XML Schema.  SBML imposes no
916  * restrictions as to the content of 'name' attributes beyond those
917  * restrictions defined by the <code>string</code> type in XML Schema.
918  *
919  * The recommended practice for handling 'name' is as follows.  If a
920  * software tool has the capability for displaying the content of 'name'
921  * attributes, it should display this content to the user as a
922  * component's label instead of the component's 'id'.  If the user
923  * interface does not have this capability (e.g., because it cannot
924  * display or use special characters in symbol names), or if the 'name'
925  * attribute is missing on a given component, then the user interface
926  * should display the value of the 'id' attribute instead.  (Script
927  * language interpreters are especially likely to display 'id' instead of
928  * 'name'.)
929  *
930  * As a consequence of the above, authors of systems that automatically
931  * generate the values of 'id' attributes should be aware some systems
932  * may display the 'id''s to the user.  Authors therefore may wish to
933  * take some care to have their software create 'id' values that are: (a)
934  * reasonably easy for humans to type and read; and (b) likely to be
935  * meaningful, for example by making the 'id' attribute be an abbreviated
936  * form of the name attribute value.
937  *
938  * An additional point worth mentioning is although there are
939  * restrictions on the uniqueness of 'id' values, there are no
940  * restrictions on the uniqueness of 'name' values in a model.  This
941  * allows software applications leeway in assigning component identifiers.
942  *
943  * Regardless of the level and version of the SBML, these functions allow
944  * client applications to use more generalized code in some situations
945  * (for instance, when manipulating objects that are all known to have
946  * names).  If the object in question does not posess a 'name' attribute
947  * according to the SBML specification for the Level and Version in use,
948  * libSBML will not allow the name to be set, nor will it read or
949  * write 'name' attributes for those objects.
950  *
951  *
952  *
953  * @return @c true if the 'name' attribute of this SBML object is
954  * set, @c false otherwise.
955  *
956  * @see getName()
957  * @see setName(string sid)
958  * @see unsetName()
959  *
960  *
961    */ public new
isSetName()962  bool isSetName() {
963     bool ret = libsbmlPINVOKE.Model_isSetName(swigCPtr);
964     return ret;
965   }
966 
967 
968 /**
969    * Predicate returning @c true if this
970    * Model's 'substanceUnits' attribute is set.
971    *
972    * @return @c true if the 'substanceUnits' attribute of this Model is
973    * set, @c false otherwise.
974    *
975    * @note The 'substanceUnits' attribute is available in
976    * SBML Level&nbsp;3 but is not present on Model in lower Levels of SBML.
977    */ public
isSetSubstanceUnits()978  bool isSetSubstanceUnits() {
979     bool ret = libsbmlPINVOKE.Model_isSetSubstanceUnits(swigCPtr);
980     return ret;
981   }
982 
983 
984 /**
985    * Predicate returning @c true if this
986    * Model's 'timeUnits' attribute is set.
987    *
988    * @return @c true if the 'timeUnits' attribute of this Model is
989    * set, @c false otherwise.
990    *
991    * @note The 'substanceUnits' attribute is available in
992    * SBML Level&nbsp;3 but is not present on Model in lower Levels of SBML.
993    */ public
isSetTimeUnits()994  bool isSetTimeUnits() {
995     bool ret = libsbmlPINVOKE.Model_isSetTimeUnits(swigCPtr);
996     return ret;
997   }
998 
999 
1000 /**
1001    * Predicate returning @c true if this
1002    * Model's 'volumeUnits' attribute is set.
1003    *
1004    * @return @c true if the 'volumeUnits' attribute of this Model is
1005    * set, @c false otherwise.
1006    *
1007    * @note The 'volumeUnits' attribute is available in
1008    * SBML Level&nbsp;3 but is not present on Model in lower Levels of SBML.
1009    */ public
isSetVolumeUnits()1010  bool isSetVolumeUnits() {
1011     bool ret = libsbmlPINVOKE.Model_isSetVolumeUnits(swigCPtr);
1012     return ret;
1013   }
1014 
1015 
1016 /**
1017    * Predicate returning @c true if this
1018    * Model's 'areaUnits' attribute is set.
1019    *
1020    * @return @c true if the 'areaUnits' attribute of this Model is
1021    * set, @c false otherwise.
1022    *
1023    * @note The 'areaUnits' attribute is available in
1024    * SBML Level&nbsp;3 but is not present on Model in lower Levels of SBML.
1025    */ public
isSetAreaUnits()1026  bool isSetAreaUnits() {
1027     bool ret = libsbmlPINVOKE.Model_isSetAreaUnits(swigCPtr);
1028     return ret;
1029   }
1030 
1031 
1032 /**
1033    * Predicate returning @c true if this
1034    * Model's 'lengthUnits' attribute is set.
1035    *
1036    * @return @c true if the 'lengthUnits' attribute of this Model is
1037    * set, @c false otherwise.
1038    *
1039    * @note The 'lengthUnits' attribute is available in
1040    * SBML Level&nbsp;3 but is not present on Model in lower Levels of SBML.
1041    */ public
isSetLengthUnits()1042  bool isSetLengthUnits() {
1043     bool ret = libsbmlPINVOKE.Model_isSetLengthUnits(swigCPtr);
1044     return ret;
1045   }
1046 
1047 
1048 /**
1049    * Predicate returning @c true if this
1050    * Model's 'extentUnits' attribute is set.
1051    *
1052    * @return @c true if the 'extentUnits' attribute of this Model is
1053    * set, @c false otherwise.
1054    *
1055    * @note The 'extentUnits' attribute is available in
1056    * SBML Level&nbsp;3 but is not present on Model in lower Levels of SBML.
1057    */ public
isSetExtentUnits()1058  bool isSetExtentUnits() {
1059     bool ret = libsbmlPINVOKE.Model_isSetExtentUnits(swigCPtr);
1060     return ret;
1061   }
1062 
1063 
1064 /**
1065    * Predicate returning @c true if this
1066    * Model's 'conversionFactor' attribute is set.
1067    *
1068    * @return @c true if the 'conversionFactor' attribute of this Model is
1069    * set, @c false otherwise.
1070    *
1071    * @note The 'conversionFactor' attribute is available in
1072    * SBML Level&nbsp;3 but is not present on Model in lower Levels of SBML.
1073    */ public
isSetConversionFactor()1074  bool isSetConversionFactor() {
1075     bool ret = libsbmlPINVOKE.Model_isSetConversionFactor(swigCPtr);
1076     return ret;
1077   }
1078 
1079 
1080 /**
1081    * Sets the value of the 'id' attribute of this Model.
1082    *
1083    *
1084  *
1085  * The string @p sid is copied.
1086  *
1087  *
1088  *
1089  * The identifier given by an object's 'id' attribute value
1090  * is used to identify the object within the SBML model definition.
1091  * Other objects can refer to the component using this identifier.  The
1092  * data type of 'id' is always <code>SId</code> or a type derived
1093  * from that, such as <code>UnitSId</code>, depending on the object in
1094  * question.  All data types are defined as follows:
1095  * <pre style='margin-left: 2em; border: none; font-weight: bold; color: black'>
1096  *   letter ::= 'a'..'z','A'..'Z'
1097  *   digit  ::= '0'..'9'
1098  *   idChar ::= letter | digit | '_'
1099  *   SId    ::= ( letter | '_' ) idChar*
1100  * </pre>
1101  * The characters <code>(</code> and <code>)</code> are used for grouping,
1102  * the character <code>*</code> 'zero or more times', and the character
1103  * <code>|</code> indicates logical 'or'.  The equality of SBML identifiers
1104  * is determined by an exact character sequence match; i.e., comparisons must
1105  * be performed in a case-sensitive manner.  This applies to all uses of
1106  * <code>SId</code>, <code>SIdRef</code>, and derived types.
1107  *
1108  * Users need to be aware of some important API issues that are the result of
1109  * the history of SBML and libSBML.  Prior to SBML Level&nbsp;3
1110  * Version&nbsp;2, SBML defined 'id' and 'name' attributes on only a subset
1111  * of SBML objects.  To simplify the work of programmers, libSBML's API
1112  * provided get, set, check, and unset on the SBase object class itself
1113  * instead of on individual subobject classes. This made the
1114  * get/set/etc. methods uniformly available on all objects in the libSBML
1115  * API.  LibSBML simply returned empty strings or otherwise did not act when
1116  * the methods were applied to SBML objects that were not defined by the SBML
1117  * specification to have 'id' or 'name' attributes.  Additional complications
1118  * arose with the rule and assignment objects: InitialAssignment,
1119  * EventAssignment, AssignmentRule, and RateRule.  In early versions of SBML,
1120  * the rule object hierarchy was different, and in addition, then as now,
1121  * they possess different attributes: 'variable' (for the rules and event
1122  * assignments), 'symbol' (for initial assignments), or neither (for
1123  * algebraic rules).  Prior to SBML Level&nbsp;3 Version&nbsp;2, getId()
1124  * would always return an empty string, and isSetId() would always return @c
1125  * false for objects of these classes.
1126  *
1127  * With the addition of 'id' and 'name' attributes on SBase in Level&nbsp;3
1128  * Version&nbsp;2, it became necessary to introduce a new way to interact
1129  * with the attributes more consistently in libSBML to avoid breaking
1130  * backward compatibility in the behavior of the original 'id' methods.  For
1131  * this reason, libSBML provides four functions (getIdAttribute(),
1132  * setIdAttribute(@if java String@endif), isSetIdAttribute(), and
1133  * unsetIdAttribute()) that always act on the actual 'id' attribute inherited
1134  * from SBase, regardless of the object's type.  <strong>These new methods
1135  * should be used instead of the older getId()/setId()/etc. methods</strong>
1136  * unless the old behavior is somehow necessary.  Regardless of the Level and
1137  * Version of the SBML, these functions allow client applications to use more
1138  * generalized code in some situations (for instance, when manipulating
1139  * objects that are all known to have identifiers).  If the object in
1140  * question does not posess an 'id' attribute according to the SBML
1141  * specification for the Level and Version in use, libSBML will not allow the
1142  * identifier to be set, nor will it read or write 'id' attributes for those
1143  * objects.
1144  *
1145  *
1146  *
1147  * @param sid the string to use as the identifier of this object.
1148  *
1149  *
1150  * @return integer value indicating success/failure of the
1151  * function.  @if clike The value is drawn from the
1152  * enumeration #OperationReturnValues_t. @endif The possible values
1153  * returned by this function are:
1154  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
1155  * @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
1156  * @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
1157  *
1158  * @see getIdAttribute()
1159  * @see setIdAttribute(string sid)
1160  * @see isSetIdAttribute()
1161  * @see unsetIdAttribute()
1162  *
1163  *
1164    */ public new
setId(string sid)1165  int setId(string sid) {
1166     int ret = libsbmlPINVOKE.Model_setId(swigCPtr, sid);
1167     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
1168     return ret;
1169   }
1170 
1171 
1172 /**
1173    * Sets the value of the 'name' attribute of this Model.
1174    *
1175    *
1176  *
1177  *
1178  * The string in @p name is copied.
1179  *
1180  * @param name the new name for the SBML object.
1181  *
1182  *
1183  * @return integer value indicating success/failure of the
1184  * function.  @if clike The value is drawn from the
1185  * enumeration #OperationReturnValues_t. @endif The possible values
1186  * returned by this function are:
1187  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
1188  * @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
1189  *
1190  *
1191    */ public new
setName(string name)1192  int setName(string name) {
1193     int ret = libsbmlPINVOKE.Model_setName(swigCPtr, name);
1194     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
1195     return ret;
1196   }
1197 
1198 
1199 /**
1200    * Sets the value of the 'substanceUnits' attribute of this Model.
1201    *
1202    * The string in @p units is copied.
1203    *
1204    * @param units the new substanceUnits for the Model.
1205    *
1206    *
1207  * @return integer value indicating success/failure of the
1208  * function.  @if clike The value is drawn from the
1209  * enumeration #OperationReturnValues_t. @endif The possible values
1210  * returned by this function are:
1211  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
1212    * @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
1213    * @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
1214    *
1215    * @note The 'substanceUnits' attribute is available in
1216    * SBML Level&nbsp;3 but is not present on Model in lower Levels of SBML.
1217    */ public
setSubstanceUnits(string units)1218  int setSubstanceUnits(string units) {
1219     int ret = libsbmlPINVOKE.Model_setSubstanceUnits(swigCPtr, units);
1220     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
1221     return ret;
1222   }
1223 
1224 
1225 /**
1226    * Sets the value of the 'timeUnits' attribute of this Model.
1227    *
1228    * The string in @p units is copied.
1229    *
1230    * @param units the new timeUnits for the Model.
1231    *
1232    *
1233  * @return integer value indicating success/failure of the
1234  * function.  @if clike The value is drawn from the
1235  * enumeration #OperationReturnValues_t. @endif The possible values
1236  * returned by this function are:
1237  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
1238    * @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
1239    * @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
1240    *
1241    * @note The 'timeUnits' attribute is available in
1242    * SBML Level&nbsp;3 but is not present on Model in lower Levels of SBML.
1243    */ public
setTimeUnits(string units)1244  int setTimeUnits(string units) {
1245     int ret = libsbmlPINVOKE.Model_setTimeUnits(swigCPtr, units);
1246     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
1247     return ret;
1248   }
1249 
1250 
1251 /**
1252    * Sets the value of the 'volumeUnits' attribute of this Model.
1253    *
1254    * The string in @p units is copied.
1255    *
1256    * @param units the new volumeUnits for the Model.
1257    *
1258    *
1259  * @return integer value indicating success/failure of the
1260  * function.  @if clike The value is drawn from the
1261  * enumeration #OperationReturnValues_t. @endif The possible values
1262  * returned by this function are:
1263  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
1264    * @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
1265    * @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
1266    *
1267    * @note The 'volumeUnits' attribute is available in
1268    * SBML Level&nbsp;3 but is not present on Model in lower Levels of SBML.
1269    */ public
setVolumeUnits(string units)1270  int setVolumeUnits(string units) {
1271     int ret = libsbmlPINVOKE.Model_setVolumeUnits(swigCPtr, units);
1272     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
1273     return ret;
1274   }
1275 
1276 
1277 /**
1278    * Sets the value of the 'areaUnits' attribute of this Model.
1279    *
1280    * The string in @p units is copied.
1281    *
1282    * @param units the new areaUnits for the Model.
1283    *
1284    *
1285  * @return integer value indicating success/failure of the
1286  * function.  @if clike The value is drawn from the
1287  * enumeration #OperationReturnValues_t. @endif The possible values
1288  * returned by this function are:
1289  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
1290    * @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
1291    * @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
1292    *
1293    * @note The 'areaUnits' attribute is available in
1294    * SBML Level&nbsp;3 but is not present on Model in lower Levels of SBML.
1295    */ public
setAreaUnits(string units)1296  int setAreaUnits(string units) {
1297     int ret = libsbmlPINVOKE.Model_setAreaUnits(swigCPtr, units);
1298     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
1299     return ret;
1300   }
1301 
1302 
1303 /**
1304    * Sets the value of the 'lengthUnits' attribute of this Model.
1305    *
1306    * The string in @p units is copied.
1307    *
1308    * @param units the new lengthUnits for the Model.
1309    *
1310    *
1311  * @return integer value indicating success/failure of the
1312  * function.  @if clike The value is drawn from the
1313  * enumeration #OperationReturnValues_t. @endif The possible values
1314  * returned by this function are:
1315  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
1316    * @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
1317    * @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
1318    *
1319    * @note The 'lengthUnits' attribute is available in
1320    * SBML Level&nbsp;3 but is not present on Model in lower Levels of SBML.
1321    */ public
setLengthUnits(string units)1322  int setLengthUnits(string units) {
1323     int ret = libsbmlPINVOKE.Model_setLengthUnits(swigCPtr, units);
1324     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
1325     return ret;
1326   }
1327 
1328 
1329 /**
1330    * Sets the value of the 'extentUnits' attribute of this Model.
1331    *
1332    * The string in @p units is copied.
1333    *
1334    * @param units the new extentUnits for the Model.
1335    *
1336    *
1337  * @return integer value indicating success/failure of the
1338  * function.  @if clike The value is drawn from the
1339  * enumeration #OperationReturnValues_t. @endif The possible values
1340  * returned by this function are:
1341  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
1342    * @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
1343    * @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
1344    *
1345    * @note The 'extentUnits' attribute is available in
1346    * SBML Level&nbsp;3 but is not present on Model in lower Levels of SBML.
1347    */ public
setExtentUnits(string units)1348  int setExtentUnits(string units) {
1349     int ret = libsbmlPINVOKE.Model_setExtentUnits(swigCPtr, units);
1350     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
1351     return ret;
1352   }
1353 
1354 
1355 /**
1356    * Sets the value of the 'conversionFactor' attribute of this Model.
1357    *
1358    * The string in @p units is copied.
1359    *
1360    * @param units the new conversionFactor for the Model.
1361    *
1362    *
1363  * @return integer value indicating success/failure of the
1364  * function.  @if clike The value is drawn from the
1365  * enumeration #OperationReturnValues_t. @endif The possible values
1366  * returned by this function are:
1367  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
1368    * @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
1369    * @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
1370    *
1371    * @note The 'conversionFactor' attribute is available in
1372    * SBML Level&nbsp;3 but is not present on Model in lower Levels of SBML.
1373    */ public
setConversionFactor(string units)1374  int setConversionFactor(string units) {
1375     int ret = libsbmlPINVOKE.Model_setConversionFactor(swigCPtr, units);
1376     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
1377     return ret;
1378   }
1379 
1380 
1381 /**
1382    * Unsets the value of the 'id' attribute of this Model.
1383    *
1384    *
1385  *
1386  *
1387  * The identifier given by an object's 'id' attribute value
1388  * is used to identify the object within the SBML model definition.
1389  * Other objects can refer to the component using this identifier.  The
1390  * data type of 'id' is always <code>SId</code> or a type derived
1391  * from that, such as <code>UnitSId</code>, depending on the object in
1392  * question.  All data types are defined as follows:
1393  * <pre style='margin-left: 2em; border: none; font-weight: bold; color: black'>
1394  *   letter ::= 'a'..'z','A'..'Z'
1395  *   digit  ::= '0'..'9'
1396  *   idChar ::= letter | digit | '_'
1397  *   SId    ::= ( letter | '_' ) idChar*
1398  * </pre>
1399  * The characters <code>(</code> and <code>)</code> are used for grouping,
1400  * the character <code>*</code> 'zero or more times', and the character
1401  * <code>|</code> indicates logical 'or'.  The equality of SBML identifiers
1402  * is determined by an exact character sequence match; i.e., comparisons must
1403  * be performed in a case-sensitive manner.  This applies to all uses of
1404  * <code>SId</code>, <code>SIdRef</code>, and derived types.
1405  *
1406  * Users need to be aware of some important API issues that are the result of
1407  * the history of SBML and libSBML.  Prior to SBML Level&nbsp;3
1408  * Version&nbsp;2, SBML defined 'id' and 'name' attributes on only a subset
1409  * of SBML objects.  To simplify the work of programmers, libSBML's API
1410  * provided get, set, check, and unset on the SBase object class itself
1411  * instead of on individual subobject classes. This made the
1412  * get/set/etc. methods uniformly available on all objects in the libSBML
1413  * API.  LibSBML simply returned empty strings or otherwise did not act when
1414  * the methods were applied to SBML objects that were not defined by the SBML
1415  * specification to have 'id' or 'name' attributes.  Additional complications
1416  * arose with the rule and assignment objects: InitialAssignment,
1417  * EventAssignment, AssignmentRule, and RateRule.  In early versions of SBML,
1418  * the rule object hierarchy was different, and in addition, then as now,
1419  * they possess different attributes: 'variable' (for the rules and event
1420  * assignments), 'symbol' (for initial assignments), or neither (for
1421  * algebraic rules).  Prior to SBML Level&nbsp;3 Version&nbsp;2, getId()
1422  * would always return an empty string, and isSetId() would always return @c
1423  * false for objects of these classes.
1424  *
1425  * With the addition of 'id' and 'name' attributes on SBase in Level&nbsp;3
1426  * Version&nbsp;2, it became necessary to introduce a new way to interact
1427  * with the attributes more consistently in libSBML to avoid breaking
1428  * backward compatibility in the behavior of the original 'id' methods.  For
1429  * this reason, libSBML provides four functions (getIdAttribute(),
1430  * setIdAttribute(@if java String@endif), isSetIdAttribute(), and
1431  * unsetIdAttribute()) that always act on the actual 'id' attribute inherited
1432  * from SBase, regardless of the object's type.  <strong>These new methods
1433  * should be used instead of the older getId()/setId()/etc. methods</strong>
1434  * unless the old behavior is somehow necessary.  Regardless of the Level and
1435  * Version of the SBML, these functions allow client applications to use more
1436  * generalized code in some situations (for instance, when manipulating
1437  * objects that are all known to have identifiers).  If the object in
1438  * question does not posess an 'id' attribute according to the SBML
1439  * specification for the Level and Version in use, libSBML will not allow the
1440  * identifier to be set, nor will it read or write 'id' attributes for those
1441  * objects.
1442  *
1443  *
1444  *
1445  *
1446  * @return integer value indicating success/failure of the
1447  * function.  @if clike The value is drawn from the
1448  * enumeration #OperationReturnValues_t. @endif The possible values
1449  * returned by this function are:
1450  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
1451  * @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
1452  *
1453  * @see getIdAttribute()
1454  * @see setIdAttribute(string sid)
1455  * @see isSetIdAttribute()
1456  * @see unsetIdAttribute()
1457  *
1458  *
1459    */ public new
unsetId()1460  int unsetId() {
1461     int ret = libsbmlPINVOKE.Model_unsetId(swigCPtr);
1462     return ret;
1463   }
1464 
1465 
1466 /**
1467    * Unsets the value of the 'name' attribute of this Model.
1468    *
1469    *
1470  *
1471  *
1472  * In SBML Level&nbsp;3 Version&nbsp;2, the 'id' and 'name' attributes were
1473  * moved to SBase directly, instead of being defined individually for many
1474  * (but not all) objects.  LibSBML has for a long time provided functions
1475  * defined on SBase itself to get, set, and unset those attributes, which
1476  * would fail or otherwise return empty strings if executed on any object
1477  * for which those attributes were not defined.  Now that all SBase objects
1478  * define those attributes, those functions now succeed for any object with
1479  * the appropriate level and version.
1480  *
1481  * The 'name' attribute is
1482  * optional and is not intended to be used for cross-referencing purposes
1483  * within a model.  Its purpose instead is to provide a human-readable
1484  * label for the component.  The data type of 'name' is the type
1485  * <code>string</code> defined in XML Schema.  SBML imposes no
1486  * restrictions as to the content of 'name' attributes beyond those
1487  * restrictions defined by the <code>string</code> type in XML Schema.
1488  *
1489  * The recommended practice for handling 'name' is as follows.  If a
1490  * software tool has the capability for displaying the content of 'name'
1491  * attributes, it should display this content to the user as a
1492  * component's label instead of the component's 'id'.  If the user
1493  * interface does not have this capability (e.g., because it cannot
1494  * display or use special characters in symbol names), or if the 'name'
1495  * attribute is missing on a given component, then the user interface
1496  * should display the value of the 'id' attribute instead.  (Script
1497  * language interpreters are especially likely to display 'id' instead of
1498  * 'name'.)
1499  *
1500  * As a consequence of the above, authors of systems that automatically
1501  * generate the values of 'id' attributes should be aware some systems
1502  * may display the 'id''s to the user.  Authors therefore may wish to
1503  * take some care to have their software create 'id' values that are: (a)
1504  * reasonably easy for humans to type and read; and (b) likely to be
1505  * meaningful, for example by making the 'id' attribute be an abbreviated
1506  * form of the name attribute value.
1507  *
1508  * An additional point worth mentioning is although there are
1509  * restrictions on the uniqueness of 'id' values, there are no
1510  * restrictions on the uniqueness of 'name' values in a model.  This
1511  * allows software applications leeway in assigning component identifiers.
1512  *
1513  * Regardless of the level and version of the SBML, these functions allow
1514  * client applications to use more generalized code in some situations
1515  * (for instance, when manipulating objects that are all known to have
1516  * names).  If the object in question does not posess a 'name' attribute
1517  * according to the SBML specification for the Level and Version in use,
1518  * libSBML will not allow the name to be set, nor will it read or
1519  * write 'name' attributes for those objects.
1520  *
1521  *
1522  *
1523  *
1524  * @return integer value indicating success/failure of the
1525  * function.  @if clike The value is drawn from the
1526  * enumeration #OperationReturnValues_t. @endif The possible values
1527  * returned by this function are:
1528  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
1529  * @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
1530  *
1531  * @see getName()
1532  * @see setName(string sid)
1533  * @see isSetName()
1534  *
1535  *
1536    */ public new
unsetName()1537  int unsetName() {
1538     int ret = libsbmlPINVOKE.Model_unsetName(swigCPtr);
1539     return ret;
1540   }
1541 
1542 
1543 /**
1544    * Unsets the value of the 'substanceUnits' attribute of this Model.
1545    *
1546    *
1547  * @return integer value indicating success/failure of the
1548  * function.  @if clike The value is drawn from the
1549  * enumeration #OperationReturnValues_t. @endif The possible values
1550  * returned by this function are:
1551  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
1552    * @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
1553    *
1554    * @note The 'substanceUnits' attribute is available in
1555    * SBML Level&nbsp;3 but is not present on Model in lower Levels of SBML.
1556    */ public
unsetSubstanceUnits()1557  int unsetSubstanceUnits() {
1558     int ret = libsbmlPINVOKE.Model_unsetSubstanceUnits(swigCPtr);
1559     return ret;
1560   }
1561 
1562 
1563 /**
1564    * Unsets the value of the 'timeUnits' attribute of this Model.
1565    *
1566    *
1567  * @return integer value indicating success/failure of the
1568  * function.  @if clike The value is drawn from the
1569  * enumeration #OperationReturnValues_t. @endif The possible values
1570  * returned by this function are:
1571  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
1572    * @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
1573    *
1574    * @note The 'timeUnits' attribute is available in
1575    * SBML Level&nbsp;3 but is not present on Model in lower Levels of SBML.
1576    */ public
unsetTimeUnits()1577  int unsetTimeUnits() {
1578     int ret = libsbmlPINVOKE.Model_unsetTimeUnits(swigCPtr);
1579     return ret;
1580   }
1581 
1582 
1583 /**
1584    * Unsets the value of the 'volumeUnits' attribute of this Model.
1585    *
1586    *
1587  * @return integer value indicating success/failure of the
1588  * function.  @if clike The value is drawn from the
1589  * enumeration #OperationReturnValues_t. @endif The possible values
1590  * returned by this function are:
1591  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
1592    * @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
1593    *
1594    * @note The 'volumeUnits' attribute is available in
1595    * SBML Level&nbsp;3 but is not present on Model in lower Levels of SBML.
1596    */ public
unsetVolumeUnits()1597  int unsetVolumeUnits() {
1598     int ret = libsbmlPINVOKE.Model_unsetVolumeUnits(swigCPtr);
1599     return ret;
1600   }
1601 
1602 
1603 /**
1604    * Unsets the value of the 'areaUnits' attribute of this Model.
1605    *
1606    *
1607  * @return integer value indicating success/failure of the
1608  * function.  @if clike The value is drawn from the
1609  * enumeration #OperationReturnValues_t. @endif The possible values
1610  * returned by this function are:
1611  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
1612    * @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
1613    * @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
1614    *
1615    * @note The 'areaUnits' attribute is available in
1616    * SBML Level&nbsp;3 but is not present on Model in lower Levels of SBML.
1617    */ public
unsetAreaUnits()1618  int unsetAreaUnits() {
1619     int ret = libsbmlPINVOKE.Model_unsetAreaUnits(swigCPtr);
1620     return ret;
1621   }
1622 
1623 
1624 /**
1625    * Unsets the value of the 'lengthUnits' attribute of this Model.
1626    *
1627    *
1628  * @return integer value indicating success/failure of the
1629  * function.  @if clike The value is drawn from the
1630  * enumeration #OperationReturnValues_t. @endif The possible values
1631  * returned by this function are:
1632  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
1633    * @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
1634    * @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
1635    *
1636    * @note The 'lengthUnits' attribute is available in
1637    * SBML Level&nbsp;3 but is not present on Model in lower Levels of SBML.
1638    */ public
unsetLengthUnits()1639  int unsetLengthUnits() {
1640     int ret = libsbmlPINVOKE.Model_unsetLengthUnits(swigCPtr);
1641     return ret;
1642   }
1643 
1644 
1645 /**
1646    * Unsets the value of the 'extentUnits' attribute of this Model.
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_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
1655    * @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
1656    *
1657    * @note The 'extentUnits' attribute is available in
1658    * SBML Level&nbsp;3 but is not present on Model in lower Levels of SBML.
1659    */ public
unsetExtentUnits()1660  int unsetExtentUnits() {
1661     int ret = libsbmlPINVOKE.Model_unsetExtentUnits(swigCPtr);
1662     return ret;
1663   }
1664 
1665 
1666 /**
1667    * Unsets the value of the 'conversionFactor' attribute of this Model.
1668    *
1669    *
1670  * @return integer value indicating success/failure of the
1671  * function.  @if clike The value is drawn from the
1672  * enumeration #OperationReturnValues_t. @endif The possible values
1673  * returned by this function are:
1674  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
1675    * @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
1676    * @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
1677    *
1678    * @note The 'conversionFactor' attribute is available in
1679    * SBML Level&nbsp;3 but is not present on Model in lower Levels of SBML.
1680    */ public
unsetConversionFactor()1681  int unsetConversionFactor() {
1682     int ret = libsbmlPINVOKE.Model_unsetConversionFactor(swigCPtr);
1683     return ret;
1684   }
1685 
1686 
1687 /**
1688    * Adds a copy of the given FunctionDefinition object to this Model.
1689    *
1690    * @param fd the FunctionDefinition to add.
1691    *
1692    *
1693  * @return integer value indicating success/failure of the
1694  * function.  @if clike The value is drawn from the
1695  * enumeration #OperationReturnValues_t. @endif The possible values
1696  * returned by this function are:
1697  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
1698    * @li @link libsbml#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH@endlink
1699    * @li @link libsbml#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH@endlink
1700    * @li @link libsbml#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID@endlink
1701    * @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
1702    * @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
1703    *
1704    *
1705  * @note This method should be used with some caution.  The fact that this
1706  * method @em copies the object passed to it means that the caller will be
1707  * left holding a physically different object instance than the one contained
1708  * inside this object.  Changes made to the original object instance (such as
1709  * resetting attribute values) will <em>not affect the instance in this
1710  * object</em>.  In addition, the caller should make sure to free the
1711  * original object if it is no longer being used, or else a memory leak will
1712  * result.  Please see other methods on this class (particularly a
1713  * corresponding method whose name begins with the word <code>create</code>)
1714  * for alternatives that do not lead to these issues.
1715  *
1716  *
1717    *
1718    * @see createFunctionDefinition()
1719    */ public
addFunctionDefinition(FunctionDefinition fd)1720  int addFunctionDefinition(FunctionDefinition fd) {
1721     int ret = libsbmlPINVOKE.Model_addFunctionDefinition(swigCPtr, FunctionDefinition.getCPtr(fd));
1722     return ret;
1723   }
1724 
1725 
1726 /**
1727    * Adds a copy of the given UnitDefinition object to this Model.
1728    *
1729    * @param ud the UnitDefinition object to add.
1730    *
1731    *
1732  * @return integer value indicating success/failure of the
1733  * function.  @if clike The value is drawn from the
1734  * enumeration #OperationReturnValues_t. @endif The possible values
1735  * returned by this function are:
1736  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
1737    * @li @link libsbml#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH@endlink
1738    * @li @link libsbml#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH@endlink
1739    * @li @link libsbml#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID@endlink
1740    * @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
1741    * @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
1742    *
1743    *
1744  * @note This method should be used with some caution.  The fact that this
1745  * method @em copies the object passed to it means that the caller will be
1746  * left holding a physically different object instance than the one contained
1747  * inside this object.  Changes made to the original object instance (such as
1748  * resetting attribute values) will <em>not affect the instance in this
1749  * object</em>.  In addition, the caller should make sure to free the
1750  * original object if it is no longer being used, or else a memory leak will
1751  * result.  Please see other methods on this class (particularly a
1752  * corresponding method whose name begins with the word <code>create</code>)
1753  * for alternatives that do not lead to these issues.
1754  *
1755  *
1756    *
1757    * @see createUnitDefinition()
1758    */ public
addUnitDefinition(UnitDefinition ud)1759  int addUnitDefinition(UnitDefinition ud) {
1760     int ret = libsbmlPINVOKE.Model_addUnitDefinition(swigCPtr, UnitDefinition.getCPtr(ud));
1761     return ret;
1762   }
1763 
1764 
1765 /**
1766    * Adds a copy of the given CompartmentType object to this Model.
1767    *
1768    * @param ct the CompartmentType object to add.
1769    *
1770    *
1771  * @return integer value indicating success/failure of the
1772  * function.  @if clike The value is drawn from the
1773  * enumeration #OperationReturnValues_t. @endif The possible values
1774  * returned by this function are:
1775  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
1776    * @li @link libsbml#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH@endlink
1777    * @li @link libsbml#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH@endlink
1778    * @li @link libsbml#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID@endlink
1779    * @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
1780    * @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
1781    *
1782    *
1783  * @note This method should be used with some caution.  The fact that this
1784  * method @em copies the object passed to it means that the caller will be
1785  * left holding a physically different object instance than the one contained
1786  * inside this object.  Changes made to the original object instance (such as
1787  * resetting attribute values) will <em>not affect the instance in this
1788  * object</em>.  In addition, the caller should make sure to free the
1789  * original object if it is no longer being used, or else a memory leak will
1790  * result.  Please see other methods on this class (particularly a
1791  * corresponding method whose name begins with the word <code>create</code>)
1792  * for alternatives that do not lead to these issues.
1793  *
1794  *
1795    *
1796    * @note The CompartmentType object class is only available in SBML
1797    * Level&nbsp;2 Versions&nbsp;2&ndash;4.  It is not available in
1798    * Level&nbsp;1 nor Level&nbsp;3.
1799    *
1800    * @see createCompartmentType()
1801    */ public
addCompartmentType(CompartmentType ct)1802  int addCompartmentType(CompartmentType ct) {
1803     int ret = libsbmlPINVOKE.Model_addCompartmentType(swigCPtr, CompartmentType.getCPtr(ct));
1804     return ret;
1805   }
1806 
1807 
1808 /**
1809    * Adds a copy of the given SpeciesType object to this Model.
1810    *
1811    * @param st the SpeciesType object to add.
1812    *
1813    *
1814  * @return integer value indicating success/failure of the
1815  * function.  @if clike The value is drawn from the
1816  * enumeration #OperationReturnValues_t. @endif The possible values
1817  * returned by this function are:
1818  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
1819    * @li @link libsbml#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH@endlink
1820    * @li @link libsbml#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH@endlink
1821    * @li @link libsbml#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID@endlink
1822    * @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
1823    * @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
1824    *
1825    *
1826  * @note This method should be used with some caution.  The fact that this
1827  * method @em copies the object passed to it means that the caller will be
1828  * left holding a physically different object instance than the one contained
1829  * inside this object.  Changes made to the original object instance (such as
1830  * resetting attribute values) will <em>not affect the instance in this
1831  * object</em>.  In addition, the caller should make sure to free the
1832  * original object if it is no longer being used, or else a memory leak will
1833  * result.  Please see other methods on this class (particularly a
1834  * corresponding method whose name begins with the word <code>create</code>)
1835  * for alternatives that do not lead to these issues.
1836  *
1837  *
1838    *
1839    * @note The SpeciesType object class is only available in SBML
1840    * Level&nbsp;2 Versions&nbsp;2&ndash;4.  It is not available in
1841    * Level&nbsp;1 nor Level&nbsp;3.
1842    *
1843    * @see createSpeciesType()
1844    */ public
addSpeciesType(SpeciesType st)1845  int addSpeciesType(SpeciesType st) {
1846     int ret = libsbmlPINVOKE.Model_addSpeciesType(swigCPtr, SpeciesType.getCPtr(st));
1847     return ret;
1848   }
1849 
1850 
1851 /**
1852    * Adds a copy of the given Compartment object to this Model.
1853    *
1854    * @param c the Compartment object to add.
1855    *
1856    *
1857  * @return integer value indicating success/failure of the
1858  * function.  @if clike The value is drawn from the
1859  * enumeration #OperationReturnValues_t. @endif The possible values
1860  * returned by this function are:
1861  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
1862    * @li @link libsbml#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH@endlink
1863    * @li @link libsbml#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH@endlink
1864    * @li @link libsbml#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID@endlink
1865    * @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
1866    * @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
1867    *
1868    *
1869  * @note This method should be used with some caution.  The fact that this
1870  * method @em copies the object passed to it means that the caller will be
1871  * left holding a physically different object instance than the one contained
1872  * inside this object.  Changes made to the original object instance (such as
1873  * resetting attribute values) will <em>not affect the instance in this
1874  * object</em>.  In addition, the caller should make sure to free the
1875  * original object if it is no longer being used, or else a memory leak will
1876  * result.  Please see other methods on this class (particularly a
1877  * corresponding method whose name begins with the word <code>create</code>)
1878  * for alternatives that do not lead to these issues.
1879  *
1880  *
1881    *
1882    * @see createCompartment()
1883    */ public
addCompartment(Compartment c)1884  int addCompartment(Compartment c) {
1885     int ret = libsbmlPINVOKE.Model_addCompartment(swigCPtr, Compartment.getCPtr(c));
1886     return ret;
1887   }
1888 
1889 
1890 /**
1891    * Adds a copy of the given Species object to this Model.
1892    *
1893    * @param s the Species object to add.
1894    *
1895    *
1896  * @return integer value indicating success/failure of the
1897  * function.  @if clike The value is drawn from the
1898  * enumeration #OperationReturnValues_t. @endif The possible values
1899  * returned by this function are:
1900  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
1901    * @li @link libsbml#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH@endlink
1902    * @li @link libsbml#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH@endlink
1903    * @li @link libsbml#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID@endlink
1904    * @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
1905    * @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
1906    *
1907    *
1908  * @note This method should be used with some caution.  The fact that this
1909  * method @em copies the object passed to it means that the caller will be
1910  * left holding a physically different object instance than the one contained
1911  * inside this object.  Changes made to the original object instance (such as
1912  * resetting attribute values) will <em>not affect the instance in this
1913  * object</em>.  In addition, the caller should make sure to free the
1914  * original object if it is no longer being used, or else a memory leak will
1915  * result.  Please see other methods on this class (particularly a
1916  * corresponding method whose name begins with the word <code>create</code>)
1917  * for alternatives that do not lead to these issues.
1918  *
1919  *
1920    *
1921    * @see createSpecies()
1922    */ public
addSpecies(Species s)1923  int addSpecies(Species s) {
1924     int ret = libsbmlPINVOKE.Model_addSpecies(swigCPtr, Species.getCPtr(s));
1925     return ret;
1926   }
1927 
1928 
1929 /**
1930    * Adds a copy of the given Parameter object to this Model.
1931    *
1932    * @param p the Parameter object to add.
1933    *
1934    *
1935  * @return integer value indicating success/failure of the
1936  * function.  @if clike The value is drawn from the
1937  * enumeration #OperationReturnValues_t. @endif The possible values
1938  * returned by this function are:
1939  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
1940    * @li @link libsbml#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH@endlink
1941    * @li @link libsbml#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH@endlink
1942    * @li @link libsbml#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID@endlink
1943    * @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
1944    * @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
1945    *
1946    *
1947  * @note This method should be used with some caution.  The fact that this
1948  * method @em copies the object passed to it means that the caller will be
1949  * left holding a physically different object instance than the one contained
1950  * inside this object.  Changes made to the original object instance (such as
1951  * resetting attribute values) will <em>not affect the instance in this
1952  * object</em>.  In addition, the caller should make sure to free the
1953  * original object if it is no longer being used, or else a memory leak will
1954  * result.  Please see other methods on this class (particularly a
1955  * corresponding method whose name begins with the word <code>create</code>)
1956  * for alternatives that do not lead to these issues.
1957  *
1958  *
1959    *
1960    * @see createParameter()
1961    */ public
addParameter(Parameter p)1962  int addParameter(Parameter p) {
1963     int ret = libsbmlPINVOKE.Model_addParameter(swigCPtr, Parameter.getCPtr(p));
1964     return ret;
1965   }
1966 
1967 
1968 /**
1969    * Adds a copy of the given InitialAssignment object to this Model.
1970    *
1971    * @param ia the InitialAssignment object to add.
1972    *
1973    *
1974  * @return integer value indicating success/failure of the
1975  * function.  @if clike The value is drawn from the
1976  * enumeration #OperationReturnValues_t. @endif The possible values
1977  * returned by this function are:
1978  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
1979    * @li @link libsbml#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH@endlink
1980    * @li @link libsbml#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH@endlink
1981    * @li @link libsbml#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID@endlink
1982    * @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
1983    * @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
1984    *
1985    *
1986  * @note This method should be used with some caution.  The fact that this
1987  * method @em copies the object passed to it means that the caller will be
1988  * left holding a physically different object instance than the one contained
1989  * inside this object.  Changes made to the original object instance (such as
1990  * resetting attribute values) will <em>not affect the instance in this
1991  * object</em>.  In addition, the caller should make sure to free the
1992  * original object if it is no longer being used, or else a memory leak will
1993  * result.  Please see other methods on this class (particularly a
1994  * corresponding method whose name begins with the word <code>create</code>)
1995  * for alternatives that do not lead to these issues.
1996  *
1997  *
1998    *
1999    * @see createInitialAssignment()
2000    */ public
addInitialAssignment(InitialAssignment ia)2001  int addInitialAssignment(InitialAssignment ia) {
2002     int ret = libsbmlPINVOKE.Model_addInitialAssignment(swigCPtr, InitialAssignment.getCPtr(ia));
2003     return ret;
2004   }
2005 
2006 
2007 /**
2008    * Adds a copy of the given Rule object to this Model.
2009    *
2010    * @param r the Rule object to add.
2011    *
2012    *
2013  * @return integer value indicating success/failure of the
2014  * function.  @if clike The value is drawn from the
2015  * enumeration #OperationReturnValues_t. @endif The possible values
2016  * returned by this function are:
2017  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
2018    * @li @link libsbml#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH@endlink
2019    * @li @link libsbml#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH@endlink
2020    * @li @link libsbml#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID@endlink
2021    * @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
2022    * @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
2023    *
2024    *
2025  * @note This method should be used with some caution.  The fact that this
2026  * method @em copies the object passed to it means that the caller will be
2027  * left holding a physically different object instance than the one contained
2028  * inside this object.  Changes made to the original object instance (such as
2029  * resetting attribute values) will <em>not affect the instance in this
2030  * object</em>.  In addition, the caller should make sure to free the
2031  * original object if it is no longer being used, or else a memory leak will
2032  * result.  Please see other methods on this class (particularly a
2033  * corresponding method whose name begins with the word <code>create</code>)
2034  * for alternatives that do not lead to these issues.
2035  *
2036  *
2037    *
2038    * @see createAlgebraicRule()
2039    * @see createAssignmentRule()
2040    * @see createRateRule()
2041    */ public
addRule(Rule r)2042  int addRule(Rule r) {
2043     int ret = libsbmlPINVOKE.Model_addRule(swigCPtr, Rule.getCPtr(r));
2044     return ret;
2045   }
2046 
2047 
2048 /**
2049    * Adds a copy of the given Constraint object to this Model.
2050    *
2051    * @param c the Constraint object to add.
2052    *
2053    *
2054  * @return integer value indicating success/failure of the
2055  * function.  @if clike The value is drawn from the
2056  * enumeration #OperationReturnValues_t. @endif The possible values
2057  * returned by this function are:
2058  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
2059    * @li @link libsbml#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH@endlink
2060    * @li @link libsbml#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH@endlink
2061    * @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
2062    * @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
2063    *
2064    *
2065  * @note This method should be used with some caution.  The fact that this
2066  * method @em copies the object passed to it means that the caller will be
2067  * left holding a physically different object instance than the one contained
2068  * inside this object.  Changes made to the original object instance (such as
2069  * resetting attribute values) will <em>not affect the instance in this
2070  * object</em>.  In addition, the caller should make sure to free the
2071  * original object if it is no longer being used, or else a memory leak will
2072  * result.  Please see other methods on this class (particularly a
2073  * corresponding method whose name begins with the word <code>create</code>)
2074  * for alternatives that do not lead to these issues.
2075  *
2076  *
2077    *
2078    * @see createConstraint()
2079    */ public
addConstraint(Constraint c)2080  int addConstraint(Constraint c) {
2081     int ret = libsbmlPINVOKE.Model_addConstraint(swigCPtr, Constraint.getCPtr(c));
2082     return ret;
2083   }
2084 
2085 
2086 /**
2087    * Adds a copy of the given Reaction object to this Model.
2088    *
2089    * @param r the Reaction object to add.
2090    *
2091    *
2092  * @return integer value indicating success/failure of the
2093  * function.  @if clike The value is drawn from the
2094  * enumeration #OperationReturnValues_t. @endif The possible values
2095  * returned by this function are:
2096  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
2097    * @li @link libsbml#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH@endlink
2098    * @li @link libsbml#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH@endlink
2099    * @li @link libsbml#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID@endlink
2100    * @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
2101    * @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
2102    *
2103    *
2104  * @note This method should be used with some caution.  The fact that this
2105  * method @em copies the object passed to it means that the caller will be
2106  * left holding a physically different object instance than the one contained
2107  * inside this object.  Changes made to the original object instance (such as
2108  * resetting attribute values) will <em>not affect the instance in this
2109  * object</em>.  In addition, the caller should make sure to free the
2110  * original object if it is no longer being used, or else a memory leak will
2111  * result.  Please see other methods on this class (particularly a
2112  * corresponding method whose name begins with the word <code>create</code>)
2113  * for alternatives that do not lead to these issues.
2114  *
2115  *
2116    *
2117    * @see createReaction()
2118    */ public
addReaction(Reaction r)2119  int addReaction(Reaction r) {
2120     int ret = libsbmlPINVOKE.Model_addReaction(swigCPtr, Reaction.getCPtr(r));
2121     return ret;
2122   }
2123 
2124 
2125 /**
2126    * Adds a copy of the given Event object to this Model.
2127    *
2128    * @param e the Event object to add.
2129    *
2130    *
2131  * @return integer value indicating success/failure of the
2132  * function.  @if clike The value is drawn from the
2133  * enumeration #OperationReturnValues_t. @endif The possible values
2134  * returned by this function are:
2135  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
2136    * @li @link libsbml#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH@endlink
2137    * @li @link libsbml#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH@endlink
2138    * @li @link libsbml#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID@endlink
2139    * @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
2140    * @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
2141    *
2142    *
2143  * @note This method should be used with some caution.  The fact that this
2144  * method @em copies the object passed to it means that the caller will be
2145  * left holding a physically different object instance than the one contained
2146  * inside this object.  Changes made to the original object instance (such as
2147  * resetting attribute values) will <em>not affect the instance in this
2148  * object</em>.  In addition, the caller should make sure to free the
2149  * original object if it is no longer being used, or else a memory leak will
2150  * result.  Please see other methods on this class (particularly a
2151  * corresponding method whose name begins with the word <code>create</code>)
2152  * for alternatives that do not lead to these issues.
2153  *
2154  *
2155    *
2156    * @see createEvent()
2157    */ public
addEvent(Event e)2158  int addEvent(Event e) {
2159     int ret = libsbmlPINVOKE.Model_addEvent(swigCPtr, Event.getCPtr(e));
2160     return ret;
2161   }
2162 
2163 
2164 /**
2165    * Creates a new FunctionDefinition inside this Model and returns it.
2166    *
2167    * The SBML Level and Version of the enclosing Model object, as well as
2168    * any SBML package namespaces, are used to initialize this
2169    * object's corresponding attributes.
2170    *
2171    * @return the FunctionDefinition object created.
2172    *
2173    * @see addFunctionDefinition(FunctionDefinition fd)
2174    */ public
createFunctionDefinition()2175  FunctionDefinition createFunctionDefinition() {
2176     global::System.IntPtr cPtr = libsbmlPINVOKE.Model_createFunctionDefinition(swigCPtr);
2177     FunctionDefinition ret = (cPtr == global::System.IntPtr.Zero) ? null : new FunctionDefinition(cPtr, false);
2178     return ret;
2179   }
2180 
2181 
2182 /**
2183    * Creates a new UnitDefinition inside this Model and returns it.
2184    *
2185    * The SBML Level and Version of the enclosing Model object, as well as
2186    * any SBML package namespaces, are used to initialize this
2187    * object's corresponding attributes.
2188    *
2189    * @return the UnitDefinition object created.
2190    *
2191    * @see addUnitDefinition(UnitDefinition ud)
2192    */ public
createUnitDefinition()2193  UnitDefinition createUnitDefinition() {
2194     global::System.IntPtr cPtr = libsbmlPINVOKE.Model_createUnitDefinition(swigCPtr);
2195     UnitDefinition ret = (cPtr == global::System.IntPtr.Zero) ? null : new UnitDefinition(cPtr, false);
2196     return ret;
2197   }
2198 
2199 
2200 /**
2201    * Creates a new Unit object within the last UnitDefinition object
2202    * created in this model and returns a pointer to it.
2203    *
2204    * The SBML Level and Version of the enclosing Model object, as well as
2205    * any SBML package namespaces, are used to initialize this
2206    * object's corresponding attributes.
2207    *
2208    * The mechanism by which the UnitDefinition was created is not
2209    * significant.  If a UnitDefinition object does not exist in this model,
2210    * a new Unit is @em not created and @c null is returned instead.
2211    *
2212    * @return the Unit object created.
2213    *
2214    * @see addUnitDefinition(UnitDefinition ud)
2215    */ public
createUnit()2216  Unit createUnit() {
2217     global::System.IntPtr cPtr = libsbmlPINVOKE.Model_createUnit(swigCPtr);
2218     Unit ret = (cPtr == global::System.IntPtr.Zero) ? null : new Unit(cPtr, false);
2219     return ret;
2220   }
2221 
2222 
2223 /**
2224    * Creates a new CompartmentType inside this Model and returns it.
2225    *
2226    * The SBML Level and Version of the enclosing Model object, as well as
2227    * any SBML package namespaces, are used to initialize this
2228    * object's corresponding attributes.
2229    *
2230    * @return the CompartmentType object created.
2231    *
2232    * @note The CompartmentType object class is only available in SBML
2233    * Level&nbsp;2 Versions&nbsp;2&ndash;4.  It is not available in
2234    * Level&nbsp;1 nor Level&nbsp;3.
2235    *
2236    * @see addCompartmentType(CompartmentType ct)
2237    */ public
createCompartmentType()2238  CompartmentType createCompartmentType() {
2239     global::System.IntPtr cPtr = libsbmlPINVOKE.Model_createCompartmentType(swigCPtr);
2240     CompartmentType ret = (cPtr == global::System.IntPtr.Zero) ? null : new CompartmentType(cPtr, false);
2241     return ret;
2242   }
2243 
2244 
2245 /**
2246    * Creates a new SpeciesType inside this Model and returns it.
2247    *
2248    * The SBML Level and Version of the enclosing Model object, as well as
2249    * any SBML package namespaces, are used to initialize this
2250    * object's corresponding attributes.
2251    *
2252    * @return the SpeciesType object created.
2253    *
2254    * @note The SpeciesType object class is only available in SBML
2255    * Level&nbsp;2 Versions&nbsp;2&ndash;4.  It is not available in
2256    * Level&nbsp;1 nor Level&nbsp;3.
2257    *
2258    * @see addSpeciesType(SpeciesType st)
2259    */ public
createSpeciesType()2260  SpeciesType createSpeciesType() {
2261     global::System.IntPtr cPtr = libsbmlPINVOKE.Model_createSpeciesType(swigCPtr);
2262     SpeciesType ret = (cPtr == global::System.IntPtr.Zero) ? null : new SpeciesType(cPtr, false);
2263     return ret;
2264   }
2265 
2266 
2267 /**
2268    * Creates a new Compartment inside this Model and returns it.
2269    *
2270    * The SBML Level and Version of the enclosing Model object, as well as
2271    * any SBML package namespaces, are used to initialize this
2272    * object's corresponding attributes.
2273    *
2274    * @return the Compartment object created.
2275    *
2276    * @see addCompartment(Compartment c)
2277    */ public
createCompartment()2278  Compartment createCompartment() {
2279     global::System.IntPtr cPtr = libsbmlPINVOKE.Model_createCompartment(swigCPtr);
2280     Compartment ret = (cPtr == global::System.IntPtr.Zero) ? null : new Compartment(cPtr, false);
2281     return ret;
2282   }
2283 
2284 
2285 /**
2286    * Creates a new Species inside this Model and returns it.
2287    *
2288    * The SBML Level and Version of the enclosing Model object, as well as
2289    * any SBML package namespaces, are used to initialize this
2290    * object's corresponding attributes.
2291    *
2292    * @return the Species object created.
2293    *
2294    * @see addSpecies(Species s)
2295    */ public
createSpecies()2296  Species createSpecies() {
2297     global::System.IntPtr cPtr = libsbmlPINVOKE.Model_createSpecies(swigCPtr);
2298     Species ret = (cPtr == global::System.IntPtr.Zero) ? null : new Species(cPtr, false);
2299     return ret;
2300   }
2301 
2302 
2303 /**
2304    * Creates a new Parameter inside this Model and returns it.
2305    *
2306    * The SBML Level and Version of the enclosing Model object, as well as
2307    * any SBML package namespaces, are used to initialize this
2308    * object's corresponding attributes.
2309    *
2310    * @return the Parameter object created.
2311    *
2312    * @see addParameter(Parameter p)
2313    */ public
createParameter()2314  Parameter createParameter() {
2315     global::System.IntPtr cPtr = libsbmlPINVOKE.Model_createParameter(swigCPtr);
2316     Parameter ret = (cPtr == global::System.IntPtr.Zero) ? null : new Parameter(cPtr, false);
2317     return ret;
2318   }
2319 
2320 
2321 /**
2322    * Creates a new InitialAssignment inside this Model and returns it.
2323    *
2324    * The SBML Level and Version of the enclosing Model object, as well as
2325    * any SBML package namespaces, are used to initialize this
2326    * object's corresponding attributes.
2327    *
2328    * @return the InitialAssignment object created.
2329    *
2330    * @see addInitialAssignment(InitialAssignment ia)
2331    */ public
createInitialAssignment()2332  InitialAssignment createInitialAssignment() {
2333     global::System.IntPtr cPtr = libsbmlPINVOKE.Model_createInitialAssignment(swigCPtr);
2334     InitialAssignment ret = (cPtr == global::System.IntPtr.Zero) ? null : new InitialAssignment(cPtr, false);
2335     return ret;
2336   }
2337 
2338 
2339 /**
2340    * Creates a new AlgebraicRule inside this Model and returns it.
2341    *
2342    * The SBML Level and Version of the enclosing Model object, as well as
2343    * any SBML package namespaces, are used to initialize this
2344    * object's corresponding attributes.
2345    *
2346    * @return the AlgebraicRule object created.
2347    *
2348    * @see addRule(Rule r)
2349    */ public
createAlgebraicRule()2350  AlgebraicRule createAlgebraicRule() {
2351     global::System.IntPtr cPtr = libsbmlPINVOKE.Model_createAlgebraicRule(swigCPtr);
2352     AlgebraicRule ret = (cPtr == global::System.IntPtr.Zero) ? null : new AlgebraicRule(cPtr, false);
2353     return ret;
2354   }
2355 
2356 
2357 /**
2358    * Creates a new AssignmentRule inside this Model and returns it.
2359    *
2360    * The SBML Level and Version of the enclosing Model object, as well as
2361    * any SBML package namespaces, are used to initialize this
2362    * object's corresponding attributes.
2363    *
2364    * @return the AssignmentRule object created.
2365    *
2366    * @see addRule(Rule r)
2367    */ public
createAssignmentRule()2368  AssignmentRule createAssignmentRule() {
2369     global::System.IntPtr cPtr = libsbmlPINVOKE.Model_createAssignmentRule(swigCPtr);
2370     AssignmentRule ret = (cPtr == global::System.IntPtr.Zero) ? null : new AssignmentRule(cPtr, false);
2371     return ret;
2372   }
2373 
2374 
2375 /**
2376    * Creates a new RateRule inside this Model and returns it.
2377    *
2378    * The SBML Level and Version of the enclosing Model object, as well as
2379    * any SBML package namespaces, are used to initialize this
2380    * object's corresponding attributes.
2381    *
2382    * @return the RateRule object created.
2383    *
2384    * @see addRule(Rule r)
2385    */ public
createRateRule()2386  RateRule createRateRule() {
2387     global::System.IntPtr cPtr = libsbmlPINVOKE.Model_createRateRule(swigCPtr);
2388     RateRule ret = (cPtr == global::System.IntPtr.Zero) ? null : new RateRule(cPtr, false);
2389     return ret;
2390   }
2391 
2392 
2393 /**
2394    * Creates a new Constraint inside this Model and returns it.
2395    *
2396    * The SBML Level and Version of the enclosing Model object, as well as
2397    * any SBML package namespaces, are used to initialize this
2398    * object's corresponding attributes.
2399    *
2400    * @return the Constraint object created.
2401    *
2402    * @see addConstraint(Constraint c)
2403    */ public
createConstraint()2404  Constraint createConstraint() {
2405     global::System.IntPtr cPtr = libsbmlPINVOKE.Model_createConstraint(swigCPtr);
2406     Constraint ret = (cPtr == global::System.IntPtr.Zero) ? null : new Constraint(cPtr, false);
2407     return ret;
2408   }
2409 
2410 
2411 /**
2412    * Creates a new Reaction inside this Model and returns it.
2413    *
2414    * The SBML Level and Version of the enclosing Model object, as well as
2415    * any SBML package namespaces, are used to initialize this
2416    * object's corresponding attributes.
2417    *
2418    * @return the Reaction object created.
2419    *
2420    * @see addReaction(Reaction r)
2421    */ public
createReaction()2422  Reaction createReaction() {
2423 	Reaction ret = (Reaction) libsbml.DowncastSBase(libsbmlPINVOKE.Model_createReaction(swigCPtr), false);
2424 	return ret;
2425 }
2426 
2427 
2428 /**
2429    * Creates a new SpeciesReference object for a reactant inside the last
2430    * Reaction object in this Model, and returns a pointer to it.
2431    *
2432    * The SBML Level and Version of the enclosing Model object, as well as
2433    * any SBML package namespaces, are used to initialize this
2434    * object's corresponding attributes.
2435    *
2436    *
2437  *
2438  * The mechanism by which the last Reaction object was created and added
2439  * to this Model is not significant.  It could have been created in a
2440  * variety of ways, for example using createReaction().  If a Reaction
2441  * does not exist for this model, a new SpeciesReference is @em not
2442  * created and @c null is returned instead.
2443  *
2444  *
2445    *
2446    * @return the SpeciesReference object created.  If a Reaction does not
2447    * exist for this model, a new SpeciesReference is @em not created and
2448    * @c null is returned.
2449    */ public
createReactant()2450  SpeciesReference createReactant() {
2451 	SpeciesReference ret
2452 	    = (SpeciesReference) libsbml.DowncastSBase(libsbmlPINVOKE.Model_createReactant(swigCPtr), false);
2453 	return ret;
2454 }
2455 
2456 
2457 /**
2458    * Creates a new SpeciesReference object for a product inside the last
2459    * Reaction object in this Model, and returns a pointer to it.
2460    *
2461    * The SBML Level and Version of the enclosing Model object, as well as
2462    * any SBML package namespaces, are used to initialize this
2463    * object's corresponding attributes.
2464    *
2465    *
2466  *
2467  * The mechanism by which the last Reaction object was created and added
2468  * to this Model is not significant.  It could have been created in a
2469  * variety of ways, for example using createReaction().  If a Reaction
2470  * does not exist for this model, a new SpeciesReference is @em not
2471  * created and @c null is returned instead.
2472  *
2473  *
2474    *
2475    * @return the SpeciesReference object created. If a Reaction does not
2476    * exist for this model, a new SpeciesReference is @em not created and
2477    * @c null is returned.
2478    */ public
createProduct()2479  SpeciesReference createProduct() {
2480 	SpeciesReference ret
2481 	    = (SpeciesReference) libsbml.DowncastSBase(libsbmlPINVOKE.Model_createProduct(swigCPtr), false);
2482 	return ret;
2483 }
2484 
2485 
2486 /**
2487    * Creates a new ModifierSpeciesReference object for a modifier species
2488    * inside the last Reaction object in this Model, and returns a pointer
2489    * to it.
2490    *
2491    * The SBML Level and Version of the enclosing Model object, as well as
2492    * any SBML package namespaces, are used to initialize this
2493    * object's corresponding attributes.
2494    *
2495    *
2496  *
2497  * The mechanism by which the last Reaction object was created and added
2498  * to this Model is not significant.  It could have been created in a
2499  * variety of ways, for example using createReaction().  If a Reaction
2500  * does not exist for this model, a new SpeciesReference is @em not
2501  * created and @c null is returned instead.
2502  *
2503  *
2504    *
2505    * @return the SpeciesReference object created.  If a Reaction does not
2506    * exist for this model, a new SpeciesReference is @em not created and
2507    * @c null is returned.
2508    */ public
createModifier()2509  ModifierSpeciesReference createModifier() {
2510     global::System.IntPtr cPtr = libsbmlPINVOKE.Model_createModifier(swigCPtr);
2511     ModifierSpeciesReference ret = (cPtr == global::System.IntPtr.Zero) ? null : new ModifierSpeciesReference(cPtr, false);
2512     return ret;
2513   }
2514 
2515 
2516 /**
2517    * Creates a new KineticLaw inside the last Reaction object created in
2518    * this Model, and returns a pointer to it.
2519    *
2520    * The SBML Level and Version of the enclosing Model object, as well as
2521    * any SBML package namespaces, are used to initialize this
2522    * object's corresponding attributes.
2523    *
2524    *
2525  *
2526  * The mechanism by which the last Reaction object was created and added
2527  * to this Model is not significant.  It could have been created in a
2528  * variety of ways, for example using createReaction().  If a Reaction
2529  * does not exist for this model, a new SpeciesReference is @em not
2530  * created and @c null is returned instead.
2531  *
2532  *
2533    *
2534    * @return the KineticLaw object created.  If a Reaction does not exist for
2535    * this model, or a Reaction does exist but already has a KineticLaw, a new
2536    * KineticLaw is @em not created and @c null is returned.
2537    */ public
createKineticLaw()2538  KineticLaw createKineticLaw() {
2539     global::System.IntPtr cPtr = libsbmlPINVOKE.Model_createKineticLaw(swigCPtr);
2540     KineticLaw ret = (cPtr == global::System.IntPtr.Zero) ? null : new KineticLaw(cPtr, false);
2541     return ret;
2542   }
2543 
2544 
2545 /**
2546    * Creates a new local Parameter inside the KineticLaw object of the last
2547    * Reaction created inside this Model, and returns a pointer to it.
2548    *
2549    * The SBML Level and Version of the enclosing Model object, as well as
2550    * any SBML package namespaces, are used to initialize this
2551    * object's corresponding attributes.
2552    *
2553    *
2554  *
2555  * The last KineticLaw object in this Model could have been created in a
2556  * variety of ways.  For example, it could have been added using
2557  * createKineticLaw(), or it could be the result of using
2558  * Reaction::createKineticLaw() on the Reaction object created by a
2559  * createReaction().  If a Reaction does not exist for this model, or the
2560  * last Reaction does not contain a KineticLaw object, a new Parameter is
2561  * @em not created and @c null is returned instead.
2562  *
2563  *
2564    *
2565    * @return the Parameter object created.  If a Reaction does not exist for
2566    * this model, or a KineticLaw for the Reaction does not exist, a new
2567    * Parameter is @em not created and @c null is returned.
2568    */ public
createKineticLawParameter()2569  Parameter createKineticLawParameter() {
2570     global::System.IntPtr cPtr = libsbmlPINVOKE.Model_createKineticLawParameter(swigCPtr);
2571     Parameter ret = (cPtr == global::System.IntPtr.Zero) ? null : new Parameter(cPtr, false);
2572     return ret;
2573   }
2574 
2575 
2576 /**
2577    * Creates a new LocalParameter inside the KineticLaw object of the last
2578    * Reaction created inside this Model, and returns a pointer to it.
2579    *
2580    * The SBML Level and Version of the enclosing Model object, as well as
2581    * any SBML package namespaces, are used to initialize this
2582    * object's corresponding attributes.
2583    *
2584    *
2585  *
2586  * The last KineticLaw object in this Model could have been created in a
2587  * variety of ways.  For example, it could have been added using
2588  * createKineticLaw(), or it could be the result of using
2589  * Reaction::createKineticLaw() on the Reaction object created by a
2590  * createReaction().  If a Reaction does not exist for this model, or the
2591  * last Reaction does not contain a KineticLaw object, a new Parameter is
2592  * @em not created and @c null is returned instead.
2593  *
2594  *
2595    *
2596    * @return the Parameter object created.  If a Reaction does not exist for
2597    * this model, or a KineticLaw for the Reaction does not exist, a new
2598    * Parameter is @em not created and @c null is returned.
2599    */ public
createKineticLawLocalParameter()2600  LocalParameter createKineticLawLocalParameter() {
2601     global::System.IntPtr cPtr = libsbmlPINVOKE.Model_createKineticLawLocalParameter(swigCPtr);
2602     LocalParameter ret = (cPtr == global::System.IntPtr.Zero) ? null : new LocalParameter(cPtr, false);
2603     return ret;
2604   }
2605 
2606 
2607 /**
2608    * Creates a new Event inside this Model and returns it.
2609    *
2610    * The SBML Level and Version of the enclosing Model object, as well as
2611    * any SBML package namespaces, are used to initialize this
2612    * object's corresponding attributes.
2613    *
2614    * @return the Event object created.
2615    */ public
createEvent()2616  Event createEvent() {
2617     global::System.IntPtr cPtr = libsbmlPINVOKE.Model_createEvent(swigCPtr);
2618     Event ret = (cPtr == global::System.IntPtr.Zero) ? null : new Event(cPtr, false);
2619     return ret;
2620   }
2621 
2622 
2623 /**
2624    * Creates a new EventAssignment inside the last Event object created in
2625    * this Model, and returns a pointer to it.
2626    *
2627    * The SBML Level and Version of the enclosing Model object, as well as
2628    * any SBML package namespaces, are used to initialize this
2629    * object's corresponding attributes.
2630    *
2631    *
2632  *
2633  * The mechanism by which the last Event object in this model was created
2634  * is not significant.  It could have been created in a variety of ways,
2635  * for example by using createEvent().  If no Event object exists in this
2636  * Model object, a new EventAssignment is @em not created and @c null is
2637  * returned instead.
2638    *
2639    * @return the EventAssignment object created.
2640    */ public
createEventAssignment()2641  EventAssignment createEventAssignment() {
2642     global::System.IntPtr cPtr = libsbmlPINVOKE.Model_createEventAssignment(swigCPtr);
2643     EventAssignment ret = (cPtr == global::System.IntPtr.Zero) ? null : new EventAssignment(cPtr, false);
2644     return ret;
2645   }
2646 
2647 
2648 /**
2649    * Creates a new Trigger inside the last Event object created in
2650    * this Model, and returns a pointer to it.
2651    *
2652    * The SBML Level and Version of the enclosing Model object, as well as
2653    * any SBML package namespaces, are used to initialize this
2654    * object's corresponding attributes.
2655    *
2656    *
2657  *
2658  * The mechanism by which the last Event object in this model was created
2659  * is not significant.  It could have been created in a variety of ways,
2660  * for example by using createEvent().  If no Event object exists in this
2661  * Model object, a new EventAssignment is @em not created and @c null is
2662  * returned instead.
2663    *
2664    * @return the Trigger object created.
2665    */ public
createTrigger()2666  Trigger createTrigger() {
2667     global::System.IntPtr cPtr = libsbmlPINVOKE.Model_createTrigger(swigCPtr);
2668     Trigger ret = (cPtr == global::System.IntPtr.Zero) ? null : new Trigger(cPtr, false);
2669     return ret;
2670   }
2671 
2672 
2673 /**
2674    * Creates a new Delay inside the last Event object created in
2675    * this Model, and returns a pointer to it.
2676    *
2677    * The SBML Level and Version of the enclosing Model object, as well as
2678    * any SBML package namespaces, are used to initialize this
2679    * object's corresponding attributes.
2680    *
2681    *
2682  *
2683  * The mechanism by which the last Event object in this model was created
2684  * is not significant.  It could have been created in a variety of ways,
2685  * for example by using createEvent().  If no Event object exists in this
2686  * Model object, a new EventAssignment is @em not created and @c null is
2687  * returned instead.
2688    *
2689    * @return the Delay object created.
2690    */ public
createDelay()2691  Delay createDelay() {
2692     global::System.IntPtr cPtr = libsbmlPINVOKE.Model_createDelay(swigCPtr);
2693     Delay ret = (cPtr == global::System.IntPtr.Zero) ? null : new Delay(cPtr, false);
2694     return ret;
2695   }
2696 
2697 
2698 /**
2699    * Sets the value of the 'annotation' subelement of this SBML object to a
2700    * copy of @p annotation.
2701    *
2702    * Any existing content of the 'annotation' subelement is discarded.
2703    * Unless you have taken steps to first copy and reconstitute any
2704    * existing annotations into the @p annotation that is about to be
2705    * assigned, it is likely that performing such wholesale replacement is
2706    * unfriendly towards other software applications whose annotations are
2707    * discarded.  An alternative may be to use appendAnnotation().
2708    *
2709    * @param annotation an XML structure that is to be used as the content
2710    * of the 'annotation' subelement of this object.
2711    *
2712    *
2713  * @return integer value indicating success/failure of the
2714  * function.  @if clike The value is drawn from the
2715  * enumeration #OperationReturnValues_t. @endif This particular
2716  * function only does one thing irrespective of user input or
2717  * object state, and thus will only return a single value:
2718  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
2719    *
2720    * @see appendAnnotation(XMLNode annotation)
2721    */ public new
setAnnotation(XMLNode annotation)2722  int setAnnotation(XMLNode annotation) {
2723     int ret = libsbmlPINVOKE.Model_setAnnotation__SWIG_0(swigCPtr, XMLNode.getCPtr(annotation));
2724     return ret;
2725   }
2726 
2727 
2728 /**
2729    * Sets the value of the 'annotation' subelement of this SBML object to a
2730    * copy of @p annotation.
2731    *
2732    * Any existing content of the 'annotation' subelement is discarded.
2733    * Unless you have taken steps to first copy and reconstitute any
2734    * existing annotations into the @p annotation that is about to be
2735    * assigned, it is likely that performing such wholesale replacement is
2736    * unfriendly towards other software applications whose annotations are
2737    * discarded.  An alternative may be to use appendAnnotation().
2738    *
2739    * @param annotation an XML string that is to be used as the content
2740    * of the 'annotation' subelement of this object.
2741    *
2742    *
2743  * @return integer value indicating success/failure of the
2744  * function.  @if clike The value is drawn from the
2745  * enumeration #OperationReturnValues_t. @endif The possible values
2746  * returned by this function are:
2747  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
2748    * @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
2749    *
2750    * @see appendAnnotation(string annotation)
2751    */ public new
setAnnotation(string annotation)2752  int setAnnotation(string annotation) {
2753     int ret = libsbmlPINVOKE.Model_setAnnotation__SWIG_1(swigCPtr, annotation);
2754     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
2755     return ret;
2756   }
2757 
2758 
2759 /**
2760    * Appends annotation content to any existing content in the 'annotation'
2761    * subelement of this object.
2762    *
2763    * The content in @p annotation is copied.  Unlike setAnnotation(), this
2764    * method allows other annotations to be preserved when an application
2765    * adds its own data.
2766    *
2767    * @param annotation an XML structure that is to be copied and appended
2768    * to the content of the 'annotation' subelement of this object.
2769    *
2770    *
2771  * @return integer value indicating success/failure of the
2772  * function.  @if clike The value is drawn from the
2773  * enumeration #OperationReturnValues_t. @endif The possible values
2774  * returned by this function are:
2775  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
2776    * @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
2777    *
2778    * @see setAnnotation(XMLNode annotation)
2779    */ public new
appendAnnotation(XMLNode annotation)2780  int appendAnnotation(XMLNode annotation) {
2781     int ret = libsbmlPINVOKE.Model_appendAnnotation__SWIG_0(swigCPtr, XMLNode.getCPtr(annotation));
2782     return ret;
2783   }
2784 
2785 
2786 /**
2787    * Appends annotation content to any existing content in the 'annotation'
2788    * subelement of this object.
2789    *
2790    * The content in @p annotation is copied.  Unlike setAnnotation(), this
2791    * method allows other annotations to be preserved when an application
2792    * adds its own data.
2793    *
2794    * @param annotation an XML string that is to be copied and appended
2795    * to the content of the 'annotation' subelement of this object.
2796    *
2797    *
2798  * @return integer value indicating success/failure of the
2799  * function.  @if clike The value is drawn from the
2800  * enumeration #OperationReturnValues_t. @endif The possible values
2801  * returned by this function are:
2802  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
2803    * @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
2804    *
2805    * @see setAnnotation(string annotation)
2806    */ public new
appendAnnotation(string annotation)2807  int appendAnnotation(string annotation) {
2808     int ret = libsbmlPINVOKE.Model_appendAnnotation__SWIG_1(swigCPtr, annotation);
2809     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
2810     return ret;
2811   }
2812 
2813 
2814 /**
2815    * Get the ListOfFunctionDefinitions object in this Model.
2816    *
2817    * @return the list of FunctionDefinitions for this Model.
2818    */ public
getListOfFunctionDefinitions()2819  ListOfFunctionDefinitions getListOfFunctionDefinitions() {
2820     global::System.IntPtr cPtr = libsbmlPINVOKE.Model_getListOfFunctionDefinitions__SWIG_0(swigCPtr);
2821     ListOfFunctionDefinitions ret = (cPtr == global::System.IntPtr.Zero) ? null : new ListOfFunctionDefinitions(cPtr, false);
2822     return ret;
2823   }
2824 
2825 
2826 /**
2827    * Get the ListOfUnitDefinitions object in this Model.
2828    *
2829    * @return the list of UnitDefinitions for this Model.
2830    */ public
getListOfUnitDefinitions()2831  ListOfUnitDefinitions getListOfUnitDefinitions() {
2832     global::System.IntPtr cPtr = libsbmlPINVOKE.Model_getListOfUnitDefinitions__SWIG_0(swigCPtr);
2833     ListOfUnitDefinitions ret = (cPtr == global::System.IntPtr.Zero) ? null : new ListOfUnitDefinitions(cPtr, false);
2834     return ret;
2835   }
2836 
2837 
2838 /**
2839    * Get the ListOfCompartmentTypes object in this Model.
2840    *
2841    * @return the list of CompartmentTypes for this Model.
2842    *
2843    * @note The CompartmentType object class is only available in SBML
2844    * Level&nbsp;2 Versions&nbsp;2&ndash;4.  It is not available in
2845    * Level&nbsp;1 nor Level&nbsp;3.
2846    */ public
getListOfCompartmentTypes()2847  ListOfCompartmentTypes getListOfCompartmentTypes() {
2848     global::System.IntPtr cPtr = libsbmlPINVOKE.Model_getListOfCompartmentTypes__SWIG_0(swigCPtr);
2849     ListOfCompartmentTypes ret = (cPtr == global::System.IntPtr.Zero) ? null : new ListOfCompartmentTypes(cPtr, false);
2850     return ret;
2851   }
2852 
2853 
2854 /**
2855    * Get the ListOfSpeciesTypes object in this Model.
2856    *
2857    * @return the list of SpeciesTypes for this Model.
2858    *
2859    * @note The SpeciesType object class is only available in SBML
2860    * Level&nbsp;2 Versions&nbsp;2&ndash;4.  It is not available in
2861    * Level&nbsp;1 nor Level&nbsp;3.
2862    */ public
getListOfSpeciesTypes()2863  ListOfSpeciesTypes getListOfSpeciesTypes() {
2864     global::System.IntPtr cPtr = libsbmlPINVOKE.Model_getListOfSpeciesTypes__SWIG_0(swigCPtr);
2865     ListOfSpeciesTypes ret = (cPtr == global::System.IntPtr.Zero) ? null : new ListOfSpeciesTypes(cPtr, false);
2866     return ret;
2867   }
2868 
2869 
2870 /**
2871    * Get the ListOfCompartments object in this Model.
2872    *
2873    * @return the list of Compartments for this Model.
2874    */ public
getListOfCompartments()2875  ListOfCompartments getListOfCompartments() {
2876     global::System.IntPtr cPtr = libsbmlPINVOKE.Model_getListOfCompartments__SWIG_0(swigCPtr);
2877     ListOfCompartments ret = (cPtr == global::System.IntPtr.Zero) ? null : new ListOfCompartments(cPtr, false);
2878     return ret;
2879   }
2880 
2881 
2882 /**
2883    * Get the ListOfSpecies object in this Model.
2884    *
2885    * @return the list of Species for this Model.
2886    */ public
getListOfSpecies()2887  ListOfSpecies getListOfSpecies() {
2888     global::System.IntPtr cPtr = libsbmlPINVOKE.Model_getListOfSpecies__SWIG_0(swigCPtr);
2889     ListOfSpecies ret = (cPtr == global::System.IntPtr.Zero) ? null : new ListOfSpecies(cPtr, false);
2890     return ret;
2891   }
2892 
2893 
2894 /**
2895    * Get the ListOfParameters object in this Model.
2896    *
2897    * @return the list of Parameters for this Model.
2898    */ public
getListOfParameters()2899  ListOfParameters getListOfParameters() {
2900     global::System.IntPtr cPtr = libsbmlPINVOKE.Model_getListOfParameters__SWIG_0(swigCPtr);
2901     ListOfParameters ret = (cPtr == global::System.IntPtr.Zero) ? null : new ListOfParameters(cPtr, false);
2902     return ret;
2903   }
2904 
2905 
2906 /**
2907    * Get the ListOfInitialAssignments object in this Model.
2908    *
2909    * @return the list of InitialAssignments for this Model.
2910    */ public
getListOfInitialAssignments()2911  ListOfInitialAssignments getListOfInitialAssignments() {
2912     global::System.IntPtr cPtr = libsbmlPINVOKE.Model_getListOfInitialAssignments__SWIG_0(swigCPtr);
2913     ListOfInitialAssignments ret = (cPtr == global::System.IntPtr.Zero) ? null : new ListOfInitialAssignments(cPtr, false);
2914     return ret;
2915   }
2916 
2917 
2918 /**
2919    * Get the ListOfRules object in this Model.
2920    *
2921    * @return the list of Rules for this Model.
2922    */ public
getListOfRules()2923  ListOfRules getListOfRules() {
2924     global::System.IntPtr cPtr = libsbmlPINVOKE.Model_getListOfRules__SWIG_0(swigCPtr);
2925     ListOfRules ret = (cPtr == global::System.IntPtr.Zero) ? null : new ListOfRules(cPtr, false);
2926     return ret;
2927   }
2928 
2929 
2930 /**
2931    * Get the ListOfConstraints object in this Model.
2932    *
2933    * @return the list of Constraints for this Model.
2934    */ public
getListOfConstraints()2935  ListOfConstraints getListOfConstraints() {
2936     global::System.IntPtr cPtr = libsbmlPINVOKE.Model_getListOfConstraints__SWIG_0(swigCPtr);
2937     ListOfConstraints ret = (cPtr == global::System.IntPtr.Zero) ? null : new ListOfConstraints(cPtr, false);
2938     return ret;
2939   }
2940 
2941 
2942 /**
2943    * Get the ListOfReactions object in this Model.
2944    *
2945    * @return the list of Reactions for this Model.
2946    */ public
getListOfReactions()2947  ListOfReactions getListOfReactions() {
2948     global::System.IntPtr cPtr = libsbmlPINVOKE.Model_getListOfReactions__SWIG_0(swigCPtr);
2949     ListOfReactions ret = (cPtr == global::System.IntPtr.Zero) ? null : new ListOfReactions(cPtr, false);
2950     return ret;
2951   }
2952 
2953 
2954 /**
2955    * Get the ListOfEvents object in this Model.
2956    *
2957    * @return the list of Events for this Model.
2958    */ public
getListOfEvents()2959  ListOfEvents getListOfEvents() {
2960     global::System.IntPtr cPtr = libsbmlPINVOKE.Model_getListOfEvents__SWIG_0(swigCPtr);
2961     ListOfEvents ret = (cPtr == global::System.IntPtr.Zero) ? null : new ListOfEvents(cPtr, false);
2962     return ret;
2963   }
2964 
2965 
2966 /**
2967    * Get the nth FunctionDefinitions object in this Model.
2968    *
2969    * @param n the index of the object to return.
2970    *
2971    * @return the nth FunctionDefinition of this Model.
2972    * If the index @p n is invalid, @c null is returned.
2973    */ public
getFunctionDefinition(long n)2974  FunctionDefinition getFunctionDefinition(long n) {
2975     global::System.IntPtr cPtr = libsbmlPINVOKE.Model_getFunctionDefinition__SWIG_0(swigCPtr, n);
2976     FunctionDefinition ret = (cPtr == global::System.IntPtr.Zero) ? null : new FunctionDefinition(cPtr, false);
2977     return ret;
2978   }
2979 
2980 
2981 /**
2982    * Get a FunctionDefinition object based on its identifier.
2983    *
2984    * @param sid the identifier to search for.
2985    *
2986    * @return the FunctionDefinition in this Model with the identifier
2987    * @p sid or @c null if no such FunctionDefinition exists.
2988    */ public
getFunctionDefinition(string sid)2989  FunctionDefinition getFunctionDefinition(string sid) {
2990     global::System.IntPtr cPtr = libsbmlPINVOKE.Model_getFunctionDefinition__SWIG_2(swigCPtr, sid);
2991     FunctionDefinition ret = (cPtr == global::System.IntPtr.Zero) ? null : new FunctionDefinition(cPtr, false);
2992     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
2993     return ret;
2994   }
2995 
2996 
2997 /**
2998    * Get the nth UnitDefinition object in this Model.
2999    *
3000    * @param n the index of the object to return.
3001    *
3002    * @return the nth UnitDefinition of this Model.
3003    * If the index @p n is invalid, @c null is returned.
3004    */ public
getUnitDefinition(long n)3005  UnitDefinition getUnitDefinition(long n) {
3006     global::System.IntPtr cPtr = libsbmlPINVOKE.Model_getUnitDefinition__SWIG_0(swigCPtr, n);
3007     UnitDefinition ret = (cPtr == global::System.IntPtr.Zero) ? null : new UnitDefinition(cPtr, false);
3008     return ret;
3009   }
3010 
3011 
3012 /**
3013    * Get a UnitDefinition based on its identifier.
3014    *
3015    * @param sid the identifier to search for.
3016    *
3017    * @return the UnitDefinition in this Model with the identifier @p sid or
3018    * @c null if no such UnitDefinition exists.
3019    */ public
getUnitDefinition(string sid)3020  UnitDefinition getUnitDefinition(string sid) {
3021     global::System.IntPtr cPtr = libsbmlPINVOKE.Model_getUnitDefinition__SWIG_2(swigCPtr, sid);
3022     UnitDefinition ret = (cPtr == global::System.IntPtr.Zero) ? null : new UnitDefinition(cPtr, false);
3023     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
3024     return ret;
3025   }
3026 
3027 
3028 /**
3029    * Get the nth CompartmentType object in this Model.
3030    *
3031    * @param n the index of the object to return.
3032    *
3033    * @return the nth CompartmentType of this Model.
3034    * If the index @p n is invalid, @c null is returned.
3035    *
3036    * @note The CompartmentType object class is only available in SBML
3037    * Level&nbsp;2 Versions&nbsp;2&ndash;4.  It is not available in
3038    * Level&nbsp;1 nor Level&nbsp;3.
3039    */ public
getCompartmentType(long n)3040  CompartmentType getCompartmentType(long n) {
3041     global::System.IntPtr cPtr = libsbmlPINVOKE.Model_getCompartmentType__SWIG_0(swigCPtr, n);
3042     CompartmentType ret = (cPtr == global::System.IntPtr.Zero) ? null : new CompartmentType(cPtr, false);
3043     return ret;
3044   }
3045 
3046 
3047 /**
3048    * Get a CompartmentType object based on its identifier.
3049    *
3050    * @param sid the identifier to search for.
3051    *
3052    * @return the CompartmentType in this Model with the identifier @p sid
3053    * or @c null if no such CompartmentType exists.
3054    *
3055    * @note The CompartmentType object class is only available in SBML
3056    * Level&nbsp;2 Versions&nbsp;2&ndash;4.  It is not available in
3057    * Level&nbsp;1 nor Level&nbsp;3.
3058    */ public
getCompartmentType(string sid)3059  CompartmentType getCompartmentType(string sid) {
3060     global::System.IntPtr cPtr = libsbmlPINVOKE.Model_getCompartmentType__SWIG_2(swigCPtr, sid);
3061     CompartmentType ret = (cPtr == global::System.IntPtr.Zero) ? null : new CompartmentType(cPtr, false);
3062     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
3063     return ret;
3064   }
3065 
3066 
3067 /**
3068    * Get the nth SpeciesType object in this Model.
3069    *
3070    * @param n the index of the object to return.
3071    *
3072    * @return the nth SpeciesType of this Model.
3073    * If the index @p n is invalid, @c null is returned.
3074    *
3075    * @note The SpeciesType object class is only available in SBML
3076    * Level&nbsp;2 Versions&nbsp;2&ndash;4.  It is not available in
3077    * Level&nbsp;1 nor Level&nbsp;3.
3078    */ public
getSpeciesType(long n)3079  SpeciesType getSpeciesType(long n) {
3080     global::System.IntPtr cPtr = libsbmlPINVOKE.Model_getSpeciesType__SWIG_0(swigCPtr, n);
3081     SpeciesType ret = (cPtr == global::System.IntPtr.Zero) ? null : new SpeciesType(cPtr, false);
3082     return ret;
3083   }
3084 
3085 
3086 /**
3087    * Get a SpeciesType object based on its identifier.
3088    *
3089    * @param sid the identifier to search for.
3090    *
3091    * @return the SpeciesType in this Model with the identifier @p sid or
3092    * @c null if no such SpeciesType exists.
3093    *
3094    * @note The SpeciesType object class is only available in SBML
3095    * Level&nbsp;2 Versions&nbsp;2&ndash;4.  It is not available in
3096    * Level&nbsp;1 nor Level&nbsp;3.
3097    */ public
getSpeciesType(string sid)3098  SpeciesType getSpeciesType(string sid) {
3099     global::System.IntPtr cPtr = libsbmlPINVOKE.Model_getSpeciesType__SWIG_2(swigCPtr, sid);
3100     SpeciesType ret = (cPtr == global::System.IntPtr.Zero) ? null : new SpeciesType(cPtr, false);
3101     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
3102     return ret;
3103   }
3104 
3105 
3106 /**
3107    * Get the nth Compartment object in this Model.
3108    *
3109    * @param n the index of the object to return.
3110    *
3111    * @return the nth Compartment of this Model.
3112    * If the index @p n is invalid, @c null is returned.
3113    */ public
getCompartment(long n)3114  Compartment getCompartment(long n) {
3115     global::System.IntPtr cPtr = libsbmlPINVOKE.Model_getCompartment__SWIG_0(swigCPtr, n);
3116     Compartment ret = (cPtr == global::System.IntPtr.Zero) ? null : new Compartment(cPtr, false);
3117     return ret;
3118   }
3119 
3120 
3121 /**
3122    * Get a Compartment object based on its identifier.
3123    *
3124    * @param sid the identifier to search for.
3125    *
3126    * @return the Compartment in this Model with the identifier @p sid or
3127    * @c null if no such Compartment exists.
3128    */ public
getCompartment(string sid)3129  Compartment getCompartment(string sid) {
3130     global::System.IntPtr cPtr = libsbmlPINVOKE.Model_getCompartment__SWIG_2(swigCPtr, sid);
3131     Compartment ret = (cPtr == global::System.IntPtr.Zero) ? null : new Compartment(cPtr, false);
3132     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
3133     return ret;
3134   }
3135 
3136 
3137 /**
3138    * Get the nth Species object in this Model.
3139    *
3140    * @param n the index of the object to return.
3141    *
3142    * @return the nth Species of this Model.
3143    * If the index @p n is invalid, @c null is returned.
3144    */ public
getSpecies(long n)3145  Species getSpecies(long n) {
3146     global::System.IntPtr cPtr = libsbmlPINVOKE.Model_getSpecies__SWIG_0(swigCPtr, n);
3147     Species ret = (cPtr == global::System.IntPtr.Zero) ? null : new Species(cPtr, false);
3148     return ret;
3149   }
3150 
3151 
3152 /**
3153    * Get a Species object based on its identifier.
3154    *
3155    * @param sid the identifier to search for.
3156    *
3157    * @return the Species in this Model with the identifier @p sid or @c null
3158    * if no such Species exists.
3159    */ public
getSpecies(string sid)3160  Species getSpecies(string sid) {
3161     global::System.IntPtr cPtr = libsbmlPINVOKE.Model_getSpecies__SWIG_2(swigCPtr, sid);
3162     Species ret = (cPtr == global::System.IntPtr.Zero) ? null : new Species(cPtr, false);
3163     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
3164     return ret;
3165   }
3166 
3167 
3168 /**
3169    * Get the nth Parameter object in this Model.
3170    *
3171    * @param n the index of the object to return.
3172    *
3173    * @return the nth Parameter of this Model.
3174    * If the index @p n is invalid, @c null is returned.
3175    */ public
getParameter(long n)3176  Parameter getParameter(long n) {
3177     global::System.IntPtr cPtr = libsbmlPINVOKE.Model_getParameter__SWIG_0(swigCPtr, n);
3178     Parameter ret = (cPtr == global::System.IntPtr.Zero) ? null : new Parameter(cPtr, false);
3179     return ret;
3180   }
3181 
3182 
3183 /**
3184    * Get a Parameter object based on its identifier.
3185    *
3186    * @param sid the identifier to search for.
3187    *
3188    * @return the Parameter in this Model with the identifier @p sid or @c null
3189    * if no such Parameter exists.
3190    */ public
getParameter(string sid)3191  Parameter getParameter(string sid) {
3192     global::System.IntPtr cPtr = libsbmlPINVOKE.Model_getParameter__SWIG_2(swigCPtr, sid);
3193     Parameter ret = (cPtr == global::System.IntPtr.Zero) ? null : new Parameter(cPtr, false);
3194     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
3195     return ret;
3196   }
3197 
3198 
3199 /**
3200    * Get the nth InitialAssignment object in this Model.
3201    *
3202    * @param n the index of the object to return.
3203    *
3204    * @return the nth InitialAssignment of this Model.
3205    * If the index @p n is invalid, @c null is returned.
3206    */ public
getInitialAssignment(long n)3207  InitialAssignment getInitialAssignment(long n) {
3208     global::System.IntPtr cPtr = libsbmlPINVOKE.Model_getInitialAssignment__SWIG_0(swigCPtr, n);
3209     InitialAssignment ret = (cPtr == global::System.IntPtr.Zero) ? null : new InitialAssignment(cPtr, false);
3210     return ret;
3211   }
3212 
3213 
3214 /**
3215    * Get an InitialAssignment object based on the symbol to which it
3216    * assigns a value.
3217    *
3218    * @param symbol the symbol to search for.
3219    *
3220    * @return the InitialAssignment in this Model with the given 'symbol'
3221    * attribute value or @c null if no such InitialAssignment exists.
3222    */ public
getInitialAssignment(string symbol)3223  InitialAssignment getInitialAssignment(string symbol) {
3224     global::System.IntPtr cPtr = libsbmlPINVOKE.Model_getInitialAssignment__SWIG_2(swigCPtr, symbol);
3225     InitialAssignment ret = (cPtr == global::System.IntPtr.Zero) ? null : new InitialAssignment(cPtr, false);
3226     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
3227     return ret;
3228   }
3229 
3230 
3231 /**
3232    * Get an InitialAssignment object based on the symbol to which it
3233    * assigns a value.
3234    *
3235    * @param symbol the symbol to search for.
3236    *
3237    * @return the InitialAssignment in this Model with the given 'symbol'
3238    * attribute value or @c null if no such InitialAssignment exists.
3239    */ public
getInitialAssignmentBySymbol(string symbol)3240  InitialAssignment getInitialAssignmentBySymbol(string symbol) {
3241     global::System.IntPtr cPtr = libsbmlPINVOKE.Model_getInitialAssignmentBySymbol__SWIG_0(swigCPtr, symbol);
3242     InitialAssignment ret = (cPtr == global::System.IntPtr.Zero) ? null : new InitialAssignment(cPtr, false);
3243     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
3244     return ret;
3245   }
3246 
3247 
3248 /**
3249    * Get the nth Rule object in this Model.
3250    *
3251    * @param n the index of the object to return.
3252    *
3253    * @return the nth Rule of this Model.
3254    * If the index @p n is invalid, @c null is returned.
3255    */ public
getRule(long n)3256  Rule getRule(long n) {
3257         Rule ret = (Rule) libsbml.DowncastSBase(libsbmlPINVOKE.Model_getRule__SWIG_0(swigCPtr, n), false);
3258 	return ret;
3259 }
3260 
3261 
3262 /**
3263    * Get a Rule object based on the variable to which it assigns a value.
3264    *
3265    * @param variable the variable to search for.
3266    *
3267    * @return the Rule in this Model with the given 'variable' attribute
3268    * value or @c null if no such Rule exists.
3269    */ public
getRule(string variable)3270  Rule getRule(string variable) {
3271         Rule ret = (Rule) libsbml.DowncastSBase(libsbmlPINVOKE.Model_getRule__SWIG_2(swigCPtr, variable), false);
3272     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
3273 	return ret;
3274 }
3275 
3276 
3277 /**
3278    * Get a Rule object based on the variable to which it assigns a value.
3279    *
3280    * @param variable the variable to search for.
3281    *
3282    * @return the Rule in this Model with the given 'variable' attribute
3283    * value or @c null if no such Rule exists.
3284    */ public
getRuleByVariable(string variable)3285  Rule getRuleByVariable(string variable) {
3286         Rule ret = (Rule) libsbml.DowncastSBase(libsbmlPINVOKE.Model_getRuleByVariable__SWIG_0(swigCPtr, variable), false);
3287     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
3288 	return ret;
3289 }
3290 
3291 
3292 /**
3293    * Get a Rule object based on the variable to which it assigns a value.
3294    *
3295    * @param variable the variable to search for.
3296    *
3297    * @return the Rule in this Model with the given 'variable' attribute
3298    * value or @c null if no such Rule exists.
3299    */ public
getAssignmentRule(string variable)3300  AssignmentRule getAssignmentRule(string variable) {
3301     global::System.IntPtr cPtr = libsbmlPINVOKE.Model_getAssignmentRule__SWIG_0(swigCPtr, variable);
3302     AssignmentRule ret = (cPtr == global::System.IntPtr.Zero) ? null : new AssignmentRule(cPtr, false);
3303     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
3304     return ret;
3305   }
3306 
3307 
3308 /**
3309    * Get a Rule object based on the variable to which it assigns a value.
3310    *
3311    * @param variable the symbol to search for.
3312    *
3313    * @return the Rule in this Model with the given 'variable' attribute
3314    * value or @c null if no such Rule exists.
3315    */ public
getRateRule(string variable)3316  RateRule getRateRule(string variable) {
3317     global::System.IntPtr cPtr = libsbmlPINVOKE.Model_getRateRule__SWIG_0(swigCPtr, variable);
3318     RateRule ret = (cPtr == global::System.IntPtr.Zero) ? null : new RateRule(cPtr, false);
3319     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
3320     return ret;
3321   }
3322 
3323 
3324 /**
3325    * Get a Rule object based on the variable to which it assigns a value.
3326    *
3327    * @param variable the variable to search for.
3328    *
3329    * @return the Rule in this Model with the given 'variable' attribute
3330    * value or @c null if no such Rule exists.
3331    */ public
getAssignmentRuleByVariable(string variable)3332  AssignmentRule getAssignmentRuleByVariable(string variable) {
3333     global::System.IntPtr cPtr = libsbmlPINVOKE.Model_getAssignmentRuleByVariable__SWIG_0(swigCPtr, variable);
3334     AssignmentRule ret = (cPtr == global::System.IntPtr.Zero) ? null : new AssignmentRule(cPtr, false);
3335     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
3336     return ret;
3337   }
3338 
3339 
3340 /**
3341    * Get a Rule object based on the variable to which it assigns a value.
3342    *
3343    * @param variable the variable to search for.
3344    *
3345    * @return the Rule in this Model with the given 'variable' attribute
3346    * value or @c null if no such Rule exists.
3347    */ public
getRateRuleByVariable(string variable)3348  RateRule getRateRuleByVariable(string variable) {
3349     global::System.IntPtr cPtr = libsbmlPINVOKE.Model_getRateRuleByVariable__SWIG_0(swigCPtr, variable);
3350     RateRule ret = (cPtr == global::System.IntPtr.Zero) ? null : new RateRule(cPtr, false);
3351     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
3352     return ret;
3353   }
3354 
3355 
3356 /**
3357    * Get the nth Constraint object in this Model.
3358    *
3359    * @param n the index of the object to return.
3360    *
3361    * @return the nth Constraint of this Model.
3362    * If the index @p n is invalid, @c null is returned.
3363    */ public
getConstraint(long n)3364  Constraint getConstraint(long n) {
3365     global::System.IntPtr cPtr = libsbmlPINVOKE.Model_getConstraint__SWIG_0(swigCPtr, n);
3366     Constraint ret = (cPtr == global::System.IntPtr.Zero) ? null : new Constraint(cPtr, false);
3367     return ret;
3368   }
3369 
3370 
3371 /**
3372    * Get the nth Reaction object in this Model.
3373    *
3374    * @param n the index of the object to return.
3375    *
3376    * @return the nth Reaction of this Model.
3377    * If the index @p n is invalid, @c null is returned.
3378    */ public
getReaction(long n)3379  Reaction getReaction(long n) {
3380 	Reaction ret = (Reaction) libsbml.DowncastSBase(libsbmlPINVOKE.Model_getReaction__SWIG_0(swigCPtr, n), false);
3381 	return ret;
3382 }
3383 
3384 
3385 /**
3386    * Get a Reaction object based on its identifier.
3387    *
3388    * @param sid the identifier to search for.
3389    *
3390    * @return the Reaction in this Model with the identifier @p sid or @c null
3391    * if no such Reaction exists.
3392    */ public
getReaction(string sid)3393  Reaction getReaction(string sid) {
3394 	Reaction ret = (Reaction) libsbml.DowncastSBase(libsbmlPINVOKE.Model_getReaction__SWIG_2(swigCPtr, sid), false);
3395     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
3396 	return ret;
3397 }
3398 
3399 
3400 /**
3401    * Get a SpeciesReference object based on its identifier.
3402    *
3403    * @param sid the identifier to search for.
3404    *
3405    * @return the SpeciesReference in this Model with the identifier @p sid or @c null
3406    * if no such SpeciesReference exists.
3407    */ public
getSpeciesReference(string sid)3408  SpeciesReference getSpeciesReference(string sid) {
3409 	SpeciesReference ret
3410 	    = (SpeciesReference) libsbml.DowncastSBase(libsbmlPINVOKE.Model_getSpeciesReference__SWIG_0(swigCPtr, sid), false);
3411     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
3412 	return ret;
3413 }
3414 
3415 
3416 /**
3417    * Get a ModifierSpeciesReference object based on its identifier.
3418    *
3419    * @param sid the identifier to search for.
3420    *
3421    * @return the ModifierSpeciesReference in this Model with the
3422    * identifier @p sid or @c null
3423    * if no such ModifierSpeciesReference exists.
3424    */ public
getModifierSpeciesReference(string sid)3425  ModifierSpeciesReference getModifierSpeciesReference(string sid) {
3426     global::System.IntPtr cPtr = libsbmlPINVOKE.Model_getModifierSpeciesReference__SWIG_0(swigCPtr, sid);
3427     ModifierSpeciesReference ret = (cPtr == global::System.IntPtr.Zero) ? null : new ModifierSpeciesReference(cPtr, false);
3428     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
3429     return ret;
3430   }
3431 
3432 
3433 /**
3434    * Get the nth Event object in this Model.
3435    *
3436    * @param n the index of the object to return.
3437    *
3438    * @return the nth Event of this Model.
3439    * If the index @p n is invalid, @c null is returned.
3440    */ public
getEvent(long n)3441  Event getEvent(long n) {
3442     global::System.IntPtr cPtr = libsbmlPINVOKE.Model_getEvent__SWIG_0(swigCPtr, n);
3443     Event ret = (cPtr == global::System.IntPtr.Zero) ? null : new Event(cPtr, false);
3444     return ret;
3445   }
3446 
3447 
3448 /**
3449    * Get an Event object based on its identifier.
3450    *
3451    * @param sid the identifier to search for.
3452    *
3453    * @return the Event in this Model with the identifier @p sid or @c null if
3454    * no such Event exists.
3455    */ public
getEvent(string sid)3456  Event getEvent(string sid) {
3457     global::System.IntPtr cPtr = libsbmlPINVOKE.Model_getEvent__SWIG_2(swigCPtr, sid);
3458     Event ret = (cPtr == global::System.IntPtr.Zero) ? null : new Event(cPtr, false);
3459     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
3460     return ret;
3461   }
3462 
3463 
3464 /**
3465    * Get the number of FunctionDefinition objects in this Model.
3466    *
3467    * @return the number of FunctionDefinitions in this Model.
3468    */ public
getNumFunctionDefinitions()3469  long getNumFunctionDefinitions() { return (long)libsbmlPINVOKE.Model_getNumFunctionDefinitions(swigCPtr); }
3470 
3471 
3472 /**
3473    * Get the number of UnitDefinition objects in this Model.
3474    *
3475    * @return the number of UnitDefinitions in this Model.
3476    */ public
getNumUnitDefinitions()3477  long getNumUnitDefinitions() { return (long)libsbmlPINVOKE.Model_getNumUnitDefinitions(swigCPtr); }
3478 
3479 
3480 /**
3481    * Get the number of CompartmentType objects in this Model.
3482    *
3483    * @return the number of CompartmentTypes in this Model.
3484    *
3485    * @note The CompartmentType object class is only available in SBML
3486    * Level&nbsp;2 Versions&nbsp;2&ndash;4.  It is not available in
3487    * Level&nbsp;1 nor Level&nbsp;3.
3488    */ public
getNumCompartmentTypes()3489  long getNumCompartmentTypes() { return (long)libsbmlPINVOKE.Model_getNumCompartmentTypes(swigCPtr); }
3490 
3491 
3492 /**
3493    * Get the number of SpeciesType objects in this Model.
3494    *
3495    * @return the number of SpeciesTypes in this Model.
3496    *
3497    * @note The SpeciesType object class is only available in SBML
3498    * Level&nbsp;2 Versions&nbsp;2&ndash;4.  It is not available in
3499    * Level&nbsp;1 nor Level&nbsp;3.
3500    */ public
getNumSpeciesTypes()3501  long getNumSpeciesTypes() { return (long)libsbmlPINVOKE.Model_getNumSpeciesTypes(swigCPtr); }
3502 
3503 
3504 /**
3505    * Get the number of Compartment objects in this Model.
3506    *
3507    * @return the number of Compartments in this Model.
3508    */ public
getNumCompartments()3509  long getNumCompartments() { return (long)libsbmlPINVOKE.Model_getNumCompartments(swigCPtr); }
3510 
3511 
3512 /**
3513    * Get the number of Species objects in this Model.
3514    *
3515    * @return the number of Species in this Model.
3516    */ public
getNumSpecies()3517  long getNumSpecies() { return (long)libsbmlPINVOKE.Model_getNumSpecies(swigCPtr); }
3518 
3519 
3520 /**
3521    * Get the number of Species in this Model having their
3522    * 'boundaryCondition' attribute value set to @c true.
3523    *
3524    * @return the number of Species in this Model with boundaryCondition set
3525    * to true.
3526    */ public
getNumSpeciesWithBoundaryCondition()3527  long getNumSpeciesWithBoundaryCondition() { return (long)libsbmlPINVOKE.Model_getNumSpeciesWithBoundaryCondition(swigCPtr); }
3528 
3529 
3530 /**
3531    * Get the number of Parameter objects in this Model.
3532    *
3533    * @return the number of Parameters in this Model.  Parameters defined in
3534    * KineticLaws are not included.
3535    */ public
getNumParameters()3536  long getNumParameters() { return (long)libsbmlPINVOKE.Model_getNumParameters(swigCPtr); }
3537 
3538 
3539 /**
3540    * Get the number of InitialAssignment objects in this Model.
3541    *
3542    * @return the number of InitialAssignments in this Model.
3543    */ public
getNumInitialAssignments()3544  long getNumInitialAssignments() { return (long)libsbmlPINVOKE.Model_getNumInitialAssignments(swigCPtr); }
3545 
3546 
3547 /**
3548    * Get the number of Rule objects in this Model.
3549    *
3550    * @return the number of Rules in this Model.
3551    */ public
getNumRules()3552  long getNumRules() { return (long)libsbmlPINVOKE.Model_getNumRules(swigCPtr); }
3553 
3554 
3555 /**
3556    * Get the number of Constraint objects in this Model.
3557    *
3558    * @return the number of Constraints in this Model.
3559    */ public
getNumConstraints()3560  long getNumConstraints() { return (long)libsbmlPINVOKE.Model_getNumConstraints(swigCPtr); }
3561 
3562 
3563 /**
3564    * Get the number of Reaction objects in this Model.
3565    *
3566    * @return the number of Reactions in this Model.
3567    */ public
getNumReactions()3568  long getNumReactions() { return (long)libsbmlPINVOKE.Model_getNumReactions(swigCPtr); }
3569 
3570 
3571 /**
3572    * Get the number of Event objects in this Model.
3573    *
3574    * @return the number of Events in this Model.
3575    */ public
getNumEvents()3576  long getNumEvents() { return (long)libsbmlPINVOKE.Model_getNumEvents(swigCPtr); }
3577 
3578 
3579 /**
3580    * Remove this Model from its parent SBMLDocument object.
3581    *
3582    * This works by finding this Model's parent SBMLDocument and then calling
3583    * <code>setModel(null)</code> on it, indirectly deleting itself.
3584    * Overridden from the SBase function since the parent is not a ListOf.
3585    *
3586    *
3587  * @return integer value indicating success/failure of the
3588  * function.  @if clike The value is drawn from the
3589  * enumeration #OperationReturnValues_t. @endif The possible values
3590  * returned by this function are:
3591  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
3592    * @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
3593    */ public new
removeFromParentAndDelete()3594  int removeFromParentAndDelete() {
3595     int ret = libsbmlPINVOKE.Model_removeFromParentAndDelete(swigCPtr);
3596     return ret;
3597   }
3598 
3599 
3600 /** */ /* libsbml-internal */ public new
renameAllIds(IdentifierTransformer idTransformer, ElementFilter filter)3601  int renameAllIds(IdentifierTransformer idTransformer, ElementFilter filter) {
3602     int ret = libsbmlPINVOKE.Model_renameAllIds__SWIG_0(swigCPtr, IdentifierTransformer.getCPtr(idTransformer), ElementFilter.getCPtr(filter));
3603     return ret;
3604   }
3605 
3606 
3607 /** */ /* libsbml-internal */ public new
renameAllIds(IdentifierTransformer idTransformer)3608  int renameAllIds(IdentifierTransformer idTransformer) {
3609     int ret = libsbmlPINVOKE.Model_renameAllIds__SWIG_1(swigCPtr, IdentifierTransformer.getCPtr(idTransformer));
3610     return ret;
3611   }
3612 
3613 
3614 /**
3615    *
3616  * Replaces all uses of a given @c SIdRef type attribute value with another
3617  * value.
3618  *
3619  *
3620  *
3621 
3622  * In SBML, object identifiers are of a data type called <code>SId</code>.
3623  * In SBML Level&nbsp;3, an explicit data type called <code>SIdRef</code> was
3624  * introduced for attribute values that refer to <code>SId</code> values; in
3625  * previous Levels of SBML, this data type did not exist and attributes were
3626  * simply described to as 'referring to an identifier', but the effective
3627  * data type was the same as <code>SIdRef</code> in Level&nbsp;3.  These and
3628  * other methods of libSBML refer to the type <code>SIdRef</code> for all
3629  * Levels of SBML, even if the corresponding SBML specification did not
3630  * explicitly name the data type.
3631  *
3632  *
3633  *
3634  * This method works by looking at all attributes and (if appropriate)
3635  * mathematical formulas in MathML content, comparing the referenced
3636  * identifiers to the value of @p oldid.  If any matches are found, the
3637  * matching values are replaced with @p newid.  The method does @em not
3638  * descend into child elements.
3639  *
3640  * @param oldid the old identifier.
3641  * @param newid the new identifier.
3642  *
3643  *
3644    */ public new
renameSIdRefs(string oldid, string newid)3645  void renameSIdRefs(string oldid, string newid) {
3646     libsbmlPINVOKE.Model_renameSIdRefs(swigCPtr, oldid, newid);
3647     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
3648   }
3649 
3650 
3651 /**
3652    *
3653  * Replaces all uses of a given @c UnitSIdRef type attribute value with
3654  * another value.
3655  *
3656  *
3657  *
3658  * In SBML, unit definitions have identifiers of type <code>UnitSId</code>.  In
3659  * SBML Level&nbsp;3, an explicit data type called <code>UnitSIdRef</code> was
3660  * introduced for attribute values that refer to <code>UnitSId</code> values; in
3661  * previous Levels of SBML, this data type did not exist and attributes were
3662  * simply described to as 'referring to a unit identifier', but the effective
3663  * data type was the same as <code>UnitSIdRef</code> in Level&nbsp;3.  These and
3664  * other methods of libSBML refer to the type <code>UnitSIdRef</code> for all
3665  * Levels of SBML, even if the corresponding SBML specification did not
3666  * explicitly name the data type.
3667  *
3668  *
3669  *
3670  * This method works by looking at all unit identifier attribute values
3671  * (including, if appropriate, inside mathematical formulas), comparing the
3672  * referenced unit identifiers to the value of @p oldid.  If any matches
3673  * are found, the matching values are replaced with @p newid.  The method
3674  * does @em not descend into child elements.
3675  *
3676  * @param oldid the old identifier.
3677  * @param newid the new identifier.
3678  *
3679  *
3680    */ public new
renameUnitSIdRefs(string oldid, string newid)3681  void renameUnitSIdRefs(string oldid, string newid) {
3682     libsbmlPINVOKE.Model_renameUnitSIdRefs(swigCPtr, oldid, newid);
3683     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
3684   }
3685 
3686 
3687 /** */ /* libsbml-internal */ public
convertL1ToL2()3688  void convertL1ToL2() {
3689     libsbmlPINVOKE.Model_convertL1ToL2(swigCPtr);
3690   }
3691 
3692 
3693 /** */ /* libsbml-internal */ public
convertL1ToL3(bool addDefaultUnits)3694  void convertL1ToL3(bool addDefaultUnits) {
3695     libsbmlPINVOKE.Model_convertL1ToL3__SWIG_0(swigCPtr, addDefaultUnits);
3696   }
3697 
3698 
3699 /** */ /* libsbml-internal */ public
convertL1ToL3()3700  void convertL1ToL3() {
3701     libsbmlPINVOKE.Model_convertL1ToL3__SWIG_1(swigCPtr);
3702   }
3703 
3704 
3705 /** */ /* libsbml-internal */ public
convertL2ToL3(bool strict, bool addDefaultUnits)3706  void convertL2ToL3(bool strict, bool addDefaultUnits) {
3707     libsbmlPINVOKE.Model_convertL2ToL3__SWIG_0(swigCPtr, strict, addDefaultUnits);
3708   }
3709 
3710 
3711 /** */ /* libsbml-internal */ public
convertL2ToL3(bool strict)3712  void convertL2ToL3(bool strict) {
3713     libsbmlPINVOKE.Model_convertL2ToL3__SWIG_1(swigCPtr, strict);
3714   }
3715 
3716 
3717 /** */ /* libsbml-internal */ public
convertL2ToL3()3718  void convertL2ToL3() {
3719     libsbmlPINVOKE.Model_convertL2ToL3__SWIG_2(swigCPtr);
3720   }
3721 
3722 
3723 /** */ /* libsbml-internal */ public
convertL2ToL1(bool strict)3724  void convertL2ToL1(bool strict) {
3725     libsbmlPINVOKE.Model_convertL2ToL1__SWIG_0(swigCPtr, strict);
3726   }
3727 
3728 
3729 /** */ /* libsbml-internal */ public
convertL2ToL1()3730  void convertL2ToL1() {
3731     libsbmlPINVOKE.Model_convertL2ToL1__SWIG_1(swigCPtr);
3732   }
3733 
3734 
3735 /** */ /* libsbml-internal */ public
convertL3ToL1(bool strict)3736  void convertL3ToL1(bool strict) {
3737     libsbmlPINVOKE.Model_convertL3ToL1__SWIG_0(swigCPtr, strict);
3738   }
3739 
3740 
3741 /** */ /* libsbml-internal */ public
convertL3ToL1()3742  void convertL3ToL1() {
3743     libsbmlPINVOKE.Model_convertL3ToL1__SWIG_1(swigCPtr);
3744   }
3745 
3746 
3747 /** */ /* libsbml-internal */ public
convertL3ToL2(bool strict)3748  void convertL3ToL2(bool strict) {
3749     libsbmlPINVOKE.Model_convertL3ToL2__SWIG_0(swigCPtr, strict);
3750   }
3751 
3752 
3753 /** */ /* libsbml-internal */ public
convertL3ToL2()3754  void convertL3ToL2() {
3755     libsbmlPINVOKE.Model_convertL3ToL2__SWIG_1(swigCPtr);
3756   }
3757 
3758 
3759 /** */ /* libsbml-internal */ public
convertFromL3V2(bool strict)3760  void convertFromL3V2(bool strict) {
3761     libsbmlPINVOKE.Model_convertFromL3V2__SWIG_0(swigCPtr, strict);
3762   }
3763 
3764 
3765 /** */ /* libsbml-internal */ public
convertFromL3V2()3766  void convertFromL3V2() {
3767     libsbmlPINVOKE.Model_convertFromL3V2__SWIG_1(swigCPtr);
3768   }
3769 
3770 
3771 /** */ /* libsbml-internal */ public
dealWithFast()3772  void dealWithFast() {
3773     libsbmlPINVOKE.Model_dealWithFast(swigCPtr);
3774   }
3775 
3776 
3777 /** */ /* libsbml-internal */ public
dealWithL3Fast(long targetVersion)3778  void dealWithL3Fast(long targetVersion) {
3779     libsbmlPINVOKE.Model_dealWithL3Fast(swigCPtr, targetVersion);
3780   }
3781 
3782 
3783 /** */ /* libsbml-internal */ public
addModifiers()3784  void addModifiers() {
3785     libsbmlPINVOKE.Model_addModifiers(swigCPtr);
3786   }
3787 
3788 
3789 /** */ /* libsbml-internal */ public
addConstantAttribute()3790  void addConstantAttribute() {
3791     libsbmlPINVOKE.Model_addConstantAttribute(swigCPtr);
3792   }
3793 
3794 
3795 /** */ /* libsbml-internal */ public
setSpatialDimensions(double dims)3796  void setSpatialDimensions(double dims) {
3797     libsbmlPINVOKE.Model_setSpatialDimensions__SWIG_0(swigCPtr, dims);
3798   }
3799 
3800 
3801 /** */ /* libsbml-internal */ public
setSpatialDimensions()3802  void setSpatialDimensions() {
3803     libsbmlPINVOKE.Model_setSpatialDimensions__SWIG_1(swigCPtr);
3804   }
3805 
3806 
3807 /** */ /* libsbml-internal */ public
addDefinitionsForDefaultUnits()3808  void addDefinitionsForDefaultUnits() {
3809     libsbmlPINVOKE.Model_addDefinitionsForDefaultUnits(swigCPtr);
3810   }
3811 
3812 
3813 /** */ /* libsbml-internal */ public
dealWithDefaultValues()3814  void dealWithDefaultValues() {
3815     libsbmlPINVOKE.Model_dealWithDefaultValues(swigCPtr);
3816   }
3817 
3818 
3819 /** */ /* libsbml-internal */ public
convertParametersToLocals(long level, long version)3820  void convertParametersToLocals(long level, long version) {
3821     libsbmlPINVOKE.Model_convertParametersToLocals(swigCPtr, level, version);
3822   }
3823 
3824 
3825 /** */ /* libsbml-internal */ public
setSpeciesReferenceConstantValueAndStoichiometry()3826  void setSpeciesReferenceConstantValueAndStoichiometry() {
3827     libsbmlPINVOKE.Model_setSpeciesReferenceConstantValueAndStoichiometry(swigCPtr);
3828   }
3829 
3830 
3831 /** */ /* libsbml-internal */ public
removeParameterRuleUnits(bool strict)3832  void removeParameterRuleUnits(bool strict) {
3833     libsbmlPINVOKE.Model_removeParameterRuleUnits(swigCPtr, strict);
3834   }
3835 
3836 
3837 /** */ /* libsbml-internal */ public
convertStoichiometryMath()3838  void convertStoichiometryMath() {
3839     libsbmlPINVOKE.Model_convertStoichiometryMath(swigCPtr);
3840   }
3841 
3842 
3843 /** */ /* libsbml-internal */ public
assignRequiredValues()3844  void assignRequiredValues() {
3845     libsbmlPINVOKE.Model_assignRequiredValues(swigCPtr);
3846   }
3847 
3848 
3849 /** */ /* libsbml-internal */ public
dealWithModelUnits(bool strict)3850  void dealWithModelUnits(bool strict) {
3851     libsbmlPINVOKE.Model_dealWithModelUnits__SWIG_0(swigCPtr, strict);
3852   }
3853 
3854 
3855 /** */ /* libsbml-internal */ public
dealWithModelUnits()3856  void dealWithModelUnits() {
3857     libsbmlPINVOKE.Model_dealWithModelUnits__SWIG_1(swigCPtr);
3858   }
3859 
3860 
3861 /** */ /* libsbml-internal */ public
dealWithStoichiometry()3862  void dealWithStoichiometry() {
3863     libsbmlPINVOKE.Model_dealWithStoichiometry(swigCPtr);
3864   }
3865 
3866 
3867 /** */ /* libsbml-internal */ public
dealWithEvents(bool strict)3868  void dealWithEvents(bool strict) {
3869     libsbmlPINVOKE.Model_dealWithEvents(swigCPtr, strict);
3870   }
3871 
3872 
3873 /** */ /* libsbml-internal */ public
removeSpeciesTypes()3874  void removeSpeciesTypes() {
3875     libsbmlPINVOKE.Model_removeSpeciesTypes(swigCPtr);
3876   }
3877 
3878 
3879 /** */ /* libsbml-internal */ public
removeCompartmentTypes()3880  void removeCompartmentTypes() {
3881     libsbmlPINVOKE.Model_removeCompartmentTypes(swigCPtr);
3882   }
3883 
connectToChild()3884   public override void connectToChild() {
3885     libsbmlPINVOKE.Model_connectToChild(swigCPtr);
3886   }
3887 
3888 
3889 /**
3890    * Returns the libSBML type code for this %SBML object.
3891    *
3892    *
3893  *
3894  * LibSBML attaches an identifying code to every kind of SBML object.  These
3895  * are integer constants known as <em>SBML type codes</em>.  The names of all
3896  * the codes begin with the characters <code>SBML_</code>.
3897  * @if clike The set of possible type codes for core elements is defined in
3898  * the enumeration #SBMLTypeCode_t, and in addition, libSBML plug-ins for
3899  * SBML Level&nbsp;3 packages define their own extra enumerations of type
3900  * codes (e.g., #SBMLLayoutTypeCode_t for the Level&nbsp;3 Layout
3901  * package).@endif@if java In the Java language interface for libSBML, the
3902  * type codes are defined as static integer constants in the interface class
3903  * {@link libsbmlConstants}.  @endif@if python In the Python language
3904  * interface for libSBML, the type codes are defined as static integer
3905  * constants in the interface class @link libsbml@endlink.@endif@if csharp In
3906  * the C# language interface for libSBML, the type codes are defined as
3907  * static integer constants in the interface class
3908  * @link libsbmlcs.libsbml@endlink.@endif  Note that different Level&nbsp;3
3909  * package plug-ins may use overlapping type codes; to identify the package
3910  * to which a given object belongs, call the
3911  * <code>@if conly SBase_getPackageName()
3912  * @else SBase::getPackageName()
3913  * @endif</code>
3914  * method on the object.
3915  *
3916  * The exception to this is lists:  all SBML-style list elements have the type
3917  * @link libsbml#SBML_LIST_OF SBML_LIST_OF@endlink, regardless of what package they
3918  * are from.
3919  *
3920  *
3921    *
3922    * @return the SBML type code for this object:
3923    * @link libsbml#SBML_MODEL SBML_MODEL@endlink (default).
3924    *
3925    *
3926  * @warning <span class='warning'>The specific integer values of the possible
3927  * type codes may be reused by different libSBML plug-ins for SBML Level&nbsp;3.
3928  * packages,  To fully identify the correct code, <strong>it is necessary to
3929  * invoke both getPackageName() and getTypeCode()</strong> (or
3930  * ListOf::getItemTypeCode()).</span>
3931  *
3932  *
3933    *
3934    * @see getElementName()
3935    * @see getPackageName()
3936    */ public new
getTypeCode()3937  int getTypeCode() {
3938     int ret = libsbmlPINVOKE.Model_getTypeCode(swigCPtr);
3939     return ret;
3940   }
3941 
3942 
3943 /**
3944    * Returns the XML element name of this object, which for Model, is
3945    * always @c 'model'.
3946    *
3947    * @return the name of this element, i.e., @c 'model'.
3948    */ public new
getElementName()3949  string getElementName() {
3950     string ret = libsbmlPINVOKE.Model_getElementName(swigCPtr);
3951     return ret;
3952   }
3953 
3954 
3955 /**
3956    * Populates the internal list of derived units for this Model object.
3957    *
3958    * This method tells libSBML to (re)calculate all units for all components
3959    * of the enclosing Model object.  The result is stored in an internal list
3960    * of unit data.  Users can access the resulting data by calling the method
3961    * SBase::getDerivedUnitDefinition() available on most objects.  (The name
3962    * 'formula units data' is drawn from the name of the internal objects
3963    * libSBML uses to store the data; note that these internal objects are not
3964    * exposed to callers, because callers can interact with the results using
3965    * the ordinary SBML unit objects.)
3966    *
3967    * This method is used by libSBML itself in the validator concerned with
3968    * unit consistency.  The unit consistency validator (like all other
3969    * validators in libSBML) is invoked by using
3970    * SBMLDocument::checkConsistency(), with the consistency checks for the
3971    * category @link libsbml#LIBSBML_CAT_UNITS_CONSISTENCY LIBSBML_CAT_UNITS_CONSISTENCY@endlink turned on.  The method
3972    * populateListFormulaUnitsData() does not need to be called prior to
3973    * invoking the validator if unit consistency checking has not been turned
3974    * off.  This method is only provided for cases when callers have a special
3975    * need to force the unit data to be recalculated.  For instance, during
3976    * construction of a model, a caller may want to interrogate libSBML's
3977    * inferred units without invoking full-blown model validation; this is a
3978    * scenario in which calling populateListFormulaUnitsData() may be useful.
3979    *
3980    * @warning Computing and inferring units is a time-consuming operation.
3981    * Callers may want to call isPopulatedListFormulaUnitsData() to determine
3982    * whether the units may already have been computed, to save themselves the
3983    * need of invoking unit inference unnecessarily.
3984    *
3985    * @see isPopulatedListFormulaUnitsData()
3986    */ public
populateListFormulaUnitsData()3987  void populateListFormulaUnitsData() {
3988     libsbmlPINVOKE.Model_populateListFormulaUnitsData(swigCPtr);
3989   }
3990 
3991 
3992 /**
3993    * Predicate returning @c true if libSBML has derived units for the
3994    * components of this model.
3995    *
3996    * LibSBML can infer the units of measurement associated with different
3997    * elements of a model.  When libSBML does that, it builds a complex
3998    * internal structure during a resource-intensive operation.  This is done
3999    * automatically only when callers invoke validation (via
4000    * SBMLDocument::checkConsistency()) and have not turned off the unit
4001    * validation option.
4002    *
4003    * Callers can force units to be recalculated by calling
4004    * populateListFormulaUnitsData().  To avoid calling that method
4005    * unnecessarily, calling programs may first want to invoke this method
4006    * (isPopulatedListFormulaUnitsData()) to determine whether it is even
4007    * necessary.
4008    *
4009    * @return @c true if the units have already been computed, @c false
4010    * otherwise.
4011    */ public
isPopulatedListFormulaUnitsData()4012  bool isPopulatedListFormulaUnitsData() {
4013     bool ret = libsbmlPINVOKE.Model_isPopulatedListFormulaUnitsData(swigCPtr);
4014     return ret;
4015   }
4016 
4017 
4018 /** */ /* libsbml-internal */ public
getFormulaUnitsDataForVariable(string sid)4019  SWIGTYPE_p_FormulaUnitsData getFormulaUnitsDataForVariable(string sid) {
4020     global::System.IntPtr cPtr = libsbmlPINVOKE.Model_getFormulaUnitsDataForVariable(swigCPtr, sid);
4021     SWIGTYPE_p_FormulaUnitsData ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_FormulaUnitsData(cPtr, false);
4022     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
4023     return ret;
4024   }
4025 
4026 
4027 /** */ /* libsbml-internal */ public
getFormulaUnitsDataForAssignment(string sid)4028  SWIGTYPE_p_FormulaUnitsData getFormulaUnitsDataForAssignment(string sid) {
4029     global::System.IntPtr cPtr = libsbmlPINVOKE.Model_getFormulaUnitsDataForAssignment(swigCPtr, sid);
4030     SWIGTYPE_p_FormulaUnitsData ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_FormulaUnitsData(cPtr, false);
4031     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
4032     return ret;
4033   }
4034 
4035 
4036 /**
4037    * Populates the internal list of the identifiers of all elements within this Model object.
4038    *
4039    * This method tells libSBML to retrieve the identifiers of all elements
4040    * of the enclosing Model object.  The result is stored in an internal list
4041    * of ids.  Users can access the resulting data by calling the method
4042    * getAllElementIdList().
4043    *
4044    * @warning Retrieving all elements within a model is a time-consuming operation.
4045    * Callers may want to call isPopulatedAllElementIdList() to determine
4046    * whether the id list may already have been populated.
4047    *
4048    * @see isPopulatedAllElementIdList()
4049    */ public
populateAllElementIdList()4050  void populateAllElementIdList() {
4051     libsbmlPINVOKE.Model_populateAllElementIdList(swigCPtr);
4052   }
4053 
4054 
4055 /**
4056    * Predicate returning @c true if libSBML has a list of the ids of all
4057    * components of this model.
4058    *
4059    * @return @c true if the id list has already been populated, @c false
4060    * otherwise.
4061    */ public
isPopulatedAllElementIdList()4062  bool isPopulatedAllElementIdList() {
4063     bool ret = libsbmlPINVOKE.Model_isPopulatedAllElementIdList(swigCPtr);
4064     return ret;
4065   }
4066 
4067 
4068 /**
4069    * Returns the internal list of the identifiers of all elements within this Model object.
4070    *
4071    * @return an IdList of all the identifiers in the model.
4072    *
4073    * @see populateAllElementIdList()
4074    * @see isPopulatedAllElementIdList()
4075    */ public
getAllElementIdList()4076  IdList getAllElementIdList() {
4077     IdList ret = new IdList(libsbmlPINVOKE.Model_getAllElementIdList(swigCPtr), true);
4078     return ret;
4079   }
4080 
4081 
4082 /**
4083    * Clears the internal list of the identifiers of all elements within this Model object.
4084    *
4085    * @see populateAllElementIdList()
4086    * @see isPopulatedAllElementIdList()
4087    */ public
clearAllElementIdList()4088  void clearAllElementIdList() {
4089     libsbmlPINVOKE.Model_clearAllElementIdList(swigCPtr);
4090   }
4091 
4092 
4093 /**
4094    * Populates the internal list of the metaids of all elements within this Model object.
4095    *
4096    * This method tells libSBML to retrieve the identifiers of all elements
4097    * of the enclosing Model object.  The result is stored in an internal list
4098    * of metaids.  Users can access the resulting data by calling the method
4099    * getAllElementMetaIdList().
4100    *
4101    * @warning Retrieving all elements within a model is a time-consuming operation.
4102    * Callers may want to call isPopulatedAllElementMetaIdList() to determine
4103    * whether the metaid list may already have been populated.
4104    *
4105    * @see isPopulatedAllElementMetaIdList()
4106    */ public
populateAllElementMetaIdList()4107  void populateAllElementMetaIdList() {
4108     libsbmlPINVOKE.Model_populateAllElementMetaIdList(swigCPtr);
4109   }
4110 
4111 
4112 /**
4113    * Predicate returning @c true if libSBML has a list of the metaids of all
4114    * components of this model.
4115    *
4116    * @return @c true if the metaid list has already been populated, @c false
4117    * otherwise.
4118    */ public
isPopulatedAllElementMetaIdList()4119  bool isPopulatedAllElementMetaIdList() {
4120     bool ret = libsbmlPINVOKE.Model_isPopulatedAllElementMetaIdList(swigCPtr);
4121     return ret;
4122   }
4123 
4124 
4125 /**
4126    * Returns the internal list of the metaids of all elements within this Model object.
4127    *
4128    * @return an IdList of all the metaids in the model.
4129    *
4130    * @see populateAllElementMetaIdList()
4131    * @see isPopulatedAllElementMetaIdList()
4132    */ public
getAllElementMetaIdList()4133  IdList getAllElementMetaIdList() {
4134     IdList ret = new IdList(libsbmlPINVOKE.Model_getAllElementMetaIdList(swigCPtr), true);
4135     return ret;
4136   }
4137 
4138 
4139 /**
4140    * Clears the internal list of the metaids of all elements within this Model object.
4141    *
4142    * @see populateAllElementMetaIdList()
4143    * @see isPopulatedAllElementMetaIdList()
4144    */ public
clearAllElementMetaIdList()4145  void clearAllElementMetaIdList() {
4146     libsbmlPINVOKE.Model_clearAllElementMetaIdList(swigCPtr);
4147   }
4148 
4149 
4150 /**
4151    * Predicate returning @c true if all the required elements for this Model
4152    * object have been set.
4153    *
4154    * @return a boolean value indicating whether all the required
4155    * elements for this object have been defined.
4156    */ public new
hasRequiredElements()4157  bool hasRequiredElements() {
4158     bool ret = libsbmlPINVOKE.Model_hasRequiredElements(swigCPtr);
4159     return ret;
4160   }
4161 
4162 
4163 /**
4164    * Removes the nth FunctionDefinition object from this Model object and
4165    * returns a pointer to it.
4166    *
4167    * The caller owns the returned object and is responsible for deleting it.
4168    *
4169    * @param n the index of the FunctionDefinition object to remove.
4170    *
4171    * @return the FunctionDefinition object removed, or @c null if the given
4172    * index is out of range.
4173    *
4174    */ public
removeFunctionDefinition(long n)4175  FunctionDefinition removeFunctionDefinition(long n) {
4176     global::System.IntPtr cPtr = libsbmlPINVOKE.Model_removeFunctionDefinition__SWIG_0(swigCPtr, n);
4177     FunctionDefinition ret = (cPtr == global::System.IntPtr.Zero) ? null : new FunctionDefinition(cPtr, true);
4178     return ret;
4179   }
4180 
4181 
4182 /**
4183    * Removes the FunctionDefinition object with the given identifier from this Model
4184    * object and returns a pointer to it.
4185    *
4186    * The caller owns the returned object and is responsible for deleting it.
4187    *
4188    * @param sid the identifier of the FunctionDefinition object to remove.
4189    *
4190    * @return the FunctionDefinition object removed, or @c null if no
4191    * FunctionDefinition object with the identifier exists in this Model
4192    * object.
4193    */ public
removeFunctionDefinition(string sid)4194  FunctionDefinition removeFunctionDefinition(string sid) {
4195     global::System.IntPtr cPtr = libsbmlPINVOKE.Model_removeFunctionDefinition__SWIG_1(swigCPtr, sid);
4196     FunctionDefinition ret = (cPtr == global::System.IntPtr.Zero) ? null : new FunctionDefinition(cPtr, true);
4197     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
4198     return ret;
4199   }
4200 
4201 
4202 /**
4203    * Removes the nth UnitDefinition object from this Model object and
4204    * returns a pointer to it.
4205    *
4206    * The caller owns the returned object and is responsible for deleting it.
4207    *
4208    * @param n the index of the UnitDefinition object to remove.
4209    *
4210    * @return the UnitDefinition object removed., or @c null if the given
4211    * index is out of range.
4212    *
4213    */ public
removeUnitDefinition(long n)4214  UnitDefinition removeUnitDefinition(long n) {
4215     global::System.IntPtr cPtr = libsbmlPINVOKE.Model_removeUnitDefinition__SWIG_0(swigCPtr, n);
4216     UnitDefinition ret = (cPtr == global::System.IntPtr.Zero) ? null : new UnitDefinition(cPtr, true);
4217     return ret;
4218   }
4219 
4220 
4221 /**
4222    * Removes the UnitDefinition object with the given identifier from this Model
4223    * object and returns a pointer to it.
4224    *
4225    * The caller owns the returned object and is responsible for deleting it.
4226    *
4227    * @param sid the identifier of the UnitDefinition object to remove.
4228    *
4229    * @return the UnitDefinition object removed, or @c null if no
4230    * UnitDefinition object with the identifier exists in this Model object.
4231    */ public
removeUnitDefinition(string sid)4232  UnitDefinition removeUnitDefinition(string sid) {
4233     global::System.IntPtr cPtr = libsbmlPINVOKE.Model_removeUnitDefinition__SWIG_1(swigCPtr, sid);
4234     UnitDefinition ret = (cPtr == global::System.IntPtr.Zero) ? null : new UnitDefinition(cPtr, true);
4235     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
4236     return ret;
4237   }
4238 
4239 
4240 /**
4241    * Removes the nth CompartmentType object from this Model object and
4242    * returns a pointer to it.
4243    *
4244    * The caller owns the returned object and is responsible for deleting it.
4245    *
4246    * @param n the index of the CompartmentType object to remove.
4247    *
4248    * @return the ComapartmentType object removed, or @c null if the given
4249    * index is out of range.
4250    *
4251    */ public
removeCompartmentType(long n)4252  CompartmentType removeCompartmentType(long n) {
4253     global::System.IntPtr cPtr = libsbmlPINVOKE.Model_removeCompartmentType__SWIG_0(swigCPtr, n);
4254     CompartmentType ret = (cPtr == global::System.IntPtr.Zero) ? null : new CompartmentType(cPtr, true);
4255     return ret;
4256   }
4257 
4258 
4259 /**
4260    * Removes the CompartmentType object with the given identifier from this Model
4261    * object and returns a pointer to it.
4262    *
4263    * The caller owns the returned object and is responsible for deleting it.
4264    *
4265    * @param sid the identifier of the object to remove.
4266    *
4267    * @return the CompartmentType object removed, or @c null if no
4268    * CompartmentType object with the identifier exists in this Model object.
4269    */ public
removeCompartmentType(string sid)4270  CompartmentType removeCompartmentType(string sid) {
4271     global::System.IntPtr cPtr = libsbmlPINVOKE.Model_removeCompartmentType__SWIG_1(swigCPtr, sid);
4272     CompartmentType ret = (cPtr == global::System.IntPtr.Zero) ? null : new CompartmentType(cPtr, true);
4273     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
4274     return ret;
4275   }
4276 
4277 
4278 /**
4279    * Removes the nth SpeciesType object from this Model object and
4280    * returns a pointer to it.
4281    *
4282    * The caller owns the returned object and is responsible for deleting it.
4283    *
4284    * @param n the index of the SpeciesType object to remove.
4285    *
4286    * @return the SpeciesType object removed, or @c null if the given index is
4287    * out of range.
4288    *
4289    */ public
removeSpeciesType(long n)4290  SpeciesType removeSpeciesType(long n) {
4291     global::System.IntPtr cPtr = libsbmlPINVOKE.Model_removeSpeciesType__SWIG_0(swigCPtr, n);
4292     SpeciesType ret = (cPtr == global::System.IntPtr.Zero) ? null : new SpeciesType(cPtr, true);
4293     return ret;
4294   }
4295 
4296 
4297 /**
4298    * Removes the SpeciesType object with the given identifier from this Model
4299    * object and returns a pointer to it.
4300    *
4301    * The caller owns the returned object and is responsible for deleting it.
4302    *
4303    * @param sid the identifier of the SpeciesType object to remove.
4304    *
4305    * @return the SpeciesType object removed, or @c null if no SpeciesType
4306    * object with the identifier exists in this Model object.
4307    *
4308    */ public
removeSpeciesType(string sid)4309  SpeciesType removeSpeciesType(string sid) {
4310     global::System.IntPtr cPtr = libsbmlPINVOKE.Model_removeSpeciesType__SWIG_1(swigCPtr, sid);
4311     SpeciesType ret = (cPtr == global::System.IntPtr.Zero) ? null : new SpeciesType(cPtr, true);
4312     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
4313     return ret;
4314   }
4315 
4316 
4317 /**
4318    * Removes the nth Compartment object from this Model object and
4319    * returns a pointer to it.
4320    *
4321    * The caller owns the returned object and is responsible for deleting it.
4322    *
4323    * @param n the index of the Compartment object to remove.
4324    *
4325    * @return the Compartment object removed, or @c null if the given index is
4326    * out of range.
4327    *
4328    */ public
removeCompartment(long n)4329  Compartment removeCompartment(long n) {
4330     global::System.IntPtr cPtr = libsbmlPINVOKE.Model_removeCompartment__SWIG_0(swigCPtr, n);
4331     Compartment ret = (cPtr == global::System.IntPtr.Zero) ? null : new Compartment(cPtr, true);
4332     return ret;
4333   }
4334 
4335 
4336 /**
4337    * Removes the Compartment object with the given identifier from this Model
4338    * object and returns a pointer to it.
4339    *
4340    * The caller owns the returned object and is responsible for deleting it.
4341    *
4342    * @param sid the identifier of the Compartment object to remove.
4343    *
4344    * @return the Compartment object removed, or @c null if no Compartment
4345    * object with the identifier exists in this Model object.
4346    */ public
removeCompartment(string sid)4347  Compartment removeCompartment(string sid) {
4348     global::System.IntPtr cPtr = libsbmlPINVOKE.Model_removeCompartment__SWIG_1(swigCPtr, sid);
4349     Compartment ret = (cPtr == global::System.IntPtr.Zero) ? null : new Compartment(cPtr, true);
4350     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
4351     return ret;
4352   }
4353 
4354 
4355 /**
4356    * Removes the nth Species object from this Model object and
4357    * returns a pointer to it.
4358    *
4359    * The caller owns the returned object and is responsible for deleting it.
4360    *
4361    * @param n the index of the Species object to remove.
4362    *
4363    * @return the Species object removed, or @c null if the given index is out
4364    * of range.
4365    *
4366    */ public
removeSpecies(long n)4367  Species removeSpecies(long n) {
4368     global::System.IntPtr cPtr = libsbmlPINVOKE.Model_removeSpecies__SWIG_0(swigCPtr, n);
4369     Species ret = (cPtr == global::System.IntPtr.Zero) ? null : new Species(cPtr, true);
4370     return ret;
4371   }
4372 
4373 
4374 /**
4375    * Removes the Species object with the given identifier from this Model
4376    * object and returns a pointer to it.
4377    *
4378    * The caller owns the returned object and is responsible for deleting it.
4379    *
4380    * @param sid the identifier of the Species object to remove.
4381    *
4382    * @return the Species object removed, or @c null if no Species object with
4383    * the identifier exists in this Model object.
4384    *
4385    */ public
removeSpecies(string sid)4386  Species removeSpecies(string sid) {
4387     global::System.IntPtr cPtr = libsbmlPINVOKE.Model_removeSpecies__SWIG_1(swigCPtr, sid);
4388     Species ret = (cPtr == global::System.IntPtr.Zero) ? null : new Species(cPtr, true);
4389     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
4390     return ret;
4391   }
4392 
4393 
4394 /**
4395    * Removes the nth Parameter object from this Model object and
4396    * returns a pointer to it.
4397    *
4398    * The caller owns the returned object and is responsible for deleting it.
4399    *
4400    * @param n the index of the Parameter object to remove.
4401    *
4402    * @return the Parameter object removed, or @c null if the given index is
4403    * out of range.
4404    *
4405    */ public
removeParameter(long n)4406  Parameter removeParameter(long n) {
4407     global::System.IntPtr cPtr = libsbmlPINVOKE.Model_removeParameter__SWIG_0(swigCPtr, n);
4408     Parameter ret = (cPtr == global::System.IntPtr.Zero) ? null : new Parameter(cPtr, true);
4409     return ret;
4410   }
4411 
4412 
4413 /**
4414    * Removes the Parameter object with the given identifier from this Model
4415    * object and returns a pointer to it.
4416    *
4417    * The caller owns the returned object and is responsible for deleting it.
4418    *
4419    * @param sid the identifier of the Parameter object to remove.
4420    *
4421    * @return the Parameter object removed, or @c null if no Parameter object
4422    * with the identifier exists in this Model object.
4423    */ public
removeParameter(string sid)4424  Parameter removeParameter(string sid) {
4425     global::System.IntPtr cPtr = libsbmlPINVOKE.Model_removeParameter__SWIG_1(swigCPtr, sid);
4426     Parameter ret = (cPtr == global::System.IntPtr.Zero) ? null : new Parameter(cPtr, true);
4427     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
4428     return ret;
4429   }
4430 
4431 
4432 /**
4433    * Removes the nth InitialAssignment object from this Model object and
4434    * returns a pointer to it.
4435    *
4436    * The caller owns the returned object and is responsible for deleting it.
4437    *
4438    * @param n the index of the InitialAssignment object to remove.
4439    *
4440    * @return the InitialAssignment object removed, or @c null if the given
4441    * index is out of range.
4442    *
4443    */ public
removeInitialAssignment(long n)4444  InitialAssignment removeInitialAssignment(long n) {
4445     global::System.IntPtr cPtr = libsbmlPINVOKE.Model_removeInitialAssignment__SWIG_0(swigCPtr, n);
4446     InitialAssignment ret = (cPtr == global::System.IntPtr.Zero) ? null : new InitialAssignment(cPtr, true);
4447     return ret;
4448   }
4449 
4450 
4451 /**
4452    * Removes the InitialAssignment object with the given 'symbol' attribute
4453    * from this Model object and returns a pointer to it.
4454    *
4455    * The caller owns the returned object and is responsible for deleting it.
4456    *
4457    * @param symbol the 'symbol' attribute of the InitialAssignment object to remove.
4458    *
4459    * @return the InitialAssignment object removed, or @c null if no
4460    * InitialAssignment object with the 'symbol' attribute exists in this
4461    * Model object.
4462    */ public
removeInitialAssignment(string symbol)4463  InitialAssignment removeInitialAssignment(string symbol) {
4464     global::System.IntPtr cPtr = libsbmlPINVOKE.Model_removeInitialAssignment__SWIG_1(swigCPtr, symbol);
4465     InitialAssignment ret = (cPtr == global::System.IntPtr.Zero) ? null : new InitialAssignment(cPtr, true);
4466     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
4467     return ret;
4468   }
4469 
4470 
4471 /**
4472    * Removes the nth Rule object from this Model object and
4473    * returns a pointer to it.
4474    *
4475    * The caller owns the returned object and is responsible for deleting it.
4476    *
4477    * @param n the index of the Rule object to remove.
4478    *
4479    * @return the Rule object removed, or @c null if the given index is out of
4480    * range.
4481    *
4482    */ public
removeRule(long n)4483  Rule removeRule(long n) {
4484         Rule ret = (Rule) libsbml.DowncastSBase(libsbmlPINVOKE.Model_removeRule__SWIG_0(swigCPtr, n), true);
4485 	return ret;
4486 }
4487 
4488 
4489 /**
4490    * Removes the Rule object with the given 'variable' attribute from this Model
4491    * object and returns a pointer to it.
4492    *
4493    * The caller owns the returned object and is responsible for deleting it.
4494    *
4495    * @param variable the 'variable' attribute of the Rule object to remove.
4496    *
4497    * @return the Rule object removed, or @c null if no Rule object with the
4498    * 'variable' attribute exists in this Model object.
4499    */ public
removeRule(string variable)4500  Rule removeRule(string variable) {
4501         Rule ret = (Rule) libsbml.DowncastSBase(libsbmlPINVOKE.Model_removeRule__SWIG_1(swigCPtr, variable), true);
4502     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
4503 	return ret;
4504 }
4505 
4506 
4507 /**
4508    * Removes the Rule object with the given 'variable' attribute from this Model
4509    * object and returns a pointer to it.
4510    *
4511    * The caller owns the returned object and is responsible for deleting it.
4512    *
4513    * @param variable the 'variable' attribute of the Rule object to remove.
4514    *
4515    * @return the Rule object removed, or @c null if no Rule object with the
4516    * 'variable' attribute exists in this Model object.
4517    */ public
removeRuleByVariable(string variable)4518  Rule removeRuleByVariable(string variable) {
4519         Rule ret = (Rule) libsbml.DowncastSBase(libsbmlPINVOKE.Model_removeRuleByVariable(swigCPtr, variable), true);
4520     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
4521 	return ret;
4522 }
4523 
4524 
4525 /**
4526    * Removes the nth Constraint object from this Model object and
4527    * returns a pointer to it.
4528    *
4529    * The caller owns the returned object and is responsible for deleting it.
4530    *
4531    * @param n the index of the Constraint object to remove.
4532    *
4533    * @return the Constraint object removed, or @c null if the given index is
4534    * out of range.
4535    *
4536    */ public
removeConstraint(long n)4537  Constraint removeConstraint(long n) {
4538     global::System.IntPtr cPtr = libsbmlPINVOKE.Model_removeConstraint(swigCPtr, n);
4539     Constraint ret = (cPtr == global::System.IntPtr.Zero) ? null : new Constraint(cPtr, true);
4540     return ret;
4541   }
4542 
4543 
4544 /**
4545    * Removes the nth Reaction object from this Model object and
4546    * returns a pointer to it.
4547    *
4548    * The caller owns the returned object and is responsible for deleting it.
4549    *
4550    * @param n the index of the Reaction object to remove.
4551    *
4552    * @return the Reaction object removed, or @c null if the given index is
4553    * out of range.
4554    *
4555    */ public
removeReaction(long n)4556  Reaction removeReaction(long n) {
4557 	Reaction ret = (Reaction) libsbml.DowncastSBase(libsbmlPINVOKE.Model_removeReaction__SWIG_0(swigCPtr, n), true);
4558 	return ret;
4559 }
4560 
4561 
4562 /**
4563    * Removes the Reaction object with the given identifier from this Model
4564    * object and returns a pointer to it.
4565    *
4566    * The caller owns the returned object and is responsible for deleting it.
4567    *
4568    * @param sid the identifier of the Reaction object to remove.
4569    *
4570    * @return the Reaction object removed, or @c null if no Reaction object
4571    * with the identifier exists in this Model object.
4572    *
4573    */ public
removeReaction(string sid)4574  Reaction removeReaction(string sid) {
4575 	Reaction ret = (Reaction) libsbml.DowncastSBase(libsbmlPINVOKE.Model_removeReaction__SWIG_1(swigCPtr, sid), true);
4576     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
4577 	return ret;
4578 }
4579 
4580 
4581 /**
4582    * Removes the nth Event object from this Model object and
4583    * returns a pointer to it.
4584    *
4585    * The caller owns the returned object and is responsible for deleting it.
4586    *
4587    * @param n the index of the Event object to remove.
4588    *
4589    * @return the Event object removed, or @c null if the given index is out
4590    * of range.
4591    *
4592    */ public
removeEvent(long n)4593  Event removeEvent(long n) {
4594     global::System.IntPtr cPtr = libsbmlPINVOKE.Model_removeEvent__SWIG_0(swigCPtr, n);
4595     Event ret = (cPtr == global::System.IntPtr.Zero) ? null : new Event(cPtr, true);
4596     return ret;
4597   }
4598 
4599 
4600 /**
4601    * Removes the Event object with the given identifier from this Model
4602    * object and returns a pointer to it.
4603    *
4604    * The caller owns the returned object and is responsible for deleting it.
4605    *
4606    * @param sid the identifier of the Event object to remove.
4607    *
4608    * @return the Event object removed, or @c null if no Event object with the
4609    * identifier exists in this Model object.
4610    *
4611    */ public
removeEvent(string sid)4612  Event removeEvent(string sid) {
4613     global::System.IntPtr cPtr = libsbmlPINVOKE.Model_removeEvent__SWIG_1(swigCPtr, sid);
4614     Event ret = (cPtr == global::System.IntPtr.Zero) ? null : new Event(cPtr, true);
4615     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
4616     return ret;
4617   }
4618 
4619 
4620 /**
4621    * Copies a given Model object's subcomponents and appends the copies to
4622    * the appropriate places in this Model.
4623    *
4624    * This method also calls the <code>appendFrom</code> method on all libSBML
4625    * plug-in objects.
4626    *
4627    *
4628  *
4629  * SBML Level&nbsp;3 consists of a <em>Core</em> definition that can be extended
4630  * via optional SBML Level&nbsp;3 <em>packages</em>.  A given model may indicate
4631  * that it uses one or more SBML packages, and likewise, a software tool may be
4632  * able to support one or more packages.  LibSBML does not come preconfigured
4633  * with all possible packages included and enabled, in part because not all
4634  * package specifications have been finalized.  To support the ability for
4635  * software systems to enable support for the Level&nbsp;3 packages they choose,
4636  * libSBML features a <em>plug-in</em> mechanism.  Each SBML Level&nbsp;3
4637  * package is implemented in a separate code plug-in that can be enabled by the
4638  * application to support working with that SBML package.  A given SBML model
4639  * may thus contain not only objects defined by SBML Level&nbsp;3 Core, but also
4640  * objects created by libSBML plug-ins supporting additional Level&nbsp;3
4641  * packages.
4642  *
4643  *
4644    *
4645    * @param model the Model to merge with this one.
4646    *
4647    */ public new
appendFrom(Model model)4648  int appendFrom(Model model) {
4649     int ret = libsbmlPINVOKE.Model_appendFrom(swigCPtr, Model.getCPtr(model));
4650     return ret;
4651   }
4652 
4653 
4654 /** */ /* libsbml-internal */ public new
enablePackageInternal(string pkgURI, string pkgPrefix, bool flag)4655  void enablePackageInternal(string pkgURI, string pkgPrefix, bool flag) {
4656     libsbmlPINVOKE.Model_enablePackageInternal(swigCPtr, pkgURI, pkgPrefix, flag);
4657     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
4658   }
4659 
4660 
4661 /** */ /* libsbml-internal */ public new
updateSBMLNamespace(string package, long level, long version)4662  void updateSBMLNamespace(string package, long level, long version) {
4663     libsbmlPINVOKE.Model_updateSBMLNamespace(swigCPtr, package, level, version);
4664     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
4665   }
4666 
renameIDs(SBaseList elements, IdentifierTransformer idTransformer)4667   public void renameIDs(SBaseList elements, IdentifierTransformer idTransformer) {
4668     libsbmlPINVOKE.Model_renameIDs(swigCPtr, SBaseList.getCPtr(elements), IdentifierTransformer.getCPtr(idTransformer));
4669     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
4670   }
4671 
4672 }
4673 
4674 }
4675