1 /** 2 * @file CSGHomogeneousTransformation.h 3 * @brief Definition of the CSGHomogeneousTransformation class. 4 * @author SBMLTeam 5 * 6 * <!-------------------------------------------------------------------------- 7 * This file is part of libSBML. Please visit http://sbml.org for more 8 * information about SBML, and the latest version of libSBML. 9 * 10 * Copyright (C) 2020 jointly by the following organizations: 11 * 1. California Institute of Technology, Pasadena, CA, USA 12 * 2. University of Heidelberg, Heidelberg, Germany 13 * 3. University College London, London, UK 14 * 15 * Copyright (C) 2019 jointly by the following organizations: 16 * 1. California Institute of Technology, Pasadena, CA, USA 17 * 2. University of Heidelberg, Heidelberg, Germany 18 * 19 * Copyright (C) 2013-2018 jointly by the following organizations: 20 * 1. California Institute of Technology, Pasadena, CA, USA 21 * 2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK 22 * 3. University of Heidelberg, Heidelberg, Germany 23 * 24 * Copyright (C) 2009-2013 jointly by the following organizations: 25 * 1. California Institute of Technology, Pasadena, CA, USA 26 * 2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK 27 * 28 * Copyright (C) 2006-2008 by the California Institute of Technology, 29 * Pasadena, CA, USA 30 * 31 * Copyright (C) 2002-2005 jointly by the following organizations: 32 * 1. California Institute of Technology, Pasadena, CA, USA 33 * 2. Japan Science and Technology Agency, Japan 34 * 35 * This library is free software; you can redistribute it and/or modify it 36 * under the terms of the GNU Lesser General Public License as published by 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 CSGHomogeneousTransformation 43 * @sbmlbrief{spatial} TODO:Definition of the CSGHomogeneousTransformation 44 * class. 45 */ 46 47 48 #ifndef CSGHomogeneousTransformation_H__ 49 #define CSGHomogeneousTransformation_H__ 50 51 52 #include <sbml/common/extern.h> 53 #include <sbml/common/sbmlfwd.h> 54 #include <sbml/packages/spatial/common/spatialfwd.h> 55 56 57 #ifdef __cplusplus 58 59 60 #include <string> 61 62 63 #include <sbml/packages/spatial/sbml/CSGTransformation.h> 64 #include <sbml/packages/spatial/extension/SpatialExtension.h> 65 #include <sbml/packages/spatial/sbml/TransformationComponent.h> 66 67 68 LIBSBML_CPP_NAMESPACE_BEGIN 69 70 71 class LIBSBML_EXTERN CSGHomogeneousTransformation : public CSGTransformation 72 { 73 protected: 74 75 /** @cond doxygenLibsbmlInternal */ 76 77 TransformationComponent* mForwardTransformation; 78 79 /** @endcond */ 80 81 public: 82 83 /** 84 * Creates a new CSGHomogeneousTransformation using the given SBML Level, 85 * Version and “spatial” package version. 86 * 87 * @param level an unsigned int, the SBML Level to assign to this 88 * CSGHomogeneousTransformation. 89 * 90 * @param version an unsigned int, the SBML Version to assign to this 91 * CSGHomogeneousTransformation. 92 * 93 * @param pkgVersion an unsigned int, the SBML Spatial Version to assign to 94 * this CSGHomogeneousTransformation. 95 * 96 * @copydetails doc_note_setting_lv_pkg 97 */ 98 CSGHomogeneousTransformation( 99 unsigned int level = 100 SpatialExtension::getDefaultLevel(), 101 unsigned int version = 102 SpatialExtension::getDefaultVersion(), 103 unsigned int pkgVersion = SpatialExtension::getDefaultPackageVersion()); 104 105 106 /** 107 * Creates a new CSGHomogeneousTransformation using the given 108 * SpatialPkgNamespaces object. 109 * 110 * @copydetails doc_what_are_sbml_package_namespaces 111 * 112 * @param spatialns the SpatialPkgNamespaces object. 113 * 114 * @copydetails doc_note_setting_lv_pkg 115 */ 116 CSGHomogeneousTransformation(SpatialPkgNamespaces *spatialns); 117 118 119 /** 120 * Copy constructor for CSGHomogeneousTransformation. 121 * 122 * @param orig the CSGHomogeneousTransformation instance to copy. 123 */ 124 CSGHomogeneousTransformation(const CSGHomogeneousTransformation& orig); 125 126 127 /** 128 * Assignment operator for CSGHomogeneousTransformation. 129 * 130 * @param rhs the CSGHomogeneousTransformation object whose values are to be 131 * used as the basis of the assignment. 132 */ 133 CSGHomogeneousTransformation& operator=(const CSGHomogeneousTransformation& 134 rhs); 135 136 137 /** 138 * Creates and returns a deep copy of this CSGHomogeneousTransformation 139 * object. 140 * 141 * @return a (deep) copy of this CSGHomogeneousTransformation object. 142 */ 143 virtual CSGHomogeneousTransformation* clone() const; 144 145 146 /** 147 * Destructor for CSGHomogeneousTransformation. 148 */ 149 virtual ~CSGHomogeneousTransformation(); 150 151 152 /** 153 * Returns the value of the "forwardTransformation" element of this 154 * CSGHomogeneousTransformation. 155 * 156 * @return the value of the "forwardTransformation" element of this 157 * CSGHomogeneousTransformation as a TransformationComponent*. 158 */ 159 const TransformationComponent* getForwardTransformation() const; 160 161 162 /** 163 * Returns the value of the "forwardTransformation" element of this 164 * CSGHomogeneousTransformation. 165 * 166 * @return the value of the "forwardTransformation" element of this 167 * CSGHomogeneousTransformation as a TransformationComponent*. 168 */ 169 TransformationComponent* getForwardTransformation(); 170 171 172 /** 173 * Predicate returning @c true if this CSGHomogeneousTransformation's 174 * "forwardTransformation" element is set. 175 * 176 * @return @c true if this CSGHomogeneousTransformation's 177 * "forwardTransformation" element has been set, otherwise @c false is 178 * returned. 179 */ 180 bool isSetForwardTransformation() const; 181 182 183 /** 184 * Sets the value of the "forwardTransformation" element of this 185 * CSGHomogeneousTransformation. 186 * 187 * @param forwardTransformation TransformationComponent* value of the 188 * "forwardTransformation" element to be set. 189 * 190 * @copydetails doc_returns_success_code 191 * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t} 192 * @li @sbmlconstant{LIBSBML_INVALID_ATTRIBUTE_VALUE, 193 * OperationReturnValues_t} 194 */ 195 int setForwardTransformation(const TransformationComponent* 196 forwardTransformation); 197 198 199 /** 200 * Creates a new TransformationComponent object, adds it to this 201 * CSGHomogeneousTransformation object and returns the 202 * TransformationComponent object created. 203 * 204 * @return a new TransformationComponent object instance. 205 */ 206 TransformationComponent* createForwardTransformation(); 207 208 209 /** 210 * Unsets the value of the "forwardTransformation" element of this 211 * CSGHomogeneousTransformation. 212 * 213 * @copydetails doc_returns_success_code 214 * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t} 215 * @li @sbmlconstant{LIBSBML_OPERATION_FAILED, OperationReturnValues_t} 216 */ 217 int unsetForwardTransformation(); 218 219 220 /** 221 * Returns the XML element name of this CSGHomogeneousTransformation object. 222 * 223 * For CSGHomogeneousTransformation, the XML element name is always 224 * @c "csgHomogeneousTransformation". 225 * 226 * @return the name of this element, i.e. @c "csgHomogeneousTransformation". 227 */ 228 virtual const std::string& getElementName() const; 229 230 231 /** 232 * Returns the libSBML type code for this CSGHomogeneousTransformation 233 * object. 234 * 235 * @copydetails doc_what_are_typecodes 236 * 237 * @return the SBML type code for this object: 238 * @sbmlconstant{SBML_SPATIAL_CSGHOMOGENEOUSTRANSFORMATION, 239 * SBMLSpatialTypeCode_t}. 240 * 241 * @copydetails doc_warning_typecodes_not_unique 242 * 243 * @see getElementName() 244 * @see getPackageName() 245 */ 246 virtual int getTypeCode() const; 247 248 249 /** 250 * Predicate returning @c true if all the required attributes for this 251 * CSGHomogeneousTransformation object have been set. 252 * 253 * @return @c true to indicate that all the required attributes of this 254 * CSGHomogeneousTransformation have been set, otherwise @c false is 255 * returned. 256 */ 257 virtual bool hasRequiredAttributes() const; 258 259 260 /** 261 * Predicate returning @c true if all the required elements for this 262 * CSGHomogeneousTransformation object have been set. 263 * 264 * @return @c true to indicate that all the required elements of this 265 * CSGHomogeneousTransformation have been set, otherwise @c false is 266 * returned. 267 * 268 * 269 * @note The required elements for the CSGHomogeneousTransformation object 270 * are: 271 * @li "forwardTransformation" 272 */ 273 virtual bool hasRequiredElements() const; 274 275 276 277 /** @cond doxygenLibsbmlInternal */ 278 279 /** 280 * Write any contained elements 281 */ 282 virtual void writeElements(XMLOutputStream& stream) const; 283 284 /** @endcond */ 285 286 287 288 /** @cond doxygenLibsbmlInternal */ 289 290 /** 291 * Accepts the given SBMLVisitor 292 */ 293 virtual bool accept(SBMLVisitor& v) const; 294 295 /** @endcond */ 296 297 298 299 /** @cond doxygenLibsbmlInternal */ 300 301 /** 302 * Sets the parent SBMLDocument 303 */ 304 virtual void setSBMLDocument(SBMLDocument* d); 305 306 /** @endcond */ 307 308 309 310 /** @cond doxygenLibsbmlInternal */ 311 312 /** 313 * Connects to child elements 314 */ 315 virtual void connectToChild(); 316 317 /** @endcond */ 318 319 320 321 /** @cond doxygenLibsbmlInternal */ 322 323 /** 324 * Enables/disables the given package with this element 325 */ 326 virtual void enablePackageInternal(const std::string& pkgURI, 327 const std::string& pkgPrefix, 328 bool flag); 329 330 /** @endcond */ 331 332 333 334 /** @cond doxygenLibsbmlInternal */ 335 336 /** 337 * Updates the namespaces when setLevelVersion is used 338 */ 339 virtual void updateSBMLNamespace(const std::string& package, 340 unsigned int level, 341 unsigned int version); 342 343 /** @endcond */ 344 345 346 347 348 #ifndef SWIG 349 350 351 352 /** @cond doxygenLibsbmlInternal */ 353 354 /** 355 * Gets the value of the "attributeName" attribute of this 356 * CSGHomogeneousTransformation. 357 * 358 * @param attributeName, the name of the attribute to retrieve. 359 * 360 * @param value, the address of the value to record. 361 * 362 * @copydetails doc_returns_success_code 363 * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t} 364 * @li @sbmlconstant{LIBSBML_OPERATION_FAILED, OperationReturnValues_t} 365 */ 366 virtual int getAttribute(const std::string& attributeName, bool& value) 367 const; 368 369 /** @endcond */ 370 371 372 373 /** @cond doxygenLibsbmlInternal */ 374 375 /** 376 * Gets the value of the "attributeName" attribute of this 377 * CSGHomogeneousTransformation. 378 * 379 * @param attributeName, the name of the attribute to retrieve. 380 * 381 * @param value, the address of the value to record. 382 * 383 * @copydetails doc_returns_success_code 384 * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t} 385 * @li @sbmlconstant{LIBSBML_OPERATION_FAILED, OperationReturnValues_t} 386 */ 387 virtual int getAttribute(const std::string& attributeName, int& value) const; 388 389 /** @endcond */ 390 391 392 393 /** @cond doxygenLibsbmlInternal */ 394 395 /** 396 * Gets the value of the "attributeName" attribute of this 397 * CSGHomogeneousTransformation. 398 * 399 * @param attributeName, the name of the attribute to retrieve. 400 * 401 * @param value, the address of the value to record. 402 * 403 * @copydetails doc_returns_success_code 404 * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t} 405 * @li @sbmlconstant{LIBSBML_OPERATION_FAILED, OperationReturnValues_t} 406 */ 407 virtual int getAttribute(const std::string& attributeName, 408 double& value) const; 409 410 /** @endcond */ 411 412 413 414 /** @cond doxygenLibsbmlInternal */ 415 416 /** 417 * Gets the value of the "attributeName" attribute of this 418 * CSGHomogeneousTransformation. 419 * 420 * @param attributeName, the name of the attribute to retrieve. 421 * 422 * @param value, the address of the value to record. 423 * 424 * @copydetails doc_returns_success_code 425 * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t} 426 * @li @sbmlconstant{LIBSBML_OPERATION_FAILED, OperationReturnValues_t} 427 */ 428 virtual int getAttribute(const std::string& attributeName, 429 unsigned int& value) const; 430 431 /** @endcond */ 432 433 434 435 /** @cond doxygenLibsbmlInternal */ 436 437 /** 438 * Gets the value of the "attributeName" attribute of this 439 * CSGHomogeneousTransformation. 440 * 441 * @param attributeName, the name of the attribute to retrieve. 442 * 443 * @param value, the address of the value to record. 444 * 445 * @copydetails doc_returns_success_code 446 * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t} 447 * @li @sbmlconstant{LIBSBML_OPERATION_FAILED, OperationReturnValues_t} 448 */ 449 virtual int getAttribute(const std::string& attributeName, 450 std::string& value) const; 451 452 /** @endcond */ 453 454 455 456 /** @cond doxygenLibsbmlInternal */ 457 458 /** 459 * Predicate returning @c true if this CSGHomogeneousTransformation's 460 * attribute "attributeName" is set. 461 * 462 * @param attributeName, the name of the attribute to query. 463 * 464 * @return @c true if this CSGHomogeneousTransformation's attribute 465 * "attributeName" has been set, otherwise @c false is returned. 466 */ 467 virtual bool isSetAttribute(const std::string& attributeName) const; 468 469 /** @endcond */ 470 471 472 473 /** @cond doxygenLibsbmlInternal */ 474 475 /** 476 * Sets the value of the "attributeName" attribute of this 477 * CSGHomogeneousTransformation. 478 * 479 * @param attributeName, the name of the attribute to set. 480 * 481 * @param value, the value of the attribute to set. 482 * 483 * @copydetails doc_returns_success_code 484 * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t} 485 * @li @sbmlconstant{LIBSBML_OPERATION_FAILED, OperationReturnValues_t} 486 */ 487 virtual int setAttribute(const std::string& attributeName, bool value); 488 489 /** @endcond */ 490 491 492 493 /** @cond doxygenLibsbmlInternal */ 494 495 /** 496 * Sets the value of the "attributeName" attribute of this 497 * CSGHomogeneousTransformation. 498 * 499 * @param attributeName, the name of the attribute to set. 500 * 501 * @param value, the value of the attribute to set. 502 * 503 * @copydetails doc_returns_success_code 504 * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t} 505 * @li @sbmlconstant{LIBSBML_OPERATION_FAILED, OperationReturnValues_t} 506 */ 507 virtual int setAttribute(const std::string& attributeName, int value); 508 509 /** @endcond */ 510 511 512 513 /** @cond doxygenLibsbmlInternal */ 514 515 /** 516 * Sets the value of the "attributeName" attribute of this 517 * CSGHomogeneousTransformation. 518 * 519 * @param attributeName, the name of the attribute to set. 520 * 521 * @param value, the value of the attribute to set. 522 * 523 * @copydetails doc_returns_success_code 524 * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t} 525 * @li @sbmlconstant{LIBSBML_OPERATION_FAILED, OperationReturnValues_t} 526 */ 527 virtual int setAttribute(const std::string& attributeName, double value); 528 529 /** @endcond */ 530 531 532 533 /** @cond doxygenLibsbmlInternal */ 534 535 /** 536 * Sets the value of the "attributeName" attribute of this 537 * CSGHomogeneousTransformation. 538 * 539 * @param attributeName, the name of the attribute to set. 540 * 541 * @param value, the value of the attribute to set. 542 * 543 * @copydetails doc_returns_success_code 544 * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t} 545 * @li @sbmlconstant{LIBSBML_OPERATION_FAILED, OperationReturnValues_t} 546 */ 547 virtual int setAttribute(const std::string& attributeName, 548 unsigned int value); 549 550 /** @endcond */ 551 552 553 554 /** @cond doxygenLibsbmlInternal */ 555 556 /** 557 * Sets the value of the "attributeName" attribute of this 558 * CSGHomogeneousTransformation. 559 * 560 * @param attributeName, the name of the attribute to set. 561 * 562 * @param value, the value of the attribute to set. 563 * 564 * @copydetails doc_returns_success_code 565 * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t} 566 * @li @sbmlconstant{LIBSBML_OPERATION_FAILED, OperationReturnValues_t} 567 */ 568 virtual int setAttribute(const std::string& attributeName, 569 const std::string& value); 570 571 /** @endcond */ 572 573 574 575 /** @cond doxygenLibsbmlInternal */ 576 577 /** 578 * Unsets the value of the "attributeName" attribute of this 579 * CSGHomogeneousTransformation. 580 * 581 * @param attributeName, the name of the attribute to query. 582 * 583 * @copydetails doc_returns_success_code 584 * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t} 585 * @li @sbmlconstant{LIBSBML_OPERATION_FAILED, OperationReturnValues_t} 586 */ 587 virtual int unsetAttribute(const std::string& attributeName); 588 589 /** @endcond */ 590 591 592 593 /** @cond doxygenLibsbmlInternal */ 594 595 /** 596 * Creates and returns an new "elementName" object in this 597 * CSGHomogeneousTransformation. 598 * 599 * @param elementName, the name of the element to create. 600 * 601 * @return pointer to the element created. 602 */ 603 virtual SBase* createChildObject(const std::string& elementName); 604 605 /** @endcond */ 606 607 608 609 /** @cond doxygenLibsbmlInternal */ 610 611 /** 612 * Adds a new "elementName" object to this CSGHomogeneousTransformation. 613 * 614 * @param elementName, the name of the element to create. 615 * 616 * @param element, pointer to the element to be added. 617 * 618 * @copydetails doc_returns_success_code 619 * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t} 620 * @li @sbmlconstant{LIBSBML_OPERATION_FAILED, OperationReturnValues_t} 621 */ 622 virtual int addChildObject(const std::string& elementName, 623 const SBase* element); 624 625 /** @endcond */ 626 627 628 629 /** @cond doxygenLibsbmlInternal */ 630 631 /** 632 * Removes and returns the new "elementName" object with the given id in this 633 * CSGHomogeneousTransformation. 634 * 635 * @param elementName, the name of the element to remove. 636 * 637 * @param id, the id of the element to remove. 638 * 639 * @return pointer to the element removed. 640 */ 641 virtual SBase* removeChildObject(const std::string& elementName, 642 const std::string& id); 643 644 /** @endcond */ 645 646 647 648 /** @cond doxygenLibsbmlInternal */ 649 650 /** 651 * Returns the number of "elementName" in this CSGHomogeneousTransformation. 652 * 653 * @param elementName, the name of the element to get number of. 654 * 655 * @return unsigned int number of elements. 656 */ 657 virtual unsigned int getNumObjects(const std::string& elementName); 658 659 /** @endcond */ 660 661 662 663 /** @cond doxygenLibsbmlInternal */ 664 665 /** 666 * Returns the nth object of "objectName" in this 667 * CSGHomogeneousTransformation. 668 * 669 * @param elementName, the name of the element to get number of. 670 * 671 * @param index, unsigned int the index of the object to retrieve. 672 * 673 * @return pointer to the object. 674 */ 675 virtual SBase* getObject(const std::string& elementName, unsigned int index); 676 677 /** @endcond */ 678 679 680 681 682 #endif /* !SWIG */ 683 684 685 /** 686 * Returns the first child element that has the given @p id in the model-wide 687 * SId namespace, or @c NULL if no such object is found. 688 * 689 * @param id a string representing the id attribute of the object to 690 * retrieve. 691 * 692 * @return a pointer to the SBase element with the given @p id. If no such 693 * object is found, this method returns @c NULL. 694 */ 695 virtual SBase* getElementBySId(const std::string& id); 696 697 698 /** 699 * Returns the first child element that has the given @p metaid, or @c NULL 700 * if no such object is found. 701 * 702 * @param metaid a string representing the metaid attribute of the object to 703 * retrieve. 704 * 705 * @return a pointer to the SBase element with the given @p metaid. If no 706 * such object is found this method returns @c NULL. 707 */ 708 virtual SBase* getElementByMetaId(const std::string& metaid); 709 710 711 /** 712 * Returns a List of all child SBase objects, including those nested to an 713 * arbitrary depth. 714 * 715 * @param filter an ElementFilter that may impose restrictions on the objects 716 * to be retrieved. 717 * 718 * @return a List pointer of pointers to all SBase child objects with any 719 * restriction imposed. 720 */ 721 virtual List* getAllElements(ElementFilter * filter = NULL); 722 723 724 protected: 725 726 727 /** @cond doxygenLibsbmlInternal */ 728 729 /** 730 * Creates a new object from the next XMLToken on the XMLInputStream 731 */ 732 virtual SBase* createObject(XMLInputStream& stream); 733 734 /** @endcond */ 735 736 737 738 /** @cond doxygenLibsbmlInternal */ 739 740 /** 741 * Adds the expected attributes for this element 742 */ 743 virtual void addExpectedAttributes(ExpectedAttributes& attributes); 744 745 /** @endcond */ 746 747 748 749 /** @cond doxygenLibsbmlInternal */ 750 751 /** 752 * Reads the expected attributes into the member data variables 753 */ 754 virtual void readAttributes(const XMLAttributes& attributes, 755 const ExpectedAttributes& expectedAttributes); 756 757 /** @endcond */ 758 759 760 761 /** @cond doxygenLibsbmlInternal */ 762 763 /** 764 * Writes the attributes to the stream 765 */ 766 virtual void writeAttributes(XMLOutputStream& stream) const; 767 768 /** @endcond */ 769 770 771 }; 772 773 774 775 LIBSBML_CPP_NAMESPACE_END 776 777 778 779 780 #endif /* __cplusplus */ 781 782 783 784 785 #ifndef SWIG 786 787 788 789 790 LIBSBML_CPP_NAMESPACE_BEGIN 791 792 793 794 795 BEGIN_C_DECLS 796 797 798 /** 799 * Creates a new CSGHomogeneousTransformation_t using the given SBML Level, 800 * Version and “spatial” package version. 801 * 802 * @param level an unsigned int, the SBML Level to assign to this 803 * CSGHomogeneousTransformation_t. 804 * 805 * @param version an unsigned int, the SBML Version to assign to this 806 * CSGHomogeneousTransformation_t. 807 * 808 * @param pkgVersion an unsigned int, the SBML Spatial Version to assign to 809 * this CSGHomogeneousTransformation_t. 810 * 811 * @copydetails doc_note_setting_lv_pkg 812 * 813 * @copydetails doc_returned_owned_pointer 814 * 815 * @memberof CSGHomogeneousTransformation_t 816 */ 817 LIBSBML_EXTERN 818 CSGHomogeneousTransformation_t * 819 CSGHomogeneousTransformation_create(unsigned int level, 820 unsigned int version, 821 unsigned int pkgVersion); 822 823 824 /** 825 * Creates and returns a deep copy of this CSGHomogeneousTransformation_t 826 * object. 827 * 828 * @param csght the CSGHomogeneousTransformation_t structure. 829 * 830 * @return a (deep) copy of this CSGHomogeneousTransformation_t object. 831 * 832 * @copydetails doc_returned_owned_pointer 833 * 834 * @memberof CSGHomogeneousTransformation_t 835 */ 836 LIBSBML_EXTERN 837 CSGHomogeneousTransformation_t* 838 CSGHomogeneousTransformation_clone(const CSGHomogeneousTransformation_t* 839 csght); 840 841 842 /** 843 * Frees this CSGHomogeneousTransformation_t object. 844 * 845 * @param csght the CSGHomogeneousTransformation_t structure. 846 * 847 * @memberof CSGHomogeneousTransformation_t 848 */ 849 LIBSBML_EXTERN 850 void 851 CSGHomogeneousTransformation_free(CSGHomogeneousTransformation_t* csght); 852 853 854 /** 855 * Returns the value of the "forwardTransformation" element of this 856 * CSGHomogeneousTransformation_t. 857 * 858 * @param csght the CSGHomogeneousTransformation_t structure whose 859 * forwardTransformation is sought. 860 * 861 * @return the value of the "forwardTransformation" element of this 862 * CSGHomogeneousTransformation_t as a TransformationComponent*. 863 * 864 * @memberof CSGHomogeneousTransformation_t 865 */ 866 LIBSBML_EXTERN 867 const TransformationComponent_t* 868 CSGHomogeneousTransformation_getForwardTransformation(const 869 CSGHomogeneousTransformation_t * csght); 870 871 872 /** 873 * Predicate returning @c 1 (true) if this CSGHomogeneousTransformation_t's 874 * "forwardTransformation" element is set. 875 * 876 * @param csght the CSGHomogeneousTransformation_t structure. 877 * 878 * @return @c 1 (true) if this CSGHomogeneousTransformation_t's 879 * "forwardTransformation" element has been set, otherwise @c 0 (false) is 880 * returned. 881 * 882 * @memberof CSGHomogeneousTransformation_t 883 */ 884 LIBSBML_EXTERN 885 int 886 CSGHomogeneousTransformation_isSetForwardTransformation(const 887 CSGHomogeneousTransformation_t * csght); 888 889 890 /** 891 * Sets the value of the "forwardTransformation" element of this 892 * CSGHomogeneousTransformation_t. 893 * 894 * @param csght the CSGHomogeneousTransformation_t structure. 895 * 896 * @param forwardTransformation TransformationComponent_t* value of the 897 * "forwardTransformation" element to be set. 898 * 899 * @copydetails doc_returns_success_code 900 * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t} 901 * @li @sbmlconstant{LIBSBML_INVALID_ATTRIBUTE_VALUE, OperationReturnValues_t} 902 * @li @sbmlconstant{LIBSBML_INVALID_OBJECT, OperationReturnValues_t} 903 * 904 * @memberof CSGHomogeneousTransformation_t 905 */ 906 LIBSBML_EXTERN 907 int 908 CSGHomogeneousTransformation_setForwardTransformation( 909 CSGHomogeneousTransformation_t 910 * csght, 911 const TransformationComponent_t* 912 forwardTransformation); 913 914 915 /** 916 * Creates a new TransformationComponent_t object, adds it to this 917 * CSGHomogeneousTransformation_t object and returns the 918 * TransformationComponent_t object created. 919 * 920 * @param csght the CSGHomogeneousTransformation_t structure to which the 921 * TransformationComponent_t should be added. 922 * 923 * @return a new TransformationComponent_t object instance. 924 * 925 * @memberof CSGHomogeneousTransformation_t 926 */ 927 LIBSBML_EXTERN 928 TransformationComponent_t* 929 CSGHomogeneousTransformation_createForwardTransformation(CSGHomogeneousTransformation_t* 930 csght); 931 932 933 /** 934 * Unsets the value of the "forwardTransformation" element of this 935 * CSGHomogeneousTransformation_t. 936 * 937 * @param csght the CSGHomogeneousTransformation_t structure. 938 * 939 * @copydetails doc_returns_success_code 940 * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t} 941 * @li @sbmlconstant{LIBSBML_OPERATION_FAILED, OperationReturnValues_t} 942 * @li @sbmlconstant{LIBSBML_INVALID_OBJECT, OperationReturnValues_t} 943 * 944 * @memberof CSGHomogeneousTransformation_t 945 */ 946 LIBSBML_EXTERN 947 int 948 CSGHomogeneousTransformation_unsetForwardTransformation(CSGHomogeneousTransformation_t 949 * csght); 950 951 952 /** 953 * Predicate returning @c 1 (true) if all the required attributes for this 954 * CSGHomogeneousTransformation_t object have been set. 955 * 956 * @param csght the CSGHomogeneousTransformation_t structure. 957 * 958 * @return @c 1 (true) to indicate that all the required attributes of this 959 * CSGHomogeneousTransformation_t have been set, otherwise @c 0 (false) is 960 * returned. 961 * 962 * @memberof CSGHomogeneousTransformation_t 963 */ 964 LIBSBML_EXTERN 965 int 966 CSGHomogeneousTransformation_hasRequiredAttributes(const 967 CSGHomogeneousTransformation_t * csght); 968 969 970 /** 971 * Predicate returning @c 1 (true) if all the required elements for this 972 * CSGHomogeneousTransformation_t object have been set. 973 * 974 * @param csght the CSGHomogeneousTransformation_t structure. 975 * 976 * @return @c 1 (true) to indicate that all the required elements of this 977 * CSGHomogeneousTransformation_t have been set, otherwise @c 0 (false) is 978 * returned. 979 * 980 * 981 * @note The required elements for the CSGHomogeneousTransformation_t object 982 * are: 983 * @li "forwardTransformation" 984 * 985 * @memberof CSGHomogeneousTransformation_t 986 */ 987 LIBSBML_EXTERN 988 int 989 CSGHomogeneousTransformation_hasRequiredElements(const 990 CSGHomogeneousTransformation_t * csght); 991 992 993 994 995 END_C_DECLS 996 997 998 999 1000 LIBSBML_CPP_NAMESPACE_END 1001 1002 1003 1004 1005 #endif /* !SWIG */ 1006 1007 1008 1009 1010 #endif /* !CSGHomogeneousTransformation_H__ */ 1011 1012 1013