1 //------------------------------------------------------------------------------
2 // <auto-generated />
3 //
4 // This file was automatically generated by SWIG (http://www.swig.org).
5 // Version 4.0.2
6 //
7 // Do not make changes to this file unless you know what you are doing--modify
8 // the SWIG interface file instead.
9 //------------------------------------------------------------------------------
10 
11 namespace libsbml {
12 
13  using System;
14  using System.Runtime.InteropServices;
15 
16 /**
17  * @sbmlpackage{core}
18  *
19 @htmlinclude pkg-marker-core.html An assignment to a variable by an SBML <em>event</em>.
20  *
21  * Event contains an optional element called 'listOfEventAssignments', of
22  * class ListOfEventAssignments.  In every instance of an event definition
23  * in a model, the object's 'listOfEventAssignments' element must have a
24  * non-empty list of one or more 'eventAssignment' elements of class
25  * EventAssignment.  The object class EventAssignment has one required
26  * attribute, 'variable', and a required element, 'math'.  Being derived
27  * from SBase, it also has all the usual attributes and elements of its
28  * parent class.
29  *
30  * An Event object defines when the event can occur, the variables that are
31  * affected by the event, and how the variables are affected.  The purpose
32  * of the EventAssignment object class is to define how variables are
33  * affected by an Event.  In SBML Level&nbsp;2, every Event object instance
34  * must have a nonempty list of event assignments; in SBML Level&nbsp;3,
35  * the list of assignments is optional.
36  *
37  * The operation of an Event is divided into two phases (regardless of
38  * whether a delay is involved): one phase when the event is @em triggered,
39  * and the other when the event is @em executed.   EventAssignment objects
40  * are interpreted when an event is executed.  The effects are described
41  * below.
42  *
43  * @section event-variable The attribute 'variable'
44  *
45  * The EventAssignment attribute 'variable' must be the identifier of an
46  * existing Compartment, Species, SpeciesReference, or Parameter
47  * instance defined in the model.  In SBML Level&nbsp;3 Version&nbsp;2,
48  * this list was expanded to include identifiers of SBML Level&nbsp;3
49  * package variables that have both mathematical meaning and the
50  * ability to be assigned.  When the event is executed, the value of
51  * the model component identified by 'variable' is changed by the
52  * EventAssignment to the value computed by the 'math' element; that is, a
53  * species' quantity, species reference's stoichiometry, compartment's size
54  * or parameter's value are reset to the value computed by 'math'.
55  *
56  * Certain restrictions are placed on what can appear in 'variable':
57  * <ul>
58  * <li> The object identified by the value of the EventAssignment attribute
59  * 'variable' must not have its 'constant' attribute set to or default to
60  * @c true.  (Constants cannot be affected by events.)
61  *
62  * <li> The 'variable' attribute must not contain the identifier of a
63  * reaction.  In SBML Level&nbsp;2 and SBML Level&nbsp;3 Version&nbsp;1,
64  * only species, species references, compartment and parameter
65  * values may be set by an Event.  In SBML Level&nbsp;3 Version&nbsp;2,
66  * the 'variable' attribute may also be the identifier of an SBML
67  * Level&nbsp;3 package element with mathematical meaning and the
68  * ability to be assigned a value.  This situation may only arise if
69  * the SBML package is present in the SBML document with a
70  * package:required attribute of @c true
71  *
72  * <li> The value of every 'variable' attribute must be unique among the set
73  * of EventAssignment structures within a given Event structure.  In other
74  * words, a single event cannot have multiple EventAssignment objects
75  * assigning the same variable.  (All of them would be performed at the
76  * same time when that particular Event triggers, resulting in
77  * indeterminacy.)  However, @em separate Event instances can refer to the
78  * same variable.
79  *
80  * <li> A variable cannot be assigned a value in an EventAssignment object
81  * instance and also be assigned a value by an AssignmentRule; i.e., the
82  * value of an EventAssignment's 'variable' attribute cannot be the same as
83  * the value of a AssignmentRule' 'variable' attribute.  (Assignment rules
84  * hold at all times, therefore it would be inconsistent to also define an
85  * event that reassigns the value of the same variable.)
86  * </ul>
87  *
88  * If the variable attribute of an EventAssignment object references an
89  * object in an SBML namespace that is not understood by the interpreter
90  * reading a given SBML document (that is, if the object is defined by an
91  * SBML Level&nbsp;3 package that the software does not support), the
92  * event assignment must be ignored--the object's value will not need to
93  * be set, as the interpreter could not understand that package. If an
94  * interpreter cannot establish whether a referenced object is missing
95  * from the model or instead is defined in an SBML namespace not
96  * understood by the interpreter, it may produce a warning to the user.
97  * (The latter situation may only arise if an SBML package is present in
98  * the SBML document with a package:required attribute of 'true'.)
99  *
100  * Note that the time of assignment of the object identified by the
101  * value of the 'variable' attribute is always the time at which the Event
102  * is <em>executed</em>, not when it is <em>triggered</em>.  The timing is
103  * controlled by the optional Delay in an Event.  The time of
104  * assignment is not affected by the 'useValuesFromTriggerTime'
105  * attribute on Event---that attribute affects the time at which the
106  * EventAssignment's 'math' expression is @em evaluated.  In other
107  * words, SBML allows decoupling the time at which the
108  * 'variable' is assigned from the time at which its value
109  * expression is calculated.
110  *
111  * @section event-math The 'math' subelement in an EventAssignment
112  *
113  * The MathML expression contained in an EventAssignment defines the new
114  * value of the variable being assigned by the Event.
115  *
116  * As mentioned above, the time at which the expression in 'math' is
117  * evaluated is determined by the attribute 'useValuesFromTriggerTime' on
118  * Event.  If the attribute value is @c true, the expression must be
119  * evaluated when the event is @em triggered; more precisely, the values of
120  * identifiers occurring in MathML <code>&lt;ci&gt;</code> elements in the
121  * EventAssignment's 'math' expression are the values they have at the
122  * point when the event @em triggered.  If, instead,
123  * 'useValuesFromTriggerTime''s value is @c false, it means the values at
124  * @em execution time should be used; that is, the values of identifiers
125  * occurring in MathML <code>&lt;ci&gt;</code> elements in the
126  * EventAssignment's 'math' expression are the values they have at the
127  * point when the event @em executed.
128  *
129  * @section eventassignment-version-diffs SBML Level/Version differences
130  *
131  * Between Version&nbsp;4 and previous versions of SBML Level&nbsp;2, the
132  * requirements regarding the matching of units between an
133  * EvengAssignment's formula and the units of the object identified by the
134  * 'variable' attribute changed.  Previous versions required consistency,
135  * but in SBML Level&nbsp;2 Version&nbsp;4 and in SBML Level&nbsp;3, unit
136  * consistency is only @em recommended.  More precisely:
137  * <ul>
138  *
139  * <li> In the case of a species, an EventAssignment sets the referenced
140  * species' quantity (concentration or amount of substance) to the value
141  * determined by the formula in the EventAssignment's 'math' subelement.
142  * The units of the 'math' formula should (in SBML Level&nbsp;2
143  * Version&nbsp;4 and in Level&nbsp;3) or must (in previous Versions of
144  * Level&nbsp;2) be identical to the units of the species.
145  *
146  * <li> (SBML Level&nbsp;3 only.) In the case of a species reference, an
147  * EventAssignment sets the stoichiometry of the reactant or product
148  * referenced by the SpeciesReference object to the value determined by the
149  * formula in the 'math' element.  The unit associated with the value
150  * produced by the 'math' formula should be @c dimensionless, because
151  * reactant and product stoichiometries in reactions are dimensionless
152  * quantities.
153  *
154  * <li> In the case of a compartment, an EventAssignment sets the
155  * referenced compartment's size to the size determined by the formula in
156  * the 'math' subelement of the EventAssignment.  The overall units of the
157  * formula should (in SBML Level&nbsp;2 Version&nbsp;4 and in Level&nbsp;3)
158  * or must (in previous Versions of Level&nbsp;2) be identical to the units
159  * specified for the size of the compartment identified by the
160  * EventAssignment's 'variable' attribute.
161  *
162  * <li> In the case of a parameter, an EventAssignment sets the referenced
163  * parameter's value to that determined by the formula in 'math'.  The
164  * overall units of the formula should (in SBML Level&nbsp;2 Version&nbsp;4
165  * and Level&nbsp;3) or must (in previous Versions of Level&nbsp;2) be
166  * identical to the units defined for the parameter.
167  *
168  * <li> (For SBML Level&nbsp;3 Version&nbsp;2 only) <em>In the case of
169  * an object from an SBML Level&nbsp;3 package</em>, an EventAssignment sets
170  * the referenced object's value (as defined by that package) to the
171  * value of the formula in 'math'. The unit of measurement associated
172  * with the value produced by the formula should be the same as that
173  * object's units attribute value (if it has such an attribute), or be
174  * equal to the units of model components of that type (if objects of
175  * that class are defined by the package as having the same units).
176  * </ul>
177  *
178  * Note that the formula placed in the 'math' element <em>has no assumed
179  * units</em>.  The consistency of the units of the formula, and the units
180  * of the entity which the assignment affects, must be explicitly
181  * established just as in the case of the value of the Delay subelement.
182  * An approach similar to the one discussed in the context of Delay may be
183  * used for the formula of an EventAssignment.
184  *
185  * @section event-asnt-restrictions Restrictions relaxed in SBML Level&nbsp;3 Version&nbsp;2
186  *
187  * In SBML Level&nbsp;3 Version&nbsp;2, the requirement that an EventAssignment
188  * have a 'math' subelement was relaxed, making it optional.  In
189  * this case, the EventAssignment remains undefined, and unless that information
190  * is provided in some other form (such as with an SBML Level&nbsp;3
191  * package), the Event behaves as if it had no EventAssignment.
192  *
193  * @see Event
194  *
195  *
196  *
197  */
198 
199 public class EventAssignment : SBase {
200 	private HandleRef swigCPtr;
201 
EventAssignment(IntPtr cPtr, bool cMemoryOwn)202 	internal EventAssignment(IntPtr cPtr, bool cMemoryOwn) : base(libsbmlPINVOKE.EventAssignment_SWIGUpcast(cPtr), cMemoryOwn)
203 	{
204 		//super(libsbmlPINVOKE.EventAssignmentUpcast(cPtr), cMemoryOwn);
205 		swigCPtr = new HandleRef(this, cPtr);
206 	}
207 
getCPtr(EventAssignment obj)208 	internal static HandleRef getCPtr(EventAssignment obj)
209 	{
210 		return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
211 	}
212 
getCPtrAndDisown(EventAssignment obj)213 	internal static HandleRef getCPtrAndDisown (EventAssignment obj)
214 	{
215 		HandleRef ptr = new HandleRef(null, IntPtr.Zero);
216 
217 		if (obj != null)
218 		{
219 			ptr             = obj.swigCPtr;
220 			obj.swigCMemOwn = false;
221 		}
222 
223 		return ptr;
224 	}
225 
Dispose(bool disposing)226   protected override void Dispose(bool disposing) {
227     lock(this) {
228       if (swigCPtr.Handle != global::System.IntPtr.Zero) {
229         if (swigCMemOwn) {
230           swigCMemOwn = false;
231           libsbmlPINVOKE.delete_EventAssignment(swigCPtr);
232         }
233         swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
234       }
235       base.Dispose(disposing);
236     }
237   }
238 
239 
240 /**
241    * Creates a new EventAssignment using the given SBML @p level and @p version
242    * values.
243    *
244    * @param level a long integer, the SBML Level to assign to this EventAssignment.
245    *
246    * @param version a long integer, the SBML Version to assign to this
247    * EventAssignment.
248    *
249    *
250  * @throws SBMLConstructorException
251  * Thrown if the given @p level and @p version combination are invalid
252  * or if this object is incompatible with the given level and version.
253  *
254  *
255    *
256    *
257  * @note Attempting to add an object to an SBMLDocument having a different
258  * combination of SBML Level, Version and XML namespaces than the object
259  * itself will result in an error at the time a caller attempts to make the
260  * addition.  A parent object must have compatible Level, Version and XML
261  * namespaces.  (Strictly speaking, a parent may also have more XML
262  * namespaces than a child, but the reverse is not permitted.)  The
263  * restriction is necessary to ensure that an SBML model has a consistent
264  * overall structure.  This requires callers to manage their objects
265  * carefully, but the benefit is increased flexibility in how models can be
266  * created by permitting callers to create objects bottom-up if desired.  In
267  * situations where objects are not yet attached to parents (e.g.,
268  * SBMLDocument), knowledge of the intented SBML Level and Version help
269  * libSBML determine such things as whether it is valid to assign a
270  * particular value to an attribute.
271  *
272  *
273    */ public
EventAssignment(long level, long version)274  EventAssignment(long level, long version) : this(libsbmlPINVOKE.new_EventAssignment__SWIG_0(level, version), true) {
275     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
276   }
277 
278 
279 /**
280    * Creates a new EventAssignment using the given SBMLNamespaces object
281    * @p sbmlns.
282    *
283    *
284  *
285  * The SBMLNamespaces object encapsulates SBML Level/Version/namespaces
286  * information.  It is used to communicate the SBML Level, Version, and (in
287  * Level&nbsp;3) packages used in addition to SBML Level&nbsp;3 Core.  A
288  * common approach to using libSBML's SBMLNamespaces facilities is to create an
289  * SBMLNamespaces object somewhere in a program once, then hand that object
290  * as needed to object constructors that accept SBMLNamespaces as arguments.
291  *
292  *
293    *
294    * @param sbmlns an SBMLNamespaces object.
295    *
296    *
297  * @throws SBMLConstructorException
298  * Thrown if the given @p sbmlns is inconsistent or incompatible
299  * with this object.
300  *
301  *
302    *
303    *
304  * @note Attempting to add an object to an SBMLDocument having a different
305  * combination of SBML Level, Version and XML namespaces than the object
306  * itself will result in an error at the time a caller attempts to make the
307  * addition.  A parent object must have compatible Level, Version and XML
308  * namespaces.  (Strictly speaking, a parent may also have more XML
309  * namespaces than a child, but the reverse is not permitted.)  The
310  * restriction is necessary to ensure that an SBML model has a consistent
311  * overall structure.  This requires callers to manage their objects
312  * carefully, but the benefit is increased flexibility in how models can be
313  * created by permitting callers to create objects bottom-up if desired.  In
314  * situations where objects are not yet attached to parents (e.g.,
315  * SBMLDocument), knowledge of the intented SBML Level and Version help
316  * libSBML determine such things as whether it is valid to assign a
317  * particular value to an attribute.
318  *
319  *
320    */ public
EventAssignment(SBMLNamespaces sbmlns)321  EventAssignment(SBMLNamespaces sbmlns) : this(libsbmlPINVOKE.new_EventAssignment__SWIG_1(SBMLNamespaces.getCPtr(sbmlns)), true) {
322     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
323   }
324 
325 
326 /**
327    * Copy constructor; creates a copy of this EventAssignment.
328    *
329    * @param orig the object to copy.
330    */ public
EventAssignment(EventAssignment orig)331  EventAssignment(EventAssignment orig) : this(libsbmlPINVOKE.new_EventAssignment__SWIG_2(EventAssignment.getCPtr(orig)), true) {
332     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
333   }
334 
335 
336 /**
337    * Creates and returns a deep copy of this EventAssignment object.
338    *
339    * @return the (deep) copy of this EventAssignment object.
340    */ public new
clone()341  EventAssignment clone() {
342     global::System.IntPtr cPtr = libsbmlPINVOKE.EventAssignment_clone(swigCPtr);
343     EventAssignment ret = (cPtr == global::System.IntPtr.Zero) ? null : new EventAssignment(cPtr, true);
344     return ret;
345   }
346 
347 
348 /**
349    * Get the value of this EventAssignment's 'variable' attribute.
350    *
351    * @return the identifier stored in the 'variable' attribute of this
352    * EventAssignment.
353    */ public
getVariable()354  string getVariable() {
355     string ret = libsbmlPINVOKE.EventAssignment_getVariable(swigCPtr);
356     return ret;
357   }
358 
359 
360 /**
361    * Get the mathematical expression in this EventAssignment's 'math'
362    * subelement.
363    *
364    * @return the top ASTNode of an abstract syntax tree representing the
365    * mathematical formula in this EventAssignment, or @c null if the math is not set.
366    */ public new
getMath()367  ASTNode getMath() {
368     global::System.IntPtr cPtr = libsbmlPINVOKE.EventAssignment_getMath(swigCPtr);
369     ASTNode ret = (cPtr == global::System.IntPtr.Zero) ? null : new ASTNode(cPtr, false);
370     return ret;
371   }
372 
373 
374 /**
375    * Predicate for testing whether the attribute 'variable' of this
376    * EventAssignment is set.
377    *
378    * @return @c true if the 'variable' attribute of this EventAssignment
379    * is set, @c false otherwise.
380    */ public
isSetVariable()381  bool isSetVariable() {
382     bool ret = libsbmlPINVOKE.EventAssignment_isSetVariable(swigCPtr);
383     return ret;
384   }
385 
386 
387 /**
388    * Predicate for testing whether the 'math' subelement of this
389    * EventAssignment is set.
390    *
391    * @return @c true if this EventAssignment has a 'math' subelement,
392    * @c false otherwise.
393    */ public
isSetMath()394  bool isSetMath() {
395     bool ret = libsbmlPINVOKE.EventAssignment_isSetMath(swigCPtr);
396     return ret;
397   }
398 
399 
400 /**
401    * Sets the attribute 'variable' of this EventAssignment to a copy of
402    * the given identifier string.
403    *
404    * @param sid the identifier of an element defined in this model that
405    * can vary over time.
406    *
407    *
408  * @return integer value indicating success/failure of the
409  * function.  @if clike The value is drawn from the
410  * enumeration #OperationReturnValues_t. @endif The possible values
411  * returned by this function are:
412  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
413    * @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
414    */ public
setVariable(string sid)415  int setVariable(string sid) {
416     int ret = libsbmlPINVOKE.EventAssignment_setVariable(swigCPtr, sid);
417     return ret;
418   }
419 
420 
421 /**
422    * Unsets the attribute 'variable' of this EventAssignment.
423    *
424    *
425  * @return integer value indicating success/failure of the
426  * function.  @if clike The value is drawn from the
427  * enumeration #OperationReturnValues_t. @endif The possible values
428  * returned by this function are:
429  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
430    * @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
431    */ public
unsetVariable()432  int unsetVariable() {
433     int ret = libsbmlPINVOKE.EventAssignment_unsetVariable(swigCPtr);
434     return ret;
435   }
436 
437 
438 /**
439    * Sets the 'math' subelement of this EventAssignment to a copy of the
440    * given ASTNode.
441    *
442    * @param math an ASTNode that will be copied and stored as the
443    * mathematical formula for this EventAssignment.
444    *
445    *
446  * @return integer value indicating success/failure of the
447  * function.  @if clike The value is drawn from the
448  * enumeration #OperationReturnValues_t. @endif The possible values
449  * returned by this function are:
450  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
451    * @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink
452    */ public new
setMath(ASTNode math)453  int setMath(ASTNode math) {
454     int ret = libsbmlPINVOKE.EventAssignment_setMath(swigCPtr, ASTNode.getCPtr(math));
455     return ret;
456   }
457 
458 
459 /**
460    * Calculates and returns a UnitDefinition that expresses the units of
461    * measurement assumed for the 'math' expression of this EventAssignment.
462    *
463    *
464  *
465  * The units are calculated based on the mathematical expression in the
466  * EventAssignment and the model quantities referenced by
467  * <code>&lt;ci&gt;</code> elements used within that expression.  The method
468  * getDerivedUnitDefinition() returns the calculated units,
469  * to the extent that libSBML can compute them.
470  *
471    *
472    *
473  * @note The functionality that facilitates unit analysis depends on the
474  * model as a whole.  Thus, in cases where the object has not been added to
475  * a model or the model itself is incomplete, unit analysis is not possible
476  * and this method will return @c null.
477  *
478  *
479    *
480    *
481  * @warning Note that it is possible the 'math' expression in the
482  * EventAssignment contains literal numbers or parameters with undeclared
483  * units.  In those cases, it is not possible to calculate the units of the
484  * overall expression without making assumptions.  LibSBML does not make
485  * assumptions about the units, and
486  * getDerivedUnitDefinition() only returns the units as far
487  * as it is able to determine them.  For example, in an expression <em>X +
488  * Y</em>, if <em>X</em> has unambiguously-defined units and <em>Y</em> does
489  * not, it will return the units of <em>X</em>.  When using this method,
490  * <strong>it is critical that callers also invoke the method</strong>
491  * containsUndeclaredUnits() <strong>to determine whether
492  * this situation holds</strong>.  Callers should take suitable action in
493  * those situations.
494  *
495  *
496    *
497    * @return a UnitDefinition that expresses the units of the math
498    * expression of this EventAssignment, or @c null if one cannot be constructed.
499    *
500    * @see containsUndeclaredUnits()
501    */ public
getDerivedUnitDefinition()502  UnitDefinition getDerivedUnitDefinition() {
503     global::System.IntPtr cPtr = libsbmlPINVOKE.EventAssignment_getDerivedUnitDefinition__SWIG_0(swigCPtr);
504     UnitDefinition ret = (cPtr == global::System.IntPtr.Zero) ? null : new UnitDefinition(cPtr, false);
505     return ret;
506   }
507 
508 
509 /**
510    * Predicate returning @c true if the math expression of this
511    * EventAssignment contains literal numbers or parameters with undeclared
512    * units.
513    *
514    *
515  *
516  * The units are calculated based on the mathematical expression in the
517  * EventAssignment and the model quantities referenced by
518  * <code>&lt;ci&gt;</code> elements used within that expression.  The method
519  * getDerivedUnitDefinition() returns the calculated units,
520  * to the extent that libSBML can compute them.
521  *
522    *
523    * If the expression contains literal numbers or parameters with undeclared
524    * units, libSBML may not be able to compute the full units of the
525    * expression and will only return what it can compute.  Callers should
526    * always use containsUndeclaredUnits() when using
527    * getDerivedUnitDefinition() to decide whether the
528    * returned units may be incomplete.
529    *
530    * @return @c true if the math expression of this EventAssignment
531    * includes parameters/numbers
532    * with undeclared units, @c false otherwise.
533    *
534    * @note A return value of @c true indicates that the UnitDefinition
535    * returned by getDerivedUnitDefinition() may not
536    * accurately represent the units of the expression.
537    *
538    * @see getDerivedUnitDefinition()
539    */ public
containsUndeclaredUnits()540  bool containsUndeclaredUnits() {
541     bool ret = libsbmlPINVOKE.EventAssignment_containsUndeclaredUnits__SWIG_0(swigCPtr);
542     return ret;
543   }
544 
545 
546 /**
547    * Returns the libSBML type code of this object instance.
548    *
549    *
550  *
551  * LibSBML attaches an identifying code to every kind of SBML object.  These
552  * are integer constants known as <em>SBML type codes</em>.  The names of all
553  * the codes begin with the characters <code>SBML_</code>.
554  * @if clike The set of possible type codes for core elements is defined in
555  * the enumeration #SBMLTypeCode_t, and in addition, libSBML plug-ins for
556  * SBML Level&nbsp;3 packages define their own extra enumerations of type
557  * codes (e.g., #SBMLLayoutTypeCode_t for the Level&nbsp;3 Layout
558  * package).@endif@if java In the Java language interface for libSBML, the
559  * type codes are defined as static integer constants in the interface class
560  * {@link libsbmlConstants}.  @endif@if python In the Python language
561  * interface for libSBML, the type codes are defined as static integer
562  * constants in the interface class @link libsbml@endlink.@endif@if csharp In
563  * the C# language interface for libSBML, the type codes are defined as
564  * static integer constants in the interface class
565  * @link libsbmlcs.libsbml@endlink.@endif  Note that different Level&nbsp;3
566  * package plug-ins may use overlapping type codes; to identify the package
567  * to which a given object belongs, call the
568  * <code>@if conly SBase_getPackageName()
569  * @else SBase::getPackageName()
570  * @endif</code>
571  * method on the object.
572  *
573  * The exception to this is lists:  all SBML-style list elements have the type
574  * @link libsbml#SBML_LIST_OF SBML_LIST_OF@endlink, regardless of what package they
575  * are from.
576  *
577  *
578    *
579    * @return the SBML type code for this object:
580    * @link libsbml#SBML_EVENT_ASSIGNMENT SBML_EVENT_ASSIGNMENT@endlink (default).
581    *
582    *
583  * @warning <span class='warning'>The specific integer values of the possible
584  * type codes may be reused by different libSBML plug-ins for SBML Level&nbsp;3.
585  * packages,  To fully identify the correct code, <strong>it is necessary to
586  * invoke both getPackageName() and getTypeCode()</strong> (or
587  * ListOf::getItemTypeCode()).</span>
588  *
589  *
590    *
591    * @see getElementName()
592    * @see getPackageName()
593    */ public new
getTypeCode()594  int getTypeCode() {
595     int ret = libsbmlPINVOKE.EventAssignment_getTypeCode(swigCPtr);
596     return ret;
597   }
598 
599 
600 /**
601    * Returns the XML element name of this object, which for
602    * EventAssignment, is always @c 'eventAssignment'.
603    *
604    * @return the name of this element, i.e., @c 'eventAssignment'.
605    */ public new
getElementName()606  string getElementName() {
607     string ret = libsbmlPINVOKE.EventAssignment_getElementName(swigCPtr);
608     return ret;
609   }
610 
611 
612 /**
613    * Predicate returning @c true if all the required attributes for this
614    * EventAssignment object have been set.
615    *
616    * The required attributes for a EventAssignment object are:
617    * @li 'variable'
618    *
619    * @return @c true if the required attributes have been set, @c false
620    * otherwise.
621    */ public new
hasRequiredAttributes()622  bool hasRequiredAttributes() {
623     bool ret = libsbmlPINVOKE.EventAssignment_hasRequiredAttributes(swigCPtr);
624     return ret;
625   }
626 
627 
628 /**
629    * Predicate returning @c true if all the required elements for this
630    * EventAssignment object have been set.
631    *
632    * @note The required elements for an EventAssignment object are:
633    * @li 'math' in SBML Level&nbsp;2 and Level&nbsp;3 Version&nbsp;1.
634    *     (In SBML Level&nbsp;3 Version&nbsp;2+, it is no longer required.)
635    *
636    * @return a boolean value indicating whether all the required
637    * elements for this object have been defined.
638    */ public new
hasRequiredElements()639  bool hasRequiredElements() {
640     bool ret = libsbmlPINVOKE.EventAssignment_hasRequiredElements(swigCPtr);
641     return ret;
642   }
643 
644 
645 /**
646    * Returns the value of the 'variable' attribute of this EventAssignment (NOT the 'id').
647    *
648    * @note Because of the inconsistent behavior of this function with
649    * respect to assignments and rules, it is now recommended to
650    * use the getIdAttribute() or getVariable() instead.
651    *
652    * The 'variable' attribute of an EventAssignment indicates the element which
653    * the results of the 'math' are to be applied upon Event execution.
654    *
655    * @return the variable of this EventAssignment.
656    *
657    * @see getIdAttribute()
658    * @see setIdAttribute(string sid)
659    * @see isSetIdAttribute()
660    * @see unsetIdAttribute()
661    * @see getVariable()
662    */ public new
getId()663  string getId() {
664     string ret = libsbmlPINVOKE.EventAssignment_getId(swigCPtr);
665     return ret;
666   }
667 
668 
669 /**
670    *
671  * Replaces all uses of a given @c SIdRef type attribute value with another
672  * value.
673  *
674  *
675  *
676 
677  * In SBML, object identifiers are of a data type called <code>SId</code>.
678  * In SBML Level&nbsp;3, an explicit data type called <code>SIdRef</code> was
679  * introduced for attribute values that refer to <code>SId</code> values; in
680  * previous Levels of SBML, this data type did not exist and attributes were
681  * simply described to as 'referring to an identifier', but the effective
682  * data type was the same as <code>SIdRef</code> in Level&nbsp;3.  These and
683  * other methods of libSBML refer to the type <code>SIdRef</code> for all
684  * Levels of SBML, even if the corresponding SBML specification did not
685  * explicitly name the data type.
686  *
687  *
688  *
689  * This method works by looking at all attributes and (if appropriate)
690  * mathematical formulas in MathML content, comparing the referenced
691  * identifiers to the value of @p oldid.  If any matches are found, the
692  * matching values are replaced with @p newid.  The method does @em not
693  * descend into child elements.
694  *
695  * @param oldid the old identifier.
696  * @param newid the new identifier.
697  *
698  *
699    */ public new
renameSIdRefs(string oldid, string newid)700  void renameSIdRefs(string oldid, string newid) {
701     libsbmlPINVOKE.EventAssignment_renameSIdRefs(swigCPtr, oldid, newid);
702   }
703 
704 
705 /**
706    *
707  * Replaces all uses of a given @c UnitSIdRef type attribute value with
708  * another value.
709  *
710  *
711  *
712  * In SBML, unit definitions have identifiers of type <code>UnitSId</code>.  In
713  * SBML Level&nbsp;3, an explicit data type called <code>UnitSIdRef</code> was
714  * introduced for attribute values that refer to <code>UnitSId</code> values; in
715  * previous Levels of SBML, this data type did not exist and attributes were
716  * simply described to as 'referring to a unit identifier', but the effective
717  * data type was the same as <code>UnitSIdRef</code> in Level&nbsp;3.  These and
718  * other methods of libSBML refer to the type <code>UnitSIdRef</code> for all
719  * Levels of SBML, even if the corresponding SBML specification did not
720  * explicitly name the data type.
721  *
722  *
723  *
724  * This method works by looking at all unit identifier attribute values
725  * (including, if appropriate, inside mathematical formulas), comparing the
726  * referenced unit identifiers to the value of @p oldid.  If any matches
727  * are found, the matching values are replaced with @p newid.  The method
728  * does @em not descend into child elements.
729  *
730  * @param oldid the old identifier.
731  * @param newid the new identifier.
732  *
733  *
734    */ public new
renameUnitSIdRefs(string oldid, string newid)735  void renameUnitSIdRefs(string oldid, string newid) {
736     libsbmlPINVOKE.EventAssignment_renameUnitSIdRefs(swigCPtr, oldid, newid);
737   }
738 
739 
740 /** */ /* libsbml-internal */ public new
replaceSIDWithFunction(string id, ASTNode function)741  void replaceSIDWithFunction(string id, ASTNode function) {
742     libsbmlPINVOKE.EventAssignment_replaceSIDWithFunction(swigCPtr, id, ASTNode.getCPtr(function));
743   }
744 
745 
746 /** */ /* libsbml-internal */ public new
divideAssignmentsToSIdByFunction(string id, ASTNode function)747  void divideAssignmentsToSIdByFunction(string id, ASTNode function) {
748     libsbmlPINVOKE.EventAssignment_divideAssignmentsToSIdByFunction(swigCPtr, id, ASTNode.getCPtr(function));
749   }
750 
751 
752 /** */ /* libsbml-internal */ public new
multiplyAssignmentsToSIdByFunction(string id, ASTNode function)753  void multiplyAssignmentsToSIdByFunction(string id, ASTNode function) {
754     libsbmlPINVOKE.EventAssignment_multiplyAssignmentsToSIdByFunction(swigCPtr, id, ASTNode.getCPtr(function));
755   }
756 
757 }
758 
759 }
760