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 Base class for extending SBML objects in packages. 20 * 21 * @htmlinclude not-sbml-warning.html 22 * 23 * The SBasePlugin class is libSBML's base class for extensions of core SBML 24 * component objects. SBasePlugin defines basic virtual methods for 25 * reading/writing/checking additional attributes and/or subobjects; these 26 * methods should be overridden by subclasses to implement the necessary 27 * features of an extended SBML object. 28 * 29 * @if clike 30 * @section sbaseplugin-howto How to extend SBasePlugin for a package implementation 31 * 32 * 33 * LibSBML package extensions can extend existing libSBML objects such as Model 34 * using SBasePlugin as a base class, to hold attributes and/or subcomponents 35 * necessary for the SBML package being implemented. Package developers must 36 * implement an SBasePlugin extended class for each element to be extended 37 * (e.g., Model, Reaction, and others) where additional attributes and/or 38 * top-level objects of the package extension are directly contained. The 39 * following subsections detail the basic steps necessary to use SBasePlugin 40 * for the implementation of a class extension. 41 * 42 * @subsection sbp-identify 1. Identify the SBML components that need to be extended 43 * 44 * The specification for a SBML Level 3 package will define the 45 * attributes and subojects that make up the package constructs. Those 46 * constructs that modify existing SBML components such as Model, 47 * Reaction, etc., will be the ones that need to be extended using SBasePlugin. 48 * 49 * For example, the Layout package makes additions to Model, 50 * SpeciesReference, and the <code><sbml></code> element (which is 51 * represented in libSBML by SBMLDocument). This means that the Layout 52 * package extension in libSBML needs to define extended versions of Model, 53 * SpeciesReference and SBMLDocument. Elements @em other than the SBML 54 * document need to be implemented using SBasePlugin; the document component 55 * must be implemented using SBMLDocumentPlugin instead. 56 * 57 * 58 * @subsection sbp-implement 2. Create a SBasePlugin subclass for each extended SBML component 59 * 60 * A new class definition that subclasses SBasePlugin needs to be created for 61 * each SBML component to be extended by the package. For instance, the 62 * Layout package needs LayoutModelPlugin and LayoutSpeciesReferencePlugin. 63 * (As mentioned above, the Layout class also needs LayoutSBMLDocumentPlugin, 64 * but this one is implemented using SBMLDocumentPlugin instead of 65 * SBasePlugin.) Below, we describe in detail the different parts of an 66 * SBasePlugin subclass definition. 67 * 68 * @subsubsection sbp-protected 2.1 Define protected data members 69 * 70 * Data attributes on each extended class in an SBML package will have one of 71 * the data types <code>string</code>, <code>double</code>, 72 * <code>int</code>, or <code>bool</code>. Subelements/subobjects will normally 73 * be derived from the ListOf class or from SBase. 74 * 75 * The additional data members must be properly initialized in the class 76 * constructor, and must be properly copied in the copy constructor and 77 * assignment operator. For example, the following data member is defined in 78 * the <code>GroupsModelPlugin</code> class (in the file 79 * <code>GroupsModelPlugin.h</code>): 80 * @code{.cpp} 81 ListOfGroups mGroups; 82 @endcode 83 * 84 * @subsubsection sbp-class-methods 2.2 Override SBasePlugin class-related methods 85 * 86 * The derived class must override the constructor, copy constructor, assignment 87 * operator (<code>operator=</code>) and <code>clone()</code> methods from 88 * SBasePlugin. 89 * 90 * 91 * @subsubsection sbp-methods-attribs 2.3 Override SBasePlugin virtual methods for attributes 92 * 93 * If the extended component is defined by the SBML Level 3 package to have 94 * attributes, then the extended class definition needs to override the 95 * following internal methods on SBasePlugin and provide appropriate 96 * implementations: 97 * 98 * @li <code>addExpectedAttributes(ExpectedAttributes& attributes)</code>: This 99 * method should add the attributes that are expected to be found on this kind 100 * of extended component in an SBML file or data stream. 101 * 102 * @li <code>readAttributes(XMLAttributes attributes, ExpectedAttributes& 103 * expectedAttributes)</code>: This method should read the attributes 104 * expected to be found on this kind of extended component in an SBML file or 105 * data stream. 106 * 107 * @li <code>hasRequiredAttributes()</code>: This method should return @c true 108 * if all of the required attribute for this extended component are present on 109 * instance of the object. 110 * 111 * @li <code>writeAttributes(XMLOutputStream stream)</code>: This method should 112 * write out the attributes of an extended component. The implementation should 113 * use the different kinds of <code>writeAttribute</code> methods defined by 114 * XMLOutputStream to achieve this. 115 * 116 * 117 * @subsubsection sbp-methods-elem 2.4 Override SBasePlugin virtual methods for subcomponents 118 * 119 * If the extended component is defined by the Level 3 package to have 120 * subcomponents (i.e., full XML elements rather than mere attributes), then the 121 * extended class definition needs to override the following internal 122 * SBasePlugin methods and provide appropriate implementations: 123 * 124 * @li <code>createObject(XMLInputStream stream)</code>: Subclasses must 125 * override this method to create, store, and then return an SBML object 126 * corresponding to the next XMLToken in the XMLInputStream. To do this, 127 * implementations can use methods like <code>peek()</code> on XMLInputStream to 128 * test if the next object in the stream is something expected for the package. 129 * For example, LayoutModelPlugin uses <code>peek()</code> to examine the next 130 * element in the input stream, then tests that element against the Layout 131 * namespace and the element name <code>'listOfLayouts'</code> to see if it's 132 * the single subcomponent (ListOfLayouts) permitted on a Model object using the 133 * Layout package. If it is, it returns the appropriate object. 134 * 135 * @li <code>connectToParent(SBase sbase)</code>: This creates a parent-child 136 * relationship between a given extended component and its subcomponent(s). 137 * 138 * @li <code>setSBMLDocument(SBMLDocument d)</code>: This method should set the 139 * parent SBMLDocument object on the subcomponent object instances, so that the 140 * subcomponent instances know which SBMLDocument contains them. 141 * 142 * @li <code>enablePackageInternal(string& pkgURI, string& pkgPrefix, 143 * bool flag)</code>: This method should enable or disable the subcomponent 144 * based on whether a given XML namespace is active. 145 * 146 * @li <code>writeElements(XMLOutputStream stream)</code>: This method must be 147 * overridden to provide an implementation that will write out the expected 148 * subcomponents/subelements to the XML output stream. 149 * 150 * @li <code>readOtherXML(SBase parentObject, XMLInputStream stream)</code>: 151 * This function should be overridden if elements of annotation, notes, MathML 152 * content, etc., need to be directly parsed from the given XMLInputStream 153 * object. 154 * 155 * @li <code>hasRequiredElements()</code>: This method should return @c true if 156 * a given object contains all the required subcomponents defined by the 157 * specification for that SBML Level 3 package. 158 * 159 * 160 * @subsubsection sbp-methods-xmlns 2.5 Override SBasePlugin virtual methods for XML namespaces 161 * 162 * If the package needs to add additional <code>xmlns</code> attributes to 163 * declare additional XML namespace URIs, the extended class should override the 164 * following method: 165 * 166 * @li <code>writeXMLNS(XMLOutputStream stream)</code>: This method should 167 * write out any additional XML namespaces that might be needed by a package 168 * implementation. 169 * 170 * 171 * @subsubsection sbp-methods-hooks 2.6 Implement additional methods as needed 172 * 173 * Extended component implementations can add whatever additional utility 174 * methods are useful for their implementation. 175 * 176 * 177 * @else 178 * 179 * @section ext-basics Basic principles of SBML package extensions in libSBML 180 * 181 * 182 * SBML Level 3's package structure permits modular extensions to the 183 * core SBML format. In libSBML, support for SBML Level 3 packages is 184 * provided through optional <em>package extensions</em> that can be plugged 185 * into libSBML at the time it is built/compiled. Users of libSBML can thus 186 * choose which extensions are enabled in their software applications. 187 * 188 * LibSBML defines a number of classes that developers of package extensions 189 * can use to implement support for an SBML Level 3 package. These 190 * classes make it easier to extend libSBML objects with new attributes 191 * and/or subobjects as needed by a particular Level 3 package. 192 * Three overall categories of classes make up libSBML's facilities for 193 * implementing package extensions. There are (1) classes that serve as base 194 * classes meant to be subclassed, (2) template classes meant to be 195 * instantiated rather than subclassed, and (3) support classes that provide 196 * utility features. A given package implementation for libSBML will take 197 * the form of code using these and other libSBML classes, placed in a 198 * subdirectory of <code>src/sbml/packages/</code>. 199 * 200 * The basic libSBML distribution includes a number of package extensions 201 * implementing support for officially-endorsed SBML Level 3 packages; 202 * among these are <em>Flux Balance Constraints</em> ('fbc'), 203 * <em>Hierarchical %Model Composition</em> ('comp'), <em>%Layout</em> 204 * ('layout'), and <em>Qualitative Models</em> ('qual'). They can serve as 205 * working examples for developers working to implement other packages. 206 * 207 * Extensions in libSBML can currently only be implemented in C++ or C; 208 * there is no mechanism to implement them first in languages such as 209 * Java or Python. However, once implemented in C++ or C, language 210 * interfaces can be generated semi-automatically using the framework in 211 * place in libSBML. (The approach is based on using <a target='_blank' 212 * href='http://www.swig.org'>SWIG</a> and facilities in libSBML's build 213 * system.) 214 * 215 * 216 * @endif 217 */ 218 219 public class SBasePlugin : global::System.IDisposable { 220 private HandleRef swigCPtr; 221 protected bool swigCMemOwn; 222 SBasePlugin(IntPtr cPtr, bool cMemoryOwn)223 internal SBasePlugin(IntPtr cPtr, bool cMemoryOwn) 224 { 225 swigCMemOwn = cMemoryOwn; 226 swigCPtr = new HandleRef(this, cPtr); 227 } 228 getCPtr(SBasePlugin obj)229 internal static HandleRef getCPtr(SBasePlugin obj) 230 { 231 return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr; 232 } 233 getCPtrAndDisown(SBasePlugin obj)234 internal static HandleRef getCPtrAndDisown (SBasePlugin obj) 235 { 236 HandleRef ptr = new HandleRef(null, IntPtr.Zero); 237 238 if (obj != null) 239 { 240 ptr = obj.swigCPtr; 241 obj.swigCMemOwn = false; 242 } 243 244 return ptr; 245 } 246 ~SBasePlugin()247 ~SBasePlugin() { 248 Dispose(false); 249 } 250 Dispose()251 public void Dispose() { 252 Dispose(true); 253 global::System.GC.SuppressFinalize(this); 254 } 255 Dispose(bool disposing)256 protected virtual void Dispose(bool disposing) { 257 lock(this) { 258 if (swigCPtr.Handle != global::System.IntPtr.Zero) { 259 if (swigCMemOwn) { 260 swigCMemOwn = false; 261 libsbmlPINVOKE.delete_SBasePlugin(swigCPtr); 262 } 263 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); 264 } 265 } 266 } 267 268 269 /** 270 * Returns the namespace URI of the package to which this plugin object 271 * belongs. 272 * 273 * @return the XML namespace URI of the SBML Level 3 package 274 * implemented by this libSBML package extension. 275 */ public getElementNamespace()276 string getElementNamespace() { 277 string ret = libsbmlPINVOKE.SBasePlugin_getElementNamespace(swigCPtr); 278 return ret; 279 } 280 281 282 /** 283 * Returns the XML namespace prefix of the package to which this plugin 284 * object belongs. 285 * 286 * @return the XML namespace prefix of the SBML Level 3 package 287 * implemented by this libSBML package extension. 288 */ public getPrefix()289 string getPrefix() { 290 string ret = libsbmlPINVOKE.SBasePlugin_getPrefix(swigCPtr); 291 return ret; 292 } 293 294 295 /** 296 * Returns the short-form name of the package to which this plugin 297 * object belongs. 298 * 299 * @return the short-form package name (or nickname) of the SBML package 300 * implemented by this package extension. 301 */ public getPackageName()302 string getPackageName() { 303 string ret = libsbmlPINVOKE.SBasePlugin_getPackageName(swigCPtr); 304 return ret; 305 } 306 307 308 /** 309 * Creates and returns a deep copy of this SBasePlugin object. 310 * 311 * @return the (deep) copy of this SBasePlugin object. 312 */ public new clone()313 SBasePlugin clone() { 314 SBasePlugin ret = (SBasePlugin) libsbml.DowncastSBasePlugin(libsbmlPINVOKE.SBasePlugin_clone(swigCPtr), true); 315 return ret; 316 } 317 318 319 /** 320 * Return the first child object found with a given identifier. 321 * 322 * This method searches all the subobjects under this one, compares their 323 * identifiers to @p id, and returns the first one that machines. 324 * @if clike It uses SBasePlugin::getAllElements(ElementFilter filter) to 325 * get the list of identifiers, so the order in which identifiers are 326 * searched is the order in which they appear in the results returned by 327 * that method.@endif 328 * 329 * Normally, <code>SId</code> type identifier values are unique across 330 * a model in SBML. However, in some circumstances they may not be, such 331 * as if a model is invalid because of multiple objects having the same 332 * identifier. 333 * 334 * @param id string representing the identifier of the object to find. 335 * 336 * @return pointer to the first object with the given @p id. 337 */ public new getElementBySId(string id)338 SBase getElementBySId(string id) { 339 SBase ret = (SBase) libsbml.DowncastSBase(libsbmlPINVOKE.SBasePlugin_getElementBySId(swigCPtr, id), false); 340 return ret; 341 } 342 343 344 /** 345 * Return the first child object found with a given meta identifier. 346 * 347 * This method searches all the subobjects under this one, compares their 348 * meta identifiers to @p metaid, and returns the first one that machines. 349 * 350 * @param metaid string, the metaid of the object to find. 351 * 352 * @return pointer to the first object found with the given @p metaid. 353 */ public new getElementByMetaId(string metaid)354 SBase getElementByMetaId(string metaid) { 355 SBase ret = (SBase) libsbml.DowncastSBase(libsbmlPINVOKE.SBasePlugin_getElementByMetaId(swigCPtr, metaid), false); 356 return ret; 357 } 358 359 360 /** */ /* libsbml-internal */ public new connectToParent(SBase sbase)361 void connectToParent(SBase sbase) { 362 libsbmlPINVOKE.SBasePlugin_connectToParent(swigCPtr, SBase.getCPtr(sbase)); 363 } 364 365 366 /** */ /* libsbml-internal */ public new enablePackageInternal(string pkgURI, string pkgPrefix, bool flag)367 void enablePackageInternal(string pkgURI, string pkgPrefix, bool flag) { 368 libsbmlPINVOKE.SBasePlugin_enablePackageInternal(swigCPtr, pkgURI, pkgPrefix, flag); 369 } 370 371 372 /** */ /* libsbml-internal */ public new stripPackage(string pkgPrefix, bool flag)373 bool stripPackage(string pkgPrefix, bool flag) { 374 bool ret = libsbmlPINVOKE.SBasePlugin_stripPackage(swigCPtr, pkgPrefix, flag); 375 return ret; 376 } 377 378 379 /** 380 * Returns the SBMLDocument object containing this object instance. 381 * 382 * 383 * 384 * LibSBML uses the class SBMLDocument as a top-level container for 385 * storing SBML content and data associated with it (such as warnings and 386 * error messages). An SBML model in libSBML is contained inside an 387 * SBMLDocument object. SBMLDocument corresponds roughly to the class 388 * <i>SBML</i> defined in the SBML Level 3 and Level 2 389 * specifications, but it does not have a direct correspondence in SBML 390 * Level 1. (But, it is created by libSBML no matter whether the 391 * model is Level 1, Level 2 or Level 3.) 392 * 393 * 394 * 395 * This method allows the caller to obtain the SBMLDocument for the 396 * current object. 397 * 398 * @return the parent SBMLDocument object of this plugin object. 399 * 400 * @see getParentSBMLObject() 401 */ public getSBMLDocument()402 SBMLDocument getSBMLDocument() { 403 global::System.IntPtr cPtr = libsbmlPINVOKE.SBasePlugin_getSBMLDocument__SWIG_0(swigCPtr); 404 SBMLDocument ret = (cPtr == global::System.IntPtr.Zero) ? null : new SBMLDocument(cPtr, false); 405 return ret; 406 } 407 408 409 /** 410 * Returns the XML namespace URI for the package to which this object belongs. 411 * 412 * 413 * 414 * In the XML representation of an SBML document, XML namespaces are used to 415 * identify the origin of each XML construct used. XML namespaces are 416 * identified by their unique resource identifiers (URIs). The core SBML 417 * specifications stipulate the namespaces that must be used for core SBML 418 * constructs; for example, all XML elements that belong to SBML Level 3 419 * Version 1 Core must be placed in the XML namespace identified by the URI 420 * <code>'http://www.sbml.org/sbml/level3/version1/core'</code>. Individual 421 * SBML Level 3 packages define their own XML namespaces; for example, 422 * all elements belonging to the SBML Level 3 %Layout Version 1 423 * package must be placed in the XML namespace 424 * <code>'http://www.sbml.org/sbml/level3/version1/layout/version1/'</code>. 425 * 426 * 427 * 428 * This method first looks into the SBMLNamespaces object possessed by the 429 * parent SBMLDocument object of the current object. If this cannot be 430 * found, this method returns the result of getElementNamespace(). 431 * 432 * @return a string, the URI of the XML namespace to which this object belongs. 433 * 434 * @see getPackageName() 435 * @see getElementNamespace() 436 * @see getSBMLDocument() 437 */ public getURI()438 string getURI() { 439 string ret = libsbmlPINVOKE.SBasePlugin_getURI(swigCPtr); 440 return ret; 441 } 442 443 444 /** 445 * Returns the parent object to which this plugin object is connected. 446 * 447 * @return the parent object of this object. 448 */ public getParentSBMLObject()449 SBase getParentSBMLObject() { 450 SBase ret = (SBase) libsbml.DowncastSBase(libsbmlPINVOKE.SBasePlugin_getParentSBMLObject__SWIG_0(swigCPtr), false); 451 return ret; 452 } 453 454 455 /** 456 * Sets the XML namespace to which this object belongs. 457 * 458 * 459 * 460 * In the XML representation of an SBML document, XML namespaces are used to 461 * identify the origin of each XML construct used. XML namespaces are 462 * identified by their unique resource identifiers (URIs). The core SBML 463 * specifications stipulate the namespaces that must be used for core SBML 464 * constructs; for example, all XML elements that belong to SBML Level 3 465 * Version 1 Core must be placed in the XML namespace identified by the URI 466 * <code>'http://www.sbml.org/sbml/level3/version1/core'</code>. Individual 467 * SBML Level 3 packages define their own XML namespaces; for example, 468 * all elements belonging to the SBML Level 3 %Layout Version 1 469 * package must be placed in the XML namespace 470 * <code>'http://www.sbml.org/sbml/level3/version1/layout/version1/'</code>. 471 * 472 * 473 * 474 * @param uri the URI to assign to this object. 475 * 476 * 477 * @return integer value indicating success/failure of the 478 * function. @if clike The value is drawn from the 479 * enumeration #OperationReturnValues_t. @endif This particular 480 * function only does one thing irrespective of user input or 481 * object state, and thus will only return a single value: 482 * @li @link libsbml#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink 483 * 484 * @see getElementNamespace() 485 */ public setElementNamespace(string uri)486 int setElementNamespace(string uri) { 487 int ret = libsbmlPINVOKE.SBasePlugin_setElementNamespace(swigCPtr, uri); 488 return ret; 489 } 490 491 492 /** 493 * Returns the SBML Level of the package extension of this plugin object. 494 * 495 * @return the SBML Level. 496 * 497 * @see getVersion() 498 */ public getLevel()499 long getLevel() { return (long)libsbmlPINVOKE.SBasePlugin_getLevel(swigCPtr); } 500 501 502 /** 503 * Returns the Version within the SBML Level of the package extension of 504 * this plugin object. 505 * 506 * @return the SBML Version. 507 * 508 * @see getLevel() 509 */ public getVersion()510 long getVersion() { return (long)libsbmlPINVOKE.SBasePlugin_getVersion(swigCPtr); } 511 512 513 /** 514 * Returns the package version of the package extension of this plugin 515 * object. 516 * 517 * @return the package version of the package extension of this plugin 518 * object. 519 * 520 * @see getLevel() 521 * @see getVersion() 522 */ public getPackageVersion()523 long getPackageVersion() { return (long)libsbmlPINVOKE.SBasePlugin_getPackageVersion(swigCPtr); } 524 525 526 /** */ /* libsbml-internal */ public new replaceSIDWithFunction(string id, ASTNode function)527 void replaceSIDWithFunction(string id, ASTNode function) { 528 libsbmlPINVOKE.SBasePlugin_replaceSIDWithFunction(swigCPtr, id, ASTNode.getCPtr(function)); 529 } 530 531 532 /** */ /* libsbml-internal */ public new divideAssignmentsToSIdByFunction(string id, ASTNode function)533 void divideAssignmentsToSIdByFunction(string id, ASTNode function) { 534 libsbmlPINVOKE.SBasePlugin_divideAssignmentsToSIdByFunction(swigCPtr, id, ASTNode.getCPtr(function)); 535 } 536 537 538 /** */ /* libsbml-internal */ public new multiplyAssignmentsToSIdByFunction(string id, ASTNode function)539 void multiplyAssignmentsToSIdByFunction(string id, ASTNode function) { 540 libsbmlPINVOKE.SBasePlugin_multiplyAssignmentsToSIdByFunction(swigCPtr, id, ASTNode.getCPtr(function)); 541 } 542 543 544 /** */ /* libsbml-internal */ public new hasIdentifierBeginningWith(string prefix)545 bool hasIdentifierBeginningWith(string prefix) { 546 bool ret = libsbmlPINVOKE.SBasePlugin_hasIdentifierBeginningWith(swigCPtr, prefix); 547 return ret; 548 } 549 550 551 /** */ /* libsbml-internal */ public new prependStringToAllIdentifiers(string prefix)552 int prependStringToAllIdentifiers(string prefix) { 553 int ret = libsbmlPINVOKE.SBasePlugin_prependStringToAllIdentifiers(swigCPtr, prefix); 554 return ret; 555 } 556 557 558 /** 559 * 560 * Replaces all uses of a given @c SIdRef type attribute value with another 561 * value. 562 * 563 * 564 * 565 566 * In SBML, object identifiers are of a data type called <code>SId</code>. 567 * In SBML Level 3, an explicit data type called <code>SIdRef</code> was 568 * introduced for attribute values that refer to <code>SId</code> values; in 569 * previous Levels of SBML, this data type did not exist and attributes were 570 * simply described to as 'referring to an identifier', but the effective 571 * data type was the same as <code>SIdRef</code> in Level 3. These and 572 * other methods of libSBML refer to the type <code>SIdRef</code> for all 573 * Levels of SBML, even if the corresponding SBML specification did not 574 * explicitly name the data type. 575 * 576 * 577 * 578 * This method works by looking at all attributes and (if appropriate) 579 * mathematical formulas in MathML content, comparing the referenced 580 * identifiers to the value of @p oldid. If any matches are found, the 581 * matching values are replaced with @p newid. The method does @em not 582 * descend into child elements. 583 * 584 * @param oldid the old identifier. 585 * @param newid the new identifier. 586 * 587 * 588 */ public new renameSIdRefs(string oldid, string newid)589 void renameSIdRefs(string oldid, string newid) { 590 libsbmlPINVOKE.SBasePlugin_renameSIdRefs(swigCPtr, oldid, newid); 591 } 592 593 594 /** 595 * 596 * Replaces all uses of a given meta identifier attribute value with 597 * another value. 598 * 599 * 600 * 601 * In SBML, object 'meta' identifiers are of the XML data type <code>ID</code>; 602 * the SBML object attribute itself is typically named <code>metaid</code>. All 603 * attributes that hold values <em>referring</em> to values of type 604 * <code>ID</code> are of the XML data type <code>IDREF</code>. They are also 605 * sometimes informally referred to as 'metaid refs', in analogy to the 606 * SBML-defined type <code>SIdRef</code>. 607 * 608 * 609 * 610 * This method works by looking at all meta-identifier attribute values, 611 * comparing the identifiers to the value of @p oldid. If any matches are 612 * found, the matching identifiers are replaced with @p newid. The method 613 * does @em not descend into child elements. 614 * 615 * @param oldid the old identifier. 616 * @param newid the new identifier. 617 * 618 * 619 */ public new renameMetaIdRefs(string oldid, string newid)620 void renameMetaIdRefs(string oldid, string newid) { 621 libsbmlPINVOKE.SBasePlugin_renameMetaIdRefs(swigCPtr, oldid, newid); 622 } 623 624 625 /** 626 * 627 * Replaces all uses of a given @c UnitSIdRef type attribute value with 628 * another value. 629 * 630 * 631 * 632 * In SBML, unit definitions have identifiers of type <code>UnitSId</code>. In 633 * SBML Level 3, an explicit data type called <code>UnitSIdRef</code> was 634 * introduced for attribute values that refer to <code>UnitSId</code> values; in 635 * previous Levels of SBML, this data type did not exist and attributes were 636 * simply described to as 'referring to a unit identifier', but the effective 637 * data type was the same as <code>UnitSIdRef</code> in Level 3. These and 638 * other methods of libSBML refer to the type <code>UnitSIdRef</code> for all 639 * Levels of SBML, even if the corresponding SBML specification did not 640 * explicitly name the data type. 641 * 642 * 643 * 644 * This method works by looking at all unit identifier attribute values 645 * (including, if appropriate, inside mathematical formulas), comparing the 646 * referenced unit identifiers to the value of @p oldid. If any matches 647 * are found, the matching values are replaced with @p newid. The method 648 * does @em not descend into child elements. 649 * 650 * @param oldid the old identifier. 651 * @param newid the new identifier. 652 * 653 * 654 */ public new renameUnitSIdRefs(string oldid, string newid)655 void renameUnitSIdRefs(string oldid, string newid) { 656 libsbmlPINVOKE.SBasePlugin_renameUnitSIdRefs(swigCPtr, oldid, newid); 657 } 658 659 660 /** */ /* libsbml-internal */ public new transformIdentifiers(IdentifierTransformer sidTransformer)661 int transformIdentifiers(IdentifierTransformer sidTransformer) { 662 int ret = libsbmlPINVOKE.SBasePlugin_transformIdentifiers(swigCPtr, IdentifierTransformer.getCPtr(sidTransformer)); 663 return ret; 664 } 665 666 667 /** */ /* libsbml-internal */ public getLine()668 long getLine() { return (long)libsbmlPINVOKE.SBasePlugin_getLine(swigCPtr); } 669 670 671 /** */ /* libsbml-internal */ public getColumn()672 long getColumn() { return (long)libsbmlPINVOKE.SBasePlugin_getColumn(swigCPtr); } 673 674 675 /** */ /* libsbml-internal */ public new getSBMLNamespaces()676 SBMLNamespaces getSBMLNamespaces() { 677 SBMLNamespaces ret 678 = (SBMLNamespaces) libsbml.DowncastSBMLNamespaces(libsbmlPINVOKE.SBasePlugin_getSBMLNamespaces(swigCPtr), false); 679 return ret; 680 } 681 682 683 /** */ /* libsbml-internal */ public new logUnknownElement(string element, long sbmlLevel, long sbmlVersion, long pkgVersion)684 void logUnknownElement(string element, long sbmlLevel, long sbmlVersion, long pkgVersion) { 685 libsbmlPINVOKE.SBasePlugin_logUnknownElement(swigCPtr, element, sbmlLevel, sbmlVersion, pkgVersion); 686 } 687 688 689 /** */ public new isValidTypeForList(SBase item)690 bool isValidTypeForList(SBase item) { 691 bool ret = libsbmlPINVOKE.SBasePlugin_isValidTypeForList(swigCPtr, SBase.getCPtrAndDisown(item)); 692 return ret; 693 } 694 695 696 /** */ /* libsbml-internal */ public getSBMLExtension()697 SBMLExtension getSBMLExtension() { 698 SBMLExtension ret 699 = (SBMLExtension) libsbml.DowncastExtension(libsbmlPINVOKE.SBasePlugin_getSBMLExtension(swigCPtr), false); 700 return ret; 701 } 702 703 704 /** */ /* libsbml-internal */ public new updateSBMLNamespace(string package, long level, long version)705 void updateSBMLNamespace(string package, long level, long version) { 706 libsbmlPINVOKE.SBasePlugin_updateSBMLNamespace(swigCPtr, package, level, version); 707 } 708 getListOfAllElements(ElementFilter filter)709 public SBaseList getListOfAllElements(ElementFilter filter) { 710 SBaseList ret = new SBaseList(libsbmlPINVOKE.SBasePlugin_getListOfAllElements__SWIG_0(swigCPtr, ElementFilter.getCPtr(filter)), true); 711 return ret; 712 } 713 getListOfAllElements()714 public SBaseList getListOfAllElements() { 715 SBaseList ret = new SBaseList(libsbmlPINVOKE.SBasePlugin_getListOfAllElements__SWIG_1(swigCPtr), true); 716 return ret; 717 } 718 719 } 720 721 } 722