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 A discontinuous SBML <em>event</em>.
20  *
21  * An SBML Event object defines when the event can occur, the variables
22  * that are affected by it, how the variables are affected, and the event's
23  * relationship to other events.  The effect of the event can optionally be
24  * delayed after the occurrence of the condition which invokes it.
25  *
26  * The operation of Event is divided into two phases (even when the event
27  * is not delayed): one when the event is @em triggered, and the other when
28  * the event is @em executed.  Trigger objects define the conditions for
29  * triggering an event, Delay objects define when the event is actually
30  * executed, EventAssignment objects define the effects of executing the
31  * event, and (in SBML Level&nbsp;3) Priority objects influence the order
32  * of EventAssignment performance in cases of simultaneous events.  Please
33  * consult the descriptions of Trigger, Delay, EventAssignment and Priority
34  * for more information.
35  *
36  * @section event-version-diffs SBML Level/Version differences
37  *
38  * @subsection sbml-l2 SBML Level 2
39  *
40  * In SBML Level&nbsp;2 versions before Version&nbsp;4, the semantics of
41  * Event time delays were defined such that the expressions in the event's
42  * assignments were always evaluated at the time the event was
43  * <em>triggered</em>.  This definition made it difficult to define an event
44  * whose assignment formulas were meant to be evaluated at the time the
45  * event was <em>executed</em> (i.e., after the time period defined
46  * by the value of the Delay element, or after any other simultaneous
47  * event may have been <em>executed</em> and changed the model state).
48  * In SBML Level&nbsp;2 Version&nbsp;4 and in
49  * Level&nbsp;3, the attribute 'useValuesFromTriggerTime' on Event was added
50  * to allow a model to indicate the time at which the event's assignments
51  * are to be calculated, whether at the moment the event is triggered (if
52  * the value of the attribute is @c true), or at the moment of execution
53  * (if 'useValuesFromTriggerTime'=@c false).  If the event has a delay,
54  * the 'useValuesFromTriggerTime' is likely to make a significant difference
55  * in the values used in the assignment, but the possibility of simultaneous
56  * events mean that even zero-delay events can have different results
57  * depending on the value of this attribute.
58  *
59  * The definition of Event in SBML Level&nbsp;2 Versions 1 and 2 includes
60  * an additional attribute called 'timeUnits', which allowed the time units
61  * of the Delay to be set explicitly.  Later Versions of SBML Level&nbsp;2
62  * as well as SBML Level&nbsp;3 do not define this attribute.  LibSBML
63  * supports this attribute for compatibility with previous versions of SBML
64  * Level&nbsp;2; however, if a model in SBML Level&nbsp;3 or Level&nbsp;2
65  * Versions&nbsp;3&ndash;4 format sets the attribute, the
66  * consistency-checking method SBMLDocument::checkConsistency() will report
67  * an error.
68  *
69  * The attribute 'useValuesFromTriggerTime' was introduced in SBML
70  * Level&nbsp;2 Version&nbsp;4.  Models defined in prior Versions of SBML
71  * Level&nbsp;2 cannot use this attribute, and
72  * SBMLDocument::checkConsistency() will report an error if they do.
73  *
74  * @subsection sbml-l3 SBML Level 3
75  *
76  * SBML Level 3 introduces several changes to the structure and components
77  * of Events compared to SBML Level&nbsp;2.  These changes fall into two
78  * main categories: changes to what is optional or required, and additions
79  * of new attributes and elements.
80  * <ul>
81  * <li> The attribute 'useValuesFromTriggerTime' on Event is mandatory (it
82  * was optional in Level&nbsp;2 and had a default value of @c true);
83  * <li> Event's 'listOfEventAssignments' element (of class
84  * ListOfEventAssignments) is optional (it was mandatory in Level&nbsp;2);
85  * <li> Event's 'priority' element (of class Priority) is new in
86  * Level&nbsp;3; and
87  * <li> The Trigger object gains new mandatory attributes (described as part
88  * of the definition of Trigger).
89  * <li> In SBML Level&nbsp;3 Version&nbsp;2, the Trigger object became
90  * optional.  An Event with no Trigger will simply not fire.
91  * </ul>
92  *
93  * The changes to the attributes of Event are described below; the changes
94  * to Trigger and Priority are described in their respective sections.
95  *
96  * @section semantics Semantics of events in SBML Level&nbsp;3 Version&nbsp;1
97  *
98  * The detailed semantics of events are described in the specification
99  * documents for each SBML Level/Version.  Here we include the description
100  * from the SBML Level&nbsp;1 Version&nbsp;1.
101  * Any transition of a Trigger object's 'math' formula from the value
102  * @c false to @c true will cause the enclosing Event object to
103  * <em>trigger</em>.  Such a transition is not possible at the very start
104  * of a simulation (i.e., at time <em>t = 0</em>) unless the Trigger
105  * object's 'initialValue' attribute has a value of @c false; this defines
106  * the value of the trigger formula to be @c false immediately prior to the
107  * start of simulation, thereby giving it the potential to change in value
108  * from @c false to @c true when the formula is evaluated at <em>t =
109  * 0</em>.  If 'initialValue'=@c true, then the trigger expression cannot
110  * transition from @c false to @c true at <em>t = 0</em> but may do so at
111  * some time <em>t > 0</em>.
112  *
113  * Consider an Event object definition <EM>E</EM> with delay <em>d</em> in
114  * which the Trigger object's 'math' formula makes a transition in value
115  * from @c false to @c true at times <em>t<sub>1</sub></em> and
116  * <em>t<sub>2</sub></em>.  The EventAssignment within the Event object
117  * will have effect at <em>t<sub>1</sub> + d</em> and
118  * <em>t<sub>2</sub> + d</em> irrespective of the relative times of
119  * <em>t<sub>1</sub></em> and <em>t<sub>2</sub></em>.  For example, events
120  * can 'overlap' so that <em>t<sub>1</sub> < t<sub>2</sub> <
121  * t<sub>1</sub> + d</em> still causes an event assignments to occur at
122  * <em>t<sub>1</sub> + d</em> and <em>t<sub>2</sub> + d</em>.
123  *
124  * It is entirely possible for two events to be executed simultaneously,
125  * and it is possible for events to trigger other events (i.e., an event
126  * assignment can cause an event to trigger).  This leads to several
127  * points:
128  * <ul>
129  *
130  * <li> A software package should retest all event triggers after executing
131  * an event assignment in order to account for the possibility that the
132  * assignment causes another event trigger to transition from @c false to
133  * @c true.  This check should be made after each individual Event object's
134  * execution, even when several events are to be executed simultaneously.
135  *
136  * <li> Any Event object whose Trigger 'persistent' attribute has the value
137  * @c false must have its trigger expression reevaluated continuously
138  * between when the event is triggered and when it is executed.  If
139  * its trigger expression ever evaluates to @c false, it must be removed
140  * from the queue of events pending execution and treated as any other
141  * event whose trigger expression evaluates to @c false.
142  *
143  * <li> Although the precise time at which events are executed is not
144  * resolved beyond the given execution point in simulated time, it is
145  * assumed that the order in which the events occur <em>is</em> resolved.
146  * This order can be significant in determining the overall outcome of a
147  * given simulation.  When an event <EM>X</EM> <em>triggers</em> another
148  * event <EM>Y</EM> and event <EM>Y</EM> has zero delay, then event
149  * <EM>Y</EM> is added to the existing set of simultaneous events that are
150  * pending <em>execution</em>.  Events <EM>X</EM> and <EM>Y</EM> form a
151  * cascade of events at the same point in simulation time.  An event such
152  * as <EM>Y</EM> may have a special priority if it contains a Priority
153  * subobject.
154  *
155  * <li> All events in a model are open to being in a cascade.  The position
156  * of an event in the event queue does not affect whether it can be in the
157  * cascade: event <EM>Y</EM> can be triggered whether it is before or after
158  * <EM>X</EM> in the queue of events pending execution.  A cascade of
159  * events can be potentially infinite (never terminate); when this occurs a
160  * simulator should indicate this has occurred---it is incorrect for a
161  * simulator to break a cascade arbitrarily and continue the simulation
162  * without at least indicating that the infinite cascade occurred.
163  *
164  * <li> Simultaneous events having no defined priorities are executed in an
165  * undefined order.  This does not mean that the behavior of the simulation
166  * is completely undefined; merely that the <em>order</em> of execution of
167  * these particular events is undefined.  A given simulator may use any
168  * algorithm to choose an order as long as every event is executed exactly
169  * once.
170  *
171  * <li> Events with defined priorities are executed in the order implied by
172  * their Priority 'math' formula values, with events having higher
173  * priorities being executed ahead of events with lower priorities, and
174  * events with identical priorities being executed in a random order with
175  * respect to one another (as determined at run-time by some random
176  * algorithm equivalent to coin-flipping).  Newly-triggered events that are
177  * to be executed immediately (i.e., if they define no delays) should be
178  * inserted into the queue of events pending execution according to their
179  * priorities: events with higher priority values value must be inserted
180  * ahead of events with lower priority values and after any pending events
181  * with even higher priorities, and inserted randomly among pending events
182  * with the same priority values.  Events without Priority objects must be
183  * inserted into the queue in some fashion, but the algorithm used to place
184  * it in the queue is undefined.  Similarly, there is no restriction on the
185  * order of a newly-inserted event with a defined Priority with respect to
186  * any other pending Event without a defined Priority.
187  *
188  * <li> A model variable that is the target of one or more event
189  * assignments can change more than once when simultaneous events are
190  * processed at some time point <em>t</em>.  The model's behavior (output)
191  * for such a variable is the value of the variable at the end of
192  * processing all the simultaneous events at time <em>t</em>.
193  *
194  * </ul>
195  *
196  * @section l3v2_restrictions Restrictions relaxed in SBML Level&nbsp;3 Version&nbsp;2
197  *
198  * In SBML Level&nbsp;3 Version&nbsp;2, several restrictions were lifted
199  * that have the potential to affect the semantics of an Event:
200  *
201  * <ul>
202  * <li> The Trigger subobject of an Event is optional.  If missing,
203  * an Event is never @em triggered, unless an alternate triggering
204  * scheme is introduced by an SBML Level&nbsp;3 package.
205  *
206  * <li> The 'math' subelements of an Event Trigger, Delay, Priority,
207  * and EventAssignment are all optional.  If any of these elements lack
208  * a 'math' subelement, and that information is not supplied in an SBML
209  * Level&nbsp;3 package, it is mathematically equivalent to the Trigger,
210  * Delay, Priority, or EventAssignment not being present at all.
211  *
212  * <li> The ListOfEventAssignments may be empty, which is mathematically
213  * equivalent to the Event not having a ListOfEventAssignments at all.
214  *
215  * <li> Any 'math' subelement may return a Boolean or a numeric value
216  * in any context.  If a numeric value is used in a Boolean context,
217  * a '0' is interpreted as @c false, and all other values are
218  * interpreted as @c true.  If a Boolean value is used in a numeric
219  * context, a @c true is interpreted as a 1, and a @c false is
220  * interpreted as a 0.  This means (for example) that a Trigger value
221  * that changes from 0.0 to anything else is equivalent to changing
222  * from @c false to @c true.
223  * </ul>
224  *
225  * @see Trigger
226  * @see Priority
227  * @see Delay
228  * @see EventAssignment
229  *
230  *
231  *
232  */
233 
234 public class Event : SBase {
235 	private HandleRef swigCPtr;
236 
Event(IntPtr cPtr, bool cMemoryOwn)237 	internal Event(IntPtr cPtr, bool cMemoryOwn) : base(libsbmlPINVOKE.Event_SWIGUpcast(cPtr), cMemoryOwn)
238 	{
239 		//super(libsbmlPINVOKE.EventUpcast(cPtr), cMemoryOwn);
240 		swigCPtr = new HandleRef(this, cPtr);
241 	}
242 
getCPtr(Event obj)243 	internal static HandleRef getCPtr(Event obj)
244 	{
245 		return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
246 	}
247 
getCPtrAndDisown(Event obj)248 	internal static HandleRef getCPtrAndDisown (Event obj)
249 	{
250 		HandleRef ptr = new HandleRef(null, IntPtr.Zero);
251 
252 		if (obj != null)
253 		{
254 			ptr             = obj.swigCPtr;
255 			obj.swigCMemOwn = false;
256 		}
257 
258 		return ptr;
259 	}
260 
Dispose(bool disposing)261   protected override void Dispose(bool disposing) {
262     lock(this) {
263       if (swigCPtr.Handle != global::System.IntPtr.Zero) {
264         if (swigCMemOwn) {
265           swigCMemOwn = false;
266           libsbmlPINVOKE.delete_Event(swigCPtr);
267         }
268         swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
269       }
270       base.Dispose(disposing);
271     }
272   }
273 
274 
275 /**
276    * Creates a new Event using the given SBML @p level and @p version
277    * values.
278    *
279    * @param level a long integer, the SBML Level to assign to this Event.
280    *
281    * @param version a long integer, the SBML Version to assign to this
282    * Event.
283    *
284    *
285  * @throws SBMLConstructorException
286  * Thrown if the given @p level and @p version combination are invalid
287  * or if this object is incompatible with the given level and version.
288  *
289  *
290    *
291    *
292  * @note Attempting to add an object to an SBMLDocument having a different
293  * combination of SBML Level, Version and XML namespaces than the object
294  * itself will result in an error at the time a caller attempts to make the
295  * addition.  A parent object must have compatible Level, Version and XML
296  * namespaces.  (Strictly speaking, a parent may also have more XML
297  * namespaces than a child, but the reverse is not permitted.)  The
298  * restriction is necessary to ensure that an SBML model has a consistent
299  * overall structure.  This requires callers to manage their objects
300  * carefully, but the benefit is increased flexibility in how models can be
301  * created by permitting callers to create objects bottom-up if desired.  In
302  * situations where objects are not yet attached to parents (e.g.,
303  * SBMLDocument), knowledge of the intented SBML Level and Version help
304  * libSBML determine such things as whether it is valid to assign a
305  * particular value to an attribute.
306  *
307  *
308    */ public
Event(long level, long version)309  Event(long level, long version) : this(libsbmlPINVOKE.new_Event__SWIG_0(level, version), true) {
310     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
311   }
312 
313 
314 /**
315    * Creates a new Event using the given SBMLNamespaces object
316    * @p sbmlns.
317    *
318    *
319  *
320  * The SBMLNamespaces object encapsulates SBML Level/Version/namespaces
321  * information.  It is used to communicate the SBML Level, Version, and (in
322  * Level&nbsp;3) packages used in addition to SBML Level&nbsp;3 Core.  A
323  * common approach to using libSBML's SBMLNamespaces facilities is to create an
324  * SBMLNamespaces object somewhere in a program once, then hand that object
325  * as needed to object constructors that accept SBMLNamespaces as arguments.
326  *
327  *
328    *
329    * @param sbmlns an SBMLNamespaces object.
330    *
331    *
332  * @throws SBMLConstructorException
333  * Thrown if the given @p sbmlns is inconsistent or incompatible
334  * with this object.
335  *
336  *
337    *
338    *
339  * @note Attempting to add an object to an SBMLDocument having a different
340  * combination of SBML Level, Version and XML namespaces than the object
341  * itself will result in an error at the time a caller attempts to make the
342  * addition.  A parent object must have compatible Level, Version and XML
343  * namespaces.  (Strictly speaking, a parent may also have more XML
344  * namespaces than a child, but the reverse is not permitted.)  The
345  * restriction is necessary to ensure that an SBML model has a consistent
346  * overall structure.  This requires callers to manage their objects
347  * carefully, but the benefit is increased flexibility in how models can be
348  * created by permitting callers to create objects bottom-up if desired.  In
349  * situations where objects are not yet attached to parents (e.g.,
350  * SBMLDocument), knowledge of the intented SBML Level and Version help
351  * libSBML determine such things as whether it is valid to assign a
352  * particular value to an attribute.
353  *
354  *
355    */ public
Event(SBMLNamespaces sbmlns)356  Event(SBMLNamespaces sbmlns) : this(libsbmlPINVOKE.new_Event__SWIG_1(SBMLNamespaces.getCPtr(sbmlns)), true) {
357     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
358   }
359 
360 
361 /**
362    * Copy constructor; creates a copy of this Event.
363    *
364    * @param orig the object to copy.
365    */ public
Event(Event orig)366  Event(Event orig) : this(libsbmlPINVOKE.new_Event__SWIG_2(Event.getCPtr(orig)), true) {
367     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
368   }
369 
370 
371 /**
372    * Creates and returns a deep copy of this Event object.
373    *
374    * @return the (deep) copy of this Event object.
375    */ public new
clone()376  Event clone() {
377     global::System.IntPtr cPtr = libsbmlPINVOKE.Event_clone(swigCPtr);
378     Event ret = (cPtr == global::System.IntPtr.Zero) ? null : new Event(cPtr, true);
379     return ret;
380   }
381 
382 
383 /**
384    * Initializes the fields of this Event object to 'typical' default
385    * values.
386    *
387    * The SBML Event component has slightly different aspects and
388    * default attribute values in different SBML Levels and Versions.
389    * This method sets the values to certain common defaults, based
390    * mostly on what they are in SBML Level&nbsp;2.  Specifically:
391    *
392    * @li Sets attribute 'useValuesFromTriggerTime' to @c true
393    */ public
initDefaults()394  void initDefaults() {
395     libsbmlPINVOKE.Event_initDefaults(swigCPtr);
396   }
397 
398 
399 /**
400    * Returns the first child element found that has the given @p id in the
401    * model-wide SId namespace, or @c null if no such object is found.
402    *
403    * @param id string representing the id of the object to find.
404    *
405    * @return pointer to the first element found with the given @p id.
406    */ public new
getElementBySId(string id)407  SBase getElementBySId(string id) {
408 	SBase ret = (SBase) libsbml.DowncastSBase(libsbmlPINVOKE.Event_getElementBySId(swigCPtr, id), false);
409 	return ret;
410 }
411 
412 
413 /**
414    * Returns the first child element it can find with the given @p metaid, or
415    * @c null if no such object is found.
416    *
417    * @param metaid string representing the metaid of the object to find.
418    *
419    * @return pointer to the first element found with the given @p metaid.
420    */ public new
getElementByMetaId(string metaid)421  SBase getElementByMetaId(string metaid) {
422 	SBase ret = (SBase) libsbml.DowncastSBase(libsbmlPINVOKE.Event_getElementByMetaId(swigCPtr, metaid), false);
423 	return ret;
424 }
425 
426 
427 /**
428    * Returns the value of the 'id' attribute of this Event.
429    *
430    * @note Because of the inconsistent behavior of this function with
431    * respect to assignments and rules, it is now recommended to
432    * use the getIdAttribute() function instead.
433    *
434    *
435  *
436  * The identifier given by an object's 'id' attribute value
437  * is used to identify the object within the SBML model definition.
438  * Other objects can refer to the component using this identifier.  The
439  * data type of 'id' is always <code>SId</code> or a type derived
440  * from that, such as <code>UnitSId</code>, depending on the object in
441  * question.  All data types are defined as follows:
442  * <pre style='margin-left: 2em; border: none; font-weight: bold; color: black'>
443  *   letter ::= 'a'..'z','A'..'Z'
444  *   digit  ::= '0'..'9'
445  *   idChar ::= letter | digit | '_'
446  *   SId    ::= ( letter | '_' ) idChar*
447  * </pre>
448  * The characters <code>(</code> and <code>)</code> are used for grouping,
449  * the character <code>*</code> 'zero or more times', and the character
450  * <code>|</code> indicates logical 'or'.  The equality of SBML identifiers
451  * is determined by an exact character sequence match; i.e., comparisons must
452  * be performed in a case-sensitive manner.  This applies to all uses of
453  * <code>SId</code>, <code>SIdRef</code>, and derived types.
454  *
455  * Users need to be aware of some important API issues that are the result of
456  * the history of SBML and libSBML.  Prior to SBML Level&nbsp;3
457  * Version&nbsp;2, SBML defined 'id' and 'name' attributes on only a subset
458  * of SBML objects.  To simplify the work of programmers, libSBML's API
459  * provided get, set, check, and unset on the SBase object class itself
460  * instead of on individual subobject classes. This made the
461  * get/set/etc. methods uniformly available on all objects in the libSBML
462  * API.  LibSBML simply returned empty strings or otherwise did not act when
463  * the methods were applied to SBML objects that were not defined by the SBML
464  * specification to have 'id' or 'name' attributes.  Additional complications
465  * arose with the rule and assignment objects: InitialAssignment,
466  * EventAssignment, AssignmentRule, and RateRule.  In early versions of SBML,
467  * the rule object hierarchy was different, and in addition, then as now,
468  * they possess different attributes: 'variable' (for the rules and event
469  * assignments), 'symbol' (for initial assignments), or neither (for
470  * algebraic rules).  Prior to SBML Level&nbsp;3 Version&nbsp;2, getId()
471  * would always return an empty string, and isSetId() would always return @c
472  * false for objects of these classes.
473  *
474  * With the addition of 'id' and 'name' attributes on SBase in Level&nbsp;3
475  * Version&nbsp;2, it became necessary to introduce a new way to interact
476  * with the attributes more consistently in libSBML to avoid breaking
477  * backward compatibility in the behavior of the original 'id' methods.  For
478  * this reason, libSBML provides four functions (getIdAttribute(),
479  * setIdAttribute(@if java String@endif), isSetIdAttribute(), and
480  * unsetIdAttribute()) that always act on the actual 'id' attribute inherited
481  * from SBase, regardless of the object's type.  <strong>These new methods
482  * should be used instead of the older getId()/setId()/etc. methods</strong>
483  * unless the old behavior is somehow necessary.  Regardless of the Level and
484  * Version of the SBML, these functions allow client applications to use more
485  * generalized code in some situations (for instance, when manipulating
486  * objects that are all known to have identifiers).  If the object in
487  * question does not posess an 'id' attribute according to the SBML
488  * specification for the Level and Version in use, libSBML will not allow the
489  * identifier to be set, nor will it read or write 'id' attributes for those
490  * objects.
491  *
492  *
493    *
494    * @return the id of this Event.
495    *
496    * @see getIdAttribute()
497    * @see setIdAttribute(string sid)
498    * @see isSetIdAttribute()
499    * @see unsetIdAttribute()
500    */ public new
getId()501  string getId() {
502     string ret = libsbmlPINVOKE.Event_getId(swigCPtr);
503     return ret;
504   }
505 
506 
507 /**
508    * Returns the value of the 'name' attribute of this Event.
509    *
510    *
511  *
512  *
513  * In SBML Level&nbsp;3 Version&nbsp;2, the 'id' and 'name' attributes were
514  * moved to SBase directly, instead of being defined individually for many
515  * (but not all) objects.  LibSBML has for a long time provided functions
516  * defined on SBase itself to get, set, and unset those attributes, which
517  * would fail or otherwise return empty strings if executed on any object
518  * for which those attributes were not defined.  Now that all SBase objects
519  * define those attributes, those functions now succeed for any object with
520  * the appropriate level and version.
521  *
522  * The 'name' attribute is
523  * optional and is not intended to be used for cross-referencing purposes
524  * within a model.  Its purpose instead is to provide a human-readable
525  * label for the component.  The data type of 'name' is the type
526  * <code>string</code> defined in XML Schema.  SBML imposes no
527  * restrictions as to the content of 'name' attributes beyond those
528  * restrictions defined by the <code>string</code> type in XML Schema.
529  *
530  * The recommended practice for handling 'name' is as follows.  If a
531  * software tool has the capability for displaying the content of 'name'
532  * attributes, it should display this content to the user as a
533  * component's label instead of the component's 'id'.  If the user
534  * interface does not have this capability (e.g., because it cannot
535  * display or use special characters in symbol names), or if the 'name'
536  * attribute is missing on a given component, then the user interface
537  * should display the value of the 'id' attribute instead.  (Script
538  * language interpreters are especially likely to display 'id' instead of
539  * 'name'.)
540  *
541  * As a consequence of the above, authors of systems that automatically
542  * generate the values of 'id' attributes should be aware some systems
543  * may display the 'id''s to the user.  Authors therefore may wish to
544  * take some care to have their software create 'id' values that are: (a)
545  * reasonably easy for humans to type and read; and (b) likely to be
546  * meaningful, for example by making the 'id' attribute be an abbreviated
547  * form of the name attribute value.
548  *
549  * An additional point worth mentioning is although there are
550  * restrictions on the uniqueness of 'id' values, there are no
551  * restrictions on the uniqueness of 'name' values in a model.  This
552  * allows software applications leeway in assigning component identifiers.
553  *
554  * Regardless of the level and version of the SBML, these functions allow
555  * client applications to use more generalized code in some situations
556  * (for instance, when manipulating objects that are all known to have
557  * names).  If the object in question does not posess a 'name' attribute
558  * according to the SBML specification for the Level and Version in use,
559  * libSBML will not allow the name to be set, nor will it read or
560  * write 'name' attributes for those objects.
561  *
562  *
563  *
564  * @return the name of this SBML object, or the empty string if not set or unsettable.
565  *
566  * @see getIdAttribute()
567  * @see isSetName()
568  * @see setName(string sid)
569  * @see unsetName()
570  *
571  *
572    */ public new
getName()573  string getName() {
574     string ret = libsbmlPINVOKE.Event_getName(swigCPtr);
575     return ret;
576   }
577 
578 
579 /**
580    * Get the event trigger portion of this Event.
581    *
582    * @return the Trigger object of this Event, or @c null if the trigger is not set.
583    */ public
getTrigger()584  Trigger getTrigger() {
585     global::System.IntPtr cPtr = libsbmlPINVOKE.Event_getTrigger__SWIG_0(swigCPtr);
586     Trigger ret = (cPtr == global::System.IntPtr.Zero) ? null : new Trigger(cPtr, false);
587     return ret;
588   }
589 
590 
591 /**
592    * Get the assignment delay portion of this Event, if there is one.
593    *
594    * @return the delay of this Event if one is defined, or @c null if none
595    * is defined.
596    */ public
getDelay()597  Delay getDelay() {
598     global::System.IntPtr cPtr = libsbmlPINVOKE.Event_getDelay__SWIG_0(swigCPtr);
599     Delay ret = (cPtr == global::System.IntPtr.Zero) ? null : new Delay(cPtr, false);
600     return ret;
601   }
602 
603 
604 /**
605    * (SBML Level&nbsp;3 only) Get the event priority portion of this
606    * Event.
607    *
608    * @return the Priority object of this Event, or @c null if the Priority
609    * has not been set.
610    *
611    * @note The element 'priority' is available in SBML Level&nbsp;3,
612    * but is not present in lower Levels of SBML.
613    */ public
getPriority()614  Priority getPriority() {
615     global::System.IntPtr cPtr = libsbmlPINVOKE.Event_getPriority__SWIG_0(swigCPtr);
616     Priority ret = (cPtr == global::System.IntPtr.Zero) ? null : new Priority(cPtr, false);
617     return ret;
618   }
619 
620 
621 /**
622    * Get the value of the 'timeUnits' attribute of this Event, if it has one.
623    *
624    * @return the value of the attribute 'timeUnits' as a string.
625    *
626    *
627  * @warning <span class='warning'>Definitions of Event in SBML Level 2
628  * Versions&nbsp;1 and&nbsp;2 included the additional attribute called
629  * 'timeUnits', but it was removed in SBML Level&nbsp;2 Version&nbsp;3.
630  * LibSBML supports this attribute for compatibility with previous versions
631  * of SBML Level&nbsp;2, but its use is discouraged since models in
632  * Level&nbsp;2 Versions&nbsp;3 and&nbsp;4 cannot contain it.  If a
633  * Version&nbsp;3 or&nbsp;4 model sets the attribute, the
634  * consistency-checking method SBMLDocument::checkConsistency() will report
635  * an error.</span>
636  *
637    */ public
getTimeUnits()638  string getTimeUnits() {
639     string ret = libsbmlPINVOKE.Event_getTimeUnits(swigCPtr);
640     return ret;
641   }
642 
643 
644 /**
645    * Get the value of the 'useValuesFromTriggerTime' attribute of this Event.
646    *
647    *
648  *
649  * The optional Delay on Event and the fact that multiple events may be
650  * simultaneously executed means there are two times to consider when
651  * computing the results of an event: the time at which the event is
652  * <em>triggered</em>, and the time at which assignments are
653  * <em>executed</em>.  It is also possible to distinguish between the
654  * time at which the EventAssignment's expression is calculated, and the
655  * time at which the assignment is made: the expression could be
656  * evaluated at the same time the assignments are performed, i.e., when
657  * the event is <em>executed</em>, but it could also be defined to be
658  * evaluated at the time the event is <em>triggered</em>.
659  *
660  * In SBML Level&nbsp;2 versions prior to Version&nbsp;4, the semantics
661  * of Event time delays were defined such that the expressions in the
662  * event's assignments were always evaluated at the time the event was
663  * <em>triggered</em>.  This definition made it difficult to define an
664  * event whose assignment formulas were meant to be evaluated at the time
665  * the event was <em>executed</em> (i.e., after the time period defined
666  * by the value of the Delay element, or after any other simultaneous
667  * event may have been <em>executed</em> and changed the model state).
668  * In SBML Level&nbsp;2
669  * Version&nbsp;4, the attribute 'useValuesFromTriggerTime' on Event
670  * allows a model to indicate the time at which the event's assignments
671  * are intended to be evaluated.  In SBML Level&nbsp;2, the attribute has
672  * a default value of @c true, which corresponds to the interpretation of
673  * event assignments prior to Version&nbsp;4: the values of the
674  * assignment formulas are computed at the moment the event is triggered,
675  * not after the delay.  If 'useValuesFromTriggerTime'=@c false, it means
676  * that the formulas in the event's assignments are to be computed after
677  * the delay, at the time the event is executed.  In SBML Level&nbsp;3,
678  * the attribute is mandatory, not optional, and all events must specify
679  * a value for it.
680  *
681    *
682    * @return the value of the attribute 'useValuesFromTriggerTime' as a boolean.
683    *
684    *
685  * @warning <span class='warning'>The attribute 'useValuesFromTriggerTime'
686  * was introduced in SBML Level&nbsp;2 Version&nbsp;4.  It is not valid in
687  * models defined using SBML Level&nbsp;2 versions prior to Version&nbsp;4.
688  * If a Level&nbsp;2 Version&nbsp;1&ndash;3 model sets the attribute, the
689  * consistency-checking method SBMLDocument::checkConsistency() will report
690  * an error.</span>
691  *
692    */ public
getUseValuesFromTriggerTime()693  bool getUseValuesFromTriggerTime() {
694     bool ret = libsbmlPINVOKE.Event_getUseValuesFromTriggerTime(swigCPtr);
695     return ret;
696   }
697 
698 
699 /**
700    * Predicate returning @c true if this
701    * Event's 'id' attribute is set.
702    *
703    *
704  *
705  *
706  * The identifier given by an object's 'id' attribute value
707  * is used to identify the object within the SBML model definition.
708  * Other objects can refer to the component using this identifier.  The
709  * data type of 'id' is always <code>SId</code> or a type derived
710  * from that, such as <code>UnitSId</code>, depending on the object in
711  * question.  All data types are defined as follows:
712  * <pre style='margin-left: 2em; border: none; font-weight: bold; color: black'>
713  *   letter ::= 'a'..'z','A'..'Z'
714  *   digit  ::= '0'..'9'
715  *   idChar ::= letter | digit | '_'
716  *   SId    ::= ( letter | '_' ) idChar*
717  * </pre>
718  * The characters <code>(</code> and <code>)</code> are used for grouping,
719  * the character <code>*</code> 'zero or more times', and the character
720  * <code>|</code> indicates logical 'or'.  The equality of SBML identifiers
721  * is determined by an exact character sequence match; i.e., comparisons must
722  * be performed in a case-sensitive manner.  This applies to all uses of
723  * <code>SId</code>, <code>SIdRef</code>, and derived types.
724  *
725  * Users need to be aware of some important API issues that are the result of
726  * the history of SBML and libSBML.  Prior to SBML Level&nbsp;3
727  * Version&nbsp;2, SBML defined 'id' and 'name' attributes on only a subset
728  * of SBML objects.  To simplify the work of programmers, libSBML's API
729  * provided get, set, check, and unset on the SBase object class itself
730  * instead of on individual subobject classes. This made the
731  * get/set/etc. methods uniformly available on all objects in the libSBML
732  * API.  LibSBML simply returned empty strings or otherwise did not act when
733  * the methods were applied to SBML objects that were not defined by the SBML
734  * specification to have 'id' or 'name' attributes.  Additional complications
735  * arose with the rule and assignment objects: InitialAssignment,
736  * EventAssignment, AssignmentRule, and RateRule.  In early versions of SBML,
737  * the rule object hierarchy was different, and in addition, then as now,
738  * they possess different attributes: 'variable' (for the rules and event
739  * assignments), 'symbol' (for initial assignments), or neither (for
740  * algebraic rules).  Prior to SBML Level&nbsp;3 Version&nbsp;2, getId()
741  * would always return an empty string, and isSetId() would always return @c
742  * false for objects of these classes.
743  *
744  * With the addition of 'id' and 'name' attributes on SBase in Level&nbsp;3
745  * Version&nbsp;2, it became necessary to introduce a new way to interact
746  * with the attributes more consistently in libSBML to avoid breaking
747  * backward compatibility in the behavior of the original 'id' methods.  For
748  * this reason, libSBML provides four functions (getIdAttribute(),
749  * setIdAttribute(@if java String@endif), isSetIdAttribute(), and
750  * unsetIdAttribute()) that always act on the actual 'id' attribute inherited
751  * from SBase, regardless of the object's type.  <strong>These new methods
752  * should be used instead of the older getId()/setId()/etc. methods</strong>
753  * unless the old behavior is somehow necessary.  Regardless of the Level and
754  * Version of the SBML, these functions allow client applications to use more
755  * generalized code in some situations (for instance, when manipulating
756  * objects that are all known to have identifiers).  If the object in
757  * question does not posess an 'id' attribute according to the SBML
758  * specification for the Level and Version in use, libSBML will not allow the
759  * identifier to be set, nor will it read or write 'id' attributes for those
760  * objects.
761  *
762  *
763  *
764  * @return @c true if the 'id' attribute of this SBML object is
765  * set, @c false otherwise.
766  *
767  * @note Because of the inconsistent behavior of this function with
768  * respect to assignments and rules, it is recommended that callers
769  * use isSetIdAttribute() instead.
770  *
771  * @see getIdAttribute()
772  * @see setIdAttribute(string sid)
773  * @see unsetIdAttribute()
774  * @see isSetIdAttribute()
775  *
776  *
777    */ public new
isSetId()778  bool isSetId() {
779     bool ret = libsbmlPINVOKE.Event_isSetId(swigCPtr);
780     return ret;
781   }
782 
783 
784 /**
785    * Predicate returning @c true if this
786    * Event's 'name' attribute is set.
787    *
788    *
789  *
790  *
791  * In SBML Level&nbsp;3 Version&nbsp;2, the 'id' and 'name' attributes were
792  * moved to SBase directly, instead of being defined individually for many
793  * (but not all) objects.  LibSBML has for a long time provided functions
794  * defined on SBase itself to get, set, and unset those attributes, which
795  * would fail or otherwise return empty strings if executed on any object
796  * for which those attributes were not defined.  Now that all SBase objects
797  * define those attributes, those functions now succeed for any object with
798  * the appropriate level and version.
799  *
800  * The 'name' attribute is
801  * optional and is not intended to be used for cross-referencing purposes
802  * within a model.  Its purpose instead is to provide a human-readable
803  * label for the component.  The data type of 'name' is the type
804  * <code>string</code> defined in XML Schema.  SBML imposes no
805  * restrictions as to the content of 'name' attributes beyond those
806  * restrictions defined by the <code>string</code> type in XML Schema.
807  *
808  * The recommended practice for handling 'name' is as follows.  If a
809  * software tool has the capability for displaying the content of 'name'
810  * attributes, it should display this content to the user as a
811  * component's label instead of the component's 'id'.  If the user
812  * interface does not have this capability (e.g., because it cannot
813  * display or use special characters in symbol names), or if the 'name'
814  * attribute is missing on a given component, then the user interface
815  * should display the value of the 'id' attribute instead.  (Script
816  * language interpreters are especially likely to display 'id' instead of
817  * 'name'.)
818  *
819  * As a consequence of the above, authors of systems that automatically
820  * generate the values of 'id' attributes should be aware some systems
821  * may display the 'id''s to the user.  Authors therefore may wish to
822  * take some care to have their software create 'id' values that are: (a)
823  * reasonably easy for humans to type and read; and (b) likely to be
824  * meaningful, for example by making the 'id' attribute be an abbreviated
825  * form of the name attribute value.
826  *
827  * An additional point worth mentioning is although there are
828  * restrictions on the uniqueness of 'id' values, there are no
829  * restrictions on the uniqueness of 'name' values in a model.  This
830  * allows software applications leeway in assigning component identifiers.
831  *
832  * Regardless of the level and version of the SBML, these functions allow
833  * client applications to use more generalized code in some situations
834  * (for instance, when manipulating objects that are all known to have
835  * names).  If the object in question does not posess a 'name' attribute
836  * according to the SBML specification for the Level and Version in use,
837  * libSBML will not allow the name to be set, nor will it read or
838  * write 'name' attributes for those objects.
839  *
840  *
841  *
842  * @return @c true if the 'name' attribute of this SBML object is
843  * set, @c false otherwise.
844  *
845  * @see getName()
846  * @see setName(string sid)
847  * @see unsetName()
848  *
849  *
850    */ public new
isSetName()851  bool isSetName() {
852     bool ret = libsbmlPINVOKE.Event_isSetName(swigCPtr);
853     return ret;
854   }
855 
856 
857 /**
858    * Predicate for testing whether the trigger for this Event is set.
859    *
860    * @return @c true if the trigger of this Event is set, @c false
861    * otherwise.
862    */ public
isSetTrigger()863  bool isSetTrigger() {
864     bool ret = libsbmlPINVOKE.Event_isSetTrigger(swigCPtr);
865     return ret;
866   }
867 
868 
869 /**
870    * Predicate for testing whether the delay for this Event is set.
871    *
872    * @return @c true if the delay of this Event is set, @c false
873    * otherwise.
874    */ public
isSetDelay()875  bool isSetDelay() {
876     bool ret = libsbmlPINVOKE.Event_isSetDelay(swigCPtr);
877     return ret;
878   }
879 
880 
881 /**
882    * (SBML Level&nbsp;3 only) Predicate for testing whether the priority
883    * for this Event is set.
884    *
885    * @return @c true if the priority of this Event is set, @c false
886    * otherwise.
887    *
888    * @note The element 'priority' is available in SBML Level&nbsp;3,
889    * but is not present in lower Levels of SBML.
890    */ public
isSetPriority()891  bool isSetPriority() {
892     bool ret = libsbmlPINVOKE.Event_isSetPriority(swigCPtr);
893     return ret;
894   }
895 
896 
897 /**
898    * Predicate for testing whether the 'timeUnits' attribute of this Event
899    * is set.
900    *
901    * @return @c true if the 'timeUnits' attribute of this Event is
902    * set, @c false otherwise.
903    *
904    *
905  * @warning <span class='warning'>Definitions of Event in SBML Level 2
906  * Versions&nbsp;1 and&nbsp;2 included the additional attribute called
907  * 'timeUnits', but it was removed in SBML Level&nbsp;2 Version&nbsp;3.
908  * LibSBML supports this attribute for compatibility with previous versions
909  * of SBML Level&nbsp;2, but its use is discouraged since models in
910  * Level&nbsp;2 Versions&nbsp;3 and&nbsp;4 cannot contain it.  If a
911  * Version&nbsp;3 or&nbsp;4 model sets the attribute, the
912  * consistency-checking method SBMLDocument::checkConsistency() will report
913  * an error.</span>
914  *
915    */ public
isSetTimeUnits()916  bool isSetTimeUnits() {
917     bool ret = libsbmlPINVOKE.Event_isSetTimeUnits(swigCPtr);
918     return ret;
919   }
920 
921 
922 /**
923    * Predicate for testing whether the 'useValuesFromTriggerTime' attribute of this Event
924    * is set.
925    *
926    * @return @c true if the 'useValuesFromTriggerTime' attribute of this Event is
927    * set, @c false otherwise.
928    *
929    * @note In SBML Level&nbsp;2, this attribute is optional and has a default value of
930    * @c true, whereas in Level&nbsp;3, this optional is mandatory and
931    * has no default value.
932    */ public
isSetUseValuesFromTriggerTime()933  bool isSetUseValuesFromTriggerTime() {
934     bool ret = libsbmlPINVOKE.Event_isSetUseValuesFromTriggerTime(swigCPtr);
935     return ret;
936   }
937 
938 
939 /**
940    * Sets the value of the 'id' attribute of this Event.
941    *
942    *
943  *
944  * The string @p sid is copied.
945  *
946  *
947  *
948  * The identifier given by an object's 'id' attribute value
949  * is used to identify the object within the SBML model definition.
950  * Other objects can refer to the component using this identifier.  The
951  * data type of 'id' is always <code>SId</code> or a type derived
952  * from that, such as <code>UnitSId</code>, depending on the object in
953  * question.  All data types are defined as follows:
954  * <pre style='margin-left: 2em; border: none; font-weight: bold; color: black'>
955  *   letter ::= 'a'..'z','A'..'Z'
956  *   digit  ::= '0'..'9'
957  *   idChar ::= letter | digit | '_'
958  *   SId    ::= ( letter | '_' ) idChar*
959  * </pre>
960  * The characters <code>(</code> and <code>)</code> are used for grouping,
961  * the character <code>*</code> 'zero or more times', and the character
962  * <code>|</code> indicates logical 'or'.  The equality of SBML identifiers
963  * is determined by an exact character sequence match; i.e., comparisons must
964  * be performed in a case-sensitive manner.  This applies to all uses of
965  * <code>SId</code>, <code>SIdRef</code>, and derived types.
966  *
967  * Users need to be aware of some important API issues that are the result of
968  * the history of SBML and libSBML.  Prior to SBML Level&nbsp;3
969  * Version&nbsp;2, SBML defined 'id' and 'name' attributes on only a subset
970  * of SBML objects.  To simplify the work of programmers, libSBML's API
971  * provided get, set, check, and unset on the SBase object class itself
972  * instead of on individual subobject classes. This made the
973  * get/set/etc. methods uniformly available on all objects in the libSBML
974  * API.  LibSBML simply returned empty strings or otherwise did not act when
975  * the methods were applied to SBML objects that were not defined by the SBML
976  * specification to have 'id' or 'name' attributes.  Additional complications
977  * arose with the rule and assignment objects: InitialAssignment,
978  * EventAssignment, AssignmentRule, and RateRule.  In early versions of SBML,
979  * the rule object hierarchy was different, and in addition, then as now,
980  * they possess different attributes: 'variable' (for the rules and event
981  * assignments), 'symbol' (for initial assignments), or neither (for
982  * algebraic rules).  Prior to SBML Level&nbsp;3 Version&nbsp;2, getId()
983  * would always return an empty string, and isSetId() would always return @c
984  * false for objects of these classes.
985  *
986  * With the addition of 'id' and 'name' attributes on SBase in Level&nbsp;3
987  * Version&nbsp;2, it became necessary to introduce a new way to interact
988  * with the attributes more consistently in libSBML to avoid breaking
989  * backward compatibility in the behavior of the original 'id' methods.  For
990  * this reason, libSBML provides four functions (getIdAttribute(),
991  * setIdAttribute(@if java String@endif), isSetIdAttribute(), and
992  * unsetIdAttribute()) that always act on the actual 'id' attribute inherited
993  * from SBase, regardless of the object's type.  <strong>These new methods
994  * should be used instead of the older getId()/setId()/etc. methods</strong>
995  * unless the old behavior is somehow necessary.  Regardless of the Level and
996  * Version of the SBML, these functions allow client applications to use more
997  * generalized code in some situations (for instance, when manipulating
998  * objects that are all known to have identifiers).  If the object in
999  * question does not posess an 'id' attribute according to the SBML
1000  * specification for the Level and Version in use, libSBML will not allow the
1001  * identifier to be set, nor will it read or write 'id' attributes for those
1002  * objects.
1003  *
1004  *
1005  *
1006  * @param sid the string to use as the identifier of this object.
1007  *
1008  *
1009  * @return integer value indicating success/failure of the
1010  * function.  @if clike The value is drawn from the
1011  * enumeration #OperationReturnValues_t. @endif The possible values
1012  * returned by this function are:
1013  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
1014  * @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
1015  * @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
1016  *
1017  * @see getIdAttribute()
1018  * @see setIdAttribute(string sid)
1019  * @see isSetIdAttribute()
1020  * @see unsetIdAttribute()
1021  *
1022  *
1023    */ public new
setId(string sid)1024  int setId(string sid) {
1025     int ret = libsbmlPINVOKE.Event_setId(swigCPtr, sid);
1026     return ret;
1027   }
1028 
1029 
1030 /**
1031    * Sets the value of the 'name' attribute of this Event.
1032    *
1033    *
1034    *
1035  *
1036  *
1037  * The string in @p name is copied.
1038  *
1039  * @param name the new name for the SBML object.
1040  *
1041  *
1042  * @return integer value indicating success/failure of the
1043  * function.  @if clike The value is drawn from the
1044  * enumeration #OperationReturnValues_t. @endif The possible values
1045  * returned by this function are:
1046  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
1047  * @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
1048  *
1049  *
1050    */ public new
setName(string name)1051  int setName(string name) {
1052     int ret = libsbmlPINVOKE.Event_setName(swigCPtr, name);
1053     return ret;
1054   }
1055 
1056 
1057 /**
1058    * Sets the trigger definition of this Event to a copy of the given
1059    * Trigger object instance.
1060    *
1061    * @param trigger the Trigger object instance to use.
1062    *
1063    *
1064  * @return integer value indicating success/failure of the
1065  * function.  @if clike The value is drawn from the
1066  * enumeration #OperationReturnValues_t. @endif The possible values
1067  * returned by this function are:
1068  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
1069    * @li @link libsbml#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH@endlink
1070    * @li @link libsbml#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH@endlink
1071    */ public
setTrigger(Trigger trigger)1072  int setTrigger(Trigger trigger) {
1073     int ret = libsbmlPINVOKE.Event_setTrigger(swigCPtr, Trigger.getCPtr(trigger));
1074     return ret;
1075   }
1076 
1077 
1078 /**
1079    * Sets the delay definition of this Event to a copy of the given Delay
1080    * object instance.
1081    *
1082    * @param delay the Delay object instance to use.
1083    *
1084    *
1085  * @return integer value indicating success/failure of the
1086  * function.  @if clike The value is drawn from the
1087  * enumeration #OperationReturnValues_t. @endif The possible values
1088  * returned by this function are:
1089  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
1090    * @li @link libsbml#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH@endlink
1091    * @li @link libsbml#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH@endlink
1092    */ public
setDelay(Delay delay)1093  int setDelay(Delay delay) {
1094     int ret = libsbmlPINVOKE.Event_setDelay(swigCPtr, Delay.getCPtr(delay));
1095     return ret;
1096   }
1097 
1098 
1099 /**
1100    * (SBML Level&nbsp;3 only) Sets the priority definition of this Event
1101    * to a copy of the given Priority object instance.
1102    *
1103    * @param priority the Priority object instance to use.
1104    *
1105    *
1106  * @return integer value indicating success/failure of the
1107  * function.  @if clike The value is drawn from the
1108  * enumeration #OperationReturnValues_t. @endif The possible values
1109  * returned by this function are:
1110  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
1111    * @li @link libsbml#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH@endlink
1112    * @li @link libsbml#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH@endlink
1113    * @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
1114    *
1115    * @note The element 'priority' is available in SBML Level&nbsp;3,
1116    * but is not present in lower Levels of SBML.
1117    */ public
setPriority(Priority priority)1118  int setPriority(Priority priority) {
1119     int ret = libsbmlPINVOKE.Event_setPriority(swigCPtr, Priority.getCPtr(priority));
1120     return ret;
1121   }
1122 
1123 
1124 /**
1125    * Sets the 'timeUnits' attribute of this Event to a copy of @p sid.
1126    *
1127    * @param sid the identifier of the time units to use.
1128    *
1129    *
1130  * @return integer value indicating success/failure of the
1131  * function.  @if clike The value is drawn from the
1132  * enumeration #OperationReturnValues_t. @endif The possible values
1133  * returned by this function are:
1134  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
1135    * @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink
1136    * @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
1137    *
1138    *
1139  * @warning <span class='warning'>Definitions of Event in SBML Level 2
1140  * Versions&nbsp;1 and&nbsp;2 included the additional attribute called
1141  * 'timeUnits', but it was removed in SBML Level&nbsp;2 Version&nbsp;3.
1142  * LibSBML supports this attribute for compatibility with previous versions
1143  * of SBML Level&nbsp;2, but its use is discouraged since models in
1144  * Level&nbsp;2 Versions&nbsp;3 and&nbsp;4 cannot contain it.  If a
1145  * Version&nbsp;3 or&nbsp;4 model sets the attribute, the
1146  * consistency-checking method SBMLDocument::checkConsistency() will report
1147  * an error.</span>
1148  *
1149    *
1150    */ public
setTimeUnits(string sid)1151  int setTimeUnits(string sid) {
1152     int ret = libsbmlPINVOKE.Event_setTimeUnits(swigCPtr, sid);
1153     return ret;
1154   }
1155 
1156 
1157 /**
1158    * Sets the 'useValuesFromTriggerTime' attribute of this Event to a @p value.
1159    *
1160    *
1161  *
1162  * The optional Delay on Event and the fact that multiple events may be
1163  * simultaneously executed means there are two times to consider when
1164  * computing the results of an event: the time at which the event is
1165  * <em>triggered</em>, and the time at which assignments are
1166  * <em>executed</em>.  It is also possible to distinguish between the
1167  * time at which the EventAssignment's expression is calculated, and the
1168  * time at which the assignment is made: the expression could be
1169  * evaluated at the same time the assignments are performed, i.e., when
1170  * the event is <em>executed</em>, but it could also be defined to be
1171  * evaluated at the time the event is <em>triggered</em>.
1172  *
1173  * In SBML Level&nbsp;2 versions prior to Version&nbsp;4, the semantics
1174  * of Event time delays were defined such that the expressions in the
1175  * event's assignments were always evaluated at the time the event was
1176  * <em>triggered</em>.  This definition made it difficult to define an
1177  * event whose assignment formulas were meant to be evaluated at the time
1178  * the event was <em>executed</em> (i.e., after the time period defined
1179  * by the value of the Delay element, or after any other simultaneous
1180  * event may have been <em>executed</em> and changed the model state).
1181  * In SBML Level&nbsp;2
1182  * Version&nbsp;4, the attribute 'useValuesFromTriggerTime' on Event
1183  * allows a model to indicate the time at which the event's assignments
1184  * are intended to be evaluated.  In SBML Level&nbsp;2, the attribute has
1185  * a default value of @c true, which corresponds to the interpretation of
1186  * event assignments prior to Version&nbsp;4: the values of the
1187  * assignment formulas are computed at the moment the event is triggered,
1188  * not after the delay.  If 'useValuesFromTriggerTime'=@c false, it means
1189  * that the formulas in the event's assignments are to be computed after
1190  * the delay, at the time the event is executed.  In SBML Level&nbsp;3,
1191  * the attribute is mandatory, not optional, and all events must specify
1192  * a value for it.
1193  *
1194    *
1195    * @param value the value of useValuesFromTriggerTime to use.
1196    *
1197    *
1198  * @return integer value indicating success/failure of the
1199  * function.  @if clike The value is drawn from the
1200  * enumeration #OperationReturnValues_t. @endif The possible values
1201  * returned by this function are:
1202  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
1203    * @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
1204    *
1205    *
1206  * @warning <span class='warning'>The attribute 'useValuesFromTriggerTime'
1207  * was introduced in SBML Level&nbsp;2 Version&nbsp;4.  It is not valid in
1208  * models defined using SBML Level&nbsp;2 versions prior to Version&nbsp;4.
1209  * If a Level&nbsp;2 Version&nbsp;1&ndash;3 model sets the attribute, the
1210  * consistency-checking method SBMLDocument::checkConsistency() will report
1211  * an error.</span>
1212  *
1213    */ public
setUseValuesFromTriggerTime(bool value)1214  int setUseValuesFromTriggerTime(bool value) {
1215     int ret = libsbmlPINVOKE.Event_setUseValuesFromTriggerTime(swigCPtr, value);
1216     return ret;
1217   }
1218 
1219 
1220 /**
1221    * Unsets the value of the 'id' attribute of this Event.
1222    *
1223    *
1224  *
1225  *
1226  * The identifier given by an object's 'id' attribute value
1227  * is used to identify the object within the SBML model definition.
1228  * Other objects can refer to the component using this identifier.  The
1229  * data type of 'id' is always <code>SId</code> or a type derived
1230  * from that, such as <code>UnitSId</code>, depending on the object in
1231  * question.  All data types are defined as follows:
1232  * <pre style='margin-left: 2em; border: none; font-weight: bold; color: black'>
1233  *   letter ::= 'a'..'z','A'..'Z'
1234  *   digit  ::= '0'..'9'
1235  *   idChar ::= letter | digit | '_'
1236  *   SId    ::= ( letter | '_' ) idChar*
1237  * </pre>
1238  * The characters <code>(</code> and <code>)</code> are used for grouping,
1239  * the character <code>*</code> 'zero or more times', and the character
1240  * <code>|</code> indicates logical 'or'.  The equality of SBML identifiers
1241  * is determined by an exact character sequence match; i.e., comparisons must
1242  * be performed in a case-sensitive manner.  This applies to all uses of
1243  * <code>SId</code>, <code>SIdRef</code>, and derived types.
1244  *
1245  * Users need to be aware of some important API issues that are the result of
1246  * the history of SBML and libSBML.  Prior to SBML Level&nbsp;3
1247  * Version&nbsp;2, SBML defined 'id' and 'name' attributes on only a subset
1248  * of SBML objects.  To simplify the work of programmers, libSBML's API
1249  * provided get, set, check, and unset on the SBase object class itself
1250  * instead of on individual subobject classes. This made the
1251  * get/set/etc. methods uniformly available on all objects in the libSBML
1252  * API.  LibSBML simply returned empty strings or otherwise did not act when
1253  * the methods were applied to SBML objects that were not defined by the SBML
1254  * specification to have 'id' or 'name' attributes.  Additional complications
1255  * arose with the rule and assignment objects: InitialAssignment,
1256  * EventAssignment, AssignmentRule, and RateRule.  In early versions of SBML,
1257  * the rule object hierarchy was different, and in addition, then as now,
1258  * they possess different attributes: 'variable' (for the rules and event
1259  * assignments), 'symbol' (for initial assignments), or neither (for
1260  * algebraic rules).  Prior to SBML Level&nbsp;3 Version&nbsp;2, getId()
1261  * would always return an empty string, and isSetId() would always return @c
1262  * false for objects of these classes.
1263  *
1264  * With the addition of 'id' and 'name' attributes on SBase in Level&nbsp;3
1265  * Version&nbsp;2, it became necessary to introduce a new way to interact
1266  * with the attributes more consistently in libSBML to avoid breaking
1267  * backward compatibility in the behavior of the original 'id' methods.  For
1268  * this reason, libSBML provides four functions (getIdAttribute(),
1269  * setIdAttribute(@if java String@endif), isSetIdAttribute(), and
1270  * unsetIdAttribute()) that always act on the actual 'id' attribute inherited
1271  * from SBase, regardless of the object's type.  <strong>These new methods
1272  * should be used instead of the older getId()/setId()/etc. methods</strong>
1273  * unless the old behavior is somehow necessary.  Regardless of the Level and
1274  * Version of the SBML, these functions allow client applications to use more
1275  * generalized code in some situations (for instance, when manipulating
1276  * objects that are all known to have identifiers).  If the object in
1277  * question does not posess an 'id' attribute according to the SBML
1278  * specification for the Level and Version in use, libSBML will not allow the
1279  * identifier to be set, nor will it read or write 'id' attributes for those
1280  * objects.
1281  *
1282  *
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_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
1291  *
1292  * @see getIdAttribute()
1293  * @see setIdAttribute(string sid)
1294  * @see isSetIdAttribute()
1295  * @see unsetIdAttribute()
1296  *
1297  *
1298    */ public new
unsetId()1299  int unsetId() {
1300     int ret = libsbmlPINVOKE.Event_unsetId(swigCPtr);
1301     return ret;
1302   }
1303 
1304 
1305 /**
1306    * Unsets the value of the 'name' attribute of this Event.
1307    *
1308    *
1309  *
1310  *
1311  * In SBML Level&nbsp;3 Version&nbsp;2, the 'id' and 'name' attributes were
1312  * moved to SBase directly, instead of being defined individually for many
1313  * (but not all) objects.  LibSBML has for a long time provided functions
1314  * defined on SBase itself to get, set, and unset those attributes, which
1315  * would fail or otherwise return empty strings if executed on any object
1316  * for which those attributes were not defined.  Now that all SBase objects
1317  * define those attributes, those functions now succeed for any object with
1318  * the appropriate level and version.
1319  *
1320  * The 'name' attribute is
1321  * optional and is not intended to be used for cross-referencing purposes
1322  * within a model.  Its purpose instead is to provide a human-readable
1323  * label for the component.  The data type of 'name' is the type
1324  * <code>string</code> defined in XML Schema.  SBML imposes no
1325  * restrictions as to the content of 'name' attributes beyond those
1326  * restrictions defined by the <code>string</code> type in XML Schema.
1327  *
1328  * The recommended practice for handling 'name' is as follows.  If a
1329  * software tool has the capability for displaying the content of 'name'
1330  * attributes, it should display this content to the user as a
1331  * component's label instead of the component's 'id'.  If the user
1332  * interface does not have this capability (e.g., because it cannot
1333  * display or use special characters in symbol names), or if the 'name'
1334  * attribute is missing on a given component, then the user interface
1335  * should display the value of the 'id' attribute instead.  (Script
1336  * language interpreters are especially likely to display 'id' instead of
1337  * 'name'.)
1338  *
1339  * As a consequence of the above, authors of systems that automatically
1340  * generate the values of 'id' attributes should be aware some systems
1341  * may display the 'id''s to the user.  Authors therefore may wish to
1342  * take some care to have their software create 'id' values that are: (a)
1343  * reasonably easy for humans to type and read; and (b) likely to be
1344  * meaningful, for example by making the 'id' attribute be an abbreviated
1345  * form of the name attribute value.
1346  *
1347  * An additional point worth mentioning is although there are
1348  * restrictions on the uniqueness of 'id' values, there are no
1349  * restrictions on the uniqueness of 'name' values in a model.  This
1350  * allows software applications leeway in assigning component identifiers.
1351  *
1352  * Regardless of the level and version of the SBML, these functions allow
1353  * client applications to use more generalized code in some situations
1354  * (for instance, when manipulating objects that are all known to have
1355  * names).  If the object in question does not posess a 'name' attribute
1356  * according to the SBML specification for the Level and Version in use,
1357  * libSBML will not allow the name to be set, nor will it read or
1358  * write 'name' attributes for those objects.
1359  *
1360  *
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_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
1369  *
1370  * @see getName()
1371  * @see setName(string sid)
1372  * @see isSetName()
1373  *
1374  *
1375    */ public new
unsetName()1376  int unsetName() {
1377     int ret = libsbmlPINVOKE.Event_unsetName(swigCPtr);
1378     return ret;
1379   }
1380 
1381 
1382 /**
1383    * Unsets the value of the 'useValuesFromTriggerTime' attribute of this Event.
1384    *
1385    *
1386  *
1387  * The optional Delay on Event and the fact that multiple events may be
1388  * simultaneously executed means there are two times to consider when
1389  * computing the results of an event: the time at which the event is
1390  * <em>triggered</em>, and the time at which assignments are
1391  * <em>executed</em>.  It is also possible to distinguish between the
1392  * time at which the EventAssignment's expression is calculated, and the
1393  * time at which the assignment is made: the expression could be
1394  * evaluated at the same time the assignments are performed, i.e., when
1395  * the event is <em>executed</em>, but it could also be defined to be
1396  * evaluated at the time the event is <em>triggered</em>.
1397  *
1398  * In SBML Level&nbsp;2 versions prior to Version&nbsp;4, the semantics
1399  * of Event time delays were defined such that the expressions in the
1400  * event's assignments were always evaluated at the time the event was
1401  * <em>triggered</em>.  This definition made it difficult to define an
1402  * event whose assignment formulas were meant to be evaluated at the time
1403  * the event was <em>executed</em> (i.e., after the time period defined
1404  * by the value of the Delay element, or after any other simultaneous
1405  * event may have been <em>executed</em> and changed the model state).
1406  * In SBML Level&nbsp;2
1407  * Version&nbsp;4, the attribute 'useValuesFromTriggerTime' on Event
1408  * allows a model to indicate the time at which the event's assignments
1409  * are intended to be evaluated.  In SBML Level&nbsp;2, the attribute has
1410  * a default value of @c true, which corresponds to the interpretation of
1411  * event assignments prior to Version&nbsp;4: the values of the
1412  * assignment formulas are computed at the moment the event is triggered,
1413  * not after the delay.  If 'useValuesFromTriggerTime'=@c false, it means
1414  * that the formulas in the event's assignments are to be computed after
1415  * the delay, at the time the event is executed.  In SBML Level&nbsp;3,
1416  * the attribute is mandatory, not optional, and all events must specify
1417  * a value for it.
1418  *
1419    *
1420    *
1421  * @return integer value indicating success/failure of the
1422  * function.  @if clike The value is drawn from the
1423  * enumeration #OperationReturnValues_t. @endif The possible values
1424  * returned by this function are:
1425  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
1426    * @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
1427    *
1428    *
1429  * @warning <span class='warning'>The attribute 'useValuesFromTriggerTime'
1430  * was introduced in SBML Level&nbsp;2 Version&nbsp;4.  It is not valid in
1431  * models defined using SBML Level&nbsp;2 versions prior to Version&nbsp;4.
1432  * If a Level&nbsp;2 Version&nbsp;1&ndash;3 model sets the attribute, the
1433  * consistency-checking method SBMLDocument::checkConsistency() will report
1434  * an error.</span>
1435  *
1436    */ public
unsetUseValuesFromTriggerTime()1437  int unsetUseValuesFromTriggerTime() {
1438     int ret = libsbmlPINVOKE.Event_unsetUseValuesFromTriggerTime(swigCPtr);
1439     return ret;
1440   }
1441 
1442 
1443 /**
1444    * Unsets the Delay of this Event.
1445    *
1446    *
1447  * @return integer value indicating success/failure of the
1448  * function.  @if clike The value is drawn from the
1449  * enumeration #OperationReturnValues_t. @endif The possible values
1450  * returned by this function are:
1451  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
1452    * @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
1453    */ public
unsetDelay()1454  int unsetDelay() {
1455     int ret = libsbmlPINVOKE.Event_unsetDelay(swigCPtr);
1456     return ret;
1457   }
1458 
1459 
1460 /**
1461    * (SBML Level&nbsp;3 only) Unsets the Priority of this Event.
1462    *
1463    *
1464  * @return integer value indicating success/failure of the
1465  * function.  @if clike The value is drawn from the
1466  * enumeration #OperationReturnValues_t. @endif The possible values
1467  * returned by this function are:
1468  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
1469    * @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
1470    *
1471    * @note The element 'priority' is available in SBML Level&nbsp;3,
1472    * but is not present in lower Levels of SBML.
1473    */ public
unsetPriority()1474  int unsetPriority() {
1475     int ret = libsbmlPINVOKE.Event_unsetPriority(swigCPtr);
1476     return ret;
1477   }
1478 
1479 
1480 /**
1481    * Unsets the Trigger of this Event.
1482    *
1483    *
1484  * @return integer value indicating success/failure of the
1485  * function.  @if clike The value is drawn from the
1486  * enumeration #OperationReturnValues_t. @endif The possible values
1487  * returned by this function are:
1488  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
1489    * @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
1490    *
1491    * @note The element 'priority' is available in SBML Level&nbsp;3,
1492    * but is not present in lower Levels of SBML.
1493    */ public
unsetTrigger()1494  int unsetTrigger() {
1495     int ret = libsbmlPINVOKE.Event_unsetTrigger(swigCPtr);
1496     return ret;
1497   }
1498 
1499 
1500 /**
1501    * Unsets the 'timeUnits' attribute of this Event.
1502    *
1503    *
1504  * @return integer value indicating success/failure of the
1505  * function.  @if clike The value is drawn from the
1506  * enumeration #OperationReturnValues_t. @endif The possible values
1507  * returned by this function are:
1508  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
1509    * @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink
1510    * @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
1511    *
1512    *
1513  * @warning <span class='warning'>Definitions of Event in SBML Level 2
1514  * Versions&nbsp;1 and&nbsp;2 included the additional attribute called
1515  * 'timeUnits', but it was removed in SBML Level&nbsp;2 Version&nbsp;3.
1516  * LibSBML supports this attribute for compatibility with previous versions
1517  * of SBML Level&nbsp;2, but its use is discouraged since models in
1518  * Level&nbsp;2 Versions&nbsp;3 and&nbsp;4 cannot contain it.  If a
1519  * Version&nbsp;3 or&nbsp;4 model sets the attribute, the
1520  * consistency-checking method SBMLDocument::checkConsistency() will report
1521  * an error.</span>
1522  *
1523    */ public
unsetTimeUnits()1524  int unsetTimeUnits() {
1525     int ret = libsbmlPINVOKE.Event_unsetTimeUnits(swigCPtr);
1526     return ret;
1527   }
1528 
1529 
1530 /**
1531    * Appends a copy of the given EventAssignment to this Event.
1532    *
1533    * @param ea the EventAssignment object to add.
1534    *
1535    *
1536  * @return integer value indicating success/failure of the
1537  * function.  @if clike The value is drawn from the
1538  * enumeration #OperationReturnValues_t. @endif The possible values
1539  * returned by this function are:
1540  * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink
1541    * @li @link libsbml#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH@endlink
1542    * @li @link libsbml#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH@endlink
1543    * @li @link libsbml#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID@endlink
1544    * @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink
1545    *
1546    *
1547  * @note This method should be used with some caution.  The fact that this
1548  * method @em copies the object passed to it means that the caller will be
1549  * left holding a physically different object instance than the one contained
1550  * inside this object.  Changes made to the original object instance (such as
1551  * resetting attribute values) will <em>not affect the instance in this
1552  * object</em>.  In addition, the caller should make sure to free the
1553  * original object if it is no longer being used, or else a memory leak will
1554  * result.  Please see other methods on this class (particularly a
1555  * corresponding method whose name begins with the word <code>create</code>)
1556  * for alternatives that do not lead to these issues.
1557  *
1558  *
1559    *
1560    * @see createEventAssignment()
1561    */ public
addEventAssignment(EventAssignment ea)1562  int addEventAssignment(EventAssignment ea) {
1563     int ret = libsbmlPINVOKE.Event_addEventAssignment(swigCPtr, EventAssignment.getCPtr(ea));
1564     return ret;
1565   }
1566 
1567 
1568 /**
1569    * Creates a new, empty EventAssignment, adds it to this Event's list of
1570    * event assignments and returns the EventAssignment.
1571    *
1572    * @return the newly created EventAssignment object instance.
1573    *
1574    * @see addEventAssignment(EventAssignment ea)
1575    */ public
createEventAssignment()1576  EventAssignment createEventAssignment() {
1577     global::System.IntPtr cPtr = libsbmlPINVOKE.Event_createEventAssignment(swigCPtr);
1578     EventAssignment ret = (cPtr == global::System.IntPtr.Zero) ? null : new EventAssignment(cPtr, false);
1579     return ret;
1580   }
1581 
1582 
1583 /**
1584    * Creates a new, empty Trigger, adds it to this Event and
1585    * returns the Trigger.
1586    *
1587    * @return the newly created Trigger object instance.
1588    */ public
createTrigger()1589  Trigger createTrigger() {
1590     global::System.IntPtr cPtr = libsbmlPINVOKE.Event_createTrigger(swigCPtr);
1591     Trigger ret = (cPtr == global::System.IntPtr.Zero) ? null : new Trigger(cPtr, false);
1592     return ret;
1593   }
1594 
1595 
1596 /**
1597    * Creates a new, empty Delay, adds it to this Event and
1598    * returns the Delay.
1599    *
1600    * @return the newly created Delay object instance.
1601    */ public
createDelay()1602  Delay createDelay() {
1603     global::System.IntPtr cPtr = libsbmlPINVOKE.Event_createDelay(swigCPtr);
1604     Delay ret = (cPtr == global::System.IntPtr.Zero) ? null : new Delay(cPtr, false);
1605     return ret;
1606   }
1607 
1608 
1609 /**
1610    * (SBML Level&nbsp;3 only) Creates a new, empty Priority, adds it to this
1611    * Event and returns the Priority.
1612    *
1613    * @return the newly created Priority object instance, or @c null if the SBML
1614    * level and version used for this Event does not define Priority children.
1615    *
1616    * @note The element 'priority' is available in SBML Level&nbsp;3,
1617    * but is not present in lower Levels of SBML.
1618    */ public
createPriority()1619  Priority createPriority() {
1620     global::System.IntPtr cPtr = libsbmlPINVOKE.Event_createPriority(swigCPtr);
1621     Priority ret = (cPtr == global::System.IntPtr.Zero) ? null : new Priority(cPtr, false);
1622     return ret;
1623   }
1624 
1625 
1626 /**
1627    * Returns the list of event assignments for this Event.
1628    *
1629    * @return the list of EventAssignments for this Event.
1630    */ public
getListOfEventAssignments()1631  ListOfEventAssignments getListOfEventAssignments() {
1632     global::System.IntPtr cPtr = libsbmlPINVOKE.Event_getListOfEventAssignments__SWIG_0(swigCPtr);
1633     ListOfEventAssignments ret = (cPtr == global::System.IntPtr.Zero) ? null : new ListOfEventAssignments(cPtr, false);
1634     return ret;
1635   }
1636 
1637 
1638 /**
1639    * Return a specific EventAssignment object of this Event.
1640    *
1641    * @param n an integer, the index of the EventAssignment object to return.
1642    *
1643    * @return the <code>n</code>th EventAssignment of this Event.
1644    */ public
getEventAssignment(long n)1645  EventAssignment getEventAssignment(long n) {
1646     global::System.IntPtr cPtr = libsbmlPINVOKE.Event_getEventAssignment__SWIG_0(swigCPtr, n);
1647     EventAssignment ret = (cPtr == global::System.IntPtr.Zero) ? null : new EventAssignment(cPtr, false);
1648     return ret;
1649   }
1650 
1651 
1652 /**
1653    * Return the event assignment indicated by the given @p variable.
1654    *
1655    * @param variable a string, the identifier of the variable whose
1656    * EventAssignment is being sought.
1657    *
1658    * @return the EventAssignment for the given @p variable, or @c null if
1659    * no such EventAssignment exists.
1660    */ public
getEventAssignment(string variable)1661  EventAssignment getEventAssignment(string variable) {
1662     global::System.IntPtr cPtr = libsbmlPINVOKE.Event_getEventAssignment__SWIG_2(swigCPtr, variable);
1663     EventAssignment ret = (cPtr == global::System.IntPtr.Zero) ? null : new EventAssignment(cPtr, false);
1664     return ret;
1665   }
1666 
1667 
1668 /**
1669    * Returns the number of EventAssignment objects attached to this
1670    * Event.
1671    *
1672    * @return the number of EventAssignments in this Event.
1673    */ public
getNumEventAssignments()1674  long getNumEventAssignments() { return (long)libsbmlPINVOKE.Event_getNumEventAssignments(swigCPtr); }
1675 
1676 
1677 /**
1678    * Removes the nth EventAssignment object from this Event object and
1679    * returns a pointer to it.
1680    *
1681    * The caller owns the returned object and is responsible for deleting it.
1682    *
1683    * @param n the index of the EventAssignment object to remove.
1684    *
1685    * @return the EventAssignment object removed.  As mentioned above,
1686    * the caller owns the returned item. @c null is returned if the given index
1687    * is out of range.
1688    *
1689    */ public
removeEventAssignment(long n)1690  EventAssignment removeEventAssignment(long n) {
1691     global::System.IntPtr cPtr = libsbmlPINVOKE.Event_removeEventAssignment__SWIG_0(swigCPtr, n);
1692     EventAssignment ret = (cPtr == global::System.IntPtr.Zero) ? null : new EventAssignment(cPtr, true);
1693     return ret;
1694   }
1695 
1696 
1697 /**
1698    * Removes the EventAssignment object with the given 'variable' attribute
1699    * from this Event object and returns a pointer to it.
1700    *
1701    * The caller owns the returned object and is responsible for deleting it.
1702    * If none of the EventAssignment objects in this Event object have the
1703    * 'variable' attribute @p variable, then @c null is returned.
1704    *
1705    * @param variable the 'variable' attribute of the EventAssignment object
1706    * to remove.
1707    *
1708    * @return the EventAssignment object removed.  As mentioned above, the
1709    * caller owns the returned object. @c null is returned if no EventAssignment
1710    * object with the 'variable' attribute exists in this Event object.
1711    */ public
removeEventAssignment(string variable)1712  EventAssignment removeEventAssignment(string variable) {
1713     global::System.IntPtr cPtr = libsbmlPINVOKE.Event_removeEventAssignment__SWIG_1(swigCPtr, variable);
1714     EventAssignment ret = (cPtr == global::System.IntPtr.Zero) ? null : new EventAssignment(cPtr, true);
1715     return ret;
1716   }
1717 
connectToChild()1718   public override void connectToChild() {
1719     libsbmlPINVOKE.Event_connectToChild(swigCPtr);
1720   }
1721 
1722 
1723 /** */ /* libsbml-internal */ public new
enablePackageInternal(string pkgURI, string pkgPrefix, bool flag)1724  void enablePackageInternal(string pkgURI, string pkgPrefix, bool flag) {
1725     libsbmlPINVOKE.Event_enablePackageInternal(swigCPtr, pkgURI, pkgPrefix, flag);
1726   }
1727 
1728 
1729 /** */ /* libsbml-internal */ public new
updateSBMLNamespace(string package, long level, long version)1730  void updateSBMLNamespace(string package, long level, long version) {
1731     libsbmlPINVOKE.Event_updateSBMLNamespace(swigCPtr, package, level, version);
1732   }
1733 
1734 
1735 /**
1736    * Returns the libSBML type code of this object instance.
1737    *
1738    *
1739  *
1740  * LibSBML attaches an identifying code to every kind of SBML object.  These
1741  * are integer constants known as <em>SBML type codes</em>.  The names of all
1742  * the codes begin with the characters <code>SBML_</code>.
1743  * @if clike The set of possible type codes for core elements is defined in
1744  * the enumeration #SBMLTypeCode_t, and in addition, libSBML plug-ins for
1745  * SBML Level&nbsp;3 packages define their own extra enumerations of type
1746  * codes (e.g., #SBMLLayoutTypeCode_t for the Level&nbsp;3 Layout
1747  * package).@endif@if java In the Java language interface for libSBML, the
1748  * type codes are defined as static integer constants in the interface class
1749  * {@link libsbmlConstants}.  @endif@if python In the Python language
1750  * interface for libSBML, the type codes are defined as static integer
1751  * constants in the interface class @link libsbml@endlink.@endif@if csharp In
1752  * the C# language interface for libSBML, the type codes are defined as
1753  * static integer constants in the interface class
1754  * @link libsbmlcs.libsbml@endlink.@endif  Note that different Level&nbsp;3
1755  * package plug-ins may use overlapping type codes; to identify the package
1756  * to which a given object belongs, call the
1757  * <code>@if conly SBase_getPackageName()
1758  * @else SBase::getPackageName()
1759  * @endif</code>
1760  * method on the object.
1761  *
1762  * The exception to this is lists:  all SBML-style list elements have the type
1763  * @link libsbml#SBML_LIST_OF SBML_LIST_OF@endlink, regardless of what package they
1764  * are from.
1765  *
1766  *
1767    *
1768    * @return the SBML type code for this object:
1769    * @link libsbml#SBML_EVENT SBML_EVENT@endlink (default).
1770    *
1771    *
1772  * @warning <span class='warning'>The specific integer values of the possible
1773  * type codes may be reused by different libSBML plug-ins for SBML Level&nbsp;3.
1774  * packages,  To fully identify the correct code, <strong>it is necessary to
1775  * invoke both getPackageName() and getTypeCode()</strong> (or
1776  * ListOf::getItemTypeCode()).</span>
1777  *
1778  *
1779    *
1780    * @see getElementName()
1781    * @see getPackageName()
1782    */ public new
getTypeCode()1783  int getTypeCode() {
1784     int ret = libsbmlPINVOKE.Event_getTypeCode(swigCPtr);
1785     return ret;
1786   }
1787 
1788 
1789 /**
1790    * Returns the XML element name of this object, which for Event, is
1791    * always @c 'event'.
1792    *
1793    * @return the name of this element, i.e., @c 'event'.
1794    */ public new
getElementName()1795  string getElementName() {
1796     string ret = libsbmlPINVOKE.Event_getElementName(swigCPtr);
1797     return ret;
1798   }
1799 
1800 
1801 /**
1802    * Predicate returning @c true if all the required attributes for this
1803    * Event object have been set.
1804    *
1805    * The required attributes for an Event object are:
1806    * @li 'useValuesfromTriggerTime' (required in SBML Level&nbsp;3)
1807    *
1808    * @return @c true if the required attributes have been set, @c false
1809    * otherwise.
1810    */ public new
hasRequiredAttributes()1811  bool hasRequiredAttributes() {
1812     bool ret = libsbmlPINVOKE.Event_hasRequiredAttributes(swigCPtr);
1813     return ret;
1814   }
1815 
1816 
1817 /**
1818    * Predicate returning @c true if all the required elements for this Event
1819    * object have been set.
1820    *
1821    * @note The required elements for an Event object are:
1822    * @li 'trigger' (required in SBML Level&nbsp;2 and Level&nbsp;3 Version&nbsp;1;
1823    *     optional in SBML Level&nbsp;3 Version&nbsp;2+
1824    * @li 'listOfEventAssignments' (required in SBML Level&nbsp;2; optional in Level&nbsp;3)
1825    */ public new
hasRequiredElements()1826  bool hasRequiredElements() {
1827     bool ret = libsbmlPINVOKE.Event_hasRequiredElements(swigCPtr);
1828     return ret;
1829   }
1830 
1831 }
1832 
1833 }
1834