1 /** 2 * @file SedDocument.h 3 * @brief Definition of the SedDocument class. 4 * @author DEVISER 5 * 6 * <!-------------------------------------------------------------------------- 7 * This file is part of libSEDML. Please visit http://sed-ml.org for more 8 * information about SED-ML. The latest version of libSEDML can be found on 9 * github: https://github.com/fbergmann/libSEDML/ 10 * 11 12 * Copyright (c) 2013-2019, Frank T. Bergmann 13 * All rights reserved. 14 * 15 16 * Redistribution and use in source and binary forms, with or without 17 * modification, are permitted provided that the following conditions are met: 18 * 19 20 * 1. Redistributions of source code must retain the above copyright notice, 21 * this 22 * list of conditions and the following disclaimer. 23 * 2. Redistributions in binary form must reproduce the above copyright notice, 24 * this list of conditions and the following disclaimer in the documentation 25 * and/or other materials provided with the distribution. 26 * 27 * This library is free software; you can redistribute it and/or modify it 28 * under the terms of the GNU Lesser General Public License as published by the 29 * Free Software Foundation. A copy of the license agreement is provided in the 30 * file named "LICENSE.txt" included with this software distribution and also 31 * available online as http://sbml.org/software/libsbml/license.html 32 * ------------------------------------------------------------------------ --> 33 * 34 * @class SedDocument 35 * @sbmlbrief{sedml} TODO:Definition of the SedDocument class. 36 */ 37 38 39 #ifndef SedDocument_H__ 40 #define SedDocument_H__ 41 42 43 #include <sedml/common/extern.h> 44 #include <sedml/common/sedmlfwd.h> 45 46 47 #ifdef __cplusplus 48 49 50 #include <string> 51 52 53 #include <sedml/SedBase.h> 54 #include <sedml/SedListOfAlgorithmParameters.h> 55 #include <sedml/SedListOfDataDescriptions.h> 56 #include <sedml/SedListOfModels.h> 57 #include <sedml/SedListOfSimulations.h> 58 #include <sedml/SedListOfTasks.h> 59 #include <sedml/SedListOfDataGenerators.h> 60 #include <sedml/SedListOfOutputs.h> 61 #include <sedml/SedListOfStyles.h> 62 #include <sedml/SedErrorLog.h> 63 #include <sbml/common/libsbml-namespace.h> 64 65 66 LIBSEDML_CPP_NAMESPACE_BEGIN 67 68 69 class LIBSEDML_EXTERN SedDocument : public SedBase 70 { 71 protected: 72 73 /** @cond doxygenLibSEDMLInternal */ 74 75 unsigned int mLevel; 76 bool mIsSetLevel; 77 unsigned int mVersion; 78 bool mIsSetVersion; 79 SedListOfAlgorithmParameters mAlgorithmParameters; 80 SedListOfDataDescriptions mDataDescriptions; 81 SedListOfModels mModels; 82 SedListOfSimulations mSimulations; 83 SedListOfTasks mAbstractTasks; 84 SedListOfDataGenerators mDataGenerators; 85 SedListOfOutputs mOutputs; 86 SedListOfStyles mStyles; 87 SedErrorLog mErrorLog; 88 89 /** @endcond */ 90 91 public: 92 93 /** 94 * Creates a new SedDocument using the given SED-ML Level and @ p version 95 * values. 96 * 97 * @param level an unsigned int, the SED-ML Level to assign to this 98 * SedDocument. 99 * 100 * @param version an unsigned int, the SED-ML Version to assign to this 101 * SedDocument. 102 * 103 * @copydetails doc_note_setting_lv_pkg 104 */ 105 SedDocument(unsigned int level = SEDML_DEFAULT_LEVEL, 106 unsigned int version = SEDML_DEFAULT_VERSION); 107 108 109 /** 110 * Creates a new SedDocument using the given SedNamespaces object @p sedmlns. 111 * 112 * @param sedmlns the SedNamespaces object. 113 * 114 * @copydetails doc_note_setting_lv_pkg 115 */ 116 SedDocument(SedNamespaces *sedmlns); 117 118 119 /** 120 * Copy constructor for SedDocument. 121 * 122 * @param orig the SedDocument instance to copy. 123 */ 124 SedDocument(const SedDocument& orig); 125 126 127 /** 128 * Assignment operator for SedDocument. 129 * 130 * @param rhs the SedDocument object whose values are to be used as the basis 131 * of the assignment. 132 */ 133 SedDocument& operator=(const SedDocument& rhs); 134 135 136 /** 137 * Creates and returns a deep copy of this SedDocument object. 138 * 139 * @return a (deep) copy of this SedDocument object. 140 */ 141 virtual SedDocument* clone() const; 142 143 144 /** 145 * Destructor for SedDocument. 146 */ 147 virtual ~SedDocument(); 148 149 150 /** 151 * Returns the value of the "level" attribute of this SedDocument. 152 * 153 * @return the value of the "level" attribute of this SedDocument as a 154 * unsigned integer. 155 */ 156 unsigned int getLevel() const; 157 158 159 /** 160 * Returns the value of the "version" attribute of this SedDocument. 161 * 162 * @return the value of the "version" attribute of this SedDocument as a 163 * unsigned integer. 164 */ 165 unsigned int getVersion() const; 166 167 168 /** 169 * Predicate returning @c true if this SedDocument's "level" attribute is 170 * set. 171 * 172 * @return @c true if this SedDocument's "level" attribute has been set, 173 * otherwise @c false is returned. 174 */ 175 bool isSetLevel() const; 176 177 178 /** 179 * Predicate returning @c true if this SedDocument's "version" attribute is 180 * set. 181 * 182 * @return @c true if this SedDocument's "version" attribute has been set, 183 * otherwise @c false is returned. 184 */ 185 bool isSetVersion() const; 186 187 188 /** 189 * Sets the value of the "level" attribute of this SedDocument. 190 * 191 * @param level unsigned int value of the "level" attribute to be set. 192 * 193 * @copydetails doc_returns_success_code 194 * @li @sedmlconstant{LIBSEDML_OPERATION_SUCCESS, OperationReturnValues_t} 195 * @li @sedmlconstant{LIBSEDML_INVALID_ATTRIBUTE_VALUE, 196 * OperationReturnValues_t} 197 */ 198 int setLevel(unsigned int level); 199 200 201 /** 202 * Sets the value of the "version" attribute of this SedDocument. 203 * 204 * @param version unsigned int value of the "version" attribute to be set. 205 * 206 * @copydetails doc_returns_success_code 207 * @li @sedmlconstant{LIBSEDML_OPERATION_SUCCESS, OperationReturnValues_t} 208 * @li @sedmlconstant{LIBSEDML_INVALID_ATTRIBUTE_VALUE, 209 * OperationReturnValues_t} 210 */ 211 int setVersion(unsigned int version); 212 213 214 /** 215 * Unsets the value of the "level" attribute of this SedDocument. 216 * 217 * @copydetails doc_returns_success_code 218 * @li @sedmlconstant{LIBSEDML_OPERATION_SUCCESS, OperationReturnValues_t} 219 * @li @sedmlconstant{LIBSEDML_OPERATION_FAILED, OperationReturnValues_t} 220 */ 221 int unsetLevel(); 222 223 224 /** 225 * Unsets the value of the "version" attribute of this SedDocument. 226 * 227 * @copydetails doc_returns_success_code 228 * @li @sedmlconstant{LIBSEDML_OPERATION_SUCCESS, OperationReturnValues_t} 229 * @li @sedmlconstant{LIBSEDML_OPERATION_FAILED, OperationReturnValues_t} 230 */ 231 int unsetVersion(); 232 233 234 /** 235 * Returns the SedListOfAlgorithmParameters from this SedDocument. 236 * 237 * @return the SedListOfAlgorithmParameters from this SedDocument. 238 * 239 * @copydetails doc_returned_unowned_pointer 240 * 241 * @see addAlgorithmParameter(const SedAlgorithmParameter* object) 242 * @see createAlgorithmParameter() 243 * @see getAlgorithmParameter(const std::string& sid) 244 * @see getAlgorithmParameter(unsigned int n) 245 * @see getNumAlgorithmParameters() 246 * @see removeAlgorithmParameter(const std::string& sid) 247 * @see removeAlgorithmParameter(unsigned int n) 248 */ 249 const SedListOfAlgorithmParameters* getListOfAlgorithmParameters() const; 250 251 252 /** 253 * Returns the SedListOfAlgorithmParameters from this SedDocument. 254 * 255 * @return the SedListOfAlgorithmParameters from this SedDocument. 256 * 257 * @copydetails doc_returned_unowned_pointer 258 * 259 * @see addAlgorithmParameter(const SedAlgorithmParameter* object) 260 * @see createAlgorithmParameter() 261 * @see getAlgorithmParameter(const std::string& sid) 262 * @see getAlgorithmParameter(unsigned int n) 263 * @see getNumAlgorithmParameters() 264 * @see removeAlgorithmParameter(const std::string& sid) 265 * @see removeAlgorithmParameter(unsigned int n) 266 */ 267 SedListOfAlgorithmParameters* getListOfAlgorithmParameters(); 268 269 270 /** 271 * Get a SedAlgorithmParameter from the SedDocument. 272 * 273 * @param n an unsigned int representing the index of the 274 * SedAlgorithmParameter to retrieve. 275 * 276 * @return the nth SedAlgorithmParameter in the SedListOfAlgorithmParameters 277 * within this SedDocument or @c NULL if no such object exists. 278 * 279 * @copydetails doc_returned_unowned_pointer 280 * 281 * @see addAlgorithmParameter(const SedAlgorithmParameter* object) 282 * @see createAlgorithmParameter() 283 * @see getAlgorithmParameter(const std::string& sid) 284 * @see getNumAlgorithmParameters() 285 * @see removeAlgorithmParameter(const std::string& sid) 286 * @see removeAlgorithmParameter(unsigned int n) 287 */ 288 SedAlgorithmParameter* getAlgorithmParameter(unsigned int n); 289 290 291 /** 292 * Get a SedAlgorithmParameter from the SedDocument. 293 * 294 * @param n an unsigned int representing the index of the 295 * SedAlgorithmParameter to retrieve. 296 * 297 * @return the nth SedAlgorithmParameter in the SedListOfAlgorithmParameters 298 * within this SedDocument or @c NULL if no such object exists. 299 * 300 * @copydetails doc_returned_unowned_pointer 301 * 302 * @see addAlgorithmParameter(const SedAlgorithmParameter* object) 303 * @see createAlgorithmParameter() 304 * @see getAlgorithmParameter(const std::string& sid) 305 * @see getNumAlgorithmParameters() 306 * @see removeAlgorithmParameter(const std::string& sid) 307 * @see removeAlgorithmParameter(unsigned int n) 308 */ 309 const SedAlgorithmParameter* getAlgorithmParameter(unsigned int n) const; 310 311 312 /** 313 * Get a SedAlgorithmParameter from the SedDocument. 314 * 315 * @param id id of the 316 * SedAlgorithmParameter to retrieve. 317 * 318 * @return the SedAlgorithmParameter in the SedListOfAlgorithmParameters 319 * within this SedDocument or @c NULL if no such object exists. 320 * 321 * @copydetails doc_returned_unowned_pointer 322 * 323 * @see addAlgorithmParameter(const SedAlgorithmParameter* object) 324 * @see createAlgorithmParameter() 325 * @see getAlgorithmParameter(const std::string& sid) 326 * @see getNumAlgorithmParameters() 327 * @see removeAlgorithmParameter(const std::string& sid) 328 * @see removeAlgorithmParameter(unsigned int n) 329 */ 330 SedAlgorithmParameter* getAlgorithmParameter(const std::string& id); 331 332 333 /** 334 * Get a SedAlgorithmParameter from the SedDocument. 335 * 336 * @param id id of the 337 * SedAlgorithmParameter to retrieve. 338 * 339 * @return the SedAlgorithmParameter in the SedListOfAlgorithmParameters 340 * within this SedDocument or @c NULL if no such object exists. 341 * 342 * @copydetails doc_returned_unowned_pointer 343 * 344 * @see addAlgorithmParameter(const SedAlgorithmParameter* object) 345 * @see createAlgorithmParameter() 346 * @see getAlgorithmParameter(const std::string& sid) 347 * @see getNumAlgorithmParameters() 348 * @see removeAlgorithmParameter(const std::string& sid) 349 * @see removeAlgorithmParameter(unsigned int n) 350 */ 351 const SedAlgorithmParameter* getAlgorithmParameter(const std::string& id) const; 352 353 354 /** 355 * Adds a copy of the given SedAlgorithmParameter to this SedDocument. 356 * 357 * @param sap the SedAlgorithmParameter object to add. 358 * 359 * @copydetails doc_returns_success_code 360 * @li @sedmlconstant{LIBSEDML_OPERATION_SUCCESS, OperationReturnValues_t} 361 * @li @sedmlconstant{LIBSEDML_OPERATION_FAILED, OperationReturnValues_t} 362 * @li @sedmlconstant{LIBSEDML_INVALID_OBJECT, OperationReturnValues_t} 363 * @li @sedmlconstant{LIBSEDML_LEVEL_MISMATCH, OperationReturnValues_t} 364 * @li @sedmlconstant{LIBSEDML_VERSION_MISMATCH, OperationReturnValues_t} 365 * @li @sedmlconstant{LIBSEDML_PKG_VERSION_MISMATCH, OperationReturnValues_t} 366 * @li @sedmlconstant{LIBSEDML_DUPLICATE_OBJECT_ID, OperationReturnValues_t} 367 * 368 * @copydetails doc_note_object_is_copied 369 * 370 * @see createAlgorithmParameter() 371 * @see getAlgorithmParameter(const std::string& sid) 372 * @see getAlgorithmParameter(unsigned int n) 373 * @see getNumAlgorithmParameters() 374 * @see removeAlgorithmParameter(const std::string& sid) 375 * @see removeAlgorithmParameter(unsigned int n) 376 */ 377 int addAlgorithmParameter(const SedAlgorithmParameter* sap); 378 379 380 /** 381 * Get the number of SedAlgorithmParameter objects in this SedDocument. 382 * 383 * @return the number of SedAlgorithmParameter objects in this SedDocument. 384 * 385 * @see addAlgorithmParameter(const SedAlgorithmParameter* object) 386 * @see createAlgorithmParameter() 387 * @see getAlgorithmParameter(const std::string& sid) 388 * @see getAlgorithmParameter(unsigned int n) 389 * @see removeAlgorithmParameter(const std::string& sid) 390 * @see removeAlgorithmParameter(unsigned int n) 391 */ 392 unsigned int getNumAlgorithmParameters() const; 393 394 395 /** 396 * Creates a new SedAlgorithmParameter object, adds it to this SedDocument 397 * object and returns the SedAlgorithmParameter object created. 398 * 399 * @return a new SedAlgorithmParameter object instance. 400 * 401 * @copydetails doc_returned_unowned_pointer 402 * 403 * @see addAlgorithmParameter(const SedAlgorithmParameter* object) 404 * @see getAlgorithmParameter(const std::string& sid) 405 * @see getAlgorithmParameter(unsigned int n) 406 * @see getNumAlgorithmParameters() 407 * @see removeAlgorithmParameter(const std::string& sid) 408 * @see removeAlgorithmParameter(unsigned int n) 409 */ 410 SedAlgorithmParameter* createAlgorithmParameter(); 411 412 413 /** 414 * Removes the nth SedAlgorithmParameter from this SedDocument and returns a 415 * pointer to it. 416 * 417 * @param n an unsigned int representing the index of the 418 * SedAlgorithmParameter to remove. 419 * 420 * @return a pointer to the nth SedAlgorithmParameter in this SedDocument. 421 * 422 * @copydetails doc_warning_returns_owned_pointer 423 * 424 * @see addAlgorithmParameter(const SedAlgorithmParameter* object) 425 * @see createAlgorithmParameter() 426 * @see getAlgorithmParameter(const std::string& sid) 427 * @see getAlgorithmParameter(unsigned int n) 428 * @see getNumAlgorithmParameters() 429 * @see removeAlgorithmParameter(const std::string& sid) 430 */ 431 SedAlgorithmParameter* removeAlgorithmParameter(unsigned int n); 432 433 434 /** 435 * Removes the SedAlgorithmParameter with the given id from this SedAlgorithm and returns a 436 * pointer to it. 437 * 438 * @param id a string representing the id of the 439 * SedAlgorithmParameter to remove. 440 * 441 * @return a pointer to the nth SedAlgorithmParameter in this SedAlgorithm. 442 * 443 * @copydetails doc_warning_returns_owned_pointer 444 * 445 * @see addAlgorithmParameter(const SedAlgorithmParameter* object) 446 * @see createAlgorithmParameter() 447 * @see getAlgorithmParameter(const std::string& sid) 448 * @see getAlgorithmParameter(unsigned int n) 449 * @see getNumAlgorithmParameters() 450 * @see removeAlgorithmParameter(const std::string& sid) 451 */ 452 SedAlgorithmParameter* removeAlgorithmParameter(const std::string& id); 453 454 455 /** 456 * Returns the SedListOfDataDescriptions from this SedDocument. 457 * 458 * @return the SedListOfDataDescriptions from this SedDocument. 459 * 460 * @copydetails doc_returned_unowned_pointer 461 * 462 * @see addDataDescription(const SedDataDescription* object) 463 * @see createDataDescription() 464 * @see getDataDescription(const std::string& sid) 465 * @see getDataDescription(unsigned int n) 466 * @see getNumDataDescriptions() 467 * @see removeDataDescription(const std::string& sid) 468 * @see removeDataDescription(unsigned int n) 469 */ 470 const SedListOfDataDescriptions* getListOfDataDescriptions() const; 471 472 473 /** 474 * Returns the SedListOfDataDescriptions from this SedDocument. 475 * 476 * @return the SedListOfDataDescriptions from this SedDocument. 477 * 478 * @copydetails doc_returned_unowned_pointer 479 * 480 * @see addDataDescription(const SedDataDescription* object) 481 * @see createDataDescription() 482 * @see getDataDescription(const std::string& sid) 483 * @see getDataDescription(unsigned int n) 484 * @see getNumDataDescriptions() 485 * @see removeDataDescription(const std::string& sid) 486 * @see removeDataDescription(unsigned int n) 487 */ 488 SedListOfDataDescriptions* getListOfDataDescriptions(); 489 490 491 /** 492 * Get a SedDataDescription from the SedDocument. 493 * 494 * @param n an unsigned int representing the index of the SedDataDescription 495 * to retrieve. 496 * 497 * @return the nth SedDataDescription in the SedListOfDataDescriptions within 498 * this SedDocument or @c NULL if no such object exists. 499 * 500 * @copydetails doc_returned_unowned_pointer 501 * 502 * @see addDataDescription(const SedDataDescription* object) 503 * @see createDataDescription() 504 * @see getDataDescription(const std::string& sid) 505 * @see getNumDataDescriptions() 506 * @see removeDataDescription(const std::string& sid) 507 * @see removeDataDescription(unsigned int n) 508 */ 509 SedDataDescription* getDataDescription(unsigned int n); 510 511 512 /** 513 * Get a SedDataDescription from the SedDocument. 514 * 515 * @param n an unsigned int representing the index of the SedDataDescription 516 * to retrieve. 517 * 518 * @return the nth SedDataDescription in the SedListOfDataDescriptions within 519 * this SedDocument or @c NULL if no such object exists. 520 * 521 * @copydetails doc_returned_unowned_pointer 522 * 523 * @see addDataDescription(const SedDataDescription* object) 524 * @see createDataDescription() 525 * @see getDataDescription(const std::string& sid) 526 * @see getNumDataDescriptions() 527 * @see removeDataDescription(const std::string& sid) 528 * @see removeDataDescription(unsigned int n) 529 */ 530 const SedDataDescription* getDataDescription(unsigned int n) const; 531 532 533 /** 534 * Get a SedDataDescription from the SedDocument based on its identifier. 535 * 536 * @param sid a string representing the identifier of the SedDataDescription 537 * to retrieve. 538 * 539 * @return the SedDataDescription in the SedListOfDataDescriptions within 540 * this SedDocument with the given @p sid or @c NULL if no such 541 * SedDataDescription exists. 542 * 543 * @copydetails doc_returned_unowned_pointer 544 * 545 * @see addDataDescription(const SedDataDescription* object) 546 * @see createDataDescription() 547 * @see getDataDescription(unsigned int n) 548 * @see getNumDataDescriptions() 549 * @see removeDataDescription(const std::string& sid) 550 * @see removeDataDescription(unsigned int n) 551 */ 552 SedDataDescription* getDataDescription(const std::string& sid); 553 554 555 /** 556 * Get a SedDataDescription from the SedDocument based on its identifier. 557 * 558 * @param sid a string representing the identifier of the SedDataDescription 559 * to retrieve. 560 * 561 * @return the SedDataDescription in the SedListOfDataDescriptions within 562 * this SedDocument with the given @p sid or @c NULL if no such 563 * SedDataDescription exists. 564 * 565 * @copydetails doc_returned_unowned_pointer 566 * 567 * @see addDataDescription(const SedDataDescription* object) 568 * @see createDataDescription() 569 * @see getDataDescription(unsigned int n) 570 * @see getNumDataDescriptions() 571 * @see removeDataDescription(const std::string& sid) 572 * @see removeDataDescription(unsigned int n) 573 */ 574 const SedDataDescription* getDataDescription(const std::string& sid) const; 575 576 577 /** 578 * Adds a copy of the given SedDataDescription to this SedDocument. 579 * 580 * @param sdd the SedDataDescription object to add. 581 * 582 * @copydetails doc_returns_success_code 583 * @li @sedmlconstant{LIBSEDML_OPERATION_SUCCESS, OperationReturnValues_t} 584 * @li @sedmlconstant{LIBSEDML_OPERATION_FAILED, OperationReturnValues_t} 585 * @li @sedmlconstant{LIBSEDML_INVALID_OBJECT, OperationReturnValues_t} 586 * @li @sedmlconstant{LIBSEDML_LEVEL_MISMATCH, OperationReturnValues_t} 587 * @li @sedmlconstant{LIBSEDML_VERSION_MISMATCH, OperationReturnValues_t} 588 * @li @sedmlconstant{LIBSEDML_PKG_VERSION_MISMATCH, OperationReturnValues_t} 589 * @li @sedmlconstant{LIBSEDML_DUPLICATE_OBJECT_ID, OperationReturnValues_t} 590 * 591 * @copydetails doc_note_object_is_copied 592 * 593 * @see createDataDescription() 594 * @see getDataDescription(const std::string& sid) 595 * @see getDataDescription(unsigned int n) 596 * @see getNumDataDescriptions() 597 * @see removeDataDescription(const std::string& sid) 598 * @see removeDataDescription(unsigned int n) 599 */ 600 int addDataDescription(const SedDataDescription* sdd); 601 602 603 /** 604 * Get the number of SedDataDescription objects in this SedDocument. 605 * 606 * @return the number of SedDataDescription objects in this SedDocument. 607 * 608 * @see addDataDescription(const SedDataDescription* object) 609 * @see createDataDescription() 610 * @see getDataDescription(const std::string& sid) 611 * @see getDataDescription(unsigned int n) 612 * @see removeDataDescription(const std::string& sid) 613 * @see removeDataDescription(unsigned int n) 614 */ 615 unsigned int getNumDataDescriptions() const; 616 617 618 /** 619 * Creates a new SedDataDescription object, adds it to this SedDocument 620 * object and returns the SedDataDescription object created. 621 * 622 * @return a new SedDataDescription object instance. 623 * 624 * @copydetails doc_returned_unowned_pointer 625 * 626 * @see addDataDescription(const SedDataDescription* object) 627 * @see getDataDescription(const std::string& sid) 628 * @see getDataDescription(unsigned int n) 629 * @see getNumDataDescriptions() 630 * @see removeDataDescription(const std::string& sid) 631 * @see removeDataDescription(unsigned int n) 632 */ 633 SedDataDescription* createDataDescription(); 634 635 636 /** 637 * Removes the nth SedDataDescription from this SedDocument and returns a 638 * pointer to it. 639 * 640 * @param n an unsigned int representing the index of the SedDataDescription 641 * to remove. 642 * 643 * @return a pointer to the nth SedDataDescription in this SedDocument. 644 * 645 * @copydetails doc_warning_returns_owned_pointer 646 * 647 * @see addDataDescription(const SedDataDescription* object) 648 * @see createDataDescription() 649 * @see getDataDescription(const std::string& sid) 650 * @see getDataDescription(unsigned int n) 651 * @see getNumDataDescriptions() 652 * @see removeDataDescription(const std::string& sid) 653 */ 654 SedDataDescription* removeDataDescription(unsigned int n); 655 656 657 /** 658 * Removes the SedDataDescription from this SedDocument based on its 659 * identifier and returns a pointer to it. 660 * 661 * @param sid a string representing the identifier of the SedDataDescription 662 * to remove. 663 * 664 * @return the SedDataDescription in this SedDocument based on the identifier 665 * or NULL if no such SedDataDescription exists. 666 * 667 * @copydetails doc_warning_returns_owned_pointer 668 * 669 * @see addDataDescription(const SedDataDescription* object) 670 * @see createDataDescription() 671 * @see getDataDescription(const std::string& sid) 672 * @see getDataDescription(unsigned int n) 673 * @see getNumDataDescriptions() 674 * @see removeDataDescription(unsigned int n) 675 */ 676 SedDataDescription* removeDataDescription(const std::string& sid); 677 678 679 /** 680 * Returns the SedListOfModels from this SedDocument. 681 * 682 * @return the SedListOfModels from this SedDocument. 683 * 684 * @copydetails doc_returned_unowned_pointer 685 * 686 * @see addModel(const SedModel* object) 687 * @see createModel() 688 * @see getModel(const std::string& sid) 689 * @see getModel(unsigned int n) 690 * @see getNumModels() 691 * @see removeModel(const std::string& sid) 692 * @see removeModel(unsigned int n) 693 */ 694 const SedListOfModels* getListOfModels() const; 695 696 697 /** 698 * Returns the SedListOfModels from this SedDocument. 699 * 700 * @return the SedListOfModels from this SedDocument. 701 * 702 * @copydetails doc_returned_unowned_pointer 703 * 704 * @see addModel(const SedModel* object) 705 * @see createModel() 706 * @see getModel(const std::string& sid) 707 * @see getModel(unsigned int n) 708 * @see getNumModels() 709 * @see removeModel(const std::string& sid) 710 * @see removeModel(unsigned int n) 711 */ 712 SedListOfModels* getListOfModels(); 713 714 715 /** 716 * Get a SedModel from the SedDocument. 717 * 718 * @param n an unsigned int representing the index of the SedModel to 719 * retrieve. 720 * 721 * @return the nth SedModel in the SedListOfModels within this SedDocument or 722 * @c NULL if no such object exists. 723 * 724 * @copydetails doc_returned_unowned_pointer 725 * 726 * @see addModel(const SedModel* object) 727 * @see createModel() 728 * @see getModel(const std::string& sid) 729 * @see getNumModels() 730 * @see removeModel(const std::string& sid) 731 * @see removeModel(unsigned int n) 732 */ 733 SedModel* getModel(unsigned int n); 734 735 736 /** 737 * Get a SedModel from the SedDocument. 738 * 739 * @param n an unsigned int representing the index of the SedModel to 740 * retrieve. 741 * 742 * @return the nth SedModel in the SedListOfModels within this SedDocument or 743 * @c NULL if no such object exists. 744 * 745 * @copydetails doc_returned_unowned_pointer 746 * 747 * @see addModel(const SedModel* object) 748 * @see createModel() 749 * @see getModel(const std::string& sid) 750 * @see getNumModels() 751 * @see removeModel(const std::string& sid) 752 * @see removeModel(unsigned int n) 753 */ 754 const SedModel* getModel(unsigned int n) const; 755 756 757 /** 758 * Get a SedModel from the SedDocument based on its identifier. 759 * 760 * @param sid a string representing the identifier of the SedModel to 761 * retrieve. 762 * 763 * @return the SedModel in the SedListOfModels within this SedDocument with 764 * the given @p sid or @c NULL if no such SedModel exists. 765 * 766 * @copydetails doc_returned_unowned_pointer 767 * 768 * @see addModel(const SedModel* object) 769 * @see createModel() 770 * @see getModel(unsigned int n) 771 * @see getNumModels() 772 * @see removeModel(const std::string& sid) 773 * @see removeModel(unsigned int n) 774 */ 775 SedModel* getModel(const std::string& sid); 776 777 778 /** 779 * Get a SedModel from the SedDocument based on its identifier. 780 * 781 * @param sid a string representing the identifier of the SedModel to 782 * retrieve. 783 * 784 * @return the SedModel in the SedListOfModels within this SedDocument with 785 * the given @p sid or @c NULL if no such SedModel exists. 786 * 787 * @copydetails doc_returned_unowned_pointer 788 * 789 * @see addModel(const SedModel* object) 790 * @see createModel() 791 * @see getModel(unsigned int n) 792 * @see getNumModels() 793 * @see removeModel(const std::string& sid) 794 * @see removeModel(unsigned int n) 795 */ 796 const SedModel* getModel(const std::string& sid) const; 797 798 799 /** 800 * Adds a copy of the given SedModel to this SedDocument. 801 * 802 * @param sm the SedModel object to add. 803 * 804 * @copydetails doc_returns_success_code 805 * @li @sedmlconstant{LIBSEDML_OPERATION_SUCCESS, OperationReturnValues_t} 806 * @li @sedmlconstant{LIBSEDML_OPERATION_FAILED, OperationReturnValues_t} 807 * @li @sedmlconstant{LIBSEDML_INVALID_OBJECT, OperationReturnValues_t} 808 * @li @sedmlconstant{LIBSEDML_LEVEL_MISMATCH, OperationReturnValues_t} 809 * @li @sedmlconstant{LIBSEDML_VERSION_MISMATCH, OperationReturnValues_t} 810 * @li @sedmlconstant{LIBSEDML_PKG_VERSION_MISMATCH, OperationReturnValues_t} 811 * @li @sedmlconstant{LIBSEDML_DUPLICATE_OBJECT_ID, OperationReturnValues_t} 812 * 813 * @copydetails doc_note_object_is_copied 814 * 815 * @see createModel() 816 * @see getModel(const std::string& sid) 817 * @see getModel(unsigned int n) 818 * @see getNumModels() 819 * @see removeModel(const std::string& sid) 820 * @see removeModel(unsigned int n) 821 */ 822 int addModel(const SedModel* sm); 823 824 825 /** 826 * Get the number of SedModel objects in this SedDocument. 827 * 828 * @return the number of SedModel objects in this SedDocument. 829 * 830 * @see addModel(const SedModel* object) 831 * @see createModel() 832 * @see getModel(const std::string& sid) 833 * @see getModel(unsigned int n) 834 * @see removeModel(const std::string& sid) 835 * @see removeModel(unsigned int n) 836 */ 837 unsigned int getNumModels() const; 838 839 840 /** 841 * Creates a new SedModel object, adds it to this SedDocument object and 842 * returns the SedModel object created. 843 * 844 * @return a new SedModel object instance. 845 * 846 * @copydetails doc_returned_unowned_pointer 847 * 848 * @see addModel(const SedModel* object) 849 * @see getModel(const std::string& sid) 850 * @see getModel(unsigned int n) 851 * @see getNumModels() 852 * @see removeModel(const std::string& sid) 853 * @see removeModel(unsigned int n) 854 */ 855 SedModel* createModel(); 856 857 858 /** 859 * Removes the nth SedModel from this SedDocument and returns a pointer to 860 * it. 861 * 862 * @param n an unsigned int representing the index of the SedModel to remove. 863 * 864 * @return a pointer to the nth SedModel in this SedDocument. 865 * 866 * @copydetails doc_warning_returns_owned_pointer 867 * 868 * @see addModel(const SedModel* object) 869 * @see createModel() 870 * @see getModel(const std::string& sid) 871 * @see getModel(unsigned int n) 872 * @see getNumModels() 873 * @see removeModel(const std::string& sid) 874 */ 875 SedModel* removeModel(unsigned int n); 876 877 878 /** 879 * Removes the SedModel from this SedDocument based on its identifier and 880 * returns a pointer to it. 881 * 882 * @param sid a string representing the identifier of the SedModel to remove. 883 * 884 * @return the SedModel in this SedDocument based on the identifier or NULL 885 * if no such SedModel exists. 886 * 887 * @copydetails doc_warning_returns_owned_pointer 888 * 889 * @see addModel(const SedModel* object) 890 * @see createModel() 891 * @see getModel(const std::string& sid) 892 * @see getModel(unsigned int n) 893 * @see getNumModels() 894 * @see removeModel(unsigned int n) 895 */ 896 SedModel* removeModel(const std::string& sid); 897 898 899 /** 900 * Returns the SedListOfSimulations from this SedDocument. 901 * 902 * @return the SedListOfSimulations from this SedDocument. 903 * 904 * @copydetails doc_returned_unowned_pointer 905 * 906 * @see addSimulation(const SedSimulation* object) 907 * @see createSimulation() 908 * @see getSimulation(const std::string& sid) 909 * @see getSimulation(unsigned int n) 910 * @see getNumSimulations() 911 * @see removeSimulation(const std::string& sid) 912 * @see removeSimulation(unsigned int n) 913 */ 914 const SedListOfSimulations* getListOfSimulations() const; 915 916 917 /** 918 * Returns the SedListOfSimulations from this SedDocument. 919 * 920 * @return the SedListOfSimulations from this SedDocument. 921 * 922 * @copydetails doc_returned_unowned_pointer 923 * 924 * @see addSimulation(const SedSimulation* object) 925 * @see createSimulation() 926 * @see getSimulation(const std::string& sid) 927 * @see getSimulation(unsigned int n) 928 * @see getNumSimulations() 929 * @see removeSimulation(const std::string& sid) 930 * @see removeSimulation(unsigned int n) 931 */ 932 SedListOfSimulations* getListOfSimulations(); 933 934 935 /** 936 * Get a SedSimulation from the SedDocument. 937 * 938 * @param n an unsigned int representing the index of the SedSimulation to 939 * retrieve. 940 * 941 * @return the nth SedSimulation in the SedListOfSimulations within this 942 * SedDocument or @c NULL if no such object exists. 943 * 944 * @copydetails doc_returned_unowned_pointer 945 * 946 * @see addSimulation(const SedSimulation* object) 947 * @see createSimulation() 948 * @see getSimulation(const std::string& sid) 949 * @see getNumSimulations() 950 * @see removeSimulation(const std::string& sid) 951 * @see removeSimulation(unsigned int n) 952 */ 953 SedSimulation* getSimulation(unsigned int n); 954 955 956 /** 957 * Get a SedSimulation from the SedDocument. 958 * 959 * @param n an unsigned int representing the index of the SedSimulation to 960 * retrieve. 961 * 962 * @return the nth SedSimulation in the SedListOfSimulations within this 963 * SedDocument or @c NULL if no such object exists. 964 * 965 * @copydetails doc_returned_unowned_pointer 966 * 967 * @see addSimulation(const SedSimulation* object) 968 * @see createSimulation() 969 * @see getSimulation(const std::string& sid) 970 * @see getNumSimulations() 971 * @see removeSimulation(const std::string& sid) 972 * @see removeSimulation(unsigned int n) 973 */ 974 const SedSimulation* getSimulation(unsigned int n) const; 975 976 977 /** 978 * Get a SedSimulation from the SedDocument based on its identifier. 979 * 980 * @param sid a string representing the identifier of the SedSimulation to 981 * retrieve. 982 * 983 * @return the SedSimulation in the SedListOfSimulations within this 984 * SedDocument with the given @p sid or @c NULL if no such SedSimulation 985 * exists. 986 * 987 * @copydetails doc_returned_unowned_pointer 988 * 989 * @see addSimulation(const SedSimulation* object) 990 * @see createSimulation() 991 * @see getSimulation(unsigned int n) 992 * @see getNumSimulations() 993 * @see removeSimulation(const std::string& sid) 994 * @see removeSimulation(unsigned int n) 995 */ 996 SedSimulation* getSimulation(const std::string& sid); 997 998 999 /** 1000 * Get a SedSimulation from the SedDocument based on its identifier. 1001 * 1002 * @param sid a string representing the identifier of the SedSimulation to 1003 * retrieve. 1004 * 1005 * @return the SedSimulation in the SedListOfSimulations within this 1006 * SedDocument with the given @p sid or @c NULL if no such SedSimulation 1007 * exists. 1008 * 1009 * @copydetails doc_returned_unowned_pointer 1010 * 1011 * @see addSimulation(const SedSimulation* object) 1012 * @see createSimulation() 1013 * @see getSimulation(unsigned int n) 1014 * @see getNumSimulations() 1015 * @see removeSimulation(const std::string& sid) 1016 * @see removeSimulation(unsigned int n) 1017 */ 1018 const SedSimulation* getSimulation(const std::string& sid) const; 1019 1020 1021 /** 1022 * Adds a copy of the given SedSimulation to this SedDocument. 1023 * 1024 * @param ss the SedSimulation object to add. 1025 * 1026 * @copydetails doc_returns_success_code 1027 * @li @sedmlconstant{LIBSEDML_OPERATION_SUCCESS, OperationReturnValues_t} 1028 * @li @sedmlconstant{LIBSEDML_OPERATION_FAILED, OperationReturnValues_t} 1029 * @li @sedmlconstant{LIBSEDML_INVALID_OBJECT, OperationReturnValues_t} 1030 * @li @sedmlconstant{LIBSEDML_LEVEL_MISMATCH, OperationReturnValues_t} 1031 * @li @sedmlconstant{LIBSEDML_VERSION_MISMATCH, OperationReturnValues_t} 1032 * @li @sedmlconstant{LIBSEDML_PKG_VERSION_MISMATCH, OperationReturnValues_t} 1033 * @li @sedmlconstant{LIBSEDML_DUPLICATE_OBJECT_ID, OperationReturnValues_t} 1034 * 1035 * @copydetails doc_note_object_is_copied 1036 * 1037 * @see createSimulation() 1038 * @see getSimulation(const std::string& sid) 1039 * @see getSimulation(unsigned int n) 1040 * @see getNumSimulations() 1041 * @see removeSimulation(const std::string& sid) 1042 * @see removeSimulation(unsigned int n) 1043 */ 1044 int addSimulation(const SedSimulation* ss); 1045 1046 1047 /** 1048 * Get the number of SedSimulation objects in this SedDocument. 1049 * 1050 * @return the number of SedSimulation objects in this SedDocument. 1051 * 1052 * @see addSimulation(const SedSimulation* object) 1053 * @see createSimulation() 1054 * @see getSimulation(const std::string& sid) 1055 * @see getSimulation(unsigned int n) 1056 * @see removeSimulation(const std::string& sid) 1057 * @see removeSimulation(unsigned int n) 1058 */ 1059 unsigned int getNumSimulations() const; 1060 1061 1062 /** 1063 * Creates a new SedUniformTimeCourse object, adds it to this SedDocument 1064 * object and returns the SedUniformTimeCourse object created. 1065 * 1066 * @return a new SedUniformTimeCourse object instance. 1067 * 1068 * @copydetails doc_returned_unowned_pointer 1069 * 1070 * @see addSimulation(const SedSimulation* object) 1071 * @see getSimulation(const std::string& sid) 1072 * @see getSimulation(unsigned int n) 1073 * @see getNumSimulations() 1074 * @see removeSimulation(const std::string& sid) 1075 * @see removeSimulation(unsigned int n) 1076 */ 1077 SedUniformTimeCourse* createUniformTimeCourse(); 1078 1079 1080 /** 1081 * Creates a new SedOneStep object, adds it to this SedDocument object and 1082 * returns the SedOneStep object created. 1083 * 1084 * @return a new SedOneStep object instance. 1085 * 1086 * @copydetails doc_returned_unowned_pointer 1087 * 1088 * @see addSimulation(const SedSimulation* object) 1089 * @see getSimulation(const std::string& sid) 1090 * @see getSimulation(unsigned int n) 1091 * @see getNumSimulations() 1092 * @see removeSimulation(const std::string& sid) 1093 * @see removeSimulation(unsigned int n) 1094 */ 1095 SedOneStep* createOneStep(); 1096 1097 1098 /** 1099 * Creates a new SedSteadyState object, adds it to this SedDocument object 1100 * and returns the SedSteadyState object created. 1101 * 1102 * @return a new SedSteadyState object instance. 1103 * 1104 * @copydetails doc_returned_unowned_pointer 1105 * 1106 * @see addSimulation(const SedSimulation* object) 1107 * @see getSimulation(const std::string& sid) 1108 * @see getSimulation(unsigned int n) 1109 * @see getNumSimulations() 1110 * @see removeSimulation(const std::string& sid) 1111 * @see removeSimulation(unsigned int n) 1112 */ 1113 SedSteadyState* createSteadyState(); 1114 1115 1116 /** 1117 * Creates a new SedAnalysis object, adds it to this SedDocument object 1118 * and returns the SedAnalysis object created. 1119 * 1120 * @return a new SedAnalysis object instance. 1121 * 1122 * @copydetails doc_returned_unowned_pointer 1123 * 1124 * @see addSimulation(const SedSimulation* object) 1125 * @see getSimulation(const std::string& sid) 1126 * @see getSimulation(unsigned int n) 1127 * @see getNumSimulations() 1128 * @see removeSimulation(const std::string& sid) 1129 * @see removeSimulation(unsigned int n) 1130 */ 1131 SedAnalysis* createAnalysis(); 1132 1133 1134 /** 1135 * Removes the nth SedSimulation from this SedDocument and returns a pointer 1136 * to it. 1137 * 1138 * @param n an unsigned int representing the index of the SedSimulation to 1139 * remove. 1140 * 1141 * @return a pointer to the nth SedSimulation in this SedDocument. 1142 * 1143 * @copydetails doc_warning_returns_owned_pointer 1144 * 1145 * @see addSimulation(const SedSimulation* object) 1146 * @see createSimulation() 1147 * @see getSimulation(const std::string& sid) 1148 * @see getSimulation(unsigned int n) 1149 * @see getNumSimulations() 1150 * @see removeSimulation(const std::string& sid) 1151 */ 1152 SedSimulation* removeSimulation(unsigned int n); 1153 1154 1155 /** 1156 * Removes the SedSimulation from this SedDocument based on its identifier 1157 * and returns a pointer to it. 1158 * 1159 * @param sid a string representing the identifier of the SedSimulation to 1160 * remove. 1161 * 1162 * @return the SedSimulation in this SedDocument based on the identifier or 1163 * NULL if no such SedSimulation exists. 1164 * 1165 * @copydetails doc_warning_returns_owned_pointer 1166 * 1167 * @see addSimulation(const SedSimulation* object) 1168 * @see createSimulation() 1169 * @see getSimulation(const std::string& sid) 1170 * @see getSimulation(unsigned int n) 1171 * @see getNumSimulations() 1172 * @see removeSimulation(unsigned int n) 1173 */ 1174 SedSimulation* removeSimulation(const std::string& sid); 1175 1176 1177 /** 1178 * Returns the SedListOfTasks from this SedDocument. 1179 * 1180 * @return the SedListOfTasks from this SedDocument. 1181 * 1182 * @copydetails doc_returned_unowned_pointer 1183 * 1184 * @see addTask(const SedAbstractTask* object) 1185 * @see createTask() 1186 * @see getTask(const std::string& sid) 1187 * @see getTask(unsigned int n) 1188 * @see getNumTasks() 1189 * @see removeTask(const std::string& sid) 1190 * @see removeTask(unsigned int n) 1191 */ 1192 const SedListOfTasks* getListOfTasks() const; 1193 1194 1195 /** 1196 * Returns the SedListOfTasks from this SedDocument. 1197 * 1198 * @return the SedListOfTasks from this SedDocument. 1199 * 1200 * @copydetails doc_returned_unowned_pointer 1201 * 1202 * @see addTask(const SedAbstractTask* object) 1203 * @see createTask() 1204 * @see getTask(const std::string& sid) 1205 * @see getTask(unsigned int n) 1206 * @see getNumTasks() 1207 * @see removeTask(const std::string& sid) 1208 * @see removeTask(unsigned int n) 1209 */ 1210 SedListOfTasks* getListOfTasks(); 1211 1212 1213 /** 1214 * Get a SedAbstractTask from the SedDocument. 1215 * 1216 * @param n an unsigned int representing the index of the SedAbstractTask to 1217 * retrieve. 1218 * 1219 * @return the nth SedAbstractTask in the SedListOfTasks within this 1220 * SedDocument or @c NULL if no such object exists. 1221 * 1222 * @copydetails doc_returned_unowned_pointer 1223 * 1224 * @see addTask(const SedAbstractTask* object) 1225 * @see createTask() 1226 * @see getTask(const std::string& sid) 1227 * @see getNumTasks() 1228 * @see removeTask(const std::string& sid) 1229 * @see removeTask(unsigned int n) 1230 */ 1231 SedAbstractTask* getTask(unsigned int n); 1232 1233 1234 /** 1235 * Get a SedAbstractTask from the SedDocument. 1236 * 1237 * @param n an unsigned int representing the index of the SedAbstractTask to 1238 * retrieve. 1239 * 1240 * @return the nth SedAbstractTask in the SedListOfTasks within this 1241 * SedDocument or @c NULL if no such object exists. 1242 * 1243 * @copydetails doc_returned_unowned_pointer 1244 * 1245 * @see addTask(const SedAbstractTask* object) 1246 * @see createTask() 1247 * @see getTask(const std::string& sid) 1248 * @see getNumTasks() 1249 * @see removeTask(const std::string& sid) 1250 * @see removeTask(unsigned int n) 1251 */ 1252 const SedAbstractTask* getTask(unsigned int n) const; 1253 1254 1255 /** 1256 * Get a SedAbstractTask from the SedDocument based on its identifier. 1257 * 1258 * @param sid a string representing the identifier of the SedAbstractTask to 1259 * retrieve. 1260 * 1261 * @return the SedAbstractTask in the SedListOfTasks within this SedDocument 1262 * with the given @p sid or @c NULL if no such SedAbstractTask exists. 1263 * 1264 * @copydetails doc_returned_unowned_pointer 1265 * 1266 * @see addTask(const SedAbstractTask* object) 1267 * @see createTask() 1268 * @see getTask(unsigned int n) 1269 * @see getNumTasks() 1270 * @see removeTask(const std::string& sid) 1271 * @see removeTask(unsigned int n) 1272 */ 1273 SedAbstractTask* getTask(const std::string& sid); 1274 1275 1276 /** 1277 * Get a SedAbstractTask from the SedDocument based on its identifier. 1278 * 1279 * @param sid a string representing the identifier of the SedAbstractTask to 1280 * retrieve. 1281 * 1282 * @return the SedAbstractTask in the SedListOfTasks within this SedDocument 1283 * with the given @p sid or @c NULL if no such SedAbstractTask exists. 1284 * 1285 * @copydetails doc_returned_unowned_pointer 1286 * 1287 * @see addTask(const SedAbstractTask* object) 1288 * @see createTask() 1289 * @see getTask(unsigned int n) 1290 * @see getNumTasks() 1291 * @see removeTask(const std::string& sid) 1292 * @see removeTask(unsigned int n) 1293 */ 1294 const SedAbstractTask* getTask(const std::string& sid) const; 1295 1296 1297 /** 1298 * Adds a copy of the given SedAbstractTask to this SedDocument. 1299 * 1300 * @param sat the SedAbstractTask object to add. 1301 * 1302 * @copydetails doc_returns_success_code 1303 * @li @sedmlconstant{LIBSEDML_OPERATION_SUCCESS, OperationReturnValues_t} 1304 * @li @sedmlconstant{LIBSEDML_OPERATION_FAILED, OperationReturnValues_t} 1305 * @li @sedmlconstant{LIBSEDML_INVALID_OBJECT, OperationReturnValues_t} 1306 * @li @sedmlconstant{LIBSEDML_LEVEL_MISMATCH, OperationReturnValues_t} 1307 * @li @sedmlconstant{LIBSEDML_VERSION_MISMATCH, OperationReturnValues_t} 1308 * @li @sedmlconstant{LIBSEDML_PKG_VERSION_MISMATCH, OperationReturnValues_t} 1309 * @li @sedmlconstant{LIBSEDML_DUPLICATE_OBJECT_ID, OperationReturnValues_t} 1310 * 1311 * @copydetails doc_note_object_is_copied 1312 * 1313 * @see createTask() 1314 * @see getTask(const std::string& sid) 1315 * @see getTask(unsigned int n) 1316 * @see getNumTasks() 1317 * @see removeTask(const std::string& sid) 1318 * @see removeTask(unsigned int n) 1319 */ 1320 int addTask(const SedAbstractTask* sat); 1321 1322 1323 /** 1324 * Get the number of SedAbstractTask objects in this SedDocument. 1325 * 1326 * @return the number of SedAbstractTask objects in this SedDocument. 1327 * 1328 * @see addTask(const SedAbstractTask* object) 1329 * @see createTask() 1330 * @see getTask(const std::string& sid) 1331 * @see getTask(unsigned int n) 1332 * @see removeTask(const std::string& sid) 1333 * @see removeTask(unsigned int n) 1334 */ 1335 unsigned int getNumTasks() const; 1336 1337 1338 /** 1339 * Creates a new SedTask object, adds it to this SedDocument object and 1340 * returns the SedTask object created. 1341 * 1342 * @return a new SedTask object instance. 1343 * 1344 * @copydetails doc_returned_unowned_pointer 1345 * 1346 * @see addTask(const SedAbstractTask* object) 1347 * @see getTask(const std::string& sid) 1348 * @see getTask(unsigned int n) 1349 * @see getNumTasks() 1350 * @see removeTask(const std::string& sid) 1351 * @see removeTask(unsigned int n) 1352 */ 1353 SedTask* createTask(); 1354 1355 1356 /** 1357 * Creates a new SedRepeatedTask object, adds it to this SedDocument object 1358 * and returns the SedRepeatedTask object created. 1359 * 1360 * @return a new SedRepeatedTask object instance. 1361 * 1362 * @copydetails doc_returned_unowned_pointer 1363 * 1364 * @see addTask(const SedAbstractTask* object) 1365 * @see getTask(const std::string& sid) 1366 * @see getTask(unsigned int n) 1367 * @see getNumTasks() 1368 * @see removeTask(const std::string& sid) 1369 * @see removeTask(unsigned int n) 1370 */ 1371 SedRepeatedTask* createRepeatedTask(); 1372 1373 1374 /** 1375 * Creates a new SedParameterEstimationTask object, adds it to this 1376 * SedDocument object and returns the SedParameterEstimationTask object 1377 * created. 1378 * 1379 * @return a new SedParameterEstimationTask object instance. 1380 * 1381 * @copydetails doc_returned_unowned_pointer 1382 * 1383 * @see addTask(const SedAbstractTask* object) 1384 * @see getTask(const std::string& sid) 1385 * @see getTask(unsigned int n) 1386 * @see getNumTasks() 1387 * @see removeTask(const std::string& sid) 1388 * @see removeTask(unsigned int n) 1389 */ 1390 SedParameterEstimationTask* createParameterEstimationTask(); 1391 1392 1393 /** 1394 * Removes the nth SedAbstractTask from this SedDocument and returns a 1395 * pointer to it. 1396 * 1397 * @param n an unsigned int representing the index of the SedAbstractTask to 1398 * remove. 1399 * 1400 * @return a pointer to the nth SedAbstractTask in this SedDocument. 1401 * 1402 * @copydetails doc_warning_returns_owned_pointer 1403 * 1404 * @see addTask(const SedAbstractTask* object) 1405 * @see createTask() 1406 * @see getTask(const std::string& sid) 1407 * @see getTask(unsigned int n) 1408 * @see getNumTasks() 1409 * @see removeTask(const std::string& sid) 1410 */ 1411 SedAbstractTask* removeTask(unsigned int n); 1412 1413 1414 /** 1415 * Removes the SedAbstractTask from this SedDocument based on its identifier 1416 * and returns a pointer to it. 1417 * 1418 * @param sid a string representing the identifier of the SedAbstractTask to 1419 * remove. 1420 * 1421 * @return the SedAbstractTask in this SedDocument based on the identifier or 1422 * NULL if no such SedAbstractTask exists. 1423 * 1424 * @copydetails doc_warning_returns_owned_pointer 1425 * 1426 * @see addTask(const SedAbstractTask* object) 1427 * @see createTask() 1428 * @see getTask(const std::string& sid) 1429 * @see getTask(unsigned int n) 1430 * @see getNumTasks() 1431 * @see removeTask(unsigned int n) 1432 */ 1433 SedAbstractTask* removeTask(const std::string& sid); 1434 1435 1436 /** 1437 * Returns the SedListOfDataGenerators from this SedDocument. 1438 * 1439 * @return the SedListOfDataGenerators from this SedDocument. 1440 * 1441 * @copydetails doc_returned_unowned_pointer 1442 * 1443 * @see addDataGenerator(const SedDataGenerator* object) 1444 * @see createDataGenerator() 1445 * @see getDataGenerator(const std::string& sid) 1446 * @see getDataGenerator(unsigned int n) 1447 * @see getNumDataGenerators() 1448 * @see removeDataGenerator(const std::string& sid) 1449 * @see removeDataGenerator(unsigned int n) 1450 */ 1451 const SedListOfDataGenerators* getListOfDataGenerators() const; 1452 1453 1454 /** 1455 * Returns the SedListOfDataGenerators from this SedDocument. 1456 * 1457 * @return the SedListOfDataGenerators from this SedDocument. 1458 * 1459 * @copydetails doc_returned_unowned_pointer 1460 * 1461 * @see addDataGenerator(const SedDataGenerator* object) 1462 * @see createDataGenerator() 1463 * @see getDataGenerator(const std::string& sid) 1464 * @see getDataGenerator(unsigned int n) 1465 * @see getNumDataGenerators() 1466 * @see removeDataGenerator(const std::string& sid) 1467 * @see removeDataGenerator(unsigned int n) 1468 */ 1469 SedListOfDataGenerators* getListOfDataGenerators(); 1470 1471 1472 /** 1473 * Get a SedDataGenerator from the SedDocument. 1474 * 1475 * @param n an unsigned int representing the index of the SedDataGenerator to 1476 * retrieve. 1477 * 1478 * @return the nth SedDataGenerator in the SedListOfDataGenerators within 1479 * this SedDocument or @c NULL if no such object exists. 1480 * 1481 * @copydetails doc_returned_unowned_pointer 1482 * 1483 * @see addDataGenerator(const SedDataGenerator* object) 1484 * @see createDataGenerator() 1485 * @see getDataGenerator(const std::string& sid) 1486 * @see getNumDataGenerators() 1487 * @see removeDataGenerator(const std::string& sid) 1488 * @see removeDataGenerator(unsigned int n) 1489 */ 1490 SedDataGenerator* getDataGenerator(unsigned int n); 1491 1492 1493 /** 1494 * Get a SedDataGenerator from the SedDocument. 1495 * 1496 * @param n an unsigned int representing the index of the SedDataGenerator to 1497 * retrieve. 1498 * 1499 * @return the nth SedDataGenerator in the SedListOfDataGenerators within 1500 * this SedDocument or @c NULL if no such object exists. 1501 * 1502 * @copydetails doc_returned_unowned_pointer 1503 * 1504 * @see addDataGenerator(const SedDataGenerator* object) 1505 * @see createDataGenerator() 1506 * @see getDataGenerator(const std::string& sid) 1507 * @see getNumDataGenerators() 1508 * @see removeDataGenerator(const std::string& sid) 1509 * @see removeDataGenerator(unsigned int n) 1510 */ 1511 const SedDataGenerator* getDataGenerator(unsigned int n) const; 1512 1513 1514 /** 1515 * Get a SedDataGenerator from the SedDocument based on its identifier. 1516 * 1517 * @param sid a string representing the identifier of the SedDataGenerator to 1518 * retrieve. 1519 * 1520 * @return the SedDataGenerator in the SedListOfDataGenerators within this 1521 * SedDocument with the given @p sid or @c NULL if no such SedDataGenerator 1522 * exists. 1523 * 1524 * @copydetails doc_returned_unowned_pointer 1525 * 1526 * @see addDataGenerator(const SedDataGenerator* object) 1527 * @see createDataGenerator() 1528 * @see getDataGenerator(unsigned int n) 1529 * @see getNumDataGenerators() 1530 * @see removeDataGenerator(const std::string& sid) 1531 * @see removeDataGenerator(unsigned int n) 1532 */ 1533 SedDataGenerator* getDataGenerator(const std::string& sid); 1534 1535 1536 /** 1537 * Get a SedDataGenerator from the SedDocument based on its identifier. 1538 * 1539 * @param sid a string representing the identifier of the SedDataGenerator to 1540 * retrieve. 1541 * 1542 * @return the SedDataGenerator in the SedListOfDataGenerators within this 1543 * SedDocument with the given @p sid or @c NULL if no such SedDataGenerator 1544 * exists. 1545 * 1546 * @copydetails doc_returned_unowned_pointer 1547 * 1548 * @see addDataGenerator(const SedDataGenerator* object) 1549 * @see createDataGenerator() 1550 * @see getDataGenerator(unsigned int n) 1551 * @see getNumDataGenerators() 1552 * @see removeDataGenerator(const std::string& sid) 1553 * @see removeDataGenerator(unsigned int n) 1554 */ 1555 const SedDataGenerator* getDataGenerator(const std::string& sid) const; 1556 1557 1558 /** 1559 * Adds a copy of the given SedDataGenerator to this SedDocument. 1560 * 1561 * @param sdg the SedDataGenerator object to add. 1562 * 1563 * @copydetails doc_returns_success_code 1564 * @li @sedmlconstant{LIBSEDML_OPERATION_SUCCESS, OperationReturnValues_t} 1565 * @li @sedmlconstant{LIBSEDML_OPERATION_FAILED, OperationReturnValues_t} 1566 * @li @sedmlconstant{LIBSEDML_INVALID_OBJECT, OperationReturnValues_t} 1567 * @li @sedmlconstant{LIBSEDML_LEVEL_MISMATCH, OperationReturnValues_t} 1568 * @li @sedmlconstant{LIBSEDML_VERSION_MISMATCH, OperationReturnValues_t} 1569 * @li @sedmlconstant{LIBSEDML_PKG_VERSION_MISMATCH, OperationReturnValues_t} 1570 * @li @sedmlconstant{LIBSEDML_DUPLICATE_OBJECT_ID, OperationReturnValues_t} 1571 * 1572 * @copydetails doc_note_object_is_copied 1573 * 1574 * @see createDataGenerator() 1575 * @see getDataGenerator(const std::string& sid) 1576 * @see getDataGenerator(unsigned int n) 1577 * @see getNumDataGenerators() 1578 * @see removeDataGenerator(const std::string& sid) 1579 * @see removeDataGenerator(unsigned int n) 1580 */ 1581 int addDataGenerator(const SedDataGenerator* sdg); 1582 1583 1584 /** 1585 * Get the number of SedDataGenerator objects in this SedDocument. 1586 * 1587 * @return the number of SedDataGenerator objects in this SedDocument. 1588 * 1589 * @see addDataGenerator(const SedDataGenerator* object) 1590 * @see createDataGenerator() 1591 * @see getDataGenerator(const std::string& sid) 1592 * @see getDataGenerator(unsigned int n) 1593 * @see removeDataGenerator(const std::string& sid) 1594 * @see removeDataGenerator(unsigned int n) 1595 */ 1596 unsigned int getNumDataGenerators() const; 1597 1598 1599 /** 1600 * Creates a new SedDataGenerator object, adds it to this SedDocument object 1601 * and returns the SedDataGenerator object created. 1602 * 1603 * @return a new SedDataGenerator object instance. 1604 * 1605 * @copydetails doc_returned_unowned_pointer 1606 * 1607 * @see addDataGenerator(const SedDataGenerator* object) 1608 * @see getDataGenerator(const std::string& sid) 1609 * @see getDataGenerator(unsigned int n) 1610 * @see getNumDataGenerators() 1611 * @see removeDataGenerator(const std::string& sid) 1612 * @see removeDataGenerator(unsigned int n) 1613 */ 1614 SedDataGenerator* createDataGenerator(); 1615 1616 1617 /** 1618 * Removes the nth SedDataGenerator from this SedDocument and returns a 1619 * pointer to it. 1620 * 1621 * @param n an unsigned int representing the index of the SedDataGenerator to 1622 * remove. 1623 * 1624 * @return a pointer to the nth SedDataGenerator in this SedDocument. 1625 * 1626 * @copydetails doc_warning_returns_owned_pointer 1627 * 1628 * @see addDataGenerator(const SedDataGenerator* object) 1629 * @see createDataGenerator() 1630 * @see getDataGenerator(const std::string& sid) 1631 * @see getDataGenerator(unsigned int n) 1632 * @see getNumDataGenerators() 1633 * @see removeDataGenerator(const std::string& sid) 1634 */ 1635 SedDataGenerator* removeDataGenerator(unsigned int n); 1636 1637 1638 /** 1639 * Removes the SedDataGenerator from this SedDocument based on its identifier 1640 * and returns a pointer to it. 1641 * 1642 * @param sid a string representing the identifier of the SedDataGenerator to 1643 * remove. 1644 * 1645 * @return the SedDataGenerator in this SedDocument based on the identifier 1646 * or NULL if no such SedDataGenerator exists. 1647 * 1648 * @copydetails doc_warning_returns_owned_pointer 1649 * 1650 * @see addDataGenerator(const SedDataGenerator* object) 1651 * @see createDataGenerator() 1652 * @see getDataGenerator(const std::string& sid) 1653 * @see getDataGenerator(unsigned int n) 1654 * @see getNumDataGenerators() 1655 * @see removeDataGenerator(unsigned int n) 1656 */ 1657 SedDataGenerator* removeDataGenerator(const std::string& sid); 1658 1659 1660 /** 1661 * Returns the SedListOfOutputs from this SedDocument. 1662 * 1663 * @return the SedListOfOutputs from this SedDocument. 1664 * 1665 * @copydetails doc_returned_unowned_pointer 1666 * 1667 * @see addOutput(const SedOutput* object) 1668 * @see createOutput() 1669 * @see getOutput(const std::string& sid) 1670 * @see getOutput(unsigned int n) 1671 * @see getNumOutputs() 1672 * @see removeOutput(const std::string& sid) 1673 * @see removeOutput(unsigned int n) 1674 */ 1675 const SedListOfOutputs* getListOfOutputs() const; 1676 1677 1678 /** 1679 * Returns the SedListOfOutputs from this SedDocument. 1680 * 1681 * @return the SedListOfOutputs from this SedDocument. 1682 * 1683 * @copydetails doc_returned_unowned_pointer 1684 * 1685 * @see addOutput(const SedOutput* object) 1686 * @see createOutput() 1687 * @see getOutput(const std::string& sid) 1688 * @see getOutput(unsigned int n) 1689 * @see getNumOutputs() 1690 * @see removeOutput(const std::string& sid) 1691 * @see removeOutput(unsigned int n) 1692 */ 1693 SedListOfOutputs* getListOfOutputs(); 1694 1695 1696 /** 1697 * Get a SedOutput from the SedDocument. 1698 * 1699 * @param n an unsigned int representing the index of the SedOutput to 1700 * retrieve. 1701 * 1702 * @return the nth SedOutput in the SedListOfOutputs within this SedDocument 1703 * or @c NULL if no such object exists. 1704 * 1705 * @copydetails doc_returned_unowned_pointer 1706 * 1707 * @see addOutput(const SedOutput* object) 1708 * @see createOutput() 1709 * @see getOutput(const std::string& sid) 1710 * @see getNumOutputs() 1711 * @see removeOutput(const std::string& sid) 1712 * @see removeOutput(unsigned int n) 1713 */ 1714 SedOutput* getOutput(unsigned int n); 1715 1716 1717 /** 1718 * Get a SedOutput from the SedDocument. 1719 * 1720 * @param n an unsigned int representing the index of the SedOutput to 1721 * retrieve. 1722 * 1723 * @return the nth SedOutput in the SedListOfOutputs within this SedDocument 1724 * or @c NULL if no such object exists. 1725 * 1726 * @copydetails doc_returned_unowned_pointer 1727 * 1728 * @see addOutput(const SedOutput* object) 1729 * @see createOutput() 1730 * @see getOutput(const std::string& sid) 1731 * @see getNumOutputs() 1732 * @see removeOutput(const std::string& sid) 1733 * @see removeOutput(unsigned int n) 1734 */ 1735 const SedOutput* getOutput(unsigned int n) const; 1736 1737 1738 /** 1739 * Get a SedOutput from the SedDocument based on its identifier. 1740 * 1741 * @param sid a string representing the identifier of the SedOutput to 1742 * retrieve. 1743 * 1744 * @return the SedOutput in the SedListOfOutputs within this SedDocument with 1745 * the given @p sid or @c NULL if no such SedOutput exists. 1746 * 1747 * @copydetails doc_returned_unowned_pointer 1748 * 1749 * @see addOutput(const SedOutput* object) 1750 * @see createOutput() 1751 * @see getOutput(unsigned int n) 1752 * @see getNumOutputs() 1753 * @see removeOutput(const std::string& sid) 1754 * @see removeOutput(unsigned int n) 1755 */ 1756 SedOutput* getOutput(const std::string& sid); 1757 1758 1759 /** 1760 * Get a SedOutput from the SedDocument based on its identifier. 1761 * 1762 * @param sid a string representing the identifier of the SedOutput to 1763 * retrieve. 1764 * 1765 * @return the SedOutput in the SedListOfOutputs within this SedDocument with 1766 * the given @p sid or @c NULL if no such SedOutput exists. 1767 * 1768 * @copydetails doc_returned_unowned_pointer 1769 * 1770 * @see addOutput(const SedOutput* object) 1771 * @see createOutput() 1772 * @see getOutput(unsigned int n) 1773 * @see getNumOutputs() 1774 * @see removeOutput(const std::string& sid) 1775 * @see removeOutput(unsigned int n) 1776 */ 1777 const SedOutput* getOutput(const std::string& sid) const; 1778 1779 1780 /** 1781 * Adds a copy of the given SedOutput to this SedDocument. 1782 * 1783 * @param so the SedOutput object to add. 1784 * 1785 * @copydetails doc_returns_success_code 1786 * @li @sedmlconstant{LIBSEDML_OPERATION_SUCCESS, OperationReturnValues_t} 1787 * @li @sedmlconstant{LIBSEDML_OPERATION_FAILED, OperationReturnValues_t} 1788 * @li @sedmlconstant{LIBSEDML_INVALID_OBJECT, OperationReturnValues_t} 1789 * @li @sedmlconstant{LIBSEDML_LEVEL_MISMATCH, OperationReturnValues_t} 1790 * @li @sedmlconstant{LIBSEDML_VERSION_MISMATCH, OperationReturnValues_t} 1791 * @li @sedmlconstant{LIBSEDML_PKG_VERSION_MISMATCH, OperationReturnValues_t} 1792 * @li @sedmlconstant{LIBSEDML_DUPLICATE_OBJECT_ID, OperationReturnValues_t} 1793 * 1794 * @copydetails doc_note_object_is_copied 1795 * 1796 * @see createOutput() 1797 * @see getOutput(const std::string& sid) 1798 * @see getOutput(unsigned int n) 1799 * @see getNumOutputs() 1800 * @see removeOutput(const std::string& sid) 1801 * @see removeOutput(unsigned int n) 1802 */ 1803 int addOutput(const SedOutput* so); 1804 1805 1806 /** 1807 * Get the number of SedOutput objects in this SedDocument. 1808 * 1809 * @return the number of SedOutput objects in this SedDocument. 1810 * 1811 * @see addOutput(const SedOutput* object) 1812 * @see createOutput() 1813 * @see getOutput(const std::string& sid) 1814 * @see getOutput(unsigned int n) 1815 * @see removeOutput(const std::string& sid) 1816 * @see removeOutput(unsigned int n) 1817 */ 1818 unsigned int getNumOutputs() const; 1819 1820 1821 /** 1822 * Creates a new SedReport object, adds it to this SedDocument object and 1823 * returns the SedReport object created. 1824 * 1825 * @return a new SedReport object instance. 1826 * 1827 * @copydetails doc_returned_unowned_pointer 1828 * 1829 * @see addOutput(const SedOutput* object) 1830 * @see getOutput(const std::string& sid) 1831 * @see getOutput(unsigned int n) 1832 * @see getNumOutputs() 1833 * @see removeOutput(const std::string& sid) 1834 * @see removeOutput(unsigned int n) 1835 */ 1836 SedReport* createReport(); 1837 1838 1839 /** 1840 * Creates a new SedPlot2D object, adds it to this SedDocument object and 1841 * returns the SedPlot2D object created. 1842 * 1843 * @return a new SedPlot2D object instance. 1844 * 1845 * @copydetails doc_returned_unowned_pointer 1846 * 1847 * @see addOutput(const SedOutput* object) 1848 * @see getOutput(const std::string& sid) 1849 * @see getOutput(unsigned int n) 1850 * @see getNumOutputs() 1851 * @see removeOutput(const std::string& sid) 1852 * @see removeOutput(unsigned int n) 1853 */ 1854 SedPlot2D* createPlot2D(); 1855 1856 1857 /** 1858 * Creates a new SedPlot3D object, adds it to this SedDocument object and 1859 * returns the SedPlot3D object created. 1860 * 1861 * @return a new SedPlot3D object instance. 1862 * 1863 * @copydetails doc_returned_unowned_pointer 1864 * 1865 * @see addOutput(const SedOutput* object) 1866 * @see getOutput(const std::string& sid) 1867 * @see getOutput(unsigned int n) 1868 * @see getNumOutputs() 1869 * @see removeOutput(const std::string& sid) 1870 * @see removeOutput(unsigned int n) 1871 */ 1872 SedPlot3D* createPlot3D(); 1873 1874 1875 /** 1876 * Creates a new SedFigure object, adds it to this SedDocument object and 1877 * returns the SedFigure object created. 1878 * 1879 * @return a new SedFigure object instance. 1880 * 1881 * @copydetails doc_returned_unowned_pointer 1882 * 1883 * @see addOutput(const SedOutput* object) 1884 * @see getOutput(const std::string& sid) 1885 * @see getOutput(unsigned int n) 1886 * @see getNumOutputs() 1887 * @see removeOutput(const std::string& sid) 1888 * @see removeOutput(unsigned int n) 1889 */ 1890 SedFigure* createFigure(); 1891 1892 1893 /** 1894 * Creates a new SedParameterEstimationResultPlot object, adds it to this 1895 * SedDocument object and returns the SedParameterEstimationResultPlot object 1896 * created. 1897 * 1898 * @return a new SedParameterEstimationResultPlot object instance. 1899 * 1900 * @copydetails doc_returned_unowned_pointer 1901 * 1902 * @see addOutput(const SedOutput* object) 1903 * @see getOutput(const std::string& sid) 1904 * @see getOutput(unsigned int n) 1905 * @see getNumOutputs() 1906 * @see removeOutput(const std::string& sid) 1907 * @see removeOutput(unsigned int n) 1908 */ 1909 SedParameterEstimationResultPlot* createParameterEstimationResultPlot(); 1910 1911 1912 /** 1913 * Removes the nth SedOutput from this SedDocument and returns a pointer to 1914 * it. 1915 * 1916 * @param n an unsigned int representing the index of the SedOutput to 1917 * remove. 1918 * 1919 * @return a pointer to the nth SedOutput in this SedDocument. 1920 * 1921 * @copydetails doc_warning_returns_owned_pointer 1922 * 1923 * @see addOutput(const SedOutput* object) 1924 * @see createOutput() 1925 * @see getOutput(const std::string& sid) 1926 * @see getOutput(unsigned int n) 1927 * @see getNumOutputs() 1928 * @see removeOutput(const std::string& sid) 1929 */ 1930 SedOutput* removeOutput(unsigned int n); 1931 1932 1933 /** 1934 * Removes the SedOutput from this SedDocument based on its identifier and 1935 * returns a pointer to it. 1936 * 1937 * @param sid a string representing the identifier of the SedOutput to 1938 * remove. 1939 * 1940 * @return the SedOutput in this SedDocument based on the identifier or NULL 1941 * if no such SedOutput exists. 1942 * 1943 * @copydetails doc_warning_returns_owned_pointer 1944 * 1945 * @see addOutput(const SedOutput* object) 1946 * @see createOutput() 1947 * @see getOutput(const std::string& sid) 1948 * @see getOutput(unsigned int n) 1949 * @see getNumOutputs() 1950 * @see removeOutput(unsigned int n) 1951 */ 1952 SedOutput* removeOutput(const std::string& sid); 1953 1954 1955 /** 1956 * Returns the SedListOfStyles from this SedDocument. 1957 * 1958 * @return the SedListOfStyles from this SedDocument. 1959 * 1960 * @copydetails doc_returned_unowned_pointer 1961 * 1962 * @see addStyle(const SedStyle* object) 1963 * @see createStyle() 1964 * @see getStyle(const std::string& sid) 1965 * @see getStyle(unsigned int n) 1966 * @see getNumStyles() 1967 * @see removeStyle(const std::string& sid) 1968 * @see removeStyle(unsigned int n) 1969 */ 1970 const SedListOfStyles* getListOfStyles() const; 1971 1972 1973 /** 1974 * Returns the SedListOfStyles from this SedDocument. 1975 * 1976 * @return the SedListOfStyles from this SedDocument. 1977 * 1978 * @copydetails doc_returned_unowned_pointer 1979 * 1980 * @see addStyle(const SedStyle* object) 1981 * @see createStyle() 1982 * @see getStyle(const std::string& sid) 1983 * @see getStyle(unsigned int n) 1984 * @see getNumStyles() 1985 * @see removeStyle(const std::string& sid) 1986 * @see removeStyle(unsigned int n) 1987 */ 1988 SedListOfStyles* getListOfStyles(); 1989 1990 1991 /** 1992 * Get a SedStyle from the SedDocument. 1993 * 1994 * @param n an unsigned int representing the index of the SedStyle to 1995 * retrieve. 1996 * 1997 * @return the nth SedStyle in the SedListOfStyles within this SedDocument or 1998 * @c NULL if no such object exists. 1999 * 2000 * @copydetails doc_returned_unowned_pointer 2001 * 2002 * @see addStyle(const SedStyle* object) 2003 * @see createStyle() 2004 * @see getStyle(const std::string& sid) 2005 * @see getNumStyles() 2006 * @see removeStyle(const std::string& sid) 2007 * @see removeStyle(unsigned int n) 2008 */ 2009 SedStyle* getStyle(unsigned int n); 2010 2011 2012 /** 2013 * Get a SedStyle from the SedDocument. 2014 * 2015 * @param n an unsigned int representing the index of the SedStyle to 2016 * retrieve. 2017 * 2018 * @return the nth SedStyle in the SedListOfStyles within this SedDocument or 2019 * @c NULL if no such object exists. 2020 * 2021 * @copydetails doc_returned_unowned_pointer 2022 * 2023 * @see addStyle(const SedStyle* object) 2024 * @see createStyle() 2025 * @see getStyle(const std::string& sid) 2026 * @see getNumStyles() 2027 * @see removeStyle(const std::string& sid) 2028 * @see removeStyle(unsigned int n) 2029 */ 2030 const SedStyle* getStyle(unsigned int n) const; 2031 2032 2033 /** 2034 * Get a SedStyle from the SedDocument based on its identifier. 2035 * 2036 * @param sid a string representing the identifier of the SedStyle to 2037 * retrieve. 2038 * 2039 * @return the SedStyle in the SedListOfStyles within this SedDocument with 2040 * the given @p sid or @c NULL if no such SedStyle exists. 2041 * 2042 * @copydetails doc_returned_unowned_pointer 2043 * 2044 * @see addStyle(const SedStyle* object) 2045 * @see createStyle() 2046 * @see getStyle(unsigned int n) 2047 * @see getNumStyles() 2048 * @see removeStyle(const std::string& sid) 2049 * @see removeStyle(unsigned int n) 2050 */ 2051 SedStyle* getStyle(const std::string& sid); 2052 2053 2054 /** 2055 * Get a SedStyle from the SedDocument based on its identifier. 2056 * 2057 * @param sid a string representing the identifier of the SedStyle to 2058 * retrieve. 2059 * 2060 * @return the SedStyle in the SedListOfStyles within this SedDocument with 2061 * the given @p sid or @c NULL if no such SedStyle exists. 2062 * 2063 * @copydetails doc_returned_unowned_pointer 2064 * 2065 * @see addStyle(const SedStyle* object) 2066 * @see createStyle() 2067 * @see getStyle(unsigned int n) 2068 * @see getNumStyles() 2069 * @see removeStyle(const std::string& sid) 2070 * @see removeStyle(unsigned int n) 2071 */ 2072 const SedStyle* getStyle(const std::string& sid) const; 2073 2074 /** 2075 * Get the effecive SedStyle from the SedDocument based on its identifier. 2076 * 2077 * @param sid a string representing the identifier of the SedStyle to 2078 * retrieve. 2079 * 2080 * @return a new SedStyle based on the SedStyle in the 2081 * SedListOfStyles, but changed so that any referenced styles 2082 * are applied. 2083 * 2084 */ 2085 SedStyle getEffectiveStyle(const std::string& sid) const; 2086 2087 2088 /** 2089 * Get a SedStyle from the SedDocument based on the BaseStyle to which it 2090 * refers. 2091 * 2092 * @param sid a string representing the "baseStyle" attribute of the SedStyle 2093 * object to retrieve. 2094 * 2095 * @return the first SedStyle in this SedDocument based on the given 2096 * baseStyle attribute or NULL if no such SedStyle exists. 2097 * 2098 * @copydetails doc_returned_unowned_pointer 2099 */ 2100 const SedStyle* getStyleByBaseStyle(const std::string& sid) const; 2101 2102 2103 /** 2104 * Get a SedStyle from the SedDocument based on the BaseStyle to which it 2105 * refers. 2106 * 2107 * @param sid a string representing the "baseStyle" attribute of the SedStyle 2108 * object to retrieve. 2109 * 2110 * @return the first SedStyle in this SedDocument based on the given 2111 * baseStyle attribute or NULL if no such SedStyle exists. 2112 * 2113 * @copydetails doc_returned_unowned_pointer 2114 */ 2115 SedStyle* getStyleByBaseStyle(const std::string& sid); 2116 2117 2118 /** 2119 * Adds a copy of the given SedStyle to this SedDocument. 2120 * 2121 * @param ss the SedStyle object to add. 2122 * 2123 * @copydetails doc_returns_success_code 2124 * @li @sedmlconstant{LIBSEDML_OPERATION_SUCCESS, OperationReturnValues_t} 2125 * @li @sedmlconstant{LIBSEDML_OPERATION_FAILED, OperationReturnValues_t} 2126 * @li @sedmlconstant{LIBSEDML_INVALID_OBJECT, OperationReturnValues_t} 2127 * @li @sedmlconstant{LIBSEDML_LEVEL_MISMATCH, OperationReturnValues_t} 2128 * @li @sedmlconstant{LIBSEDML_VERSION_MISMATCH, OperationReturnValues_t} 2129 * @li @sedmlconstant{LIBSEDML_PKG_VERSION_MISMATCH, OperationReturnValues_t} 2130 * @li @sedmlconstant{LIBSEDML_DUPLICATE_OBJECT_ID, OperationReturnValues_t} 2131 * 2132 * @copydetails doc_note_object_is_copied 2133 * 2134 * @see createStyle() 2135 * @see getStyle(const std::string& sid) 2136 * @see getStyle(unsigned int n) 2137 * @see getNumStyles() 2138 * @see removeStyle(const std::string& sid) 2139 * @see removeStyle(unsigned int n) 2140 */ 2141 int addStyle(const SedStyle* ss); 2142 2143 2144 /** 2145 * Get the number of SedStyle objects in this SedDocument. 2146 * 2147 * @return the number of SedStyle objects in this SedDocument. 2148 * 2149 * @see addStyle(const SedStyle* object) 2150 * @see createStyle() 2151 * @see getStyle(const std::string& sid) 2152 * @see getStyle(unsigned int n) 2153 * @see removeStyle(const std::string& sid) 2154 * @see removeStyle(unsigned int n) 2155 */ 2156 unsigned int getNumStyles() const; 2157 2158 2159 /** 2160 * Creates a new SedStyle object, adds it to this SedDocument object and 2161 * returns the SedStyle object created. 2162 * 2163 * @return a new SedStyle object instance. 2164 * 2165 * @copydetails doc_returned_unowned_pointer 2166 * 2167 * @see addStyle(const SedStyle* object) 2168 * @see getStyle(const std::string& sid) 2169 * @see getStyle(unsigned int n) 2170 * @see getNumStyles() 2171 * @see removeStyle(const std::string& sid) 2172 * @see removeStyle(unsigned int n) 2173 */ 2174 SedStyle* createStyle(); 2175 2176 2177 /** 2178 * Removes the nth SedStyle from this SedDocument and returns a pointer to 2179 * it. 2180 * 2181 * @param n an unsigned int representing the index of the SedStyle to remove. 2182 * 2183 * @return a pointer to the nth SedStyle in this SedDocument. 2184 * 2185 * @copydetails doc_warning_returns_owned_pointer 2186 * 2187 * @see addStyle(const SedStyle* object) 2188 * @see createStyle() 2189 * @see getStyle(const std::string& sid) 2190 * @see getStyle(unsigned int n) 2191 * @see getNumStyles() 2192 * @see removeStyle(const std::string& sid) 2193 */ 2194 SedStyle* removeStyle(unsigned int n); 2195 2196 2197 /** 2198 * Removes the SedStyle from this SedDocument based on its identifier and 2199 * returns a pointer to it. 2200 * 2201 * @param sid a string representing the identifier of the SedStyle to remove. 2202 * 2203 * @return the SedStyle in this SedDocument based on the identifier or NULL 2204 * if no such SedStyle exists. 2205 * 2206 * @copydetails doc_warning_returns_owned_pointer 2207 * 2208 * @see addStyle(const SedStyle* object) 2209 * @see createStyle() 2210 * @see getStyle(const std::string& sid) 2211 * @see getStyle(unsigned int n) 2212 * @see getNumStyles() 2213 * @see removeStyle(unsigned int n) 2214 */ 2215 SedStyle* removeStyle(const std::string& sid); 2216 2217 2218 /** 2219 * Returns the XML element name of this SedDocument object. 2220 * 2221 * For SedDocument, the XML element name is always @c "sedML". 2222 * 2223 * @return the name of this element, i.e. @c "sedML". 2224 */ 2225 virtual const std::string& getElementName() const; 2226 2227 2228 /** 2229 * Returns the libSEDML type code for this SedDocument object. 2230 * 2231 * @copydetails doc_what_are_typecodes 2232 * 2233 * @return the SED-ML type code for this object: 2234 * @sedmlconstant{SEDML_DOCUMENT, SedTypeCode_t}. 2235 * 2236 * @copydetails doc_warning_typecodes_not_unique 2237 * 2238 * @see getElementName() 2239 */ 2240 virtual int getTypeCode() const; 2241 2242 2243 /** 2244 * Predicate returning @c true if all the required attributes for this 2245 * SedDocument object have been set. 2246 * 2247 * @return @c true to indicate that all the required attributes of this 2248 * SedDocument have been set, otherwise @c false is returned. 2249 * 2250 * 2251 * @note The required attributes for the SedDocument object are: 2252 * @li "level" 2253 * @li "version" 2254 */ 2255 virtual bool hasRequiredAttributes() const; 2256 2257 2258 2259 /** @cond doxygenLibSEDMLInternal */ 2260 2261 /** 2262 * Write any contained elements 2263 */ 2264 virtual void writeElements(LIBSBML_CPP_NAMESPACE_QUALIFIER XMLOutputStream& 2265 stream) const; 2266 2267 /** @endcond */ 2268 2269 2270 2271 /** @cond doxygenLibSEDMLInternal */ 2272 2273 /** 2274 * Accepts the given SedVisitor 2275 */ 2276 virtual bool accept(SedVisitor& v) const; 2277 2278 /** @endcond */ 2279 2280 2281 2282 /** @cond doxygenLibSEDMLInternal */ 2283 2284 /** 2285 * Sets the parent SedDocument 2286 */ 2287 virtual void setSedDocument(SedDocument* d); 2288 2289 /** @endcond */ 2290 2291 2292 2293 /** @cond doxygenLibSEDMLInternal */ 2294 2295 /** 2296 * Connects to child elements 2297 */ 2298 virtual void connectToChild(); 2299 2300 /** @endcond */ 2301 2302 2303 2304 2305 #ifndef SWIG 2306 2307 2308 2309 /** @cond doxygenLibSEDMLInternal */ 2310 2311 /** 2312 * Gets the value of the "attributeName" attribute of this SedDocument. 2313 * 2314 * @param attributeName, the name of the attribute to retrieve. 2315 * 2316 * @param value, the address of the value to record. 2317 * 2318 * @copydetails doc_returns_success_code 2319 * @li @sedmlconstant{LIBSEDML_OPERATION_SUCCESS, OperationReturnValues_t} 2320 * @li @sedmlconstant{LIBSEDML_OPERATION_FAILED, OperationReturnValues_t} 2321 */ 2322 virtual int getAttribute(const std::string& attributeName, bool& value) 2323 const; 2324 2325 /** @endcond */ 2326 2327 2328 2329 /** @cond doxygenLibSEDMLInternal */ 2330 2331 /** 2332 * Gets the value of the "attributeName" attribute of this SedDocument. 2333 * 2334 * @param attributeName, the name of the attribute to retrieve. 2335 * 2336 * @param value, the address of the value to record. 2337 * 2338 * @copydetails doc_returns_success_code 2339 * @li @sedmlconstant{LIBSEDML_OPERATION_SUCCESS, OperationReturnValues_t} 2340 * @li @sedmlconstant{LIBSEDML_OPERATION_FAILED, OperationReturnValues_t} 2341 */ 2342 virtual int getAttribute(const std::string& attributeName, int& value) const; 2343 2344 /** @endcond */ 2345 2346 2347 2348 /** @cond doxygenLibSEDMLInternal */ 2349 2350 /** 2351 * Gets the value of the "attributeName" attribute of this SedDocument. 2352 * 2353 * @param attributeName, the name of the attribute to retrieve. 2354 * 2355 * @param value, the address of the value to record. 2356 * 2357 * @copydetails doc_returns_success_code 2358 * @li @sedmlconstant{LIBSEDML_OPERATION_SUCCESS, OperationReturnValues_t} 2359 * @li @sedmlconstant{LIBSEDML_OPERATION_FAILED, OperationReturnValues_t} 2360 */ 2361 virtual int getAttribute(const std::string& attributeName, 2362 double& value) const; 2363 2364 /** @endcond */ 2365 2366 2367 2368 /** @cond doxygenLibSEDMLInternal */ 2369 2370 /** 2371 * Gets the value of the "attributeName" attribute of this SedDocument. 2372 * 2373 * @param attributeName, the name of the attribute to retrieve. 2374 * 2375 * @param value, the address of the value to record. 2376 * 2377 * @copydetails doc_returns_success_code 2378 * @li @sedmlconstant{LIBSEDML_OPERATION_SUCCESS, OperationReturnValues_t} 2379 * @li @sedmlconstant{LIBSEDML_OPERATION_FAILED, OperationReturnValues_t} 2380 */ 2381 virtual int getAttribute(const std::string& attributeName, 2382 unsigned int& value) const; 2383 2384 /** @endcond */ 2385 2386 2387 2388 /** @cond doxygenLibSEDMLInternal */ 2389 2390 /** 2391 * Gets the value of the "attributeName" attribute of this SedDocument. 2392 * 2393 * @param attributeName, the name of the attribute to retrieve. 2394 * 2395 * @param value, the address of the value to record. 2396 * 2397 * @copydetails doc_returns_success_code 2398 * @li @sedmlconstant{LIBSEDML_OPERATION_SUCCESS, OperationReturnValues_t} 2399 * @li @sedmlconstant{LIBSEDML_OPERATION_FAILED, OperationReturnValues_t} 2400 */ 2401 virtual int getAttribute(const std::string& attributeName, 2402 std::string& value) const; 2403 2404 /** @endcond */ 2405 2406 2407 2408 /** @cond doxygenLibSEDMLInternal */ 2409 2410 /** 2411 * Predicate returning @c true if this SedDocument's attribute 2412 * "attributeName" is set. 2413 * 2414 * @param attributeName, the name of the attribute to query. 2415 * 2416 * @return @c true if this SedDocument's attribute "attributeName" has been 2417 * set, otherwise @c false is returned. 2418 */ 2419 virtual bool isSetAttribute(const std::string& attributeName) const; 2420 2421 /** @endcond */ 2422 2423 2424 2425 /** @cond doxygenLibSEDMLInternal */ 2426 2427 /** 2428 * Sets the value of the "attributeName" attribute of this SedDocument. 2429 * 2430 * @param attributeName, the name of the attribute to set. 2431 * 2432 * @param value, the value of the attribute to set. 2433 * 2434 * @copydetails doc_returns_success_code 2435 * @li @sedmlconstant{LIBSEDML_OPERATION_SUCCESS, OperationReturnValues_t} 2436 * @li @sedmlconstant{LIBSEDML_OPERATION_FAILED, OperationReturnValues_t} 2437 */ 2438 virtual int setAttribute(const std::string& attributeName, bool value); 2439 2440 /** @endcond */ 2441 2442 2443 2444 /** @cond doxygenLibSEDMLInternal */ 2445 2446 /** 2447 * Sets the value of the "attributeName" attribute of this SedDocument. 2448 * 2449 * @param attributeName, the name of the attribute to set. 2450 * 2451 * @param value, the value of the attribute to set. 2452 * 2453 * @copydetails doc_returns_success_code 2454 * @li @sedmlconstant{LIBSEDML_OPERATION_SUCCESS, OperationReturnValues_t} 2455 * @li @sedmlconstant{LIBSEDML_OPERATION_FAILED, OperationReturnValues_t} 2456 */ 2457 virtual int setAttribute(const std::string& attributeName, int value); 2458 2459 /** @endcond */ 2460 2461 2462 2463 /** @cond doxygenLibSEDMLInternal */ 2464 2465 /** 2466 * Sets the value of the "attributeName" attribute of this SedDocument. 2467 * 2468 * @param attributeName, the name of the attribute to set. 2469 * 2470 * @param value, the value of the attribute to set. 2471 * 2472 * @copydetails doc_returns_success_code 2473 * @li @sedmlconstant{LIBSEDML_OPERATION_SUCCESS, OperationReturnValues_t} 2474 * @li @sedmlconstant{LIBSEDML_OPERATION_FAILED, OperationReturnValues_t} 2475 */ 2476 virtual int setAttribute(const std::string& attributeName, double value); 2477 2478 /** @endcond */ 2479 2480 2481 2482 /** @cond doxygenLibSEDMLInternal */ 2483 2484 /** 2485 * Sets the value of the "attributeName" attribute of this SedDocument. 2486 * 2487 * @param attributeName, the name of the attribute to set. 2488 * 2489 * @param value, the value of the attribute to set. 2490 * 2491 * @copydetails doc_returns_success_code 2492 * @li @sedmlconstant{LIBSEDML_OPERATION_SUCCESS, OperationReturnValues_t} 2493 * @li @sedmlconstant{LIBSEDML_OPERATION_FAILED, OperationReturnValues_t} 2494 */ 2495 virtual int setAttribute(const std::string& attributeName, 2496 unsigned int value); 2497 2498 /** @endcond */ 2499 2500 2501 2502 /** @cond doxygenLibSEDMLInternal */ 2503 2504 /** 2505 * Sets the value of the "attributeName" attribute of this SedDocument. 2506 * 2507 * @param attributeName, the name of the attribute to set. 2508 * 2509 * @param value, the value of the attribute to set. 2510 * 2511 * @copydetails doc_returns_success_code 2512 * @li @sedmlconstant{LIBSEDML_OPERATION_SUCCESS, OperationReturnValues_t} 2513 * @li @sedmlconstant{LIBSEDML_OPERATION_FAILED, OperationReturnValues_t} 2514 */ 2515 virtual int setAttribute(const std::string& attributeName, 2516 const std::string& value); 2517 2518 /** @endcond */ 2519 2520 2521 2522 /** @cond doxygenLibSEDMLInternal */ 2523 2524 /** 2525 * Unsets the value of the "attributeName" attribute of this SedDocument. 2526 * 2527 * @param attributeName, the name of the attribute to query. 2528 * 2529 * @copydetails doc_returns_success_code 2530 * @li @sedmlconstant{LIBSEDML_OPERATION_SUCCESS, OperationReturnValues_t} 2531 * @li @sedmlconstant{LIBSEDML_OPERATION_FAILED, OperationReturnValues_t} 2532 */ 2533 virtual int unsetAttribute(const std::string& attributeName); 2534 2535 /** @endcond */ 2536 2537 2538 2539 /** @cond doxygenLibSEDMLInternal */ 2540 2541 /** 2542 * Creates and returns an new "elementName" object in this SedDocument. 2543 * 2544 * @param elementName, the name of the element to create. 2545 * 2546 * @return pointer to the element created. 2547 */ 2548 virtual SedBase* createChildObject(const std::string& elementName); 2549 2550 /** @endcond */ 2551 2552 2553 2554 /** @cond doxygenLibSEDMLInternal */ 2555 2556 /** 2557 * Adds a new "elementName" object to this SedDocument. 2558 * 2559 * @param elementName, the name of the element to create. 2560 * 2561 * @param element, pointer to the element to be added. 2562 * 2563 * @copydetails doc_returns_success_code 2564 * @li @sedmlconstant{LIBSEDML_OPERATION_SUCCESS, OperationReturnValues_t} 2565 * @li @sedmlconstant{LIBSEDML_OPERATION_FAILED, OperationReturnValues_t} 2566 */ 2567 virtual int addChildObject(const std::string& elementName, 2568 const SedBase* element); 2569 2570 /** @endcond */ 2571 2572 2573 2574 /** @cond doxygenLibSEDMLInternal */ 2575 2576 /** 2577 * Removes and returns the new "elementName" object with the given id in this 2578 * SedDocument. 2579 * 2580 * @param elementName, the name of the element to remove. 2581 * 2582 * @param id, the id of the element to remove. 2583 * 2584 * @return pointer to the element removed. 2585 */ 2586 virtual SedBase* removeChildObject(const std::string& elementName, 2587 const std::string& id); 2588 2589 /** @endcond */ 2590 2591 2592 2593 /** @cond doxygenLibSEDMLInternal */ 2594 2595 /** 2596 * Returns the number of "elementName" in this SedDocument. 2597 * 2598 * @param elementName, the name of the element to get number of. 2599 * 2600 * @return unsigned int number of elements. 2601 */ 2602 virtual unsigned int getNumObjects(const std::string& elementName); 2603 2604 /** @endcond */ 2605 2606 2607 2608 /** @cond doxygenLibSEDMLInternal */ 2609 2610 /** 2611 * Returns the nth object of "objectName" in this SedDocument. 2612 * 2613 * @param elementName, the name of the element to get number of. 2614 * 2615 * @param index, unsigned int the index of the object to retrieve. 2616 * 2617 * @return pointer to the object. 2618 */ 2619 virtual SedBase* getObject(const std::string& elementName, 2620 unsigned int index); 2621 2622 /** @endcond */ 2623 2624 2625 2626 2627 #endif /* !SWIG */ 2628 2629 2630 /** 2631 * Returns the first child element that has the given @p id in the model-wide 2632 * SId namespace, or @c NULL if no such object is found. 2633 * 2634 * @param id a string representing the id attribute of the object to 2635 * retrieve. 2636 * 2637 * @return a pointer to the SedBase element with the given @p id. If no such 2638 * object is found, this method returns @c NULL. 2639 */ 2640 virtual SedBase* getElementBySId(const std::string& id); 2641 2642 2643 /** 2644 * Returns the value of the "Namespaces" element of this SedDocument. 2645 * 2646 * @return the value of the "Namespaces" element of this SedDocument as a 2647 * LIBSBML_CPP_NAMESPACE_QUALIFIER XMLNamespaces*. 2648 */ 2649 virtual const LIBSBML_CPP_NAMESPACE_QUALIFIER XMLNamespaces* getNamespaces() 2650 const; 2651 2652 2653 /** 2654 * Returns the value of the "Namespaces" element of this SedDocument. 2655 * 2656 * @return the value of the "Namespaces" element of this SedDocument as a 2657 * LIBSBML_CPP_NAMESPACE_QUALIFIER XMLNamespaces*. 2658 */ 2659 virtual LIBSBML_CPP_NAMESPACE_QUALIFIER XMLNamespaces* getNamespaces(); 2660 2661 2662 /** 2663 * Returns the value of the "SedErrorLog" element of this SedDocument. 2664 * 2665 * @return the value of the "SedErrorLog" element of this SedDocument as a 2666 * SedErrorLog*. 2667 */ 2668 const SedErrorLog* getErrorLog() const; 2669 2670 2671 /** 2672 * Returns the value of the "SedErrorLog" element of this SedDocument. 2673 * 2674 * @return the value of the "SedErrorLog" element of this SedDocument as a 2675 * SedErrorLog*. 2676 */ 2677 SedErrorLog* getErrorLog(); 2678 2679 2680 /** 2681 * Get a SedError from the SedDocument. 2682 * 2683 * @param n an unsigned int representing the index of the SedError to 2684 * retrieve. 2685 * 2686 * @return the nth SedError within this SedDocument or @c NULL if no such 2687 * object exists. 2688 * 2689 * @copydetails doc_returned_unowned_pointer 2690 * 2691 * @see getNumErrors() 2692 */ 2693 SedError* getError(unsigned int n); 2694 2695 2696 /** 2697 * Get a SedError from the SedDocument. 2698 * 2699 * @param n an unsigned int representing the index of the SedError to 2700 * retrieve. 2701 * 2702 * @return the nth SedError within this SedDocument or @c NULL if no such 2703 * object exists. 2704 * 2705 * @copydetails doc_returned_unowned_pointer 2706 * 2707 * @see getNumErrors() 2708 */ 2709 const SedError* getError(unsigned int n) const; 2710 2711 2712 /** 2713 * Get the number of SedError objects in this SedDocument. 2714 * 2715 * @return the number of SedError objects in this SedDocument. 2716 * 2717 * @see getError(unsigned int n) 2718 */ 2719 unsigned int getNumErrors() const; 2720 2721 2722 /** 2723 * Get the number of SedError objects in this SedDocument with the given 2724 * severity. 2725 * 2726 * @param severity the severity of the SedError to return. 2727 * 2728 * @return the number of SedError objects in this SedDocument. 2729 * 2730 * @see getError(unsigned int n) 2731 */ 2732 unsigned int getNumErrors(unsigned int severity) const; 2733 2734 2735 /** 2736 * Sort any SubTasks or Curves in the document according to 2737 * their 'order' attributes. 2738 */ 2739 void sortOrderedObjects(); 2740 2741 /** 2742 * Returns a List of all child SedBase objects, including those nested to an 2743 * arbitrary depth. 2744 * 2745 * @param filter an ElementFilter that may impose restrictions on the objects 2746 * to be retrieved. 2747 * 2748 * @return a List pointer of pointers to all SedBase child objects with any 2749 * restriction imposed. 2750 */ 2751 virtual List* getAllElements(SedElementFilter * filter = NULL); 2752 2753 2754 2755 protected: 2756 2757 2758 /** @cond doxygenLibSEDMLInternal */ 2759 2760 /** 2761 * Creates a new object from the next XMLToken on the XMLInputStream 2762 */ 2763 virtual SedBase* createObject(LIBSBML_CPP_NAMESPACE_QUALIFIER XMLInputStream& 2764 stream); 2765 2766 /** @endcond */ 2767 2768 2769 2770 /** @cond doxygenLibSEDMLInternal */ 2771 2772 /** 2773 * Adds the expected attributes for this element 2774 */ 2775 virtual void addExpectedAttributes(LIBSBML_CPP_NAMESPACE_QUALIFIER 2776 ExpectedAttributes& attributes); 2777 2778 /** @endcond */ 2779 2780 2781 2782 /** @cond doxygenLibSEDMLInternal */ 2783 2784 /** 2785 * Reads the expected attributes into the member data variables 2786 */ 2787 virtual void readAttributes( 2788 const LIBSBML_CPP_NAMESPACE_QUALIFIER 2789 XMLAttributes& attributes, 2790 const LIBSBML_CPP_NAMESPACE_QUALIFIER 2791 ExpectedAttributes& expectedAttributes); 2792 2793 /** @endcond */ 2794 2795 2796 2797 /** @cond doxygenLibSEDMLInternal */ 2798 2799 /** 2800 * Writes the attributes to the stream 2801 */ 2802 virtual void writeAttributes(LIBSBML_CPP_NAMESPACE_QUALIFIER XMLOutputStream& 2803 stream) const; 2804 2805 /** @endcond */ 2806 2807 2808 2809 /** @cond doxygenLibSEDMLInternal */ 2810 2811 /** 2812 * Writes the namespace for the Sedml package 2813 */ 2814 virtual void writeXMLNS(LIBSBML_CPP_NAMESPACE_QUALIFIER XMLOutputStream& 2815 stream) const; 2816 2817 /** @endcond */ 2818 2819 2820 }; 2821 2822 2823 2824 LIBSEDML_CPP_NAMESPACE_END 2825 2826 2827 2828 2829 #endif /* __cplusplus */ 2830 2831 2832 2833 2834 #ifndef SWIG 2835 2836 2837 2838 2839 LIBSEDML_CPP_NAMESPACE_BEGIN 2840 2841 2842 2843 2844 BEGIN_C_DECLS 2845 2846 2847 /** 2848 * Creates a new SedDocument_t using the given SED-ML Level and @ p version 2849 * values. 2850 * 2851 * @param level an unsigned int, the SED-ML Level to assign to this 2852 * SedDocument_t. 2853 * 2854 * @param version an unsigned int, the SED-ML Version to assign to this 2855 * SedDocument_t. 2856 * 2857 * @copydetails doc_note_setting_lv_pkg 2858 * 2859 * @copydetails doc_returned_owned_pointer 2860 * 2861 * @memberof SedDocument_t 2862 */ 2863 LIBSEDML_EXTERN 2864 SedDocument_t * 2865 SedDocument_create(unsigned int level, unsigned int version); 2866 2867 2868 /** 2869 * Creates and returns a deep copy of this SedDocument_t object. 2870 * 2871 * @param sd the SedDocument_t structure. 2872 * 2873 * @return a (deep) copy of this SedDocument_t object. 2874 * 2875 * @copydetails doc_returned_owned_pointer 2876 * 2877 * @memberof SedDocument_t 2878 */ 2879 LIBSEDML_EXTERN 2880 SedDocument_t* 2881 SedDocument_clone(const SedDocument_t* sd); 2882 2883 2884 /** 2885 * Frees this SedDocument_t object. 2886 * 2887 * @param sd the SedDocument_t structure. 2888 * 2889 * @memberof SedDocument_t 2890 */ 2891 LIBSEDML_EXTERN 2892 void 2893 SedDocument_free(SedDocument_t* sd); 2894 2895 2896 /** 2897 * Returns the value of the "level" attribute of this SedDocument_t. 2898 * 2899 * @param sd the SedDocument_t structure whose level is sought. 2900 * 2901 * @return the value of the "level" attribute of this SedDocument_t as a 2902 * unsigned integer. 2903 * 2904 * @memberof SedDocument_t 2905 */ 2906 LIBSEDML_EXTERN 2907 unsigned int 2908 SedDocument_getLevel(const SedDocument_t * sd); 2909 2910 2911 /** 2912 * Returns the value of the "version" attribute of this SedDocument_t. 2913 * 2914 * @param sd the SedDocument_t structure whose version is sought. 2915 * 2916 * @return the value of the "version" attribute of this SedDocument_t as a 2917 * unsigned integer. 2918 * 2919 * @memberof SedDocument_t 2920 */ 2921 LIBSEDML_EXTERN 2922 unsigned int 2923 SedDocument_getVersion(const SedDocument_t * sd); 2924 2925 2926 /** 2927 * Predicate returning @c 1 (true) if this SedDocument_t's "level" attribute is 2928 * set. 2929 * 2930 * @param sd the SedDocument_t structure. 2931 * 2932 * @return @c 1 (true) if this SedDocument_t's "level" attribute has been set, 2933 * otherwise @c 0 (false) is returned. 2934 * 2935 * @memberof SedDocument_t 2936 */ 2937 LIBSEDML_EXTERN 2938 int 2939 SedDocument_isSetLevel(const SedDocument_t * sd); 2940 2941 2942 /** 2943 * Predicate returning @c 1 (true) if this SedDocument_t's "version" attribute 2944 * is set. 2945 * 2946 * @param sd the SedDocument_t structure. 2947 * 2948 * @return @c 1 (true) if this SedDocument_t's "version" attribute has been 2949 * set, otherwise @c 0 (false) is returned. 2950 * 2951 * @memberof SedDocument_t 2952 */ 2953 LIBSEDML_EXTERN 2954 int 2955 SedDocument_isSetVersion(const SedDocument_t * sd); 2956 2957 2958 /** 2959 * Sets the value of the "level" attribute of this SedDocument_t. 2960 * 2961 * @param sd the SedDocument_t structure. 2962 * 2963 * @param level unsigned int value of the "level" attribute to be set. 2964 * 2965 * @copydetails doc_returns_success_code 2966 * @li @sedmlconstant{LIBSEDML_OPERATION_SUCCESS, OperationReturnValues_t} 2967 * @li @sedmlconstant{LIBSEDML_INVALID_ATTRIBUTE_VALUE, 2968 * OperationReturnValues_t} 2969 * @li @sedmlconstant{LIBSEDML_INVALID_OBJECT, OperationReturnValues_t} 2970 * 2971 * @memberof SedDocument_t 2972 */ 2973 LIBSEDML_EXTERN 2974 int 2975 SedDocument_setLevel(SedDocument_t * sd, unsigned int level); 2976 2977 2978 /** 2979 * Sets the value of the "version" attribute of this SedDocument_t. 2980 * 2981 * @param sd the SedDocument_t structure. 2982 * 2983 * @param version unsigned int value of the "version" attribute to be set. 2984 * 2985 * @copydetails doc_returns_success_code 2986 * @li @sedmlconstant{LIBSEDML_OPERATION_SUCCESS, OperationReturnValues_t} 2987 * @li @sedmlconstant{LIBSEDML_INVALID_ATTRIBUTE_VALUE, 2988 * OperationReturnValues_t} 2989 * @li @sedmlconstant{LIBSEDML_INVALID_OBJECT, OperationReturnValues_t} 2990 * 2991 * @memberof SedDocument_t 2992 */ 2993 LIBSEDML_EXTERN 2994 int 2995 SedDocument_setVersion(SedDocument_t * sd, unsigned int version); 2996 2997 2998 /** 2999 * Unsets the value of the "level" attribute of this SedDocument_t. 3000 * 3001 * @param sd the SedDocument_t structure. 3002 * 3003 * @copydetails doc_returns_success_code 3004 * @li @sedmlconstant{LIBSEDML_OPERATION_SUCCESS, OperationReturnValues_t} 3005 * @li @sedmlconstant{LIBSEDML_OPERATION_FAILED, OperationReturnValues_t} 3006 * @li @sedmlconstant{LIBSEDML_INVALID_OBJECT, OperationReturnValues_t} 3007 * 3008 * @memberof SedDocument_t 3009 */ 3010 LIBSEDML_EXTERN 3011 int 3012 SedDocument_unsetLevel(SedDocument_t * sd); 3013 3014 3015 /** 3016 * Unsets the value of the "version" attribute of this SedDocument_t. 3017 * 3018 * @param sd the SedDocument_t structure. 3019 * 3020 * @copydetails doc_returns_success_code 3021 * @li @sedmlconstant{LIBSEDML_OPERATION_SUCCESS, OperationReturnValues_t} 3022 * @li @sedmlconstant{LIBSEDML_OPERATION_FAILED, OperationReturnValues_t} 3023 * @li @sedmlconstant{LIBSEDML_INVALID_OBJECT, OperationReturnValues_t} 3024 * 3025 * @memberof SedDocument_t 3026 */ 3027 LIBSEDML_EXTERN 3028 int 3029 SedDocument_unsetVersion(SedDocument_t * sd); 3030 3031 3032 /** 3033 * Returns a ListOf_t * containing SedAlgorithmParameter_t objects from this 3034 * SedDocument_t. 3035 * 3036 * @param sa the SedDocument_t structure whose SedListOfAlgorithmParameters is 3037 * sought. 3038 * 3039 * @return the SedListOfAlgorithmParameters from this SedDocument_t as a 3040 * ListOf_t *. 3041 * 3042 * @copydetails doc_returned_unowned_pointer 3043 * 3044 * @see SedDocument_addAlgorithmParameter() 3045 * @see SedDocument_createAlgorithmParameter() 3046 * @see SedDocument_getAlgorithmParameterById() 3047 * @see SedDocument_getAlgorithmParameter() 3048 * @see SedDocument_getNumAlgorithmParameters() 3049 * @see SedDocument_removeAlgorithmParameterById() 3050 * @see SedDocument_removeAlgorithmParameter() 3051 * 3052 * @memberof SedDocument_t 3053 */ 3054 LIBSEDML_EXTERN 3055 SedListOf_t* 3056 SedDocument_getListOfAlgorithmParameters(SedDocument_t* sa); 3057 3058 3059 /** 3060 * Get a SedAlgorithmParameter_t from the SedDocument_t. 3061 * 3062 * @param sa the SedDocument_t structure to search. 3063 * 3064 * @param n an unsigned int representing the index of the 3065 * SedAlgorithmParameter_t to retrieve. 3066 * 3067 * @return the nth SedAlgorithmParameter_t in the SedListOfAlgorithmParameters 3068 * within this SedDocument or @c NULL if no such object exists. 3069 * 3070 * @copydetails doc_returned_unowned_pointer 3071 * 3072 * @memberof SedDocument_t 3073 */ 3074 LIBSEDML_EXTERN 3075 SedAlgorithmParameter_t* 3076 SedDocument_getAlgorithmParameter(SedDocument_t* sa, unsigned int n); 3077 3078 3079 /** 3080 * Adds a copy of the given SedAlgorithmParameter_t to this SedDocument_t. 3081 * 3082 * @param sa the SedDocument_t structure to which the SedAlgorithmParameter_t 3083 * should be added. 3084 * 3085 * @param sap the SedAlgorithmParameter_t object to add. 3086 * 3087 * @copydetails doc_returns_success_code 3088 * @li @sedmlconstant{LIBSEDML_OPERATION_SUCCESS, OperationReturnValues_t} 3089 * @li @sedmlconstant{LIBSEDML_OPERATION_FAILED, OperationReturnValues_t} 3090 * @li @sedmlconstant{LIBSEDML_INVALID_OBJECT, OperationReturnValues_t} 3091 * @li @sedmlconstant{LIBSEDML_LEVEL_MISMATCH, OperationReturnValues_t} 3092 * @li @sedmlconstant{LIBSEDML_VERSION_MISMATCH, OperationReturnValues_t} 3093 * @li @sedmlconstant{LIBSEDML_PKG_VERSION_MISMATCH, OperationReturnValues_t} 3094 * @li @sedmlconstant{LIBSEDML_DUPLICATE_OBJECT_ID, OperationReturnValues_t} 3095 * 3096 * @memberof SedDocument_t 3097 */ 3098 LIBSEDML_EXTERN 3099 int 3100 SedDocument_addAlgorithmParameter(SedDocument_t* sa, 3101 const SedAlgorithmParameter_t* sap); 3102 3103 3104 /** 3105 * Get the number of SedAlgorithmParameter_t objects in this SedDocument_t. 3106 * 3107 * @param sa the SedDocument_t structure to query. 3108 * 3109 * @return the number of SedAlgorithmParameter_t objects in this 3110 * SedDocument_t. 3111 * 3112 * @memberof SedDocument_t 3113 */ 3114 LIBSEDML_EXTERN 3115 unsigned int 3116 SedDocument_getNumAlgorithmParameters(SedDocument_t* sa); 3117 3118 3119 /** 3120 * Creates a new SedAlgorithmParameter_t object, adds it to this SedDocument_t 3121 * object and returns the SedAlgorithmParameter_t object created. 3122 * 3123 * @param sa the SedDocument_t structure to which the SedAlgorithmParameter_t 3124 * should be added. 3125 * 3126 * @return a new SedAlgorithmParameter_t object instance. 3127 * 3128 * @copydetails doc_returned_unowned_pointer 3129 * 3130 * @memberof SedDocument_t 3131 */ 3132 LIBSEDML_EXTERN 3133 SedAlgorithmParameter_t* 3134 SedDocument_createAlgorithmParameter(SedDocument_t* sa); 3135 3136 3137 /** 3138 * Removes the nth SedAlgorithmParameter_t from this SedDocument_t and returns 3139 * a pointer to it. 3140 * 3141 * @param sa the SedDocument_t structure to search. 3142 * 3143 * @param n an unsigned int representing the index of the 3144 * SedAlgorithmParameter_t to remove. 3145 * 3146 * @return a pointer to the nth SedAlgorithmParameter_t in this SedDocument_t. 3147 * 3148 * @copydetails doc_warning_returns_owned_pointer 3149 * 3150 * @memberof SedDocument_t 3151 */ 3152 LIBSEDML_EXTERN 3153 SedAlgorithmParameter_t* 3154 SedDocument_removeAlgorithmParameter(SedDocument_t* sa, unsigned int n); 3155 3156 3157 /** 3158 * Returns a ListOf_t * containing SedDataDescription_t objects from this 3159 * SedDocument_t. 3160 * 3161 * @param sd the SedDocument_t structure whose SedListOfDataDescriptions is 3162 * sought. 3163 * 3164 * @return the SedListOfDataDescriptions from this SedDocument_t as a ListOf_t 3165 * *. 3166 * 3167 * @copydetails doc_returned_unowned_pointer 3168 * 3169 * @see SedDocument_addDataDescription() 3170 * @see SedDocument_createDataDescription() 3171 * @see SedDocument_getDataDescriptionById() 3172 * @see SedDocument_getDataDescription() 3173 * @see SedDocument_getNumDataDescriptions() 3174 * @see SedDocument_removeDataDescriptionById() 3175 * @see SedDocument_removeDataDescription() 3176 * 3177 * @memberof SedDocument_t 3178 */ 3179 LIBSEDML_EXTERN 3180 SedListOf_t* 3181 SedDocument_getListOfDataDescriptions(SedDocument_t* sd); 3182 3183 3184 /** 3185 * Get a SedDataDescription_t from the SedDocument_t. 3186 * 3187 * @param sd the SedDocument_t structure to search. 3188 * 3189 * @param n an unsigned int representing the index of the SedDataDescription_t 3190 * to retrieve. 3191 * 3192 * @return the nth SedDataDescription_t in the SedListOfDataDescriptions within 3193 * this SedDocument or @c NULL if no such object exists. 3194 * 3195 * @copydetails doc_returned_unowned_pointer 3196 * 3197 * @memberof SedDocument_t 3198 */ 3199 LIBSEDML_EXTERN 3200 SedDataDescription_t* 3201 SedDocument_getDataDescription(SedDocument_t* sd, unsigned int n); 3202 3203 3204 /** 3205 * Get a SedDataDescription_t from the SedDocument_t based on its identifier. 3206 * 3207 * @param sd the SedDocument_t structure to search. 3208 * 3209 * @param sid a string representing the identifier of the SedDataDescription_t 3210 * to retrieve. 3211 * 3212 * @return the SedDataDescription_t in the SedListOfDataDescriptions within 3213 * this SedDocument with the given @p sid or @c NULL if no such 3214 * SedDataDescription_t exists. 3215 * 3216 * @copydetails doc_returned_unowned_pointer 3217 * 3218 * @memberof SedDocument_t 3219 */ 3220 LIBSEDML_EXTERN 3221 SedDataDescription_t* 3222 SedDocument_getDataDescriptionById(SedDocument_t* sd, const char *sid); 3223 3224 3225 /** 3226 * Adds a copy of the given SedDataDescription_t to this SedDocument_t. 3227 * 3228 * @param sd the SedDocument_t structure to which the SedDataDescription_t 3229 * should be added. 3230 * 3231 * @param sdd the SedDataDescription_t object to add. 3232 * 3233 * @copydetails doc_returns_success_code 3234 * @li @sedmlconstant{LIBSEDML_OPERATION_SUCCESS, OperationReturnValues_t} 3235 * @li @sedmlconstant{LIBSEDML_OPERATION_FAILED, OperationReturnValues_t} 3236 * @li @sedmlconstant{LIBSEDML_INVALID_OBJECT, OperationReturnValues_t} 3237 * @li @sedmlconstant{LIBSEDML_LEVEL_MISMATCH, OperationReturnValues_t} 3238 * @li @sedmlconstant{LIBSEDML_VERSION_MISMATCH, OperationReturnValues_t} 3239 * @li @sedmlconstant{LIBSEDML_PKG_VERSION_MISMATCH, OperationReturnValues_t} 3240 * @li @sedmlconstant{LIBSEDML_DUPLICATE_OBJECT_ID, OperationReturnValues_t} 3241 * 3242 * @memberof SedDocument_t 3243 */ 3244 LIBSEDML_EXTERN 3245 int 3246 SedDocument_addDataDescription(SedDocument_t* sd, 3247 const SedDataDescription_t* sdd); 3248 3249 3250 /** 3251 * Get the number of SedDataDescription_t objects in this SedDocument_t. 3252 * 3253 * @param sd the SedDocument_t structure to query. 3254 * 3255 * @return the number of SedDataDescription_t objects in this SedDocument_t. 3256 * 3257 * @memberof SedDocument_t 3258 */ 3259 LIBSEDML_EXTERN 3260 unsigned int 3261 SedDocument_getNumDataDescriptions(SedDocument_t* sd); 3262 3263 3264 /** 3265 * Creates a new SedDataDescription_t object, adds it to this SedDocument_t 3266 * object and returns the SedDataDescription_t object created. 3267 * 3268 * @param sd the SedDocument_t structure to which the SedDataDescription_t 3269 * should be added. 3270 * 3271 * @return a new SedDataDescription_t object instance. 3272 * 3273 * @copydetails doc_returned_unowned_pointer 3274 * 3275 * @memberof SedDocument_t 3276 */ 3277 LIBSEDML_EXTERN 3278 SedDataDescription_t* 3279 SedDocument_createDataDescription(SedDocument_t* sd); 3280 3281 3282 /** 3283 * Removes the nth SedDataDescription_t from this SedDocument_t and returns a 3284 * pointer to it. 3285 * 3286 * @param sd the SedDocument_t structure to search. 3287 * 3288 * @param n an unsigned int representing the index of the SedDataDescription_t 3289 * to remove. 3290 * 3291 * @return a pointer to the nth SedDataDescription_t in this SedDocument_t. 3292 * 3293 * @copydetails doc_warning_returns_owned_pointer 3294 * 3295 * @memberof SedDocument_t 3296 */ 3297 LIBSEDML_EXTERN 3298 SedDataDescription_t* 3299 SedDocument_removeDataDescription(SedDocument_t* sd, unsigned int n); 3300 3301 3302 /** 3303 * Removes the SedDataDescription_t from this SedDocument_t based on its 3304 * identifier and returns a pointer to it. 3305 * 3306 * @param sd the SedDocument_t structure to search. 3307 * 3308 * @param sid a string representing the identifier of the SedDataDescription_t 3309 * to remove. 3310 * 3311 * @return the SedDataDescription_t in this SedDocument_t based on the 3312 * identifier or NULL if no such SedDataDescription_t exists. 3313 * 3314 * @copydetails doc_warning_returns_owned_pointer 3315 * 3316 * @memberof SedDocument_t 3317 */ 3318 LIBSEDML_EXTERN 3319 SedDataDescription_t* 3320 SedDocument_removeDataDescriptionById(SedDocument_t* sd, const char* sid); 3321 3322 3323 /** 3324 * Returns a ListOf_t * containing SedModel_t objects from this SedDocument_t. 3325 * 3326 * @param sd the SedDocument_t structure whose SedListOfModels is sought. 3327 * 3328 * @return the SedListOfModels from this SedDocument_t as a ListOf_t *. 3329 * 3330 * @copydetails doc_returned_unowned_pointer 3331 * 3332 * @see SedDocument_addModel() 3333 * @see SedDocument_createModel() 3334 * @see SedDocument_getModelById() 3335 * @see SedDocument_getModel() 3336 * @see SedDocument_getNumModels() 3337 * @see SedDocument_removeModelById() 3338 * @see SedDocument_removeModel() 3339 * 3340 * @memberof SedDocument_t 3341 */ 3342 LIBSEDML_EXTERN 3343 SedListOf_t* 3344 SedDocument_getListOfModels(SedDocument_t* sd); 3345 3346 3347 /** 3348 * Get a SedModel_t from the SedDocument_t. 3349 * 3350 * @param sd the SedDocument_t structure to search. 3351 * 3352 * @param n an unsigned int representing the index of the SedModel_t to 3353 * retrieve. 3354 * 3355 * @return the nth SedModel_t in the SedListOfModels within this SedDocument or 3356 * @c NULL if no such object exists. 3357 * 3358 * @copydetails doc_returned_unowned_pointer 3359 * 3360 * @memberof SedDocument_t 3361 */ 3362 LIBSEDML_EXTERN 3363 SedModel_t* 3364 SedDocument_getModel(SedDocument_t* sd, unsigned int n); 3365 3366 3367 /** 3368 * Get a SedModel_t from the SedDocument_t based on its identifier. 3369 * 3370 * @param sd the SedDocument_t structure to search. 3371 * 3372 * @param sid a string representing the identifier of the SedModel_t to 3373 * retrieve. 3374 * 3375 * @return the SedModel_t in the SedListOfModels within this SedDocument with 3376 * the given @p sid or @c NULL if no such SedModel_t exists. 3377 * 3378 * @copydetails doc_returned_unowned_pointer 3379 * 3380 * @memberof SedDocument_t 3381 */ 3382 LIBSEDML_EXTERN 3383 SedModel_t* 3384 SedDocument_getModelById(SedDocument_t* sd, const char *sid); 3385 3386 3387 /** 3388 * Adds a copy of the given SedModel_t to this SedDocument_t. 3389 * 3390 * @param sd the SedDocument_t structure to which the SedModel_t should be 3391 * added. 3392 * 3393 * @param sm the SedModel_t object to add. 3394 * 3395 * @copydetails doc_returns_success_code 3396 * @li @sedmlconstant{LIBSEDML_OPERATION_SUCCESS, OperationReturnValues_t} 3397 * @li @sedmlconstant{LIBSEDML_OPERATION_FAILED, OperationReturnValues_t} 3398 * @li @sedmlconstant{LIBSEDML_INVALID_OBJECT, OperationReturnValues_t} 3399 * @li @sedmlconstant{LIBSEDML_LEVEL_MISMATCH, OperationReturnValues_t} 3400 * @li @sedmlconstant{LIBSEDML_VERSION_MISMATCH, OperationReturnValues_t} 3401 * @li @sedmlconstant{LIBSEDML_PKG_VERSION_MISMATCH, OperationReturnValues_t} 3402 * @li @sedmlconstant{LIBSEDML_DUPLICATE_OBJECT_ID, OperationReturnValues_t} 3403 * 3404 * @memberof SedDocument_t 3405 */ 3406 LIBSEDML_EXTERN 3407 int 3408 SedDocument_addModel(SedDocument_t* sd, const SedModel_t* sm); 3409 3410 3411 /** 3412 * Get the number of SedModel_t objects in this SedDocument_t. 3413 * 3414 * @param sd the SedDocument_t structure to query. 3415 * 3416 * @return the number of SedModel_t objects in this SedDocument_t. 3417 * 3418 * @memberof SedDocument_t 3419 */ 3420 LIBSEDML_EXTERN 3421 unsigned int 3422 SedDocument_getNumModels(SedDocument_t* sd); 3423 3424 3425 /** 3426 * Creates a new SedModel_t object, adds it to this SedDocument_t object and 3427 * returns the SedModel_t object created. 3428 * 3429 * @param sd the SedDocument_t structure to which the SedModel_t should be 3430 * added. 3431 * 3432 * @return a new SedModel_t object instance. 3433 * 3434 * @copydetails doc_returned_unowned_pointer 3435 * 3436 * @memberof SedDocument_t 3437 */ 3438 LIBSEDML_EXTERN 3439 SedModel_t* 3440 SedDocument_createModel(SedDocument_t* sd); 3441 3442 3443 /** 3444 * Removes the nth SedModel_t from this SedDocument_t and returns a pointer to 3445 * it. 3446 * 3447 * @param sd the SedDocument_t structure to search. 3448 * 3449 * @param n an unsigned int representing the index of the SedModel_t to remove. 3450 * 3451 * @return a pointer to the nth SedModel_t in this SedDocument_t. 3452 * 3453 * @copydetails doc_warning_returns_owned_pointer 3454 * 3455 * @memberof SedDocument_t 3456 */ 3457 LIBSEDML_EXTERN 3458 SedModel_t* 3459 SedDocument_removeModel(SedDocument_t* sd, unsigned int n); 3460 3461 3462 /** 3463 * Removes the SedModel_t from this SedDocument_t based on its identifier and 3464 * returns a pointer to it. 3465 * 3466 * @param sd the SedDocument_t structure to search. 3467 * 3468 * @param sid a string representing the identifier of the SedModel_t to remove. 3469 * 3470 * @return the SedModel_t in this SedDocument_t based on the identifier or NULL 3471 * if no such SedModel_t exists. 3472 * 3473 * @copydetails doc_warning_returns_owned_pointer 3474 * 3475 * @memberof SedDocument_t 3476 */ 3477 LIBSEDML_EXTERN 3478 SedModel_t* 3479 SedDocument_removeModelById(SedDocument_t* sd, const char* sid); 3480 3481 3482 /** 3483 * Returns a ListOf_t * containing SedSimulation_t objects from this 3484 * SedDocument_t. 3485 * 3486 * @param sd the SedDocument_t structure whose SedListOfSimulations is sought. 3487 * 3488 * @return the SedListOfSimulations from this SedDocument_t as a ListOf_t *. 3489 * 3490 * @copydetails doc_returned_unowned_pointer 3491 * 3492 * @see SedDocument_addSimulation() 3493 * @see SedDocument_createSimulation() 3494 * @see SedDocument_getSimulationById() 3495 * @see SedDocument_getSimulation() 3496 * @see SedDocument_getNumSimulations() 3497 * @see SedDocument_removeSimulationById() 3498 * @see SedDocument_removeSimulation() 3499 * 3500 * @memberof SedDocument_t 3501 */ 3502 LIBSEDML_EXTERN 3503 SedListOf_t* 3504 SedDocument_getListOfSimulations(SedDocument_t* sd); 3505 3506 3507 /** 3508 * Get a SedSimulation_t from the SedDocument_t. 3509 * 3510 * @param sd the SedDocument_t structure to search. 3511 * 3512 * @param n an unsigned int representing the index of the SedSimulation_t to 3513 * retrieve. 3514 * 3515 * @return the nth SedSimulation_t in the SedListOfSimulations within this 3516 * SedDocument or @c NULL if no such object exists. 3517 * 3518 * @copydetails doc_returned_unowned_pointer 3519 * 3520 * @memberof SedDocument_t 3521 */ 3522 LIBSEDML_EXTERN 3523 SedSimulation_t* 3524 SedDocument_getSimulation(SedDocument_t* sd, unsigned int n); 3525 3526 3527 /** 3528 * Get a SedSimulation_t from the SedDocument_t based on its identifier. 3529 * 3530 * @param sd the SedDocument_t structure to search. 3531 * 3532 * @param sid a string representing the identifier of the SedSimulation_t to 3533 * retrieve. 3534 * 3535 * @return the SedSimulation_t in the SedListOfSimulations within this 3536 * SedDocument with the given @p sid or @c NULL if no such SedSimulation_t 3537 * exists. 3538 * 3539 * @copydetails doc_returned_unowned_pointer 3540 * 3541 * @memberof SedDocument_t 3542 */ 3543 LIBSEDML_EXTERN 3544 SedSimulation_t* 3545 SedDocument_getSimulationById(SedDocument_t* sd, const char *sid); 3546 3547 3548 /** 3549 * Adds a copy of the given SedSimulation_t to this SedDocument_t. 3550 * 3551 * @param sd the SedDocument_t structure to which the SedSimulation_t should be 3552 * added. 3553 * 3554 * @param ss the SedSimulation_t object to add. 3555 * 3556 * @copydetails doc_returns_success_code 3557 * @li @sedmlconstant{LIBSEDML_OPERATION_SUCCESS, OperationReturnValues_t} 3558 * @li @sedmlconstant{LIBSEDML_OPERATION_FAILED, OperationReturnValues_t} 3559 * @li @sedmlconstant{LIBSEDML_INVALID_OBJECT, OperationReturnValues_t} 3560 * @li @sedmlconstant{LIBSEDML_LEVEL_MISMATCH, OperationReturnValues_t} 3561 * @li @sedmlconstant{LIBSEDML_VERSION_MISMATCH, OperationReturnValues_t} 3562 * @li @sedmlconstant{LIBSEDML_PKG_VERSION_MISMATCH, OperationReturnValues_t} 3563 * @li @sedmlconstant{LIBSEDML_DUPLICATE_OBJECT_ID, OperationReturnValues_t} 3564 * 3565 * @memberof SedDocument_t 3566 */ 3567 LIBSEDML_EXTERN 3568 int 3569 SedDocument_addSimulation(SedDocument_t* sd, const SedSimulation_t* ss); 3570 3571 3572 /** 3573 * Get the number of SedSimulation_t objects in this SedDocument_t. 3574 * 3575 * @param sd the SedDocument_t structure to query. 3576 * 3577 * @return the number of SedSimulation_t objects in this SedDocument_t. 3578 * 3579 * @memberof SedDocument_t 3580 */ 3581 LIBSEDML_EXTERN 3582 unsigned int 3583 SedDocument_getNumSimulations(SedDocument_t* sd); 3584 3585 3586 /** 3587 * Creates a new SedUniformTimeCourse_t object, adds it to this SedDocument_t 3588 * object and returns the SedUniformTimeCourse_t object created. 3589 * 3590 * @param sd the SedDocument_t structure to which the SedUniformTimeCourse_t 3591 * should be added. 3592 * 3593 * @return a new SedUniformTimeCourse_t object instance. 3594 * 3595 * @copydetails doc_returned_unowned_pointer 3596 * 3597 * @memberof SedDocument_t 3598 */ 3599 LIBSEDML_EXTERN 3600 SedUniformTimeCourse_t* 3601 SedDocument_createUniformTimeCourse(SedDocument_t* sd); 3602 3603 3604 /** 3605 * Creates a new SedOneStep_t object, adds it to this SedDocument_t object and 3606 * returns the SedOneStep_t object created. 3607 * 3608 * @param sd the SedDocument_t structure to which the SedOneStep_t should be 3609 * added. 3610 * 3611 * @return a new SedOneStep_t object instance. 3612 * 3613 * @copydetails doc_returned_unowned_pointer 3614 * 3615 * @memberof SedDocument_t 3616 */ 3617 LIBSEDML_EXTERN 3618 SedOneStep_t* 3619 SedDocument_createOneStep(SedDocument_t* sd); 3620 3621 3622 /** 3623 * Creates a new SedSteadyState_t object, adds it to this SedDocument_t object 3624 * and returns the SedSteadyState_t object created. 3625 * 3626 * @param sd the SedDocument_t structure to which the SedSteadyState_t should 3627 * be added. 3628 * 3629 * @return a new SedSteadyState_t object instance. 3630 * 3631 * @copydetails doc_returned_unowned_pointer 3632 * 3633 * @memberof SedDocument_t 3634 */ 3635 LIBSEDML_EXTERN 3636 SedSteadyState_t* 3637 SedDocument_createSteadyState(SedDocument_t* sd); 3638 3639 3640 /** 3641 * Creates a new SedAnalysis_t object, adds it to this SedDocument_t object 3642 * and returns the SedAnalysis_t object created. 3643 * 3644 * @param sd the SedDocument_t structure to which the SedAnalysis_t should 3645 * be added. 3646 * 3647 * @return a new SedAnalysis_t object instance. 3648 * 3649 * @copydetails doc_returned_unowned_pointer 3650 * 3651 * @memberof SedDocument_t 3652 */ 3653 LIBSEDML_EXTERN 3654 SedAnalysis_t* 3655 SedDocument_createAnalysis(SedDocument_t* sd); 3656 3657 3658 /** 3659 * Removes the nth SedSimulation_t from this SedDocument_t and returns a 3660 * pointer to it. 3661 * 3662 * @param sd the SedDocument_t structure to search. 3663 * 3664 * @param n an unsigned int representing the index of the SedSimulation_t to 3665 * remove. 3666 * 3667 * @return a pointer to the nth SedSimulation_t in this SedDocument_t. 3668 * 3669 * @copydetails doc_warning_returns_owned_pointer 3670 * 3671 * @memberof SedDocument_t 3672 */ 3673 LIBSEDML_EXTERN 3674 SedSimulation_t* 3675 SedDocument_removeSimulation(SedDocument_t* sd, unsigned int n); 3676 3677 3678 /** 3679 * Removes the SedSimulation_t from this SedDocument_t based on its identifier 3680 * and returns a pointer to it. 3681 * 3682 * @param sd the SedDocument_t structure to search. 3683 * 3684 * @param sid a string representing the identifier of the SedSimulation_t to 3685 * remove. 3686 * 3687 * @return the SedSimulation_t in this SedDocument_t based on the identifier or 3688 * NULL if no such SedSimulation_t exists. 3689 * 3690 * @copydetails doc_warning_returns_owned_pointer 3691 * 3692 * @memberof SedDocument_t 3693 */ 3694 LIBSEDML_EXTERN 3695 SedSimulation_t* 3696 SedDocument_removeSimulationById(SedDocument_t* sd, const char* sid); 3697 3698 3699 /** 3700 * Returns a ListOf_t * containing SedAbstractTask_t objects from this 3701 * SedDocument_t. 3702 * 3703 * @param sd the SedDocument_t structure whose SedListOfTasks is sought. 3704 * 3705 * @return the SedListOfTasks from this SedDocument_t as a ListOf_t *. 3706 * 3707 * @copydetails doc_returned_unowned_pointer 3708 * 3709 * @see SedDocument_addTask() 3710 * @see SedDocument_createTask() 3711 * @see SedDocument_getTaskById() 3712 * @see SedDocument_getTask() 3713 * @see SedDocument_getNumTasks() 3714 * @see SedDocument_removeTaskById() 3715 * @see SedDocument_removeTask() 3716 * 3717 * @memberof SedDocument_t 3718 */ 3719 LIBSEDML_EXTERN 3720 SedListOf_t* 3721 SedDocument_getListOfTasks(SedDocument_t* sd); 3722 3723 3724 /** 3725 * Get a SedAbstractTask_t from the SedDocument_t. 3726 * 3727 * @param sd the SedDocument_t structure to search. 3728 * 3729 * @param n an unsigned int representing the index of the SedAbstractTask_t to 3730 * retrieve. 3731 * 3732 * @return the nth SedAbstractTask_t in the SedListOfTasks within this 3733 * SedDocument or @c NULL if no such object exists. 3734 * 3735 * @copydetails doc_returned_unowned_pointer 3736 * 3737 * @memberof SedDocument_t 3738 */ 3739 LIBSEDML_EXTERN 3740 SedAbstractTask_t* 3741 SedDocument_getTask(SedDocument_t* sd, unsigned int n); 3742 3743 3744 /** 3745 * Get a SedAbstractTask_t from the SedDocument_t based on its identifier. 3746 * 3747 * @param sd the SedDocument_t structure to search. 3748 * 3749 * @param sid a string representing the identifier of the SedAbstractTask_t to 3750 * retrieve. 3751 * 3752 * @return the SedAbstractTask_t in the SedListOfTasks within this SedDocument 3753 * with the given @p sid or @c NULL if no such SedAbstractTask_t exists. 3754 * 3755 * @copydetails doc_returned_unowned_pointer 3756 * 3757 * @memberof SedDocument_t 3758 */ 3759 LIBSEDML_EXTERN 3760 SedAbstractTask_t* 3761 SedDocument_getTaskById(SedDocument_t* sd, const char *sid); 3762 3763 3764 /** 3765 * Adds a copy of the given SedAbstractTask_t to this SedDocument_t. 3766 * 3767 * @param sd the SedDocument_t structure to which the SedAbstractTask_t should 3768 * be added. 3769 * 3770 * @param sat the SedAbstractTask_t object to add. 3771 * 3772 * @copydetails doc_returns_success_code 3773 * @li @sedmlconstant{LIBSEDML_OPERATION_SUCCESS, OperationReturnValues_t} 3774 * @li @sedmlconstant{LIBSEDML_OPERATION_FAILED, OperationReturnValues_t} 3775 * @li @sedmlconstant{LIBSEDML_INVALID_OBJECT, OperationReturnValues_t} 3776 * @li @sedmlconstant{LIBSEDML_LEVEL_MISMATCH, OperationReturnValues_t} 3777 * @li @sedmlconstant{LIBSEDML_VERSION_MISMATCH, OperationReturnValues_t} 3778 * @li @sedmlconstant{LIBSEDML_PKG_VERSION_MISMATCH, OperationReturnValues_t} 3779 * @li @sedmlconstant{LIBSEDML_DUPLICATE_OBJECT_ID, OperationReturnValues_t} 3780 * 3781 * @memberof SedDocument_t 3782 */ 3783 LIBSEDML_EXTERN 3784 int 3785 SedDocument_addTask(SedDocument_t* sd, const SedAbstractTask_t* sat); 3786 3787 3788 /** 3789 * Get the number of SedAbstractTask_t objects in this SedDocument_t. 3790 * 3791 * @param sd the SedDocument_t structure to query. 3792 * 3793 * @return the number of SedAbstractTask_t objects in this SedDocument_t. 3794 * 3795 * @memberof SedDocument_t 3796 */ 3797 LIBSEDML_EXTERN 3798 unsigned int 3799 SedDocument_getNumTasks(SedDocument_t* sd); 3800 3801 3802 /** 3803 * Creates a new SedTask_t object, adds it to this SedDocument_t object and 3804 * returns the SedTask_t object created. 3805 * 3806 * @param sd the SedDocument_t structure to which the SedTask_t should be 3807 * added. 3808 * 3809 * @return a new SedTask_t object instance. 3810 * 3811 * @copydetails doc_returned_unowned_pointer 3812 * 3813 * @memberof SedDocument_t 3814 */ 3815 LIBSEDML_EXTERN 3816 SedTask_t* 3817 SedDocument_createTask(SedDocument_t* sd); 3818 3819 3820 /** 3821 * Creates a new SedRepeatedTask_t object, adds it to this SedDocument_t object 3822 * and returns the SedRepeatedTask_t object created. 3823 * 3824 * @param sd the SedDocument_t structure to which the SedRepeatedTask_t should 3825 * be added. 3826 * 3827 * @return a new SedRepeatedTask_t object instance. 3828 * 3829 * @copydetails doc_returned_unowned_pointer 3830 * 3831 * @memberof SedDocument_t 3832 */ 3833 LIBSEDML_EXTERN 3834 SedRepeatedTask_t* 3835 SedDocument_createRepeatedTask(SedDocument_t* sd); 3836 3837 3838 /** 3839 * Creates a new SedParameterEstimationTask_t object, adds it to this 3840 * SedDocument_t object and returns the SedParameterEstimationTask_t object 3841 * created. 3842 * 3843 * @param sd the SedDocument_t structure to which the 3844 * SedParameterEstimationTask_t should be added. 3845 * 3846 * @return a new SedParameterEstimationTask_t object instance. 3847 * 3848 * @copydetails doc_returned_unowned_pointer 3849 * 3850 * @memberof SedDocument_t 3851 */ 3852 LIBSEDML_EXTERN 3853 SedParameterEstimationTask_t* 3854 SedDocument_createParameterEstimationTask(SedDocument_t* sd); 3855 3856 3857 /** 3858 * Removes the nth SedAbstractTask_t from this SedDocument_t and returns a 3859 * pointer to it. 3860 * 3861 * @param sd the SedDocument_t structure to search. 3862 * 3863 * @param n an unsigned int representing the index of the SedAbstractTask_t to 3864 * remove. 3865 * 3866 * @return a pointer to the nth SedAbstractTask_t in this SedDocument_t. 3867 * 3868 * @copydetails doc_warning_returns_owned_pointer 3869 * 3870 * @memberof SedDocument_t 3871 */ 3872 LIBSEDML_EXTERN 3873 SedAbstractTask_t* 3874 SedDocument_removeTask(SedDocument_t* sd, unsigned int n); 3875 3876 3877 /** 3878 * Removes the SedAbstractTask_t from this SedDocument_t based on its 3879 * identifier and returns a pointer to it. 3880 * 3881 * @param sd the SedDocument_t structure to search. 3882 * 3883 * @param sid a string representing the identifier of the SedAbstractTask_t to 3884 * remove. 3885 * 3886 * @return the SedAbstractTask_t in this SedDocument_t based on the identifier 3887 * or NULL if no such SedAbstractTask_t exists. 3888 * 3889 * @copydetails doc_warning_returns_owned_pointer 3890 * 3891 * @memberof SedDocument_t 3892 */ 3893 LIBSEDML_EXTERN 3894 SedAbstractTask_t* 3895 SedDocument_removeTaskById(SedDocument_t* sd, const char* sid); 3896 3897 3898 /** 3899 * Returns a ListOf_t * containing SedDataGenerator_t objects from this 3900 * SedDocument_t. 3901 * 3902 * @param sd the SedDocument_t structure whose SedListOfDataGenerators is 3903 * sought. 3904 * 3905 * @return the SedListOfDataGenerators from this SedDocument_t as a ListOf_t *. 3906 * 3907 * @copydetails doc_returned_unowned_pointer 3908 * 3909 * @see SedDocument_addDataGenerator() 3910 * @see SedDocument_createDataGenerator() 3911 * @see SedDocument_getDataGeneratorById() 3912 * @see SedDocument_getDataGenerator() 3913 * @see SedDocument_getNumDataGenerators() 3914 * @see SedDocument_removeDataGeneratorById() 3915 * @see SedDocument_removeDataGenerator() 3916 * 3917 * @memberof SedDocument_t 3918 */ 3919 LIBSEDML_EXTERN 3920 SedListOf_t* 3921 SedDocument_getListOfDataGenerators(SedDocument_t* sd); 3922 3923 3924 /** 3925 * Get a SedDataGenerator_t from the SedDocument_t. 3926 * 3927 * @param sd the SedDocument_t structure to search. 3928 * 3929 * @param n an unsigned int representing the index of the SedDataGenerator_t to 3930 * retrieve. 3931 * 3932 * @return the nth SedDataGenerator_t in the SedListOfDataGenerators within 3933 * this SedDocument or @c NULL if no such object exists. 3934 * 3935 * @copydetails doc_returned_unowned_pointer 3936 * 3937 * @memberof SedDocument_t 3938 */ 3939 LIBSEDML_EXTERN 3940 SedDataGenerator_t* 3941 SedDocument_getDataGenerator(SedDocument_t* sd, unsigned int n); 3942 3943 3944 /** 3945 * Get a SedDataGenerator_t from the SedDocument_t based on its identifier. 3946 * 3947 * @param sd the SedDocument_t structure to search. 3948 * 3949 * @param sid a string representing the identifier of the SedDataGenerator_t to 3950 * retrieve. 3951 * 3952 * @return the SedDataGenerator_t in the SedListOfDataGenerators within this 3953 * SedDocument with the given @p sid or @c NULL if no such SedDataGenerator_t 3954 * exists. 3955 * 3956 * @copydetails doc_returned_unowned_pointer 3957 * 3958 * @memberof SedDocument_t 3959 */ 3960 LIBSEDML_EXTERN 3961 SedDataGenerator_t* 3962 SedDocument_getDataGeneratorById(SedDocument_t* sd, const char *sid); 3963 3964 3965 /** 3966 * Adds a copy of the given SedDataGenerator_t to this SedDocument_t. 3967 * 3968 * @param sd the SedDocument_t structure to which the SedDataGenerator_t should 3969 * be added. 3970 * 3971 * @param sdg the SedDataGenerator_t object to add. 3972 * 3973 * @copydetails doc_returns_success_code 3974 * @li @sedmlconstant{LIBSEDML_OPERATION_SUCCESS, OperationReturnValues_t} 3975 * @li @sedmlconstant{LIBSEDML_OPERATION_FAILED, OperationReturnValues_t} 3976 * @li @sedmlconstant{LIBSEDML_INVALID_OBJECT, OperationReturnValues_t} 3977 * @li @sedmlconstant{LIBSEDML_LEVEL_MISMATCH, OperationReturnValues_t} 3978 * @li @sedmlconstant{LIBSEDML_VERSION_MISMATCH, OperationReturnValues_t} 3979 * @li @sedmlconstant{LIBSEDML_PKG_VERSION_MISMATCH, OperationReturnValues_t} 3980 * @li @sedmlconstant{LIBSEDML_DUPLICATE_OBJECT_ID, OperationReturnValues_t} 3981 * 3982 * @memberof SedDocument_t 3983 */ 3984 LIBSEDML_EXTERN 3985 int 3986 SedDocument_addDataGenerator(SedDocument_t* sd, 3987 const SedDataGenerator_t* sdg); 3988 3989 3990 /** 3991 * Get the number of SedDataGenerator_t objects in this SedDocument_t. 3992 * 3993 * @param sd the SedDocument_t structure to query. 3994 * 3995 * @return the number of SedDataGenerator_t objects in this SedDocument_t. 3996 * 3997 * @memberof SedDocument_t 3998 */ 3999 LIBSEDML_EXTERN 4000 unsigned int 4001 SedDocument_getNumDataGenerators(SedDocument_t* sd); 4002 4003 4004 /** 4005 * Creates a new SedDataGenerator_t object, adds it to this SedDocument_t 4006 * object and returns the SedDataGenerator_t object created. 4007 * 4008 * @param sd the SedDocument_t structure to which the SedDataGenerator_t should 4009 * be added. 4010 * 4011 * @return a new SedDataGenerator_t object instance. 4012 * 4013 * @copydetails doc_returned_unowned_pointer 4014 * 4015 * @memberof SedDocument_t 4016 */ 4017 LIBSEDML_EXTERN 4018 SedDataGenerator_t* 4019 SedDocument_createDataGenerator(SedDocument_t* sd); 4020 4021 4022 /** 4023 * Removes the nth SedDataGenerator_t from this SedDocument_t and returns a 4024 * pointer to it. 4025 * 4026 * @param sd the SedDocument_t structure to search. 4027 * 4028 * @param n an unsigned int representing the index of the SedDataGenerator_t to 4029 * remove. 4030 * 4031 * @return a pointer to the nth SedDataGenerator_t in this SedDocument_t. 4032 * 4033 * @copydetails doc_warning_returns_owned_pointer 4034 * 4035 * @memberof SedDocument_t 4036 */ 4037 LIBSEDML_EXTERN 4038 SedDataGenerator_t* 4039 SedDocument_removeDataGenerator(SedDocument_t* sd, unsigned int n); 4040 4041 4042 /** 4043 * Removes the SedDataGenerator_t from this SedDocument_t based on its 4044 * identifier and returns a pointer to it. 4045 * 4046 * @param sd the SedDocument_t structure to search. 4047 * 4048 * @param sid a string representing the identifier of the SedDataGenerator_t to 4049 * remove. 4050 * 4051 * @return the SedDataGenerator_t in this SedDocument_t based on the identifier 4052 * or NULL if no such SedDataGenerator_t exists. 4053 * 4054 * @copydetails doc_warning_returns_owned_pointer 4055 * 4056 * @memberof SedDocument_t 4057 */ 4058 LIBSEDML_EXTERN 4059 SedDataGenerator_t* 4060 SedDocument_removeDataGeneratorById(SedDocument_t* sd, const char* sid); 4061 4062 4063 /** 4064 * Returns a ListOf_t * containing SedOutput_t objects from this SedDocument_t. 4065 * 4066 * @param sd the SedDocument_t structure whose SedListOfOutputs is sought. 4067 * 4068 * @return the SedListOfOutputs from this SedDocument_t as a ListOf_t *. 4069 * 4070 * @copydetails doc_returned_unowned_pointer 4071 * 4072 * @see SedDocument_addOutput() 4073 * @see SedDocument_createOutput() 4074 * @see SedDocument_getOutputById() 4075 * @see SedDocument_getOutput() 4076 * @see SedDocument_getNumOutputs() 4077 * @see SedDocument_removeOutputById() 4078 * @see SedDocument_removeOutput() 4079 * 4080 * @memberof SedDocument_t 4081 */ 4082 LIBSEDML_EXTERN 4083 SedListOf_t* 4084 SedDocument_getListOfOutputs(SedDocument_t* sd); 4085 4086 4087 /** 4088 * Get a SedOutput_t from the SedDocument_t. 4089 * 4090 * @param sd the SedDocument_t structure to search. 4091 * 4092 * @param n an unsigned int representing the index of the SedOutput_t to 4093 * retrieve. 4094 * 4095 * @return the nth SedOutput_t in the SedListOfOutputs within this SedDocument 4096 * or @c NULL if no such object exists. 4097 * 4098 * @copydetails doc_returned_unowned_pointer 4099 * 4100 * @memberof SedDocument_t 4101 */ 4102 LIBSEDML_EXTERN 4103 SedOutput_t* 4104 SedDocument_getOutput(SedDocument_t* sd, unsigned int n); 4105 4106 4107 /** 4108 * Get a SedOutput_t from the SedDocument_t based on its identifier. 4109 * 4110 * @param sd the SedDocument_t structure to search. 4111 * 4112 * @param sid a string representing the identifier of the SedOutput_t to 4113 * retrieve. 4114 * 4115 * @return the SedOutput_t in the SedListOfOutputs within this SedDocument with 4116 * the given @p sid or @c NULL if no such SedOutput_t exists. 4117 * 4118 * @copydetails doc_returned_unowned_pointer 4119 * 4120 * @memberof SedDocument_t 4121 */ 4122 LIBSEDML_EXTERN 4123 SedOutput_t* 4124 SedDocument_getOutputById(SedDocument_t* sd, const char *sid); 4125 4126 4127 /** 4128 * Adds a copy of the given SedOutput_t to this SedDocument_t. 4129 * 4130 * @param sd the SedDocument_t structure to which the SedOutput_t should be 4131 * added. 4132 * 4133 * @param so the SedOutput_t object to add. 4134 * 4135 * @copydetails doc_returns_success_code 4136 * @li @sedmlconstant{LIBSEDML_OPERATION_SUCCESS, OperationReturnValues_t} 4137 * @li @sedmlconstant{LIBSEDML_OPERATION_FAILED, OperationReturnValues_t} 4138 * @li @sedmlconstant{LIBSEDML_INVALID_OBJECT, OperationReturnValues_t} 4139 * @li @sedmlconstant{LIBSEDML_LEVEL_MISMATCH, OperationReturnValues_t} 4140 * @li @sedmlconstant{LIBSEDML_VERSION_MISMATCH, OperationReturnValues_t} 4141 * @li @sedmlconstant{LIBSEDML_PKG_VERSION_MISMATCH, OperationReturnValues_t} 4142 * @li @sedmlconstant{LIBSEDML_DUPLICATE_OBJECT_ID, OperationReturnValues_t} 4143 * 4144 * @memberof SedDocument_t 4145 */ 4146 LIBSEDML_EXTERN 4147 int 4148 SedDocument_addOutput(SedDocument_t* sd, const SedOutput_t* so); 4149 4150 4151 /** 4152 * Get the number of SedOutput_t objects in this SedDocument_t. 4153 * 4154 * @param sd the SedDocument_t structure to query. 4155 * 4156 * @return the number of SedOutput_t objects in this SedDocument_t. 4157 * 4158 * @memberof SedDocument_t 4159 */ 4160 LIBSEDML_EXTERN 4161 unsigned int 4162 SedDocument_getNumOutputs(SedDocument_t* sd); 4163 4164 4165 /** 4166 * Creates a new SedReport_t object, adds it to this SedDocument_t object and 4167 * returns the SedReport_t object created. 4168 * 4169 * @param sd the SedDocument_t structure to which the SedReport_t should be 4170 * added. 4171 * 4172 * @return a new SedReport_t object instance. 4173 * 4174 * @copydetails doc_returned_unowned_pointer 4175 * 4176 * @memberof SedDocument_t 4177 */ 4178 LIBSEDML_EXTERN 4179 SedReport_t* 4180 SedDocument_createReport(SedDocument_t* sd); 4181 4182 4183 /** 4184 * Creates a new SedPlot2D_t object, adds it to this SedDocument_t object and 4185 * returns the SedPlot2D_t object created. 4186 * 4187 * @param sd the SedDocument_t structure to which the SedPlot2D_t should be 4188 * added. 4189 * 4190 * @return a new SedPlot2D_t object instance. 4191 * 4192 * @copydetails doc_returned_unowned_pointer 4193 * 4194 * @memberof SedDocument_t 4195 */ 4196 LIBSEDML_EXTERN 4197 SedPlot2D_t* 4198 SedDocument_createPlot2D(SedDocument_t* sd); 4199 4200 4201 /** 4202 * Creates a new SedPlot3D_t object, adds it to this SedDocument_t object and 4203 * returns the SedPlot3D_t object created. 4204 * 4205 * @param sd the SedDocument_t structure to which the SedPlot3D_t should be 4206 * added. 4207 * 4208 * @return a new SedPlot3D_t object instance. 4209 * 4210 * @copydetails doc_returned_unowned_pointer 4211 * 4212 * @memberof SedDocument_t 4213 */ 4214 LIBSEDML_EXTERN 4215 SedPlot3D_t* 4216 SedDocument_createPlot3D(SedDocument_t* sd); 4217 4218 4219 /** 4220 * Creates a new SedFigure_t object, adds it to this SedDocument_t object and 4221 * returns the SedFigure_t object created. 4222 * 4223 * @param sd the SedDocument_t structure to which the SedFigure_t should be 4224 * added. 4225 * 4226 * @return a new SedFigure_t object instance. 4227 * 4228 * @copydetails doc_returned_unowned_pointer 4229 * 4230 * @memberof SedDocument_t 4231 */ 4232 LIBSEDML_EXTERN 4233 SedFigure_t* 4234 SedDocument_createFigure(SedDocument_t* sd); 4235 4236 4237 /** 4238 * Creates a new SedParameterEstimationResultPlot_t object, adds it to this 4239 * SedDocument_t object and returns the SedParameterEstimationResultPlot_t 4240 * object created. 4241 * 4242 * @param sd the SedDocument_t structure to which the 4243 * SedParameterEstimationResultPlot_t should be added. 4244 * 4245 * @return a new SedParameterEstimationResultPlot_t object instance. 4246 * 4247 * @copydetails doc_returned_unowned_pointer 4248 * 4249 * @memberof SedDocument_t 4250 */ 4251 LIBSEDML_EXTERN 4252 SedParameterEstimationResultPlot_t* 4253 SedDocument_createParameterEstimationResultPlot(SedDocument_t* sd); 4254 4255 4256 /** 4257 * Removes the nth SedOutput_t from this SedDocument_t and returns a pointer to 4258 * it. 4259 * 4260 * @param sd the SedDocument_t structure to search. 4261 * 4262 * @param n an unsigned int representing the index of the SedOutput_t to 4263 * remove. 4264 * 4265 * @return a pointer to the nth SedOutput_t in this SedDocument_t. 4266 * 4267 * @copydetails doc_warning_returns_owned_pointer 4268 * 4269 * @memberof SedDocument_t 4270 */ 4271 LIBSEDML_EXTERN 4272 SedOutput_t* 4273 SedDocument_removeOutput(SedDocument_t* sd, unsigned int n); 4274 4275 4276 /** 4277 * Removes the SedOutput_t from this SedDocument_t based on its identifier and 4278 * returns a pointer to it. 4279 * 4280 * @param sd the SedDocument_t structure to search. 4281 * 4282 * @param sid a string representing the identifier of the SedOutput_t to 4283 * remove. 4284 * 4285 * @return the SedOutput_t in this SedDocument_t based on the identifier or 4286 * NULL if no such SedOutput_t exists. 4287 * 4288 * @copydetails doc_warning_returns_owned_pointer 4289 * 4290 * @memberof SedDocument_t 4291 */ 4292 LIBSEDML_EXTERN 4293 SedOutput_t* 4294 SedDocument_removeOutputById(SedDocument_t* sd, const char* sid); 4295 4296 4297 /** 4298 * Returns a ListOf_t * containing SedStyle_t objects from this SedDocument_t. 4299 * 4300 * @param sd the SedDocument_t structure whose SedListOfStyles is sought. 4301 * 4302 * @return the SedListOfStyles from this SedDocument_t as a ListOf_t *. 4303 * 4304 * @copydetails doc_returned_unowned_pointer 4305 * 4306 * @see SedDocument_addStyle() 4307 * @see SedDocument_createStyle() 4308 * @see SedDocument_getStyleById() 4309 * @see SedDocument_getStyle() 4310 * @see SedDocument_getNumStyles() 4311 * @see SedDocument_removeStyleById() 4312 * @see SedDocument_removeStyle() 4313 * 4314 * @memberof SedDocument_t 4315 */ 4316 LIBSEDML_EXTERN 4317 SedListOf_t* 4318 SedDocument_getListOfStyles(SedDocument_t* sd); 4319 4320 4321 /** 4322 * Get a SedStyle_t from the SedDocument_t. 4323 * 4324 * @param sd the SedDocument_t structure to search. 4325 * 4326 * @param n an unsigned int representing the index of the SedStyle_t to 4327 * retrieve. 4328 * 4329 * @return the nth SedStyle_t in the SedListOfStyles within this SedDocument or 4330 * @c NULL if no such object exists. 4331 * 4332 * @copydetails doc_returned_unowned_pointer 4333 * 4334 * @memberof SedDocument_t 4335 */ 4336 LIBSEDML_EXTERN 4337 SedStyle_t* 4338 SedDocument_getStyle(SedDocument_t* sd, unsigned int n); 4339 4340 4341 /** 4342 * Get a SedStyle_t from the SedDocument_t based on its identifier. 4343 * 4344 * @param sd the SedDocument_t structure to search. 4345 * 4346 * @param sid a string representing the identifier of the SedStyle_t to 4347 * retrieve. 4348 * 4349 * @return the SedStyle_t in the SedListOfStyles within this SedDocument with 4350 * the given @p sid or @c NULL if no such SedStyle_t exists. 4351 * 4352 * @copydetails doc_returned_unowned_pointer 4353 * 4354 * @memberof SedDocument_t 4355 */ 4356 LIBSEDML_EXTERN 4357 SedStyle_t* 4358 SedDocument_getStyleById(SedDocument_t* sd, const char *sid); 4359 4360 4361 /** 4362 * Get a SedStyle_t from the SedDocument_t based on the BaseStyle to which it 4363 * refers. 4364 * 4365 * @param sd the SedDocument_t structure to search. 4366 * 4367 * @param sid a string representing the "baseStyle" attribute of the SedStyle_t 4368 * object to retrieve. 4369 * 4370 * @return the first SedStyle_t in this SedDocument_t based on the given 4371 * baseStyle attribute or NULL if no such SedStyle_t exists. 4372 * 4373 * @copydetails doc_returned_unowned_pointer 4374 * 4375 * @memberof SedDocument_t 4376 */ 4377 LIBSEDML_EXTERN 4378 SedStyle_t* 4379 SedDocument_getStyleByBaseStyle(SedDocument_t* sd, const char *sid); 4380 4381 4382 /** 4383 * Adds a copy of the given SedStyle_t to this SedDocument_t. 4384 * 4385 * @param sd the SedDocument_t structure to which the SedStyle_t should be 4386 * added. 4387 * 4388 * @param ss the SedStyle_t object to add. 4389 * 4390 * @copydetails doc_returns_success_code 4391 * @li @sedmlconstant{LIBSEDML_OPERATION_SUCCESS, OperationReturnValues_t} 4392 * @li @sedmlconstant{LIBSEDML_OPERATION_FAILED, OperationReturnValues_t} 4393 * @li @sedmlconstant{LIBSEDML_INVALID_OBJECT, OperationReturnValues_t} 4394 * @li @sedmlconstant{LIBSEDML_LEVEL_MISMATCH, OperationReturnValues_t} 4395 * @li @sedmlconstant{LIBSEDML_VERSION_MISMATCH, OperationReturnValues_t} 4396 * @li @sedmlconstant{LIBSEDML_PKG_VERSION_MISMATCH, OperationReturnValues_t} 4397 * @li @sedmlconstant{LIBSEDML_DUPLICATE_OBJECT_ID, OperationReturnValues_t} 4398 * 4399 * @memberof SedDocument_t 4400 */ 4401 LIBSEDML_EXTERN 4402 int 4403 SedDocument_addStyle(SedDocument_t* sd, const SedStyle_t* ss); 4404 4405 4406 /** 4407 * Get the number of SedStyle_t objects in this SedDocument_t. 4408 * 4409 * @param sd the SedDocument_t structure to query. 4410 * 4411 * @return the number of SedStyle_t objects in this SedDocument_t. 4412 * 4413 * @memberof SedDocument_t 4414 */ 4415 LIBSEDML_EXTERN 4416 unsigned int 4417 SedDocument_getNumStyles(SedDocument_t* sd); 4418 4419 4420 /** 4421 * Creates a new SedStyle_t object, adds it to this SedDocument_t object and 4422 * returns the SedStyle_t object created. 4423 * 4424 * @param sd the SedDocument_t structure to which the SedStyle_t should be 4425 * added. 4426 * 4427 * @return a new SedStyle_t object instance. 4428 * 4429 * @copydetails doc_returned_unowned_pointer 4430 * 4431 * @memberof SedDocument_t 4432 */ 4433 LIBSEDML_EXTERN 4434 SedStyle_t* 4435 SedDocument_createStyle(SedDocument_t* sd); 4436 4437 4438 /** 4439 * Removes the nth SedStyle_t from this SedDocument_t and returns a pointer to 4440 * it. 4441 * 4442 * @param sd the SedDocument_t structure to search. 4443 * 4444 * @param n an unsigned int representing the index of the SedStyle_t to remove. 4445 * 4446 * @return a pointer to the nth SedStyle_t in this SedDocument_t. 4447 * 4448 * @copydetails doc_warning_returns_owned_pointer 4449 * 4450 * @memberof SedDocument_t 4451 */ 4452 LIBSEDML_EXTERN 4453 SedStyle_t* 4454 SedDocument_removeStyle(SedDocument_t* sd, unsigned int n); 4455 4456 4457 /** 4458 * Removes the SedStyle_t from this SedDocument_t based on its identifier and 4459 * returns a pointer to it. 4460 * 4461 * @param sd the SedDocument_t structure to search. 4462 * 4463 * @param sid a string representing the identifier of the SedStyle_t to remove. 4464 * 4465 * @return the SedStyle_t in this SedDocument_t based on the identifier or NULL 4466 * if no such SedStyle_t exists. 4467 * 4468 * @copydetails doc_warning_returns_owned_pointer 4469 * 4470 * @memberof SedDocument_t 4471 */ 4472 LIBSEDML_EXTERN 4473 SedStyle_t* 4474 SedDocument_removeStyleById(SedDocument_t* sd, const char* sid); 4475 4476 4477 /** 4478 * Predicate returning @c 1 (true) if all the required attributes for this 4479 * SedDocument_t object have been set. 4480 * 4481 * @param sd the SedDocument_t structure. 4482 * 4483 * @return @c 1 (true) to indicate that all the required attributes of this 4484 * SedDocument_t have been set, otherwise @c 0 (false) is returned. 4485 * 4486 * 4487 * @note The required attributes for the SedDocument_t object are: 4488 * @li "level" 4489 * @li "version" 4490 * 4491 * @memberof SedDocument_t 4492 */ 4493 LIBSEDML_EXTERN 4494 int 4495 SedDocument_hasRequiredAttributes(const SedDocument_t * sd); 4496 4497 4498 4499 4500 END_C_DECLS 4501 4502 4503 4504 4505 LIBSEDML_CPP_NAMESPACE_END 4506 4507 4508 4509 4510 #endif /* !SWIG */ 4511 4512 4513 4514 4515 #endif /* !SedDocument_H__ */ 4516 4517 4518