1 /**
2  * @file CSGPrimitive.h
3  * @brief Definition of the CSGPrimitive class.
4  * @author SBMLTeam
5  *
6  * <!--------------------------------------------------------------------------
7  * This file is part of libSBML. Please visit http://sbml.org for more
8  * information about SBML, and the latest version of libSBML.
9  *
10  * Copyright (C) 2020 jointly by the following organizations:
11  *     1. California Institute of Technology, Pasadena, CA, USA
12  *     2. University of Heidelberg, Heidelberg, Germany
13  *     3. University College London, London, UK
14  *
15  * Copyright (C) 2019 jointly by the following organizations:
16  * 1. California Institute of Technology, Pasadena, CA, USA
17  * 2. University of Heidelberg, Heidelberg, Germany
18  *
19  * Copyright (C) 2013-2018 jointly by the following organizations:
20  * 1. California Institute of Technology, Pasadena, CA, USA
21  * 2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK
22  * 3. University of Heidelberg, Heidelberg, Germany
23  *
24  * Copyright (C) 2009-2013 jointly by the following organizations:
25  * 1. California Institute of Technology, Pasadena, CA, USA
26  * 2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK
27  *
28  * Copyright (C) 2006-2008 by the California Institute of Technology,
29  * Pasadena, CA, USA
30  *
31  * Copyright (C) 2002-2005 jointly by the following organizations:
32  * 1. California Institute of Technology, Pasadena, CA, USA
33  * 2. Japan Science and Technology Agency, Japan
34  *
35  * This library is free software; you can redistribute it and/or modify it
36  * under the terms of the GNU Lesser General Public License as published by the
37  * Free Software Foundation. A copy of the license agreement is provided in the
38  * file named "LICENSE.txt" included with this software distribution and also
39  * available online as http://sbml.org/software/libsbml/license.html
40  * ------------------------------------------------------------------------ -->
41  *
42  * @class CSGPrimitive
43  * @sbmlbrief{spatial} TODO:Definition of the CSGPrimitive class.
44  */
45 
46 /**
47  * <!-- ~ ~ ~ ~ ~ Start of common documentation strings ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
48  * The following text is used as common documentation blocks copied multiple
49  * times elsewhere in this file. The use of @class is a hack needed because
50  * Doxygen's @copydetails command has limited functionality. Symbols
51  * beginning with "doc_" are marked as ignored in our Doxygen configuration.
52  * ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ -->
53  *
54  *
55  * @class doc_csgprimitive_primitiveType
56  *
57  * @par
58  * The attribute "primitiveType" on a CSGPrimitive object is used to TODO:add
59  * explanation
60  *
61  * In the SBML
62  * Level&nbsp;3 Version&nbsp;1 Spatial specification, the following are the
63  * allowable values for "primitiveType":
64  * <ul>
65  * <li> @c "sphere", TODO:add description
66  *
67  * <li> @c "cube", TODO:add description
68  *
69  * <li> @c "cylinder", TODO:add description
70  *
71  * <li> @c "cone", TODO:add description
72  *
73  * <li> @c "circle", TODO:add description
74  *
75  * <li> @c "square", TODO:add description
76  *
77  * </ul>
78  */
79 
80 
81 #ifndef CSGPrimitive_H__
82 #define CSGPrimitive_H__
83 
84 
85 #include <sbml/common/extern.h>
86 #include <sbml/common/sbmlfwd.h>
87 #include <sbml/packages/spatial/common/spatialfwd.h>
88 
89 
90 #ifdef __cplusplus
91 
92 
93 #include <string>
94 
95 
96 #include <sbml/packages/spatial/sbml/CSGNode.h>
97 #include <sbml/packages/spatial/extension/SpatialExtension.h>
98 
99 
100 LIBSBML_CPP_NAMESPACE_BEGIN
101 
102 
103 class LIBSBML_EXTERN CSGPrimitive : public CSGNode
104 {
105 protected:
106 
107   /** @cond doxygenLibsbmlInternal */
108 
109   PrimitiveKind_t mPrimitiveType;
110 
111   /** @endcond */
112 
113 public:
114 
115   /**
116    * Creates a new CSGPrimitive using the given SBML Level, Version and
117    * &ldquo;spatial&rdquo; package version.
118    *
119    * @param level an unsigned int, the SBML Level to assign to this
120    * CSGPrimitive.
121    *
122    * @param version an unsigned int, the SBML Version to assign to this
123    * CSGPrimitive.
124    *
125    * @param pkgVersion an unsigned int, the SBML Spatial Version to assign to
126    * this CSGPrimitive.
127    *
128    * @copydetails doc_note_setting_lv_pkg
129    */
130   CSGPrimitive(unsigned int level = SpatialExtension::getDefaultLevel(),
131                unsigned int version = SpatialExtension::getDefaultVersion(),
132                unsigned int pkgVersion =
133                  SpatialExtension::getDefaultPackageVersion());
134 
135 
136   /**
137    * Creates a new CSGPrimitive using the given SpatialPkgNamespaces object.
138    *
139    * @copydetails doc_what_are_sbml_package_namespaces
140    *
141    * @param spatialns the SpatialPkgNamespaces object.
142    *
143    * @copydetails doc_note_setting_lv_pkg
144    */
145   CSGPrimitive(SpatialPkgNamespaces *spatialns);
146 
147 
148   /**
149    * Copy constructor for CSGPrimitive.
150    *
151    * @param orig the CSGPrimitive instance to copy.
152    */
153   CSGPrimitive(const CSGPrimitive& orig);
154 
155 
156   /**
157    * Assignment operator for CSGPrimitive.
158    *
159    * @param rhs the CSGPrimitive object whose values are to be used as the
160    * basis of the assignment.
161    */
162   CSGPrimitive& operator=(const CSGPrimitive& rhs);
163 
164 
165   /**
166    * Creates and returns a deep copy of this CSGPrimitive object.
167    *
168    * @return a (deep) copy of this CSGPrimitive object.
169    */
170   virtual CSGPrimitive* clone() const;
171 
172 
173   /**
174    * Destructor for CSGPrimitive.
175    */
176   virtual ~CSGPrimitive();
177 
178 
179   /**
180    * Returns the value of the "primitiveType" attribute of this CSGPrimitive.
181    *
182    * @return the value of the "primitiveType" attribute of this CSGPrimitive as
183    * a PrimitiveKind_t.
184    *
185    * @copydetails doc_csgprimitive_primitiveType
186    * @if clike The value is drawn from the enumeration @ref PrimitiveKind_t
187    * @endif
188    * The possible values returned by this method are:
189    * @li @sbmlconstant{SPATIAL_PRIMITIVEKIND_SPHERE, PrimitiveKind_t}
190    * @li @sbmlconstant{SPATIAL_PRIMITIVEKIND_CUBE, PrimitiveKind_t}
191    * @li @sbmlconstant{SPATIAL_PRIMITIVEKIND_CYLINDER, PrimitiveKind_t}
192    * @li @sbmlconstant{SPATIAL_PRIMITIVEKIND_CONE, PrimitiveKind_t}
193    * @li @sbmlconstant{SPATIAL_PRIMITIVEKIND_CIRCLE, PrimitiveKind_t}
194    * @li @sbmlconstant{SPATIAL_PRIMITIVEKIND_SQUARE, PrimitiveKind_t}
195    * @li @sbmlconstant{SPATIAL_PRIMITIVEKIND_INVALID, PrimitiveKind_t}
196    */
197   PrimitiveKind_t getPrimitiveType() const;
198 
199 
200   /**
201    * Returns the value of the "primitiveType" attribute of this CSGPrimitive.
202    *
203    * @return the value of the "primitiveType" attribute of this CSGPrimitive as
204    * a string.
205    *
206    * @copydetails doc_csgprimitive_primitiveType
207    * The possible values returned by this method are:
208    * @li @c "sphere"
209    * @li @c "cube"
210    * @li @c "cylinder"
211    * @li @c "cone"
212    * @li @c "circle"
213    * @li @c "square"
214    * @li @c "invalid PrimitiveKind value"
215    */
216   std::string getPrimitiveTypeAsString() const;
217 
218 
219   /**
220    * Predicate returning @c true if this CSGPrimitive's "primitiveType"
221    * attribute is set.
222    *
223    * @return @c true if this CSGPrimitive's "primitiveType" attribute has been
224    * set, otherwise @c false is returned.
225    *
226    * @copydetails doc_csgprimitive_primitiveType
227    */
228   bool isSetPrimitiveType() const;
229 
230 
231   /**
232    * Sets the value of the "primitiveType" attribute of this CSGPrimitive.
233    *
234    * @param primitiveType @if clike PrimitiveKind_t@else int@endif value of the
235    * "primitiveType" attribute to be set.
236    *
237    * @copydetails doc_returns_success_code
238    * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t}
239    * @li @sbmlconstant{LIBSBML_INVALID_ATTRIBUTE_VALUE,
240    * OperationReturnValues_t}
241    *
242    * @copydetails doc_csgprimitive_primitiveType
243    */
244   int setPrimitiveType(const PrimitiveKind_t primitiveType);
245 
246 
247   /**
248    * Sets the value of the "primitiveType" attribute of this CSGPrimitive.
249    *
250    * @param primitiveType std::string& of the "primitiveType" attribute to be
251    * set.
252    *
253    * @copydetails doc_returns_success_code
254    * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t}
255    * @li @sbmlconstant{LIBSBML_INVALID_ATTRIBUTE_VALUE,
256    * OperationReturnValues_t}
257    *
258    * @copydetails doc_csgprimitive_primitiveType
259    */
260   int setPrimitiveType(const std::string& primitiveType);
261 
262 
263   /**
264    * Unsets the value of the "primitiveType" attribute of this CSGPrimitive.
265    *
266    * @copydetails doc_returns_one_success_code
267    * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t}
268    *
269    * @copydetails doc_csgprimitive_primitiveType
270    */
271   int unsetPrimitiveType();
272 
273 
274   /**
275    * Returns the XML element name of this CSGPrimitive object.
276    *
277    * For CSGPrimitive, the XML element name is always @c "csgPrimitive".
278    *
279    * @return the name of this element, i.e. @c "csgPrimitive".
280    */
281   virtual const std::string& getElementName() const;
282 
283 
284   /**
285    * Returns the libSBML type code for this CSGPrimitive object.
286    *
287    * @copydetails doc_what_are_typecodes
288    *
289    * @return the SBML type code for this object:
290    * @sbmlconstant{SBML_SPATIAL_CSGPRIMITIVE, SBMLSpatialTypeCode_t}.
291    *
292    * @copydetails doc_warning_typecodes_not_unique
293    *
294    * @see getElementName()
295    * @see getPackageName()
296    */
297   virtual int getTypeCode() const;
298 
299 
300   /**
301    * Predicate returning @c true if all the required attributes for this
302    * CSGPrimitive object have been set.
303    *
304    * @return @c true to indicate that all the required attributes of this
305    * CSGPrimitive have been set, otherwise @c false is returned.
306    *
307    *
308    * @note The required attributes for the CSGPrimitive object are:
309    * @li "primitiveType"
310    */
311   virtual bool hasRequiredAttributes() const;
312 
313 
314 
315   /** @cond doxygenLibsbmlInternal */
316 
317   /**
318    * Write any contained elements
319    */
320   virtual void writeElements(XMLOutputStream& stream) const;
321 
322   /** @endcond */
323 
324 
325 
326   /** @cond doxygenLibsbmlInternal */
327 
328   /**
329    * Accepts the given SBMLVisitor
330    */
331   virtual bool accept(SBMLVisitor& v) const;
332 
333   /** @endcond */
334 
335 
336 
337   /** @cond doxygenLibsbmlInternal */
338 
339   /**
340    * Sets the parent SBMLDocument
341    */
342   virtual void setSBMLDocument(SBMLDocument* d);
343 
344   /** @endcond */
345 
346 
347 
348   /** @cond doxygenLibsbmlInternal */
349 
350   /**
351    * Enables/disables the given package with this element
352    */
353   virtual void enablePackageInternal(const std::string& pkgURI,
354                                      const std::string& pkgPrefix,
355                                      bool flag);
356 
357   /** @endcond */
358 
359 
360 
361 
362   #ifndef SWIG
363 
364 
365 
366   /** @cond doxygenLibsbmlInternal */
367 
368   /**
369    * Gets the value of the "attributeName" attribute of this CSGPrimitive.
370    *
371    * @param attributeName, the name of the attribute to retrieve.
372    *
373    * @param value, the address of the value to record.
374    *
375    * @copydetails doc_returns_success_code
376    * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t}
377    * @li @sbmlconstant{LIBSBML_OPERATION_FAILED, OperationReturnValues_t}
378    */
379   virtual int getAttribute(const std::string& attributeName, bool& value)
380     const;
381 
382   /** @endcond */
383 
384 
385 
386   /** @cond doxygenLibsbmlInternal */
387 
388   /**
389    * Gets the value of the "attributeName" attribute of this CSGPrimitive.
390    *
391    * @param attributeName, the name of the attribute to retrieve.
392    *
393    * @param value, the address of the value to record.
394    *
395    * @copydetails doc_returns_success_code
396    * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t}
397    * @li @sbmlconstant{LIBSBML_OPERATION_FAILED, OperationReturnValues_t}
398    */
399   virtual int getAttribute(const std::string& attributeName, int& value) const;
400 
401   /** @endcond */
402 
403 
404 
405   /** @cond doxygenLibsbmlInternal */
406 
407   /**
408    * Gets the value of the "attributeName" attribute of this CSGPrimitive.
409    *
410    * @param attributeName, the name of the attribute to retrieve.
411    *
412    * @param value, the address of the value to record.
413    *
414    * @copydetails doc_returns_success_code
415    * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t}
416    * @li @sbmlconstant{LIBSBML_OPERATION_FAILED, OperationReturnValues_t}
417    */
418   virtual int getAttribute(const std::string& attributeName,
419                            double& value) const;
420 
421   /** @endcond */
422 
423 
424 
425   /** @cond doxygenLibsbmlInternal */
426 
427   /**
428    * Gets the value of the "attributeName" attribute of this CSGPrimitive.
429    *
430    * @param attributeName, the name of the attribute to retrieve.
431    *
432    * @param value, the address of the value to record.
433    *
434    * @copydetails doc_returns_success_code
435    * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t}
436    * @li @sbmlconstant{LIBSBML_OPERATION_FAILED, OperationReturnValues_t}
437    */
438   virtual int getAttribute(const std::string& attributeName,
439                            unsigned int& value) const;
440 
441   /** @endcond */
442 
443 
444 
445   /** @cond doxygenLibsbmlInternal */
446 
447   /**
448    * Gets the value of the "attributeName" attribute of this CSGPrimitive.
449    *
450    * @param attributeName, the name of the attribute to retrieve.
451    *
452    * @param value, the address of the value to record.
453    *
454    * @copydetails doc_returns_success_code
455    * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t}
456    * @li @sbmlconstant{LIBSBML_OPERATION_FAILED, OperationReturnValues_t}
457    */
458   virtual int getAttribute(const std::string& attributeName,
459                            std::string& value) const;
460 
461   /** @endcond */
462 
463 
464 
465   /** @cond doxygenLibsbmlInternal */
466 
467   /**
468    * Predicate returning @c true if this CSGPrimitive's attribute
469    * "attributeName" is set.
470    *
471    * @param attributeName, the name of the attribute to query.
472    *
473    * @return @c true if this CSGPrimitive's attribute "attributeName" has been
474    * set, otherwise @c false is returned.
475    */
476   virtual bool isSetAttribute(const std::string& attributeName) const;
477 
478   /** @endcond */
479 
480 
481 
482   /** @cond doxygenLibsbmlInternal */
483 
484   /**
485    * Sets the value of the "attributeName" attribute of this CSGPrimitive.
486    *
487    * @param attributeName, the name of the attribute to set.
488    *
489    * @param value, the value of the attribute to set.
490    *
491    * @copydetails doc_returns_success_code
492    * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t}
493    * @li @sbmlconstant{LIBSBML_OPERATION_FAILED, OperationReturnValues_t}
494    */
495   virtual int setAttribute(const std::string& attributeName, bool value);
496 
497   /** @endcond */
498 
499 
500 
501   /** @cond doxygenLibsbmlInternal */
502 
503   /**
504    * Sets the value of the "attributeName" attribute of this CSGPrimitive.
505    *
506    * @param attributeName, the name of the attribute to set.
507    *
508    * @param value, the value of the attribute to set.
509    *
510    * @copydetails doc_returns_success_code
511    * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t}
512    * @li @sbmlconstant{LIBSBML_OPERATION_FAILED, OperationReturnValues_t}
513    */
514   virtual int setAttribute(const std::string& attributeName, int value);
515 
516   /** @endcond */
517 
518 
519 
520   /** @cond doxygenLibsbmlInternal */
521 
522   /**
523    * Sets the value of the "attributeName" attribute of this CSGPrimitive.
524    *
525    * @param attributeName, the name of the attribute to set.
526    *
527    * @param value, the value of the attribute to set.
528    *
529    * @copydetails doc_returns_success_code
530    * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t}
531    * @li @sbmlconstant{LIBSBML_OPERATION_FAILED, OperationReturnValues_t}
532    */
533   virtual int setAttribute(const std::string& attributeName, double value);
534 
535   /** @endcond */
536 
537 
538 
539   /** @cond doxygenLibsbmlInternal */
540 
541   /**
542    * Sets the value of the "attributeName" attribute of this CSGPrimitive.
543    *
544    * @param attributeName, the name of the attribute to set.
545    *
546    * @param value, the value of the attribute to set.
547    *
548    * @copydetails doc_returns_success_code
549    * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t}
550    * @li @sbmlconstant{LIBSBML_OPERATION_FAILED, OperationReturnValues_t}
551    */
552   virtual int setAttribute(const std::string& attributeName,
553                            unsigned int value);
554 
555   /** @endcond */
556 
557 
558 
559   /** @cond doxygenLibsbmlInternal */
560 
561   /**
562    * Sets the value of the "attributeName" attribute of this CSGPrimitive.
563    *
564    * @param attributeName, the name of the attribute to set.
565    *
566    * @param value, the value of the attribute to set.
567    *
568    * @copydetails doc_returns_success_code
569    * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t}
570    * @li @sbmlconstant{LIBSBML_OPERATION_FAILED, OperationReturnValues_t}
571    */
572   virtual int setAttribute(const std::string& attributeName,
573                            const std::string& value);
574 
575   /** @endcond */
576 
577 
578 
579   /** @cond doxygenLibsbmlInternal */
580 
581   /**
582    * Unsets the value of the "attributeName" attribute of this CSGPrimitive.
583    *
584    * @param attributeName, the name of the attribute to query.
585    *
586    * @copydetails doc_returns_success_code
587    * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t}
588    * @li @sbmlconstant{LIBSBML_OPERATION_FAILED, OperationReturnValues_t}
589    */
590   virtual int unsetAttribute(const std::string& attributeName);
591 
592   /** @endcond */
593 
594 
595 
596 
597   #endif /* !SWIG */
598 
599 
600 protected:
601 
602 
603   /** @cond doxygenLibsbmlInternal */
604 
605   /**
606    * Creates a new object from the next XMLToken on the XMLInputStream
607    */
608   virtual SBase* createObject(XMLInputStream& stream);
609 
610   /** @endcond */
611 
612 
613 
614   /** @cond doxygenLibsbmlInternal */
615 
616   /**
617    * Adds the expected attributes for this element
618    */
619   virtual void addExpectedAttributes(ExpectedAttributes& attributes);
620 
621   /** @endcond */
622 
623 
624 
625   /** @cond doxygenLibsbmlInternal */
626 
627   /**
628    * Reads the expected attributes into the member data variables
629    */
630   virtual void readAttributes(const XMLAttributes& attributes,
631                               const ExpectedAttributes& expectedAttributes);
632 
633   /** @endcond */
634 
635 
636 
637   /** @cond doxygenLibsbmlInternal */
638 
639   /**
640    * Writes the attributes to the stream
641    */
642   virtual void writeAttributes(XMLOutputStream& stream) const;
643 
644   /** @endcond */
645 
646 
647 };
648 
649 
650 
651 LIBSBML_CPP_NAMESPACE_END
652 
653 
654 
655 
656 #endif /* __cplusplus */
657 
658 
659 
660 
661 #ifndef SWIG
662 
663 
664 
665 
666 LIBSBML_CPP_NAMESPACE_BEGIN
667 
668 
669 
670 
671 BEGIN_C_DECLS
672 
673 
674 /**
675  * Creates a new CSGPrimitive_t using the given SBML Level, Version and
676  * &ldquo;spatial&rdquo; package version.
677  *
678  * @param level an unsigned int, the SBML Level to assign to this
679  * CSGPrimitive_t.
680  *
681  * @param version an unsigned int, the SBML Version to assign to this
682  * CSGPrimitive_t.
683  *
684  * @param pkgVersion an unsigned int, the SBML Spatial Version to assign to
685  * this CSGPrimitive_t.
686  *
687  * @copydetails doc_note_setting_lv_pkg
688  *
689  * @copydetails doc_returned_owned_pointer
690  *
691  * @memberof CSGPrimitive_t
692  */
693 LIBSBML_EXTERN
694 CSGPrimitive_t *
695 CSGPrimitive_create(unsigned int level,
696                     unsigned int version,
697                     unsigned int pkgVersion);
698 
699 
700 /**
701  * Creates and returns a deep copy of this CSGPrimitive_t object.
702  *
703  * @param csgp the CSGPrimitive_t structure.
704  *
705  * @return a (deep) copy of this CSGPrimitive_t object.
706  *
707  * @copydetails doc_returned_owned_pointer
708  *
709  * @memberof CSGPrimitive_t
710  */
711 LIBSBML_EXTERN
712 CSGPrimitive_t*
713 CSGPrimitive_clone(const CSGPrimitive_t* csgp);
714 
715 
716 /**
717  * Frees this CSGPrimitive_t object.
718  *
719  * @param csgp the CSGPrimitive_t structure.
720  *
721  * @memberof CSGPrimitive_t
722  */
723 LIBSBML_EXTERN
724 void
725 CSGPrimitive_free(CSGPrimitive_t* csgp);
726 
727 
728 /**
729  * Returns the value of the "primitiveType" attribute of this CSGPrimitive_t.
730  *
731  * @param csgp the CSGPrimitive_t structure whose primitiveType is sought.
732  *
733  * @return the value of the "primitiveType" attribute of this CSGPrimitive_t as
734  * a PrimitiveKind_t.
735  *
736  * @copydetails doc_csgprimitive_primitiveType
737  * @if clike The value is drawn from the enumeration @ref PrimitiveKind_t
738  * @endif
739  * The possible values returned by this method are:
740  * @li @sbmlconstant{SPATIAL_PRIMITIVEKIND_SPHERE, PrimitiveKind_t}
741  * @li @sbmlconstant{SPATIAL_PRIMITIVEKIND_CUBE, PrimitiveKind_t}
742  * @li @sbmlconstant{SPATIAL_PRIMITIVEKIND_CYLINDER, PrimitiveKind_t}
743  * @li @sbmlconstant{SPATIAL_PRIMITIVEKIND_CONE, PrimitiveKind_t}
744  * @li @sbmlconstant{SPATIAL_PRIMITIVEKIND_CIRCLE, PrimitiveKind_t}
745  * @li @sbmlconstant{SPATIAL_PRIMITIVEKIND_SQUARE, PrimitiveKind_t}
746  * @li @sbmlconstant{SPATIAL_PRIMITIVEKIND_INVALID, PrimitiveKind_t}
747  *
748  * @memberof CSGPrimitive_t
749  */
750 LIBSBML_EXTERN
751 PrimitiveKind_t
752 CSGPrimitive_getPrimitiveType(const CSGPrimitive_t * csgp);
753 
754 
755 /**
756  * Returns the value of the "primitiveType" attribute of this CSGPrimitive_t.
757  *
758  * @param csgp the CSGPrimitive_t structure whose primitiveType is sought.
759  *
760  * @return the value of the "primitiveType" attribute of this CSGPrimitive_t as
761  * a const char *.
762  *
763  * @copydetails doc_returned_unowned_char
764  *
765  * @copydetails doc_csgprimitive_primitiveType
766  * The possible values returned by this method are:
767  * @li @c "sphere"
768  * @li @c "cube"
769  * @li @c "cylinder"
770  * @li @c "cone"
771  * @li @c "circle"
772  * @li @c "square"
773  * @li @c "invalid PrimitiveKind value"
774  *
775  * @memberof CSGPrimitive_t
776  */
777 LIBSBML_EXTERN
778 char *
779 CSGPrimitive_getPrimitiveTypeAsString(const CSGPrimitive_t * csgp);
780 
781 
782 /**
783  * Predicate returning @c 1 (true) if this CSGPrimitive_t's "primitiveType"
784  * attribute is set.
785  *
786  * @param csgp the CSGPrimitive_t structure.
787  *
788  * @return @c 1 (true) if this CSGPrimitive_t's "primitiveType" attribute has
789  * been set, otherwise @c 0 (false) is returned.
790  *
791  * @copydetails doc_csgprimitive_primitiveType
792  *
793  * @memberof CSGPrimitive_t
794  */
795 LIBSBML_EXTERN
796 int
797 CSGPrimitive_isSetPrimitiveType(const CSGPrimitive_t * csgp);
798 
799 
800 /**
801  * Sets the value of the "primitiveType" attribute of this CSGPrimitive_t.
802  *
803  * @param csgp the CSGPrimitive_t structure.
804  *
805  * @param primitiveType PrimitiveKind_t value of the "primitiveType" attribute
806  * to be set.
807  *
808  * @copydetails doc_returns_success_code
809  * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t}
810  * @li @sbmlconstant{LIBSBML_INVALID_ATTRIBUTE_VALUE, OperationReturnValues_t}
811  * @li @sbmlconstant{LIBSBML_INVALID_OBJECT, OperationReturnValues_t}
812  *
813  * @copydetails doc_csgprimitive_primitiveType
814  *
815  * @memberof CSGPrimitive_t
816  */
817 LIBSBML_EXTERN
818 int
819 CSGPrimitive_setPrimitiveType(CSGPrimitive_t * csgp,
820                               PrimitiveKind_t primitiveType);
821 
822 
823 /**
824  * Sets the value of the "primitiveType" attribute of this CSGPrimitive_t.
825  *
826  * @param csgp the CSGPrimitive_t structure.
827  *
828  * @param primitiveType const char * of the "primitiveType" attribute to be
829  * set.
830  *
831  * @copydetails doc_returns_success_code
832  * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t}
833  * @li @sbmlconstant{LIBSBML_INVALID_ATTRIBUTE_VALUE, OperationReturnValues_t}
834  * @li @sbmlconstant{LIBSBML_INVALID_OBJECT, OperationReturnValues_t}
835  *
836  * @copydetails doc_csgprimitive_primitiveType
837  *
838  * @memberof CSGPrimitive_t
839  */
840 LIBSBML_EXTERN
841 int
842 CSGPrimitive_setPrimitiveTypeAsString(CSGPrimitive_t * csgp,
843                                       const char * primitiveType);
844 
845 
846 /**
847  * Unsets the value of the "primitiveType" attribute of this CSGPrimitive_t.
848  *
849  * @param csgp the CSGPrimitive_t structure.
850  *
851  * @copydetails doc_returns_success_code
852  * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t}
853  * @li @sbmlconstant{LIBSBML_INVALID_OBJECT, OperationReturnValues_t}
854  *
855  * @copydetails doc_csgprimitive_primitiveType
856  *
857  * @memberof CSGPrimitive_t
858  */
859 LIBSBML_EXTERN
860 int
861 CSGPrimitive_unsetPrimitiveType(CSGPrimitive_t * csgp);
862 
863 
864 /**
865  * Predicate returning @c 1 (true) if all the required attributes for this
866  * CSGPrimitive_t object have been set.
867  *
868  * @param csgp the CSGPrimitive_t structure.
869  *
870  * @return @c 1 (true) to indicate that all the required attributes of this
871  * CSGPrimitive_t have been set, otherwise @c 0 (false) is returned.
872  *
873  *
874  * @note The required attributes for the CSGPrimitive_t object are:
875  * @li "primitiveType"
876  *
877  * @memberof CSGPrimitive_t
878  */
879 LIBSBML_EXTERN
880 int
881 CSGPrimitive_hasRequiredAttributes(const CSGPrimitive_t * csgp);
882 
883 
884 
885 
886 END_C_DECLS
887 
888 
889 
890 
891 LIBSBML_CPP_NAMESPACE_END
892 
893 
894 
895 
896 #endif /* !SWIG */
897 
898 
899 
900 
901 #endif /* !CSGPrimitive_H__ */
902 
903 
904