1 /**
2 * @file SedChange.cpp
3 * @brief Implementation of the SedChange 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 #include <sedml/SedChange.h>
35 #include <sedml/SedListOfChanges.h>
36 #include <sbml/xml/XMLInputStream.h>
37
38 #include <sedml/SedAddXML.h>
39 #include <sedml/SedChangeXML.h>
40 #include <sedml/SedRemoveXML.h>
41 #include <sedml/SedChangeAttribute.h>
42 #include <sedml/SedComputeChange.h>
43
44
45 using namespace std;
46
47
48
49 LIBSEDML_CPP_NAMESPACE_BEGIN
50
51
52
53
54 #ifdef __cplusplus
55
56
57 /*
58 * Creates a new SedChange using the given SED-ML Level and @ p version values.
59 */
SedChange(unsigned int level,unsigned int version)60 SedChange::SedChange(unsigned int level, unsigned int version)
61 : SedBase(level, version)
62 , mTarget ("")
63 , mElementName("change")
64 {
65 setSedNamespacesAndOwn(new SedNamespaces(level, version));
66 }
67
68
69 /*
70 * Creates a new SedChange using the given SedNamespaces object @p sedmlns.
71 */
SedChange(SedNamespaces * sedmlns)72 SedChange::SedChange(SedNamespaces *sedmlns)
73 : SedBase(sedmlns)
74 , mTarget ("")
75 , mElementName("change")
76 {
77 setElementNamespace(sedmlns->getURI());
78 }
79
80
81 /*
82 * Copy constructor for SedChange.
83 */
SedChange(const SedChange & orig)84 SedChange::SedChange(const SedChange& orig)
85 : SedBase( orig )
86 , mTarget ( orig.mTarget )
87 , mElementName ( orig.mElementName )
88 {
89 }
90
91
92 /*
93 * Assignment operator for SedChange.
94 */
95 SedChange&
operator =(const SedChange & rhs)96 SedChange::operator=(const SedChange& rhs)
97 {
98 if (&rhs != this)
99 {
100 SedBase::operator=(rhs);
101 mTarget = rhs.mTarget;
102 mElementName = rhs.mElementName;
103 }
104
105 return *this;
106 }
107
108
109 /*
110 * Creates and returns a deep copy of this SedChange object.
111 */
112 SedChange*
clone() const113 SedChange::clone() const
114 {
115 return new SedChange(*this);
116 }
117
118
119 /*
120 * Destructor for SedChange.
121 */
~SedChange()122 SedChange::~SedChange()
123 {
124 }
125
126
127 /*
128 * Returns the value of the "target" attribute of this SedChange.
129 */
130 const std::string&
getTarget() const131 SedChange::getTarget() const
132 {
133 return mTarget;
134 }
135
136
137 /*
138 * Predicate returning @c true if this SedChange's "target" attribute is set.
139 */
140 bool
isSetTarget() const141 SedChange::isSetTarget() const
142 {
143 return (mTarget.empty() == false);
144 }
145
146
147 /*
148 * Sets the value of the "target" attribute of this SedChange.
149 */
150 int
setTarget(const std::string & target)151 SedChange::setTarget(const std::string& target)
152 {
153 mTarget = target;
154 return LIBSEDML_OPERATION_SUCCESS;
155 }
156
157
158 /*
159 * Unsets the value of the "target" attribute of this SedChange.
160 */
161 int
unsetTarget()162 SedChange::unsetTarget()
163 {
164 mTarget.erase();
165
166 if (mTarget.empty() == true)
167 {
168 return LIBSEDML_OPERATION_SUCCESS;
169 }
170 else
171 {
172 return LIBSEDML_OPERATION_FAILED;
173 }
174 }
175
176
177 /*
178 * Predicate returning @c true if this abstract "SedChange" is of type
179 * SedAddXML
180 */
181 bool
isSedAddXML() const182 SedChange::isSedAddXML() const
183 {
184 return dynamic_cast<const SedAddXML*>(this) != NULL;
185 }
186
187
188 /*
189 * Predicate returning @c true if this abstract "SedChange" is of type
190 * SedChangeXML
191 */
192 bool
isSedChangeXML() const193 SedChange::isSedChangeXML() const
194 {
195 return dynamic_cast<const SedChangeXML*>(this) != NULL;
196 }
197
198
199 /*
200 * Predicate returning @c true if this abstract "SedChange" is of type
201 * SedRemoveXML
202 */
203 bool
isSedRemoveXML() const204 SedChange::isSedRemoveXML() const
205 {
206 return dynamic_cast<const SedRemoveXML*>(this) != NULL;
207 }
208
209
210 /*
211 * Predicate returning @c true if this abstract "SedChange" is of type
212 * SedChangeAttribute
213 */
214 bool
isSedChangeAttribute() const215 SedChange::isSedChangeAttribute() const
216 {
217 return dynamic_cast<const SedChangeAttribute*>(this) != NULL;
218 }
219
220
221 /*
222 * Predicate returning @c true if this abstract "SedChange" is of type
223 * SedComputeChange
224 */
225 bool
isSedComputeChange() const226 SedChange::isSedComputeChange() const
227 {
228 return dynamic_cast<const SedComputeChange*>(this) != NULL;
229 }
230
231
232 /*
233 * Returns the XML element name of this SedChange object.
234 */
235 const std::string&
getElementName() const236 SedChange::getElementName() const
237 {
238 return mElementName;
239 }
240
241
242
243 /** @cond doxygenLibSEDMLInternal */
244
245 /*
246 * Sets the XML name of this SedChange object.
247 */
248 void
setElementName(const std::string & name)249 SedChange::setElementName(const std::string& name)
250 {
251 mElementName = name;
252 }
253
254 /** @endcond */
255
256
257 /*
258 * Returns the libSEDML type code for this SedChange object.
259 */
260 int
getTypeCode() const261 SedChange::getTypeCode() const
262 {
263 return SEDML_CHANGE;
264 }
265
266
267 /*
268 * Predicate returning @c true if all the required attributes for this
269 * SedChange object have been set.
270 */
271 bool
hasRequiredAttributes() const272 SedChange::hasRequiredAttributes() const
273 {
274 bool allPresent = true;
275
276 if (isSetTarget() == false)
277 {
278 allPresent = false;
279 }
280
281 return allPresent;
282 }
283
284
285
286 /** @cond doxygenLibSEDMLInternal */
287
288 /*
289 * Write any contained elements
290 */
291 void
writeElements(LIBSBML_CPP_NAMESPACE_QUALIFIER XMLOutputStream & stream) const292 SedChange::writeElements(LIBSBML_CPP_NAMESPACE_QUALIFIER XMLOutputStream&
293 stream) const
294 {
295 SedBase::writeElements(stream);
296 }
297
298 /** @endcond */
299
300
301
302 /** @cond doxygenLibSEDMLInternal */
303
304 /*
305 * Accepts the given SedVisitor
306 */
307 bool
accept(SedVisitor & v) const308 SedChange::accept(SedVisitor& v) const
309 {
310 return false;
311 }
312
313 /** @endcond */
314
315
316
317 /** @cond doxygenLibSEDMLInternal */
318
319 /*
320 * Sets the parent SedDocument
321 */
322 void
setSedDocument(SedDocument * d)323 SedChange::setSedDocument(SedDocument* d)
324 {
325 SedBase::setSedDocument(d);
326 }
327
328 /** @endcond */
329
330
331
332 /** @cond doxygenLibSEDMLInternal */
333
334 /*
335 * Gets the value of the "attributeName" attribute of this SedChange.
336 */
337 int
getAttribute(const std::string & attributeName,bool & value) const338 SedChange::getAttribute(const std::string& attributeName, bool& value) const
339 {
340 int return_value = SedBase::getAttribute(attributeName, value);
341
342 return return_value;
343 }
344
345 /** @endcond */
346
347
348
349 /** @cond doxygenLibSEDMLInternal */
350
351 /*
352 * Gets the value of the "attributeName" attribute of this SedChange.
353 */
354 int
getAttribute(const std::string & attributeName,int & value) const355 SedChange::getAttribute(const std::string& attributeName, int& value) const
356 {
357 int return_value = SedBase::getAttribute(attributeName, value);
358
359 return return_value;
360 }
361
362 /** @endcond */
363
364
365
366 /** @cond doxygenLibSEDMLInternal */
367
368 /*
369 * Gets the value of the "attributeName" attribute of this SedChange.
370 */
371 int
getAttribute(const std::string & attributeName,double & value) const372 SedChange::getAttribute(const std::string& attributeName, double& value) const
373 {
374 int return_value = SedBase::getAttribute(attributeName, value);
375
376 return return_value;
377 }
378
379 /** @endcond */
380
381
382
383 /** @cond doxygenLibSEDMLInternal */
384
385 /*
386 * Gets the value of the "attributeName" attribute of this SedChange.
387 */
388 int
getAttribute(const std::string & attributeName,unsigned int & value) const389 SedChange::getAttribute(const std::string& attributeName,
390 unsigned int& value) const
391 {
392 int return_value = SedBase::getAttribute(attributeName, value);
393
394 return return_value;
395 }
396
397 /** @endcond */
398
399
400
401 /** @cond doxygenLibSEDMLInternal */
402
403 /*
404 * Gets the value of the "attributeName" attribute of this SedChange.
405 */
406 int
getAttribute(const std::string & attributeName,std::string & value) const407 SedChange::getAttribute(const std::string& attributeName,
408 std::string& value) const
409 {
410 int return_value = SedBase::getAttribute(attributeName, value);
411
412 if (return_value == LIBSEDML_OPERATION_SUCCESS)
413 {
414 return return_value;
415 }
416
417 if (attributeName == "target")
418 {
419 value = getTarget();
420 return_value = LIBSEDML_OPERATION_SUCCESS;
421 }
422
423 return return_value;
424 }
425
426 /** @endcond */
427
428
429
430 /** @cond doxygenLibSEDMLInternal */
431
432 /*
433 * Predicate returning @c true if this SedChange's attribute "attributeName" is
434 * set.
435 */
436 bool
isSetAttribute(const std::string & attributeName) const437 SedChange::isSetAttribute(const std::string& attributeName) const
438 {
439 bool value = SedBase::isSetAttribute(attributeName);
440
441 if (attributeName == "target")
442 {
443 value = isSetTarget();
444 }
445
446 return value;
447 }
448
449 /** @endcond */
450
451
452
453 /** @cond doxygenLibSEDMLInternal */
454
455 /*
456 * Sets the value of the "attributeName" attribute of this SedChange.
457 */
458 int
setAttribute(const std::string & attributeName,bool value)459 SedChange::setAttribute(const std::string& attributeName, bool value)
460 {
461 int return_value = SedBase::setAttribute(attributeName, value);
462
463 return return_value;
464 }
465
466 /** @endcond */
467
468
469
470 /** @cond doxygenLibSEDMLInternal */
471
472 /*
473 * Sets the value of the "attributeName" attribute of this SedChange.
474 */
475 int
setAttribute(const std::string & attributeName,int value)476 SedChange::setAttribute(const std::string& attributeName, int value)
477 {
478 int return_value = SedBase::setAttribute(attributeName, value);
479
480 return return_value;
481 }
482
483 /** @endcond */
484
485
486
487 /** @cond doxygenLibSEDMLInternal */
488
489 /*
490 * Sets the value of the "attributeName" attribute of this SedChange.
491 */
492 int
setAttribute(const std::string & attributeName,double value)493 SedChange::setAttribute(const std::string& attributeName, double value)
494 {
495 int return_value = SedBase::setAttribute(attributeName, value);
496
497 return return_value;
498 }
499
500 /** @endcond */
501
502
503
504 /** @cond doxygenLibSEDMLInternal */
505
506 /*
507 * Sets the value of the "attributeName" attribute of this SedChange.
508 */
509 int
setAttribute(const std::string & attributeName,unsigned int value)510 SedChange::setAttribute(const std::string& attributeName, unsigned int value)
511 {
512 int return_value = SedBase::setAttribute(attributeName, value);
513
514 return return_value;
515 }
516
517 /** @endcond */
518
519
520
521 /** @cond doxygenLibSEDMLInternal */
522
523 /*
524 * Sets the value of the "attributeName" attribute of this SedChange.
525 */
526 int
setAttribute(const std::string & attributeName,const std::string & value)527 SedChange::setAttribute(const std::string& attributeName,
528 const std::string& value)
529 {
530 int return_value = SedBase::setAttribute(attributeName, value);
531
532 if (attributeName == "target")
533 {
534 return_value = setTarget(value);
535 }
536
537 return return_value;
538 }
539
540 /** @endcond */
541
542
543
544 /** @cond doxygenLibSEDMLInternal */
545
546 /*
547 * Unsets the value of the "attributeName" attribute of this SedChange.
548 */
549 int
unsetAttribute(const std::string & attributeName)550 SedChange::unsetAttribute(const std::string& attributeName)
551 {
552 int value = SedBase::unsetAttribute(attributeName);
553
554 if (attributeName == "target")
555 {
556 value = unsetTarget();
557 }
558
559 return value;
560 }
561
562 /** @endcond */
563
564
565
566 /** @cond doxygenLibSEDMLInternal */
567
568 /*
569 * Adds the expected attributes for this element
570 */
571 void
addExpectedAttributes(LIBSBML_CPP_NAMESPACE_QUALIFIER ExpectedAttributes & attributes)572 SedChange::addExpectedAttributes(LIBSBML_CPP_NAMESPACE_QUALIFIER
573 ExpectedAttributes& attributes)
574 {
575 SedBase::addExpectedAttributes(attributes);
576
577 attributes.add("target");
578 }
579
580 /** @endcond */
581
582
583
584 /** @cond doxygenLibSEDMLInternal */
585
586 /*
587 * Reads the expected attributes into the member data variables
588 */
589 void
readAttributes(const LIBSBML_CPP_NAMESPACE_QUALIFIER XMLAttributes & attributes,const LIBSBML_CPP_NAMESPACE_QUALIFIER ExpectedAttributes & expectedAttributes)590 SedChange::readAttributes(
591 const LIBSBML_CPP_NAMESPACE_QUALIFIER XMLAttributes&
592 attributes,
593 const LIBSBML_CPP_NAMESPACE_QUALIFIER
594 ExpectedAttributes& expectedAttributes)
595 {
596 unsigned int level = getLevel();
597 unsigned int version = getVersion();
598 unsigned int numErrs;
599 bool assigned = false;
600 SedErrorLog* log = getErrorLog();
601
602 if (log && getParentSedObject() &&
603 static_cast<SedListOfChanges*>(getParentSedObject())->size() < 2)
604 {
605 numErrs = log->getNumErrors();
606 for (int n = numErrs-1; n >= 0; n--)
607 {
608 if (log->getError(n)->getErrorId() == SedUnknownCoreAttribute)
609 {
610 const std::string details = log->getError(n)->getMessage();
611 log->remove(SedUnknownCoreAttribute);
612 log->logError(SedmlModelLOChangesAllowedCoreAttributes, level, version,
613 details, getLine(), getColumn());
614 }
615 }
616 }
617
618 SedBase::readAttributes(attributes, expectedAttributes);
619
620 if (log)
621 {
622 numErrs = log->getNumErrors();
623
624 for (int n = numErrs-1; n >= 0; n--)
625 {
626 if (log->getError(n)->getErrorId() == SedUnknownCoreAttribute)
627 {
628 const std::string details = log->getError(n)->getMessage();
629 log->remove(SedUnknownCoreAttribute);
630 log->logError(SedmlChangeAllowedAttributes, level, version, details,
631 getLine(), getColumn());
632 }
633 }
634 }
635
636 //
637 // target string (use = "required" )
638 //
639
640 assigned = attributes.readInto("target", mTarget);
641
642 if (assigned == true)
643 {
644 if (mTarget.empty() == true)
645 {
646 logEmptyString(mTarget, level, version, "<SedChange>");
647 }
648 }
649 else
650 {
651 if (log)
652 {
653 std::string message = "Sedml attribute 'target' is missing from the "
654 "<SedChange> element.";
655 log->logError(SedmlChangeAllowedAttributes, level, version, message,
656 getLine(), getColumn());
657 }
658 }
659 }
660
661 /** @endcond */
662
663
664
665 /** @cond doxygenLibSEDMLInternal */
666
667 /*
668 * Writes the attributes to the stream
669 */
670 void
writeAttributes(LIBSBML_CPP_NAMESPACE_QUALIFIER XMLOutputStream & stream) const671 SedChange::writeAttributes(LIBSBML_CPP_NAMESPACE_QUALIFIER XMLOutputStream&
672 stream) const
673 {
674 SedBase::writeAttributes(stream);
675
676 if (isSetTarget() == true)
677 {
678 stream.writeAttribute("target", getPrefix(), mTarget);
679 }
680 }
681
_trim(const std::string & text)682 std::string SedChange::_trim(const std::string& text)
683 {
684 static const string whitespace(" \t\r\n");
685
686 string::size_type begin = text.find_first_not_of(whitespace);
687 string::size_type end = text.find_last_not_of(whitespace);
688
689 return (begin == string::npos) ? std::string() : text.substr(begin, end - begin + 1);
690 }
691 /** @endcond */
692
693
694
695
696 #endif /* __cplusplus */
697
698
699 /*
700 * Creates a new SedAddXML using the given SED-ML Level and @ p version values.
701 */
702 LIBSEDML_EXTERN
703 SedAddXML_t *
SedChange_createAddXML(unsigned int level,unsigned int version)704 SedChange_createAddXML(unsigned int level, unsigned int version)
705 {
706 return new SedAddXML(level, version);
707 }
708
709
710 /*
711 * Creates a new SedChangeXML using the given SED-ML Level and @ p version
712 * values.
713 */
714 LIBSEDML_EXTERN
715 SedChangeXML_t *
SedChange_createChangeXML(unsigned int level,unsigned int version)716 SedChange_createChangeXML(unsigned int level, unsigned int version)
717 {
718 return new SedChangeXML(level, version);
719 }
720
721
722 /*
723 * Creates a new SedRemoveXML using the given SED-ML Level and @ p version
724 * values.
725 */
726 LIBSEDML_EXTERN
727 SedRemoveXML_t *
SedChange_createRemoveXML(unsigned int level,unsigned int version)728 SedChange_createRemoveXML(unsigned int level, unsigned int version)
729 {
730 return new SedRemoveXML(level, version);
731 }
732
733
734 /*
735 * Creates a new SedChangeAttribute using the given SED-ML Level and @ p version
736 * values.
737 */
738 LIBSEDML_EXTERN
739 SedChangeAttribute_t *
SedChange_createChangeAttribute(unsigned int level,unsigned int version)740 SedChange_createChangeAttribute(unsigned int level, unsigned int version)
741 {
742 return new SedChangeAttribute(level, version);
743 }
744
745
746 /*
747 * Creates a new SedComputeChange using the given SED-ML Level and @ p version
748 * values.
749 */
750 LIBSEDML_EXTERN
751 SedComputeChange_t *
SedChange_createComputeChange(unsigned int level,unsigned int version)752 SedChange_createComputeChange(unsigned int level, unsigned int version)
753 {
754 return new SedComputeChange(level, version);
755 }
756
757
758 /*
759 * Creates and returns a deep copy of this SedChange_t object.
760 */
761 LIBSEDML_EXTERN
762 SedChange_t*
SedChange_clone(const SedChange_t * sc)763 SedChange_clone(const SedChange_t* sc)
764 {
765 if (sc != NULL)
766 {
767 return static_cast<SedChange_t*>(sc->clone());
768 }
769 else
770 {
771 return NULL;
772 }
773 }
774
775
776 /*
777 * Frees this SedChange_t object.
778 */
779 LIBSEDML_EXTERN
780 void
SedChange_free(SedChange_t * sc)781 SedChange_free(SedChange_t* sc)
782 {
783 if (sc != NULL)
784 {
785 delete sc;
786 }
787 }
788
789
790 /*
791 * Returns the value of the "target" attribute of this SedChange_t.
792 */
793 LIBSEDML_EXTERN
794 char *
SedChange_getTarget(const SedChange_t * sc)795 SedChange_getTarget(const SedChange_t * sc)
796 {
797 if (sc == NULL)
798 {
799 return NULL;
800 }
801
802 return sc->getTarget().empty() ? NULL : safe_strdup(sc->getTarget().c_str());
803 }
804
805
806 /*
807 * Predicate returning @c 1 (true) if this SedChange_t's "target" attribute is
808 * set.
809 */
810 LIBSEDML_EXTERN
811 int
SedChange_isSetTarget(const SedChange_t * sc)812 SedChange_isSetTarget(const SedChange_t * sc)
813 {
814 return (sc != NULL) ? static_cast<int>(sc->isSetTarget()) : 0;
815 }
816
817
818 /*
819 * Sets the value of the "target" attribute of this SedChange_t.
820 */
821 LIBSEDML_EXTERN
822 int
SedChange_setTarget(SedChange_t * sc,const char * target)823 SedChange_setTarget(SedChange_t * sc, const char * target)
824 {
825 return (sc != NULL) ? sc->setTarget(target) : LIBSEDML_INVALID_OBJECT;
826 }
827
828
829 /*
830 * Unsets the value of the "target" attribute of this SedChange_t.
831 */
832 LIBSEDML_EXTERN
833 int
SedChange_unsetTarget(SedChange_t * sc)834 SedChange_unsetTarget(SedChange_t * sc)
835 {
836 return (sc != NULL) ? sc->unsetTarget() : LIBSEDML_INVALID_OBJECT;
837 }
838
839
840 /*
841 * Predicate returning @c 1 if this SedChange_t is of type SedAddXML_t
842 */
843 LIBSEDML_EXTERN
844 int
SedChange_isSedAddXML(const SedChange_t * sc)845 SedChange_isSedAddXML(const SedChange_t * sc)
846 {
847 return (sc != NULL) ? static_cast<int>(sc->isSedAddXML()) : 0;
848 }
849
850
851 /*
852 * Predicate returning @c 1 if this SedChange_t is of type SedChangeXML_t
853 */
854 LIBSEDML_EXTERN
855 int
SedChange_isSedChangeXML(const SedChange_t * sc)856 SedChange_isSedChangeXML(const SedChange_t * sc)
857 {
858 return (sc != NULL) ? static_cast<int>(sc->isSedChangeXML()) : 0;
859 }
860
861
862 /*
863 * Predicate returning @c 1 if this SedChange_t is of type SedRemoveXML_t
864 */
865 LIBSEDML_EXTERN
866 int
SedChange_isSedRemoveXML(const SedChange_t * sc)867 SedChange_isSedRemoveXML(const SedChange_t * sc)
868 {
869 return (sc != NULL) ? static_cast<int>(sc->isSedRemoveXML()) : 0;
870 }
871
872
873 /*
874 * Predicate returning @c 1 if this SedChange_t is of type SedChangeAttribute_t
875 */
876 LIBSEDML_EXTERN
877 int
SedChange_isSedChangeAttribute(const SedChange_t * sc)878 SedChange_isSedChangeAttribute(const SedChange_t * sc)
879 {
880 return (sc != NULL) ? static_cast<int>(sc->isSedChangeAttribute()) : 0;
881 }
882
883
884 /*
885 * Predicate returning @c 1 if this SedChange_t is of type SedComputeChange_t
886 */
887 LIBSEDML_EXTERN
888 int
SedChange_isSedComputeChange(const SedChange_t * sc)889 SedChange_isSedComputeChange(const SedChange_t * sc)
890 {
891 return (sc != NULL) ? static_cast<int>(sc->isSedComputeChange()) : 0;
892 }
893
894
895 /*
896 * Predicate returning @c 1 (true) if all the required attributes for this
897 * SedChange_t object have been set.
898 */
899 LIBSEDML_EXTERN
900 int
SedChange_hasRequiredAttributes(const SedChange_t * sc)901 SedChange_hasRequiredAttributes(const SedChange_t * sc)
902 {
903 return (sc != NULL) ? static_cast<int>(sc->hasRequiredAttributes()) : 0;
904 }
905
906
907
908
909 LIBSEDML_CPP_NAMESPACE_END
910
911
912