1 /** 2 * @file SpatialExtension.h 3 * @brief Definition of SpatialExtension. 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 the 37 * Free Software Foundation. A copy of the license agreement is provided in the 38 * file named "LICENSE.txt" included with this software distribution and also 39 * available online as http://sbml.org/software/libsbml/license.html 40 * ------------------------------------------------------------------------ --> 41 * 42 * @class SpatialExtension 43 * @sbmlbrief{spatial} Base extension class for the package. 44 * 45 * @htmlinclude not-sbml-warning.html 46 * 47 * This is the Spatial package extension of the SBMLExtension class that is 48 * used to facilitate libSBML plug-ins in the implementation of an 49 * SBMLLevel 3 package. 50 * 51 * @class SpatialPkgNamespaces 52 * @sbmlbrief{spatial} SBMLNamespaces extension. 53 * 54 * @htmlinclude not-sbml-warning.html 55 */ 56 57 58 #ifndef SpatialExtension_H__ 59 #define SpatialExtension_H__ 60 61 62 #include <sbml/common/extern.h> 63 #include <sbml/SBMLTypeCodes.h> 64 65 66 #ifdef __cplusplus 67 68 69 #include <sbml/extension/SBMLExtension.h> 70 #include <sbml/extension/SBMLExtensionNamespaces.h> 71 #include <sbml/extension/SBMLExtensionRegister.h> 72 73 #ifndef SPATIAL_CREATE_NS 74 #define SPATIAL_CREATE_NS(variable, sbmlns)\ 75 EXTENSION_CREATE_NS(SpatialPkgNamespaces, variable, sbmlns); 76 #endif 77 78 #include <vector> 79 80 81 LIBSBML_CPP_NAMESPACE_BEGIN 82 83 84 class LIBSBML_EXTERN SpatialExtension : public SBMLExtension 85 { 86 public: 87 88 /** 89 * Returns the nickname of the SBML Level 3 package implemented by this 90 * libSBML extension. 91 * 92 * @return the package nickname, as a string. 93 * 94 * @copydetails doc_note_static_methods 95 */ 96 static const std::string& getPackageName(); 97 98 99 /** 100 * Returns the default SBML Level implemented by this libSBML extension. 101 * 102 * @return the SBML Level, as an unsigned integer. 103 * 104 * @copydetails doc_note_static_methods 105 */ 106 static unsigned int getDefaultLevel(); 107 108 109 /** 110 * Returns the default SBML Version implemented by this libSBML extension. 111 * 112 * @return the Version within the default SBML Level, as an unsigned integer. 113 * 114 * @copydetails doc_note_static_methods 115 */ 116 static unsigned int getDefaultVersion(); 117 118 119 /** 120 * Returns the default version of the SBML Level 3 package implemented 121 * by this libSBML extension. 122 * 123 * @return the default version number of the SBML Level 3 package 124 * definition, as an unsigned integer. 125 * 126 * @copydetails doc_note_static_methods 127 */ 128 static unsigned int getDefaultPackageVersion(); 129 130 131 /** 132 * Returns the XML namespace URI of the SBML Level 3 package implemented 133 * by this libSBML extension. 134 * 135 * @return the XML namespace, as a string. 136 * 137 * @copydetails doc_note_static_methods 138 */ 139 static const std::string& getXmlnsL3V1V1(); 140 141 142 /** 143 * Creates a new SpatialExtension instance. 144 */ 145 SpatialExtension(); 146 147 148 /** 149 * Copy constructor for SpatialExtension. 150 * 151 * @param orig the SpatialExtension instance to copy. 152 */ 153 SpatialExtension(const SpatialExtension& orig); 154 155 156 /** 157 * Assignment operator for SpatialExtension. 158 * 159 * @param rhs the SpatialExtension object whose values are to be used as the 160 * basis of the assignment. 161 */ 162 SpatialExtension& operator=(const SpatialExtension& rhs); 163 164 165 /** 166 * Creates and returns a deep copy of this SpatialExtension object. 167 * 168 * @return a (deep) copy of this SpatialExtension object. 169 */ 170 virtual SpatialExtension* clone() const; 171 172 173 /** 174 * Destructor for SpatialExtension. 175 */ 176 virtual ~SpatialExtension(); 177 178 179 /** 180 * Returns the name of this SBML Level 3 package ("spatial"). 181 * 182 * @return a string representing the name of this package ("spatial"). 183 */ 184 virtual const std::string& getName() const; 185 186 187 /** 188 * Returns a string representing the SBML XML namespace of this SBML 189 * Level 3 package. 190 * 191 * @param sbmlLevel the level of SBML. 192 * 193 * @param sbmlVersion the version of SBML. 194 * 195 * @param pkgVersion the version of this package. 196 * 197 * @return a string representing the name of this package ("spatial"). 198 * 199 * The namespace URI constructed by this method corresponds to the 200 * combination of the Level and Version of SBML, and the Version of the SBML 201 * Level 3 package. (At the time of this writing, the only SBML Level 202 * that supports packages is Level 3, so the value of @p sbmlLevel is 203 * necessarily always <code>3</code>.) 204 */ 205 virtual const std::string& getURI(unsigned int sbmlLevel, 206 unsigned int sbmlVersion, 207 unsigned int pkgVersion) const; 208 209 210 /** 211 * Returns the SBML Level for the given URI of this package. 212 * 213 * @param uri the string of the URI that represents one of the versions of 214 * the "spatial" package. 215 * 216 * @return the SBML Level for the given URI of this package, or @c 0 if the 217 * given URI is invalid, or for a different package. 218 */ 219 virtual unsigned int getLevel(const std::string& uri) const; 220 221 222 /** 223 * Returns the Version within the SBML Level for the given URI of this 224 * package. 225 * 226 * @param uri the string of the URI that represents one of the versions of 227 * the "spatial" package. 228 * 229 * @return the SBML Version within the SBML Level for the given URI of this 230 * package, or @c 0 if the given URI is invalid, or for a different package. 231 */ 232 virtual unsigned int getVersion(const std::string& uri) const; 233 234 235 /** 236 * Returns the SBML Level 3 package version for the given URI of this 237 * package. 238 * 239 * @param uri the string of the URI that represents one of the versions of 240 * the "spatial" package. 241 * 242 * @return the version of the SBML Level 3 package for the given URI of 243 * this package, or @c 0 if the given URI is invalid, or for a different 244 * package. 245 */ 246 virtual unsigned int getPackageVersion(const std::string& uri) const; 247 248 249 /** 250 * Returns a SpatialPkgNamespaces object. 251 * 252 * @param uri the string of the URI that represents one of the versions of 253 * the "spatial" package. 254 * 255 * @return SpatialPkgNamespaces object corresponding to the given URI of this 256 * package, or @c NULL if the given URI is not defined in the "spatial" 257 * package. 258 */ 259 virtual SBMLNamespaces* getSBMLExtensionNamespaces(const std::string& uri) 260 const; 261 262 263 /** 264 * Takes a type code of the “spatial” package and returns a 265 * string describing the code. 266 * 267 * @param typeCode a libSBML type code defined by the libSBML extension 268 * implementing support for the SBML Level 3 “spatial” 269 * package. 270 * 271 * @return a text string representing the type code given by @p typeCode. If 272 * the type code is unrecognized for this implementation of the libSBML 273 * “spatial” package, the string returned will be <code>"(Unknown 274 * SBML Spatial Type)"</code>. 275 */ 276 virtual const char* getStringFromTypeCode(int typeCode) const; 277 278 279 280 /** @cond doxygenLibsbmlInternal */ 281 282 /** 283 * Returns the entry in the error table at this index. 284 * 285 * @param index an unsigned integer representing the index of the error. 286 * 287 * @return packageErrorTableEntry object in the SpatialSBMLErrorTable. 288 */ 289 virtual packageErrorTableEntry getErrorTable(unsigned int index) const; 290 291 /** @endcond */ 292 293 294 295 /** @cond doxygenLibsbmlInternal */ 296 297 /** 298 * Return the index in the error table with the given errorId. 299 * 300 * @param errorId an unsigned integer representing the errorId of the error. 301 * 302 * @return unsigned int representing the index in the SpatialSBMLErrorTable 303 * corresponding to the errorId given. 304 */ 305 virtual unsigned int getErrorTableIndex(unsigned int errorId) const; 306 307 /** @endcond */ 308 309 310 311 /** @cond doxygenLibsbmlInternal */ 312 313 /** 314 * Returns the offset for the errorId range for the "spatial" package. 315 * 316 * @return unsigned int representing the offset for errors in the 317 * SpatialSBMLErrorTable. 318 */ 319 virtual unsigned int getErrorIdOffset() const; 320 321 /** @endcond */ 322 323 324 325 /** @cond doxygenLibsbmlInternal */ 326 327 /** 328 * Initializes spatial extension by creating an object of this class with the 329 * required SBasePlugin derived objects and registering the object to the 330 * SBMLExtensionRegistry class 331 * 332 * This function is automatically invoked when creatingthe following global 333 * object in SpatialExtension.cpp 334 * 335 * static SBMLExtensionRegister<SpatialExtension> spatialExtensionRegistry; 336 */ 337 static void init(); 338 339 /** @endcond */ 340 341 342 }; 343 344 /** 345 * 346 * Required typedef definitions 347 * 348 * SpatialPkgNamespace is derived from SBMLNamespaces class and used when 349 * creating an object of SBase derived classes defined in the spatial package 350 * 351 * SBMLExtensionNamespaces<SpatialExtension> must be instantiated in 352 * SpatialExtension.cpp for DLL 353 * 354 */ 355 typedef SBMLExtensionNamespaces<SpatialExtension> SpatialPkgNamespaces; 356 357 358 LIBSBML_CPP_NAMESPACE_END 359 360 361 362 363 #endif /* __cplusplus */ 364 365 366 367 368 LIBSBML_CPP_NAMESPACE_BEGIN 369 370 371 /** 372 * @enum SBMLSpatialTypeCode_t 373 * @brief SBMLSpatialTypeCode_t Enumeration of possible types in the libSBML 374 * “spatial” package implementation. 375 * 376 * @copydetails doc_what_are_typecodes 377 * 378 * @copydetails doc_additional_typecode_details 379 */ 380 typedef enum 381 { 382 SBML_SPATIAL_DOMAINTYPE = 300 /*!<DomainType */ 383 , SBML_SPATIAL_DOMAIN = 301 /*!<Domain */ 384 , SBML_SPATIAL_INTERIORPOINT = 302 /*!<InteriorPoint */ 385 , SBML_SPATIAL_BOUNDARY = 303 /*!<Boundary */ 386 , SBML_SPATIAL_ADJACENTDOMAINS = 304 /*!<AdjacentDomains */ 387 , SBML_SPATIAL_GEOMETRYDEFINITION = 305 /*!<GeometryDefinition */ 388 , SBML_SPATIAL_COMPARTMENTMAPPING = 306 /*!<CompartmentMapping */ 389 , SBML_SPATIAL_COORDINATECOMPONENT = 307 /*!<CoordinateComponent */ 390 , SBML_SPATIAL_SAMPLEDFIELDGEOMETRY = 308 /*!<SampledFieldGeometry */ 391 , SBML_SPATIAL_SAMPLEDFIELD = 309 /*!<SampledField */ 392 , SBML_SPATIAL_SAMPLEDVOLUME = 310 /*!<SampledVolume */ 393 , SBML_SPATIAL_ANALYTICGEOMETRY = 311 /*!<AnalyticGeometry */ 394 , SBML_SPATIAL_ANALYTICVOLUME = 312 /*!<AnalyticVolume */ 395 , SBML_SPATIAL_PARAMETRICGEOMETRY = 313 /*!<ParametricGeometry */ 396 , SBML_SPATIAL_PARAMETRICOBJECT = 314 /*!<ParametricObject */ 397 , SBML_SPATIAL_CSGEOMETRY = 315 /*!<CSGeometry */ 398 , SBML_SPATIAL_CSGOBJECT = 316 /*!<CSGObject */ 399 , SBML_SPATIAL_CSGNODE = 317 /*!<CSGNode */ 400 , SBML_SPATIAL_CSGTRANSFORMATION = 318 /*!<CSGTransformation */ 401 , SBML_SPATIAL_CSGTRANSLATION = 319 /*!<CSGTranslation */ 402 , SBML_SPATIAL_CSGROTATION = 320 /*!<CSGRotation */ 403 , SBML_SPATIAL_CSGSCALE = 321 /*!<CSGScale */ 404 , SBML_SPATIAL_CSGHOMOGENEOUSTRANSFORMATION = 322 /*!<CSGHomogeneousTransformation */ 405 , SBML_SPATIAL_TRANSFORMATIONCOMPONENT = 323 /*!<TransformationComponent */ 406 , SBML_SPATIAL_CSGPRIMITIVE = 324 /*!<CSGPrimitive */ 407 , SBML_SPATIAL_CSGSETOPERATOR = 325 /*!<CSGSetOperator */ 408 , SBML_SPATIAL_SPATIALSYMBOLREFERENCE = 326 /*!<SpatialSymbolReference */ 409 , SBML_SPATIAL_DIFFUSIONCOEFFICIENT = 327 /*!<DiffusionCoefficient */ 410 , SBML_SPATIAL_ADVECTIONCOEFFICIENT = 328 /*!<AdvectionCoefficient */ 411 , SBML_SPATIAL_BOUNDARYCONDITION = 329 /*!<BoundaryCondition */ 412 , SBML_SPATIAL_GEOMETRY = 330 /*!<Geometry */ 413 , SBML_SPATIAL_MIXEDGEOMETRY = 331 /*!<MixedGeometry */ 414 , SBML_SPATIAL_ORDINALMAPPING = 332 /*!<OrdinalMapping */ 415 , SBML_SPATIAL_SPATIALPOINTS = 333 /*!<SpatialPoints */ 416 } SBMLSpatialTypeCode_t; 417 418 419 /** 420 * @enum BoundaryKind_t 421 * @brief Enumeration of values permitted as the value of the "boundarykind" 422 * attribute on Spatial objects. 423 * 424 * @if conly 425 * @see Spatial_getBoundarykind() 426 * @see Spatial_setBoundarykind() 427 * @elseif java 428 * @see Spatial::getBoundarykind() 429 * @see Spatial::setBoundarykind(long) 430 * @else 431 * @see Spatial::getBoundarykind() 432 * @see Spatial::setBoundarykind() 433 * @endif 434 */ 435 typedef enum 436 { 437 SPATIAL_BOUNDARYKIND_ROBIN_VALUE_COEFFICIENT /*!< The spatial boundarykind is @c "Robin_valueCoefficient". */ 438 , SPATIAL_BOUNDARYKIND_ROBIN_INWARD_NORMAL_GRADIENT_COEFFICIENT /*!< The spatial boundarykind is @c "Robin_inwardNormalGradientCoefficient". */ 439 , SPATIAL_BOUNDARYKIND_ROBIN_SUM /*!< The spatial boundarykind is @c "Robin_sum". */ 440 , SPATIAL_BOUNDARYKIND_NEUMANN /*!< The spatial boundarykind is @c "Neumann". */ 441 , SPATIAL_BOUNDARYKIND_DIRICHLET /*!< The spatial boundarykind is @c "Dirichlet". */ 442 , SPATIAL_BOUNDARYKIND_INVALID /*!< Invalid BoundaryKind value. */ 443 } BoundaryKind_t; 444 445 446 /** 447 * Returns the string version of the provided #BoundaryKind_t enumeration. 448 * 449 * @param bk the #BoundaryKind_t enumeration value to convert. 450 * 451 * @return A string corresponding to the given type: 452 * "Robin_valueCoefficient", 453 * "Robin_inwardNormalGradientCoefficient", 454 * "Robin_sum", 455 * "Neumann", 456 * "Dirichlet", 457 * or @c NULL if the value is @sbmlconstant{SPATIAL_BOUNDARYKIND_INVALID, 458 * BoundaryKind_t} or another invalid enumeration value. 459 * 460 * @copydetails doc_returned_unowned_char 461 * 462 * @if conly 463 * @memberof Spatial_t 464 * @endif 465 */ 466 LIBSBML_EXTERN 467 const char* 468 BoundaryKind_toString(BoundaryKind_t bk); 469 470 471 /** 472 */ 473 LIBSBML_EXTERN 474 BoundaryKind_t 475 BoundaryKind_parse(const char* code); 476 477 /** 478 * Returns the #BoundaryKind_t enumeration corresponding to the given string or 479 * @sbmlconstant{SPATIAL_BOUNDARYKIND_INVALID, BoundaryKind_t} if there is no 480 * such match. 481 * 482 * @param code the string to convert to a #BoundaryKind_t. 483 * 484 * @return the corresponding #BoundaryKind_t or 485 * @sbmlconstant{SPATIAL_BOUNDARYKIND_INVALID, BoundaryKind_t} if no match is 486 * found. 487 * 488 * @note The matching is case-sensitive: "Robin_valueCoefficient" will return 489 * @sbmlconstant{SPATIAL_BOUNDARYKIND_ROBIN_VALUE_COEFFICIENT, BoundaryKind_t}, 490 * but "Robin_valueCoefficient" will return 491 * @sbmlconstant{SPATIAL_BOUNDARYKIND_INVALID, BoundaryKind_t}. 492 * 493 * @if conly 494 * @memberof Spatial_t 495 * @endif 496 */ 497 LIBSBML_EXTERN 498 BoundaryKind_t 499 BoundaryKind_fromString(const char* code); 500 501 502 /** 503 * Predicate returning @c 1 (true) or @c 0 (false) depending on whether the 504 * given #BoundaryKind_t is valid. 505 * 506 * @param bk the #BoundaryKind_t enumeration to query. 507 * 508 * @return @c 1 (true) if the #BoundaryKind_t is 509 * @sbmlconstant{SPATIAL_BOUNDARYKIND_ROBIN_VALUE_COEFFICIENT, BoundaryKind_t}, 510 * @sbmlconstant{SPATIAL_BOUNDARYKIND_ROBIN_INWARD_NORMAL_GRADIENT_COEFFICIENT, 511 * BoundaryKind_t}, 512 * @sbmlconstant{SPATIAL_BOUNDARYKIND_ROBIN_SUM, BoundaryKind_t}, 513 * @sbmlconstant{SPATIAL_BOUNDARYKIND_NEUMANN, BoundaryKind_t}, or 514 * @sbmlconstant{SPATIAL_BOUNDARYKIND_DIRICHLET, BoundaryKind_t}; 515 * @c 0 (false) otherwise (including 516 * @sbmlconstant{SPATIAL_BOUNDARYKIND_INVALID, BoundaryKind_t}). 517 * 518 * @if conly 519 * @memberof Spatial_t 520 * @endif 521 */ 522 LIBSBML_EXTERN 523 int 524 BoundaryKind_isValid(BoundaryKind_t bk); 525 526 527 /** 528 * Predicate returning @c 1 (true) or @c 0 (false) depending on whether the 529 * given string is a valid #BoundaryKind_t. 530 * 531 * @param code the string to query. 532 * 533 * @return @c 1 (true) if the string is 534 * "Robin_valueCoefficient", 535 * "Robin_inwardNormalGradientCoefficient", 536 * "Robin_sum", 537 * "Neumann", 538 * "Dirichlet", or 539 * "invalid BoundaryKind value"; 540 * @c 0 (false) otherwise. 541 * 542 * @note The matching is case-sensitive: "Robin_valueCoefficient" will return 543 * @c 1 (true), but "Robin_valueCoefficient" will return @c 0 (false). 544 * 545 * @if conly 546 * @memberof Spatial_t 547 * @endif 548 */ 549 LIBSBML_EXTERN 550 int 551 BoundaryKind_isValidString(const char* code); 552 553 554 /** 555 * @enum CoordinateKind_t 556 * @brief Enumeration of values permitted as the value of the "coordinatekind" 557 * attribute on Spatial objects. 558 * 559 * @if conly 560 * @see Spatial_getCoordinatekind() 561 * @see Spatial_setCoordinatekind() 562 * @elseif java 563 * @see Spatial::getCoordinatekind() 564 * @see Spatial::setCoordinatekind(long) 565 * @else 566 * @see Spatial::getCoordinatekind() 567 * @see Spatial::setCoordinatekind() 568 * @endif 569 */ 570 typedef enum 571 { 572 SPATIAL_COORDINATEKIND_CARTESIAN_X /*!< The spatial coordinatekind is @c "cartesianX". */ 573 , SPATIAL_COORDINATEKIND_CARTESIAN_Y /*!< The spatial coordinatekind is @c "cartesianY". */ 574 , SPATIAL_COORDINATEKIND_CARTESIAN_Z /*!< The spatial coordinatekind is @c "cartesianZ". */ 575 , SPATIAL_COORDINATEKIND_INVALID /*!< Invalid CoordinateKind value. */ 576 } CoordinateKind_t; 577 578 579 /** 580 * Returns the string version of the provided #CoordinateKind_t enumeration. 581 * 582 * @param ck the #CoordinateKind_t enumeration value to convert. 583 * 584 * @return A string corresponding to the given type: 585 * "cartesianX", 586 * "cartesianY", 587 * "cartesianZ", 588 * "invalid CoordinateKind value", 589 * or @c NULL if the value is @sbmlconstant{SPATIAL_COORDINATEKIND_INVALID, 590 * CoordinateKind_t} or another invalid enumeration value. 591 * 592 * @copydetails doc_returned_unowned_char 593 * 594 * @if conly 595 * @memberof Spatial_t 596 * @endif 597 */ 598 LIBSBML_EXTERN 599 const char* 600 CoordinateKind_toString(CoordinateKind_t ck); 601 602 603 /** 604 */ 605 LIBSBML_EXTERN 606 CoordinateKind_t 607 CoordinateKind_parse(const char* code); 608 609 610 /** 611 * Returns the #CoordinateKind_t enumeration corresponding to the given string 612 * or @sbmlconstant{SPATIAL_COORDINATEKIND_INVALID, CoordinateKind_t} if there 613 * is no such match. 614 * 615 * @param code the string to convert to a #CoordinateKind_t. 616 * 617 * @return the corresponding #CoordinateKind_t or 618 * @sbmlconstant{SPATIAL_COORDINATEKIND_INVALID, CoordinateKind_t} if no match 619 * is found. 620 * 621 * @note The matching is case-sensitive: "cartesianX" will return 622 * @sbmlconstant{SPATIAL_COORDINATEKIND_CARTESIAN_X, CoordinateKind_t}, but 623 * "CartesianX" will return @sbmlconstant{SPATIAL_COORDINATEKIND_INVALID, 624 * CoordinateKind_t}. 625 * 626 * @if conly 627 * @memberof Spatial_t 628 * @endif 629 */ 630 LIBSBML_EXTERN 631 CoordinateKind_t 632 CoordinateKind_fromString(const char* code); 633 634 635 /** 636 * Predicate returning @c 1 (true) or @c 0 (false) depending on whether the 637 * given #CoordinateKind_t is valid. 638 * 639 * @param ck the #CoordinateKind_t enumeration to query. 640 * 641 * @return @c 1 (true) if the #CoordinateKind_t is 642 * @sbmlconstant{SPATIAL_COORDINATEKIND_CARTESIAN_X, CoordinateKind_t}, 643 * @sbmlconstant{SPATIAL_COORDINATEKIND_CARTESIAN_Y, CoordinateKind_t}, or 644 * @sbmlconstant{SPATIAL_COORDINATEKIND_CARTESIAN_Z, CoordinateKind_t}; 645 * @c 0 (false) otherwise (including 646 * @sbmlconstant{SPATIAL_COORDINATEKIND_INVALID, CoordinateKind_t}). 647 * 648 * @if conly 649 * @memberof Spatial_t 650 * @endif 651 */ 652 LIBSBML_EXTERN 653 int 654 CoordinateKind_isValid(CoordinateKind_t ck); 655 656 657 /** 658 * Predicate returning @c 1 (true) or @c 0 (false) depending on whether the 659 * given string is a valid #CoordinateKind_t. 660 * 661 * @param code the string to query. 662 * 663 * @return @c 1 (true) if the string is 664 * "cartesianX", 665 * "cartesianY", or 666 * "cartesianZ"; 667 * @c 0 (false) otherwise. 668 * 669 * @note The matching is case-sensitive: "cartesianX" will return @c 1 (true), 670 * but "CartesianX" will return @c 0 (false). 671 * 672 * @if conly 673 * @memberof Spatial_t 674 * @endif 675 */ 676 LIBSBML_EXTERN 677 int 678 CoordinateKind_isValidString(const char* code); 679 680 681 /** 682 * @enum DiffusionKind_t 683 * @brief Enumeration of values permitted as the value of the "diffusionkind" 684 * attribute on Spatial objects. 685 * 686 * @if conly 687 * @see Spatial_getDiffusionkind() 688 * @see Spatial_setDiffusionkind() 689 * @elseif java 690 * @see Spatial::getDiffusionkind() 691 * @see Spatial::setDiffusionkind(long) 692 * @else 693 * @see Spatial::getDiffusionkind() 694 * @see Spatial::setDiffusionkind() 695 * @endif 696 */ 697 typedef enum 698 { 699 SPATIAL_DIFFUSIONKIND_ISOTROPIC /*!< The spatial diffusionkind is @c "isotropic". */ 700 , SPATIAL_DIFFUSIONKIND_ANISOTROPIC /*!< The spatial diffusionkind is @c "anisotropic". */ 701 , SPATIAL_DIFFUSIONKIND_TENSOR /*!< The spatial diffusionkind is @c "tensor". */ 702 , SPATIAL_DIFFUSIONKIND_INVALID /*!< Invalid DiffusionKind value. */ 703 } DiffusionKind_t; 704 705 706 /** 707 * Returns the string version of the provided #DiffusionKind_t enumeration. 708 * 709 * @param dk the #DiffusionKind_t enumeration value to convert. 710 * 711 * @return A string corresponding to the given type: 712 * "isotropic", 713 * "anisotropic", 714 * "tensor", 715 * or @c NULL if the value is @sbmlconstant{SPATIAL_DIFFUSIONKIND_INVALID, 716 * DiffusionKind_t} or another invalid enumeration value. 717 * 718 * @copydetails doc_returned_unowned_char 719 * 720 * @if conly 721 * @memberof Spatial_t 722 * @endif 723 */ 724 LIBSBML_EXTERN 725 const char* 726 DiffusionKind_toString(DiffusionKind_t dk); 727 728 729 /** 730 */ 731 LIBSBML_EXTERN 732 DiffusionKind_t 733 DiffusionKind_parse(const char* code); 734 735 /** 736 * Returns the #DiffusionKind_t enumeration corresponding to the given string 737 * or @sbmlconstant{SPATIAL_DIFFUSIONKIND_INVALID, DiffusionKind_t} if there is 738 * no such match. 739 * 740 * @param code the string to convert to a #DiffusionKind_t. 741 * 742 * @return the corresponding #DiffusionKind_t or 743 * @sbmlconstant{SPATIAL_DIFFUSIONKIND_INVALID, DiffusionKind_t} if no match is 744 * found. 745 * 746 * @note The matching is case-sensitive: "isotropic" will return 747 * @sbmlconstant{SPATIAL_DIFFUSIONKIND_ISOTROPIC, DiffusionKind_t}, but 748 * "Isotropic" will return @sbmlconstant{SPATIAL_DIFFUSIONKIND_INVALID, 749 * DiffusionKind_t}. 750 * 751 * @if conly 752 * @memberof Spatial_t 753 * @endif 754 */ 755 LIBSBML_EXTERN 756 DiffusionKind_t 757 DiffusionKind_fromString(const char* code); 758 759 760 /** 761 * Predicate returning @c 1 (true) or @c 0 (false) depending on whether the 762 * given #DiffusionKind_t is valid. 763 * 764 * @param dk the #DiffusionKind_t enumeration to query. 765 * 766 * @return @c 1 (true) if the #DiffusionKind_t is 767 * @sbmlconstant{SPATIAL_DIFFUSIONKIND_ISOTROPIC, DiffusionKind_t}, 768 * @sbmlconstant{SPATIAL_DIFFUSIONKIND_ANISOTROPIC, DiffusionKind_t}, or 769 * @sbmlconstant{SPATIAL_DIFFUSIONKIND_TENSOR, DiffusionKind_t}; 770 * @c 0 (false) otherwise (including 771 * @sbmlconstant{SPATIAL_DIFFUSIONKIND_INVALID, DiffusionKind_t}). 772 * 773 * @if conly 774 * @memberof Spatial_t 775 * @endif 776 */ 777 LIBSBML_EXTERN 778 int 779 DiffusionKind_isValid(DiffusionKind_t dk); 780 781 782 /** 783 * Predicate returning @c 1 (true) or @c 0 (false) depending on whether the 784 * given string is a valid #DiffusionKind_t. 785 * 786 * @param code the string to query. 787 * 788 * @return @c 1 (true) if the string is 789 * "isotropic", 790 * "anisotropic", or 791 * "tensor"; 792 * @c 0 (false) otherwise. 793 * 794 * @note The matching is case-sensitive: "isotropic" will return @c 1 (true), 795 * but "Isotropic" will return @c 0 (false). 796 * 797 * @if conly 798 * @memberof Spatial_t 799 * @endif 800 */ 801 LIBSBML_EXTERN 802 int 803 DiffusionKind_isValidString(const char* code); 804 805 806 /** 807 * @enum FunctionKind_t 808 * @brief Enumeration of values permitted as the value of the "functionkind" 809 * attribute on Spatial objects. 810 * 811 * @if conly 812 * @see Spatial_getFunctionkind() 813 * @see Spatial_setFunctionkind() 814 * @elseif java 815 * @see Spatial::getFunctionkind() 816 * @see Spatial::setFunctionkind(long) 817 * @else 818 * @see Spatial::getFunctionkind() 819 * @see Spatial::setFunctionkind() 820 * @endif 821 */ 822 typedef enum 823 { 824 SPATIAL_FUNCTIONKIND_LAYERED /*!< The spatial functionkind is @c "layered". */ 825 , SPATIAL_FUNCTIONKIND_INVALID /*!< Invalid FunctionKind value. */ 826 } FunctionKind_t; 827 828 829 /** 830 * Returns the string version of the provided #FunctionKind_t enumeration. 831 * 832 * @param fk the #FunctionKind_t enumeration value to convert. 833 * 834 * @return A string corresponding to the given type: 835 * "layered", 836 * or @c NULL if the value is @sbmlconstant{SPATIAL_FUNCTIONKIND_INVALID, 837 * FunctionKind_t} or another invalid enumeration value. 838 * 839 * @copydetails doc_returned_unowned_char 840 * 841 * @if conly 842 * @memberof Spatial_t 843 * @endif 844 */ 845 LIBSBML_EXTERN 846 const char* 847 FunctionKind_toString(FunctionKind_t fk); 848 849 850 /** 851 * Returns the #FunctionKind_t enumeration corresponding to the given string or 852 * @sbmlconstant{SPATIAL_FUNCTIONKIND_INVALID, FunctionKind_t} if there is no 853 * such match. 854 * 855 * @param code the string to convert to a #FunctionKind_t. 856 * 857 * @return the corresponding #FunctionKind_t or 858 * @sbmlconstant{SPATIAL_FUNCTIONKIND_INVALID, FunctionKind_t} if no match is 859 * found. 860 * 861 * @note The matching is case-sensitive: "layered" will return 862 * @sbmlconstant{SPATIAL_FUNCTIONKIND_LAYERED, FunctionKind_t}, but "Layered" 863 * will return @sbmlconstant{SPATIAL_FUNCTIONKIND_INVALID, FunctionKind_t}. 864 * 865 * @if conly 866 * @memberof Spatial_t 867 * @endif 868 */ 869 LIBSBML_EXTERN 870 FunctionKind_t 871 FunctionKind_fromString(const char* code); 872 873 874 LIBSBML_EXTERN 875 FunctionKind_t 876 FunctionKind_parse(const char* code); 877 878 /** 879 * Predicate returning @c 1 (true) or @c 0 (false) depending on whether the 880 * given #FunctionKind_t is valid. 881 * 882 * @param fk the #FunctionKind_t enumeration to query. 883 * 884 * @return @c 1 (true) if the #FunctionKind_t is 885 * @sbmlconstant{SPATIAL_FUNCTIONKIND_LAYERED, FunctionKind_t}; 886 * @c 0 (false) otherwise (including 887 * @sbmlconstant{SPATIAL_FUNCTIONKIND_INVALID, FunctionKind_t}). 888 * 889 * @if conly 890 * @memberof Spatial_t 891 * @endif 892 */ 893 LIBSBML_EXTERN 894 int 895 FunctionKind_isValid(FunctionKind_t fk); 896 897 898 /** 899 * Predicate returning @c 1 (true) or @c 0 (false) depending on whether the 900 * given string is a valid #FunctionKind_t. 901 * 902 * @param code the string to query. 903 * 904 * @return @c 1 (true) if the string is 905 * "layered"; 906 * @c 0 (false) otherwise. 907 * 908 * @note The matching is case-sensitive: "layered" will return @c 1 (true), but 909 * "Layered" will return @c 0 (false). 910 * 911 * @if conly 912 * @memberof Spatial_t 913 * @endif 914 */ 915 LIBSBML_EXTERN 916 int 917 FunctionKind_isValidString(const char* code); 918 919 920 /** 921 * @enum GeometryKind_t 922 * @brief Enumeration of values permitted as the value of the "geometrykind" 923 * attribute on Spatial objects. 924 * 925 * @if conly 926 * @see Spatial_getGeometrykind() 927 * @see Spatial_setGeometrykind() 928 * @elseif java 929 * @see Spatial::getGeometrykind() 930 * @see Spatial::setGeometrykind(long) 931 * @else 932 * @see Spatial::getGeometrykind() 933 * @see Spatial::setGeometrykind() 934 * @endif 935 */ 936 typedef enum 937 { 938 SPATIAL_GEOMETRYKIND_CARTESIAN /*!< The spatial geometrykind is @c "cartesian". */ 939 , SPATIAL_GEOMETRYKIND_INVALID /*!< Invalid GeometryKind value. */ 940 } GeometryKind_t; 941 942 943 /** 944 * Returns the string version of the provided #GeometryKind_t enumeration. 945 * 946 * @param gk the #GeometryKind_t enumeration value to convert. 947 * 948 * @return A string corresponding to the given type: 949 * "cartesian", 950 * or @c NULL if the value is @sbmlconstant{SPATIAL_GEOMETRYKIND_INVALID, 951 * GeometryKind_t} or another invalid enumeration value. 952 * 953 * @copydetails doc_returned_unowned_char 954 * 955 * @if conly 956 * @memberof Spatial_t 957 * @endif 958 */ 959 LIBSBML_EXTERN 960 const char* 961 GeometryKind_toString(GeometryKind_t gk); 962 963 964 /** 965 */ 966 LIBSBML_EXTERN 967 GeometryKind_t 968 GeometryKind_parse(const char* code); 969 970 971 /** 972 * Returns the #GeometryKind_t enumeration corresponding to the given string or 973 * @sbmlconstant{SPATIAL_GEOMETRYKIND_INVALID, GeometryKind_t} if there is no 974 * such match. 975 * 976 * @param code the string to convert to a #GeometryKind_t. 977 * 978 * @return the corresponding #GeometryKind_t or 979 * @sbmlconstant{SPATIAL_GEOMETRYKIND_INVALID, GeometryKind_t} if no match is 980 * found. 981 * 982 * @note The matching is case-sensitive: "cartesian" will return 983 * @sbmlconstant{SPATIAL_GEOMETRYKIND_CARTESIAN, GeometryKind_t}, but 984 * "Cartesian" will return @sbmlconstant{SPATIAL_GEOMETRYKIND_INVALID, 985 * GeometryKind_t}. 986 * 987 * @if conly 988 * @memberof Spatial_t 989 * @endif 990 */ 991 LIBSBML_EXTERN 992 GeometryKind_t 993 GeometryKind_fromString(const char* code); 994 995 996 /** 997 * Predicate returning @c 1 (true) or @c 0 (false) depending on whether the 998 * given #GeometryKind_t is valid. 999 * 1000 * @param gk the #GeometryKind_t enumeration to query. 1001 * 1002 * @return @c 1 (true) if the #GeometryKind_t is 1003 * @sbmlconstant{SPATIAL_GEOMETRYKIND_CARTESIAN, GeometryKind_t}; 1004 * @c 0 (false) otherwise (including 1005 * @sbmlconstant{SPATIAL_GEOMETRYKIND_INVALID, GeometryKind_t}). 1006 * 1007 * @if conly 1008 * @memberof Spatial_t 1009 * @endif 1010 */ 1011 LIBSBML_EXTERN 1012 int 1013 GeometryKind_isValid(GeometryKind_t gk); 1014 1015 1016 /** 1017 * Predicate returning @c 1 (true) or @c 0 (false) depending on whether the 1018 * given string is a valid #GeometryKind_t. 1019 * 1020 * @param code the string to query. 1021 * 1022 * @return @c 1 (true) if the string is 1023 * "cartesian"; 1024 * @c 0 (false) otherwise. 1025 * 1026 * @note The matching is case-sensitive: "cartesian" will return @c 1 (true), 1027 * but "Cartesian" will return @c 0 (false). 1028 * 1029 * @if conly 1030 * @memberof Spatial_t 1031 * @endif 1032 */ 1033 LIBSBML_EXTERN 1034 int 1035 GeometryKind_isValidString(const char* code); 1036 1037 1038 /** 1039 * @enum SetOperation_t 1040 * @brief Enumeration of values permitted as the value of the "setoperation" 1041 * attribute on Spatial objects. 1042 * 1043 * @if conly 1044 * @see Spatial_getSetoperation() 1045 * @see Spatial_setSetoperation() 1046 * @elseif java 1047 * @see Spatial::getSetoperation() 1048 * @see Spatial::setSetoperation(long) 1049 * @else 1050 * @see Spatial::getSetoperation() 1051 * @see Spatial::setSetoperation() 1052 * @endif 1053 */ 1054 typedef enum 1055 { 1056 SPATIAL_SETOPERATION_UNION /*!< The spatial setoperation is @c "union". */ 1057 , SPATIAL_SETOPERATION_INTERSECTION /*!< The spatial setoperation is @c "intersection". */ 1058 , SPATIAL_SETOPERATION_DIFFERENCE /*!< The spatial setoperation is @c "difference". */ 1059 , SPATIAL_SETOPERATION_INVALID /*!< Invalid SetOperation value. */ 1060 } SetOperation_t; 1061 1062 1063 /** 1064 * Returns the string version of the provided #SetOperation_t enumeration. 1065 * 1066 * @param so the #SetOperation_t enumeration value to convert. 1067 * 1068 * @return A string corresponding to the given type: 1069 * "union", 1070 * "intersection", 1071 * "difference", 1072 * or @c NULL if the value is @sbmlconstant{SPATIAL_SETOPERATION_INVALID, 1073 * SetOperation_t} or another invalid enumeration value. 1074 * 1075 * @copydetails doc_returned_unowned_char 1076 * 1077 * @if conly 1078 * @memberof Spatial_t 1079 * @endif 1080 */ 1081 LIBSBML_EXTERN 1082 const char* 1083 SetOperation_toString(SetOperation_t so); 1084 1085 1086 /** 1087 * Returns the #SetOperation_t enumeration corresponding to the given string or 1088 * @sbmlconstant{SPATIAL_SETOPERATION_INVALID, SetOperation_t} if there is no 1089 * such match. 1090 * 1091 * @param code the string to convert to a #SetOperation_t. 1092 * 1093 * @return the corresponding #SetOperation_t or 1094 * @sbmlconstant{SPATIAL_SETOPERATION_INVALID, SetOperation_t} if no match is 1095 * found. 1096 * 1097 * @note The matching is case-sensitive: "union" will return 1098 * @sbmlconstant{SPATIAL_SETOPERATION_UNION, SetOperation_t}, but "Union" will 1099 * return @sbmlconstant{SPATIAL_SETOPERATION_INVALID, SetOperation_t}. 1100 * 1101 * @if conly 1102 * @memberof Spatial_t 1103 * @endif 1104 */ 1105 LIBSBML_EXTERN 1106 SetOperation_t 1107 SetOperation_fromString(const char* code); 1108 1109 1110 LIBSBML_EXTERN 1111 SetOperation_t 1112 SetOperation_parse(const char* code); 1113 1114 1115 /** 1116 * Predicate returning @c 1 (true) or @c 0 (false) depending on whether the 1117 * given #SetOperation_t is valid. 1118 * 1119 * @param so the #SetOperation_t enumeration to query. 1120 * 1121 * @return @c 1 (true) if the #SetOperation_t is 1122 * @sbmlconstant{SPATIAL_SETOPERATION_UNION, SetOperation_t}, 1123 * @sbmlconstant{SPATIAL_SETOPERATION_INTERSECTION, SetOperation_t}, or 1124 * @sbmlconstant{SPATIAL_SETOPERATION_DIFFERENCE, SetOperation_t}; 1125 * @c 0 (false) otherwise (including 1126 * @sbmlconstant{SPATIAL_SETOPERATION_INVALID, SetOperation_t}). 1127 * 1128 * @if conly 1129 * @memberof Spatial_t 1130 * @endif 1131 */ 1132 LIBSBML_EXTERN 1133 int 1134 SetOperation_isValid(SetOperation_t so); 1135 1136 1137 /** 1138 * Predicate returning @c 1 (true) or @c 0 (false) depending on whether the 1139 * given string is a valid #SetOperation_t. 1140 * 1141 * @param code the string to query. 1142 * 1143 * @return @c 1 (true) if the string is 1144 * "union", 1145 * "intersection", 1146 * "difference", or 1147 * "invalid SetOperation value"; 1148 * @c 0 (false) otherwise. 1149 * 1150 * @note The matching is case-sensitive: "union" will return @c 1 (true), but 1151 * "Union" will return @c 0 (false). 1152 * 1153 * @if conly 1154 * @memberof Spatial_t 1155 * @endif 1156 */ 1157 LIBSBML_EXTERN 1158 int 1159 SetOperation_isValidString(const char* code); 1160 1161 1162 /** 1163 * @enum InterpolationKind_t 1164 * @brief Enumeration of values permitted as the value of the 1165 * "interpolationkind" attribute on Spatial objects. 1166 * 1167 * @if conly 1168 * @see Spatial_getInterpolationkind() 1169 * @see Spatial_setInterpolationkind() 1170 * @elseif java 1171 * @see Spatial::getInterpolationkind() 1172 * @see Spatial::setInterpolationkind(long) 1173 * @else 1174 * @see Spatial::getInterpolationkind() 1175 * @see Spatial::setInterpolationkind() 1176 * @endif 1177 */ 1178 typedef enum 1179 { 1180 SPATIAL_INTERPOLATIONKIND_NEARESTNEIGHBOR /*!< The spatial interpolationkind is @c "nearestNeighbor". */ 1181 , SPATIAL_INTERPOLATIONKIND_LINEAR /*!< The spatial interpolationkind is @c "linear". */ 1182 , SPATIAL_INTERPOLATIONKIND_INVALID /*!< Invalid InterpolationKind value. */ 1183 } InterpolationKind_t; 1184 1185 1186 /** 1187 * Returns the string version of the provided #InterpolationKind_t enumeration. 1188 * 1189 * @param ik the #InterpolationKind_t enumeration value to convert. 1190 * 1191 * @return A string corresponding to the given type: 1192 * "nearestNeighbor", 1193 * "linear", 1194 * or @c NULL if the value is @sbmlconstant{SPATIAL_INTERPOLATIONKIND_INVALID, 1195 * InterpolationKind_t} or another invalid enumeration value. 1196 * 1197 * @copydetails doc_returned_unowned_char 1198 * 1199 * @if conly 1200 * @memberof Spatial_t 1201 * @endif 1202 */ 1203 LIBSBML_EXTERN 1204 const char* 1205 InterpolationKind_toString(InterpolationKind_t ik); 1206 1207 1208 /** 1209 * Returns the #InterpolationKind_t enumeration corresponding to the given 1210 * string or @sbmlconstant{SPATIAL_INTERPOLATIONKIND_INVALID, 1211 * InterpolationKind_t} if there is no such match. 1212 * 1213 * @param code the string to convert to a #InterpolationKind_t. 1214 * 1215 * @return the corresponding #InterpolationKind_t or 1216 * @sbmlconstant{SPATIAL_INTERPOLATIONKIND_INVALID, InterpolationKind_t} if no 1217 * match is found. 1218 * 1219 * @note The matching is case-sensitive: "nearestNeighbor" will return 1220 * @sbmlconstant{SPATIAL_INTERPOLATIONKIND_NEARESTNEIGHBOR, 1221 * InterpolationKind_t}, but "NearestNeighbor" will return 1222 * @sbmlconstant{SPATIAL_INTERPOLATIONKIND_INVALID, InterpolationKind_t}. 1223 * 1224 * @if conly 1225 * @memberof Spatial_t 1226 * @endif 1227 */ 1228 LIBSBML_EXTERN 1229 InterpolationKind_t 1230 InterpolationKind_fromString(const char* code); 1231 1232 1233 LIBSBML_EXTERN 1234 InterpolationKind_t 1235 InterpolationKind_parse(const char* code); 1236 1237 1238 /** 1239 * Predicate returning @c 1 (true) or @c 0 (false) depending on whether the 1240 * given #InterpolationKind_t is valid. 1241 * 1242 * @param ik the #InterpolationKind_t enumeration to query. 1243 * 1244 * @return @c 1 (true) if the #InterpolationKind_t is 1245 * @sbmlconstant{SPATIAL_INTERPOLATIONKIND_NEARESTNEIGHBOR, 1246 * InterpolationKind_t}, or 1247 * @sbmlconstant{SPATIAL_INTERPOLATIONKIND_LINEAR, InterpolationKind_t}; 1248 * @c 0 (false) otherwise (including 1249 * @sbmlconstant{SPATIAL_INTERPOLATIONKIND_INVALID, InterpolationKind_t}). 1250 * 1251 * @if conly 1252 * @memberof Spatial_t 1253 * @endif 1254 */ 1255 LIBSBML_EXTERN 1256 int 1257 InterpolationKind_isValid(InterpolationKind_t ik); 1258 1259 1260 /** 1261 * Predicate returning @c 1 (true) or @c 0 (false) depending on whether the 1262 * given string is a valid #InterpolationKind_t. 1263 * 1264 * @param code the string to query. 1265 * 1266 * @return @c 1 (true) if the string is 1267 * "nearestNeighbor", or 1268 * "linear"; 1269 * @c 0 (false) otherwise. 1270 * 1271 * @note The matching is case-sensitive: "nearestNeighbor" will return @c 1 1272 * (true), but "NearestNeighbor" will return @c 0 (false). 1273 * 1274 * @if conly 1275 * @memberof Spatial_t 1276 * @endif 1277 */ 1278 LIBSBML_EXTERN 1279 int 1280 InterpolationKind_isValidString(const char* code); 1281 1282 1283 /** 1284 * @enum PolygonKind_t 1285 * @brief Enumeration of values permitted as the value of the "polygonkind" 1286 * attribute on Spatial objects. 1287 * 1288 * @if conly 1289 * @see Spatial_getPolygonkind() 1290 * @see Spatial_setPolygonkind() 1291 * @elseif java 1292 * @see Spatial::getPolygonkind() 1293 * @see Spatial::setPolygonkind(long) 1294 * @else 1295 * @see Spatial::getPolygonkind() 1296 * @see Spatial::setPolygonkind() 1297 * @endif 1298 */ 1299 typedef enum 1300 { 1301 SPATIAL_POLYGONKIND_TRIANGLE /*!< The spatial polygonkind is @c "triangle". */ 1302 , SPATIAL_POLYGONKIND_QUADRILATERAL /*!< The spatial polygonkind is @c "quadrilateral". */ 1303 , SPATIAL_POLYGONKIND_INVALID /*!< Invalid PolygonKind value. */ 1304 } PolygonKind_t; 1305 1306 1307 /** 1308 * Returns the string version of the provided #PolygonKind_t enumeration. 1309 * 1310 * @param pk the #PolygonKind_t enumeration value to convert. 1311 * 1312 * @return A string corresponding to the given type: 1313 * "triangle", 1314 * "quadrilateral", 1315 * or @c NULL if the value is @sbmlconstant{SPATIAL_POLYGONKIND_INVALID, 1316 * PolygonKind_t} or another invalid enumeration value. 1317 * 1318 * @copydetails doc_returned_unowned_char 1319 * 1320 * @if conly 1321 * @memberof Spatial_t 1322 * @endif 1323 */ 1324 LIBSBML_EXTERN 1325 const char* 1326 PolygonKind_toString(PolygonKind_t pk); 1327 1328 1329 /** 1330 */ 1331 LIBSBML_EXTERN 1332 PolygonKind_t 1333 PolygonKind_parse(const char* code); 1334 1335 1336 /** 1337 * Returns the #PolygonKind_t enumeration corresponding to the given string or 1338 * @sbmlconstant{SPATIAL_POLYGONKIND_INVALID, PolygonKind_t} if there is no 1339 * such match. 1340 * 1341 * @param code the string to convert to a #PolygonKind_t. 1342 * 1343 * @return the corresponding #PolygonKind_t or 1344 * @sbmlconstant{SPATIAL_POLYGONKIND_INVALID, PolygonKind_t} if no match is 1345 * found. 1346 * 1347 * @note The matching is case-sensitive: "triangle" will return 1348 * @sbmlconstant{SPATIAL_POLYGONKIND_TRIANGLE, PolygonKind_t}, but "Triangle" 1349 * will return @sbmlconstant{SPATIAL_POLYGONKIND_INVALID, PolygonKind_t}. 1350 * 1351 * @if conly 1352 * @memberof Spatial_t 1353 * @endif 1354 */ 1355 LIBSBML_EXTERN 1356 PolygonKind_t 1357 PolygonKind_fromString(const char* code); 1358 1359 1360 /** 1361 * Predicate returning @c 1 (true) or @c 0 (false) depending on whether the 1362 * given #PolygonKind_t is valid. 1363 * 1364 * @param pk the #PolygonKind_t enumeration to query. 1365 * 1366 * @return @c 1 (true) if the #PolygonKind_t is 1367 * @sbmlconstant{SPATIAL_POLYGONKIND_TRIANGLE, PolygonKind_t}, or 1368 * @sbmlconstant{SPATIAL_POLYGONKIND_QUADRILATERAL, PolygonKind_t}; 1369 * @c 0 (false) otherwise (including @sbmlconstant{SPATIAL_POLYGONKIND_INVALID, 1370 * PolygonKind_t}). 1371 * 1372 * @if conly 1373 * @memberof Spatial_t 1374 * @endif 1375 */ 1376 LIBSBML_EXTERN 1377 int 1378 PolygonKind_isValid(PolygonKind_t pk); 1379 1380 1381 /** 1382 * Predicate returning @c 1 (true) or @c 0 (false) depending on whether the 1383 * given string is a valid #PolygonKind_t. 1384 * 1385 * @param code the string to query. 1386 * 1387 * @return @c 1 (true) if the string is 1388 * "triangle", or 1389 * "quadrilateral"; 1390 * @c 0 (false) otherwise. 1391 * 1392 * @note The matching is case-sensitive: "triangle" will return @c 1 (true), 1393 * but "Triangle" will return @c 0 (false). 1394 * 1395 * @if conly 1396 * @memberof Spatial_t 1397 * @endif 1398 */ 1399 LIBSBML_EXTERN 1400 int 1401 PolygonKind_isValidString(const char* code); 1402 1403 1404 /** 1405 * @enum PrimitiveKind_t 1406 * @brief Enumeration of values permitted as the value of the "primitivekind" 1407 * attribute on Spatial objects. 1408 * 1409 * @if conly 1410 * @see Spatial_getPrimitivekind() 1411 * @see Spatial_setPrimitivekind() 1412 * @elseif java 1413 * @see Spatial::getPrimitivekind() 1414 * @see Spatial::setPrimitivekind(long) 1415 * @else 1416 * @see Spatial::getPrimitivekind() 1417 * @see Spatial::setPrimitivekind() 1418 * @endif 1419 */ 1420 typedef enum 1421 { 1422 SPATIAL_PRIMITIVEKIND_SPHERE /*!< The spatial primitivekind is @c "sphere". */ 1423 , SPATIAL_PRIMITIVEKIND_CUBE /*!< The spatial primitivekind is @c "cube". */ 1424 , SPATIAL_PRIMITIVEKIND_CYLINDER /*!< The spatial primitivekind is @c "cylinder". */ 1425 , SPATIAL_PRIMITIVEKIND_CONE /*!< The spatial primitivekind is @c "cone". */ 1426 , SPATIAL_PRIMITIVEKIND_CIRCLE /*!< The spatial primitivekind is @c "circle". */ 1427 , SPATIAL_PRIMITIVEKIND_SQUARE /*!< The spatial primitivekind is @c "square". */ 1428 , SPATIAL_PRIMITIVEKIND_INVALID /*!< Invalid PrimitiveKind value. */ 1429 } PrimitiveKind_t; 1430 1431 1432 /** 1433 * Returns the string version of the provided #PrimitiveKind_t enumeration. 1434 * 1435 * @param pk the #PrimitiveKind_t enumeration value to convert. 1436 * 1437 * @return A string corresponding to the given type: 1438 * "sphere", 1439 * "cube", 1440 * "cylinder", 1441 * "cone", 1442 * "circle", 1443 * "square", 1444 * or @c NULL if the value is @sbmlconstant{SPATIAL_PRIMITIVEKIND_INVALID, 1445 * PrimitiveKind_t} or another invalid enumeration value. 1446 * 1447 * @copydetails doc_returned_unowned_char 1448 * 1449 * @if conly 1450 * @memberof Spatial_t 1451 * @endif 1452 */ 1453 LIBSBML_EXTERN 1454 const char* 1455 PrimitiveKind_toString(PrimitiveKind_t pk); 1456 1457 1458 /** 1459 */ 1460 LIBSBML_EXTERN 1461 PrimitiveKind_t 1462 PrimitiveKind_parse(const char* code); 1463 1464 1465 /** 1466 * Returns the #PrimitiveKind_t enumeration corresponding to the given string 1467 * or @sbmlconstant{SPATIAL_PRIMITIVEKIND_INVALID, PrimitiveKind_t} if there is 1468 * no such match. 1469 * 1470 * @param code the string to convert to a #PrimitiveKind_t. 1471 * 1472 * @return the corresponding #PrimitiveKind_t or 1473 * @sbmlconstant{SPATIAL_PRIMITIVEKIND_INVALID, PrimitiveKind_t} if no match is 1474 * found. 1475 * 1476 * @note The matching is case-sensitive: "sphere" will return 1477 * @sbmlconstant{SPATIAL_PRIMITIVEKIND_SPHERE, PrimitiveKind_t}, but "Sphere" 1478 * will return @sbmlconstant{SPATIAL_PRIMITIVEKIND_INVALID, PrimitiveKind_t}. 1479 * 1480 * @if conly 1481 * @memberof Spatial_t 1482 * @endif 1483 */ 1484 LIBSBML_EXTERN 1485 PrimitiveKind_t 1486 PrimitiveKind_fromString(const char* code); 1487 1488 1489 /** 1490 * Predicate returning @c 1 (true) or @c 0 (false) depending on whether the 1491 * given #PrimitiveKind_t is valid. 1492 * 1493 * @param pk the #PrimitiveKind_t enumeration to query. 1494 * 1495 * @return @c 1 (true) if the #PrimitiveKind_t is 1496 * @sbmlconstant{SPATIAL_PRIMITIVEKIND_SPHERE, PrimitiveKind_t}, 1497 * @sbmlconstant{SPATIAL_PRIMITIVEKIND_CUBE, PrimitiveKind_t}, 1498 * @sbmlconstant{SPATIAL_PRIMITIVEKIND_CYLINDER, PrimitiveKind_t}, 1499 * @sbmlconstant{SPATIAL_PRIMITIVEKIND_CONE, PrimitiveKind_t}, 1500 * @sbmlconstant{SPATIAL_PRIMITIVEKIND_CIRCLE, PrimitiveKind_t}, 1501 * @sbmlconstant{SPATIAL_PRIMITIVEKIND_SQUARE, PrimitiveKind_t}, or 1502 * @c 0 (false) otherwise (including 1503 * @sbmlconstant{SPATIAL_PRIMITIVEKIND_INVALID, PrimitiveKind_t}). 1504 * 1505 * @if conly 1506 * @memberof Spatial_t 1507 * @endif 1508 */ 1509 LIBSBML_EXTERN 1510 int 1511 PrimitiveKind_isValid(PrimitiveKind_t pk); 1512 1513 1514 /** 1515 * Predicate returning @c 1 (true) or @c 0 (false) depending on whether the 1516 * given string is a valid #PrimitiveKind_t. 1517 * 1518 * @param code the string to query. 1519 * 1520 * @return @c 1 (true) if the string is 1521 * "sphere", 1522 * "cube", 1523 * "cylinder", 1524 * "cone", 1525 * "circle", 1526 * "square", or 1527 * @c 0 (false) otherwise. 1528 * 1529 * @note The matching is case-sensitive: "sphere" will return @c 1 (true), but 1530 * "Sphere" will return @c 0 (false). 1531 * 1532 * @if conly 1533 * @memberof Spatial_t 1534 * @endif 1535 */ 1536 LIBSBML_EXTERN 1537 int 1538 PrimitiveKind_isValidString(const char* code); 1539 1540 1541 /** 1542 * @enum DataKind_t 1543 * @brief Enumeration of values permitted as the value of the "datakind" 1544 * attribute on Spatial objects. 1545 * 1546 * @if conly 1547 * @see Spatial_getDatakind() 1548 * @see Spatial_setDatakind() 1549 * @elseif java 1550 * @see Spatial::getDatakind() 1551 * @see Spatial::setDatakind(long) 1552 * @else 1553 * @see Spatial::getDatakind() 1554 * @see Spatial::setDatakind() 1555 * @endif 1556 */ 1557 typedef enum 1558 { 1559 SPATIAL_DATAKIND_DOUBLE /*!< The spatial datakind is @c "double". */ 1560 , SPATIAL_DATAKIND_FLOAT /*!< The spatial datakind is @c "float". */ 1561 , SPATIAL_DATAKIND_UINT8 /*!< The spatial datakind is @c "uint8". */ 1562 , SPATIAL_DATAKIND_UINT16 /*!< The spatial datakind is @c "uint16". */ 1563 , SPATIAL_DATAKIND_UINT32 /*!< The spatial datakind is @c "uint32". */ 1564 , SPATIAL_DATAKIND_UINT /*!< The spatial datakind is @c "uint". */ 1565 , SPATIAL_DATAKIND_INT /*!< The spatial datakind is @c "int". */ 1566 , SPATIAL_DATAKIND_INVALID /*!< Invalid DataKind value. */ 1567 } DataKind_t; 1568 1569 1570 /** 1571 * Returns the string version of the provided #DataKind_t enumeration. 1572 * 1573 * @param dk the #DataKind_t enumeration value to convert. 1574 * 1575 * @return A string corresponding to the given type: 1576 * "uint", 1577 * "int", 1578 * "double", 1579 * "float", 1580 * "uint8", 1581 * "uint16", 1582 * "uint32", 1583 * or @c NULL if the value is @sbmlconstant{SPATIAL_DATAKIND_INVALID, 1584 * DataKind_t} or another invalid enumeration value. 1585 * 1586 * @copydetails doc_returned_unowned_char 1587 * 1588 * @if conly 1589 * @memberof Spatial_t 1590 * @endif 1591 */ 1592 LIBSBML_EXTERN 1593 const char* 1594 DataKind_toString(DataKind_t dk); 1595 1596 1597 /** 1598 * Returns the #DataKind_t enumeration corresponding to the given string or 1599 * @sbmlconstant{SPATIAL_DATAKIND_INVALID, DataKind_t} if there is no such 1600 * match. 1601 * 1602 * @param code the string to convert to a #DataKind_t. 1603 * 1604 * @return the corresponding #DataKind_t or 1605 * @sbmlconstant{SPATIAL_DATAKIND_INVALID, DataKind_t} if no match is found. 1606 * 1607 * @note The matching is case-sensitive: "double" will return 1608 * @sbmlconstant{SPATIAL_DATAKIND_DOUBLE, DataKind_t}, but "Double" will return 1609 * @sbmlconstant{SPATIAL_DATAKIND_INVALID, DataKind_t}. 1610 * 1611 * @if conly 1612 * @memberof Spatial_t 1613 * @endif 1614 */ 1615 LIBSBML_EXTERN 1616 DataKind_t 1617 DataKind_fromString(const char* code); 1618 1619 1620 /** 1621 * Predicate returning @c 1 (true) or @c 0 (false) depending on whether the 1622 * given #DataKind_t is valid. 1623 * 1624 * @param dk the #DataKind_t enumeration to query. 1625 * 1626 * @return @c 1 (true) if the #DataKind_t is 1627 * @sbmlconstant{SPATIAL_DATAKIND_UINT, DataKind_t} 1628 * @sbmlconstant{SPATIAL_DATAKIND_INT, DataKind_t} 1629 * @sbmlconstant{SPATIAL_DATAKIND_DOUBLE, DataKind_t}, 1630 * @sbmlconstant{SPATIAL_DATAKIND_FLOAT, DataKind_t}, 1631 * @sbmlconstant{SPATIAL_DATAKIND_UINT8, DataKind_t}, 1632 * @sbmlconstant{SPATIAL_DATAKIND_UINT16, DataKind_t}, or 1633 * @sbmlconstant{SPATIAL_DATAKIND_UINT32, DataKind_t}; 1634 * @c 0 (false) otherwise (including @sbmlconstant{SPATIAL_DATAKIND_INVALID, 1635 * DataKind_t}). 1636 * 1637 * @if conly 1638 * @memberof Spatial_t 1639 * @endif 1640 */ 1641 LIBSBML_EXTERN 1642 int 1643 DataKind_isValid(DataKind_t dk); 1644 1645 1646 /** 1647 * Predicate returning @c 1 (true) or @c 0 (false) depending on whether the 1648 * given string is a valid #DataKind_t. 1649 * 1650 * @param code the string to query. 1651 * 1652 * @return @c 1 (true) if the string is 1653 * "uint", 1654 * "int", 1655 * "double", 1656 * "float", 1657 * "uint8", 1658 * "uint16", or 1659 * "uint32"; 1660 * @c 0 (false) otherwise. 1661 * 1662 * @note The matching is case-sensitive: "double" will return @c 1 (true), but 1663 * "Double" will return @c 0 (false). 1664 * 1665 * @if conly 1666 * @memberof Spatial_t 1667 * @endif 1668 */ 1669 LIBSBML_EXTERN 1670 int 1671 DataKind_isValidString(const char* code); 1672 1673 /** 1674 */ 1675 LIBSBML_EXTERN 1676 DataKind_t 1677 DataKind_parse(const char* code); 1678 1679 1680 1681 /** 1682 * @enum CompressionKind_t 1683 * @brief Enumeration of values permitted as the value of the "compressionkind" 1684 * attribute on Spatial objects. 1685 * 1686 * @if conly 1687 * @see Spatial_getCompressionkind() 1688 * @see Spatial_setCompressionkind() 1689 * @elseif java 1690 * @see Spatial::getCompressionkind() 1691 * @see Spatial::setCompressionkind(long) 1692 * @else 1693 * @see Spatial::getCompressionkind() 1694 * @see Spatial::setCompressionkind() 1695 * @endif 1696 */ 1697 typedef enum 1698 { 1699 SPATIAL_COMPRESSIONKIND_UNCOMPRESSED /*!< The spatial compressionkind is @c "uncompressed". */ 1700 , SPATIAL_COMPRESSIONKIND_DEFLATED /*!< The spatial compressionkind is @c "deflated". */ 1701 , SPATIAL_COMPRESSIONKIND_INVALID /*!< Invalid CompressionKind value. */ 1702 } CompressionKind_t; 1703 1704 1705 /** 1706 * Returns the string version of the provided #CompressionKind_t enumeration. 1707 * 1708 * @param ck the #CompressionKind_t enumeration value to convert. 1709 * 1710 * @return A string corresponding to the given type: 1711 * "uncompressed", 1712 * "deflated", 1713 * or @c NULL if the value is @sbmlconstant{SPATIAL_COMPRESSIONKIND_INVALID, 1714 * CompressionKind_t} or another invalid enumeration value. 1715 * 1716 * @copydetails doc_returned_unowned_char 1717 * 1718 * @if conly 1719 * @memberof Spatial_t 1720 * @endif 1721 */ 1722 LIBSBML_EXTERN 1723 const char* 1724 CompressionKind_toString(CompressionKind_t ck); 1725 1726 1727 /** 1728 */ 1729 LIBSBML_EXTERN 1730 CompressionKind_t 1731 CompressionKind_parse(const char* code); 1732 1733 1734 /** 1735 * Returns the #CompressionKind_t enumeration corresponding to the given string 1736 * or @sbmlconstant{SPATIAL_COMPRESSIONKIND_INVALID, CompressionKind_t} if 1737 * there is no such match. 1738 * 1739 * @param code the string to convert to a #CompressionKind_t. 1740 * 1741 * @return the corresponding #CompressionKind_t or 1742 * @sbmlconstant{SPATIAL_COMPRESSIONKIND_INVALID, CompressionKind_t} if no 1743 * match is found. 1744 * 1745 * @note The matching is case-sensitive: "uncompressed" will return 1746 * @sbmlconstant{SPATIAL_COMPRESSIONKIND_UNCOMPRESSED, CompressionKind_t}, but 1747 * "Uncompressed" will return @sbmlconstant{SPATIAL_COMPRESSIONKIND_INVALID, 1748 * CompressionKind_t}. 1749 * 1750 * @if conly 1751 * @memberof Spatial_t 1752 * @endif 1753 */ 1754 LIBSBML_EXTERN 1755 CompressionKind_t 1756 CompressionKind_fromString(const char* code); 1757 1758 1759 /** 1760 * Predicate returning @c 1 (true) or @c 0 (false) depending on whether the 1761 * given #CompressionKind_t is valid. 1762 * 1763 * @param ck the #CompressionKind_t enumeration to query. 1764 * 1765 * @return @c 1 (true) if the #CompressionKind_t is 1766 * @sbmlconstant{SPATIAL_COMPRESSIONKIND_UNCOMPRESSED, CompressionKind_t}, or 1767 * @sbmlconstant{SPATIAL_COMPRESSIONKIND_DEFLATED, CompressionKind_t}; 1768 * @c 0 (false) otherwise (including 1769 * @sbmlconstant{SPATIAL_COMPRESSIONKIND_INVALID, CompressionKind_t}). 1770 * 1771 * @if conly 1772 * @memberof Spatial_t 1773 * @endif 1774 */ 1775 LIBSBML_EXTERN 1776 int 1777 CompressionKind_isValid(CompressionKind_t ck); 1778 1779 1780 /** 1781 * Predicate returning @c 1 (true) or @c 0 (false) depending on whether the 1782 * given string is a valid #CompressionKind_t. 1783 * 1784 * @param code the string to query. 1785 * 1786 * @return @c 1 (true) if the string is 1787 * "uncompressed", or 1788 * "deflated"; 1789 * @c 0 (false) otherwise. 1790 * 1791 * @note The matching is case-sensitive: "uncompressed" will return @c 1 1792 * (true), but "Uncompressed" will return @c 0 (false). 1793 * 1794 * @if conly 1795 * @memberof Spatial_t 1796 * @endif 1797 */ 1798 LIBSBML_EXTERN 1799 int 1800 CompressionKind_isValidString(const char* code); 1801 1802 1803 1804 1805 LIBSBML_CPP_NAMESPACE_END 1806 1807 1808 1809 1810 #endif /* !SpatialExtension_H__ */ 1811 1812 1813