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 The rate expression for an SBML reaction. 20 * 21 * An object of class KineticLaw is used to describe the rate at which the 22 * process defined by a given Reaction takes place. KineticLaw has 23 * subelements called 'math' (for MathML content) and 'listOfParameters' 24 * (of class ListOfParameters), in addition to the attributes and 25 * subelements it inherits from SBase. 26 * 27 * KineticLaw's 'math' subelement for holding a MathML formula (required 28 * through SBML Level 3 Version 1, but optional as of SBML 29 * Level 3 Version 2) defines the 30 * rate of the reaction. The formula may refer to other entities in a 31 * model as well as local parameter definitions within the scope of the 32 * Reaction (see below). It is important to keep in mind, however, that 33 * the only Species identifiers that can be used in this formula are those 34 * declared in the lists of reactants, products and modifiers in the 35 * Reaction structure. (In other words, before a species can be referenced 36 * in the KineticLaw, it must be declared in one of those lists.) 37 * 38 * KineticLaw provides a way to define @em local parameters whose 39 * identifiers can be used in the 'math' formula of that KineticLaw 40 * instance. Prior to SBML Level 3, these parameter definitions are 41 * stored inside a 'listOfParameters' subelement containing Parameter 42 * objects; in SBML Level 3, this is achieved using a specialized 43 * object class called LocalParameter and the containing subelement is 44 * called 'listOfLocalParameters'. In both cases, the parameters so 45 * defined are only visible within the KineticLaw (or, as of SBML 46 * Level 3 Version 2, only visible within the parent Reaction); 47 * they cannot be accessed 48 * outside. A local parameter within one reaction is not visible from 49 * within another reaction, nor is it visible to any other construct 50 * outside of the KineticLaw in which it is defined. In addition, another 51 * important feature is that if such a Parameter (or in Level 3, 52 * LocalParameter) object has the same identifier as another object in the 53 * scope of the enclosing Model, the definition inside the KineticLaw takes 54 * precedence. In other words, within the KineticLaw's 'math' formula, 55 * references to local parameter identifiers <strong>shadow any identical 56 * global identifiers</strong>. 57 * 58 * The values of local parameters defined within KineticLaw objects cannot 59 * change. In SBML Level 3, this quality is built into the 60 * LocalParameter construct. In Level 2, where the same kind of 61 * Parameter object class is used as for global parameters, the Parameter 62 * objects' 'constant' attribute must always have a value of @c true 63 * (either explicitly or left to its default value). 64 * 65 * 66 * @section shadowing-warning A warning about identifier shadowing 67 * 68 * A common misconception is that different classes of objects (e.g., 69 * species, compartments, parameters) in SBML have different identifier 70 * scopes. They do not. The implication is that if a KineticLaw's local 71 * parameter definition uses an identifier identical to @em any other 72 * identifier defined in the model outside the KineticLaw, even if the 73 * other identifier does @em not belong to a parameter type of object, the 74 * local parameter's identifier takes precedence within that KineticLaw's 75 * 'math' formula. It is not an error in SBML for identifiers to shadow 76 * each other this way, but can lead to confusing and subtle errors. 77 * 78 * 79 * @section version-diffs SBML Level/Version differences 80 * 81 * In SBML Level 2 Version 1, the SBML specification 82 * included two additional attributes on KineticLaw called 'substanceUnits' 83 * and 'timeUnits'. They were removed beginning with SBML Level 2 84 * Version 2 because further research determined they introduced many 85 * problems. The most significant problem was that their use could easily 86 * lead to the creation of valid models whose reactions nevertheless could 87 * not be integrated into a system of equations without outside knowledge 88 * for converting the quantities used. Examination of real-life models 89 * revealed that a common reason for using 'substanceUnits' on KineticLaw 90 * was to set the units of all reactions to the same set of substance 91 * units, something that is better achieved by using UnitDefinition to 92 * redefine @c 'substance' for the whole Model. 93 * 94 * As mentioned above, in SBML Level 2 Versions 2–4, local 95 * parameters are of class Parameter. In SBML Level 3, the class of 96 * object is LocalParameter. 97 * 98 * In SBML Level 3 Version 2, the scope of the LocalParameter 99 * was expanded to the entire Reaction, instead of just the KineticLaw. 100 * This introduced a single new restriction: an L3v2 LocalParameter may 101 * not now shadow the @c id of any Species referenced by a SpeciesReference 102 * in the same Reaction. Other than that, there is no difference in any 103 * core construct. However, packages may take advantage of this new scope by 104 * adding elements to the Reaction that may now reference a LocalParameter 105 * defined in the same Reaction. 106 */ 107 108 public class KineticLaw : SBase { 109 private HandleRef swigCPtr; 110 KineticLaw(IntPtr cPtr, bool cMemoryOwn)111 internal KineticLaw(IntPtr cPtr, bool cMemoryOwn) : base(libsbmlPINVOKE.KineticLaw_SWIGUpcast(cPtr), cMemoryOwn) 112 { 113 //super(libsbmlPINVOKE.KineticLawUpcast(cPtr), cMemoryOwn); 114 swigCPtr = new HandleRef(this, cPtr); 115 } 116 getCPtr(KineticLaw obj)117 internal static HandleRef getCPtr(KineticLaw obj) 118 { 119 return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr; 120 } 121 getCPtrAndDisown(KineticLaw obj)122 internal static HandleRef getCPtrAndDisown (KineticLaw obj) 123 { 124 HandleRef ptr = new HandleRef(null, IntPtr.Zero); 125 126 if (obj != null) 127 { 128 ptr = obj.swigCPtr; 129 obj.swigCMemOwn = false; 130 } 131 132 return ptr; 133 } 134 Dispose(bool disposing)135 protected override void Dispose(bool disposing) { 136 lock(this) { 137 if (swigCPtr.Handle != global::System.IntPtr.Zero) { 138 if (swigCMemOwn) { 139 swigCMemOwn = false; 140 libsbmlPINVOKE.delete_KineticLaw(swigCPtr); 141 } 142 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); 143 } 144 base.Dispose(disposing); 145 } 146 } 147 148 149 /** 150 * Creates a new KineticLaw using the given SBML @p level and @p version 151 * values. 152 * 153 * @param level a long integer, the SBML Level to assign to this KineticLaw. 154 * 155 * @param version a long integer, the SBML Version to assign to this 156 * KineticLaw. 157 * 158 * 159 * @throws SBMLConstructorException 160 * Thrown if the given @p level and @p version combination are invalid 161 * or if this object is incompatible with the given level and version. 162 * 163 * 164 * 165 * 166 * @note Attempting to add an object to an SBMLDocument having a different 167 * combination of SBML Level, Version and XML namespaces than the object 168 * itself will result in an error at the time a caller attempts to make the 169 * addition. A parent object must have compatible Level, Version and XML 170 * namespaces. (Strictly speaking, a parent may also have more XML 171 * namespaces than a child, but the reverse is not permitted.) The 172 * restriction is necessary to ensure that an SBML model has a consistent 173 * overall structure. This requires callers to manage their objects 174 * carefully, but the benefit is increased flexibility in how models can be 175 * created by permitting callers to create objects bottom-up if desired. In 176 * situations where objects are not yet attached to parents (e.g., 177 * SBMLDocument), knowledge of the intented SBML Level and Version help 178 * libSBML determine such things as whether it is valid to assign a 179 * particular value to an attribute. 180 * 181 * 182 */ public KineticLaw(long level, long version)183 KineticLaw(long level, long version) : this(libsbmlPINVOKE.new_KineticLaw__SWIG_0(level, version), true) { 184 if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve(); 185 } 186 187 188 /** 189 * Creates a new KineticLaw using the given SBMLNamespaces object 190 * @p sbmlns. 191 * 192 * 193 * 194 * The SBMLNamespaces object encapsulates SBML Level/Version/namespaces 195 * information. It is used to communicate the SBML Level, Version, and (in 196 * Level 3) packages used in addition to SBML Level 3 Core. A 197 * common approach to using libSBML's SBMLNamespaces facilities is to create an 198 * SBMLNamespaces object somewhere in a program once, then hand that object 199 * as needed to object constructors that accept SBMLNamespaces as arguments. 200 * 201 * 202 * 203 * @param sbmlns an SBMLNamespaces object. 204 * 205 * 206 * @throws SBMLConstructorException 207 * Thrown if the given @p sbmlns is inconsistent or incompatible 208 * with this object. 209 * 210 * 211 * 212 * 213 * @note Attempting to add an object to an SBMLDocument having a different 214 * combination of SBML Level, Version and XML namespaces than the object 215 * itself will result in an error at the time a caller attempts to make the 216 * addition. A parent object must have compatible Level, Version and XML 217 * namespaces. (Strictly speaking, a parent may also have more XML 218 * namespaces than a child, but the reverse is not permitted.) The 219 * restriction is necessary to ensure that an SBML model has a consistent 220 * overall structure. This requires callers to manage their objects 221 * carefully, but the benefit is increased flexibility in how models can be 222 * created by permitting callers to create objects bottom-up if desired. In 223 * situations where objects are not yet attached to parents (e.g., 224 * SBMLDocument), knowledge of the intented SBML Level and Version help 225 * libSBML determine such things as whether it is valid to assign a 226 * particular value to an attribute. 227 * 228 * 229 */ public KineticLaw(SBMLNamespaces sbmlns)230 KineticLaw(SBMLNamespaces sbmlns) : this(libsbmlPINVOKE.new_KineticLaw__SWIG_1(SBMLNamespaces.getCPtr(sbmlns)), true) { 231 if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve(); 232 } 233 234 235 /** 236 * Copy constructor; creates a copy of this KineticLaw. 237 * 238 * @param orig the object to copy. 239 */ public KineticLaw(KineticLaw orig)240 KineticLaw(KineticLaw orig) : this(libsbmlPINVOKE.new_KineticLaw__SWIG_2(KineticLaw.getCPtr(orig)), true) { 241 if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve(); 242 } 243 244 245 /** 246 * Creates and returns a deep copy of this KineticLaw object. 247 * 248 * @return the (deep) copy of this KineticLaw object. 249 */ public new clone()250 KineticLaw clone() { 251 global::System.IntPtr cPtr = libsbmlPINVOKE.KineticLaw_clone(swigCPtr); 252 KineticLaw ret = (cPtr == global::System.IntPtr.Zero) ? null : new KineticLaw(cPtr, true); 253 return ret; 254 } 255 256 257 /** 258 * Returns the first child element found that has the given @p id in the 259 * model-wide SId namespace, or @c null if no such object is found. 260 * 261 * @param id string representing the id of the object to find. 262 * 263 * @return pointer to the first element found with the given @p id. 264 */ public new getElementBySId(string id)265 SBase getElementBySId(string id) { 266 SBase ret = (SBase) libsbml.DowncastSBase(libsbmlPINVOKE.KineticLaw_getElementBySId(swigCPtr, id), false); 267 return ret; 268 } 269 270 271 /** 272 * Returns the first child element it can find with the given @p metaid, or 273 * @c null if no such object is found. 274 * 275 * @param metaid string representing the metaid of the object to find. 276 * 277 * @return pointer to the first element found with the given @p metaid. 278 */ public new getElementByMetaId(string metaid)279 SBase getElementByMetaId(string metaid) { 280 SBase ret = (SBase) libsbml.DowncastSBase(libsbmlPINVOKE.KineticLaw_getElementByMetaId(swigCPtr, metaid), false); 281 return ret; 282 } 283 284 285 /** 286 * Returns the mathematical formula for this KineticLaw object and return 287 * it as as a text string. 288 * 289 * This is fundamentally equivalent to 290 * @if java KineticLaw::getMath()@else getMath()@endif. 291 * This variant is provided principally for compatibility compatibility 292 * with SBML Level 1. 293 * 294 * @return a string representing the formula of this KineticLaw. 295 * 296 * @note @htmlinclude level-1-uses-text-string-math.html 297 * 298 * @see getMath() 299 */ public getFormula()300 string getFormula() { 301 string ret = libsbmlPINVOKE.KineticLaw_getFormula(swigCPtr); 302 return ret; 303 } 304 305 306 /** 307 * Returns the mathematical formula for this KineticLaw object and return 308 * it as as an AST. 309 * 310 * This is fundamentally equivalent to 311 * @if java KineticLaw::getFormula()@else getFormula()@endif. 312 * The latter is provided principally for compatibility compatibility 313 * with SBML Level 1, which represented mathematical formulas in 314 * text-string form. 315 * 316 * @return the ASTNode representation of the mathematical formula, 317 * or @c null if the math is not set. 318 * 319 * @see getFormula() 320 */ public new getMath()321 ASTNode getMath() { 322 global::System.IntPtr cPtr = libsbmlPINVOKE.KineticLaw_getMath(swigCPtr); 323 ASTNode ret = (cPtr == global::System.IntPtr.Zero) ? null : new ASTNode(cPtr, false); 324 return ret; 325 } 326 327 328 /** 329 * (SBML Level 2 Version 1 only) Returns the value of the 330 * 'timeUnits' attribute of this KineticLaw object. 331 * 332 * @return the 'timeUnits' attribute value. 333 * 334 * 335 * @note The attributes 'timeUnits' and 'substanceUnits' are present only 336 * in SBML Level 2 Version 1. In SBML Level 2 337 * Version 2, the 'timeUnits' and 'substanceUnits' attributes were 338 * removed. For compatibility with new versions of SBML, users are 339 * cautioned to avoid these attributes. 340 * 341 */ public getTimeUnits()342 string getTimeUnits() { 343 string ret = libsbmlPINVOKE.KineticLaw_getTimeUnits(swigCPtr); 344 return ret; 345 } 346 347 348 /** 349 * (SBML Level 2 Version 1 only) Returns the value of the 350 * 'substanceUnits' attribute of this KineticLaw object. 351 * 352 * @return the 'substanceUnits' attribute value. 353 * 354 * 355 * @note The attributes 'timeUnits' and 'substanceUnits' are present only 356 * in SBML Level 2 Version 1. In SBML Level 2 357 * Version 2, the 'timeUnits' and 'substanceUnits' attributes were 358 * removed. For compatibility with new versions of SBML, users are 359 * cautioned to avoid these attributes. 360 * 361 */ public getSubstanceUnits()362 string getSubstanceUnits() { 363 string ret = libsbmlPINVOKE.KineticLaw_getSubstanceUnits(swigCPtr); 364 return ret; 365 } 366 367 368 /** 369 * Predicate returning @c true if this KineticLaw's 'formula' attribute is 370 * set. 371 * 372 * This is functionally identical to the method 373 * @if java KineticLaw::isSetMath()@else isSetMath()@endif. It is 374 * provided in order to mirror the parallel between 375 * @if java KineticLaw::getFormula()@else getFormula()@endif and 376 * @if java KineticLaw::getMath()@else getMath()@endif. 377 * 378 * @return @c true if the formula (meaning the @c math subelement) of 379 * this KineticLaw is set, @c false otherwise. 380 * 381 * @note @htmlinclude level-1-uses-text-string-math.html 382 * 383 * @see isSetMath() 384 */ public isSetFormula()385 bool isSetFormula() { 386 bool ret = libsbmlPINVOKE.KineticLaw_isSetFormula(swigCPtr); 387 return ret; 388 } 389 390 391 /** 392 * Predicate returning @c true if this Kinetic's 'math' subelement is set. 393 * 394 * This is identical to the method 395 * @if java KineticLaw::isSetFormula()@else isSetFormula()@endif. 396 * It is provided in order to mirror the parallel between 397 * @if java KineticLaw::getFormula()@else getFormula()@endif and 398 * @if java KineticLaw::getMath()@else getMath()@endif. 399 * 400 * @return @c true if the formula (meaning the @c math subelement) of 401 * this KineticLaw is set, @c false otherwise. 402 * 403 * @see isSetFormula() 404 */ public isSetMath()405 bool isSetMath() { 406 bool ret = libsbmlPINVOKE.KineticLaw_isSetMath(swigCPtr); 407 return ret; 408 } 409 410 411 /** 412 * (SBML Level 2 Version 1 only) Predicate returning @c true if 413 * this SpeciesReference's 'timeUnits' attribute is set. 414 * 415 * @return @c true if the 'timeUnits' attribute of this KineticLaw object 416 * is set, @c false otherwise. 417 * 418 * 419 * @note The attributes 'timeUnits' and 'substanceUnits' are present only 420 * in SBML Level 2 Version 1. In SBML Level 2 421 * Version 2, the 'timeUnits' and 'substanceUnits' attributes were 422 * removed. For compatibility with new versions of SBML, users are 423 * cautioned to avoid these attributes. 424 * 425 */ public isSetTimeUnits()426 bool isSetTimeUnits() { 427 bool ret = libsbmlPINVOKE.KineticLaw_isSetTimeUnits(swigCPtr); 428 return ret; 429 } 430 431 432 /** 433 * (SBML Level 2 Version 1 only) Predicate returning @c true if 434 * this SpeciesReference's 'substanceUnits' attribute is set. 435 * 436 * @return @c true if the 'substanceUnits' attribute of this KineticLaw 437 * object is set, @c false otherwise. 438 * 439 * 440 * @note The attributes 'timeUnits' and 'substanceUnits' are present only 441 * in SBML Level 2 Version 1. In SBML Level 2 442 * Version 2, the 'timeUnits' and 'substanceUnits' attributes were 443 * removed. For compatibility with new versions of SBML, users are 444 * cautioned to avoid these attributes. 445 * 446 */ public isSetSubstanceUnits()447 bool isSetSubstanceUnits() { 448 bool ret = libsbmlPINVOKE.KineticLaw_isSetSubstanceUnits(swigCPtr); 449 return ret; 450 } 451 452 453 /** 454 * Sets the mathematical expression of this KineticLaw instance to the 455 * given @p formula. 456 * 457 * The given @p formula string is copied. Internally, libSBML stores the 458 * mathematical expression as an ASTNode. 459 * 460 * @param formula the mathematical expression to use, represented in 461 * text-string form. 462 * 463 * 464 * @return integer value indicating success/failure of the 465 * function. @if clike The value is drawn from the 466 * enumeration #OperationReturnValues_t. @endif The possible values 467 * returned by this function are: 468 * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink 469 * @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink 470 * 471 * @note @htmlinclude level-1-uses-text-string-math.html 472 * 473 * @see setMath(ASTNode math) 474 */ public setFormula(string formula)475 int setFormula(string formula) { 476 int ret = libsbmlPINVOKE.KineticLaw_setFormula(swigCPtr, formula); 477 return ret; 478 } 479 480 481 /** 482 * Sets the mathematical expression of this KineticLaw instance to a copy 483 * of the given ASTNode. 484 * 485 * This is fundamentally identical to 486 * @if java KineticLaw::setFormula(String formula)@else getFormula()@endif. 487 * The latter is provided principally for compatibility compatibility with 488 * SBML Level 1, which represented mathematical formulas in text-string 489 * form. 490 * 491 * @param math an ASTNode representing a formula tree. 492 * 493 * 494 * @return integer value indicating success/failure of the 495 * function. @if clike The value is drawn from the 496 * enumeration #OperationReturnValues_t. @endif The possible values 497 * returned by this function are: 498 * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink 499 * @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink 500 * 501 * @see setFormula(string formula) 502 */ public new setMath(ASTNode math)503 int setMath(ASTNode math) { 504 int ret = libsbmlPINVOKE.KineticLaw_setMath(swigCPtr, ASTNode.getCPtr(math)); 505 return ret; 506 } 507 508 509 /** 510 * (SBML Level 2 Version 1 only) Sets the 'timeUnits' attribute 511 * of this KineticLaw object to a copy of the identifier in @p sid. 512 * 513 * @param sid the identifier of the units to use. 514 * 515 * 516 * @return integer value indicating success/failure of the 517 * function. @if clike The value is drawn from the 518 * enumeration #OperationReturnValues_t. @endif The possible values 519 * returned by this function are: 520 * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink 521 * @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink 522 * @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink 523 * 524 * 525 * @note The attributes 'timeUnits' and 'substanceUnits' are present only 526 * in SBML Level 2 Version 1. In SBML Level 2 527 * Version 2, the 'timeUnits' and 'substanceUnits' attributes were 528 * removed. For compatibility with new versions of SBML, users are 529 * cautioned to avoid these attributes. 530 * 531 */ public setTimeUnits(string sid)532 int setTimeUnits(string sid) { 533 int ret = libsbmlPINVOKE.KineticLaw_setTimeUnits(swigCPtr, sid); 534 return ret; 535 } 536 537 538 /** 539 * (SBML Level 2 Version 1 only) Sets the 'substanceUnits' 540 * attribute of this KineticLaw object to a copy of the identifier given 541 * in @p sid. 542 * 543 * @param sid the identifier of the units to use. 544 * 545 * 546 * @return integer value indicating success/failure of the 547 * function. @if clike The value is drawn from the 548 * enumeration #OperationReturnValues_t. @endif The possible values 549 * returned by this function are: 550 * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink 551 * @li @link libsbml#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink 552 * @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink 553 * 554 * 555 * @note The attributes 'timeUnits' and 'substanceUnits' are present only 556 * in SBML Level 2 Version 1. In SBML Level 2 557 * Version 2, the 'timeUnits' and 'substanceUnits' attributes were 558 * removed. For compatibility with new versions of SBML, users are 559 * cautioned to avoid these attributes. 560 * 561 */ public setSubstanceUnits(string sid)562 int setSubstanceUnits(string sid) { 563 int ret = libsbmlPINVOKE.KineticLaw_setSubstanceUnits(swigCPtr, sid); 564 return ret; 565 } 566 567 568 /** 569 * (SBML Level 2 Version 1 only) Unsets the 'timeUnits' 570 * attribugte of this KineticLaw object. 571 * 572 * 573 * @return integer value indicating success/failure of the 574 * function. @if clike The value is drawn from the 575 * enumeration #OperationReturnValues_t. @endif The possible values 576 * returned by this function are: 577 * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink 578 * @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink 579 * @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink 580 * 581 * 582 * @note The attributes 'timeUnits' and 'substanceUnits' are present only 583 * in SBML Level 2 Version 1. In SBML Level 2 584 * Version 2, the 'timeUnits' and 'substanceUnits' attributes were 585 * removed. For compatibility with new versions of SBML, users are 586 * cautioned to avoid these attributes. 587 * 588 */ public unsetTimeUnits()589 int unsetTimeUnits() { 590 int ret = libsbmlPINVOKE.KineticLaw_unsetTimeUnits(swigCPtr); 591 return ret; 592 } 593 594 595 /** 596 * (SBML Level 2 Version 1 only) Unsets the 'substanceUnits' 597 * attribute of this KineticLaw object. 598 * 599 * 600 * @return integer value indicating success/failure of the 601 * function. @if clike The value is drawn from the 602 * enumeration #OperationReturnValues_t. @endif The possible values 603 * returned by this function are: 604 * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink 605 * @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink 606 * @li @link libsbml#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink 607 * 608 * 609 * @note The attributes 'timeUnits' and 'substanceUnits' are present only 610 * in SBML Level 2 Version 1. In SBML Level 2 611 * Version 2, the 'timeUnits' and 'substanceUnits' attributes were 612 * removed. For compatibility with new versions of SBML, users are 613 * cautioned to avoid these attributes. 614 * 615 */ public unsetSubstanceUnits()616 int unsetSubstanceUnits() { 617 int ret = libsbmlPINVOKE.KineticLaw_unsetSubstanceUnits(swigCPtr); 618 return ret; 619 } 620 621 622 /** 623 * Adds a copy of the given Parameter object to the list of local 624 * parameters in this KineticLaw. 625 * 626 * 627 * This function should be used for SBML Level 1 and Level 2 documents, 628 * as the equivalent constructs in Level 3 are LocalParameter objects instead. 629 * 630 * 631 * 632 * @param p the Parameter to add. 633 * 634 * 635 * @return integer value indicating success/failure of the 636 * function. @if clike The value is drawn from the 637 * enumeration #OperationReturnValues_t. @endif The possible values 638 * returned by this function are: 639 * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink 640 * @li @link libsbml#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH@endlink 641 * @li @link libsbml#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH@endlink 642 * @li @link libsbml#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID@endlink 643 * @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink 644 * @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink 645 * 646 * 647 * @note This method should be used with some caution. The fact that this 648 * method @em copies the object passed to it means that the caller will be 649 * left holding a physically different object instance than the one contained 650 * inside this object. Changes made to the original object instance (such as 651 * resetting attribute values) will <em>not affect the instance in this 652 * object</em>. In addition, the caller should make sure to free the 653 * original object if it is no longer being used, or else a memory leak will 654 * result. Please see other methods on this class (particularly a 655 * corresponding method whose name begins with the word <code>create</code>) 656 * for alternatives that do not lead to these issues. 657 * 658 * 659 * 660 * @see createParameter() 661 */ public addParameter(Parameter p)662 int addParameter(Parameter p) { 663 int ret = libsbmlPINVOKE.KineticLaw_addParameter(swigCPtr, Parameter.getCPtr(p)); 664 return ret; 665 } 666 667 668 /** 669 * Adds a copy of the given LocalParameter object to the list of local 670 * parameters in this KineticLaw. 671 * 672 * 673 * This function should be used for SBML Level 3 documents, as the equivalent 674 * constructs in Level 2 and Level 1 are Parameter objects instead. 675 * 676 * 677 * 678 * 679 * @param p the LocalParameter to add. 680 * 681 * 682 * @return integer value indicating success/failure of the 683 * function. @if clike The value is drawn from the 684 * enumeration #OperationReturnValues_t. @endif The possible values 685 * returned by this function are: 686 * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink 687 * @li @link libsbml#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH@endlink 688 * @li @link libsbml#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH@endlink 689 * @li @link libsbml#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID@endlink 690 * @li @link libsbml#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink 691 * @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink 692 * 693 * 694 * @note This method should be used with some caution. The fact that this 695 * method @em copies the object passed to it means that the caller will be 696 * left holding a physically different object instance than the one contained 697 * inside this object. Changes made to the original object instance (such as 698 * resetting attribute values) will <em>not affect the instance in this 699 * object</em>. In addition, the caller should make sure to free the 700 * original object if it is no longer being used, or else a memory leak will 701 * result. Please see other methods on this class (particularly a 702 * corresponding method whose name begins with the word <code>create</code>) 703 * for alternatives that do not lead to these issues. 704 * 705 * 706 * 707 * @see createLocalParameter() 708 */ public addLocalParameter(LocalParameter p)709 int addLocalParameter(LocalParameter p) { 710 int ret = libsbmlPINVOKE.KineticLaw_addLocalParameter(swigCPtr, LocalParameter.getCPtr(p)); 711 return ret; 712 } 713 714 715 /** 716 * Creates a new Parameter object, adds it to this KineticLaw's list of 717 * parameters, and returns the Parameter object created. 718 * 719 * 720 * This function should be used for SBML Level 1 and Level 2 documents, 721 * as the equivalent constructs in Level 3 are LocalParameter objects instead. 722 * 723 * 724 * 725 * @return a new Parameter object instance. 726 * 727 * @see addParameter(Parameter p) 728 */ public createParameter()729 Parameter createParameter() { 730 global::System.IntPtr cPtr = libsbmlPINVOKE.KineticLaw_createParameter(swigCPtr); 731 Parameter ret = (cPtr == global::System.IntPtr.Zero) ? null : new Parameter(cPtr, false); 732 return ret; 733 } 734 735 736 /** 737 * Creates a new LocalParameter object, adds it to this KineticLaw's list 738 * of local parameters, and returns the LocalParameter object created. 739 * 740 * 741 * This function should be used for SBML Level 3 documents, as the equivalent 742 * constructs in Level 2 and Level 1 are Parameter objects instead. 743 * 744 * 745 * 746 * 747 * @return a new LocalParameter object instance. 748 * 749 * @see addLocalParameter(LocalParameter p) 750 */ public createLocalParameter()751 LocalParameter createLocalParameter() { 752 global::System.IntPtr cPtr = libsbmlPINVOKE.KineticLaw_createLocalParameter(swigCPtr); 753 LocalParameter ret = (cPtr == global::System.IntPtr.Zero) ? null : new LocalParameter(cPtr, false); 754 return ret; 755 } 756 757 758 /** 759 * Returns the list of parameters in this KineticLaw object. 760 * 761 * 762 * This function should be used for SBML Level 1 and Level 2 documents, 763 * as the equivalent constructs in Level 3 are LocalParameter objects instead. 764 * 765 * 766 * 767 * @return the list of Parameters for this KineticLaw. 768 */ public getListOfParameters()769 ListOfParameters getListOfParameters() { 770 global::System.IntPtr cPtr = libsbmlPINVOKE.KineticLaw_getListOfParameters__SWIG_0(swigCPtr); 771 ListOfParameters ret = (cPtr == global::System.IntPtr.Zero) ? null : new ListOfParameters(cPtr, false); 772 return ret; 773 } 774 775 776 /** 777 * Returns the list of local parameters in this KineticLaw object. 778 * 779 * 780 * This function should be used for SBML Level 3 documents, as the equivalent 781 * constructs in Level 2 and Level 1 are Parameter objects instead. 782 * 783 * 784 * 785 * 786 * @return the list of LocalParameters for this KineticLaw. 787 */ public getListOfLocalParameters()788 ListOfLocalParameters getListOfLocalParameters() { 789 global::System.IntPtr cPtr = libsbmlPINVOKE.KineticLaw_getListOfLocalParameters__SWIG_0(swigCPtr); 790 ListOfLocalParameters ret = (cPtr == global::System.IntPtr.Zero) ? null : new ListOfLocalParameters(cPtr, false); 791 return ret; 792 } 793 794 795 /** 796 * Returns the nth Parameter object in the list of parameters in 797 * this KineticLaw instance. 798 * 799 * 800 * This function should be used for SBML Level 1 and Level 2 documents, 801 * as the equivalent constructs in Level 3 are LocalParameter objects instead. 802 * 803 * 804 * 805 * @param n the index of the Parameter object sought. 806 * 807 * @return the nth Parameter of this KineticLaw. 808 * If the index @p n is invalid, @c null is returned. 809 */ public getParameter(long n)810 Parameter getParameter(long n) { 811 global::System.IntPtr cPtr = libsbmlPINVOKE.KineticLaw_getParameter__SWIG_0(swigCPtr, n); 812 Parameter ret = (cPtr == global::System.IntPtr.Zero) ? null : new Parameter(cPtr, false); 813 return ret; 814 } 815 816 817 /** 818 * Returns the nth LocalParameter object in the list of local parameters in 819 * this KineticLaw instance. 820 * 821 * 822 * This function should be used for SBML Level 3 documents, as the equivalent 823 * constructs in Level 2 and Level 1 are Parameter objects instead. 824 * 825 * 826 * 827 * 828 * @param n the index of the LocalParameter object sought. 829 * 830 * @return the nth LocalParameter of this KineticLaw. 831 * If the index @p n is invalid, @c null is returned. 832 */ public getLocalParameter(long n)833 LocalParameter getLocalParameter(long n) { 834 global::System.IntPtr cPtr = libsbmlPINVOKE.KineticLaw_getLocalParameter__SWIG_0(swigCPtr, n); 835 LocalParameter ret = (cPtr == global::System.IntPtr.Zero) ? null : new LocalParameter(cPtr, false); 836 return ret; 837 } 838 839 840 /** 841 * Returns a parameter based on its identifier. 842 * 843 * 844 * This function should be used for SBML Level 1 and Level 2 documents, 845 * as the equivalent constructs in Level 3 are LocalParameter objects instead. 846 * 847 * 848 * 849 * @param sid the identifier of the Parameter being sought. 850 * 851 * @return the Parameter object in this KineticLaw instace having the 852 * given 'id', or @c null if no such Parameter exists. 853 */ public getParameter(string sid)854 Parameter getParameter(string sid) { 855 global::System.IntPtr cPtr = libsbmlPINVOKE.KineticLaw_getParameter__SWIG_2(swigCPtr, sid); 856 Parameter ret = (cPtr == global::System.IntPtr.Zero) ? null : new Parameter(cPtr, false); 857 return ret; 858 } 859 860 861 /** 862 * Returns a local parameter based on its identifier. 863 * 864 * 865 * This function should be used for SBML Level 3 documents, as the equivalent 866 * constructs in Level 2 and Level 1 are Parameter objects instead. 867 * 868 * 869 * 870 * 871 * @param sid the identifier of the LocalParameter being sought. 872 * 873 * @return the LocalParameter object in this KineticLaw instace having the 874 * given 'id', or @c null if no such LocalParameter exists. 875 */ public getLocalParameter(string sid)876 LocalParameter getLocalParameter(string sid) { 877 global::System.IntPtr cPtr = libsbmlPINVOKE.KineticLaw_getLocalParameter__SWIG_2(swigCPtr, sid); 878 LocalParameter ret = (cPtr == global::System.IntPtr.Zero) ? null : new LocalParameter(cPtr, false); 879 return ret; 880 } 881 882 883 /** 884 * Returns the number of parameters in this KineticLaw instance. 885 * 886 * 887 * This function should be used for SBML Level 1 and Level 2 documents, 888 * as the equivalent constructs in Level 3 are LocalParameter objects instead. 889 * 890 * 891 * 892 * @return the number of Parameters in this KineticLaw. 893 */ public getNumParameters()894 long getNumParameters() { return (long)libsbmlPINVOKE.KineticLaw_getNumParameters(swigCPtr); } 895 896 897 /** 898 * Returns the number of local parameters in this KineticLaw instance. 899 * 900 * 901 * This function should be used for SBML Level 3 documents, as the equivalent 902 * constructs in Level 2 and Level 1 are Parameter objects instead. 903 * 904 * 905 * 906 * 907 * @return the number of LocalParameters in this KineticLaw. 908 */ public getNumLocalParameters()909 long getNumLocalParameters() { return (long)libsbmlPINVOKE.KineticLaw_getNumLocalParameters(swigCPtr); } 910 911 912 /** 913 * Calculates and returns a UnitDefinition that expresses the units of 914 * measurement assumed for the 'math' expression of this KineticLaw. 915 * 916 * 917 * 918 * The units are calculated based on the mathematical expression in the 919 * KineticLaw and the model quantities referenced by <code><ci></code> 920 * elements used within that expression. The 921 * @if java KineticLaw::getDerivedUnitDefinition()@else getDerivedUnitDefinition()@endif 922 * method returns the calculated units. 923 * 924 * 925 * 926 * 927 * @note The functionality that facilitates unit analysis depends on the 928 * model as a whole. Thus, in cases where the object has not been added to 929 * a model or the model itself is incomplete, unit analysis is not possible 930 * and this method will return @c null. 931 * 932 * 933 * 934 * 935 * @warning <span class='warning'>Note that it is possible the 'math' 936 * expression in the KineticLaw contains pure numbers or parameters with 937 * undeclared units. In those cases, it is not possible to calculate the 938 * units of the overall expression without making assumptions. LibSBML does 939 * not make assumptions about the units, and 940 * KineticLaw::getDerivedUnitDefinition() returns the units as far as it is 941 * able to determine them. For example, in an expression <em>X + Y</em>, if 942 * <em>X</em> has unambiguously-defined units and <em>Y</em> does not, it 943 * will return the units of <em>X</em>. <strong>It is important that callers 944 * also invoke the method</strong> 945 * KineticLaw::containsUndeclaredUnits()<strong>to determine whether this 946 * situation holds</strong>. Callers may wish to take suitable actions in 947 * those scenarios.</span> 948 * 949 * 950 * 951 * @return a UnitDefinition that expresses the units of the math 952 * expression of this KineticLaw, or @c null if one cannot be constructed. 953 * 954 * @see containsUndeclaredUnits() 955 */ public getDerivedUnitDefinition()956 UnitDefinition getDerivedUnitDefinition() { 957 global::System.IntPtr cPtr = libsbmlPINVOKE.KineticLaw_getDerivedUnitDefinition__SWIG_0(swigCPtr); 958 UnitDefinition ret = (cPtr == global::System.IntPtr.Zero) ? null : new UnitDefinition(cPtr, false); 959 return ret; 960 } 961 962 963 /** 964 * Predicate returning @c true if the math expression of this KineticLaw 965 * contains parameters/numbers with undeclared units. 966 * 967 * @return @c true if the math expression of this KineticLaw 968 * includes parameters/numbers 969 * with undeclared units, @c false otherwise. 970 * 971 * @note A return value of @c true indicates that the UnitDefinition 972 * returned by 973 * @if java KineticLaw::getDerivedUnitDefinition()@else getDerivedUnitDefinition()@endif 974 * may not accurately represent the units of the expression. 975 * 976 * @see getDerivedUnitDefinition() 977 */ public containsUndeclaredUnits()978 bool containsUndeclaredUnits() { 979 bool ret = libsbmlPINVOKE.KineticLaw_containsUndeclaredUnits__SWIG_0(swigCPtr); 980 return ret; 981 } 982 983 984 /** 985 * Removes the nth Parameter object in the list of parameters 986 * in this KineticLaw instance and returns a pointer to it. 987 * 988 * 989 * This function should be used for SBML Level 1 and Level 2 documents, 990 * as the equivalent constructs in Level 3 are LocalParameter objects instead. 991 * 992 * 993 * 994 * The caller owns the returned object and is responsible for deleting it. 995 * 996 * @param n the index of the Parameter object to remove. 997 * 998 * @return the Parameter object removed. As mentioned above, 999 * the caller owns the returned item. @c null is returned if the given index 1000 * is out of range. 1001 */ public removeParameter(long n)1002 Parameter removeParameter(long n) { 1003 global::System.IntPtr cPtr = libsbmlPINVOKE.KineticLaw_removeParameter__SWIG_0(swigCPtr, n); 1004 Parameter ret = (cPtr == global::System.IntPtr.Zero) ? null : new Parameter(cPtr, true); 1005 return ret; 1006 } 1007 1008 1009 /** 1010 * Removes the nth LocalParameter object in the list of local parameters 1011 * in this KineticLaw instance and returns a pointer to it. 1012 * 1013 * 1014 * This function should be used for SBML Level 3 documents, as the equivalent 1015 * constructs in Level 2 and Level 1 are Parameter objects instead. 1016 * 1017 * 1018 * 1019 * 1020 * The caller owns the returned object and is responsible for deleting it. 1021 * 1022 * @param n the index of the LocalParameter object to remove. 1023 * 1024 * @return the LocalParameter object removed. As mentioned above, 1025 * the caller owns the returned item. @c null is returned if the given index 1026 * is out of range. 1027 */ public removeLocalParameter(long n)1028 LocalParameter removeLocalParameter(long n) { 1029 global::System.IntPtr cPtr = libsbmlPINVOKE.KineticLaw_removeLocalParameter__SWIG_0(swigCPtr, n); 1030 LocalParameter ret = (cPtr == global::System.IntPtr.Zero) ? null : new LocalParameter(cPtr, true); 1031 return ret; 1032 } 1033 1034 1035 /** 1036 * Removes a Parameter object with the given identifier in the list of 1037 * parameters in this KineticLaw instance and returns a pointer to it. 1038 * 1039 * 1040 * This function should be used for SBML Level 1 and Level 2 documents, 1041 * as the equivalent constructs in Level 3 are LocalParameter objects instead. 1042 * 1043 * 1044 * 1045 * The caller owns the returned object and is responsible for deleting it. 1046 * 1047 * @param sid the identifier of the Parameter to remove. 1048 * 1049 * @return the Parameter object removed. As mentioned above, the 1050 * caller owns the returned object. @c null is returned if no Parameter 1051 * object with the identifier exists in this KineticLaw instance. 1052 */ public removeParameter(string sid)1053 Parameter removeParameter(string sid) { 1054 global::System.IntPtr cPtr = libsbmlPINVOKE.KineticLaw_removeParameter__SWIG_1(swigCPtr, sid); 1055 Parameter ret = (cPtr == global::System.IntPtr.Zero) ? null : new Parameter(cPtr, true); 1056 return ret; 1057 } 1058 1059 1060 /** 1061 * Removes a LocalParameter object with the given identifier in the list of 1062 * local parameters in this KineticLaw instance and returns a pointer to it. 1063 * 1064 * 1065 * This function should be used for SBML Level 3 documents, as the equivalent 1066 * constructs in Level 2 and Level 1 are Parameter objects instead. 1067 * 1068 * 1069 * 1070 * 1071 * The caller owns the returned object and is responsible for deleting it. 1072 * 1073 * @param sid the identifier of the LocalParameter to remove. 1074 * 1075 * @return the LocalParameter object removed. As mentioned above, the 1076 * caller owns the returned object. @c null is returned if no LocalParameter 1077 * object with the identifier exists in this KineticLaw instance. 1078 */ public removeLocalParameter(string sid)1079 LocalParameter removeLocalParameter(string sid) { 1080 global::System.IntPtr cPtr = libsbmlPINVOKE.KineticLaw_removeLocalParameter__SWIG_1(swigCPtr, sid); 1081 LocalParameter ret = (cPtr == global::System.IntPtr.Zero) ? null : new LocalParameter(cPtr, true); 1082 return ret; 1083 } 1084 connectToChild()1085 public override void connectToChild() { 1086 libsbmlPINVOKE.KineticLaw_connectToChild(swigCPtr); 1087 } 1088 1089 1090 /** */ /* libsbml-internal */ public new enablePackageInternal(string pkgURI, string pkgPrefix, bool flag)1091 void enablePackageInternal(string pkgURI, string pkgPrefix, bool flag) { 1092 libsbmlPINVOKE.KineticLaw_enablePackageInternal(swigCPtr, pkgURI, pkgPrefix, flag); 1093 } 1094 1095 1096 /** */ /* libsbml-internal */ public new updateSBMLNamespace(string package, long level, long version)1097 void updateSBMLNamespace(string package, long level, long version) { 1098 libsbmlPINVOKE.KineticLaw_updateSBMLNamespace(swigCPtr, package, level, version); 1099 } 1100 1101 1102 /** 1103 * Returns the libSBML type code for this %SBML object. 1104 * 1105 * 1106 * 1107 * LibSBML attaches an identifying code to every kind of SBML object. These 1108 * are integer constants known as <em>SBML type codes</em>. The names of all 1109 * the codes begin with the characters <code>SBML_</code>. 1110 * @if clike The set of possible type codes for core elements is defined in 1111 * the enumeration #SBMLTypeCode_t, and in addition, libSBML plug-ins for 1112 * SBML Level 3 packages define their own extra enumerations of type 1113 * codes (e.g., #SBMLLayoutTypeCode_t for the Level 3 Layout 1114 * package).@endif@if java In the Java language interface for libSBML, the 1115 * type codes are defined as static integer constants in the interface class 1116 * {@link libsbmlConstants}. @endif@if python In the Python language 1117 * interface for libSBML, the type codes are defined as static integer 1118 * constants in the interface class @link libsbml@endlink.@endif@if csharp In 1119 * the C# language interface for libSBML, the type codes are defined as 1120 * static integer constants in the interface class 1121 * @link libsbmlcs.libsbml@endlink.@endif Note that different Level 3 1122 * package plug-ins may use overlapping type codes; to identify the package 1123 * to which a given object belongs, call the 1124 * <code>@if conly SBase_getPackageName() 1125 * @else SBase::getPackageName() 1126 * @endif</code> 1127 * method on the object. 1128 * 1129 * The exception to this is lists: all SBML-style list elements have the type 1130 * @link libsbml#SBML_LIST_OF SBML_LIST_OF@endlink, regardless of what package they 1131 * are from. 1132 * 1133 * 1134 * 1135 * @return the SBML type code for this object: 1136 * @link libsbml#SBML_KINETIC_LAW SBML_KINETIC_LAW@endlink (default). 1137 * 1138 * 1139 * @warning <span class='warning'>The specific integer values of the possible 1140 * type codes may be reused by different libSBML plug-ins for SBML Level 3. 1141 * packages, To fully identify the correct code, <strong>it is necessary to 1142 * invoke both getPackageName() and getTypeCode()</strong> (or 1143 * ListOf::getItemTypeCode()).</span> 1144 * 1145 * 1146 * 1147 * @see getElementName() 1148 * @see getPackageName() 1149 */ public new getTypeCode()1150 int getTypeCode() { 1151 int ret = libsbmlPINVOKE.KineticLaw_getTypeCode(swigCPtr); 1152 return ret; 1153 } 1154 1155 1156 /** 1157 * Returns the XML element name of this object, which for Species, is 1158 * always @c 'kineticLaw'. 1159 * 1160 * @return the name of this element, i.e., @c 'kineticLaw'. 1161 */ public new getElementName()1162 string getElementName() { 1163 string ret = libsbmlPINVOKE.KineticLaw_getElementName(swigCPtr); 1164 return ret; 1165 } 1166 1167 1168 /** 1169 * Predicate returning @c true if all the required attributes for this 1170 * KineticLaw object have been set. 1171 * 1172 * The required attributes for a KineticLaw object are: 1173 * @li 'formula' (SBML Level 1 only) 1174 * 1175 * @return @c true if the required attributes have been set, @c false 1176 * otherwise. 1177 */ public new hasRequiredAttributes()1178 bool hasRequiredAttributes() { 1179 bool ret = libsbmlPINVOKE.KineticLaw_hasRequiredAttributes(swigCPtr); 1180 return ret; 1181 } 1182 1183 1184 /** 1185 * Predicate returning @c true if all the required elements for this 1186 * KineticLaw object have been set. 1187 * 1188 * @note The required elements for a KineticLaw object are: 1189 * @li 'math' inSBML Level 2 and Level 3 Version 1. 1190 * (In SBML Level 3 Version 2+, it is no longer required.) 1191 * 1192 * @return a boolean value indicating whether all the required 1193 * elements for this object have been defined. 1194 */ public new hasRequiredElements()1195 bool hasRequiredElements() { 1196 bool ret = libsbmlPINVOKE.KineticLaw_hasRequiredElements(swigCPtr); 1197 return ret; 1198 } 1199 1200 1201 /** 1202 * Finds this KineticLaw's Reaction parent and calls unsetKineticLaw() on 1203 * it, indirectly deleting itself. 1204 * 1205 * Overridden from the SBase function since the parent is not a ListOf. 1206 * 1207 * 1208 * @return integer value indicating success/failure of the 1209 * function. @if clike The value is drawn from the 1210 * enumeration #OperationReturnValues_t. @endif The possible values 1211 * returned by this function are: 1212 * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink 1213 * @li @link libsbml#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink 1214 */ public new removeFromParentAndDelete()1215 int removeFromParentAndDelete() { 1216 int ret = libsbmlPINVOKE.KineticLaw_removeFromParentAndDelete(swigCPtr); 1217 return ret; 1218 } 1219 1220 1221 /** 1222 * 1223 * Replaces all uses of a given @c SIdRef type attribute value with another 1224 * value. 1225 * 1226 * 1227 * 1228 1229 * In SBML, object identifiers are of a data type called <code>SId</code>. 1230 * In SBML Level 3, an explicit data type called <code>SIdRef</code> was 1231 * introduced for attribute values that refer to <code>SId</code> values; in 1232 * previous Levels of SBML, this data type did not exist and attributes were 1233 * simply described to as 'referring to an identifier', but the effective 1234 * data type was the same as <code>SIdRef</code> in Level 3. These and 1235 * other methods of libSBML refer to the type <code>SIdRef</code> for all 1236 * Levels of SBML, even if the corresponding SBML specification did not 1237 * explicitly name the data type. 1238 * 1239 * 1240 * 1241 * This method works by looking at all attributes and (if appropriate) 1242 * mathematical formulas in MathML content, comparing the referenced 1243 * identifiers to the value of @p oldid. If any matches are found, the 1244 * matching values are replaced with @p newid. The method does @em not 1245 * descend into child elements. 1246 * 1247 * @param oldid the old identifier. 1248 * @param newid the new identifier. 1249 * 1250 * 1251 */ public new renameSIdRefs(string oldid, string newid)1252 void renameSIdRefs(string oldid, string newid) { 1253 libsbmlPINVOKE.KineticLaw_renameSIdRefs(swigCPtr, oldid, newid); 1254 } 1255 1256 1257 /** 1258 * 1259 * Replaces all uses of a given @c UnitSIdRef type attribute value with 1260 * another value. 1261 * 1262 * 1263 * 1264 * In SBML, unit definitions have identifiers of type <code>UnitSId</code>. In 1265 * SBML Level 3, an explicit data type called <code>UnitSIdRef</code> was 1266 * introduced for attribute values that refer to <code>UnitSId</code> values; in 1267 * previous Levels of SBML, this data type did not exist and attributes were 1268 * simply described to as 'referring to a unit identifier', but the effective 1269 * data type was the same as <code>UnitSIdRef</code> in Level 3. These and 1270 * other methods of libSBML refer to the type <code>UnitSIdRef</code> for all 1271 * Levels of SBML, even if the corresponding SBML specification did not 1272 * explicitly name the data type. 1273 * 1274 * 1275 * 1276 * This method works by looking at all unit identifier attribute values 1277 * (including, if appropriate, inside mathematical formulas), comparing the 1278 * referenced unit identifiers to the value of @p oldid. If any matches 1279 * are found, the matching values are replaced with @p newid. The method 1280 * does @em not descend into child elements. 1281 * 1282 * @param oldid the old identifier. 1283 * @param newid the new identifier. 1284 * 1285 * 1286 */ public new renameUnitSIdRefs(string oldid, string newid)1287 void renameUnitSIdRefs(string oldid, string newid) { 1288 libsbmlPINVOKE.KineticLaw_renameUnitSIdRefs(swigCPtr, oldid, newid); 1289 } 1290 1291 1292 /** */ /* libsbml-internal */ public new replaceSIDWithFunction(string id, ASTNode function)1293 void replaceSIDWithFunction(string id, ASTNode function) { 1294 libsbmlPINVOKE.KineticLaw_replaceSIDWithFunction(swigCPtr, id, ASTNode.getCPtr(function)); 1295 } 1296 1297 1298 /** */ /* libsbml-internal */ public new divideAssignmentsToSIdByFunction(string id, ASTNode function)1299 void divideAssignmentsToSIdByFunction(string id, ASTNode function) { 1300 libsbmlPINVOKE.KineticLaw_divideAssignmentsToSIdByFunction(swigCPtr, id, ASTNode.getCPtr(function)); 1301 } 1302 1303 1304 /** */ /* libsbml-internal */ public new multiplyAssignmentsToSIdByFunction(string id, ASTNode function)1305 void multiplyAssignmentsToSIdByFunction(string id, ASTNode function) { 1306 libsbmlPINVOKE.KineticLaw_multiplyAssignmentsToSIdByFunction(swigCPtr, id, ASTNode.getCPtr(function)); 1307 } 1308 1309 } 1310 1311 } 1312