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 Stochiometry expressions in SBML Level 2 reactions. 20 * 21 * @section l2-stoichiometries Stoichiometries in SBML Level 2 22 * 23 * In SBML Level 2, product and reactant stoichiometries can be specified 24 * using @em either the 'stoichiometry' attribute or a 'stoichiometryMath' 25 * element in a SpeciesReference object. The 'stoichiometry' attribute is 26 * of type @c double and should contain values greater than zero (0). The 27 * 'stoichiometryMath' element is implemented as an element containing a 28 * MathML expression. These two are mutually exclusive; only one of 29 * 'stoichiometry' or 'stoichiometryMath' should be defined in a given 30 * SpeciesReference instance. When neither the attribute nor the element 31 * is present, the value of 'stoichiometry' in the enclosing 32 * SpeciesReference instance defaults to @c 1. 33 * 34 * For maximum interoperability, SpeciesReference's 'stoichiometry' 35 * attribute should be used in preference to 'stoichiometryMath' when a 36 * species' stoichiometry is a simple scalar number (integer or decimal). 37 * When the stoichiometry is a rational number, or when it is a more 38 * complicated formula, 'stoichiometryMath' must be used. The MathML 39 * expression in 'stoichiometryMath' may also refer to identifiers of 40 * entities in a model (except reaction identifiers). However, the only 41 * species identifiers that can be used in 'stoichiometryMath' are those 42 * referenced in the enclosing Reaction's list of reactants, products and 43 * modifiers. 44 * 45 * The 'stoichiometry' attribute and the 'stoichiometryMath' element, when 46 * either is used, is each interpreted as a factor applied to the reaction 47 * rate to produce the rate of change of the species identified by the 48 * 'species' attribute in the enclosing SpeciesReference. This is the 49 * normal interpretation of a stoichiometry, but in SBML, one additional 50 * consideration has to be taken into account. The reaction rate, which is 51 * the result of the KineticLaw's 'math' element, is always in the model's 52 * @em substance per @em time units. However, the rate of change of the 53 * species will involve the species' @em substance units (i.e., the units 54 * identified by the Species object's 'substanceUnits' attribute), and 55 * these units may be different from the model's default @em substance 56 * units. If the units @em are different, the stoichiometry must 57 * incorporate a conversion factor for converting the model's @em substance 58 * units to the species' @em substance units. The conversion factor is 59 * assumed to be included in the scalar value of the 'stoichiometry' 60 * attribute if 'stoichiometry' is used. If instead 'stoichiometryMath' is 61 * used, then the product of the model's 'substance' units times the 62 * 'stoichiometryMath' units must match the @em substance units of the 63 * species. Note that in either case, if the species' units and the 64 * model's default @em substance units are the same, the stoichiometry ends 65 * up being a dimensionless number and equivalent to the standard chemical 66 * stoichiometry found in textbooks. Examples and more explanations of 67 * this are given in the SBML specification. 68 * 69 * The following is a simple example of a species reference for species 70 * @c 'X0', with stoichiometry @c 2, in a list of reactants within a reaction 71 * having the identifier @c 'J1': 72 * @verbatim 73 <model> 74 ... 75 <listOfReactions> 76 <reaction id='J1'> 77 <listOfReactants> 78 <speciesReference species='X0' stoichiometry='2'> 79 </listOfReactants> 80 ... 81 </reaction> 82 ... 83 </listOfReactions> 84 ... 85 </model> 86 @endverbatim 87 * 88 * The following is a more complex example of a species reference for 89 * species @c 'X0', with a stoichiometry formula consisting of 90 * a rational number: 91 * @verbatim 92 <model> 93 ... 94 <listOfReactions> 95 <reaction id='J1'> 96 <listOfReactants> 97 <speciesReference species='X0'> 98 <stoichiometryMath> 99 <math xmlns='http://www.w3.org/1998/Math/MathML'> 100 <cn type='rational'> 3 <sep/> 2 </cn> 101 </math> 102 </stoichiometryMath> 103 </speciesReference> 104 </listOfReactants> 105 ... 106 </reaction> 107 ... 108 </listOfReactions> 109 ... 110 </model> 111 @endverbatim 112 * 113 * Additional discussions of stoichiometries and implications for species 114 * and reactions are included in the documentation of SpeciesReference 115 * class. 116 * 117 * @section l3-stoichiometries Stoichiometries in SBML Level 3 118 * 119 * The StoichiometryMath construct is not defined in SBML Level 3. 120 * Instead, Level 3 defines the identifier of 121 * SpeciesReference objects as a stand-in for the stoichiometry of the 122 * reactant or product being referenced, and allows that identifier to be 123 * used elsewhere in SBML models, including (for example) InitialAssignment 124 * objects. This makes it possible to achieve the same effect as 125 * StoichiometryMath, but with other SBML objects. For instance, to 126 * produce a stoichiometry value that is a rational number, a model can use 127 * InitialAssignment to assign the identifier of a SpeciesReference object 128 * to a MathML expression evaluating to a rational number. This is 129 * analogous to the same way that, in Level 2, the model would use 130 * StoichiometryMath with a MathML expression evaluating to a rational 131 * number. 132 * 133 * In SBML Level 2, the stoichiometry of a reactant or product is a 134 * combination of both a <em>biochemical stoichiometry</em> (meaning, the 135 * standard stoichiometry of a species in a reaction) and any necessary 136 * unit conversion factors. The introduction of an explicit attribute on 137 * the Species object for a conversion factor allows Level 3 to avoid 138 * having to overload the meaning of stoichiometry. In Level 3, the 139 * stoichiometry given by a SpeciesReference object in a reaction is a 140 * 'proper' biochemical stoichiometry, meaning a dimensionless number free 141 * of unit conversions. 142 * 143 * @see SpeciesReference 144 * @see Reaction 145 */ 146 147 public class StoichiometryMath : SBase { 148 private HandleRef swigCPtr; 149 StoichiometryMath(IntPtr cPtr, bool cMemoryOwn)150 internal StoichiometryMath(IntPtr cPtr, bool cMemoryOwn) : base(libsbmlPINVOKE.StoichiometryMath_SWIGUpcast(cPtr), cMemoryOwn) 151 { 152 //super(libsbmlPINVOKE.StoichiometryMathUpcast(cPtr), cMemoryOwn); 153 swigCPtr = new HandleRef(this, cPtr); 154 } 155 getCPtr(StoichiometryMath obj)156 internal static HandleRef getCPtr(StoichiometryMath obj) 157 { 158 return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr; 159 } 160 getCPtrAndDisown(StoichiometryMath obj)161 internal static HandleRef getCPtrAndDisown (StoichiometryMath obj) 162 { 163 HandleRef ptr = new HandleRef(null, IntPtr.Zero); 164 165 if (obj != null) 166 { 167 ptr = obj.swigCPtr; 168 obj.swigCMemOwn = false; 169 } 170 171 return ptr; 172 } 173 Dispose(bool disposing)174 protected override void Dispose(bool disposing) { 175 lock(this) { 176 if (swigCPtr.Handle != global::System.IntPtr.Zero) { 177 if (swigCMemOwn) { 178 swigCMemOwn = false; 179 libsbmlPINVOKE.delete_StoichiometryMath(swigCPtr); 180 } 181 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); 182 } 183 base.Dispose(disposing); 184 } 185 } 186 187 188 /** 189 * Creates a new StoichiometryMath object using the given SBML @p level 190 * values. 191 * 192 * @param level a long integer, the SBML Level to assign to this StoichiometryMath. 193 * 194 * @param version a long integer, the SBML Version to assign to this 195 * StoichiometryMath. 196 * 197 * 198 * @throws SBMLConstructorException 199 * Thrown if the given @p level and @p version combination are invalid 200 * or if this object is incompatible with the given level and version. 201 * 202 * 203 * 204 * 205 * @note The StoichiometryMath construct exists only in SBML Level 2. 206 * It is an optional construct available for defining the stoichiometries of 207 * reactants and products in Reaction objects. Note that a different 208 * mechanism is used in SBML Level 3, where StoichiometryMath is not 209 * available. Please consult the top of this libSBML StoichiometryMath 210 * documentation for more information about the differences between SBML 211 * Level 2 and 3 with respect to stoichiometries. 212 * 213 * 214 * 215 * @note Attempting to add an object to an SBMLDocument having a different 216 * combination of SBML Level, Version and XML namespaces than the object 217 * itself will result in an error at the time a caller attempts to make the 218 * addition. A parent object must have compatible Level, Version and XML 219 * namespaces. (Strictly speaking, a parent may also have more XML 220 * namespaces than a child, but the reverse is not permitted.) The 221 * restriction is necessary to ensure that an SBML model has a consistent 222 * overall structure. This requires callers to manage their objects 223 * carefully, but the benefit is increased flexibility in how models can be 224 * created by permitting callers to create objects bottom-up if desired. In 225 * situations where objects are not yet attached to parents (e.g., 226 * SBMLDocument), knowledge of the intented SBML Level and Version help 227 * libSBML determine such things as whether it is valid to assign a 228 * particular value to an attribute. 229 * 230 * 231 */ public StoichiometryMath(long level, long version)232 StoichiometryMath(long level, long version) : this(libsbmlPINVOKE.new_StoichiometryMath__SWIG_0(level, version), true) { 233 if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve(); 234 } 235 236 237 /** 238 * Creates a new StoichiometryMath object using the given SBMLNamespaces object 239 * @p sbmlns. 240 * 241 * 242 * 243 * The SBMLNamespaces object encapsulates SBML Level/Version/namespaces 244 * information. It is used to communicate the SBML Level, Version, and (in 245 * Level 3) packages used in addition to SBML Level 3 Core. A 246 * common approach to using libSBML's SBMLNamespaces facilities is to create an 247 * SBMLNamespaces object somewhere in a program once, then hand that object 248 * as needed to object constructors that accept SBMLNamespaces as arguments. 249 * 250 * 251 * 252 * @param sbmlns an SBMLNamespaces object. 253 * 254 * 255 * @throws SBMLConstructorException 256 * Thrown if the given @p sbmlns is inconsistent or incompatible 257 * with this object. 258 * 259 * 260 * 261 * 262 * @note The StoichiometryMath construct exists only in SBML Level 2. 263 * It is an optional construct available for defining the stoichiometries of 264 * reactants and products in Reaction objects. Note that a different 265 * mechanism is used in SBML Level 3, where StoichiometryMath is not 266 * available. Please consult the top of this libSBML StoichiometryMath 267 * documentation for more information about the differences between SBML 268 * Level 2 and 3 with respect to stoichiometries. 269 * 270 * 271 * 272 * @note Attempting to add an object to an SBMLDocument having a different 273 * combination of SBML Level, Version and XML namespaces than the object 274 * itself will result in an error at the time a caller attempts to make the 275 * addition. A parent object must have compatible Level, Version and XML 276 * namespaces. (Strictly speaking, a parent may also have more XML 277 * namespaces than a child, but the reverse is not permitted.) The 278 * restriction is necessary to ensure that an SBML model has a consistent 279 * overall structure. This requires callers to manage their objects 280 * carefully, but the benefit is increased flexibility in how models can be 281 * created by permitting callers to create objects bottom-up if desired. In 282 * situations where objects are not yet attached to parents (e.g., 283 * SBMLDocument), knowledge of the intented SBML Level and Version help 284 * libSBML determine such things as whether it is valid to assign a 285 * particular value to an attribute. 286 * 287 * 288 */ public StoichiometryMath(SBMLNamespaces sbmlns)289 StoichiometryMath(SBMLNamespaces sbmlns) : this(libsbmlPINVOKE.new_StoichiometryMath__SWIG_1(SBMLNamespaces.getCPtr(sbmlns)), true) { 290 if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve(); 291 } 292 293 294 /** 295 * Copy constructor; creates a copy of this StoichiometryMath. 296 * 297 * @param orig the object to copy. 298 */ public StoichiometryMath(StoichiometryMath orig)299 StoichiometryMath(StoichiometryMath orig) : this(libsbmlPINVOKE.new_StoichiometryMath__SWIG_2(StoichiometryMath.getCPtr(orig)), true) { 300 if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve(); 301 } 302 303 304 /** 305 * Creates and returns a deep copy of this StoichiometryMath object. 306 * 307 * @return the (deep) copy of this StoichiometryMath object. 308 */ public new clone()309 StoichiometryMath clone() { 310 global::System.IntPtr cPtr = libsbmlPINVOKE.StoichiometryMath_clone(swigCPtr); 311 StoichiometryMath ret = (cPtr == global::System.IntPtr.Zero) ? null : new StoichiometryMath(cPtr, true); 312 return ret; 313 } 314 315 316 /** 317 * Retrieves the mathematical formula within this StoichiometryMath and 318 * return it as an AST. 319 * 320 * @return the math of this StoichiometryMath, or @c null if the math is not set. 321 * 322 * 323 * @note The StoichiometryMath construct exists only in SBML Level 2. 324 * It is an optional construct available for defining the stoichiometries of 325 * reactants and products in Reaction objects. Note that a different 326 * mechanism is used in SBML Level 3, where StoichiometryMath is not 327 * available. Please consult the top of this libSBML StoichiometryMath 328 * documentation for more information about the differences between SBML 329 * Level 2 and 3 with respect to stoichiometries. 330 * 331 */ public new getMath()332 ASTNode getMath() { 333 global::System.IntPtr cPtr = libsbmlPINVOKE.StoichiometryMath_getMath(swigCPtr); 334 ASTNode ret = (cPtr == global::System.IntPtr.Zero) ? null : new ASTNode(cPtr, false); 335 return ret; 336 } 337 338 339 /** 340 * Predicate to test whether the math for this StoichiometryMath object 341 * is set. 342 * 343 * @return @c true if the formula (meaning the @c math subelement) of 344 * this StoichiometryMath is set, @c false otherwise. 345 * 346 * 347 * @note The StoichiometryMath construct exists only in SBML Level 2. 348 * It is an optional construct available for defining the stoichiometries of 349 * reactants and products in Reaction objects. Note that a different 350 * mechanism is used in SBML Level 3, where StoichiometryMath is not 351 * available. Please consult the top of this libSBML StoichiometryMath 352 * documentation for more information about the differences between SBML 353 * Level 2 and 3 with respect to stoichiometries. 354 * 355 */ public isSetMath()356 bool isSetMath() { 357 bool ret = libsbmlPINVOKE.StoichiometryMath_isSetMath(swigCPtr); 358 return ret; 359 } 360 361 362 /** 363 * Sets the 'math' expression of this StoichiometryMath instance to a 364 * copy of the given ASTNode. 365 * 366 * @param math an ASTNode representing a formula tree. 367 * 368 * 369 * @return integer value indicating success/failure of the 370 * function. @if clike The value is drawn from the 371 * enumeration #OperationReturnValues_t. @endif The possible values 372 * returned by this function are: 373 * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink 374 * @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink 375 * 376 * 377 * @note The StoichiometryMath construct exists only in SBML Level 2. 378 * It is an optional construct available for defining the stoichiometries of 379 * reactants and products in Reaction objects. Note that a different 380 * mechanism is used in SBML Level 3, where StoichiometryMath is not 381 * available. Please consult the top of this libSBML StoichiometryMath 382 * documentation for more information about the differences between SBML 383 * Level 2 and 3 with respect to stoichiometries. 384 * 385 */ public new setMath(ASTNode math)386 int setMath(ASTNode math) { 387 int ret = libsbmlPINVOKE.StoichiometryMath_setMath(swigCPtr, ASTNode.getCPtr(math)); 388 return ret; 389 } 390 391 392 /** 393 * Calculates and returns a UnitDefinition object that expresses the 394 * units returned by the math expression in this StoichiometryMath 395 * object. 396 * 397 * The units are calculated based on the mathematical expression in the 398 * StoichiometryMath and the model quantities referenced by 399 * <code><ci></code> elements used within that expression. The 400 * StoichiometryMath::getDerivedUnitDefinition() method returns the 401 * calculated units. 402 * 403 * Note that the functionality that facilitates unit analysis depends 404 * on the model as a whole. Thus, in cases where the object has not 405 * been added to a model or the model itself is incomplete, 406 * unit analysis is not possible and this method will return @c null. 407 * 408 * @return a UnitDefinition that expresses the units of the math, 409 * or @c null if one cannot be constructed. 410 * 411 * @warning <span class='warning'>Note that it is possible the 'math' 412 * expression in the StoichiometryMath instance contains literal numbers or 413 * parameters with undeclared units. In those cases, it is not possible to 414 * calculate the units of the overall expression without making 415 * assumptions. LibSBML does not make assumptions about the units, and 416 * StoichiometryMath::getDerivedUnitDefinition() only returns the units as 417 * far as it is able to determine them. For example, in an expression 418 * <em>X + Y</em>, if <em>X</em> has unambiguously-defined units and 419 * <em>Y</em> does not, it will return the units of <em>X</em>. When using 420 * this method, <strong>it is critical that callers also invoke the 421 * method</strong> StoichiometryMath::containsUndeclaredUnits() <strong>to 422 * determine whether this situation holds</strong>. Callers should take 423 * suitable action in those situations.</span> 424 * 425 * @see containsUndeclaredUnits() 426 */ public getDerivedUnitDefinition()427 UnitDefinition getDerivedUnitDefinition() { 428 global::System.IntPtr cPtr = libsbmlPINVOKE.StoichiometryMath_getDerivedUnitDefinition__SWIG_0(swigCPtr); 429 UnitDefinition ret = (cPtr == global::System.IntPtr.Zero) ? null : new UnitDefinition(cPtr, false); 430 return ret; 431 } 432 433 434 /** 435 * Predicate returning @c true if the math 436 * expression of this StoichiometryMath object contains literal numbers 437 * or parameters with undeclared units. 438 * 439 * The StoichiometryMath::getDerivedUnitDefinition() method returns what 440 * libSBML computes the units of the Stoichiometry to be, to the extent 441 * that libSBML can compute them. However, if the expression contains 442 * literal numbers or parameters with undeclared units, libSBML may not 443 * be able to compute the full units of the expression and will only 444 * return what it can compute. Callers should always use 445 * StoichiometryMath::containsUndeclaredUnits() when using 446 * StoichiometryMath::getDerivedUnitDefinition() to decide whether the 447 * returned units may be incomplete. 448 * 449 * @return @c true if the math expression of this StoichiometryMath 450 * includes numbers/parameters with undeclared units, @c false otherwise. 451 * 452 * @note A return value of @c true indicates that the UnitDefinition 453 * returned by StoichiometryMath::getDerivedUnitDefinition() may not 454 * accurately represent the units of the expression. 455 * 456 * @see getDerivedUnitDefinition() 457 */ public containsUndeclaredUnits()458 bool containsUndeclaredUnits() { 459 bool ret = libsbmlPINVOKE.StoichiometryMath_containsUndeclaredUnits__SWIG_0(swigCPtr); 460 return ret; 461 } 462 463 464 /** 465 * Returns the libSBML type code of this object instance. 466 * 467 * 468 * 469 * LibSBML attaches an identifying code to every kind of SBML object. These 470 * are integer constants known as <em>SBML type codes</em>. The names of all 471 * the codes begin with the characters <code>SBML_</code>. 472 * @if clike The set of possible type codes for core elements is defined in 473 * the enumeration #SBMLTypeCode_t, and in addition, libSBML plug-ins for 474 * SBML Level 3 packages define their own extra enumerations of type 475 * codes (e.g., #SBMLLayoutTypeCode_t for the Level 3 Layout 476 * package).@endif@if java In the Java language interface for libSBML, the 477 * type codes are defined as static integer constants in the interface class 478 * {@link libsbmlConstants}. @endif@if python In the Python language 479 * interface for libSBML, the type codes are defined as static integer 480 * constants in the interface class @link libsbml@endlink.@endif@if csharp In 481 * the C# language interface for libSBML, the type codes are defined as 482 * static integer constants in the interface class 483 * @link libsbmlcs.libsbml@endlink.@endif Note that different Level 3 484 * package plug-ins may use overlapping type codes; to identify the package 485 * to which a given object belongs, call the 486 * <code>@if conly SBase_getPackageName() 487 * @else SBase::getPackageName() 488 * @endif</code> 489 * method on the object. 490 * 491 * The exception to this is lists: all SBML-style list elements have the type 492 * @link libsbml#SBML_LIST_OF SBML_LIST_OF@endlink, regardless of what package they 493 * are from. 494 * 495 * 496 * 497 * @return the SBML type code for this object: 498 * @link libsbml#SBML_STOICHIOMETRY_MATH SBML_STOICHIOMETRY_MATH@endlink (default). 499 * 500 * 501 * @warning <span class='warning'>The specific integer values of the possible 502 * type codes may be reused by different libSBML plug-ins for SBML Level 3. 503 * packages, To fully identify the correct code, <strong>it is necessary to 504 * invoke both getPackageName() and getTypeCode()</strong> (or 505 * ListOf::getItemTypeCode()).</span> 506 * 507 * 508 * 509 * @see getElementName() 510 * @see getPackageName() 511 */ public new getTypeCode()512 int getTypeCode() { 513 int ret = libsbmlPINVOKE.StoichiometryMath_getTypeCode(swigCPtr); 514 return ret; 515 } 516 517 518 /** 519 * Returns the XML element name of this object, which for StoichiometryMath, is 520 * always @c 'stoichiometryMath'. 521 * 522 * @return the name of this element, i.e., @c 'stoichiometryMath'. 523 */ public new getElementName()524 string getElementName() { 525 string ret = libsbmlPINVOKE.StoichiometryMath_getElementName(swigCPtr); 526 return ret; 527 } 528 529 530 /** 531 * Predicate returning @c true if 532 * all the required elements for this StoichiometryMath object 533 * have been set. 534 * 535 * @note The required elements for a StoichiometryMath object are: 536 * @li 'math' 537 * 538 * @return a boolean value indicating whether all the required 539 * elements for this object have been defined. 540 */ public new hasRequiredElements()541 bool hasRequiredElements() { 542 bool ret = libsbmlPINVOKE.StoichiometryMath_hasRequiredElements(swigCPtr); 543 return ret; 544 } 545 546 547 /** 548 * Finds this StoichiometryMath's SpeciesReference parent and calls 549 * unsetStoichiometryMath() on it, indirectly deleting itself. 550 * 551 * Overridden from the SBase function since the parent is not a ListOf. 552 * 553 * 554 * @return integer value indicating success/failure of the 555 * function. @if clike The value is drawn from the 556 * enumeration #OperationReturnValues_t. @endif The possible values 557 * returned by this function are: 558 * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink 559 * @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink 560 */ public new removeFromParentAndDelete()561 int removeFromParentAndDelete() { 562 int ret = libsbmlPINVOKE.StoichiometryMath_removeFromParentAndDelete(swigCPtr); 563 return ret; 564 } 565 566 567 /** 568 * 569 * Replaces all uses of a given @c SIdRef type attribute value with another 570 * value. 571 * 572 * 573 * 574 575 * In SBML, object identifiers are of a data type called <code>SId</code>. 576 * In SBML Level 3, an explicit data type called <code>SIdRef</code> was 577 * introduced for attribute values that refer to <code>SId</code> values; in 578 * previous Levels of SBML, this data type did not exist and attributes were 579 * simply described to as 'referring to an identifier', but the effective 580 * data type was the same as <code>SIdRef</code> in Level 3. These and 581 * other methods of libSBML refer to the type <code>SIdRef</code> for all 582 * Levels of SBML, even if the corresponding SBML specification did not 583 * explicitly name the data type. 584 * 585 * 586 * 587 * This method works by looking at all attributes and (if appropriate) 588 * mathematical formulas in MathML content, comparing the referenced 589 * identifiers to the value of @p oldid. If any matches are found, the 590 * matching values are replaced with @p newid. The method does @em not 591 * descend into child elements. 592 * 593 * @param oldid the old identifier. 594 * @param newid the new identifier. 595 * 596 * 597 */ public new renameSIdRefs(string oldid, string newid)598 void renameSIdRefs(string oldid, string newid) { 599 libsbmlPINVOKE.StoichiometryMath_renameSIdRefs(swigCPtr, oldid, newid); 600 } 601 602 603 /** 604 * 605 * Replaces all uses of a given @c UnitSIdRef type attribute value with 606 * another value. 607 * 608 * 609 * 610 * In SBML, unit definitions have identifiers of type <code>UnitSId</code>. In 611 * SBML Level 3, an explicit data type called <code>UnitSIdRef</code> was 612 * introduced for attribute values that refer to <code>UnitSId</code> values; in 613 * previous Levels of SBML, this data type did not exist and attributes were 614 * simply described to as 'referring to a unit identifier', but the effective 615 * data type was the same as <code>UnitSIdRef</code> in Level 3. These and 616 * other methods of libSBML refer to the type <code>UnitSIdRef</code> for all 617 * Levels of SBML, even if the corresponding SBML specification did not 618 * explicitly name the data type. 619 * 620 * 621 * 622 * This method works by looking at all unit identifier attribute values 623 * (including, if appropriate, inside mathematical formulas), comparing the 624 * referenced unit identifiers to the value of @p oldid. If any matches 625 * are found, the matching values are replaced with @p newid. The method 626 * does @em not descend into child elements. 627 * 628 * @param oldid the old identifier. 629 * @param newid the new identifier. 630 * 631 * 632 */ public new renameUnitSIdRefs(string oldid, string newid)633 void renameUnitSIdRefs(string oldid, string newid) { 634 libsbmlPINVOKE.StoichiometryMath_renameUnitSIdRefs(swigCPtr, oldid, newid); 635 } 636 637 638 /** */ /* libsbml-internal */ public new replaceSIDWithFunction(string id, ASTNode function)639 void replaceSIDWithFunction(string id, ASTNode function) { 640 libsbmlPINVOKE.StoichiometryMath_replaceSIDWithFunction(swigCPtr, id, ASTNode.getCPtr(function)); 641 } 642 643 } 644 645 } 646