1 /** 2 * @file SedRepeatedTask.h 3 * @brief Definition of the SedRepeatedTask 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 SedRepeatedTask 35 * @sbmlbrief{sedml} TODO:Definition of the SedRepeatedTask class. 36 */ 37 38 39 #ifndef SedRepeatedTask_H__ 40 #define SedRepeatedTask_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/SedAbstractTask.h> 54 #include <sedml/SedListOfRanges.h> 55 #include <sedml/SedListOfSetValues.h> 56 #include <sedml/SedListOfSubTasks.h> 57 #include <sbml/common/libsbml-namespace.h> 58 59 60 LIBSEDML_CPP_NAMESPACE_BEGIN 61 62 63 class LIBSEDML_EXTERN SedRepeatedTask : public SedAbstractTask 64 { 65 protected: 66 67 /** @cond doxygenLibSEDMLInternal */ 68 69 std::string mRange; 70 bool mResetModel; 71 bool mIsSetResetModel; 72 bool mConcatenate; 73 bool mIsSetConcatenate; 74 SedListOfRanges mRanges; 75 SedListOfSetValues mSetValues; 76 SedListOfSubTasks mSubTasks; 77 78 /** @endcond */ 79 80 public: 81 82 /** 83 * Creates a new SedRepeatedTask using the given SED-ML Level and @ p version 84 * values. 85 * 86 * @param level an unsigned int, the SED-ML Level to assign to this 87 * SedRepeatedTask. 88 * 89 * @param version an unsigned int, the SED-ML Version to assign to this 90 * SedRepeatedTask. 91 * 92 * @copydetails doc_note_setting_lv_pkg 93 */ 94 SedRepeatedTask(unsigned int level = SEDML_DEFAULT_LEVEL, 95 unsigned int version = SEDML_DEFAULT_VERSION); 96 97 98 /** 99 * Creates a new SedRepeatedTask using the given SedNamespaces object @p 100 * sedmlns. 101 * 102 * @param sedmlns the SedNamespaces object. 103 * 104 * @copydetails doc_note_setting_lv_pkg 105 */ 106 SedRepeatedTask(SedNamespaces *sedmlns); 107 108 109 /** 110 * Copy constructor for SedRepeatedTask. 111 * 112 * @param orig the SedRepeatedTask instance to copy. 113 */ 114 SedRepeatedTask(const SedRepeatedTask& orig); 115 116 117 /** 118 * Assignment operator for SedRepeatedTask. 119 * 120 * @param rhs the SedRepeatedTask object whose values are to be used as the 121 * basis of the assignment. 122 */ 123 SedRepeatedTask& operator=(const SedRepeatedTask& rhs); 124 125 126 /** 127 * Creates and returns a deep copy of this SedRepeatedTask object. 128 * 129 * @return a (deep) copy of this SedRepeatedTask object. 130 */ 131 virtual SedRepeatedTask* clone() const; 132 133 134 /** 135 * Destructor for SedRepeatedTask. 136 */ 137 virtual ~SedRepeatedTask(); 138 139 140 /** 141 * Returns the value of the "range" attribute of this SedRepeatedTask. 142 * 143 * @return the value of the "range" attribute of this SedRepeatedTask as a 144 * string. 145 */ 146 const std::string& getRangeId() const; 147 148 149 /** 150 * Returns the value of the "resetModel" attribute of this SedRepeatedTask. 151 * 152 * @return the value of the "resetModel" attribute of this SedRepeatedTask as 153 * a boolean. 154 */ 155 bool getResetModel() const; 156 157 158 /** 159 * Returns the value of the "concatenate" attribute of this SedRepeatedTask. 160 * 161 * @return the value of the "concatenate" attribute of this SedRepeatedTask as 162 * a boolean. 163 */ 164 bool getConcatenate() const; 165 166 167 /** 168 * Predicate returning @c true if this SedRepeatedTask's "range" attribute is 169 * set. 170 * 171 * @return @c true if this SedRepeatedTask's "range" attribute has been set, 172 * otherwise @c false is returned. 173 */ 174 bool isSetRangeId() const; 175 176 177 /** 178 * Predicate returning @c true if this SedRepeatedTask's "resetModel" 179 * attribute is set. 180 * 181 * @return @c true if this SedRepeatedTask's "resetModel" attribute has been 182 * set, otherwise @c false is returned. 183 */ 184 bool isSetResetModel() const; 185 186 187 /** 188 * Predicate returning @c true if this SedRepeatedTask's "concatenate" 189 * attribute is set. 190 * 191 * @return @c true if this SedRepeatedTask's "concatenate" attribute has been 192 * set, otherwise @c false is returned. 193 */ 194 bool isSetConcatenate() const; 195 196 197 /** 198 * Sets the value of the "range" attribute of this SedRepeatedTask. 199 * 200 * @param rangeId std::string& value of the "range" attribute to be set. 201 * 202 * @copydetails doc_returns_success_code 203 * @li @sedmlconstant{LIBSEDML_OPERATION_SUCCESS, OperationReturnValues_t} 204 * @li @sedmlconstant{LIBSEDML_INVALID_ATTRIBUTE_VALUE, 205 * OperationReturnValues_t} 206 */ 207 int setRangeId(const std::string& rangeId); 208 209 210 /** 211 * Sets the value of the "resetModel" attribute of this SedRepeatedTask. 212 * 213 * @param resetModel bool value of the "resetModel" attribute to be set. 214 * 215 * @copydetails doc_returns_success_code 216 * @li @sedmlconstant{LIBSEDML_OPERATION_SUCCESS, OperationReturnValues_t} 217 * @li @sedmlconstant{LIBSEDML_INVALID_ATTRIBUTE_VALUE, 218 * OperationReturnValues_t} 219 */ 220 int setResetModel(bool resetModel); 221 222 223 /** 224 * Sets the value of the "concatenate" attribute of this SedRepeatedTask. 225 * 226 * @param concatenate bool value of the "concatenate" attribute to be set. 227 * 228 * @copydetails doc_returns_success_code 229 * @li @sedmlconstant{LIBSEDML_OPERATION_SUCCESS, OperationReturnValues_t} 230 * @li @sedmlconstant{LIBSEDML_INVALID_ATTRIBUTE_VALUE, 231 * OperationReturnValues_t} 232 */ 233 int setConcatenate(bool concatenate); 234 235 236 /** 237 * Unsets the value of the "range" attribute of this SedRepeatedTask. 238 * 239 * @copydetails doc_returns_success_code 240 * @li @sedmlconstant{LIBSEDML_OPERATION_SUCCESS, OperationReturnValues_t} 241 * @li @sedmlconstant{LIBSEDML_OPERATION_FAILED, OperationReturnValues_t} 242 */ 243 int unsetRangeId(); 244 245 246 /** 247 * Unsets the value of the "resetModel" attribute of this SedRepeatedTask. 248 * 249 * @copydetails doc_returns_success_code 250 * @li @sedmlconstant{LIBSEDML_OPERATION_SUCCESS, OperationReturnValues_t} 251 * @li @sedmlconstant{LIBSEDML_OPERATION_FAILED, OperationReturnValues_t} 252 */ 253 int unsetResetModel(); 254 255 256 /** 257 * Unsets the value of the "concatenate" attribute of this SedRepeatedTask. 258 * 259 * @copydetails doc_returns_success_code 260 * @li @sedmlconstant{LIBSEDML_OPERATION_SUCCESS, OperationReturnValues_t} 261 * @li @sedmlconstant{LIBSEDML_OPERATION_FAILED, OperationReturnValues_t} 262 */ 263 int unsetConcatenate(); 264 265 266 /** 267 * Returns the SedListOfRanges from this SedRepeatedTask. 268 * 269 * @return the SedListOfRanges from this SedRepeatedTask. 270 * 271 * @copydetails doc_returned_unowned_pointer 272 * 273 * @see addRange(const SedRange* object) 274 * @see createRange() 275 * @see getRange(const std::string& sid) 276 * @see getRange(unsigned int n) 277 * @see getNumRanges() 278 * @see removeRange(const std::string& sid) 279 * @see removeRange(unsigned int n) 280 */ 281 const SedListOfRanges* getListOfRanges() const; 282 283 284 /** 285 * Returns the SedListOfRanges from this SedRepeatedTask. 286 * 287 * @return the SedListOfRanges from this SedRepeatedTask. 288 * 289 * @copydetails doc_returned_unowned_pointer 290 * 291 * @see addRange(const SedRange* object) 292 * @see createRange() 293 * @see getRange(const std::string& sid) 294 * @see getRange(unsigned int n) 295 * @see getNumRanges() 296 * @see removeRange(const std::string& sid) 297 * @see removeRange(unsigned int n) 298 */ 299 SedListOfRanges* getListOfRanges(); 300 301 302 /** 303 * Get a SedRange from the SedRepeatedTask. 304 * 305 * @param n an unsigned int representing the index of the SedRange to 306 * retrieve. 307 * 308 * @return the nth SedRange in the SedListOfRanges within this 309 * SedRepeatedTask or @c NULL if no such object exists. 310 * 311 * @copydetails doc_returned_unowned_pointer 312 * 313 * @see addRange(const SedRange* object) 314 * @see createRange() 315 * @see getRange(const std::string& sid) 316 * @see getNumRanges() 317 * @see removeRange(const std::string& sid) 318 * @see removeRange(unsigned int n) 319 */ 320 SedRange* getRange(unsigned int n); 321 322 323 /** 324 * Get a SedRange from the SedRepeatedTask. 325 * 326 * @param n an unsigned int representing the index of the SedRange to 327 * retrieve. 328 * 329 * @return the nth SedRange in the SedListOfRanges within this 330 * SedRepeatedTask or @c NULL if no such object exists. 331 * 332 * @copydetails doc_returned_unowned_pointer 333 * 334 * @see addRange(const SedRange* object) 335 * @see createRange() 336 * @see getRange(const std::string& sid) 337 * @see getNumRanges() 338 * @see removeRange(const std::string& sid) 339 * @see removeRange(unsigned int n) 340 */ 341 const SedRange* getRange(unsigned int n) const; 342 343 344 /** 345 * Get a SedRange from the SedRepeatedTask based on its identifier. 346 * 347 * @param sid a string representing the identifier of the SedRange to 348 * retrieve. 349 * 350 * @return the SedRange in the SedListOfRanges within this SedRepeatedTask 351 * with the given @p sid or @c NULL if no such SedRange exists. 352 * 353 * @copydetails doc_returned_unowned_pointer 354 * 355 * @see addRange(const SedRange* object) 356 * @see createRange() 357 * @see getRange(unsigned int n) 358 * @see getNumRanges() 359 * @see removeRange(const std::string& sid) 360 * @see removeRange(unsigned int n) 361 */ 362 SedRange* getRange(const std::string& sid); 363 364 365 /** 366 * Get a SedRange from the SedRepeatedTask based on its identifier. 367 * 368 * @param sid a string representing the identifier of the SedRange to 369 * retrieve. 370 * 371 * @return the SedRange in the SedListOfRanges within this SedRepeatedTask 372 * with the given @p sid or @c NULL if no such SedRange exists. 373 * 374 * @copydetails doc_returned_unowned_pointer 375 * 376 * @see addRange(const SedRange* object) 377 * @see createRange() 378 * @see getRange(unsigned int n) 379 * @see getNumRanges() 380 * @see removeRange(const std::string& sid) 381 * @see removeRange(unsigned int n) 382 */ 383 const SedRange* getRange(const std::string& sid) const; 384 385 386 /** 387 * Adds a copy of the given SedRange to this SedRepeatedTask. 388 * 389 * @param sr the SedRange object to add. 390 * 391 * @copydetails doc_returns_success_code 392 * @li @sedmlconstant{LIBSEDML_OPERATION_SUCCESS, OperationReturnValues_t} 393 * @li @sedmlconstant{LIBSEDML_OPERATION_FAILED, OperationReturnValues_t} 394 * @li @sedmlconstant{LIBSEDML_INVALID_OBJECT, OperationReturnValues_t} 395 * @li @sedmlconstant{LIBSEDML_LEVEL_MISMATCH, OperationReturnValues_t} 396 * @li @sedmlconstant{LIBSEDML_VERSION_MISMATCH, OperationReturnValues_t} 397 * @li @sedmlconstant{LIBSEDML_PKG_VERSION_MISMATCH, OperationReturnValues_t} 398 * @li @sedmlconstant{LIBSEDML_DUPLICATE_OBJECT_ID, OperationReturnValues_t} 399 * 400 * @copydetails doc_note_object_is_copied 401 * 402 * @see createRange() 403 * @see getRange(const std::string& sid) 404 * @see getRange(unsigned int n) 405 * @see getNumRanges() 406 * @see removeRange(const std::string& sid) 407 * @see removeRange(unsigned int n) 408 */ 409 int addRange(const SedRange* sr); 410 411 412 /** 413 * Get the number of SedRange objects in this SedRepeatedTask. 414 * 415 * @return the number of SedRange objects in this SedRepeatedTask. 416 * 417 * @see addRange(const SedRange* object) 418 * @see createRange() 419 * @see getRange(const std::string& sid) 420 * @see getRange(unsigned int n) 421 * @see removeRange(const std::string& sid) 422 * @see removeRange(unsigned int n) 423 */ 424 unsigned int getNumRanges() const; 425 426 427 /** 428 * Creates a new SedUniformRange object, adds it to this SedRepeatedTask 429 * object and returns the SedUniformRange object created. 430 * 431 * @return a new SedUniformRange object instance. 432 * 433 * @copydetails doc_returned_unowned_pointer 434 * 435 * @see addRange(const SedRange* object) 436 * @see getRange(const std::string& sid) 437 * @see getRange(unsigned int n) 438 * @see getNumRanges() 439 * @see removeRange(const std::string& sid) 440 * @see removeRange(unsigned int n) 441 */ 442 SedUniformRange* createUniformRange(); 443 444 445 /** 446 * Creates a new SedVectorRange object, adds it to this SedRepeatedTask 447 * object and returns the SedVectorRange object created. 448 * 449 * @return a new SedVectorRange object instance. 450 * 451 * @copydetails doc_returned_unowned_pointer 452 * 453 * @see addRange(const SedRange* object) 454 * @see getRange(const std::string& sid) 455 * @see getRange(unsigned int n) 456 * @see getNumRanges() 457 * @see removeRange(const std::string& sid) 458 * @see removeRange(unsigned int n) 459 */ 460 SedVectorRange* createVectorRange(); 461 462 463 /** 464 * Creates a new SedFunctionalRange object, adds it to this SedRepeatedTask 465 * object and returns the SedFunctionalRange object created. 466 * 467 * @return a new SedFunctionalRange object instance. 468 * 469 * @copydetails doc_returned_unowned_pointer 470 * 471 * @see addRange(const SedRange* object) 472 * @see getRange(const std::string& sid) 473 * @see getRange(unsigned int n) 474 * @see getNumRanges() 475 * @see removeRange(const std::string& sid) 476 * @see removeRange(unsigned int n) 477 */ 478 SedFunctionalRange* createFunctionalRange(); 479 480 481 /** 482 * Creates a new SedDataRange object, adds it to this SedRepeatedTask object 483 * and returns the SedDataRange object created. 484 * 485 * @return a new SedDataRange object instance. 486 * 487 * @copydetails doc_returned_unowned_pointer 488 * 489 * @see addRange(const SedRange* object) 490 * @see getRange(const std::string& sid) 491 * @see getRange(unsigned int n) 492 * @see getNumRanges() 493 * @see removeRange(const std::string& sid) 494 * @see removeRange(unsigned int n) 495 */ 496 SedDataRange* createDataRange(); 497 498 499 /** 500 * Removes the nth SedRange from this SedRepeatedTask and returns a pointer 501 * to it. 502 * 503 * @param n an unsigned int representing the index of the SedRange to remove. 504 * 505 * @return a pointer to the nth SedRange in this SedRepeatedTask. 506 * 507 * @copydetails doc_warning_returns_owned_pointer 508 * 509 * @see addRange(const SedRange* object) 510 * @see createRange() 511 * @see getRange(const std::string& sid) 512 * @see getRange(unsigned int n) 513 * @see getNumRanges() 514 * @see removeRange(const std::string& sid) 515 */ 516 SedRange* removeRange(unsigned int n); 517 518 519 /** 520 * Removes the SedRange from this SedRepeatedTask based on its identifier and 521 * returns a pointer to it. 522 * 523 * @param sid a string representing the identifier of the SedRange to remove. 524 * 525 * @return the SedRange in this SedRepeatedTask based on the identifier or 526 * NULL if no such SedRange exists. 527 * 528 * @copydetails doc_warning_returns_owned_pointer 529 * 530 * @see addRange(const SedRange* object) 531 * @see createRange() 532 * @see getRange(const std::string& sid) 533 * @see getRange(unsigned int n) 534 * @see getNumRanges() 535 * @see removeRange(unsigned int n) 536 */ 537 SedRange* removeRange(const std::string& sid); 538 539 540 /** 541 * Returns the SedListOfSetValues from this SedRepeatedTask. 542 * 543 * @return the SedListOfSetValues from this SedRepeatedTask. 544 * 545 * @copydetails doc_returned_unowned_pointer 546 * 547 * @see addTaskChange(const SedSetValue* object) 548 * @see createTaskChange() 549 * @see getTaskChange(const std::string& sid) 550 * @see getTaskChange(unsigned int n) 551 * @see getNumTaskChanges() 552 * @see removeTaskChange(const std::string& sid) 553 * @see removeTaskChange(unsigned int n) 554 */ 555 const SedListOfSetValues* getListOfTaskChanges() const; 556 557 558 /** 559 * Returns the SedListOfSetValues from this SedRepeatedTask. 560 * 561 * @return the SedListOfSetValues from this SedRepeatedTask. 562 * 563 * @copydetails doc_returned_unowned_pointer 564 * 565 * @see addTaskChange(const SedSetValue* object) 566 * @see createTaskChange() 567 * @see getTaskChange(const std::string& sid) 568 * @see getTaskChange(unsigned int n) 569 * @see getNumTaskChanges() 570 * @see removeTaskChange(const std::string& sid) 571 * @see removeTaskChange(unsigned int n) 572 */ 573 SedListOfSetValues* getListOfTaskChanges(); 574 575 576 /** 577 * Get a SedSetValue from the SedRepeatedTask. 578 * 579 * @param n an unsigned int representing the index of the SedSetValue to 580 * retrieve. 581 * 582 * @return the nth SedSetValue in the SedListOfSetValues within this 583 * SedRepeatedTask or @c NULL if no such object exists. 584 * 585 * @copydetails doc_returned_unowned_pointer 586 * 587 * @see addTaskChange(const SedSetValue* object) 588 * @see createTaskChange() 589 * @see getTaskChange(const std::string& sid) 590 * @see getNumTaskChanges() 591 * @see removeTaskChange(const std::string& sid) 592 * @see removeTaskChange(unsigned int n) 593 */ 594 SedSetValue* getTaskChange(unsigned int n); 595 596 597 /** 598 * Get a SedSetValue from the SedRepeatedTask. 599 * 600 * @param n an unsigned int representing the index of the SedSetValue to 601 * retrieve. 602 * 603 * @return the nth SedSetValue in the SedListOfSetValues within this 604 * SedRepeatedTask or @c NULL if no such object exists. 605 * 606 * @copydetails doc_returned_unowned_pointer 607 * 608 * @see addTaskChange(const SedSetValue* object) 609 * @see createTaskChange() 610 * @see getTaskChange(const std::string& sid) 611 * @see getNumTaskChanges() 612 * @see removeTaskChange(const std::string& sid) 613 * @see removeTaskChange(unsigned int n) 614 */ 615 const SedSetValue* getTaskChange(unsigned int n) const; 616 617 618 /** 619 * Get a SedSetValue from the SedRepeatedTask based on the ModelReference to 620 * which it refers. 621 * 622 * @param sid a string representing the "modelReference" attribute of the 623 * SedSetValue object to retrieve. 624 * 625 * @return the first SedSetValue in this SedRepeatedTask based on the given 626 * modelReference attribute or NULL if no such SedSetValue exists. 627 * 628 * @copydetails doc_returned_unowned_pointer 629 */ 630 const SedSetValue* getTaskChangeByModelReference(const std::string& sid) const; 631 632 633 /** 634 * Get a SedSetValue from the SedRepeatedTask based on the ModelReference to 635 * which it refers. 636 * 637 * @param sid a string representing the "modelReference" attribute of the 638 * SedSetValue object to retrieve. 639 * 640 * @return the first SedSetValue in this SedRepeatedTask based on the given 641 * modelReference attribute or NULL if no such SedSetValue exists. 642 * 643 * @copydetails doc_returned_unowned_pointer 644 */ 645 SedSetValue* getTaskChangeByModelReference(const std::string& sid); 646 647 648 /** 649 * Get a SedSetValue from the SedRepeatedTask based on the Range to which it 650 * refers. 651 * 652 * @param sid a string representing the "range" attribute of the SedSetValue 653 * object to retrieve. 654 * 655 * @return the first SedSetValue in this SedRepeatedTask based on the given 656 * range attribute or NULL if no such SedSetValue exists. 657 * 658 * @copydetails doc_returned_unowned_pointer 659 */ 660 const SedSetValue* getTaskChangeByRange(const std::string& sid) const; 661 662 663 /** 664 * Get a SedSetValue from the SedRepeatedTask based on the Range to which it 665 * refers. 666 * 667 * @param sid a string representing the "range" attribute of the SedSetValue 668 * object to retrieve. 669 * 670 * @return the first SedSetValue in this SedRepeatedTask based on the given 671 * range attribute or NULL if no such SedSetValue exists. 672 * 673 * @copydetails doc_returned_unowned_pointer 674 */ 675 SedSetValue* getTaskChangeByRange(const std::string& sid); 676 677 678 /** 679 * Adds a copy of the given SedSetValue to this SedRepeatedTask. 680 * 681 * @param ssv the SedSetValue object to add. 682 * 683 * @copydetails doc_returns_success_code 684 * @li @sedmlconstant{LIBSEDML_OPERATION_SUCCESS, OperationReturnValues_t} 685 * @li @sedmlconstant{LIBSEDML_OPERATION_FAILED, OperationReturnValues_t} 686 * @li @sedmlconstant{LIBSEDML_INVALID_OBJECT, OperationReturnValues_t} 687 * @li @sedmlconstant{LIBSEDML_LEVEL_MISMATCH, OperationReturnValues_t} 688 * @li @sedmlconstant{LIBSEDML_VERSION_MISMATCH, OperationReturnValues_t} 689 * @li @sedmlconstant{LIBSEDML_PKG_VERSION_MISMATCH, OperationReturnValues_t} 690 * @li @sedmlconstant{LIBSEDML_DUPLICATE_OBJECT_ID, OperationReturnValues_t} 691 * 692 * @copydetails doc_note_object_is_copied 693 * 694 * @see createTaskChange() 695 * @see getTaskChange(const std::string& sid) 696 * @see getTaskChange(unsigned int n) 697 * @see getNumTaskChanges() 698 * @see removeTaskChange(const std::string& sid) 699 * @see removeTaskChange(unsigned int n) 700 */ 701 int addTaskChange(const SedSetValue* ssv); 702 703 704 /** 705 * Get the number of SedSetValue objects in this SedRepeatedTask. 706 * 707 * @return the number of SedSetValue objects in this SedRepeatedTask. 708 * 709 * @see addTaskChange(const SedSetValue* object) 710 * @see createTaskChange() 711 * @see getTaskChange(const std::string& sid) 712 * @see getTaskChange(unsigned int n) 713 * @see removeTaskChange(const std::string& sid) 714 * @see removeTaskChange(unsigned int n) 715 */ 716 unsigned int getNumTaskChanges() const; 717 718 719 /** 720 * Creates a new SedSetValue object, adds it to this SedRepeatedTask object 721 * and returns the SedSetValue object created. 722 * 723 * @return a new SedSetValue object instance. 724 * 725 * @copydetails doc_returned_unowned_pointer 726 * 727 * @see addTaskChange(const SedSetValue* object) 728 * @see getTaskChange(const std::string& sid) 729 * @see getTaskChange(unsigned int n) 730 * @see getNumTaskChanges() 731 * @see removeTaskChange(const std::string& sid) 732 * @see removeTaskChange(unsigned int n) 733 */ 734 SedSetValue* createTaskChange(); 735 736 737 /** 738 * Removes the nth SedSetValue from this SedRepeatedTask and returns a 739 * pointer to it. 740 * 741 * @param n an unsigned int representing the index of the SedSetValue to 742 * remove. 743 * 744 * @return a pointer to the nth SedSetValue in this SedRepeatedTask. 745 * 746 * @copydetails doc_warning_returns_owned_pointer 747 * 748 * @see addTaskChange(const SedSetValue* object) 749 * @see createTaskChange() 750 * @see getTaskChange(const std::string& sid) 751 * @see getTaskChange(unsigned int n) 752 * @see getNumTaskChanges() 753 * @see removeTaskChange(const std::string& sid) 754 */ 755 SedSetValue* removeTaskChange(unsigned int n); 756 757 758 /** 759 * Returns the SedListOfSubTasks from this SedRepeatedTask. 760 * 761 * @return the SedListOfSubTasks from this SedRepeatedTask. 762 * 763 * @copydetails doc_returned_unowned_pointer 764 * 765 * @see addSubTask(const SedSubTask* object) 766 * @see createSubTask() 767 * @see getSubTask(const std::string& sid) 768 * @see getSubTask(unsigned int n) 769 * @see getNumSubTasks() 770 * @see removeSubTask(const std::string& sid) 771 * @see removeSubTask(unsigned int n) 772 */ 773 const SedListOfSubTasks* getListOfSubTasks() const; 774 775 776 /** 777 * Returns the SedListOfSubTasks from this SedRepeatedTask. 778 * 779 * @return the SedListOfSubTasks from this SedRepeatedTask. 780 * 781 * @copydetails doc_returned_unowned_pointer 782 * 783 * @see addSubTask(const SedSubTask* object) 784 * @see createSubTask() 785 * @see getSubTask(const std::string& sid) 786 * @see getSubTask(unsigned int n) 787 * @see getNumSubTasks() 788 * @see removeSubTask(const std::string& sid) 789 * @see removeSubTask(unsigned int n) 790 */ 791 SedListOfSubTasks* getListOfSubTasks(); 792 793 794 /** 795 * Get a SedSubTask from the SedRepeatedTask. 796 * 797 * @param n an unsigned int representing the index of the SedSubTask to 798 * retrieve. 799 * 800 * @return the nth SedSubTask in the SedListOfSubTasks within this 801 * SedRepeatedTask or @c NULL if no such object exists. 802 * 803 * @copydetails doc_returned_unowned_pointer 804 * 805 * @see addSubTask(const SedSubTask* object) 806 * @see createSubTask() 807 * @see getSubTask(const std::string& sid) 808 * @see getNumSubTasks() 809 * @see removeSubTask(const std::string& sid) 810 * @see removeSubTask(unsigned int n) 811 */ 812 SedSubTask* getSubTask(unsigned int n); 813 814 815 /** 816 * Get a SedSubTask from the SedRepeatedTask. 817 * 818 * @param n an unsigned int representing the index of the SedSubTask to 819 * retrieve. 820 * 821 * @return the nth SedSubTask in the SedListOfSubTasks within this 822 * SedRepeatedTask or @c NULL if no such object exists. 823 * 824 * @copydetails doc_returned_unowned_pointer 825 * 826 * @see addSubTask(const SedSubTask* object) 827 * @see createSubTask() 828 * @see getSubTask(const std::string& sid) 829 * @see getNumSubTasks() 830 * @see removeSubTask(const std::string& sid) 831 * @see removeSubTask(unsigned int n) 832 */ 833 const SedSubTask* getSubTask(unsigned int n) const; 834 835 836 /** 837 * Get a SedSubTask from the SedRepeatedTask based on the Task to which it 838 * refers. 839 * 840 * @param sid a string representing the "task" attribute of the SedSubTask 841 * object to retrieve. 842 * 843 * @return the first SedSubTask in this SedRepeatedTask based on the given 844 * task attribute or NULL if no such SedSubTask exists. 845 * 846 * @copydetails doc_returned_unowned_pointer 847 */ 848 const SedSubTask* getSubTaskByTask(const std::string& sid) const; 849 850 851 /** 852 * Get a SedSubTask from the SedRepeatedTask based on the Task to which it 853 * refers. 854 * 855 * @param sid a string representing the "task" attribute of the SedSubTask 856 * object to retrieve. 857 * 858 * @return the first SedSubTask in this SedRepeatedTask based on the given 859 * task attribute or NULL if no such SedSubTask exists. 860 * 861 * @copydetails doc_returned_unowned_pointer 862 */ 863 SedSubTask* getSubTaskByTask(const std::string& sid); 864 865 866 /** 867 * Adds a copy of the given SedSubTask to this SedRepeatedTask. 868 * 869 * @param sst the SedSubTask object to add. 870 * 871 * @copydetails doc_returns_success_code 872 * @li @sedmlconstant{LIBSEDML_OPERATION_SUCCESS, OperationReturnValues_t} 873 * @li @sedmlconstant{LIBSEDML_OPERATION_FAILED, OperationReturnValues_t} 874 * @li @sedmlconstant{LIBSEDML_INVALID_OBJECT, OperationReturnValues_t} 875 * @li @sedmlconstant{LIBSEDML_LEVEL_MISMATCH, OperationReturnValues_t} 876 * @li @sedmlconstant{LIBSEDML_VERSION_MISMATCH, OperationReturnValues_t} 877 * @li @sedmlconstant{LIBSEDML_PKG_VERSION_MISMATCH, OperationReturnValues_t} 878 * @li @sedmlconstant{LIBSEDML_DUPLICATE_OBJECT_ID, OperationReturnValues_t} 879 * 880 * @copydetails doc_note_object_is_copied 881 * 882 * @see createSubTask() 883 * @see getSubTask(const std::string& sid) 884 * @see getSubTask(unsigned int n) 885 * @see getNumSubTasks() 886 * @see removeSubTask(const std::string& sid) 887 * @see removeSubTask(unsigned int n) 888 */ 889 int addSubTask(const SedSubTask* sst); 890 891 892 /** 893 * Get the number of SedSubTask objects in this SedRepeatedTask. 894 * 895 * @return the number of SedSubTask objects in this SedRepeatedTask. 896 * 897 * @see addSubTask(const SedSubTask* object) 898 * @see createSubTask() 899 * @see getSubTask(const std::string& sid) 900 * @see getSubTask(unsigned int n) 901 * @see removeSubTask(const std::string& sid) 902 * @see removeSubTask(unsigned int n) 903 */ 904 unsigned int getNumSubTasks() const; 905 906 907 /** 908 * Creates a new SedSubTask object, adds it to this SedRepeatedTask object 909 * and returns the SedSubTask object created. 910 * 911 * @return a new SedSubTask object instance. 912 * 913 * @copydetails doc_returned_unowned_pointer 914 * 915 * @see addSubTask(const SedSubTask* object) 916 * @see getSubTask(const std::string& sid) 917 * @see getSubTask(unsigned int n) 918 * @see getNumSubTasks() 919 * @see removeSubTask(const std::string& sid) 920 * @see removeSubTask(unsigned int n) 921 */ 922 SedSubTask* createSubTask(); 923 924 925 /** 926 * Removes the nth SedSubTask from this SedRepeatedTask and returns a pointer 927 * to it. 928 * 929 * @param n an unsigned int representing the index of the SedSubTask to 930 * remove. 931 * 932 * @return a pointer to the nth SedSubTask in this SedRepeatedTask. 933 * 934 * @copydetails doc_warning_returns_owned_pointer 935 * 936 * @see addSubTask(const SedSubTask* object) 937 * @see createSubTask() 938 * @see getSubTask(const std::string& sid) 939 * @see getSubTask(unsigned int n) 940 * @see getNumSubTasks() 941 * @see removeSubTask(const std::string& sid) 942 */ 943 SedSubTask* removeSubTask(unsigned int n); 944 945 946 /** 947 * @copydoc doc_renamesidref_common 948 */ 949 virtual void renameSIdRefs(const std::string& oldid, 950 const std::string& newid); 951 952 953 /** 954 * Returns the XML element name of this SedRepeatedTask object. 955 * 956 * For SedRepeatedTask, the XML element name is always @c "repeatedTask". 957 * 958 * @return the name of this element, i.e. @c "repeatedTask". 959 */ 960 virtual const std::string& getElementName() const; 961 962 963 /** 964 * Returns the libSEDML type code for this SedRepeatedTask object. 965 * 966 * @copydetails doc_what_are_typecodes 967 * 968 * @return the SED-ML type code for this object: 969 * @sedmlconstant{SEDML_TASK_REPEATEDTASK, SedTypeCode_t}. 970 * 971 * @copydetails doc_warning_typecodes_not_unique 972 * 973 * @see getElementName() 974 */ 975 virtual int getTypeCode() const; 976 977 978 /** 979 * Predicate returning @c true if all the required attributes for this 980 * SedRepeatedTask object have been set. 981 * 982 * @return @c true to indicate that all the required attributes of this 983 * SedRepeatedTask have been set, otherwise @c false is returned. 984 */ 985 virtual bool hasRequiredAttributes() const; 986 987 988 /** 989 * Predicate returning @c true if all the required elements for this 990 * SedRepeatedTask object have been set. 991 * 992 * @return @c true to indicate that all the required elements of this 993 * SedRepeatedTask have been set, otherwise @c false is returned. 994 * 995 * 996 * @note The required elements for the SedRepeatedTask object are: 997 */ 998 virtual bool hasRequiredElements() const; 999 1000 1001 1002 /** @cond doxygenLibSEDMLInternal */ 1003 1004 /** 1005 * Write any contained elements 1006 */ 1007 virtual void writeElements(LIBSBML_CPP_NAMESPACE_QUALIFIER XMLOutputStream& 1008 stream) const; 1009 1010 /** @endcond */ 1011 1012 1013 1014 /** @cond doxygenLibSEDMLInternal */ 1015 1016 /** 1017 * Accepts the given SedVisitor 1018 */ 1019 virtual bool accept(SedVisitor& v) const; 1020 1021 /** @endcond */ 1022 1023 1024 1025 /** @cond doxygenLibSEDMLInternal */ 1026 1027 /** 1028 * Sets the parent SedDocument 1029 */ 1030 virtual void setSedDocument(SedDocument* d); 1031 1032 /** @endcond */ 1033 1034 1035 1036 /** @cond doxygenLibSEDMLInternal */ 1037 1038 /** 1039 * Connects to child elements 1040 */ 1041 virtual void connectToChild(); 1042 1043 /** @endcond */ 1044 1045 1046 1047 1048 #ifndef SWIG 1049 1050 1051 1052 /** @cond doxygenLibSEDMLInternal */ 1053 1054 /** 1055 * Gets the value of the "attributeName" attribute of this SedRepeatedTask. 1056 * 1057 * @param attributeName, the name of the attribute to retrieve. 1058 * 1059 * @param value, the address of the value to record. 1060 * 1061 * @copydetails doc_returns_success_code 1062 * @li @sedmlconstant{LIBSEDML_OPERATION_SUCCESS, OperationReturnValues_t} 1063 * @li @sedmlconstant{LIBSEDML_OPERATION_FAILED, OperationReturnValues_t} 1064 */ 1065 virtual int getAttribute(const std::string& attributeName, bool& value) 1066 const; 1067 1068 /** @endcond */ 1069 1070 1071 1072 /** @cond doxygenLibSEDMLInternal */ 1073 1074 /** 1075 * Gets the value of the "attributeName" attribute of this SedRepeatedTask. 1076 * 1077 * @param attributeName, the name of the attribute to retrieve. 1078 * 1079 * @param value, the address of the value to record. 1080 * 1081 * @copydetails doc_returns_success_code 1082 * @li @sedmlconstant{LIBSEDML_OPERATION_SUCCESS, OperationReturnValues_t} 1083 * @li @sedmlconstant{LIBSEDML_OPERATION_FAILED, OperationReturnValues_t} 1084 */ 1085 virtual int getAttribute(const std::string& attributeName, int& value) const; 1086 1087 /** @endcond */ 1088 1089 1090 1091 /** @cond doxygenLibSEDMLInternal */ 1092 1093 /** 1094 * Gets the value of the "attributeName" attribute of this SedRepeatedTask. 1095 * 1096 * @param attributeName, the name of the attribute to retrieve. 1097 * 1098 * @param value, the address of the value to record. 1099 * 1100 * @copydetails doc_returns_success_code 1101 * @li @sedmlconstant{LIBSEDML_OPERATION_SUCCESS, OperationReturnValues_t} 1102 * @li @sedmlconstant{LIBSEDML_OPERATION_FAILED, OperationReturnValues_t} 1103 */ 1104 virtual int getAttribute(const std::string& attributeName, 1105 double& value) const; 1106 1107 /** @endcond */ 1108 1109 1110 1111 /** @cond doxygenLibSEDMLInternal */ 1112 1113 /** 1114 * Gets the value of the "attributeName" attribute of this SedRepeatedTask. 1115 * 1116 * @param attributeName, the name of the attribute to retrieve. 1117 * 1118 * @param value, the address of the value to record. 1119 * 1120 * @copydetails doc_returns_success_code 1121 * @li @sedmlconstant{LIBSEDML_OPERATION_SUCCESS, OperationReturnValues_t} 1122 * @li @sedmlconstant{LIBSEDML_OPERATION_FAILED, OperationReturnValues_t} 1123 */ 1124 virtual int getAttribute(const std::string& attributeName, 1125 unsigned int& value) const; 1126 1127 /** @endcond */ 1128 1129 1130 1131 /** @cond doxygenLibSEDMLInternal */ 1132 1133 /** 1134 * Gets the value of the "attributeName" attribute of this SedRepeatedTask. 1135 * 1136 * @param attributeName, the name of the attribute to retrieve. 1137 * 1138 * @param value, the address of the value to record. 1139 * 1140 * @copydetails doc_returns_success_code 1141 * @li @sedmlconstant{LIBSEDML_OPERATION_SUCCESS, OperationReturnValues_t} 1142 * @li @sedmlconstant{LIBSEDML_OPERATION_FAILED, OperationReturnValues_t} 1143 */ 1144 virtual int getAttribute(const std::string& attributeName, 1145 std::string& value) const; 1146 1147 /** @endcond */ 1148 1149 1150 1151 /** @cond doxygenLibSEDMLInternal */ 1152 1153 /** 1154 * Predicate returning @c true if this SedRepeatedTask's attribute 1155 * "attributeName" is set. 1156 * 1157 * @param attributeName, the name of the attribute to query. 1158 * 1159 * @return @c true if this SedRepeatedTask's attribute "attributeName" has 1160 * been set, otherwise @c false is returned. 1161 */ 1162 virtual bool isSetAttribute(const std::string& attributeName) const; 1163 1164 /** @endcond */ 1165 1166 1167 1168 /** @cond doxygenLibSEDMLInternal */ 1169 1170 /** 1171 * Sets the value of the "attributeName" attribute of this SedRepeatedTask. 1172 * 1173 * @param attributeName, the name of the attribute to set. 1174 * 1175 * @param value, the value of the attribute to set. 1176 * 1177 * @copydetails doc_returns_success_code 1178 * @li @sedmlconstant{LIBSEDML_OPERATION_SUCCESS, OperationReturnValues_t} 1179 * @li @sedmlconstant{LIBSEDML_OPERATION_FAILED, OperationReturnValues_t} 1180 */ 1181 virtual int setAttribute(const std::string& attributeName, bool value); 1182 1183 /** @endcond */ 1184 1185 1186 1187 /** @cond doxygenLibSEDMLInternal */ 1188 1189 /** 1190 * Sets the value of the "attributeName" attribute of this SedRepeatedTask. 1191 * 1192 * @param attributeName, the name of the attribute to set. 1193 * 1194 * @param value, the value of the attribute to set. 1195 * 1196 * @copydetails doc_returns_success_code 1197 * @li @sedmlconstant{LIBSEDML_OPERATION_SUCCESS, OperationReturnValues_t} 1198 * @li @sedmlconstant{LIBSEDML_OPERATION_FAILED, OperationReturnValues_t} 1199 */ 1200 virtual int setAttribute(const std::string& attributeName, int value); 1201 1202 /** @endcond */ 1203 1204 1205 1206 /** @cond doxygenLibSEDMLInternal */ 1207 1208 /** 1209 * Sets the value of the "attributeName" attribute of this SedRepeatedTask. 1210 * 1211 * @param attributeName, the name of the attribute to set. 1212 * 1213 * @param value, the value of the attribute to set. 1214 * 1215 * @copydetails doc_returns_success_code 1216 * @li @sedmlconstant{LIBSEDML_OPERATION_SUCCESS, OperationReturnValues_t} 1217 * @li @sedmlconstant{LIBSEDML_OPERATION_FAILED, OperationReturnValues_t} 1218 */ 1219 virtual int setAttribute(const std::string& attributeName, double value); 1220 1221 /** @endcond */ 1222 1223 1224 1225 /** @cond doxygenLibSEDMLInternal */ 1226 1227 /** 1228 * Sets the value of the "attributeName" attribute of this SedRepeatedTask. 1229 * 1230 * @param attributeName, the name of the attribute to set. 1231 * 1232 * @param value, the value of the attribute to set. 1233 * 1234 * @copydetails doc_returns_success_code 1235 * @li @sedmlconstant{LIBSEDML_OPERATION_SUCCESS, OperationReturnValues_t} 1236 * @li @sedmlconstant{LIBSEDML_OPERATION_FAILED, OperationReturnValues_t} 1237 */ 1238 virtual int setAttribute(const std::string& attributeName, 1239 unsigned int value); 1240 1241 /** @endcond */ 1242 1243 1244 1245 /** @cond doxygenLibSEDMLInternal */ 1246 1247 /** 1248 * Sets the value of the "attributeName" attribute of this SedRepeatedTask. 1249 * 1250 * @param attributeName, the name of the attribute to set. 1251 * 1252 * @param value, the value of the attribute to set. 1253 * 1254 * @copydetails doc_returns_success_code 1255 * @li @sedmlconstant{LIBSEDML_OPERATION_SUCCESS, OperationReturnValues_t} 1256 * @li @sedmlconstant{LIBSEDML_OPERATION_FAILED, OperationReturnValues_t} 1257 */ 1258 virtual int setAttribute(const std::string& attributeName, 1259 const std::string& value); 1260 1261 /** @endcond */ 1262 1263 1264 1265 /** @cond doxygenLibSEDMLInternal */ 1266 1267 /** 1268 * Unsets the value of the "attributeName" attribute of this SedRepeatedTask. 1269 * 1270 * @param attributeName, the name of the attribute to query. 1271 * 1272 * @copydetails doc_returns_success_code 1273 * @li @sedmlconstant{LIBSEDML_OPERATION_SUCCESS, OperationReturnValues_t} 1274 * @li @sedmlconstant{LIBSEDML_OPERATION_FAILED, OperationReturnValues_t} 1275 */ 1276 virtual int unsetAttribute(const std::string& attributeName); 1277 1278 /** @endcond */ 1279 1280 1281 1282 /** @cond doxygenLibSEDMLInternal */ 1283 1284 /** 1285 * Creates and returns an new "elementName" object in this SedRepeatedTask. 1286 * 1287 * @param elementName, the name of the element to create. 1288 * 1289 * @return pointer to the element created. 1290 */ 1291 virtual SedBase* createChildObject(const std::string& elementName); 1292 1293 /** @endcond */ 1294 1295 1296 1297 /** @cond doxygenLibSEDMLInternal */ 1298 1299 /** 1300 * Adds a new "elementName" object to this SedRepeatedTask. 1301 * 1302 * @param elementName, the name of the element to create. 1303 * 1304 * @param element, pointer to the element to be added. 1305 * 1306 * @copydetails doc_returns_success_code 1307 * @li @sedmlconstant{LIBSEDML_OPERATION_SUCCESS, OperationReturnValues_t} 1308 * @li @sedmlconstant{LIBSEDML_OPERATION_FAILED, OperationReturnValues_t} 1309 */ 1310 virtual int addChildObject(const std::string& elementName, 1311 const SedBase* element); 1312 1313 /** @endcond */ 1314 1315 1316 1317 /** @cond doxygenLibSEDMLInternal */ 1318 1319 /** 1320 * Removes and returns the new "elementName" object with the given id in this 1321 * SedRepeatedTask. 1322 * 1323 * @param elementName, the name of the element to remove. 1324 * 1325 * @param id, the id of the element to remove. 1326 * 1327 * @return pointer to the element removed. 1328 */ 1329 virtual SedBase* removeChildObject(const std::string& elementName, 1330 const std::string& id); 1331 1332 /** @endcond */ 1333 1334 1335 1336 /** @cond doxygenLibSEDMLInternal */ 1337 1338 /** 1339 * Returns the number of "elementName" in this SedRepeatedTask. 1340 * 1341 * @param elementName, the name of the element to get number of. 1342 * 1343 * @return unsigned int number of elements. 1344 */ 1345 virtual unsigned int getNumObjects(const std::string& elementName); 1346 1347 /** @endcond */ 1348 1349 1350 1351 /** @cond doxygenLibSEDMLInternal */ 1352 1353 /** 1354 * Returns the nth object of "objectName" in this SedRepeatedTask. 1355 * 1356 * @param elementName, the name of the element to get number of. 1357 * 1358 * @param index, unsigned int the index of the object to retrieve. 1359 * 1360 * @return pointer to the object. 1361 */ 1362 virtual SedBase* getObject(const std::string& elementName, 1363 unsigned int index); 1364 1365 /** @endcond */ 1366 1367 1368 1369 1370 #endif /* !SWIG */ 1371 1372 1373 /** 1374 * Returns the first child element that has the given @p id in the model-wide 1375 * SId namespace, or @c NULL if no such object is found. 1376 * 1377 * @param id a string representing the id attribute of the object to 1378 * retrieve. 1379 * 1380 * @return a pointer to the SedBase element with the given @p id. If no such 1381 * object is found, this method returns @c NULL. 1382 */ 1383 virtual SedBase* getElementBySId(const std::string& id); 1384 1385 1386 /** 1387 * Returns a List of all child SedBase objects, including those nested to an 1388 * arbitrary depth. 1389 * 1390 * @param filter an ElementFilter that may impose restrictions on the objects 1391 * to be retrieved. 1392 * 1393 * @return a List pointer of pointers to all SedBase child objects with any 1394 * restriction imposed. 1395 */ 1396 virtual List* getAllElements(SedElementFilter * filter = NULL); 1397 1398 1399 protected: 1400 1401 1402 /** @cond doxygenLibSEDMLInternal */ 1403 1404 /** 1405 * Creates a new object from the next XMLToken on the XMLInputStream 1406 */ 1407 virtual SedBase* createObject(LIBSBML_CPP_NAMESPACE_QUALIFIER XMLInputStream& 1408 stream); 1409 1410 /** @endcond */ 1411 1412 1413 1414 /** @cond doxygenLibSEDMLInternal */ 1415 1416 /** 1417 * Adds the expected attributes for this element 1418 */ 1419 virtual void addExpectedAttributes(LIBSBML_CPP_NAMESPACE_QUALIFIER 1420 ExpectedAttributes& attributes); 1421 1422 /** @endcond */ 1423 1424 1425 1426 /** @cond doxygenLibSEDMLInternal */ 1427 1428 /** 1429 * Reads the expected attributes into the member data variables 1430 */ 1431 virtual void readAttributes( 1432 const LIBSBML_CPP_NAMESPACE_QUALIFIER 1433 XMLAttributes& attributes, 1434 const LIBSBML_CPP_NAMESPACE_QUALIFIER 1435 ExpectedAttributes& expectedAttributes); 1436 1437 /** @endcond */ 1438 1439 1440 1441 /** @cond doxygenLibSEDMLInternal */ 1442 1443 /** 1444 * Writes the attributes to the stream 1445 */ 1446 virtual void writeAttributes(LIBSBML_CPP_NAMESPACE_QUALIFIER XMLOutputStream& 1447 stream) const; 1448 1449 /** @endcond */ 1450 1451 1452 }; 1453 1454 1455 1456 LIBSEDML_CPP_NAMESPACE_END 1457 1458 1459 1460 1461 #endif /* __cplusplus */ 1462 1463 1464 1465 1466 #ifndef SWIG 1467 1468 1469 1470 1471 LIBSEDML_CPP_NAMESPACE_BEGIN 1472 1473 1474 1475 1476 BEGIN_C_DECLS 1477 1478 1479 /** 1480 * Creates a new SedRepeatedTask_t using the given SED-ML Level and @ p version 1481 * values. 1482 * 1483 * @param level an unsigned int, the SED-ML Level to assign to this 1484 * SedRepeatedTask_t. 1485 * 1486 * @param version an unsigned int, the SED-ML Version to assign to this 1487 * SedRepeatedTask_t. 1488 * 1489 * @copydetails doc_note_setting_lv_pkg 1490 * 1491 * @copydetails doc_returned_owned_pointer 1492 * 1493 * @memberof SedRepeatedTask_t 1494 */ 1495 LIBSEDML_EXTERN 1496 SedRepeatedTask_t * 1497 SedRepeatedTask_create(unsigned int level, unsigned int version); 1498 1499 1500 /** 1501 * Creates and returns a deep copy of this SedRepeatedTask_t object. 1502 * 1503 * @param srt the SedRepeatedTask_t structure. 1504 * 1505 * @return a (deep) copy of this SedRepeatedTask_t object. 1506 * 1507 * @copydetails doc_returned_owned_pointer 1508 * 1509 * @memberof SedRepeatedTask_t 1510 */ 1511 LIBSEDML_EXTERN 1512 SedRepeatedTask_t* 1513 SedRepeatedTask_clone(const SedRepeatedTask_t* srt); 1514 1515 1516 /** 1517 * Frees this SedRepeatedTask_t object. 1518 * 1519 * @param srt the SedRepeatedTask_t structure. 1520 * 1521 * @memberof SedRepeatedTask_t 1522 */ 1523 LIBSEDML_EXTERN 1524 void 1525 SedRepeatedTask_free(SedRepeatedTask_t* srt); 1526 1527 1528 /** 1529 * Returns the value of the "range" attribute of this SedRepeatedTask_t. 1530 * 1531 * @param srt the SedRepeatedTask_t structure whose range is sought. 1532 * 1533 * @return the value of the "range" attribute of this SedRepeatedTask_t as a 1534 * pointer to a string. 1535 * 1536 * @copydetails doc_returned_owned_char 1537 * 1538 * @memberof SedRepeatedTask_t 1539 */ 1540 LIBSEDML_EXTERN 1541 char * 1542 SedRepeatedTask_getRangeId(const SedRepeatedTask_t * srt); 1543 1544 1545 /** 1546 * Returns the value of the "resetModel" attribute of this SedRepeatedTask_t. 1547 * 1548 * @param srt the SedRepeatedTask_t structure whose resetModel is sought. 1549 * 1550 * @return the value of the "resetModel" attribute of this SedRepeatedTask_t as 1551 * a boolean. 1552 * 1553 * @memberof SedRepeatedTask_t 1554 */ 1555 LIBSEDML_EXTERN 1556 int 1557 SedRepeatedTask_getResetModel(const SedRepeatedTask_t * srt); 1558 1559 1560 /** 1561 * Returns the value of the "concatenate" attribute of this SedRepeatedTask_t. 1562 * 1563 * @param srt the SedRepeatedTask_t structure whose concatenate is sought. 1564 * 1565 * @return the value of the "concatenate" attribute of this SedRepeatedTask_t as 1566 * a boolean. 1567 * 1568 * @memberof SedRepeatedTask_t 1569 */ 1570 LIBSEDML_EXTERN 1571 int 1572 SedRepeatedTask_getConcatenate(const SedRepeatedTask_t* srt); 1573 1574 1575 /** 1576 * Predicate returning @c 1 (true) if this SedRepeatedTask_t's "range" 1577 * attribute is set. 1578 * 1579 * @param srt the SedRepeatedTask_t structure. 1580 * 1581 * @return @c 1 (true) if this SedRepeatedTask_t's "range" attribute has been 1582 * set, otherwise @c 0 (false) is returned. 1583 * 1584 * @memberof SedRepeatedTask_t 1585 */ 1586 LIBSEDML_EXTERN 1587 int 1588 SedRepeatedTask_isSetRangeId(const SedRepeatedTask_t * srt); 1589 1590 1591 /** 1592 * Predicate returning @c 1 (true) if this SedRepeatedTask_t's "resetModel" 1593 * attribute is set. 1594 * 1595 * @param srt the SedRepeatedTask_t structure. 1596 * 1597 * @return @c 1 (true) if this SedRepeatedTask_t's "resetModel" attribute has 1598 * been set, otherwise @c 0 (false) is returned. 1599 * 1600 * @memberof SedRepeatedTask_t 1601 */ 1602 LIBSEDML_EXTERN 1603 int 1604 SedRepeatedTask_isSetResetModel(const SedRepeatedTask_t * srt); 1605 1606 1607 /** 1608 * Predicate returning @c 1 (true) if this SedRepeatedTask_t's "concatenate" 1609 * attribute is set. 1610 * 1611 * @param srt the SedRepeatedTask_t structure. 1612 * 1613 * @return @c 1 (true) if this SedRepeatedTask_t's "concatenate" attribute has 1614 * been set, otherwise @c 0 (false) is returned. 1615 * 1616 * @memberof SedRepeatedTask_t 1617 */ 1618 LIBSEDML_EXTERN 1619 int 1620 SedRepeatedTask_isSetConcatenate(const SedRepeatedTask_t* srt); 1621 1622 1623 /** 1624 * Sets the value of the "range" attribute of this SedRepeatedTask_t. 1625 * 1626 * @param srt the SedRepeatedTask_t structure. 1627 * 1628 * @param rangeId const char * value of the "range" attribute to be set. 1629 * 1630 * @copydetails doc_returns_success_code 1631 * @li @sedmlconstant{LIBSEDML_OPERATION_SUCCESS, OperationReturnValues_t} 1632 * @li @sedmlconstant{LIBSEDML_INVALID_ATTRIBUTE_VALUE, 1633 * OperationReturnValues_t} 1634 * @li @sedmlconstant{LIBSEDML_INVALID_OBJECT, OperationReturnValues_t} 1635 * 1636 * @memberof SedRepeatedTask_t 1637 */ 1638 LIBSEDML_EXTERN 1639 int 1640 SedRepeatedTask_setRangeId(SedRepeatedTask_t * srt, const char * rangeId); 1641 1642 1643 /** 1644 * Sets the value of the "resetModel" attribute of this SedRepeatedTask_t. 1645 * 1646 * @param srt the SedRepeatedTask_t structure. 1647 * 1648 * @param resetModel int value of the "resetModel" attribute to be set. 1649 * 1650 * @copydetails doc_returns_success_code 1651 * @li @sedmlconstant{LIBSEDML_OPERATION_SUCCESS, OperationReturnValues_t} 1652 * @li @sedmlconstant{LIBSEDML_INVALID_ATTRIBUTE_VALUE, 1653 * OperationReturnValues_t} 1654 * @li @sedmlconstant{LIBSEDML_INVALID_OBJECT, OperationReturnValues_t} 1655 * 1656 * @memberof SedRepeatedTask_t 1657 */ 1658 LIBSEDML_EXTERN 1659 int 1660 SedRepeatedTask_setResetModel(SedRepeatedTask_t * srt, int resetModel); 1661 1662 1663 /** 1664 * Sets the value of the "concatenate" attribute of this SedRepeatedTask_t. 1665 * 1666 * @param srt the SedRepeatedTask_t structure. 1667 * 1668 * @param concatenate int value of the "concatenate" attribute to be set. 1669 * 1670 * @copydetails doc_returns_success_code 1671 * @li @sedmlconstant{LIBSEDML_OPERATION_SUCCESS, OperationReturnValues_t} 1672 * @li @sedmlconstant{LIBSEDML_INVALID_ATTRIBUTE_VALUE, 1673 * OperationReturnValues_t} 1674 * @li @sedmlconstant{LIBSEDML_INVALID_OBJECT, OperationReturnValues_t} 1675 * 1676 * @memberof SedRepeatedTask_t 1677 */ 1678 LIBSEDML_EXTERN 1679 int 1680 SedRepeatedTask_setConcatenate(SedRepeatedTask_t* srt, int concatenate); 1681 1682 1683 /** 1684 * Unsets the value of the "range" attribute of this SedRepeatedTask_t. 1685 * 1686 * @param srt the SedRepeatedTask_t structure. 1687 * 1688 * @copydetails doc_returns_success_code 1689 * @li @sedmlconstant{LIBSEDML_OPERATION_SUCCESS, OperationReturnValues_t} 1690 * @li @sedmlconstant{LIBSEDML_OPERATION_FAILED, OperationReturnValues_t} 1691 * @li @sedmlconstant{LIBSEDML_INVALID_OBJECT, OperationReturnValues_t} 1692 * 1693 * @memberof SedRepeatedTask_t 1694 */ 1695 LIBSEDML_EXTERN 1696 int 1697 SedRepeatedTask_unsetRangeId(SedRepeatedTask_t * srt); 1698 1699 1700 /** 1701 * Unsets the value of the "resetModel" attribute of this SedRepeatedTask_t. 1702 * 1703 * @param srt the SedRepeatedTask_t structure. 1704 * 1705 * @copydetails doc_returns_success_code 1706 * @li @sedmlconstant{LIBSEDML_OPERATION_SUCCESS, OperationReturnValues_t} 1707 * @li @sedmlconstant{LIBSEDML_OPERATION_FAILED, OperationReturnValues_t} 1708 * @li @sedmlconstant{LIBSEDML_INVALID_OBJECT, OperationReturnValues_t} 1709 * 1710 * @memberof SedRepeatedTask_t 1711 */ 1712 LIBSEDML_EXTERN 1713 int 1714 SedRepeatedTask_unsetResetModel(SedRepeatedTask_t * srt); 1715 1716 1717 /** 1718 * Unsets the value of the "concatenate" attribute of this SedRepeatedTask_t. 1719 * 1720 * @param srt the SedRepeatedTask_t structure. 1721 * 1722 * @copydetails doc_returns_success_code 1723 * @li @sedmlconstant{LIBSEDML_OPERATION_SUCCESS, OperationReturnValues_t} 1724 * @li @sedmlconstant{LIBSEDML_OPERATION_FAILED, OperationReturnValues_t} 1725 * @li @sedmlconstant{LIBSEDML_INVALID_OBJECT, OperationReturnValues_t} 1726 * 1727 * @memberof SedRepeatedTask_t 1728 */ 1729 LIBSEDML_EXTERN 1730 int 1731 SedRepeatedTask_unsetConcatenate(SedRepeatedTask_t* srt); 1732 1733 1734 /** 1735 * Returns a ListOf_t * containing SedRange_t objects from this 1736 * SedRepeatedTask_t. 1737 * 1738 * @param srt the SedRepeatedTask_t structure whose SedListOfRanges is sought. 1739 * 1740 * @return the SedListOfRanges from this SedRepeatedTask_t as a ListOf_t *. 1741 * 1742 * @copydetails doc_returned_unowned_pointer 1743 * 1744 * @see SedRepeatedTask_addRange() 1745 * @see SedRepeatedTask_createRange() 1746 * @see SedRepeatedTask_getRangeById() 1747 * @see SedRepeatedTask_getRange() 1748 * @see SedRepeatedTask_getNumRanges() 1749 * @see SedRepeatedTask_removeRangeById() 1750 * @see SedRepeatedTask_removeRange() 1751 * 1752 * @memberof SedRepeatedTask_t 1753 */ 1754 LIBSEDML_EXTERN 1755 SedListOf_t* 1756 SedRepeatedTask_getListOfRanges(SedRepeatedTask_t* srt); 1757 1758 1759 /** 1760 * Get a SedRange_t from the SedRepeatedTask_t. 1761 * 1762 * @param srt the SedRepeatedTask_t structure to search. 1763 * 1764 * @param n an unsigned int representing the index of the SedRange_t to 1765 * retrieve. 1766 * 1767 * @return the nth SedRange_t in the SedListOfRanges within this 1768 * SedRepeatedTask or @c NULL if no such object exists. 1769 * 1770 * @copydetails doc_returned_unowned_pointer 1771 * 1772 * @memberof SedRepeatedTask_t 1773 */ 1774 LIBSEDML_EXTERN 1775 SedRange_t* 1776 SedRepeatedTask_getRange(SedRepeatedTask_t* srt, unsigned int n); 1777 1778 1779 /** 1780 * Get a SedRange_t from the SedRepeatedTask_t based on its identifier. 1781 * 1782 * @param srt the SedRepeatedTask_t structure to search. 1783 * 1784 * @param sid a string representing the identifier of the SedRange_t to 1785 * retrieve. 1786 * 1787 * @return the SedRange_t in the SedListOfRanges within this SedRepeatedTask 1788 * with the given @p sid or @c NULL if no such SedRange_t exists. 1789 * 1790 * @copydetails doc_returned_unowned_pointer 1791 * 1792 * @memberof SedRepeatedTask_t 1793 */ 1794 LIBSEDML_EXTERN 1795 SedRange_t* 1796 SedRepeatedTask_getRangeById(SedRepeatedTask_t* srt, const char *sid); 1797 1798 1799 /** 1800 * Adds a copy of the given SedRange_t to this SedRepeatedTask_t. 1801 * 1802 * @param srt the SedRepeatedTask_t structure to which the SedRange_t should be 1803 * added. 1804 * 1805 * @param sr the SedRange_t object to add. 1806 * 1807 * @copydetails doc_returns_success_code 1808 * @li @sedmlconstant{LIBSEDML_OPERATION_SUCCESS, OperationReturnValues_t} 1809 * @li @sedmlconstant{LIBSEDML_OPERATION_FAILED, OperationReturnValues_t} 1810 * @li @sedmlconstant{LIBSEDML_INVALID_OBJECT, OperationReturnValues_t} 1811 * @li @sedmlconstant{LIBSEDML_LEVEL_MISMATCH, OperationReturnValues_t} 1812 * @li @sedmlconstant{LIBSEDML_VERSION_MISMATCH, OperationReturnValues_t} 1813 * @li @sedmlconstant{LIBSEDML_PKG_VERSION_MISMATCH, OperationReturnValues_t} 1814 * @li @sedmlconstant{LIBSEDML_DUPLICATE_OBJECT_ID, OperationReturnValues_t} 1815 * 1816 * @memberof SedRepeatedTask_t 1817 */ 1818 LIBSEDML_EXTERN 1819 int 1820 SedRepeatedTask_addRange(SedRepeatedTask_t* srt, const SedRange_t* sr); 1821 1822 1823 /** 1824 * Get the number of SedRange_t objects in this SedRepeatedTask_t. 1825 * 1826 * @param srt the SedRepeatedTask_t structure to query. 1827 * 1828 * @return the number of SedRange_t objects in this SedRepeatedTask_t. 1829 * 1830 * @memberof SedRepeatedTask_t 1831 */ 1832 LIBSEDML_EXTERN 1833 unsigned int 1834 SedRepeatedTask_getNumRanges(SedRepeatedTask_t* srt); 1835 1836 1837 /** 1838 * Creates a new SedUniformRange_t object, adds it to this SedRepeatedTask_t 1839 * object and returns the SedUniformRange_t object created. 1840 * 1841 * @param srt the SedRepeatedTask_t structure to which the SedUniformRange_t 1842 * should be added. 1843 * 1844 * @return a new SedUniformRange_t object instance. 1845 * 1846 * @copydetails doc_returned_unowned_pointer 1847 * 1848 * @memberof SedRepeatedTask_t 1849 */ 1850 LIBSEDML_EXTERN 1851 SedUniformRange_t* 1852 SedRepeatedTask_createUniformRange(SedRepeatedTask_t* srt); 1853 1854 1855 /** 1856 * Creates a new SedVectorRange_t object, adds it to this SedRepeatedTask_t 1857 * object and returns the SedVectorRange_t object created. 1858 * 1859 * @param srt the SedRepeatedTask_t structure to which the SedVectorRange_t 1860 * should be added. 1861 * 1862 * @return a new SedVectorRange_t object instance. 1863 * 1864 * @copydetails doc_returned_unowned_pointer 1865 * 1866 * @memberof SedRepeatedTask_t 1867 */ 1868 LIBSEDML_EXTERN 1869 SedVectorRange_t* 1870 SedRepeatedTask_createVectorRange(SedRepeatedTask_t* srt); 1871 1872 1873 /** 1874 * Creates a new SedFunctionalRange_t object, adds it to this SedRepeatedTask_t 1875 * object and returns the SedFunctionalRange_t object created. 1876 * 1877 * @param srt the SedRepeatedTask_t structure to which the SedFunctionalRange_t 1878 * should be added. 1879 * 1880 * @return a new SedFunctionalRange_t object instance. 1881 * 1882 * @copydetails doc_returned_unowned_pointer 1883 * 1884 * @memberof SedRepeatedTask_t 1885 */ 1886 LIBSEDML_EXTERN 1887 SedFunctionalRange_t* 1888 SedRepeatedTask_createFunctionalRange(SedRepeatedTask_t* srt); 1889 1890 1891 /** 1892 * Creates a new SedDataRange_t object, adds it to this SedRepeatedTask_t 1893 * object and returns the SedDataRange_t object created. 1894 * 1895 * @param srt the SedRepeatedTask_t structure to which the SedDataRange_t 1896 * should be added. 1897 * 1898 * @return a new SedDataRange_t object instance. 1899 * 1900 * @copydetails doc_returned_unowned_pointer 1901 * 1902 * @memberof SedRepeatedTask_t 1903 */ 1904 LIBSEDML_EXTERN 1905 SedDataRange_t* 1906 SedRepeatedTask_createDataRange(SedRepeatedTask_t* srt); 1907 1908 1909 /** 1910 * Removes the nth SedRange_t from this SedRepeatedTask_t and returns a pointer 1911 * to it. 1912 * 1913 * @param srt the SedRepeatedTask_t structure to search. 1914 * 1915 * @param n an unsigned int representing the index of the SedRange_t to remove. 1916 * 1917 * @return a pointer to the nth SedRange_t in this SedRepeatedTask_t. 1918 * 1919 * @copydetails doc_warning_returns_owned_pointer 1920 * 1921 * @memberof SedRepeatedTask_t 1922 */ 1923 LIBSEDML_EXTERN 1924 SedRange_t* 1925 SedRepeatedTask_removeRange(SedRepeatedTask_t* srt, unsigned int n); 1926 1927 1928 /** 1929 * Removes the SedRange_t from this SedRepeatedTask_t based on its identifier 1930 * and returns a pointer to it. 1931 * 1932 * @param srt the SedRepeatedTask_t structure to search. 1933 * 1934 * @param sid a string representing the identifier of the SedRange_t to remove. 1935 * 1936 * @return the SedRange_t in this SedRepeatedTask_t based on the identifier or 1937 * NULL if no such SedRange_t exists. 1938 * 1939 * @copydetails doc_warning_returns_owned_pointer 1940 * 1941 * @memberof SedRepeatedTask_t 1942 */ 1943 LIBSEDML_EXTERN 1944 SedRange_t* 1945 SedRepeatedTask_removeRangeById(SedRepeatedTask_t* srt, const char* sid); 1946 1947 1948 /** 1949 * Returns a ListOf_t * containing SedSetValue_t objects from this 1950 * SedRepeatedTask_t. 1951 * 1952 * @param srt the SedRepeatedTask_t structure whose SedListOfSetValues is 1953 * sought. 1954 * 1955 * @return the SedListOfSetValues from this SedRepeatedTask_t as a ListOf_t *. 1956 * 1957 * @copydetails doc_returned_unowned_pointer 1958 * 1959 * @see SedRepeatedTask_addTaskChange() 1960 * @see SedRepeatedTask_createTaskChange() 1961 * @see SedRepeatedTask_getTaskChangeById() 1962 * @see SedRepeatedTask_getTaskChange() 1963 * @see SedRepeatedTask_getNumTaskChanges() 1964 * @see SedRepeatedTask_removeTaskChangeById() 1965 * @see SedRepeatedTask_removeTaskChange() 1966 * 1967 * @memberof SedRepeatedTask_t 1968 */ 1969 LIBSEDML_EXTERN 1970 SedListOf_t* 1971 SedRepeatedTask_getListOfTaskChanges(SedRepeatedTask_t* srt); 1972 1973 1974 /** 1975 * Get a SedSetValue_t from the SedRepeatedTask_t. 1976 * 1977 * @param srt the SedRepeatedTask_t structure to search. 1978 * 1979 * @param n an unsigned int representing the index of the SedSetValue_t to 1980 * retrieve. 1981 * 1982 * @return the nth SedSetValue_t in the SedListOfSetValues within this 1983 * SedRepeatedTask or @c NULL if no such object exists. 1984 * 1985 * @copydetails doc_returned_unowned_pointer 1986 * 1987 * @memberof SedRepeatedTask_t 1988 */ 1989 LIBSEDML_EXTERN 1990 SedSetValue_t* 1991 SedRepeatedTask_getTaskChange(SedRepeatedTask_t* srt, unsigned int n); 1992 1993 1994 /** 1995 * Get a SedSetValue_t from the SedRepeatedTask_t based on the ModelReference 1996 * to which it refers. 1997 * 1998 * @param srt the SedRepeatedTask_t structure to search. 1999 * 2000 * @param sid a string representing the "modelReference" attribute of the 2001 * SedSetValue_t object to retrieve. 2002 * 2003 * @return the first SedSetValue_t in this SedRepeatedTask_t based on the given 2004 * modelReference attribute or NULL if no such SedSetValue_t exists. 2005 * 2006 * @copydetails doc_returned_unowned_pointer 2007 * 2008 * @memberof SedRepeatedTask_t 2009 */ 2010 LIBSEDML_EXTERN 2011 SedSetValue_t* 2012 SedRepeatedTask_getTaskChangeByModelReference(SedRepeatedTask_t* srt, 2013 const char *sid); 2014 2015 2016 /** 2017 * Get a SedSetValue_t from the SedRepeatedTask_t based on the Range to which 2018 * it refers. 2019 * 2020 * @param srt the SedRepeatedTask_t structure to search. 2021 * 2022 * @param sid a string representing the "range" attribute of the SedSetValue_t 2023 * object to retrieve. 2024 * 2025 * @return the first SedSetValue_t in this SedRepeatedTask_t based on the given 2026 * range attribute or NULL if no such SedSetValue_t exists. 2027 * 2028 * @copydetails doc_returned_unowned_pointer 2029 * 2030 * @memberof SedRepeatedTask_t 2031 */ 2032 LIBSEDML_EXTERN 2033 SedSetValue_t* 2034 SedRepeatedTask_getTaskChangeByRange(SedRepeatedTask_t* srt, const char *sid); 2035 2036 2037 /** 2038 * Adds a copy of the given SedSetValue_t to this SedRepeatedTask_t. 2039 * 2040 * @param srt the SedRepeatedTask_t structure to which the SedSetValue_t should 2041 * be added. 2042 * 2043 * @param ssv the SedSetValue_t object to add. 2044 * 2045 * @copydetails doc_returns_success_code 2046 * @li @sedmlconstant{LIBSEDML_OPERATION_SUCCESS, OperationReturnValues_t} 2047 * @li @sedmlconstant{LIBSEDML_OPERATION_FAILED, OperationReturnValues_t} 2048 * @li @sedmlconstant{LIBSEDML_INVALID_OBJECT, OperationReturnValues_t} 2049 * @li @sedmlconstant{LIBSEDML_LEVEL_MISMATCH, OperationReturnValues_t} 2050 * @li @sedmlconstant{LIBSEDML_VERSION_MISMATCH, OperationReturnValues_t} 2051 * @li @sedmlconstant{LIBSEDML_PKG_VERSION_MISMATCH, OperationReturnValues_t} 2052 * @li @sedmlconstant{LIBSEDML_DUPLICATE_OBJECT_ID, OperationReturnValues_t} 2053 * 2054 * @memberof SedRepeatedTask_t 2055 */ 2056 LIBSEDML_EXTERN 2057 int 2058 SedRepeatedTask_addTaskChange(SedRepeatedTask_t* srt, 2059 const SedSetValue_t* ssv); 2060 2061 2062 /** 2063 * Get the number of SedSetValue_t objects in this SedRepeatedTask_t. 2064 * 2065 * @param srt the SedRepeatedTask_t structure to query. 2066 * 2067 * @return the number of SedSetValue_t objects in this SedRepeatedTask_t. 2068 * 2069 * @memberof SedRepeatedTask_t 2070 */ 2071 LIBSEDML_EXTERN 2072 unsigned int 2073 SedRepeatedTask_getNumTaskChanges(SedRepeatedTask_t* srt); 2074 2075 2076 /** 2077 * Creates a new SedSetValue_t object, adds it to this SedRepeatedTask_t object 2078 * and returns the SedSetValue_t object created. 2079 * 2080 * @param srt the SedRepeatedTask_t structure to which the SedSetValue_t should 2081 * be added. 2082 * 2083 * @return a new SedSetValue_t object instance. 2084 * 2085 * @copydetails doc_returned_unowned_pointer 2086 * 2087 * @memberof SedRepeatedTask_t 2088 */ 2089 LIBSEDML_EXTERN 2090 SedSetValue_t* 2091 SedRepeatedTask_createTaskChange(SedRepeatedTask_t* srt); 2092 2093 2094 /** 2095 * Removes the nth SedSetValue_t from this SedRepeatedTask_t and returns a 2096 * pointer to it. 2097 * 2098 * @param srt the SedRepeatedTask_t structure to search. 2099 * 2100 * @param n an unsigned int representing the index of the SedSetValue_t to 2101 * remove. 2102 * 2103 * @return a pointer to the nth SedSetValue_t in this SedRepeatedTask_t. 2104 * 2105 * @copydetails doc_warning_returns_owned_pointer 2106 * 2107 * @memberof SedRepeatedTask_t 2108 */ 2109 LIBSEDML_EXTERN 2110 SedSetValue_t* 2111 SedRepeatedTask_removeTaskChange(SedRepeatedTask_t* srt, unsigned int n); 2112 2113 2114 /** 2115 * Returns a ListOf_t * containing SedSubTask_t objects from this 2116 * SedRepeatedTask_t. 2117 * 2118 * @param srt the SedRepeatedTask_t structure whose SedListOfSubTasks is 2119 * sought. 2120 * 2121 * @return the SedListOfSubTasks from this SedRepeatedTask_t as a ListOf_t *. 2122 * 2123 * @copydetails doc_returned_unowned_pointer 2124 * 2125 * @see SedRepeatedTask_addSubTask() 2126 * @see SedRepeatedTask_createSubTask() 2127 * @see SedRepeatedTask_getSubTaskById() 2128 * @see SedRepeatedTask_getSubTask() 2129 * @see SedRepeatedTask_getNumSubTasks() 2130 * @see SedRepeatedTask_removeSubTaskById() 2131 * @see SedRepeatedTask_removeSubTask() 2132 * 2133 * @memberof SedRepeatedTask_t 2134 */ 2135 LIBSEDML_EXTERN 2136 SedListOf_t* 2137 SedRepeatedTask_getListOfSubTasks(SedRepeatedTask_t* srt); 2138 2139 2140 /** 2141 * Get a SedSubTask_t from the SedRepeatedTask_t. 2142 * 2143 * @param srt the SedRepeatedTask_t structure to search. 2144 * 2145 * @param n an unsigned int representing the index of the SedSubTask_t to 2146 * retrieve. 2147 * 2148 * @return the nth SedSubTask_t in the SedListOfSubTasks within this 2149 * SedRepeatedTask or @c NULL if no such object exists. 2150 * 2151 * @copydetails doc_returned_unowned_pointer 2152 * 2153 * @memberof SedRepeatedTask_t 2154 */ 2155 LIBSEDML_EXTERN 2156 SedSubTask_t* 2157 SedRepeatedTask_getSubTask(SedRepeatedTask_t* srt, unsigned int n); 2158 2159 2160 /** 2161 * Get a SedSubTask_t from the SedRepeatedTask_t based on the Task to which it 2162 * refers. 2163 * 2164 * @param srt the SedRepeatedTask_t structure to search. 2165 * 2166 * @param sid a string representing the "task" attribute of the SedSubTask_t 2167 * object to retrieve. 2168 * 2169 * @return the first SedSubTask_t in this SedRepeatedTask_t based on the given 2170 * task attribute or NULL if no such SedSubTask_t exists. 2171 * 2172 * @copydetails doc_returned_unowned_pointer 2173 * 2174 * @memberof SedRepeatedTask_t 2175 */ 2176 LIBSEDML_EXTERN 2177 SedSubTask_t* 2178 SedRepeatedTask_getSubTaskByTask(SedRepeatedTask_t* srt, const char *sid); 2179 2180 2181 /** 2182 * Adds a copy of the given SedSubTask_t to this SedRepeatedTask_t. 2183 * 2184 * @param srt the SedRepeatedTask_t structure to which the SedSubTask_t should 2185 * be added. 2186 * 2187 * @param sst the SedSubTask_t object to add. 2188 * 2189 * @copydetails doc_returns_success_code 2190 * @li @sedmlconstant{LIBSEDML_OPERATION_SUCCESS, OperationReturnValues_t} 2191 * @li @sedmlconstant{LIBSEDML_OPERATION_FAILED, OperationReturnValues_t} 2192 * @li @sedmlconstant{LIBSEDML_INVALID_OBJECT, OperationReturnValues_t} 2193 * @li @sedmlconstant{LIBSEDML_LEVEL_MISMATCH, OperationReturnValues_t} 2194 * @li @sedmlconstant{LIBSEDML_VERSION_MISMATCH, OperationReturnValues_t} 2195 * @li @sedmlconstant{LIBSEDML_PKG_VERSION_MISMATCH, OperationReturnValues_t} 2196 * @li @sedmlconstant{LIBSEDML_DUPLICATE_OBJECT_ID, OperationReturnValues_t} 2197 * 2198 * @memberof SedRepeatedTask_t 2199 */ 2200 LIBSEDML_EXTERN 2201 int 2202 SedRepeatedTask_addSubTask(SedRepeatedTask_t* srt, const SedSubTask_t* sst); 2203 2204 2205 /** 2206 * Get the number of SedSubTask_t objects in this SedRepeatedTask_t. 2207 * 2208 * @param srt the SedRepeatedTask_t structure to query. 2209 * 2210 * @return the number of SedSubTask_t objects in this SedRepeatedTask_t. 2211 * 2212 * @memberof SedRepeatedTask_t 2213 */ 2214 LIBSEDML_EXTERN 2215 unsigned int 2216 SedRepeatedTask_getNumSubTasks(SedRepeatedTask_t* srt); 2217 2218 2219 /** 2220 * Creates a new SedSubTask_t object, adds it to this SedRepeatedTask_t object 2221 * and returns the SedSubTask_t object created. 2222 * 2223 * @param srt the SedRepeatedTask_t structure to which the SedSubTask_t should 2224 * be added. 2225 * 2226 * @return a new SedSubTask_t object instance. 2227 * 2228 * @copydetails doc_returned_unowned_pointer 2229 * 2230 * @memberof SedRepeatedTask_t 2231 */ 2232 LIBSEDML_EXTERN 2233 SedSubTask_t* 2234 SedRepeatedTask_createSubTask(SedRepeatedTask_t* srt); 2235 2236 2237 /** 2238 * Removes the nth SedSubTask_t from this SedRepeatedTask_t and returns a 2239 * pointer to it. 2240 * 2241 * @param srt the SedRepeatedTask_t structure to search. 2242 * 2243 * @param n an unsigned int representing the index of the SedSubTask_t to 2244 * remove. 2245 * 2246 * @return a pointer to the nth SedSubTask_t in this SedRepeatedTask_t. 2247 * 2248 * @copydetails doc_warning_returns_owned_pointer 2249 * 2250 * @memberof SedRepeatedTask_t 2251 */ 2252 LIBSEDML_EXTERN 2253 SedSubTask_t* 2254 SedRepeatedTask_removeSubTask(SedRepeatedTask_t* srt, unsigned int n); 2255 2256 2257 /** 2258 * Predicate returning @c 1 (true) if all the required attributes for this 2259 * SedRepeatedTask_t object have been set. 2260 * 2261 * @param srt the SedRepeatedTask_t structure. 2262 * 2263 * @return @c 1 (true) to indicate that all the required attributes of this 2264 * SedRepeatedTask_t have been set, otherwise @c 0 (false) is returned. 2265 * 2266 * @memberof SedRepeatedTask_t 2267 */ 2268 LIBSEDML_EXTERN 2269 int 2270 SedRepeatedTask_hasRequiredAttributes(const SedRepeatedTask_t * srt); 2271 2272 2273 /** 2274 * Predicate returning @c 1 (true) if all the required elements for this 2275 * SedRepeatedTask_t object have been set. 2276 * 2277 * @param srt the SedRepeatedTask_t structure. 2278 * 2279 * @return @c 1 (true) to indicate that all the required elements of this 2280 * SedRepeatedTask_t have been set, otherwise @c 0 (false) is returned. 2281 * 2282 * 2283 * @note The required elements for the SedRepeatedTask_t object are: 2284 * 2285 * @memberof SedRepeatedTask_t 2286 */ 2287 LIBSEDML_EXTERN 2288 int 2289 SedRepeatedTask_hasRequiredElements(const SedRepeatedTask_t * srt); 2290 2291 2292 2293 2294 END_C_DECLS 2295 2296 2297 2298 2299 LIBSEDML_CPP_NAMESPACE_END 2300 2301 2302 2303 2304 #endif /* !SWIG */ 2305 2306 2307 2308 2309 #endif /* !SedRepeatedTask_H__ */ 2310 2311 2312