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