1 /** 2 * @file SedMarker.h 3 * @brief Definition of the SedMarker 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 SedMarker 35 * @sbmlbrief{sedml} TODO:Definition of the SedMarker class. 36 */ 37 38 /** 39 * <!-- ~ ~ ~ ~ ~ Start of common documentation strings ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ 40 * The following text is used as common documentation blocks copied multiple 41 * times elsewhere in this file. The use of @class is a hack needed because 42 * Doxygen's @copydetails command has limited functionality. Symbols 43 * beginning with "doc_" are marked as ignored in our Doxygen configuration. 44 * ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ --> 45 * 46 * 47 * @class doc_sedmarker_type 48 * 49 * @par 50 * The attribute "type" on a SedMarker object is used to TODO:add explanation 51 * 52 * In the SBML 53 * Level 3 Version 1 Sedml specification, the following are the 54 * allowable values for "type": 55 * <ul> 56 * <li> @c "none", TODO:add description 57 * 58 * <li> @c "square", TODO:add description 59 * 60 * <li> @c "circle", TODO:add description 61 * 62 * <li> @c "diamond", TODO:add description 63 * 64 * <li> @c "xCross", TODO:add description 65 * 66 * <li> @c "plus", TODO:add description 67 * 68 * <li> @c "star", TODO:add description 69 * 70 * <li> @c "triangleUp", TODO:add description 71 * 72 * <li> @c "triangleDown", TODO:add description 73 * 74 * <li> @c "triangleLeft", TODO:add description 75 * 76 * <li> @c "triangleRight", TODO:add description 77 * 78 * <li> @c "hDash", TODO:add description 79 * 80 * <li> @c "vDash", TODO:add description 81 * 82 * </ul> 83 */ 84 85 86 #ifndef SedMarker_H__ 87 #define SedMarker_H__ 88 89 90 #include <sedml/common/extern.h> 91 #include <sedml/common/sedmlfwd.h> 92 #include <sedml/common/SedmlEnumerations.h> 93 94 95 #ifdef __cplusplus 96 97 98 #include <string> 99 100 101 #include <sedml/SedBase.h> 102 #include <sbml/common/libsbml-namespace.h> 103 104 105 LIBSEDML_CPP_NAMESPACE_BEGIN 106 107 108 class LIBSEDML_EXTERN SedMarker : public SedBase 109 { 110 protected: 111 112 /** @cond doxygenLibSEDMLInternal */ 113 114 double mSize; 115 bool mIsSetSize; 116 MarkerType_t mType; 117 std::string mFill; 118 std::string mLineColor; 119 double mLineThickness; 120 bool mIsSetLineThickness; 121 122 /** @endcond */ 123 124 public: 125 126 /** 127 * Creates a new SedMarker using the given SED-ML Level and @ p version 128 * values. 129 * 130 * @param level an unsigned int, the SED-ML Level to assign to this SedMarker. 131 * 132 * @param version an unsigned int, the SED-ML Version to assign to this 133 * SedMarker. 134 * 135 * @copydetails doc_note_setting_lv_pkg 136 */ 137 SedMarker(unsigned int level = SEDML_DEFAULT_LEVEL, 138 unsigned int version = SEDML_DEFAULT_VERSION); 139 140 141 /** 142 * Creates a new SedMarker using the given SedNamespaces object @p sedmlns. 143 * 144 * @param sedmlns the SedNamespaces object. 145 * 146 * @copydetails doc_note_setting_lv_pkg 147 */ 148 SedMarker(SedNamespaces *sedmlns); 149 150 151 /** 152 * Copy constructor for SedMarker. 153 * 154 * @param orig the SedMarker instance to copy. 155 */ 156 SedMarker(const SedMarker& orig); 157 158 159 /** 160 * Assignment operator for SedMarker. 161 * 162 * @param rhs the SedMarker object whose values are to be used as the basis 163 * of the assignment. 164 */ 165 SedMarker& operator=(const SedMarker& rhs); 166 167 168 /** 169 * Creates and returns a deep copy of this SedMarker object. 170 * 171 * @return a (deep) copy of this SedMarker object. 172 */ 173 virtual SedMarker* clone() const; 174 175 176 /** 177 * Destructor for SedMarker. 178 */ 179 virtual ~SedMarker(); 180 181 182 /** 183 * Returns the value of the "size" attribute of this SedMarker. 184 * 185 * @return the value of the "size" attribute of this SedMarker as a double. 186 */ 187 double getSize() const; 188 189 190 /** 191 * Returns the value of the "type" attribute of this SedMarker. 192 * 193 * @return the value of the "type" attribute of this SedMarker as a 194 * MarkerType_t. 195 * 196 * @copydetails doc_sedmarker_type 197 * @if clike The value is drawn from the enumeration @ref MarkerType_t @endif 198 * The possible values returned by this method are: 199 * @li @sbmlconstant{SEDML_MARKERTYPE_NONE, MarkerType_t} 200 * @li @sbmlconstant{SEDML_MARKERTYPE_SQUARE, MarkerType_t} 201 * @li @sbmlconstant{SEDML_MARKERTYPE_CIRCLE, MarkerType_t} 202 * @li @sbmlconstant{SEDML_MARKERTYPE_DIAMOND, MarkerType_t} 203 * @li @sbmlconstant{SEDML_MARKERTYPE_XCROSS, MarkerType_t} 204 * @li @sbmlconstant{SEDML_MARKERTYPE_PLUS, MarkerType_t} 205 * @li @sbmlconstant{SEDML_MARKERTYPE_STAR, MarkerType_t} 206 * @li @sbmlconstant{SEDML_MARKERTYPE_TRIANGLEUP, MarkerType_t} 207 * @li @sbmlconstant{SEDML_MARKERTYPE_TRIANGLEDOWN, MarkerType_t} 208 * @li @sbmlconstant{SEDML_MARKERTYPE_TRIANGLELEFT, MarkerType_t} 209 * @li @sbmlconstant{SEDML_MARKERTYPE_TRIANGLERIGHT, MarkerType_t} 210 * @li @sbmlconstant{SEDML_MARKERTYPE_HDASH, MarkerType_t} 211 * @li @sbmlconstant{SEDML_MARKERTYPE_VDASH, MarkerType_t} 212 * @li @sbmlconstant{SEDML_MARKERTYPE_INVALID, MarkerType_t} 213 */ 214 MarkerType_t getType() const; 215 216 217 /** 218 * Returns the value of the "type" attribute of this SedMarker. 219 * 220 * @return the value of the "type" attribute of this SedMarker as a string. 221 * 222 * @copydetails doc_sedmarker_type 223 * The possible values returned by this method are: 224 * @li @c "none" 225 * @li @c "square" 226 * @li @c "circle" 227 * @li @c "diamond" 228 * @li @c "xCross" 229 * @li @c "plus" 230 * @li @c "star" 231 * @li @c "triangleUp" 232 * @li @c "triangleDown" 233 * @li @c "triangleLeft" 234 * @li @c "triangleRight" 235 * @li @c "hDash" 236 * @li @c "vDash" 237 * @li @c "invalid MarkerType value" 238 */ 239 std::string getTypeAsString() const; 240 241 242 /** 243 * Returns the value of the "fill" attribute of this SedMarker. 244 * 245 * @return the value of the "fill" attribute of this SedMarker as a string. 246 */ 247 const std::string& getFill() const; 248 249 250 /** 251 * Returns the value of the "lineColor" attribute of this SedMarker. 252 * 253 * @return the value of the "lineColor" attribute of this SedMarker as a 254 * string. 255 */ 256 const std::string& getLineColor() const; 257 258 259 /** 260 * Returns the value of the "lineThickness" attribute of this SedMarker. 261 * 262 * @return the value of the "lineThickness" attribute of this SedMarker as a 263 * double. 264 */ 265 double getLineThickness() const; 266 267 268 /** 269 * Predicate returning @c true if this SedMarker's "size" attribute is set. 270 * 271 * @return @c true if this SedMarker's "size" attribute has been set, 272 * otherwise @c false is returned. 273 */ 274 bool isSetSize() const; 275 276 277 /** 278 * Predicate returning @c true if this SedMarker's "type" attribute is set. 279 * 280 * @return @c true if this SedMarker's "type" attribute has been set, 281 * otherwise @c false is returned. 282 * 283 * @copydetails doc_sedmarker_type 284 */ 285 bool isSetType() const; 286 287 288 /** 289 * Predicate returning @c true if this SedMarker's "fill" attribute is set. 290 * 291 * @return @c true if this SedMarker's "fill" attribute has been set, 292 * otherwise @c false is returned. 293 */ 294 bool isSetFill() const; 295 296 297 /** 298 * Predicate returning @c true if this SedMarker's "lineColor" attribute is 299 * set. 300 * 301 * @return @c true if this SedMarker's "lineColor" attribute has been set, 302 * otherwise @c false is returned. 303 */ 304 bool isSetLineColor() const; 305 306 307 /** 308 * Predicate returning @c true if this SedMarker's "lineThickness" attribute 309 * is set. 310 * 311 * @return @c true if this SedMarker's "lineThickness" attribute has been 312 * set, otherwise @c false is returned. 313 */ 314 bool isSetLineThickness() const; 315 316 317 /** 318 * Sets the value of the "size" attribute of this SedMarker. 319 * 320 * @param size double value of the "size" attribute to be set. 321 * 322 * @copydetails doc_returns_success_code 323 * @li @sedmlconstant{LIBSEDML_OPERATION_SUCCESS, OperationReturnValues_t} 324 * @li @sedmlconstant{LIBSEDML_INVALID_ATTRIBUTE_VALUE, 325 * OperationReturnValues_t} 326 */ 327 int setSize(double size); 328 329 330 /** 331 * Sets the value of the "type" attribute of this SedMarker. 332 * 333 * @param type @if clike MarkerType_t@else int@endif value of the "type" 334 * attribute to be set. 335 * 336 * @copydetails doc_returns_success_code 337 * @li @sedmlconstant{LIBSEDML_OPERATION_SUCCESS, OperationReturnValues_t} 338 * @li @sedmlconstant{LIBSEDML_INVALID_ATTRIBUTE_VALUE, 339 * OperationReturnValues_t} 340 * 341 * @copydetails doc_sedmarker_type 342 */ 343 int setType(const MarkerType_t type); 344 345 346 /** 347 * Sets the value of the "type" attribute of this SedMarker. 348 * 349 * @param type std::string& of the "type" attribute to be set. 350 * 351 * @copydetails doc_returns_success_code 352 * @li @sedmlconstant{LIBSEDML_OPERATION_SUCCESS, OperationReturnValues_t} 353 * @li @sedmlconstant{LIBSEDML_INVALID_ATTRIBUTE_VALUE, 354 * OperationReturnValues_t} 355 * 356 * @copydetails doc_sedmarker_type 357 */ 358 int setType(const std::string& type); 359 360 361 /** 362 * Sets the value of the "fill" attribute of this SedMarker. 363 * 364 * @param fill std::string& value of the "fill" attribute to be set. 365 * 366 * @copydetails doc_returns_one_success_code 367 * @li @sedmlconstant{LIBSEDML_OPERATION_SUCCESS, OperationReturnValues_t} 368 * 369 * Calling this function with @p fill = @c NULL or an empty string is 370 * equivalent to calling unsetFill(). 371 */ 372 int setFill(const std::string& fill); 373 374 375 /** 376 * Sets the value of the "lineColor" attribute of this SedMarker. 377 * 378 * @param lineColor std::string& value of the "lineColor" attribute to be 379 * set. 380 * 381 * @copydetails doc_returns_one_success_code 382 * @li @sedmlconstant{LIBSEDML_OPERATION_SUCCESS, OperationReturnValues_t} 383 * 384 * Calling this function with @p lineColor = @c NULL or an empty string is 385 * equivalent to calling unsetLineColor(). 386 */ 387 int setLineColor(const std::string& lineColor); 388 389 390 /** 391 * Sets the value of the "lineThickness" attribute of this SedMarker. 392 * 393 * @param lineThickness double value of the "lineThickness" attribute to be 394 * set. 395 * 396 * @copydetails doc_returns_success_code 397 * @li @sedmlconstant{LIBSEDML_OPERATION_SUCCESS, OperationReturnValues_t} 398 * @li @sedmlconstant{LIBSEDML_INVALID_ATTRIBUTE_VALUE, 399 * OperationReturnValues_t} 400 */ 401 int setLineThickness(double lineThickness); 402 403 404 /** 405 * Unsets the value of the "size" attribute of this SedMarker. 406 * 407 * @copydetails doc_returns_success_code 408 * @li @sedmlconstant{LIBSEDML_OPERATION_SUCCESS, OperationReturnValues_t} 409 * @li @sedmlconstant{LIBSEDML_OPERATION_FAILED, OperationReturnValues_t} 410 */ 411 int unsetSize(); 412 413 414 /** 415 * Unsets the value of the "type" attribute of this SedMarker. 416 * 417 * @copydetails doc_returns_one_success_code 418 * @li @sedmlconstant{LIBSEDML_OPERATION_SUCCESS, OperationReturnValues_t} 419 * 420 * @copydetails doc_sedmarker_type 421 */ 422 int unsetType(); 423 424 425 /** 426 * Unsets the value of the "fill" attribute of this SedMarker. 427 * 428 * @copydetails doc_returns_success_code 429 * @li @sedmlconstant{LIBSEDML_OPERATION_SUCCESS, OperationReturnValues_t} 430 * @li @sedmlconstant{LIBSEDML_OPERATION_FAILED, OperationReturnValues_t} 431 */ 432 int unsetFill(); 433 434 435 /** 436 * Unsets the value of the "lineColor" attribute of this SedMarker. 437 * 438 * @copydetails doc_returns_success_code 439 * @li @sedmlconstant{LIBSEDML_OPERATION_SUCCESS, OperationReturnValues_t} 440 * @li @sedmlconstant{LIBSEDML_OPERATION_FAILED, OperationReturnValues_t} 441 */ 442 int unsetLineColor(); 443 444 445 /** 446 * Unsets the value of the "lineThickness" attribute of this SedMarker. 447 * 448 * @copydetails doc_returns_success_code 449 * @li @sedmlconstant{LIBSEDML_OPERATION_SUCCESS, OperationReturnValues_t} 450 * @li @sedmlconstant{LIBSEDML_OPERATION_FAILED, OperationReturnValues_t} 451 */ 452 int unsetLineThickness(); 453 454 455 /** 456 * Returns the XML element name of this SedMarker object. 457 * 458 * For SedMarker, the XML element name is always @c "marker". 459 * 460 * @return the name of this element, i.e. @c "marker". 461 */ 462 virtual const std::string& getElementName() const; 463 464 465 /** 466 * Returns the libSEDML type code for this SedMarker object. 467 * 468 * @copydetails doc_what_are_typecodes 469 * 470 * @return the SED-ML type code for this object: 471 * @sedmlconstant{SEDML_MARKER, SedTypeCode_t}. 472 * 473 * @copydetails doc_warning_typecodes_not_unique 474 * 475 * @see getElementName() 476 */ 477 virtual int getTypeCode() const; 478 479 480 /** 481 * Predicate returning @c true if all the required attributes for this 482 * SedMarker object have been set. 483 * 484 * @return @c true to indicate that all the required attributes of this 485 * SedMarker have been set, otherwise @c false is returned. 486 */ 487 virtual bool hasRequiredAttributes() const; 488 489 490 491 /** @cond doxygenLibSEDMLInternal */ 492 493 /** 494 * Write any contained elements 495 */ 496 virtual void writeElements(LIBSBML_CPP_NAMESPACE_QUALIFIER XMLOutputStream& 497 stream) const; 498 499 /** @endcond */ 500 501 502 503 /** @cond doxygenLibSEDMLInternal */ 504 505 /** 506 * Accepts the given SedVisitor 507 */ 508 virtual bool accept(SedVisitor& v) const; 509 510 /** @endcond */ 511 512 513 514 /** @cond doxygenLibSEDMLInternal */ 515 516 /** 517 * Sets the parent SedDocument 518 */ 519 virtual void setSedDocument(SedDocument* d); 520 521 /** @endcond */ 522 523 524 525 526 #ifndef SWIG 527 528 529 530 /** @cond doxygenLibSEDMLInternal */ 531 532 /** 533 * Gets the value of the "attributeName" attribute of this SedMarker. 534 * 535 * @param attributeName, the name of the attribute to retrieve. 536 * 537 * @param value, the address of the value to record. 538 * 539 * @copydetails doc_returns_success_code 540 * @li @sedmlconstant{LIBSEDML_OPERATION_SUCCESS, OperationReturnValues_t} 541 * @li @sedmlconstant{LIBSEDML_OPERATION_FAILED, OperationReturnValues_t} 542 */ 543 virtual int getAttribute(const std::string& attributeName, bool& value) 544 const; 545 546 /** @endcond */ 547 548 549 550 /** @cond doxygenLibSEDMLInternal */ 551 552 /** 553 * Gets the value of the "attributeName" attribute of this SedMarker. 554 * 555 * @param attributeName, the name of the attribute to retrieve. 556 * 557 * @param value, the address of the value to record. 558 * 559 * @copydetails doc_returns_success_code 560 * @li @sedmlconstant{LIBSEDML_OPERATION_SUCCESS, OperationReturnValues_t} 561 * @li @sedmlconstant{LIBSEDML_OPERATION_FAILED, OperationReturnValues_t} 562 */ 563 virtual int getAttribute(const std::string& attributeName, int& value) const; 564 565 /** @endcond */ 566 567 568 569 /** @cond doxygenLibSEDMLInternal */ 570 571 /** 572 * Gets the value of the "attributeName" attribute of this SedMarker. 573 * 574 * @param attributeName, the name of the attribute to retrieve. 575 * 576 * @param value, the address of the value to record. 577 * 578 * @copydetails doc_returns_success_code 579 * @li @sedmlconstant{LIBSEDML_OPERATION_SUCCESS, OperationReturnValues_t} 580 * @li @sedmlconstant{LIBSEDML_OPERATION_FAILED, OperationReturnValues_t} 581 */ 582 virtual int getAttribute(const std::string& attributeName, 583 double& value) const; 584 585 /** @endcond */ 586 587 588 589 /** @cond doxygenLibSEDMLInternal */ 590 591 /** 592 * Gets the value of the "attributeName" attribute of this SedMarker. 593 * 594 * @param attributeName, the name of the attribute to retrieve. 595 * 596 * @param value, the address of the value to record. 597 * 598 * @copydetails doc_returns_success_code 599 * @li @sedmlconstant{LIBSEDML_OPERATION_SUCCESS, OperationReturnValues_t} 600 * @li @sedmlconstant{LIBSEDML_OPERATION_FAILED, OperationReturnValues_t} 601 */ 602 virtual int getAttribute(const std::string& attributeName, 603 unsigned int& value) const; 604 605 /** @endcond */ 606 607 608 609 /** @cond doxygenLibSEDMLInternal */ 610 611 /** 612 * Gets the value of the "attributeName" attribute of this SedMarker. 613 * 614 * @param attributeName, the name of the attribute to retrieve. 615 * 616 * @param value, the address of the value to record. 617 * 618 * @copydetails doc_returns_success_code 619 * @li @sedmlconstant{LIBSEDML_OPERATION_SUCCESS, OperationReturnValues_t} 620 * @li @sedmlconstant{LIBSEDML_OPERATION_FAILED, OperationReturnValues_t} 621 */ 622 virtual int getAttribute(const std::string& attributeName, 623 std::string& value) const; 624 625 /** @endcond */ 626 627 628 629 /** @cond doxygenLibSEDMLInternal */ 630 631 /** 632 * Predicate returning @c true if this SedMarker's attribute "attributeName" 633 * is set. 634 * 635 * @param attributeName, the name of the attribute to query. 636 * 637 * @return @c true if this SedMarker's attribute "attributeName" has been 638 * set, otherwise @c false is returned. 639 */ 640 virtual bool isSetAttribute(const std::string& attributeName) const; 641 642 /** @endcond */ 643 644 645 646 /** @cond doxygenLibSEDMLInternal */ 647 648 /** 649 * Sets the value of the "attributeName" attribute of this SedMarker. 650 * 651 * @param attributeName, the name of the attribute to set. 652 * 653 * @param value, the value of the attribute to set. 654 * 655 * @copydetails doc_returns_success_code 656 * @li @sedmlconstant{LIBSEDML_OPERATION_SUCCESS, OperationReturnValues_t} 657 * @li @sedmlconstant{LIBSEDML_OPERATION_FAILED, OperationReturnValues_t} 658 */ 659 virtual int setAttribute(const std::string& attributeName, bool value); 660 661 /** @endcond */ 662 663 664 665 /** @cond doxygenLibSEDMLInternal */ 666 667 /** 668 * Sets the value of the "attributeName" attribute of this SedMarker. 669 * 670 * @param attributeName, the name of the attribute to set. 671 * 672 * @param value, the value of the attribute to set. 673 * 674 * @copydetails doc_returns_success_code 675 * @li @sedmlconstant{LIBSEDML_OPERATION_SUCCESS, OperationReturnValues_t} 676 * @li @sedmlconstant{LIBSEDML_OPERATION_FAILED, OperationReturnValues_t} 677 */ 678 virtual int setAttribute(const std::string& attributeName, int value); 679 680 /** @endcond */ 681 682 683 684 /** @cond doxygenLibSEDMLInternal */ 685 686 /** 687 * Sets the value of the "attributeName" attribute of this SedMarker. 688 * 689 * @param attributeName, the name of the attribute to set. 690 * 691 * @param value, the value of the attribute to set. 692 * 693 * @copydetails doc_returns_success_code 694 * @li @sedmlconstant{LIBSEDML_OPERATION_SUCCESS, OperationReturnValues_t} 695 * @li @sedmlconstant{LIBSEDML_OPERATION_FAILED, OperationReturnValues_t} 696 */ 697 virtual int setAttribute(const std::string& attributeName, double value); 698 699 /** @endcond */ 700 701 702 703 /** @cond doxygenLibSEDMLInternal */ 704 705 /** 706 * Sets the value of the "attributeName" attribute of this SedMarker. 707 * 708 * @param attributeName, the name of the attribute to set. 709 * 710 * @param value, the value of the attribute to set. 711 * 712 * @copydetails doc_returns_success_code 713 * @li @sedmlconstant{LIBSEDML_OPERATION_SUCCESS, OperationReturnValues_t} 714 * @li @sedmlconstant{LIBSEDML_OPERATION_FAILED, OperationReturnValues_t} 715 */ 716 virtual int setAttribute(const std::string& attributeName, 717 unsigned int value); 718 719 /** @endcond */ 720 721 722 723 /** @cond doxygenLibSEDMLInternal */ 724 725 /** 726 * Sets the value of the "attributeName" attribute of this SedMarker. 727 * 728 * @param attributeName, the name of the attribute to set. 729 * 730 * @param value, the value of the attribute to set. 731 * 732 * @copydetails doc_returns_success_code 733 * @li @sedmlconstant{LIBSEDML_OPERATION_SUCCESS, OperationReturnValues_t} 734 * @li @sedmlconstant{LIBSEDML_OPERATION_FAILED, OperationReturnValues_t} 735 */ 736 virtual int setAttribute(const std::string& attributeName, 737 const std::string& value); 738 739 /** @endcond */ 740 741 742 743 /** @cond doxygenLibSEDMLInternal */ 744 745 /** 746 * Unsets the value of the "attributeName" attribute of this SedMarker. 747 * 748 * @param attributeName, the name of the attribute to query. 749 * 750 * @copydetails doc_returns_success_code 751 * @li @sedmlconstant{LIBSEDML_OPERATION_SUCCESS, OperationReturnValues_t} 752 * @li @sedmlconstant{LIBSEDML_OPERATION_FAILED, OperationReturnValues_t} 753 */ 754 virtual int unsetAttribute(const std::string& attributeName); 755 756 /** @endcond */ 757 758 759 760 761 #endif /* !SWIG */ 762 763 764 protected: 765 766 767 /** @cond doxygenLibSEDMLInternal */ 768 769 /** 770 * Adds the expected attributes for this element 771 */ 772 virtual void addExpectedAttributes(LIBSBML_CPP_NAMESPACE_QUALIFIER 773 ExpectedAttributes& attributes); 774 775 /** @endcond */ 776 777 778 779 /** @cond doxygenLibSEDMLInternal */ 780 781 /** 782 * Reads the expected attributes into the member data variables 783 */ 784 virtual void readAttributes( 785 const LIBSBML_CPP_NAMESPACE_QUALIFIER 786 XMLAttributes& attributes, 787 const LIBSBML_CPP_NAMESPACE_QUALIFIER 788 ExpectedAttributes& expectedAttributes); 789 790 /** @endcond */ 791 792 793 794 /** @cond doxygenLibSEDMLInternal */ 795 796 /** 797 * Writes the attributes to the stream 798 */ 799 virtual void writeAttributes(LIBSBML_CPP_NAMESPACE_QUALIFIER XMLOutputStream& 800 stream) const; 801 802 /** @endcond */ 803 804 805 }; 806 807 808 809 LIBSEDML_CPP_NAMESPACE_END 810 811 812 813 814 #endif /* __cplusplus */ 815 816 817 818 819 #ifndef SWIG 820 821 822 823 824 LIBSEDML_CPP_NAMESPACE_BEGIN 825 826 827 828 829 BEGIN_C_DECLS 830 831 832 /** 833 * Creates a new SedMarker_t using the given SED-ML Level and @ p version 834 * values. 835 * 836 * @param level an unsigned int, the SED-ML Level to assign to this SedMarker_t. 837 * 838 * @param version an unsigned int, the SED-ML Version to assign to this 839 * SedMarker_t. 840 * 841 * @copydetails doc_note_setting_lv_pkg 842 * 843 * @copydetails doc_returned_owned_pointer 844 * 845 * @memberof SedMarker_t 846 */ 847 LIBSEDML_EXTERN 848 SedMarker_t * 849 SedMarker_create(unsigned int level, unsigned int version); 850 851 852 /** 853 * Creates and returns a deep copy of this SedMarker_t object. 854 * 855 * @param sm the SedMarker_t structure. 856 * 857 * @return a (deep) copy of this SedMarker_t object. 858 * 859 * @copydetails doc_returned_owned_pointer 860 * 861 * @memberof SedMarker_t 862 */ 863 LIBSEDML_EXTERN 864 SedMarker_t* 865 SedMarker_clone(const SedMarker_t* sm); 866 867 868 /** 869 * Frees this SedMarker_t object. 870 * 871 * @param sm the SedMarker_t structure. 872 * 873 * @memberof SedMarker_t 874 */ 875 LIBSEDML_EXTERN 876 void 877 SedMarker_free(SedMarker_t* sm); 878 879 880 /** 881 * Returns the value of the "size" attribute of this SedMarker_t. 882 * 883 * @param sm the SedMarker_t structure whose size is sought. 884 * 885 * @return the value of the "size" attribute of this SedMarker_t as a double. 886 * 887 * @memberof SedMarker_t 888 */ 889 LIBSEDML_EXTERN 890 double 891 SedMarker_getSize(const SedMarker_t * sm); 892 893 894 /** 895 * Returns the value of the "type" attribute of this SedMarker_t. 896 * 897 * @param sm the SedMarker_t structure whose type is sought. 898 * 899 * @return the value of the "type" attribute of this SedMarker_t as a 900 * MarkerType_t. 901 * 902 * @copydetails doc_sedmarker_type 903 * @if clike The value is drawn from the enumeration @ref MarkerType_t @endif 904 * The possible values returned by this method are: 905 * @li @sbmlconstant{SEDML_MARKERTYPE_NONE, MarkerType_t} 906 * @li @sbmlconstant{SEDML_MARKERTYPE_SQUARE, MarkerType_t} 907 * @li @sbmlconstant{SEDML_MARKERTYPE_CIRCLE, MarkerType_t} 908 * @li @sbmlconstant{SEDML_MARKERTYPE_DIAMOND, MarkerType_t} 909 * @li @sbmlconstant{SEDML_MARKERTYPE_XCROSS, MarkerType_t} 910 * @li @sbmlconstant{SEDML_MARKERTYPE_PLUS, MarkerType_t} 911 * @li @sbmlconstant{SEDML_MARKERTYPE_STAR, MarkerType_t} 912 * @li @sbmlconstant{SEDML_MARKERTYPE_TRIANGLEUP, MarkerType_t} 913 * @li @sbmlconstant{SEDML_MARKERTYPE_TRIANGLEDOWN, MarkerType_t} 914 * @li @sbmlconstant{SEDML_MARKERTYPE_TRIANGLELEFT, MarkerType_t} 915 * @li @sbmlconstant{SEDML_MARKERTYPE_TRIANGLERIGHT, MarkerType_t} 916 * @li @sbmlconstant{SEDML_MARKERTYPE_HDASH, MarkerType_t} 917 * @li @sbmlconstant{SEDML_MARKERTYPE_VDASH, MarkerType_t} 918 * @li @sbmlconstant{SEDML_MARKERTYPE_INVALID, MarkerType_t} 919 * 920 * @memberof SedMarker_t 921 */ 922 LIBSEDML_EXTERN 923 MarkerType_t 924 SedMarker_getType(const SedMarker_t * sm); 925 926 927 /** 928 * Returns the value of the "type" attribute of this SedMarker_t. 929 * 930 * @param sm the SedMarker_t structure whose type is sought. 931 * 932 * @return the value of the "type" attribute of this SedMarker_t as a const 933 * char *. 934 * 935 * @copydetails doc_returned_unowned_char 936 * 937 * @copydetails doc_sedmarker_type 938 * The possible values returned by this method are: 939 * @li @c "none" 940 * @li @c "square" 941 * @li @c "circle" 942 * @li @c "diamond" 943 * @li @c "xCross" 944 * @li @c "plus" 945 * @li @c "star" 946 * @li @c "triangleUp" 947 * @li @c "triangleDown" 948 * @li @c "triangleLeft" 949 * @li @c "triangleRight" 950 * @li @c "hDash" 951 * @li @c "vDash" 952 * @li @c "invalid MarkerType value" 953 * 954 * @memberof SedMarker_t 955 */ 956 LIBSEDML_EXTERN 957 char * 958 SedMarker_getTypeAsString(const SedMarker_t * sm); 959 960 961 /** 962 * Returns the value of the "fill" attribute of this SedMarker_t. 963 * 964 * @param sm the SedMarker_t structure whose fill is sought. 965 * 966 * @return the value of the "fill" attribute of this SedMarker_t as a pointer 967 * to a string. 968 * 969 * @copydetails doc_returned_owned_char 970 * 971 * @memberof SedMarker_t 972 */ 973 LIBSEDML_EXTERN 974 char * 975 SedMarker_getFill(const SedMarker_t * sm); 976 977 978 /** 979 * Returns the value of the "lineColor" attribute of this SedMarker_t. 980 * 981 * @param sm the SedMarker_t structure whose lineColor is sought. 982 * 983 * @return the value of the "lineColor" attribute of this SedMarker_t as a 984 * pointer to a string. 985 * 986 * @copydetails doc_returned_owned_char 987 * 988 * @memberof SedMarker_t 989 */ 990 LIBSEDML_EXTERN 991 char * 992 SedMarker_getLineColor(const SedMarker_t * sm); 993 994 995 /** 996 * Returns the value of the "lineThickness" attribute of this SedMarker_t. 997 * 998 * @param sm the SedMarker_t structure whose lineThickness is sought. 999 * 1000 * @return the value of the "lineThickness" attribute of this SedMarker_t as a 1001 * double. 1002 * 1003 * @memberof SedMarker_t 1004 */ 1005 LIBSEDML_EXTERN 1006 double 1007 SedMarker_getLineThickness(const SedMarker_t * sm); 1008 1009 1010 /** 1011 * Predicate returning @c 1 (true) if this SedMarker_t's "size" attribute is 1012 * set. 1013 * 1014 * @param sm the SedMarker_t structure. 1015 * 1016 * @return @c 1 (true) if this SedMarker_t's "size" attribute has been set, 1017 * otherwise @c 0 (false) is returned. 1018 * 1019 * @memberof SedMarker_t 1020 */ 1021 LIBSEDML_EXTERN 1022 int 1023 SedMarker_isSetSize(const SedMarker_t * sm); 1024 1025 1026 /** 1027 * Predicate returning @c 1 (true) if this SedMarker_t's "type" attribute is 1028 * set. 1029 * 1030 * @param sm the SedMarker_t structure. 1031 * 1032 * @return @c 1 (true) if this SedMarker_t's "type" attribute has been set, 1033 * otherwise @c 0 (false) is returned. 1034 * 1035 * @copydetails doc_sedmarker_type 1036 * 1037 * @memberof SedMarker_t 1038 */ 1039 LIBSEDML_EXTERN 1040 int 1041 SedMarker_isSetType(const SedMarker_t * sm); 1042 1043 1044 /** 1045 * Predicate returning @c 1 (true) if this SedMarker_t's "fill" attribute is 1046 * set. 1047 * 1048 * @param sm the SedMarker_t structure. 1049 * 1050 * @return @c 1 (true) if this SedMarker_t's "fill" attribute has been set, 1051 * otherwise @c 0 (false) is returned. 1052 * 1053 * @memberof SedMarker_t 1054 */ 1055 LIBSEDML_EXTERN 1056 int 1057 SedMarker_isSetFill(const SedMarker_t * sm); 1058 1059 1060 /** 1061 * Predicate returning @c 1 (true) if this SedMarker_t's "lineColor" attribute 1062 * is set. 1063 * 1064 * @param sm the SedMarker_t structure. 1065 * 1066 * @return @c 1 (true) if this SedMarker_t's "lineColor" attribute has been 1067 * set, otherwise @c 0 (false) is returned. 1068 * 1069 * @memberof SedMarker_t 1070 */ 1071 LIBSEDML_EXTERN 1072 int 1073 SedMarker_isSetLineColor(const SedMarker_t * sm); 1074 1075 1076 /** 1077 * Predicate returning @c 1 (true) if this SedMarker_t's "lineThickness" 1078 * attribute is set. 1079 * 1080 * @param sm the SedMarker_t structure. 1081 * 1082 * @return @c 1 (true) if this SedMarker_t's "lineThickness" attribute has been 1083 * set, otherwise @c 0 (false) is returned. 1084 * 1085 * @memberof SedMarker_t 1086 */ 1087 LIBSEDML_EXTERN 1088 int 1089 SedMarker_isSetLineThickness(const SedMarker_t * sm); 1090 1091 1092 /** 1093 * Sets the value of the "size" attribute of this SedMarker_t. 1094 * 1095 * @param sm the SedMarker_t structure. 1096 * 1097 * @param size double value of the "size" attribute to be set. 1098 * 1099 * @copydetails doc_returns_success_code 1100 * @li @sedmlconstant{LIBSEDML_OPERATION_SUCCESS, OperationReturnValues_t} 1101 * @li @sedmlconstant{LIBSEDML_INVALID_ATTRIBUTE_VALUE, 1102 * OperationReturnValues_t} 1103 * @li @sedmlconstant{LIBSEDML_INVALID_OBJECT, OperationReturnValues_t} 1104 * 1105 * @memberof SedMarker_t 1106 */ 1107 LIBSEDML_EXTERN 1108 int 1109 SedMarker_setSize(SedMarker_t * sm, double size); 1110 1111 1112 /** 1113 * Sets the value of the "type" attribute of this SedMarker_t. 1114 * 1115 * @param sm the SedMarker_t structure. 1116 * 1117 * @param type MarkerType_t value of the "type" attribute to be set. 1118 * 1119 * @copydetails doc_returns_success_code 1120 * @li @sedmlconstant{LIBSEDML_OPERATION_SUCCESS, OperationReturnValues_t} 1121 * @li @sedmlconstant{LIBSEDML_INVALID_ATTRIBUTE_VALUE, 1122 * OperationReturnValues_t} 1123 * @li @sedmlconstant{LIBSEDML_INVALID_OBJECT, OperationReturnValues_t} 1124 * 1125 * @copydetails doc_sedmarker_type 1126 * 1127 * @memberof SedMarker_t 1128 */ 1129 LIBSEDML_EXTERN 1130 int 1131 SedMarker_setType(SedMarker_t * sm, MarkerType_t type); 1132 1133 1134 /** 1135 * Sets the value of the "type" attribute of this SedMarker_t. 1136 * 1137 * @param sm the SedMarker_t structure. 1138 * 1139 * @param type const char * of the "type" attribute to be set. 1140 * 1141 * @copydetails doc_returns_success_code 1142 * @li @sedmlconstant{LIBSEDML_OPERATION_SUCCESS, OperationReturnValues_t} 1143 * @li @sedmlconstant{LIBSEDML_INVALID_ATTRIBUTE_VALUE, 1144 * OperationReturnValues_t} 1145 * @li @sedmlconstant{LIBSEDML_INVALID_OBJECT, OperationReturnValues_t} 1146 * 1147 * @copydetails doc_sedmarker_type 1148 * 1149 * @memberof SedMarker_t 1150 */ 1151 LIBSEDML_EXTERN 1152 int 1153 SedMarker_setTypeAsString(SedMarker_t * sm, const char * type); 1154 1155 1156 /** 1157 * Sets the value of the "fill" attribute of this SedMarker_t. 1158 * 1159 * @param sm the SedMarker_t structure. 1160 * 1161 * @param fill const char * value of the "fill" attribute to be set. 1162 * 1163 * @copydetails doc_returns_success_code 1164 * @li @sedmlconstant{LIBSEDML_OPERATION_SUCCESS, OperationReturnValues_t} 1165 * @li @sedmlconstant{LIBSEDML_INVALID_OBJECT, OperationReturnValues_t} 1166 * 1167 * Calling this function with @p fill = @c NULL or an empty string is 1168 * equivalent to calling SedMarker_unsetFill(). 1169 * 1170 * @memberof SedMarker_t 1171 */ 1172 LIBSEDML_EXTERN 1173 int 1174 SedMarker_setFill(SedMarker_t * sm, const char * fill); 1175 1176 1177 /** 1178 * Sets the value of the "lineColor" attribute of this SedMarker_t. 1179 * 1180 * @param sm the SedMarker_t structure. 1181 * 1182 * @param lineColor const char * value of the "lineColor" attribute to be set. 1183 * 1184 * @copydetails doc_returns_success_code 1185 * @li @sedmlconstant{LIBSEDML_OPERATION_SUCCESS, OperationReturnValues_t} 1186 * @li @sedmlconstant{LIBSEDML_INVALID_OBJECT, OperationReturnValues_t} 1187 * 1188 * Calling this function with @p lineColor = @c NULL or an empty string is 1189 * equivalent to calling SedMarker_unsetLineColor(). 1190 * 1191 * @memberof SedMarker_t 1192 */ 1193 LIBSEDML_EXTERN 1194 int 1195 SedMarker_setLineColor(SedMarker_t * sm, const char * lineColor); 1196 1197 1198 /** 1199 * Sets the value of the "lineThickness" attribute of this SedMarker_t. 1200 * 1201 * @param sm the SedMarker_t structure. 1202 * 1203 * @param lineThickness double value of the "lineThickness" attribute to be 1204 * set. 1205 * 1206 * @copydetails doc_returns_success_code 1207 * @li @sedmlconstant{LIBSEDML_OPERATION_SUCCESS, OperationReturnValues_t} 1208 * @li @sedmlconstant{LIBSEDML_INVALID_ATTRIBUTE_VALUE, 1209 * OperationReturnValues_t} 1210 * @li @sedmlconstant{LIBSEDML_INVALID_OBJECT, OperationReturnValues_t} 1211 * 1212 * @memberof SedMarker_t 1213 */ 1214 LIBSEDML_EXTERN 1215 int 1216 SedMarker_setLineThickness(SedMarker_t * sm, double lineThickness); 1217 1218 1219 /** 1220 * Unsets the value of the "size" attribute of this SedMarker_t. 1221 * 1222 * @param sm the SedMarker_t structure. 1223 * 1224 * @copydetails doc_returns_success_code 1225 * @li @sedmlconstant{LIBSEDML_OPERATION_SUCCESS, OperationReturnValues_t} 1226 * @li @sedmlconstant{LIBSEDML_OPERATION_FAILED, OperationReturnValues_t} 1227 * @li @sedmlconstant{LIBSEDML_INVALID_OBJECT, OperationReturnValues_t} 1228 * 1229 * @memberof SedMarker_t 1230 */ 1231 LIBSEDML_EXTERN 1232 int 1233 SedMarker_unsetSize(SedMarker_t * sm); 1234 1235 1236 /** 1237 * Unsets the value of the "type" attribute of this SedMarker_t. 1238 * 1239 * @param sm the SedMarker_t structure. 1240 * 1241 * @copydetails doc_returns_success_code 1242 * @li @sedmlconstant{LIBSEDML_OPERATION_SUCCESS, OperationReturnValues_t} 1243 * @li @sedmlconstant{LIBSEDML_INVALID_OBJECT, OperationReturnValues_t} 1244 * 1245 * @copydetails doc_sedmarker_type 1246 * 1247 * @memberof SedMarker_t 1248 */ 1249 LIBSEDML_EXTERN 1250 int 1251 SedMarker_unsetType(SedMarker_t * sm); 1252 1253 1254 /** 1255 * Unsets the value of the "fill" attribute of this SedMarker_t. 1256 * 1257 * @param sm the SedMarker_t structure. 1258 * 1259 * @copydetails doc_returns_success_code 1260 * @li @sedmlconstant{LIBSEDML_OPERATION_SUCCESS, OperationReturnValues_t} 1261 * @li @sedmlconstant{LIBSEDML_OPERATION_FAILED, OperationReturnValues_t} 1262 * @li @sedmlconstant{LIBSEDML_INVALID_OBJECT, OperationReturnValues_t} 1263 * 1264 * @memberof SedMarker_t 1265 */ 1266 LIBSEDML_EXTERN 1267 int 1268 SedMarker_unsetFill(SedMarker_t * sm); 1269 1270 1271 /** 1272 * Unsets the value of the "lineColor" attribute of this SedMarker_t. 1273 * 1274 * @param sm the SedMarker_t structure. 1275 * 1276 * @copydetails doc_returns_success_code 1277 * @li @sedmlconstant{LIBSEDML_OPERATION_SUCCESS, OperationReturnValues_t} 1278 * @li @sedmlconstant{LIBSEDML_OPERATION_FAILED, OperationReturnValues_t} 1279 * @li @sedmlconstant{LIBSEDML_INVALID_OBJECT, OperationReturnValues_t} 1280 * 1281 * @memberof SedMarker_t 1282 */ 1283 LIBSEDML_EXTERN 1284 int 1285 SedMarker_unsetLineColor(SedMarker_t * sm); 1286 1287 1288 /** 1289 * Unsets the value of the "lineThickness" attribute of this SedMarker_t. 1290 * 1291 * @param sm the SedMarker_t structure. 1292 * 1293 * @copydetails doc_returns_success_code 1294 * @li @sedmlconstant{LIBSEDML_OPERATION_SUCCESS, OperationReturnValues_t} 1295 * @li @sedmlconstant{LIBSEDML_OPERATION_FAILED, OperationReturnValues_t} 1296 * @li @sedmlconstant{LIBSEDML_INVALID_OBJECT, OperationReturnValues_t} 1297 * 1298 * @memberof SedMarker_t 1299 */ 1300 LIBSEDML_EXTERN 1301 int 1302 SedMarker_unsetLineThickness(SedMarker_t * sm); 1303 1304 1305 /** 1306 * Predicate returning @c 1 (true) if all the required attributes for this 1307 * SedMarker_t object have been set. 1308 * 1309 * @param sm the SedMarker_t structure. 1310 * 1311 * @return @c 1 (true) to indicate that all the required attributes of this 1312 * SedMarker_t have been set, otherwise @c 0 (false) is returned. 1313 * 1314 * @memberof SedMarker_t 1315 */ 1316 LIBSEDML_EXTERN 1317 int 1318 SedMarker_hasRequiredAttributes(const SedMarker_t * sm); 1319 1320 1321 1322 1323 END_C_DECLS 1324 1325 1326 1327 1328 LIBSEDML_CPP_NAMESPACE_END 1329 1330 1331 1332 1333 #endif /* !SWIG */ 1334 1335 1336 1337 1338 #endif /* !SedMarker_H__ */ 1339 1340 1341