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