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