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