1 /** 2 * @file FluxBound.h 3 * @brief Definition of FluxBound, the SBase derived class of the fbc package. 4 * @author Frank T. Bergmann 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 * This library is free software; you can redistribute it and/or modify it 29 * under the terms of the GNU Lesser General Public License as published by 30 * the Free Software Foundation. A copy of the license agreement is provided 31 * in the file named "LICENSE.txt" included with this software distribution 32 * and also available online as http://sbml.org/software/libsbml/license.html 33 *------------------------------------------------------------------------- --> 34 * 35 * @class FluxBound 36 * @sbmlbrief{fbc} Max or min value for a reaction flux. 37 * 38 * The FluxBound class of objects is used in Version 1 of the SBML 39 * Level 3 @ref fbc (“fbc”) package to express a single 40 * (in)equality that provides the maximum or minimum value that a reaction 41 * flux can obtain at steady state. (This same information is encoded 42 * differently in Version 2 of “fbc”; see the 43 * "upperFluxBound" and "lowerFluxBound" attributes on FbcReactionPlugin.) 44 * 45 * @section fluxbound-attributes Attributes on FluxBound 46 * 47 * In addition to the common optional attributes "id" and "name", FluxBound 48 * takes three required attributes: "reaction", "operation" and "value". 49 * These three attributes define the meaning of the FluxBound, and are 50 * interpreted using the following expression: 51 * <center> 52 * <em>reaction</em> <em>operator</em> <em>value</em> 53 * </center> 54 * 55 * The "reaction" attribute takes a value of <code>SIdRef</code>. The value 56 * must be the identifier of a Reaction object defined within the enclosing 57 * model. 58 * 59 * The "operation" attribute takes a value from 60 * @if clike the enumeration #FluxBoundOperation_t @else a set of constants 61 * whose names begin with <code>FLUXBOUND_</code>@endif@~ representing 62 * different mathematical inequalities. Possible values for "operation" include 63 * <code>"greaterEqual"</code>, <code>"equal"</code>, and others. 64 * 65 * The "value" attribute takes a numerical value of type <code>double</code>, 66 * and represents the value of the flux bound. The permitted values include 67 * positive infinity (<code>"INF"</code>) and negative infinity 68 * (<code>"-INF"</code>). 69 * 70 * The following is an example of a set of flux bounds encoded in this form; it 71 * also demonstrates the use of ListOfFluxBounds. 72 * 73 * @verbatim 74 <fbc:listOfFluxBounds> 75 <fbc:fluxBound fbc:id="R1b" fbc:reaction="R1" fbc:operation="greaterEqual" fbc:value="1.2"/> 76 <fbc:fluxBound fbc:id="R2b" fbc:reaction="R2" fbc:operation="lessEqual" fbc:value="-1.2"/> 77 <fbc:fluxBound fbc:id="R3b" fbc:reaction="R3" fbc:operation="greaterEqual" fbc:value="-INF"/> 78 <fbc:fluxBound fbc:id="R4b" fbc:reaction="R4" fbc:operation="lessEqual" fbc:value="INF"/> 79 <fbc:fluxBound fbc:id="R5b" fbc:reaction="R5" fbc:operation="equal" fbc:value="1"/> 80 </fbc:listOfFluxBounds> 81 @endverbatim 82 * 83 * @note This class is only defined for Version 1 of the 84 * “fbc” package specification. It was replaced in 85 * Version 2 by a Parameter referenced by the "upperFluxBound" or 86 * "lowerFluxBound" attributes on an FbcReactionPlugin. FluxBound is 87 * therefore not used for Version 2 “fbc” models. 88 * 89 * @see ListOfFluxBounds 90 */ 91 92 #ifndef FluxBound_H__ 93 #define FluxBound_H__ 94 95 96 #include <sbml/common/extern.h> 97 #include <sbml/common/sbmlfwd.h> 98 #include <sbml/packages/fbc/common/fbcfwd.h> 99 100 LIBSBML_CPP_NAMESPACE_BEGIN 101 102 /** 103 * @enum FluxBoundOperation_t 104 * @brief Possible values for the FluxBound 'operation' attribute. 105 * 106 * The possible legal values are less than or equal to, greater than or 107 * equal to, or equal to. The two options <i>less than</i> and <i>greater 108 * than</i> are not legal values for the FluxBound 'operation' attribute, 109 * but are provided to allow backwards compatibility with an earlier 110 * version of the draft specification. 111 */ 112 typedef enum 113 { 114 FLUXBOUND_OPERATION_LESS_EQUAL /*!< Less than or equal to. */ 115 , FLUXBOUND_OPERATION_GREATER_EQUAL /*!< Greater than or equal to.*/ 116 , FLUXBOUND_OPERATION_LESS /*!< Less than. NOTE: ILLEGAL VALUE. */ 117 , FLUXBOUND_OPERATION_GREATER /*!< Greater than. NOTE: ILLEGAL VALUE. */ 118 , FLUXBOUND_OPERATION_EQUAL /*!< Equal to. */ 119 , FLUXBOUND_OPERATION_UNKNOWN /*!< Unknown operation. */ 120 } FluxBoundOperation_t; 121 122 LIBSBML_CPP_NAMESPACE_END 123 124 125 #ifdef __cplusplus 126 127 #include <string> 128 129 #include <sbml/SBase.h> 130 #include <sbml/ListOf.h> 131 #include <sbml/packages/fbc/extension/FbcExtension.h> 132 133 LIBSBML_CPP_NAMESPACE_BEGIN 134 135 136 class LIBSBML_EXTERN FluxBound : public SBase 137 { 138 protected: 139 /** @cond doxygenLibsbmlInternal */ 140 // std::string mId; 141 // std::string mName; 142 std::string mReaction; 143 FluxBoundOperation_t mOperation; 144 std::string mOperationString; 145 double mValue; 146 /** @endcond */ 147 148 public: 149 150 /** 151 * Creates a new FbcAssociation with the given SBML Level, Version, and 152 * “fbc”package version. 153 * 154 * @param level an unsigned int, the SBML Level to assign to this 155 * FluxObjective. 156 * 157 * @param version an unsigned int, the SBML Version to assign to this 158 * FluxObjective. 159 * 160 * @param pkgVersion an unsigned int, the SBML Fbc Version to assign to 161 * this FluxObjective. 162 * 163 * @copydetails doc_note_setting_lv_pkg 164 */ 165 FluxBound(unsigned int level = FbcExtension::getDefaultLevel(), 166 unsigned int version = FbcExtension::getDefaultVersion(), 167 unsigned int pkgVersion = FbcExtension::getDefaultPackageVersion()); 168 169 170 /** 171 * Creates a new FluxBound with the given FbcPkgNamespaces object. 172 * 173 * @copydetails doc_what_are_sbml_package_namespaces 174 * 175 * @param fbcns the FbcPkgNamespaces object. 176 * 177 * @copydetails doc_note_setting_lv_pkg 178 */ 179 FluxBound(FbcPkgNamespaces* fbcns); 180 181 182 /** 183 * Copy constructor. 184 * 185 * @param source the instance to copy. 186 */ 187 FluxBound(const FluxBound& source); 188 189 190 /** 191 * Assignment operator. 192 * 193 * @param source the object whose values are used as the basis of the 194 * assignment. 195 */ 196 FluxBound& operator=(const FluxBound& source); 197 198 199 /** 200 * Destructor. 201 */ 202 virtual ~FluxBound (); 203 204 205 /** 206 * Returns the value of the "id" attribute of this FluxBound. 207 * 208 * @note Because of the inconsistent behavior of this function with 209 * respect to assignments and rules, it is now recommended to 210 * use the getIdAttribute() function instead. 211 * 212 * @copydetails doc_id_attribute 213 * 214 * @return the id of this FluxBound. 215 * 216 * @see getIdAttribute() 217 * @see setIdAttribute(const std::string& sid) 218 * @see isSetIdAttribute() 219 * @see unsetIdAttribute() 220 */ 221 virtual const std::string& getId () const; 222 223 224 /** 225 * Predicate returning @c true if this FluxBound's "id" attribute is set. 226 * 227 * @copydetails doc_isset_id 228 */ 229 virtual bool isSetId () const; 230 231 232 /** 233 * Sets the value of the "id" attribute of this FluxBound. 234 * 235 * @copydetails doc_set_id 236 */ 237 virtual int setId(const std::string& sid); 238 239 240 /** 241 * Unsets the value of the "id" attribute of this FluxBound object. 242 * 243 * @copydetails doc_unset_id 244 */ 245 virtual int unsetId (); 246 247 248 /** 249 * Returns the value of the "name" attribute of this FluxBound object. 250 * 251 * @copydetails doc_get_name 252 */ 253 virtual const std::string& getName () const; 254 255 256 /** 257 * Predicate returning @c true if this FluxBound's "name" attribute is set. 258 * 259 * @copydetails doc_isset_name 260 */ 261 virtual bool isSetName () const; 262 263 264 /** 265 * Sets the value of the "name" attribute of this FluxBound. 266 * 267 * @copydetails doc_set_name 268 */ 269 virtual int setName (const std::string& name); 270 271 272 /** 273 * Unsets the value of the "name" attribute of this FluxBound object. 274 * 275 * @copydetails doc_unset_name 276 */ 277 virtual int unsetName (); 278 279 280 /** 281 * Returns the value of the "reaction" attribute of this FluxBound object. 282 * 283 * @return the value of the "reaction" attribute of this FluxBound object. 284 */ 285 virtual const std::string& getReaction () const; 286 287 288 /** 289 * Predicate returning @c true if this FluxBound's "reaction" attribute is 290 * set. 291 * 292 * @return @c true if this FluxBound object's "reaction" attribute has been 293 * set, otherwise @c false is returned. 294 */ 295 virtual bool isSetReaction () const; 296 297 298 /** 299 * Sets the value of the "reaction" attribute of this FluxBound object. 300 * 301 * @copydetails doc_returns_success_code 302 * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t} 303 * @li @sbmlconstant{LIBSBML_INVALID_ATTRIBUTE_VALUE, OperationReturnValues_t} 304 */ 305 virtual int setReaction (const std::string& reaction); 306 307 308 /** 309 * Unsets the value of the "reaction" attribute of this FluxBound object. 310 * 311 * @copydetails doc_returns_success_code 312 * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t} 313 * @li @sbmlconstant{LIBSBML_OPERATION_FAILED, OperationReturnValues_t} 314 */ 315 virtual int unsetReaction (); 316 317 318 /** 319 * Returns the value of the "operation" attribute of this FluxBound object. 320 * 321 * @return the value of the "operation" attribute of this FluxBound object. 322 */ 323 const std::string& getOperation (); 324 325 326 /** 327 * Returns the value of the "operation" attribute of this FluxBound object. 328 * 329 * @return the value of the "operation" attribute of this FluxBound object. 330 */ 331 FluxBoundOperation_t getFluxBoundOperation () const; 332 333 334 /** 335 * Predicate returning @c true if this FluxBound's "operation" attribute is 336 * set. 337 * 338 * @return @c true if this FluxBound object's "operation" attribute has been set, 339 * otherwise @c false is returned. 340 */ 341 virtual bool isSetOperation () const; 342 343 344 /** 345 * Sets the value of the "operation" attribute of this FluxBound object. 346 * 347 * @copydetails doc_returns_success_code 348 * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t} 349 * @li @sbmlconstant{LIBSBML_INVALID_ATTRIBUTE_VALUE, OperationReturnValues_t} 350 */ 351 virtual int setOperation (const std::string& operation); 352 353 354 /** 355 * Sets the value of the "operation" attribute of this FluxBound object. 356 * 357 * @copydetails doc_returns_success_code 358 * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t} 359 * @li @sbmlconstant{LIBSBML_INVALID_ATTRIBUTE_VALUE, OperationReturnValues_t} 360 */ 361 virtual int setOperation (FluxBoundOperation_t operation); 362 363 364 /** 365 * Unsets the value of the "operation" attribute of this FluxBound object. 366 * 367 * @copydetails doc_returns_success_code 368 * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t} 369 * @li @sbmlconstant{LIBSBML_OPERATION_FAILED, OperationReturnValues_t} 370 */ 371 virtual int unsetOperation (); 372 373 /** 374 * Returns the value of the "value" attribute of this FluxBound object. 375 * 376 * @return the value of the "value" attribute of this FluxBound object. 377 */ 378 virtual double getValue () const; 379 380 381 /** 382 * Predicate returning @c true if this FluxBound's "value" attribute is 383 * set. 384 * 385 * @return @c true if this FluxBound object's "value" attribute has been set, 386 * otherwise @c false is returned. 387 */ 388 virtual bool isSetValue () const; 389 390 391 /** 392 * Sets the value of the "value" attribute of this FluxBound object. 393 * 394 * @copydetails doc_returns_success_code 395 * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t} 396 * @li @sbmlconstant{LIBSBML_INVALID_ATTRIBUTE_VALUE, OperationReturnValues_t} 397 */ 398 virtual int setValue (const double value); 399 400 401 /** 402 * Unsets the value of the "value" attribute of this FluxBound object. 403 * 404 * @copydetails doc_returns_success_code 405 * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t} 406 * @li @sbmlconstant{LIBSBML_OPERATION_FAILED, OperationReturnValues_t} 407 */ 408 virtual int unsetValue (); 409 410 411 /** 412 * @copydoc doc_renamesidref_common 413 */ 414 virtual void renameSIdRefs(const std::string& oldid, const std::string& newid); 415 416 417 /** 418 * Returns the XML element name of this object. 419 * 420 * For FluxBound, the XML element name is always @c "fluxBound". 421 * 422 * @return the name of this element, i.e. @c "fluxBound". 423 */ 424 virtual const std::string& getElementName () const ; 425 426 427 /** 428 * Creates and returns a deep copy of this FluxBound object. 429 * 430 * @return a (deep) copy of this FluxBound object. 431 */ 432 virtual FluxBound* clone () const; 433 434 435 /** 436 * Returns the libSBML type code of this object instance. 437 * 438 * @copydetails doc_what_are_typecodes 439 * 440 * @return the SBML type code for this object: 441 * @sbmlconstant{SBML_FBC_FLUXBOUND, SBMLFbcTypeCode_t}. 442 * 443 * @copydetails doc_warning_typecodes_not_unique 444 * 445 * @see getElementName() 446 * @see getPackageName() 447 */ 448 virtual int getTypeCode () const; 449 450 451 /** @cond doxygenLibsbmlInternal */ 452 /** 453 * Subclasses should override this method to write out their contained 454 * SBML objects as XML elements. Be sure to call your parent's 455 * implementation of this method as well. For example: 456 * 457 * SBase::writeElements(stream); 458 * mReactants.write(stream); 459 * mProducts.write(stream); 460 * ... 461 */ 462 virtual void writeElements (XMLOutputStream& stream) const; 463 /** @endcond */ 464 465 466 /** @cond doxygenLibsbmlInternal */ 467 /** 468 * Accepts the given SBMLVisitor. 469 * 470 * @return the result of calling <code>v.visit()</code>, which indicates 471 * whether or not the Visitor would like to visit the SBML object's next 472 * sibling object (if available). 473 */ 474 virtual bool accept (SBMLVisitor& v) const; 475 /** @endcond */ 476 477 478 /** @cond doxygenLibsbmlInternal */ 479 /** 480 * Sets the parent SBMLDocument of this SBML object. 481 * 482 * @param d the SBMLDocument object to use. 483 */ 484 virtual void setSBMLDocument (SBMLDocument* d); 485 /** @endcond */ 486 487 488 /** @cond doxygenLibsbmlInternal */ 489 /** 490 * Enables/Disables the given package with this element and child 491 * elements (if any). 492 * (This is an internal implementation for enablePakcage function) 493 * 494 * @note Subclasses in which one or more child elements are defined 495 * must override this function. 496 */ 497 virtual void enablePackageInternal(const std::string& pkgURI, 498 const std::string& pkgPrefix, bool flag); 499 /** @endcond */ 500 501 #ifndef SWIG 502 503 504 505 /** @cond doxygenLibsbmlInternal */ 506 507 /** 508 * Returns the value of the "attributeName" attribute of this FluxBound. 509 * 510 * @param attributeName, the name of the attribute to retrieve. 511 * 512 * @param value, the address of the value to record. 513 * 514 * @copydetails doc_returns_success_code 515 * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t} 516 * @li @sbmlconstant{LIBSBML_OPERATION_FAILED, OperationReturnValues_t} 517 */ 518 virtual int getAttribute(const std::string& attributeName, bool& value) 519 const; 520 521 /** @endcond */ 522 523 524 525 /** @cond doxygenLibsbmlInternal */ 526 527 /** 528 * Returns the value of the "attributeName" attribute of this FluxBound. 529 * 530 * @param attributeName, the name of the attribute to retrieve. 531 * 532 * @param value, the address of the value to record. 533 * 534 * @copydetails doc_returns_success_code 535 * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t} 536 * @li @sbmlconstant{LIBSBML_OPERATION_FAILED, OperationReturnValues_t} 537 */ 538 virtual int getAttribute(const std::string& attributeName, int& value) const; 539 540 /** @endcond */ 541 542 543 544 /** @cond doxygenLibsbmlInternal */ 545 546 /** 547 * Returns the value of the "attributeName" attribute of this FluxBound. 548 * 549 * @param attributeName, the name of the attribute to retrieve. 550 * 551 * @param value, the address of the value to record. 552 * 553 * @copydetails doc_returns_success_code 554 * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t} 555 * @li @sbmlconstant{LIBSBML_OPERATION_FAILED, OperationReturnValues_t} 556 */ 557 virtual int getAttribute(const std::string& attributeName, 558 double& value) const; 559 560 /** @endcond */ 561 562 563 564 /** @cond doxygenLibsbmlInternal */ 565 566 /** 567 * Returns the value of the "attributeName" attribute of this FluxBound. 568 * 569 * @param attributeName, the name of the attribute to retrieve. 570 * 571 * @param value, the address of the value to record. 572 * 573 * @copydetails doc_returns_success_code 574 * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t} 575 * @li @sbmlconstant{LIBSBML_OPERATION_FAILED, OperationReturnValues_t} 576 */ 577 virtual int getAttribute(const std::string& attributeName, 578 unsigned int& value) const; 579 580 /** @endcond */ 581 582 583 584 /** @cond doxygenLibsbmlInternal */ 585 586 /** 587 * Returns the value of the "attributeName" attribute of this FluxBound. 588 * 589 * @param attributeName, the name of the attribute to retrieve. 590 * 591 * @param value, the address of the value to record. 592 * 593 * @copydetails doc_returns_success_code 594 * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t} 595 * @li @sbmlconstant{LIBSBML_OPERATION_FAILED, OperationReturnValues_t} 596 */ 597 virtual int getAttribute(const std::string& attributeName, 598 std::string& value) const; 599 600 /** @endcond */ 601 602 603 604 /** @cond doxygenLibsbmlInternal */ 605 606 /** 607 * Predicate returning @c true if this FluxBound's attribute "attributeName" 608 * is set. 609 * 610 * @param attributeName, the name of the attribute to query. 611 * 612 * @return @c true if this FluxBound's attribute "attributeName" has been 613 * set, otherwise @c false is returned. 614 */ 615 virtual bool isSetAttribute(const std::string& attributeName) const; 616 617 /** @endcond */ 618 619 620 621 /** @cond doxygenLibsbmlInternal */ 622 623 /** 624 * Sets the value of the "attributeName" attribute of this FluxBound. 625 * 626 * @param attributeName, the name of the attribute to set. 627 * 628 * @param value, the value of the attribute to set. 629 * 630 * @copydetails doc_returns_success_code 631 * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t} 632 * @li @sbmlconstant{LIBSBML_OPERATION_FAILED, OperationReturnValues_t} 633 */ 634 virtual int setAttribute(const std::string& attributeName, bool value); 635 636 /** @endcond */ 637 638 639 640 /** @cond doxygenLibsbmlInternal */ 641 642 /** 643 * Sets the value of the "attributeName" attribute of this FluxBound. 644 * 645 * @param attributeName, the name of the attribute to set. 646 * 647 * @param value, the value of the attribute to set. 648 * 649 * @copydetails doc_returns_success_code 650 * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t} 651 * @li @sbmlconstant{LIBSBML_OPERATION_FAILED, OperationReturnValues_t} 652 */ 653 virtual int setAttribute(const std::string& attributeName, int value); 654 655 /** @endcond */ 656 657 658 659 /** @cond doxygenLibsbmlInternal */ 660 661 /** 662 * Sets the value of the "attributeName" attribute of this FluxBound. 663 * 664 * @param attributeName, the name of the attribute to set. 665 * 666 * @param value, the value of the attribute to set. 667 * 668 * @copydetails doc_returns_success_code 669 * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t} 670 * @li @sbmlconstant{LIBSBML_OPERATION_FAILED, OperationReturnValues_t} 671 */ 672 virtual int setAttribute(const std::string& attributeName, double value); 673 674 /** @endcond */ 675 676 677 678 /** @cond doxygenLibsbmlInternal */ 679 680 /** 681 * Sets the value of the "attributeName" attribute of this FluxBound. 682 * 683 * @param attributeName, the name of the attribute to set. 684 * 685 * @param value, the value of the attribute to set. 686 * 687 * @copydetails doc_returns_success_code 688 * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t} 689 * @li @sbmlconstant{LIBSBML_OPERATION_FAILED, OperationReturnValues_t} 690 */ 691 virtual int setAttribute(const std::string& attributeName, 692 unsigned int value); 693 694 /** @endcond */ 695 696 697 698 /** @cond doxygenLibsbmlInternal */ 699 700 /** 701 * Sets the value of the "attributeName" attribute of this FluxBound. 702 * 703 * @param attributeName, the name of the attribute to set. 704 * 705 * @param value, the value of the attribute to set. 706 * 707 * @copydetails doc_returns_success_code 708 * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t} 709 * @li @sbmlconstant{LIBSBML_OPERATION_FAILED, OperationReturnValues_t} 710 */ 711 virtual int setAttribute(const std::string& attributeName, 712 const std::string& value); 713 714 /** @endcond */ 715 716 717 718 /** @cond doxygenLibsbmlInternal */ 719 720 /** 721 * Unsets the value of the "attributeName" attribute of this FluxBound. 722 * 723 * @param attributeName, the name of the attribute to query. 724 * 725 * @copydetails doc_returns_success_code 726 * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t} 727 * @li @sbmlconstant{LIBSBML_OPERATION_FAILED, OperationReturnValues_t} 728 */ 729 virtual int unsetAttribute(const std::string& attributeName); 730 731 /** @endcond */ 732 733 734 735 736 #endif /* !SWIG */ 737 738 protected: 739 /** @cond doxygenLibsbmlInternal */ 740 /** 741 * Create and return an SBML object of this class, if present. 742 * 743 * @return the SBML object corresponding to next XMLToken in the 744 * XMLInputStream or @c NULL if the token was not recognized. 745 */ 746 virtual SBase* 747 createObject (XMLInputStream& stream); 748 /** @endcond */ 749 750 751 /** @cond doxygenLibsbmlInternal */ 752 /** 753 * Subclasses should override this method to get the list of 754 * expected attributes. 755 * This function is invoked from corresponding readAttributes() 756 * function. 757 */ 758 virtual void addExpectedAttributes(ExpectedAttributes& attributes); 759 /** @endcond */ 760 761 762 /** @cond doxygenLibsbmlInternal */ 763 /** 764 * Subclasses should override this method to read values from the given 765 * XMLAttributes set into their specific fields. Be sure to call your 766 * parent's implementation of this method as well. 767 */ 768 virtual void readAttributes (const XMLAttributes& attributes, 769 const ExpectedAttributes& expectedAttributes); 770 /** @endcond */ 771 772 773 /** @cond doxygenLibsbmlInternal */ 774 /** 775 * Subclasses should override this method to write their XML attributes 776 * to the XMLOutputStream. Be sure to call your parent's implementation 777 * of this method as well. For example: 778 * 779 * SBase::writeAttributes(stream); 780 * stream.writeAttribute( "id" , mId ); 781 * stream.writeAttribute( "name", mName ); 782 * ... 783 */ 784 virtual void writeAttributes (XMLOutputStream& stream) const; 785 /** @endcond */ 786 }; 787 788 789 /** 790 * @class ListOfFluxBounds 791 * @sbmlbrief{fbc} A list of FluxBound objects. 792 * 793 * The ListOfFluxBounds is a container for the FluxBound elements of a Model. 794 * It is only defined for Version 1 of the “fbc” 795 * specification, and was replaced in Version 2 by Parameter elements 796 * referenced by the "upperFluxBound" or "lowerFluxBound" attributes on an 797 * FbcReactionPlugin. FluxBound and ListOfFluxBounds are not used for 798 * Version 2 “fbc” models. 799 * 800 * @copydetails doc_what_is_listof 801 * 802 * @see FluxBound 803 * 804 * @note This class and FluxBound are only defined for Version 1 of the 805 * “fbc” package specification. These classes are not used in 806 * Version 2 of “fbc”. 807 */ 808 class LIBSBML_EXTERN ListOfFluxBounds : public ListOf 809 { 810 public: 811 812 /** 813 * Creates and returns a deep copy of this ListOfFluxBounds. 814 * 815 * @return a (deep) copy of this ListOfFluxBounds. 816 */ 817 virtual ListOfFluxBounds* clone () const; 818 819 820 /** 821 * Creates a new ListOfFluxBounds with the given level, version, and package version. 822 * 823 * @param level the SBML Level. 824 * @param version the Version within the SBML Level. 825 * @param pkgVersion the version of the package. 826 * 827 * @copydetails doc_note_setting_lv_pkg 828 */ 829 ListOfFluxBounds(unsigned int level = FbcExtension::getDefaultLevel(), 830 unsigned int version = FbcExtension::getDefaultVersion(), 831 unsigned int pkgVersion = FbcExtension::getDefaultPackageVersion()); 832 833 834 /** 835 * Creates a new ListOfFluxBounds with the given FbcPkgNamespaces object. 836 * 837 * @copydetails doc_what_are_sbml_package_namespaces 838 * 839 * @param fbcns the FbcPkgNamespaces object. 840 * 841 * @copydetails doc_note_setting_lv_pkg 842 */ 843 ListOfFluxBounds(FbcPkgNamespaces* fbcns); 844 845 846 /** 847 * Get a FluxBound from the ListOfFluxBounds. 848 * 849 * @param n the index number of the FluxBound to get. 850 * 851 * @return the nth FluxBound in this ListOfFluxBounds. 852 * If the index @p n is invalid, @c NULL is returned. 853 * 854 * @see size() 855 */ 856 virtual FluxBound* get(unsigned int n); 857 858 859 /** 860 * Get a FluxBound from the ListOfFluxBounds. 861 * 862 * @param n the index number of the FluxBound to get. 863 * 864 * @return the nth FluxBound in this ListOfFluxBounds. 865 * If the index @p n is invalid, @c NULL is returned. 866 * 867 * @see size() 868 */ 869 virtual const FluxBound * get(unsigned int n) const; 870 871 872 /** 873 * Get a FluxBound from the ListOfFluxBounds 874 * based on its identifier. 875 * 876 * @param sid a string representing the identifier 877 * of the FluxBound to get. 878 * 879 * @return FluxBound in this ListOfFluxBounds 880 * with the given @p sid or @c NULL if no such 881 * FluxBound exists. 882 * 883 * @see get(unsigned int n) 884 * @see size() 885 */ 886 virtual FluxBound* get (const std::string& sid); 887 888 889 /** 890 * Get a FluxBound from the ListOfFluxBounds 891 * based on its identifier. 892 * 893 * @param sid a string representing the identifier 894 * of the FluxBound to get. 895 * 896 * @return FluxBound in this ListOfFluxBounds 897 * with the given @p sid or @c NULL if no such 898 * FluxBound exists. 899 * 900 * @see get(unsigned int n) 901 * @see size() 902 */ 903 virtual const FluxBound* get (const std::string& sid) const; 904 905 906 /** 907 * Removes the nth item from this ListOfFluxBounds items and returns a pointer to 908 * it. 909 * 910 * The caller owns the returned item and is responsible for deleting it. 911 * 912 * @param n the index of the item to remove. 913 * 914 * @see size() 915 */ 916 virtual FluxBound* remove (unsigned int n); 917 918 919 /** 920 * Removes item in this ListOfFluxBounds items with the given identifier. 921 * 922 * The caller owns the returned item and is responsible for deleting it. 923 * If none of the items in this list have the identifier @p sid, then 924 * @c NULL is returned. 925 * 926 * @param sid the identifier of the item to remove. 927 * 928 * @return the item removed. As mentioned above, the caller owns the 929 * returned item. 930 */ 931 virtual FluxBound* remove (const std::string& sid); 932 933 934 /** 935 * Returns the libSBML type code for the SBML objects 936 * contained in this ListOf object. 937 * 938 * @copydetails doc_what_are_typecodes 939 * 940 * @return the SBML type code for objects contained in this list: 941 * @sbmlconstant{SBML_FBC_FLUXBOUND, SBMLTypeCode_t} (default). 942 * 943 * @see getElementName() 944 * @see getPackageName() 945 */ 946 virtual int getItemTypeCode () const; 947 948 949 /** 950 * Returns the XML element name of this object. 951 * 952 * For ListOfFluxBounds, the XML element name is always @c "listOfFluxBounds". 953 * 954 * @return the name of this element, i.e. @c "listOfFluxBounds". 955 */ 956 virtual const std::string& getElementName () const; 957 958 959 protected: 960 961 /** @cond doxygenLibsbmlInternal */ 962 /** 963 * Create and return an SBML object of this class, if present. 964 * 965 * @return the SBML object corresponding to next XMLToken in the 966 * XMLInputStream or @c NULL if the token was not recognized. 967 */ 968 virtual SBase* createObject (XMLInputStream& stream); 969 970 virtual void writeXMLNS (XMLOutputStream& stream) const; 971 /** @endcond */ 972 }; 973 974 975 LIBSBML_CPP_NAMESPACE_END 976 977 #endif /* __cplusplus */ 978 979 980 #ifndef SWIG 981 982 LIBSBML_CPP_NAMESPACE_BEGIN 983 BEGIN_C_DECLS 984 985 /** 986 * Creates a new FluxBound_t structure using the given SBML @p level 987 * and @p version, and the @p pkgVersion package version. 988 * 989 * @param level an unsigned int, the SBML Level to assign to this 990 * FluxBound_t. 991 * @param version an unsigned int, the SBML Version to assign to this 992 * FluxBound_t. 993 * @param pkgVersion an unsigned int, the SBML 'fbc' package Version to assign to this 994 * FluxBound_t. 995 * 996 * @return a pointer to the newly created FluxBound_t structure. 997 * 998 * @memberof FluxBound_t 999 */ 1000 LIBSBML_EXTERN 1001 FluxBound_t * 1002 FluxBound_create(unsigned int level, unsigned int version, unsigned int pkgVersion); 1003 1004 1005 /** 1006 * Takes an FluxBound_t structure and returns its identifier. 1007 * 1008 * @param fb the FluxBound_t structure whose identifier is sought. 1009 * 1010 * @return the identifier of the given FluxBound_t, as a pointer to a string. 1011 * 1012 * @memberof FluxBound_t 1013 */ 1014 LIBSBML_EXTERN 1015 const char * 1016 FluxBound_getId(FluxBound_t * fb); 1017 1018 1019 /** 1020 * Predicate returning @c 1 (true) or @c 0 (false) depending on whether the given 1021 * FluxBound_t structure's identifier is set. 1022 * 1023 * @param fb the FluxBound_t structure to query. 1024 * 1025 * @return @c 1 (true) if the "id" attribute of the given 1026 * FluxBound_t structure is set, @c 0 (false) otherwise. 1027 * 1028 * @memberof FluxBound_t 1029 */ 1030 LIBSBML_EXTERN 1031 int 1032 FluxBound_isSetId(FluxBound_t * fb); 1033 1034 1035 /** 1036 * Assigns the identifier of an FluxBound_t structure. 1037 * 1038 * This makes a copy of the string passed in the parameter @p sid. 1039 * 1040 * @param fb the FluxBound_t structure to set. 1041 * @param sid the string to use as the identifier. 1042 * 1043 * @copydetails doc_returns_success_code 1044 * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t} 1045 * @li @sbmlconstant{LIBSBML_INVALID_ATTRIBUTE_VALUE, OperationReturnValues_t} 1046 * 1047 * @note Using this function with an @p sid of NULL is equivalent to 1048 * unsetting the "id" attribute. 1049 * 1050 * @memberof FluxBound_t 1051 */ 1052 LIBSBML_EXTERN 1053 int 1054 FluxBound_setId(FluxBound_t * fb, const char * sid); 1055 1056 1057 /** 1058 * Unsets the "id" attribute of the given FluxBound_t structure. 1059 * 1060 * @param fb the FluxBound_t structure to unset. 1061 * 1062 * @copydetails doc_returns_success_code 1063 * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t} 1064 * @li @sbmlconstant{LIBSBML_OPERATION_FAILED, OperationReturnValues_t} 1065 * 1066 * @memberof FluxBound_t 1067 */ 1068 LIBSBML_EXTERN 1069 int 1070 FluxBound_unsetId(FluxBound_t * fb); 1071 1072 /** 1073 * Takes a FluxBound_t structure and returns its name. 1074 * 1075 * @param fb the FluxBound_t whose name is sought. 1076 * 1077 * @return the name of the given FluxBound_t, as a pointer to a string. 1078 * 1079 * @memberof FluxBound_t 1080 */ 1081 LIBSBML_EXTERN 1082 const char * 1083 FluxBound_getName(FluxBound_t * fb); 1084 1085 1086 /** 1087 * Predicate returning @c 1 (true) or @c 0 (false) depending on whether the given 1088 * FluxBound_t structure's name is set. 1089 * 1090 * @param fb the FluxBound_t structure to query. 1091 * 1092 * @return @c 1 (true) if the "name" attribute of the given 1093 * FluxBound_t structure is set, @c 0 (false) otherwise. 1094 * 1095 * @memberof FluxBound_t 1096 */ 1097 LIBSBML_EXTERN 1098 int 1099 FluxBound_isSetName(FluxBound_t * fb); 1100 1101 1102 /** 1103 * Sets the name of the given FluxBound_t to a copy of @p name. 1104 * 1105 * @param fb the FluxBound_t structure to set. 1106 * @param name the name to assign to the given FluxBound_t's "name" attribute. 1107 * 1108 * @copydetails doc_returns_success_code 1109 * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t} 1110 * @li @sbmlconstant{LIBSBML_INVALID_ATTRIBUTE_VALUE, OperationReturnValues_t} 1111 * 1112 * @note Using this function with the name set to NULL is equivalent to 1113 * unsetting the "name" attribute. 1114 * 1115 * @memberof FluxBound_t 1116 */ 1117 LIBSBML_EXTERN 1118 int 1119 FluxBound_setName(FluxBound_t * fb, const char * name); 1120 1121 1122 /** 1123 * Unsets the "name" attribute of the given FluxBound_t structure. 1124 * 1125 * @param fb the FluxBound_t structure to unset. 1126 * 1127 * @copydetails doc_returns_success_code 1128 * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t} 1129 * @li @sbmlconstant{LIBSBML_OPERATION_FAILED, OperationReturnValues_t} 1130 * 1131 * @memberof FluxBound_t 1132 */ 1133 LIBSBML_EXTERN 1134 int 1135 FluxBound_unsetName(FluxBound_t * fb); 1136 1137 1138 /** 1139 * Takes a FluxBound_t structure and returns its reaction. 1140 * 1141 * @param fb the FluxBound_t whose reaction is sought. 1142 * 1143 * @return the reaction of the given FluxBound_t, as a pointer to a string. 1144 * 1145 * @memberof FluxBound_t 1146 */ 1147 LIBSBML_EXTERN 1148 const char * 1149 FluxBound_getReaction(FluxBound_t * fb); 1150 1151 1152 /** 1153 * Predicate returning @c 1 (true) or @c 0 (false) depending on whether the given 1154 * FluxBound_t structure's reaction is set. 1155 * 1156 * @param fb the FluxBound_t structure to query. 1157 * 1158 * @return @c 1 (true) if the "reaction" attribute of the given 1159 * FluxBound_t structure is set, @c 0 (false) otherwise. 1160 * 1161 * @memberof FluxBound_t 1162 */ 1163 LIBSBML_EXTERN 1164 int 1165 FluxBound_isSetReaction(FluxBound_t * fb); 1166 1167 1168 /** 1169 * Sets the reaction of the given FluxBound_t to a copy of @p reaction. 1170 * 1171 * @param fb the FluxBound_t structure to set. 1172 * @param reaction the reaction to assign to the given FluxBound_t's "reaction" attribute. 1173 * 1174 * @copydetails doc_returns_success_code 1175 * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t} 1176 * @li @sbmlconstant{LIBSBML_INVALID_ATTRIBUTE_VALUE, OperationReturnValues_t} 1177 * 1178 * @note Using this function with the name set to NULL is equivalent to 1179 * unsetting the "reaction" attribute. 1180 * 1181 * @memberof FluxBound_t 1182 */ 1183 LIBSBML_EXTERN 1184 int 1185 FluxBound_setReaction(FluxBound_t * fb, const char * reaction); 1186 1187 1188 /** 1189 * Unsets the "reaction" attribute of the given FluxBound_t structure. 1190 * 1191 * @param fb the FluxBound_t structure to unset. 1192 * 1193 * @copydetails doc_returns_success_code 1194 * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t} 1195 * @li @sbmlconstant{LIBSBML_OPERATION_FAILED, OperationReturnValues_t} 1196 * 1197 * @memberof FluxBound_t 1198 */ 1199 LIBSBML_EXTERN 1200 int 1201 FluxBound_unsetReaction(FluxBound_t * fb); 1202 1203 1204 /** 1205 * Takes a FluxBound_t structure and returns its operation. 1206 * 1207 * @param fb the FluxBound_t whose operation is sought. 1208 * 1209 * @return the operation of the given FluxBound_t, as a pointer to a string. 1210 * 1211 * @memberof FluxBound_t 1212 */ 1213 LIBSBML_EXTERN 1214 const char * 1215 FluxBound_getOperation(FluxBound_t * fb); 1216 1217 1218 /** 1219 * Predicate returning @c 1 (true) or @c 0 (false) depending on whether the given 1220 * FluxBound_t structure's operation is set. 1221 * 1222 * @param fb the FluxBound_t structure to query. 1223 * 1224 * @return @c 1 (true) if the "operation" attribute of the given 1225 * FluxBound_t structure is set, @c 0 (false) otherwise. 1226 * 1227 * @memberof FluxBound_t 1228 */ 1229 LIBSBML_EXTERN 1230 int 1231 FluxBound_isSetOperation(FluxBound_t * fb); 1232 1233 1234 /** 1235 * Sets the operation of the given FluxBound_t to a copy of @p operation. 1236 * 1237 * @param fb the FluxBound_t structure to set. 1238 * @param operation the operation to assign to the given FluxBound_t's "operation" attribute. 1239 * 1240 * @copydetails doc_returns_success_code 1241 * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t} 1242 * @li @sbmlconstant{LIBSBML_INVALID_ATTRIBUTE_VALUE, OperationReturnValues_t} 1243 * 1244 * @note Using this function with the name set to NULL is equivalent to 1245 * unsetting the "operation" attribute. 1246 * 1247 * @memberof FluxBound_t 1248 */ 1249 LIBSBML_EXTERN 1250 int 1251 FluxBound_setOperation(FluxBound_t * fb, const char * operation); 1252 1253 1254 /** 1255 * Unsets the "operation" attribute of the given FluxBound_t structure. 1256 * 1257 * @param fb the FluxBound_t structure to unset. 1258 * 1259 * @copydetails doc_returns_success_code 1260 * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t} 1261 * @li @sbmlconstant{LIBSBML_OPERATION_FAILED, OperationReturnValues_t} 1262 * 1263 * @memberof FluxBound_t 1264 */ 1265 LIBSBML_EXTERN 1266 int 1267 FluxBound_unsetOperation(FluxBound_t * fb); 1268 1269 1270 /** 1271 * Takes a FluxBound_t structure and returns its value. 1272 * 1273 * @param fb the FluxBound_t whose value is sought. 1274 * 1275 * @return the value attribute of the given FluxBound_t, as a @c double. 1276 * 1277 * @memberof FluxBound_t 1278 */ 1279 LIBSBML_EXTERN 1280 double 1281 FluxBound_getValue(FluxBound_t * fb); 1282 1283 1284 /** 1285 * Predicate returning @c 1 (true) or @c 0 (false) depending on whether the given 1286 * FluxBound_t structure's value is set. 1287 * 1288 * @param fb the FluxBound_t structure to query. 1289 * 1290 * @return @c 1 (true) if the "value" attribute of the given 1291 * FluxBound_t structure is set, @c 0 (false) otherwise. 1292 * 1293 * @memberof FluxBound_t 1294 */ 1295 LIBSBML_EXTERN 1296 int 1297 FluxBound_isSetValue(FluxBound_t * fb); 1298 1299 1300 /** 1301 * Sets the "value" attribute of the given FluxBound_t 1302 * structure. 1303 * 1304 * @param fb the FluxBound_t structure. 1305 * 1306 * @param value the value of value to assign to the "value" attribute. 1307 * 1308 * @copydetails doc_returns_success_code 1309 * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t} 1310 * @li @sbmlconstant{LIBSBML_UNEXPECTED_ATTRIBUTE, OperationReturnValues_t} 1311 * 1312 * @memberof FluxBound_t 1313 */ 1314 LIBSBML_EXTERN 1315 int 1316 FluxBound_setValue(FluxBound_t * fb, double value); 1317 1318 1319 /** 1320 * Unsets the "value" attribute of the given FluxBound_t structure. 1321 * 1322 * @param fb the FluxBound_t structure to unset. 1323 * 1324 * @copydetails doc_returns_success_code 1325 * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t} 1326 * @li @sbmlconstant{LIBSBML_OPERATION_FAILED, OperationReturnValues_t} 1327 * 1328 * @memberof FluxBound_t 1329 */ 1330 LIBSBML_EXTERN 1331 int 1332 FluxBound_unsetValue(FluxBound_t * fb); 1333 1334 /** 1335 * Returns the string version of the provided #FluxBoundOperation_t enumeration. 1336 * 1337 * @param type the #FluxBoundOperation_t enumeration to convert. 1338 * 1339 * @return A string corresponding to the given effect: "lessEqual", 1340 * "greaterEqual", "equal", or @c NULL if the value is 1341 * @sbmlconstant{FLUXBOUND_OPERATION_UNKNOWN, FluxBoundOperation_t} 1342 * or another invalid enumeration value. 1343 * 1344 * @note In an earlier version of this specification, "less" and "greater" were 1345 * options that were dropped in the final version of the specification. 1346 * Accordingly, "less" is always converted to "lessEqual", and "greater" is 1347 * always converted to "greaterEqual". 1348 * 1349 * @memberof FluxBound_t 1350 */ 1351 LIBSBML_EXTERN 1352 const char* 1353 FluxBoundOperation_toString(FluxBoundOperation_t type); 1354 1355 1356 /** 1357 * Returns the #FluxBoundOperation_t enumeration corresponding to 1358 * the given string, or 1359 * @sbmlconstant{FLUXBOUND_OPERATION_UNKNOWN, FluxBoundOperation_t} 1360 * if there is 1361 * no such match. The matching is case-sensitive: "lessEqual" will 1362 * return @sbmlconstant{FLUXBOUND_OPERATION_LESS_EQUAL, FluxBoundOperation_t}, but "lessequal" will return 1363 * @sbmlconstant{FLUXBOUND_OPERATION_UNKNOWN, FluxBoundOperation_t}. 1364 * 1365 * @param s the string to convert to a #FluxBoundOperation_t. 1366 * 1367 * @return The corresponding #FluxBoundOperation_t, or 1368 * @sbmlconstant{FLUXBOUND_OPERATION_UNKNOWN, FluxBoundOperation_t} if no match found. 1369 * 1370 * @note In an earlier version of this specification, "less" and "greater" were 1371 * options that were dropped in the final version of the specification. 1372 * Accordingly, "less" is always converted to "lessEqual", and "greater" is 1373 * always converted to "greaterEqual". 1374 * 1375 * @memberof FluxBound_t 1376 */ 1377 LIBSBML_EXTERN 1378 FluxBoundOperation_t 1379 FluxBoundOperation_fromString(const char* s); 1380 1381 1382 /** 1383 * Predicate returning @c 1 (true) or @c 0 (false) depending on whether the given 1384 * #FluxBoundOperation_t is valid. 1385 * 1386 * @param type the #FluxBoundOperation_t enumeration to query. 1387 * 1388 * @return @c 1 (true) if the FluxBoundOperation_t is 1389 * @sbmlconstant{FLUXBOUND_OPERATION_LESS_EQUAL, FluxBoundOperation_t}, 1390 * @sbmlconstant{FLUXBOUND_OPERATION_GREATER_EQUAL, FluxBoundOperation_t}, 1391 * @sbmlconstant{FLUXBOUND_OPERATION_LESS, FluxBoundOperation_t}, 1392 * @sbmlconstant{FLUXBOUND_OPERATION_GREATER, FluxBoundOperation_t}, or 1393 * @sbmlconstant{FLUXBOUND_OPERATION_EQUAL, FluxBoundOperation_t}; 1394 * @c 0 (false) otherwise (including 1395 * @sbmlconstant{FLUXBOUND_OPERATION_UNKNOWN, FluxBoundOperation_t}). 1396 * 1397 * @note In an earlier version of this specification, "less" and "greater" were 1398 * options that were dropped in the final version of the specification. 1399 * Accordingly, "less" is always converted to "lessEqual", and "greater" is 1400 * always converted to "greaterEqual". 1401 * 1402 * @memberof FluxBound_t 1403 */ 1404 LIBSBML_EXTERN 1405 int 1406 FluxBoundOperation_isValidFluxBoundOperation(FluxBoundOperation_t type); 1407 1408 1409 /** 1410 * Predicate returning @c 1 (true) or @c 0 (false) depending 1411 * on whether the given string is a valid #FluxBoundOperation_t. 1412 * The matching is case-sensitive: "lessEqual" will return @c 1 (true), but 1413 * "lessequal" will return @c 0 (false). 1414 * 1415 * @param s the string to query. 1416 * 1417 * @return @c 1 (true) if the string is 1418 * "lessEqual", "greaterEqual", "less", "greater", or "equal"; @c 0 (false) otherwise. 1419 * 1420 * @note In an earlier version of this specification, "less" and "greater" were 1421 * options that were dropped in the final version of the specification. 1422 * Accordingly, "less" is always converted to "lessEqual", and "greater" is 1423 * always converted to "greaterEqual". 1424 * 1425 * @memberof FluxBound_t 1426 */ 1427 LIBSBML_EXTERN 1428 int 1429 FluxBoundOperation_isValidFluxBoundOperationString(const char* s); 1430 1431 1432 END_C_DECLS 1433 LIBSBML_CPP_NAMESPACE_END 1434 1435 1436 #endif /* !SWIG */ 1437 #endif /* FluxBound_H__ */ 1438