1 /** 2 * @file FbcReactionPlugin.h 3 * @brief Implementation of the FbcReactionPlugin class 4 * @author SBMLTeam 5 * 6 * <!-------------------------------------------------------------------------- 7 * This file is part of libSBML. Please visit http://sbml.org for more 8 * information about SBML, and the latest version of libSBML. 9 * 10 * Copyright (C) 2020 jointly by the following organizations: 11 * 1. California Institute of Technology, Pasadena, CA, USA 12 * 2. University of Heidelberg, Heidelberg, Germany 13 * 3. University College London, London, UK 14 * 15 * Copyright (C) 2019 jointly by the following organizations: 16 * 1. California Institute of Technology, Pasadena, CA, USA 17 * 2. University of Heidelberg, Heidelberg, Germany 18 * 19 * Copyright (C) 2013-2018 jointly by the following organizations: 20 * 1. California Institute of Technology, Pasadena, CA, USA 21 * 2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK 22 * 3. University of Heidelberg, Heidelberg, Germany 23 * 24 * Copyright (C) 2009-2013 jointly by the following organizations: 25 * 1. California Institute of Technology, Pasadena, CA, USA 26 * 2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK 27 * 28 * Copyright (C) 2006-2008 by the California Institute of Technology, 29 * Pasadena, CA, USA 30 * 31 * Copyright (C) 2002-2005 jointly by the following organizations: 32 * 1. California Institute of Technology, Pasadena, CA, USA 33 * 2. Japan Science and Technology Agency, Japan 34 * 35 * This library is free software; you can redistribute it and/or modify it 36 * under the terms of the GNU Lesser General Public License as published by 37 * the Free Software Foundation. A copy of the license agreement is provided 38 * in the file named "LICENSE.txt" included with this software distribution 39 * and also available online as http://sbml.org/software/libsbml/license.html 40 * ------------------------------------------------------------------------ --> 41 * 42 * @class FbcReactionPlugin 43 * @sbmlbrief{fbc} Extension of Reaction by the “fbc” package. 44 * 45 * The FbcReactionPlugin class inherits from the SBasePlugin class, and 46 * codifies the extentions to the Reaction class defined in the @ref fbc 47 * package (“fbc”). This extention allows the modeler to define 48 * (in Version 2 of the “fbc” package) an upper and lower 49 * flux bound, with the 'upperFluxBound' and 'lowerFluxBound' attributes, 50 * as well as a way to reference any GeneProduct associated with 51 * this Reaction, through the GeneProductAssociation child. 52 * 53 * @note In Version 1 of “fbc”, the FluxBound element is 54 * used instead of the 'upperFluxBound' and 'lowerFluxBound' attributes. 55 * There is no equivalent of the GeneProductAssociation, which was added 56 * in Version 2. 57 */ 58 59 60 #ifndef FbcReactionPlugin_H__ 61 #define FbcReactionPlugin_H__ 62 63 64 #include <sbml/common/extern.h> 65 66 67 #ifdef __cplusplus 68 69 70 #include <sbml/extension/SBasePlugin.h> 71 #include <sbml/packages/fbc/sbml/GeneProductAssociation.h> 72 73 74 LIBSBML_CPP_NAMESPACE_BEGIN 75 76 77 class LIBSBML_EXTERN FbcReactionPlugin : public SBasePlugin 78 { 79 public: 80 81 /** 82 * Creates a new FbcReactionPlugin object using the given parameters. 83 * 84 * @copydetails doc_what_are_xmlnamespaces 85 * 86 * @copydetails doc_what_are_sbmlnamespaces 87 * 88 * @param uri the URI of the SBML Level 3 package implemented by 89 * this libSBML package extension. 90 * 91 * @param prefix the XML namespace prefix being used for the package. 92 * 93 * @param fbcns the namespaces object for the package. 94 */ 95 FbcReactionPlugin(const std::string& uri, const std::string& prefix, 96 FbcPkgNamespaces* fbcns); 97 98 99 /** 100 * Copy constructor for FbcReactionPlugin. 101 * 102 * @param orig the FbcReactionPlugin instance to copy. 103 */ 104 FbcReactionPlugin(const FbcReactionPlugin& orig); 105 106 107 /** 108 * Assignment operator for FbcReactionPlugin. 109 * 110 * @param rhs the object whose values are used as the basis 111 * of the assignment. 112 */ 113 FbcReactionPlugin& operator=(const FbcReactionPlugin& rhs); 114 115 116 /** 117 * Creates and returns a deep copy of this FbcReactionPlugin object. 118 * 119 * @return a (deep) copy of this FbcReactionPlugin object. 120 */ 121 virtual FbcReactionPlugin* clone () const; 122 123 124 /** 125 * Destructor for FbcReactionPlugin. 126 */ 127 virtual ~FbcReactionPlugin(); 128 129 130 //--------------------------------------------------------------- 131 // 132 // overridden virtual functions for read/write/check 133 // 134 //--------------------------------------------------------------- 135 136 /** @cond doxygenLibsbmlInternal */ 137 138 /** 139 * Subclasses must override this method to create, store, and then 140 * return an SBML object corresponding to the next XMLToken in the 141 * XMLInputStream if they have their specific elements. 142 * 143 * @return the SBML object corresponding to next XMLToken in the 144 * XMLInputStream or @c NULL if the token was not recognized. 145 */ 146 virtual SBase* createObject (XMLInputStream& stream); 147 148 149 /** @endcond */ 150 151 /** @cond doxygenLibsbmlInternal */ 152 153 /** 154 * Subclasses must override this method to write out their contained 155 * SBML objects as XML elements if they have their specific elements. 156 */ 157 virtual void writeElements (XMLOutputStream& stream) const; 158 159 160 /** @endcond */ 161 162 163 //--------------------------------------------------------------- 164 165 166 /** @cond doxygenLibsbmlInternal */ 167 168 /** 169 * Get the list of expected attributes for this element. 170 */ 171 virtual void addExpectedAttributes(ExpectedAttributes& attributes); 172 173 174 /** @endcond */ 175 176 /** 177 * @copydoc doc_renamesidref_common 178 */ 179 virtual void renameSIdRefs(const std::string& oldid, const std::string& newid); 180 181 182 /** @cond doxygenLibsbmlInternal */ 183 184 /** 185 * Read values from the given XMLAttributes set into their specific fields. 186 */ 187 virtual void readAttributes (const XMLAttributes& attributes, 188 const ExpectedAttributes& expectedAttributes); 189 190 191 /** @endcond */ 192 193 194 /** @cond doxygenLibsbmlInternal */ 195 196 /** 197 * Write values of XMLAttributes to the output stream. 198 */ 199 virtual void writeAttributes (XMLOutputStream& stream) const; 200 201 202 /** @endcond */ 203 204 205 //--------------------------------------------------------------- 206 // 207 // Functions for interacting with the members of the plugin 208 // 209 //--------------------------------------------------------------- 210 211 /** 212 * Returns a List of all child SBase objects, including those nested to an 213 * arbitrary depth. 214 * 215 * @return a List of pointers to all child objects. 216 */ 217 virtual List* getAllElements(ElementFilter * filter = NULL); 218 219 220 /** 221 * Returns the GeneProductAssociation from this FbcReactionPlugin object. 222 * 223 * @copydetails doc_note_geneproduct_v2_only 224 * 225 * @return the GeneProductAssociation from object in this FbcReactionPlugin object. 226 */ 227 const GeneProductAssociation* getGeneProductAssociation () const; 228 229 230 /** 231 * Returns the GeneProductAssociation from this FbcReactionPlugin object. 232 * 233 * @copydetails doc_note_geneproduct_v2_only 234 * 235 * @return the GeneProductAssociation from object in this FbcReactionPlugin object. 236 */ 237 GeneProductAssociation* getGeneProductAssociation (); 238 239 240 /** 241 * Predicate returning @c true if this FbcReactionPlugin's 242 * "GeneProductAssociation" element has been set. 243 * 244 * @copydetails doc_note_geneproduct_v2_only 245 * 246 * @return @c true if the "GeneProductAssociation" element has been set, 247 * otherwise @c false is returned. 248 */ 249 bool isSetGeneProductAssociation() const; 250 251 252 /** 253 * Sets the GeneProductAssociation element in this FbcReactionPlugin object. 254 * 255 * @copydetails doc_note_geneproduct_v2_only 256 * 257 * @param geneProductAssociation the geneProductAssociation to be set. 258 * 259 * @copydetails doc_returns_success_code 260 * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t} 261 */ 262 int setGeneProductAssociation (const GeneProductAssociation* geneProductAssociation); 263 264 265 /** 266 * Creates a new GeneProductAssociation object and adds it to the FbcReactionPlugin object. 267 * 268 * @copydetails doc_note_geneproduct_v2_only 269 * 270 * @return the newly created GeneProductAssociation object. 271 */ 272 GeneProductAssociation* createGeneProductAssociation (); 273 274 275 /** 276 * Returns the value of the "lowerFluxBound" attribute of this FbcReactionPlugin. 277 * 278 * @copydetails doc_note_fluxbound_v2_only 279 * 280 * @return the value of the "lowerFluxBound" attribute of this FbcReactionPlugin as a string. 281 */ 282 virtual const std::string& getLowerFluxBound() const; 283 284 285 /** 286 * Returns the value of the "upperFluxBound" attribute of this FbcReactionPlugin. 287 * 288 * @copydetails doc_note_fluxbound_v2_only 289 * 290 * @return the value of the "upperFluxBound" attribute of this FbcReactionPlugin as a string. 291 */ 292 virtual const std::string& getUpperFluxBound() const; 293 294 295 /** 296 * Predicate returning @c true if this FbcReactionPlugin's "lowerFluxBound" 297 * attribute is set. 298 * 299 * @copydetails doc_note_fluxbound_v2_only 300 * 301 * @return @c true if this FbcReactionPlugin's "lowerFluxBound" attribute has been set, 302 * otherwise @c false is returned. 303 */ 304 virtual bool isSetLowerFluxBound() const; 305 306 307 /** 308 * Predicate returning @c true if this FbcReactionPlugin's "upperFluxBound" 309 * attribute is set. 310 * 311 * @copydetails doc_note_fluxbound_v2_only 312 * 313 * @return @c true if this FbcReactionPlugin's "upperFluxBound" attribute has been set, 314 * otherwise @c false is returned. 315 */ 316 virtual bool isSetUpperFluxBound() const; 317 318 319 /** 320 * Sets the value of the "lowerFluxBound" attribute of this FbcReactionPlugin. 321 * 322 * @copydetails doc_note_fluxbound_v2_only 323 * 324 * @param lowerFluxBound the value of the "lowerFluxBound" attribute to be set. 325 * 326 * @copydetails doc_returns_success_code 327 * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t} 328 * @li @sbmlconstant{LIBSBML_INVALID_ATTRIBUTE_VALUE, OperationReturnValues_t} 329 */ 330 virtual int setLowerFluxBound(const std::string& lowerFluxBound); 331 332 333 /** 334 * Sets the value of the "upperFluxBound" attribute of this FbcReactionPlugin. 335 * 336 * @copydetails doc_note_fluxbound_v2_only 337 * 338 * @param upperFluxBound the value of the "upperFluxBound" attribute to be set. 339 * 340 * @copydetails doc_returns_success_code 341 * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t} 342 * @li @sbmlconstant{LIBSBML_INVALID_ATTRIBUTE_VALUE, OperationReturnValues_t} 343 */ 344 virtual int setUpperFluxBound(const std::string& upperFluxBound); 345 346 347 /** 348 * Unsets the value of the "lowerFluxBound" attribute of this FbcReactionPlugin. 349 * 350 * @copydetails doc_note_fluxbound_v2_only 351 * 352 * @copydetails doc_returns_success_code 353 * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t} 354 * @li @sbmlconstant{LIBSBML_OPERATION_FAILED, OperationReturnValues_t} 355 */ 356 virtual int unsetLowerFluxBound(); 357 358 359 /** 360 * Unsets the value of the "upperFluxBound" attribute of this FbcReactionPlugin. 361 * 362 * @copydetails doc_note_fluxbound_v2_only 363 * 364 * @copydetails doc_returns_success_code 365 * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t} 366 * @li @sbmlconstant{LIBSBML_OPERATION_FAILED, OperationReturnValues_t} 367 */ 368 virtual int unsetUpperFluxBound(); 369 370 /** 371 * Unsets the the "geneProduct" element of this FbcReactionPlugin. 372 * 373 * @copydetails doc_note_fluxbound_v2_only 374 * 375 * @copydetails doc_returns_success_code 376 * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t} 377 * @li @sbmlconstant{LIBSBML_OPERATION_FAILED, OperationReturnValues_t} 378 */ 379 virtual int unsetGeneProductAssociation(); 380 381 /** @cond doxygenLibsbmlInternal */ 382 383 /** 384 * Sets the parent SBMLDocument. 385 */ 386 virtual void setSBMLDocument (SBMLDocument* d); 387 388 389 /** @endcond */ 390 391 392 /** @cond doxygenLibsbmlInternal */ 393 394 virtual void connectToParent (SBase* sbase); 395 396 397 /** @endcond */ 398 399 400 /** @cond doxygenLibsbmlInternal */ 401 402 virtual void enablePackageInternal(const std::string& pkgURI, 403 const std::string& pkgPrefix, bool flag); 404 405 406 /** @endcond */ 407 408 409 #ifndef SWIG 410 411 412 413 /** @cond doxygenLibsbmlInternal */ 414 415 /** 416 * Returns the value of the "attributeName" attribute of this FbcReactionPlugin. 417 * 418 * @param attributeName, the name of the attribute to retrieve. 419 * 420 * @param value, the address of the value to record. 421 * 422 * @copydetails doc_returns_success_code 423 * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t} 424 * @li @sbmlconstant{LIBSBML_OPERATION_FAILED, OperationReturnValues_t} 425 */ 426 virtual int getAttribute(const std::string& attributeName, bool& value) 427 const; 428 429 /** @endcond */ 430 431 432 433 /** @cond doxygenLibsbmlInternal */ 434 435 /** 436 * Returns the value of the "attributeName" attribute of this FbcReactionPlugin. 437 * 438 * @param attributeName, the name of the attribute to retrieve. 439 * 440 * @param value, the address of the value to record. 441 * 442 * @copydetails doc_returns_success_code 443 * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t} 444 * @li @sbmlconstant{LIBSBML_OPERATION_FAILED, OperationReturnValues_t} 445 */ 446 virtual int getAttribute(const std::string& attributeName, int& value) const; 447 448 /** @endcond */ 449 450 451 452 /** @cond doxygenLibsbmlInternal */ 453 454 /** 455 * Returns the value of the "attributeName" attribute of this FbcReactionPlugin. 456 * 457 * @param attributeName, the name of the attribute to retrieve. 458 * 459 * @param value, the address of the value to record. 460 * 461 * @copydetails doc_returns_success_code 462 * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t} 463 * @li @sbmlconstant{LIBSBML_OPERATION_FAILED, OperationReturnValues_t} 464 */ 465 virtual int getAttribute(const std::string& attributeName, 466 double& value) const; 467 468 /** @endcond */ 469 470 471 472 /** @cond doxygenLibsbmlInternal */ 473 474 /** 475 * Returns the value of the "attributeName" attribute of this FbcReactionPlugin. 476 * 477 * @param attributeName, the name of the attribute to retrieve. 478 * 479 * @param value, the address of the value to record. 480 * 481 * @copydetails doc_returns_success_code 482 * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t} 483 * @li @sbmlconstant{LIBSBML_OPERATION_FAILED, OperationReturnValues_t} 484 */ 485 virtual int getAttribute(const std::string& attributeName, 486 unsigned int& value) const; 487 488 /** @endcond */ 489 490 491 492 /** @cond doxygenLibsbmlInternal */ 493 494 /** 495 * Returns the value of the "attributeName" attribute of this FbcReactionPlugin. 496 * 497 * @param attributeName, the name of the attribute to retrieve. 498 * 499 * @param value, the address of the value to record. 500 * 501 * @copydetails doc_returns_success_code 502 * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t} 503 * @li @sbmlconstant{LIBSBML_OPERATION_FAILED, OperationReturnValues_t} 504 */ 505 virtual int getAttribute(const std::string& attributeName, 506 std::string& value) const; 507 508 /** @endcond */ 509 510 511 512 /** @cond doxygenLibsbmlInternal */ 513 514 /** 515 * Predicate returning @c true if this FbcReactionPlugin's attribute 516 * "attributeName" is set. 517 * 518 * @param attributeName, the name of the attribute to query. 519 * 520 * @return @c true if this FbcReactionPlugin's attribute "attributeName" has 521 * been set, otherwise @c false is returned. 522 */ 523 virtual bool isSetAttribute(const std::string& attributeName) const; 524 525 /** @endcond */ 526 527 528 529 /** @cond doxygenLibsbmlInternal */ 530 531 /** 532 * Sets the value of the "attributeName" attribute of this FbcReactionPlugin. 533 * 534 * @param attributeName, the name of the attribute to set. 535 * 536 * @param value, the value of the attribute to set. 537 * 538 * @copydetails doc_returns_success_code 539 * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t} 540 * @li @sbmlconstant{LIBSBML_OPERATION_FAILED, OperationReturnValues_t} 541 */ 542 virtual int setAttribute(const std::string& attributeName, bool value); 543 544 /** @endcond */ 545 546 547 548 /** @cond doxygenLibsbmlInternal */ 549 550 /** 551 * Sets the value of the "attributeName" attribute of this FbcReactionPlugin. 552 * 553 * @param attributeName, the name of the attribute to set. 554 * 555 * @param value, the value of the attribute to set. 556 * 557 * @copydetails doc_returns_success_code 558 * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t} 559 * @li @sbmlconstant{LIBSBML_OPERATION_FAILED, OperationReturnValues_t} 560 */ 561 virtual int setAttribute(const std::string& attributeName, int value); 562 563 /** @endcond */ 564 565 566 567 /** @cond doxygenLibsbmlInternal */ 568 569 /** 570 * Sets the value of the "attributeName" attribute of this FbcReactionPlugin. 571 * 572 * @param attributeName, the name of the attribute to set. 573 * 574 * @param value, the value of the attribute to set. 575 * 576 * @copydetails doc_returns_success_code 577 * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t} 578 * @li @sbmlconstant{LIBSBML_OPERATION_FAILED, OperationReturnValues_t} 579 */ 580 virtual int setAttribute(const std::string& attributeName, double value); 581 582 /** @endcond */ 583 584 585 586 /** @cond doxygenLibsbmlInternal */ 587 588 /** 589 * Sets the value of the "attributeName" attribute of this FbcReactionPlugin. 590 * 591 * @param attributeName, the name of the attribute to set. 592 * 593 * @param value, the value of the attribute to set. 594 * 595 * @copydetails doc_returns_success_code 596 * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t} 597 * @li @sbmlconstant{LIBSBML_OPERATION_FAILED, OperationReturnValues_t} 598 */ 599 virtual int setAttribute(const std::string& attributeName, 600 unsigned int value); 601 602 /** @endcond */ 603 604 605 606 /** @cond doxygenLibsbmlInternal */ 607 608 /** 609 * Sets the value of the "attributeName" attribute of this FbcReactionPlugin. 610 * 611 * @param attributeName, the name of the attribute to set. 612 * 613 * @param value, the value of the attribute to set. 614 * 615 * @copydetails doc_returns_success_code 616 * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t} 617 * @li @sbmlconstant{LIBSBML_OPERATION_FAILED, OperationReturnValues_t} 618 */ 619 virtual int setAttribute(const std::string& attributeName, 620 const std::string& value); 621 622 /** @endcond */ 623 624 625 626 /** @cond doxygenLibsbmlInternal */ 627 628 /** 629 * Unsets the value of the "attributeName" attribute of this 630 * FbcReactionPlugin. 631 * 632 * @param attributeName, the name of the attribute to query. 633 * 634 * @copydetails doc_returns_success_code 635 * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t} 636 * @li @sbmlconstant{LIBSBML_OPERATION_FAILED, OperationReturnValues_t} 637 */ 638 virtual int unsetAttribute(const std::string& attributeName); 639 640 /** @endcond */ 641 642 643 644 /** @cond doxygenLibsbmlInternal */ 645 646 /** 647 * Creates and returns an new "elementName" object in this FbcReactionPlugin. 648 * 649 * @param objectName, the name of the element to create. 650 * 651 * pointer to the object created. 652 */ 653 virtual SBase* createChildObject(const std::string& elementName); 654 655 /** @endcond */ 656 657 658 659 /** @cond doxygenLibsbmlInternal */ 660 661 /** 662 * Returns the number of "elementName" in this FbcReactionPlugin. 663 * 664 * @param elementName, the name of the element to get number of. 665 * 666 * @return unsigned int number of elements. 667 */ 668 virtual unsigned int getNumObjects(const std::string& elementName); 669 670 /** @endcond */ 671 672 673 674 /** @cond doxygenLibsbmlInternal */ 675 676 /** 677 * Returns the nth object of "objectName" in this FbcReactionPlugin. 678 * 679 * @param elementName, the name of the element to get number of. 680 * 681 * @param index, unsigned int the index of the object to retrieve. 682 * 683 * @return pointer to the object. 684 */ 685 virtual SBase* getObject(const std::string& elementName, unsigned int index); 686 687 /** @endcond */ 688 689 690 691 692 #endif /* !SWIG */ 693 /** @cond doxygenLibsbmlInternal */ 694 695 virtual bool accept (SBMLVisitor& v) const; 696 697 /** @endcond */ 698 699 700 protected: 701 702 /** @cond doxygenLibsbmlInternal */ 703 704 GeneProductAssociation* mGeneProductAssociation; 705 std::string mLowerFluxBound; 706 std::string mUpperFluxBound; 707 708 /** @endcond */ 709 710 711 }; 712 713 LIBSBML_CPP_NAMESPACE_END 714 715 716 #endif /* __cplusplus */ 717 #ifndef SWIG 718 719 LIBSBML_CPP_NAMESPACE_BEGIN 720 BEGIN_C_DECLS 721 722 723 724 /** 725 * Takes a FbcReactionPlugin_t structure and returns its "upperFluxBound" attribute. 726 * 727 * @param fbc the FbcReactionPlugin_t whose "upperFluxBound" attribute is sought. 728 * 729 * @return the "upperFluxBound" attribute of the given FbcReactionPlugin_t, as a pointer to a string. 730 * 731 * @memberof FbcReactionPlugin_t 732 */ 733 LIBSBML_EXTERN 734 char * 735 FbcReactionPlugin_getUpperFluxBound(SBasePlugin_t * fbc); 736 737 738 /** 739 * Predicate returning @c 1 (true) or @c 0 (false) depending on whether the given 740 * FbcReactionPlugin_t structure's "upperFluxBound" attribute is set. 741 * 742 * @param fbc the FbcReactionPlugin_t structure to query. 743 * 744 * @return @c 1 (true) if the "upperFluxBound" attribute of the given 745 * FbcReactionPlugin_t structure is set, @c 0 (false) otherwise. 746 * 747 * @memberof FbcReactionPlugin_t 748 */ 749 LIBSBML_EXTERN 750 int 751 FbcReactionPlugin_isSetUpperFluxBound(SBasePlugin_t * fbc); 752 753 754 /** 755 * Sets the "upperFluxBound" attribute of the given FbcReactionPlugin_t to a copy of @p UpperFluxBound. 756 * 757 * @param fbc the FbcReactionPlugin_t structure to set. 758 * @param UpperFluxBound the string to assign to the given FbcReactionPlugin_t's "upperFluxBound" attribute. 759 * 760 * @copydetails doc_returns_success_code 761 * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t} 762 * @li @sbmlconstant{LIBSBML_INVALID_ATTRIBUTE_VALUE, OperationReturnValues_t} 763 * 764 * @note Using this function with the name set to NULL is equivalent to 765 * unsetting the "upperFluxBound" attribute. 766 * 767 * @memberof FbcReactionPlugin_t 768 */ 769 LIBSBML_EXTERN 770 int 771 FbcReactionPlugin_setUpperFluxBound(SBasePlugin_t * fbc, const char * UpperFluxBound); 772 773 774 /** 775 * Unsets the "upperFluxBound" attribute of the given FbcReactionPlugin_t structure. 776 * 777 * @param fbc the FbcReactionPlugin_t structure to unset. 778 * 779 * @copydetails doc_returns_success_code 780 * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t} 781 * @li @sbmlconstant{LIBSBML_OPERATION_FAILED, OperationReturnValues_t} 782 * 783 * @memberof FbcReactionPlugin_t 784 */ 785 LIBSBML_EXTERN 786 int 787 FbcReactionPlugin_unsetUpperFluxBound(SBasePlugin_t * fbc); 788 789 790 /** 791 * Takes a FbcReactionPlugin_t structure and returns its "lowerFluxBound" attribute. 792 * 793 * @param fbc the FbcReactionPlugin_t whose "lowerFluxBound" attribute is sought. 794 * 795 * @return the "lowerFluxBound" attribute of the given FbcReactionPlugin_t, as a pointer to a string. 796 * 797 * @memberof FbcReactionPlugin_t 798 */ 799 LIBSBML_EXTERN 800 char * 801 FbcReactionPlugin_getLowerFluxBound(SBasePlugin_t * fbc); 802 803 804 /** 805 * Predicate returning @c 1 (true) or @c 0 (false) depending on whether the given 806 * FbcReactionPlugin_t structure's "lowerFluxBound" attribute is set. 807 * 808 * @param fbc the FbcReactionPlugin_t structure to query. 809 * 810 * @return @c 1 (true) if the "lowerFluxBound" attribute attribute of the given 811 * FbcReactionPlugin_t structure is set, @c 0 (false) otherwise. 812 * 813 * @memberof FbcReactionPlugin_t 814 */ 815 LIBSBML_EXTERN 816 int 817 FbcReactionPlugin_isSetLowerFluxBound(SBasePlugin_t * fbc); 818 819 820 /** 821 * Sets the "lowerFluxBound" attribute of the given FbcReactionPlugin_t to a copy of @p LowerFluxBound. 822 * 823 * @param fbc the FbcReactionPlugin_t structure to set. 824 * @param LowerFluxBound the string to assign to the given FbcReactionPlugin_t's "lowerFluxBound" attribute. 825 * 826 * @copydetails doc_returns_success_code 827 * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t} 828 * @li @sbmlconstant{LIBSBML_INVALID_ATTRIBUTE_VALUE, OperationReturnValues_t} 829 * 830 * @note Using this function with the name set to NULL is equivalent to 831 * unsetting the "lowerFluxBound" attribute. 832 * 833 * @memberof FbcReactionPlugin_t 834 */ 835 LIBSBML_EXTERN 836 int 837 FbcReactionPlugin_setLowerFluxBound(SBasePlugin_t * fbc, const char * LowerFluxBound); 838 839 840 /** 841 * Unsets the "upperFluxBound" attribute of the given FbcReactionPlugin_t structure. 842 * 843 * @param fbc the FbcReactionPlugin_t structure to unset. 844 * 845 * @copydetails doc_returns_success_code 846 * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t} 847 * @li @sbmlconstant{LIBSBML_OPERATION_FAILED, OperationReturnValues_t} 848 * 849 * @memberof FbcReactionPlugin_t 850 */ 851 LIBSBML_EXTERN 852 int 853 FbcReactionPlugin_unsetUpperFluxBound(SBasePlugin_t * fbc); 854 855 856 /** 857 * Predicate returning @c 1 (true) or @c 0 (false) depending on whether the given 858 * FbcReactionPlugin_t structure's GeneProductAssociation is set. 859 * 860 * @param fbc the FbcReactionPlugin_t structure to query. 861 * 862 * @return @c 1 (true) if the "geneProductAssopciation" elemen of the given 863 * FbcReactionPlugin_t structure is set, @c 0 (false) otherwise. 864 * 865 * @memberof FbcReactionPlugin_t 866 */ 867 LIBSBML_EXTERN 868 int 869 FbcReactionPlugin_isSetGeneProductAssociation(SBasePlugin_t * fbc); 870 871 872 /** 873 * Takes a FbcReactionPlugin_t structure and returns its GeneProductAssociation_t. 874 * 875 * @param fbc the FbcReactionPlugin_t whose GeneProductAssociation_t is sought. 876 * 877 * @return the a pointer to the GeneProductAssociation_t of the given FbcReactionPlugin_t. 878 * 879 * @memberof FbcReactionPlugin_t 880 */ 881 LIBSBML_EXTERN 882 GeneProductAssociation_t* 883 FbcReactionPlugin_getGeneProductAssociation(SBasePlugin_t * fbc); 884 885 886 /** 887 * Takes a FbcReactionPlugin_t structure and sets its GeneProductAssociation_t. 888 * 889 * @param fbc the FbcReactionPlugin_t whose GeneProductAssociation_t is sought. 890 * @param gpa a pointer to the GeneProductAssociation_t to be set. 891 * 892 * @copydetails doc_returns_success_code 893 * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t} 894 * @li @sbmlconstant{LIBSBML_OPERATION_FAILED, OperationReturnValues_t} 895 * 896 * @memberof FbcReactionPlugin_t 897 */ 898 LIBSBML_EXTERN 899 int 900 FbcReactionPlugin_setGeneProductAssociation(SBasePlugin_t * fbc, 901 GeneProductAssociation_t* gpa); 902 903 904 905 906 907 END_C_DECLS 908 909 LIBSBML_CPP_NAMESPACE_END 910 911 912 #endif /* __cplusplus */ 913 #endif /* FbcReactionPlugin_H__ */ 914 915 916