1 /**
2  * @file SampledField.h
3  * @brief Definition of the SampledField 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 SampledField
43  * @sbmlbrief{spatial} TODO:Definition of the SampledField 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_sampledfield_dataType
56  *
57  * @par
58  * The attribute "dataType" on a SampledField 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 "dataType":
64  * <ul>
65  * <li> @c "uint", unsigned integer
66  *
67  * <li> @c "int", signed integer
68  *
69  * <li> @c "double", double-precision floating value
70  *
71  * <li> @c "float", single-precision floating value
72  *
73  * <li> @c "uint8", 8-bit unsigned integer
74  *
75  * <li> @c "uint16", 16-bit unsigned integer
76  *
77  * <li> @c "uint32", 32-bit unsigned integer
78  *
79  * </ul>
80  *
81  * @class doc_sampledfield_interpolationType
82  *
83  * @par
84  * The attribute "interpolationType" on a SampledField object is used to
85  * TODO:add explanation
86  *
87  * In the SBML
88  * Level&nbsp;3 Version&nbsp;1 Spatial specification, the following are the
89  * allowable values for "interpolationType":
90  * <ul>
91  * <li> @c "nearestNeighbor", TODO:add description
92  *
93  * <li> @c "linear", TODO:add description
94  *
95  * </ul>
96  *
97  * @class doc_sampledfield_compression
98  *
99  * @par
100  * The attribute "compression" on a SampledField object is used to TODO:add
101  * explanation
102  *
103  * In the SBML
104  * Level&nbsp;3 Version&nbsp;1 Spatial specification, the following are the
105  * allowable values for "compression":
106  * <ul>
107  * <li> @c "uncompressed", TODO:add description
108  *
109  * <li> @c "deflated", TODO:add description
110  *
111  * </ul>
112  */
113 
114 
115 #ifndef SampledField_H__
116 #define SampledField_H__
117 
118 
119 #include <sbml/common/extern.h>
120 #include <sbml/common/sbmlfwd.h>
121 #include <sbml/packages/spatial/common/spatialfwd.h>
122 
123 
124 #ifdef __cplusplus
125 
126 
127 #include <string>
128 #include <vector>
129 
130 #include <sbml/SBase.h>
131 #include <sbml/packages/spatial/extension/SpatialExtension.h>
132 
133 
134 LIBSBML_CPP_NAMESPACE_BEGIN
135 
136 
137 class LIBSBML_EXTERN SampledField : public SBase
138 {
139 protected:
140 
141   /** @cond doxygenLibsbmlInternal */
142 
143   DataKind_t mDataType;
144   int mNumSamples1;
145   bool mIsSetNumSamples1;
146   int mNumSamples2;
147   bool mIsSetNumSamples2;
148   int mNumSamples3;
149   bool mIsSetNumSamples3;
150   InterpolationKind_t mInterpolationType;
151   CompressionKind_t mCompression;
152   std::string mSamples;
153   int mSamplesLength;
154   bool mIsSetSamplesLength;
155 
156   mutable int* mSamplesCompressed;
157   mutable double* mSamplesUncompressed;
158   mutable int* mSamplesUncompressedInt;
159   mutable size_t mSamplesCompressedLength;
160   mutable size_t mSamplesUncompressedLength;
161 
162   /** @endcond */
163 
164 public:
165 
166   /**
167    * Creates a new SampledField using the given SBML Level, Version and
168    * &ldquo;spatial&rdquo; package version.
169    *
170    * @param level an unsigned int, the SBML Level to assign to this
171    * SampledField.
172    *
173    * @param version an unsigned int, the SBML Version to assign to this
174    * SampledField.
175    *
176    * @param pkgVersion an unsigned int, the SBML Spatial Version to assign to
177    * this SampledField.
178    *
179    * @copydetails doc_note_setting_lv_pkg
180    */
181   SampledField(unsigned int level = SpatialExtension::getDefaultLevel(),
182                unsigned int version = SpatialExtension::getDefaultVersion(),
183                unsigned int pkgVersion =
184                  SpatialExtension::getDefaultPackageVersion());
185 
186 
187   /**
188    * Creates a new SampledField using the given SpatialPkgNamespaces object.
189    *
190    * @copydetails doc_what_are_sbml_package_namespaces
191    *
192    * @param spatialns the SpatialPkgNamespaces object.
193    *
194    * @copydetails doc_note_setting_lv_pkg
195    */
196   SampledField(SpatialPkgNamespaces *spatialns);
197 
198 
199   /**
200    * Copy constructor for SampledField.
201    *
202    * @param orig the SampledField instance to copy.
203    */
204   SampledField(const SampledField& orig);
205 
206 
207   /**
208    * Assignment operator for SampledField.
209    *
210    * @param rhs the SampledField object whose values are to be used as the
211    * basis of the assignment.
212    */
213   SampledField& operator=(const SampledField& rhs);
214 
215 
216   /**
217    * Creates and returns a deep copy of this SampledField object.
218    *
219    * @return a (deep) copy of this SampledField object.
220    */
221   virtual SampledField* clone() const;
222 
223 
224   /**
225    * Destructor for SampledField.
226    */
227   virtual ~SampledField();
228 
229 
230   /**
231    * Returns the value of the "id" attribute of this SampledField.
232    *
233    * @return the value of the "id" attribute of this SampledField as a string.
234    */
235   virtual const std::string& getId() const;
236 
237 
238   /**
239    * Returns the value of the "name" attribute of this SampledField.
240    *
241    * @return the value of the "name" attribute of this SampledField as a
242    * string.
243    */
244   virtual const std::string& getName() const;
245 
246 
247   /**
248    * Returns the value of the "dataType" attribute of this SampledField.
249    *
250    * @return the value of the "dataType" attribute of this SampledField as a
251    * DataKind_t.
252    *
253    * @copydetails doc_sampledfield_dataType
254    * @if clike The value is drawn from the enumeration @ref DataKind_t @endif
255    * The possible values returned by this method are:
256    * @li @sbmlconstant{SPATIAL_DATAKIND_UINT, DataKind_t}
257    * @li @sbmlconstant{SPATIAL_DATAKIND_INT, DataKind_t}
258    * @li @sbmlconstant{SPATIAL_DATAKIND_DOUBLE, DataKind_t}
259    * @li @sbmlconstant{SPATIAL_DATAKIND_FLOAT, DataKind_t}
260    * @li @sbmlconstant{SPATIAL_DATAKIND_UINT8, DataKind_t}
261    * @li @sbmlconstant{SPATIAL_DATAKIND_UINT16, DataKind_t}
262    * @li @sbmlconstant{SPATIAL_DATAKIND_UINT32, DataKind_t}
263    * @li @sbmlconstant{SPATIAL_DATAKIND_INVALID, DataKind_t}
264    */
265   DataKind_t getDataType() const;
266 
267 
268   /**
269    * Returns the value of the "dataType" attribute of this SampledField.
270    *
271    * @return the value of the "dataType" attribute of this SampledField as a
272    * string.
273    *
274    * @copydetails doc_sampledfield_dataType
275    * The possible values returned by this method are:
276    * @li @c "uint"
277    * @li @c "int"
278    * @li @c "double"
279    * @li @c "float"
280    * @li @c "uint8"
281    * @li @c "uint16"
282    * @li @c "uint32"
283    * @li @c "invalid DataKind value"
284    */
285   std::string getDataTypeAsString() const;
286 
287 
288   /**
289    * Returns the value of the "numSamples1" attribute of this SampledField.
290    *
291    * @return the value of the "numSamples1" attribute of this SampledField as a
292    * integer.
293    */
294   int getNumSamples1() const;
295 
296 
297   /**
298    * Returns the value of the "numSamples2" attribute of this SampledField.
299    *
300    * @return the value of the "numSamples2" attribute of this SampledField as a
301    * integer.
302    */
303   int getNumSamples2() const;
304 
305 
306   /**
307    * Returns the value of the "numSamples3" attribute of this SampledField.
308    *
309    * @return the value of the "numSamples3" attribute of this SampledField as a
310    * integer.
311    */
312   int getNumSamples3() const;
313 
314 
315   /**
316    * Returns the value of the "interpolationType" attribute of this
317    * SampledField.
318    *
319    * @return the value of the "interpolationType" attribute of this
320    * SampledField as a InterpolationKind_t.
321    *
322    * @copydetails doc_sampledfield_interpolationType
323    * @if clike The value is drawn from the enumeration @ref InterpolationKind_t
324    * @endif
325    * The possible values returned by this method are:
326    * @li @sbmlconstant{SPATIAL_INTERPOLATIONKIND_NEARESTNEIGHBOR,
327    * InterpolationKind_t}
328    * @li @sbmlconstant{SPATIAL_INTERPOLATIONKIND_LINEAR, InterpolationKind_t}
329    * @li @sbmlconstant{SPATIAL_INTERPOLATIONKIND_INVALID, InterpolationKind_t}
330    */
331   InterpolationKind_t getInterpolationType() const;
332 
333 
334   /**
335    * Returns the value of the "interpolationType" attribute of this
336    * SampledField.
337    *
338    * @return the value of the "interpolationType" attribute of this
339    * SampledField as a string.
340    *
341    * @copydetails doc_sampledfield_interpolationType
342    * The possible values returned by this method are:
343    * @li @c "nearestNeighbor"
344    * @li @c "linear"
345    * @li @c "invalid InterpolationKind value"
346    */
347   std::string getInterpolationTypeAsString() const;
348 
349 
350   /**
351    * Returns the value of the "compression" attribute of this SampledField.
352    *
353    * @return the value of the "compression" attribute of this SampledField as a
354    * CompressionKind_t.
355    *
356    * @copydetails doc_sampledfield_compression
357    * @if clike The value is drawn from the enumeration @ref CompressionKind_t
358    * @endif
359    * The possible values returned by this method are:
360    * @li @sbmlconstant{SPATIAL_COMPRESSIONKIND_UNCOMPRESSED, CompressionKind_t}
361    * @li @sbmlconstant{SPATIAL_COMPRESSIONKIND_DEFLATED, CompressionKind_t}
362    * @li @sbmlconstant{SPATIAL_COMPRESSIONKIND_INVALID, CompressionKind_t}
363    */
364   CompressionKind_t getCompression() const;
365 
366 
367   /**
368    * Returns the value of the "compression" attribute of this SampledField.
369    *
370    * @return the value of the "compression" attribute of this SampledField as a
371    * string.
372    *
373    * @copydetails doc_sampledfield_compression
374    * The possible values returned by this method are:
375    * @li @c "uncompressed"
376    * @li @c "deflated"
377    * @li @c "invalid CompressionKind value"
378    */
379   std::string getCompressionAsString() const;
380 
381 
382   /**
383    * Stores the uncompressed values of the samples entries of this SampledField in the provided array.
384    * Will fail if the samples entries of the SampledField contains values that
385    * cannot be accurately cast to ints.
386    *
387    * @param outArray int* array that will be used to return the value of the
388    * samples entries of this SampledField.
389    *
390    * @note the value of the samples entries of this SampledField is
391    * returned in the argument array.
392    *
393    * @copydetails doc_returns_success_code
394    * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t}
395    * @li @sbmlconstant{LIBSBML_OPERATION_FAILED, OperationReturnValues_t}
396    */
397   int getSamples(int* outArray) const;
398 
399   /**
400    * Stores the uncompressed values of the samples entries of this SampledField in the provided vector.
401    * Will fail and return an empty vector if the samples entries of the SampledField contains values that
402    * cannot be accurately cast to ints.
403    *
404    * @param outVector vector that will be used to return the value of the
405    * samples entries of this SampledField.
406    *
407    * @note the value of the samples entries of this SampledField is
408    * returned in the argument array.
409    */
410   void getSamples(std::vector<int>& outVector) const;
411 
412   /**
413   * Returns the value of the samples entries of this SampledField as a string.
414   *
415   * @note the value of the samples entries of this SampledField is
416   * returned in the argument array.
417   */
418   std::string getSamples() const;
419 
420   /**
421    * Stores the uncompressed values of the samples entries of this SampledField in the provided array.
422    *
423    * @param outArray double* array that will be used to return the value of the
424    * samples entries of this SampledField.
425    *
426    * @note the value of the samples entries of this SampledField is
427    * returned in the argument array.
428    *
429    * @copydetails doc_returns_success_code
430    * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t}
431    * @li @sbmlconstant{LIBSBML_OPERATION_FAILED, OperationReturnValues_t}
432    */
433   int getSamples(double* outArray) const;
434 
435   /**
436    * Stores the uncompressed values of the samples entries of this SampledField in the provided vector.
437    *
438    * @param outVector vector that will be used to return the value of the
439    * samples entries of this SampledField.
440    *
441    * @note the value of the samples entries of this SampledField is
442    * returned in the argument array.
443    */
444   void getSamples(std::vector<double>& outVector) const;
445 
446 
447   /**
448    * Stores the uncompressed values of the samples entries of this SampledField in the provided array.
449    *
450    * @param outArray float* array that will be used to return the value of the
451    * samples entries of this SampledField.
452    *
453    * @note the value of the samples entries of this SampledField is
454    * returned in the argument array.
455    */
456   int getSamples(float* outArray) const;
457 
458   /**
459   * Stores the uncompressed values of the samples entries of this SampledField in the provided vector.
460   *
461   * @param outVector vector that will be used to return the value of the
462   * samples entries of this SampledField.
463   *
464   * @note the value of the samples entries of this SampledField is
465   * returned in the argument array.
466   */
467   void getSamples(std::vector<float>& outVector) const;
468 
469   /**
470    * Returns the value of the "samplesLength" attribute of this SampledField.
471    *
472    * @return the value of the "samplesLength" attribute of this SampledField as
473    * a integer.
474    */
475   int getSamplesLength() const;
476 
477 
478   /**
479    * Returns the number of child entries in this SampledField.
480    *
481    * @return the number of child entries, either compressed or non-compressed.
482    */
483   size_t getActualSamplesLength() const;
484 
485 
486   /**
487    * Predicate returning @c true if this SampledField's "id" attribute is set.
488    *
489    * @return @c true if this SampledField's "id" attribute has been set,
490    * otherwise @c false is returned.
491    */
492   virtual bool isSetId() const;
493 
494 
495   /**
496    * Predicate returning @c true if this SampledField's "name" attribute is
497    * set.
498    *
499    * @return @c true if this SampledField's "name" attribute has been set,
500    * otherwise @c false is returned.
501    */
502   virtual bool isSetName() const;
503 
504 
505   /**
506    * Predicate returning @c true if this SampledField's "dataType" attribute is
507    * set.
508    *
509    * @return @c true if this SampledField's "dataType" attribute has been set,
510    * otherwise @c false is returned.
511    *
512    * @copydetails doc_sampledfield_dataType
513    */
514   bool isSetDataType() const;
515 
516 
517   /**
518    * Predicate returning @c true if this SampledField's "numSamples1" attribute
519    * is set.
520    *
521    * @return @c true if this SampledField's "numSamples1" attribute has been
522    * set, otherwise @c false is returned.
523    */
524   bool isSetNumSamples1() const;
525 
526 
527   /**
528    * Predicate returning @c true if this SampledField's "numSamples2" attribute
529    * is set.
530    *
531    * @return @c true if this SampledField's "numSamples2" attribute has been
532    * set, otherwise @c false is returned.
533    */
534   bool isSetNumSamples2() const;
535 
536 
537   /**
538    * Predicate returning @c true if this SampledField's "numSamples3" attribute
539    * is set.
540    *
541    * @return @c true if this SampledField's "numSamples3" attribute has been
542    * set, otherwise @c false is returned.
543    */
544   bool isSetNumSamples3() const;
545 
546 
547   /**
548    * Predicate returning @c true if this SampledField's "interpolationType"
549    * attribute is set.
550    *
551    * @return @c true if this SampledField's "interpolationType" attribute has
552    * been set, otherwise @c false is returned.
553    *
554    * @copydetails doc_sampledfield_interpolationType
555    */
556   bool isSetInterpolationType() const;
557 
558 
559   /**
560    * Predicate returning @c true if this SampledField's "compression" attribute
561    * is set.
562    *
563    * @return @c true if this SampledField's "compression" attribute has been
564    * set, otherwise @c false is returned.
565    *
566    * @copydetails doc_sampledfield_compression
567    */
568   bool isSetCompression() const;
569 
570 
571   /**
572    * Predicate returning @c true if this SampledField's samples entries is
573    * set.
574    *
575    * @return @c true if this SampledField's samples entries has been set,
576    * otherwise @c false is returned.
577    */
578   bool isSetSamples() const;
579 
580 
581   /**
582    * Predicate returning @c true if this SampledField's "samplesLength"
583    * attribute is set.
584    *
585    * @return @c true if this SampledField's "samplesLength" attribute has been
586    * set, otherwise @c false is returned.
587    */
588   bool isSetSamplesLength() const;
589 
590 
591   /**
592    * Sets the value of the "id" attribute of this SampledField.
593    *
594    * @param id std::string& value of the "id" attribute to be set.
595    *
596    * @copydetails doc_returns_success_code
597    * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t}
598    * @li @sbmlconstant{LIBSBML_INVALID_ATTRIBUTE_VALUE,
599    * OperationReturnValues_t}
600    *
601    * Calling this function with @p id = @c NULL or an empty string is
602    * equivalent to calling unsetId().
603    */
604   virtual int setId(const std::string& id);
605 
606 
607   /**
608    * Sets the value of the "name" attribute of this SampledField.
609    *
610    * @param name std::string& value of the "name" attribute to be set.
611    *
612    * @copydetails doc_returns_one_success_code
613    * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t}
614    *
615    * Calling this function with @p name = @c NULL or an empty string is
616    * equivalent to calling unsetName().
617    */
618   virtual int setName(const std::string& name);
619 
620 
621   /**
622    * Sets the value of the "dataType" attribute of this SampledField.
623    *
624    * @param dataType @if clike DataKind_t@else int@endif value of the
625    * "dataType" attribute to be set.
626    *
627    * @copydetails doc_returns_success_code
628    * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t}
629    * @li @sbmlconstant{LIBSBML_INVALID_ATTRIBUTE_VALUE,
630    * OperationReturnValues_t}
631    *
632    * @copydetails doc_sampledfield_dataType
633    */
634   int setDataType(const DataKind_t dataType);
635 
636 
637   /**
638    * Sets the value of the "dataType" attribute of this SampledField.
639    *
640    * @param dataType std::string& of the "dataType" attribute to be set.
641    *
642    * @copydetails doc_returns_success_code
643    * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t}
644    * @li @sbmlconstant{LIBSBML_INVALID_ATTRIBUTE_VALUE,
645    * OperationReturnValues_t}
646    *
647    * @copydetails doc_sampledfield_dataType
648    */
649   int setDataType(const std::string& dataType);
650 
651 
652   /**
653    * Sets the value of the "numSamples1" attribute of this SampledField.
654    *
655    * @param numSamples1 int value of the "numSamples1" attribute to be set.
656    *
657    * @copydetails doc_returns_success_code
658    * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t}
659    * @li @sbmlconstant{LIBSBML_INVALID_ATTRIBUTE_VALUE,
660    * OperationReturnValues_t}
661    */
662   int setNumSamples1(int numSamples1);
663 
664 
665   /**
666    * Sets the value of the "numSamples2" attribute of this SampledField.
667    *
668    * @param numSamples2 int value of the "numSamples2" attribute to be set.
669    *
670    * @copydetails doc_returns_success_code
671    * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t}
672    * @li @sbmlconstant{LIBSBML_INVALID_ATTRIBUTE_VALUE,
673    * OperationReturnValues_t}
674    */
675   int setNumSamples2(int numSamples2);
676 
677 
678   /**
679    * Sets the value of the "numSamples3" attribute of this SampledField.
680    *
681    * @param numSamples3 int value of the "numSamples3" attribute to be set.
682    *
683    * @copydetails doc_returns_success_code
684    * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t}
685    * @li @sbmlconstant{LIBSBML_INVALID_ATTRIBUTE_VALUE,
686    * OperationReturnValues_t}
687    */
688   int setNumSamples3(int numSamples3);
689 
690 
691   /**
692    * Sets the value of the "interpolationType" attribute of this SampledField.
693    *
694    * @param interpolationType @if clike InterpolationKind_t@else int@endif
695    * value of the "interpolationType" attribute to be set.
696    *
697    * @copydetails doc_returns_success_code
698    * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t}
699    * @li @sbmlconstant{LIBSBML_INVALID_ATTRIBUTE_VALUE,
700    * OperationReturnValues_t}
701    *
702    * @copydetails doc_sampledfield_interpolationType
703    */
704   int setInterpolationType(const InterpolationKind_t interpolationType);
705 
706 
707   /**
708    * Sets the value of the "interpolationType" attribute of this SampledField.
709    *
710    * @param interpolationType std::string& of the "interpolationType" attribute
711    * to be set.
712    *
713    * @copydetails doc_returns_success_code
714    * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t}
715    * @li @sbmlconstant{LIBSBML_INVALID_ATTRIBUTE_VALUE,
716    * OperationReturnValues_t}
717    *
718    * @copydetails doc_sampledfield_interpolationType
719    */
720   int setInterpolationType(const std::string& interpolationType);
721 
722 
723   /**
724    * Sets the value of the "compression" attribute of this SampledField.
725    *
726    * @param compression @if clike CompressionKind_t@else int@endif value of the
727    * "compression" attribute to be set.
728    *
729    * @copydetails doc_returns_success_code
730    * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t}
731    * @li @sbmlconstant{LIBSBML_INVALID_ATTRIBUTE_VALUE,
732    * OperationReturnValues_t}
733    *
734    * @copydetails doc_sampledfield_compression
735    */
736   int setCompression(const CompressionKind_t compression);
737 
738 
739   /**
740    * Sets the value of the "compression" attribute of this SampledField.
741    *
742    * @param compression std::string& of the "compression" attribute to be set.
743    *
744    * @copydetails doc_returns_success_code
745    * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t}
746    * @li @sbmlconstant{LIBSBML_INVALID_ATTRIBUTE_VALUE,
747    * OperationReturnValues_t}
748    *
749    * @copydetails doc_sampledfield_compression
750    */
751   int setCompression(const std::string& compression);
752 
753 
754   /**
755    * Sets the value of the samples entries of this SampledField.
756    * The values are converted to a string.  The compression status
757    * can be either deflated or uncompressed; the object will assume
758    * that it is correct either way.
759    *
760    * @param inArray int* array value of the samples entries to be set.
761    *
762    * @param arrayLength size_t value for the length of the samples entries to
763    * be set.
764    *
765    * @copydetails doc_returns_success_code
766    * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t}
767    * @li @sbmlconstant{LIBSBML_INVALID_ATTRIBUTE_VALUE,
768    * OperationReturnValues_t}
769    */
770   int setSamples(int* inArray, size_t arrayLength);
771 
772   /**
773    * Sets the value of the samples entries of this SampledField.
774    * The values are converted to a string.  The compression status
775    * can be either deflated or uncompressed; the object will assume
776    * that it is correct either way.
777    *
778    * @param inArray unsigned int* array value of the samples entries to be set.
779    *
780    * @param arrayLength size_t value for the length of the samples entries to
781    * be set.
782    *
783    * @copydetails doc_returns_success_code
784    * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t}
785    * @li @sbmlconstant{LIBSBML_INVALID_ATTRIBUTE_VALUE,
786    * OperationReturnValues_t}
787    */
788   int setSamples(unsigned int* inArray, size_t arrayLength);
789 
790   /**
791    * Sets the value of the samples entries of this SampledField.
792    * The values are converted to a string by converting each char
793    * to its integer equivalent:  an "a" will be converted to the
794    * string "97", a "b" to "98", etc.  To just set the string
795    * of the samples entries, use 'setSamples(string)', instead.
796    * The compression status can be either deflated or uncompressed,
797    * but the most common use of this function will be when the
798    * @p inArray is a compressed array of char's.
799    *
800    * @param inArray unsigned char* array value of the samples entries to be set.
801    *
802    * @param arrayLength size_t value for the length of the samples entries to
803    * be set.
804    *
805    * @copydetails doc_returns_success_code
806    * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t}
807    * @li @sbmlconstant{LIBSBML_INVALID_ATTRIBUTE_VALUE,
808    * OperationReturnValues_t}
809    */
810   int setSamples(unsigned char* inArray, size_t arrayLength);
811 
812   /**
813    * Sets the value of the samples entries of this SampledField.
814    *
815    * @param samples the preformatted samples string to be set
816    *
817    * @copydetails doc_returns_success_code
818    * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t}
819    * @li @sbmlconstant{LIBSBML_INVALID_ATTRIBUTE_VALUE,
820    * OperationReturnValues_t}
821    */
822   int setSamples(const std::string& samples);
823 
824   /**
825    * Sets the value of the samples entries of this SampledField.
826    * Because the compressed form of the samples entries cannot
827    * be doubles (only ints), this also sets the compression
828    * status to 'uncompressed'.
829    * Also sets the 'samplesLength' attribute to the size
830    * of the vector.
831    *
832    * @param samples the preformatted samples string to be set
833    *
834    * @copydetails doc_returns_success_code
835    * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t}
836    * @li @sbmlconstant{LIBSBML_INVALID_ATTRIBUTE_VALUE,
837    * OperationReturnValues_t}
838    */
839   int setSamples(const std::vector<double>& samples);
840 
841   /**
842    * Sets the value of the samples entries of this SampledField.
843    * Because the compressed form of the samples entries cannot
844    * be floats (only ints), this also sets the compression
845    * status to 'uncompressed'.
846    * Also sets the 'samplesLength' attribute to the size
847    * of the vector.
848    *
849    * @param samples the preformatted samples string to be set
850    *
851    * @copydetails doc_returns_success_code
852    * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t}
853    * @li @sbmlconstant{LIBSBML_INVALID_ATTRIBUTE_VALUE,
854    * OperationReturnValues_t}
855    */
856   int setSamples(const std::vector<float>& samples);
857 
858   /**
859    * Sets the value of the samples entries of this SampledField.
860    * Because either the compressed and uncompressed form of the samples
861    * entries could be ints, this does not set the compression
862    * status.  It does set the 'samplesLength' attribute to the size
863    * of the vector.
864    *
865    * @param samples the preformatted samples string to be set
866    *
867    * @copydetails doc_returns_success_code
868    * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t}
869    * @li @sbmlconstant{LIBSBML_INVALID_ATTRIBUTE_VALUE,
870    * OperationReturnValues_t}
871    */
872   int setSamples(const std::vector<int>& samples);
873 
874   /**
875    * Sets the value of the samples entries of this SampledField.
876    * Because the compressed form of the samples entries cannot
877    * be doubles (only ints), this also sets the compression
878    * status to 'uncompressed'.
879    * Also sets the 'samplesLength' attribute to @p arrayLength.
880    *
881    * @param inArray double* array value of the samples entries to be set.
882    *
883    * @param arrayLength size_t value for the length of the samples entries to
884    * be set.
885    *
886    * @copydetails doc_returns_success_code
887    * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t}
888    * @li @sbmlconstant{LIBSBML_INVALID_ATTRIBUTE_VALUE,
889    * OperationReturnValues_t}
890    */
891   int setSamples(double* inArray, size_t arrayLength);
892 
893   /**
894    * Sets the value of the samples entries of this SampledField.
895    * Because the compressed form of the samples entries cannot
896    * be floats (only ints), this also sets the compression
897    * status to 'uncompressed'.
898    * Also sets the 'samplesLength' attribute to @p arrayLength.
899    *
900    * @param inArray float* array value of the samples entries to be set.
901    *
902    * @param arrayLength size_t value for the length of the samples entries to
903    * be set.
904    *
905    * @copydetails doc_returns_success_code
906    * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t}
907    * @li @sbmlconstant{LIBSBML_INVALID_ATTRIBUTE_VALUE,
908    * OperationReturnValues_t}
909    */
910   int setSamples(float* inArray, size_t arrayLength);
911 
912 
913   /**
914    * Sets the value of the "samplesLength" attribute of this SampledField.
915    *
916    * @param samplesLength int value of the "samplesLength" attribute to be set.
917    *
918    * @copydetails doc_returns_success_code
919    * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t}
920    * @li @sbmlconstant{LIBSBML_INVALID_ATTRIBUTE_VALUE,
921    * OperationReturnValues_t}
922    */
923   int setSamplesLength(int samplesLength);
924 
925 
926   /**
927    * Unsets the value of the "id" attribute of this SampledField.
928    *
929    * @copydetails doc_returns_success_code
930    * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t}
931    * @li @sbmlconstant{LIBSBML_OPERATION_FAILED, OperationReturnValues_t}
932    */
933   virtual int unsetId();
934 
935 
936   /**
937    * Unsets the value of the "name" attribute of this SampledField.
938    *
939    * @copydetails doc_returns_success_code
940    * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t}
941    * @li @sbmlconstant{LIBSBML_OPERATION_FAILED, OperationReturnValues_t}
942    */
943   virtual int unsetName();
944 
945 
946   /**
947    * Unsets the value of the "dataType" attribute of this SampledField.
948    *
949    * @copydetails doc_returns_one_success_code
950    * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t}
951    *
952    * @copydetails doc_sampledfield_dataType
953    */
954   int unsetDataType();
955 
956 
957   /**
958    * Unsets the value of the "numSamples1" attribute of this SampledField.
959    *
960    * @copydetails doc_returns_success_code
961    * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t}
962    * @li @sbmlconstant{LIBSBML_OPERATION_FAILED, OperationReturnValues_t}
963    */
964   int unsetNumSamples1();
965 
966 
967   /**
968    * Unsets the value of the "numSamples2" attribute of this SampledField.
969    *
970    * @copydetails doc_returns_success_code
971    * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t}
972    * @li @sbmlconstant{LIBSBML_OPERATION_FAILED, OperationReturnValues_t}
973    */
974   int unsetNumSamples2();
975 
976 
977   /**
978    * Unsets the value of the "numSamples3" attribute of this SampledField.
979    *
980    * @copydetails doc_returns_success_code
981    * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t}
982    * @li @sbmlconstant{LIBSBML_OPERATION_FAILED, OperationReturnValues_t}
983    */
984   int unsetNumSamples3();
985 
986 
987   /**
988    * Unsets the value of the "interpolationType" attribute of this
989    * SampledField.
990    *
991    * @copydetails doc_returns_one_success_code
992    * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t}
993    *
994    * @copydetails doc_sampledfield_interpolationType
995    */
996   int unsetInterpolationType();
997 
998 
999   /**
1000    * Unsets the value of the "compression" attribute of this SampledField.
1001    *
1002    * @copydetails doc_returns_one_success_code
1003    * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t}
1004    *
1005    * @copydetails doc_sampledfield_compression
1006    */
1007   int unsetCompression();
1008 
1009 
1010   /**
1011    * Unsets the value of the samples entries of this SampledField.
1012    *
1013    * @copydetails doc_returns_success_code
1014    * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t}
1015    * @li @sbmlconstant{LIBSBML_OPERATION_FAILED, OperationReturnValues_t}
1016    */
1017   int unsetSamples();
1018 
1019 
1020   /**
1021    * Unsets the value of the "samplesLength" attribute of this SampledField.
1022    *
1023    * @copydetails doc_returns_success_code
1024    * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t}
1025    * @li @sbmlconstant{LIBSBML_OPERATION_FAILED, OperationReturnValues_t}
1026    */
1027   int unsetSamplesLength();
1028 
1029 
1030   /**
1031    * Returns the XML element name of this SampledField object.
1032    *
1033    * For SampledField, the XML element name is always @c "sampledField".
1034    *
1035    * @return the name of this element, i.e. @c "sampledField".
1036    */
1037   virtual const std::string& getElementName() const;
1038 
1039 
1040   /**
1041    * Returns the libSBML type code for this SampledField object.
1042    *
1043    * @copydetails doc_what_are_typecodes
1044    *
1045    * @return the SBML type code for this object:
1046    * @sbmlconstant{SBML_SPATIAL_SAMPLEDFIELD, SBMLSpatialTypeCode_t}.
1047    *
1048    * @copydetails doc_warning_typecodes_not_unique
1049    *
1050    * @see getElementName()
1051    * @see getPackageName()
1052    */
1053   virtual int getTypeCode() const;
1054 
1055 
1056   /**
1057    * Predicate returning @c true if all the required attributes for this
1058    * SampledField object have been set.
1059    *
1060    * @return @c true to indicate that all the required attributes of this
1061    * SampledField have been set, otherwise @c false is returned.
1062    *
1063    *
1064    * @note The required attributes for the SampledField object are:
1065    * @li "id"
1066    * @li "dataType"
1067    * @li "numSamples1"
1068    * @li "interpolationType"
1069    * @li "compression"
1070    * @li "samples"
1071    * @li "samplesLength"
1072    */
1073   virtual bool hasRequiredAttributes() const;
1074 
1075 
1076 
1077   /** @cond doxygenLibsbmlInternal */
1078 
1079   /**
1080    * Write any contained elements
1081    */
1082   virtual void writeElements(XMLOutputStream& stream) const;
1083 
1084   /** @endcond */
1085 
1086 
1087 
1088   /** @cond doxygenLibsbmlInternal */
1089 
1090   /**
1091    * Accepts the given SBMLVisitor
1092    */
1093   virtual bool accept(SBMLVisitor& v) const;
1094 
1095   /** @endcond */
1096 
1097 
1098 
1099   /** @cond doxygenLibsbmlInternal */
1100 
1101   /**
1102    * Sets the parent SBMLDocument
1103    */
1104   virtual void setSBMLDocument(SBMLDocument* d);
1105 
1106   /** @endcond */
1107 
1108 
1109 
1110   /** @cond doxygenLibsbmlInternal */
1111 
1112   /**
1113    * used to write arrays
1114    */
1115   virtual void write(XMLOutputStream& stream) const;
1116 
1117   /** @endcond */
1118 
1119 
1120 
1121   /** @cond doxygenLibsbmlInternal */
1122 
1123   /**
1124    * Enables/disables the given package with this element
1125    */
1126   virtual void enablePackageInternal(const std::string& pkgURI,
1127                                      const std::string& pkgPrefix,
1128                                      bool flag);
1129 
1130   /** @endcond */
1131 
1132 
1133 
1134 
1135   #ifndef SWIG
1136 
1137 
1138 
1139   /** @cond doxygenLibsbmlInternal */
1140 
1141   /**
1142    * Gets the value of the "attributeName" attribute of this SampledField.
1143    *
1144    * @param attributeName, the name of the attribute to retrieve.
1145    *
1146    * @param value, the address of the value to record.
1147    *
1148    * @copydetails doc_returns_success_code
1149    * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t}
1150    * @li @sbmlconstant{LIBSBML_OPERATION_FAILED, OperationReturnValues_t}
1151    */
1152   virtual int getAttribute(const std::string& attributeName, bool& value)
1153     const;
1154 
1155   /** @endcond */
1156 
1157 
1158 
1159   /** @cond doxygenLibsbmlInternal */
1160 
1161   /**
1162    * Gets the value of the "attributeName" attribute of this SampledField.
1163    *
1164    * @param attributeName, the name of the attribute to retrieve.
1165    *
1166    * @param value, the address of the value to record.
1167    *
1168    * @copydetails doc_returns_success_code
1169    * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t}
1170    * @li @sbmlconstant{LIBSBML_OPERATION_FAILED, OperationReturnValues_t}
1171    */
1172   virtual int getAttribute(const std::string& attributeName, int& value) const;
1173 
1174   /** @endcond */
1175 
1176 
1177 
1178   /** @cond doxygenLibsbmlInternal */
1179 
1180   /**
1181    * Gets the value of the "attributeName" attribute of this SampledField.
1182    *
1183    * @param attributeName, the name of the attribute to retrieve.
1184    *
1185    * @param value, the address of the value to record.
1186    *
1187    * @copydetails doc_returns_success_code
1188    * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t}
1189    * @li @sbmlconstant{LIBSBML_OPERATION_FAILED, OperationReturnValues_t}
1190    */
1191   virtual int getAttribute(const std::string& attributeName,
1192                            double& value) const;
1193 
1194   /** @endcond */
1195 
1196 
1197 
1198   /** @cond doxygenLibsbmlInternal */
1199 
1200   /**
1201    * Gets the value of the "attributeName" attribute of this SampledField.
1202    *
1203    * @param attributeName, the name of the attribute to retrieve.
1204    *
1205    * @param value, the address of the value to record.
1206    *
1207    * @copydetails doc_returns_success_code
1208    * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t}
1209    * @li @sbmlconstant{LIBSBML_OPERATION_FAILED, OperationReturnValues_t}
1210    */
1211   virtual int getAttribute(const std::string& attributeName,
1212                            unsigned int& value) const;
1213 
1214   /** @endcond */
1215 
1216 
1217 
1218   /** @cond doxygenLibsbmlInternal */
1219 
1220   /**
1221    * Gets the value of the "attributeName" attribute of this SampledField.
1222    *
1223    * @param attributeName, the name of the attribute to retrieve.
1224    *
1225    * @param value, the address of the value to record.
1226    *
1227    * @copydetails doc_returns_success_code
1228    * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t}
1229    * @li @sbmlconstant{LIBSBML_OPERATION_FAILED, OperationReturnValues_t}
1230    */
1231   virtual int getAttribute(const std::string& attributeName,
1232                            std::string& value) const;
1233 
1234   /** @endcond */
1235 
1236 
1237 
1238   /** @cond doxygenLibsbmlInternal */
1239 
1240   /**
1241    * Predicate returning @c true if this SampledField's attribute
1242    * "attributeName" is set.
1243    *
1244    * @param attributeName, the name of the attribute to query.
1245    *
1246    * @return @c true if this SampledField's attribute "attributeName" has been
1247    * set, otherwise @c false is returned.
1248    */
1249   virtual bool isSetAttribute(const std::string& attributeName) const;
1250 
1251   /** @endcond */
1252 
1253 
1254 
1255   /** @cond doxygenLibsbmlInternal */
1256 
1257   /**
1258    * Sets the value of the "attributeName" attribute of this SampledField.
1259    *
1260    * @param attributeName, the name of the attribute to set.
1261    *
1262    * @param value, the value of the attribute to set.
1263    *
1264    * @copydetails doc_returns_success_code
1265    * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t}
1266    * @li @sbmlconstant{LIBSBML_OPERATION_FAILED, OperationReturnValues_t}
1267    */
1268   virtual int setAttribute(const std::string& attributeName, bool value);
1269 
1270   /** @endcond */
1271 
1272 
1273 
1274   /** @cond doxygenLibsbmlInternal */
1275 
1276   /**
1277    * Sets the value of the "attributeName" attribute of this SampledField.
1278    *
1279    * @param attributeName, the name of the attribute to set.
1280    *
1281    * @param value, the value of the attribute to set.
1282    *
1283    * @copydetails doc_returns_success_code
1284    * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t}
1285    * @li @sbmlconstant{LIBSBML_OPERATION_FAILED, OperationReturnValues_t}
1286    */
1287   virtual int setAttribute(const std::string& attributeName, int value);
1288 
1289   /** @endcond */
1290 
1291 
1292 
1293   /** @cond doxygenLibsbmlInternal */
1294 
1295   /**
1296    * Sets the value of the "attributeName" attribute of this SampledField.
1297    *
1298    * @param attributeName, the name of the attribute to set.
1299    *
1300    * @param value, the value of the attribute to set.
1301    *
1302    * @copydetails doc_returns_success_code
1303    * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t}
1304    * @li @sbmlconstant{LIBSBML_OPERATION_FAILED, OperationReturnValues_t}
1305    */
1306   virtual int setAttribute(const std::string& attributeName, double value);
1307 
1308   /** @endcond */
1309 
1310 
1311 
1312   /** @cond doxygenLibsbmlInternal */
1313 
1314   /**
1315    * Sets the value of the "attributeName" attribute of this SampledField.
1316    *
1317    * @param attributeName, the name of the attribute to set.
1318    *
1319    * @param value, the value of the attribute to set.
1320    *
1321    * @copydetails doc_returns_success_code
1322    * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t}
1323    * @li @sbmlconstant{LIBSBML_OPERATION_FAILED, OperationReturnValues_t}
1324    */
1325   virtual int setAttribute(const std::string& attributeName,
1326                            unsigned int value);
1327 
1328   /** @endcond */
1329 
1330 
1331 
1332   /** @cond doxygenLibsbmlInternal */
1333 
1334   /**
1335    * Sets the value of the "attributeName" attribute of this SampledField.
1336    *
1337    * @param attributeName, the name of the attribute to set.
1338    *
1339    * @param value, the value of the attribute to set.
1340    *
1341    * @copydetails doc_returns_success_code
1342    * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t}
1343    * @li @sbmlconstant{LIBSBML_OPERATION_FAILED, OperationReturnValues_t}
1344    */
1345   virtual int setAttribute(const std::string& attributeName,
1346                            const std::string& value);
1347 
1348   /** @endcond */
1349 
1350 
1351 
1352   /** @cond doxygenLibsbmlInternal */
1353 
1354   /**
1355    * Unsets the value of the "attributeName" attribute of this SampledField.
1356    *
1357    * @param attributeName, the name of the attribute to query.
1358    *
1359    * @copydetails doc_returns_success_code
1360    * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t}
1361    * @li @sbmlconstant{LIBSBML_OPERATION_FAILED, OperationReturnValues_t}
1362    */
1363   virtual int unsetAttribute(const std::string& attributeName);
1364 
1365   /** @endcond */
1366 
1367 
1368 
1369 
1370   #endif /* !SWIG */
1371 
1372 
1373 protected:
1374 
1375 
1376   /** @cond doxygenLibsbmlInternal */
1377 
1378   /**
1379    * Adds the expected attributes for this element
1380    */
1381   virtual void addExpectedAttributes(ExpectedAttributes& attributes);
1382 
1383   /** @endcond */
1384 
1385 
1386 
1387   /** @cond doxygenLibsbmlInternal */
1388 
1389   /**
1390    * Reads the expected attributes into the member data variables
1391    */
1392   virtual void readAttributes(const XMLAttributes& attributes,
1393                               const ExpectedAttributes& expectedAttributes);
1394 
1395   /** @endcond */
1396 
1397 
1398 
1399   /** @cond doxygenLibsbmlInternal */
1400 
1401   /**
1402    * Writes the attributes to the stream
1403    */
1404   virtual void writeAttributes(XMLOutputStream& stream) const;
1405 
1406   /** @endcond */
1407 
1408 
1409 
1410   /** @cond doxygenLibsbmlInternal */
1411 
1412   /**
1413    * Writes the array data as a text element
1414    */
1415   virtual void setElementText(const std::string& text);
1416 
1417   /** @endcond */
1418 
1419 
1420   /** @cond doxygenLibsbmlInternal */
1421 
1422   /* Store the ArrayData string as ints, either compressed or not.*/
1423   void store() const;
1424 
1425   /* Uncompress the data, but don't store the change.*/
1426   void uncompressInternal(std::string & sampleString, size_t & length) const;
1427 
1428   /** @endcond */
1429 
1430 
1431 public:
1432 
1433  /**
1434    * Returns the number of uncompressed samples of this SampledField.
1435    * Will uncompress the samples if need be.
1436    *
1437    * @return the number of uncompressed samples of this SampledField.
1438    */
1439   unsigned int getUncompressedLength() const;
1440 
1441  /**
1442    * The samples entries of this SampledField is returned in an int array (pointer)
1443    * that is passed as argument to the method (this is needed while using SWIG to
1444    * convert int[] from C++ to Java). This method returns the uncompressed sample field.
1445    *
1446    * @return void.
1447    */
1448   void getUncompressed(double* outputSamples) const;
1449 
1450   /**
1451    * utility function freeing the compressed data.
1452    */
1453   void freeCompressed() const;
1454 
1455   /**
1456    * utility function freeing the uncompressed data.
1457    */
1458   void freeUncompressed() const;
1459 
1460   /**
1461    * If the samples stored are compressed (i.e: the flag set to DEFLATED), then
1462    * this function decompresses the samples and alters the samples, changing the
1463    * compression flag to uncompressed.
1464    *
1465    * @copydetails doc_returns_success_code
1466    * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t}
1467    * @li @sbmlconstant{LIBSBML_OPERATION_FAILED, OperationReturnValues_t}
1468    */
1469   int uncompress();
1470 
1471   /**
1472    * compresses the samples stored, if the flag is set to UNCOMPRESSED, then
1473    * changes the flag to compressed.
1474    *
1475    * Returns failure if libsbml was built without zlib linked.
1476    *
1477    * @param compression level 0 (store) ... 9 (max compression)
1478    *
1479    * @copydetails doc_returns_success_code
1480    * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t}
1481    * @li @sbmlconstant{LIBSBML_OPERATION_FAILED, OperationReturnValues_t}
1482    */
1483   int compress(int level);
1484 
1485   /**
1486    *  Returns the data of this image as uncompressed array of doubles
1487    *
1488    * @param data the output array of doubles (it will be allocated using
1489    *             malloc and will have to be freed using free)
1490    * @param length the output length of the array
1491    *
1492    */
1493   void getUncompressedData(double* &data, size_t& length);
1494 
1495 
1496 
1497 };
1498 
1499 
1500 
1501 LIBSBML_CPP_NAMESPACE_END
1502 
1503 
1504 
1505 
1506 #endif /* __cplusplus */
1507 
1508 
1509 
1510 
1511 #ifndef SWIG
1512 
1513 
1514 
1515 
1516 LIBSBML_CPP_NAMESPACE_BEGIN
1517 
1518 
1519 
1520 
1521 BEGIN_C_DECLS
1522 
1523 
1524 /**
1525  * Creates a new SampledField_t using the given SBML Level, Version and
1526  * &ldquo;spatial&rdquo; package version.
1527  *
1528  * @param level an unsigned int, the SBML Level to assign to this
1529  * SampledField_t.
1530  *
1531  * @param version an unsigned int, the SBML Version to assign to this
1532  * SampledField_t.
1533  *
1534  * @param pkgVersion an unsigned int, the SBML Spatial Version to assign to
1535  * this SampledField_t.
1536  *
1537  * @copydetails doc_note_setting_lv_pkg
1538  *
1539  * @copydetails doc_returned_owned_pointer
1540  *
1541  * @memberof SampledField_t
1542  */
1543 LIBSBML_EXTERN
1544 SampledField_t *
1545 SampledField_create(unsigned int level,
1546                     unsigned int version,
1547                     unsigned int pkgVersion);
1548 
1549 
1550 /**
1551  * Creates and returns a deep copy of this SampledField_t object.
1552  *
1553  * @param sf the SampledField_t structure.
1554  *
1555  * @return a (deep) copy of this SampledField_t object.
1556  *
1557  * @copydetails doc_returned_owned_pointer
1558  *
1559  * @memberof SampledField_t
1560  */
1561 LIBSBML_EXTERN
1562 SampledField_t*
1563 SampledField_clone(const SampledField_t* sf);
1564 
1565 
1566 /**
1567  * Frees this SampledField_t object.
1568  *
1569  * @param sf the SampledField_t structure.
1570  *
1571  * @memberof SampledField_t
1572  */
1573 LIBSBML_EXTERN
1574 void
1575 SampledField_free(SampledField_t* sf);
1576 
1577 
1578 /**
1579  * Returns the value of the "id" attribute of this SampledField_t.
1580  *
1581  * @param sf the SampledField_t structure whose id is sought.
1582  *
1583  * @return the value of the "id" attribute of this SampledField_t as a pointer
1584  * to a string.
1585  *
1586  * @copydetails doc_returned_owned_char
1587  *
1588  * @memberof SampledField_t
1589  */
1590 LIBSBML_EXTERN
1591 char *
1592 SampledField_getId(const SampledField_t * sf);
1593 
1594 
1595 /**
1596  * Returns the value of the "name" attribute of this SampledField_t.
1597  *
1598  * @param sf the SampledField_t structure whose name is sought.
1599  *
1600  * @return the value of the "name" attribute of this SampledField_t as a
1601  * pointer to a string.
1602  *
1603  * @copydetails doc_returned_owned_char
1604  *
1605  * @memberof SampledField_t
1606  */
1607 LIBSBML_EXTERN
1608 char *
1609 SampledField_getName(const SampledField_t * sf);
1610 
1611 
1612 /**
1613  * Returns the value of the "dataType" attribute of this SampledField_t.
1614  *
1615  * @param sf the SampledField_t structure whose dataType is sought.
1616  *
1617  * @return the value of the "dataType" attribute of this SampledField_t as a
1618  * DataKind_t.
1619  *
1620  * @copydetails doc_sampledfield_dataType
1621  * @if clike The value is drawn from the enumeration @ref DataKind_t @endif
1622  * The possible values returned by this method are:
1623  * @li @sbmlconstant{SPATIAL_DATAKIND_UINT, DataKind_t}
1624  * @li @sbmlconstant{SPATIAL_DATAKIND_INT, DataKind_t}
1625  * @li @sbmlconstant{SPATIAL_DATAKIND_DOUBLE, DataKind_t}
1626  * @li @sbmlconstant{SPATIAL_DATAKIND_FLOAT, DataKind_t}
1627  * @li @sbmlconstant{SPATIAL_DATAKIND_UINT8, DataKind_t}
1628  * @li @sbmlconstant{SPATIAL_DATAKIND_UINT16, DataKind_t}
1629  * @li @sbmlconstant{SPATIAL_DATAKIND_UINT32, DataKind_t}
1630  * @li @sbmlconstant{SPATIAL_DATAKIND_INVALID, DataKind_t}
1631  *
1632  * @memberof SampledField_t
1633  */
1634 LIBSBML_EXTERN
1635 DataKind_t
1636 SampledField_getDataType(const SampledField_t * sf);
1637 
1638 
1639 /**
1640  * Returns the value of the "dataType" attribute of this SampledField_t.
1641  *
1642  * @param sf the SampledField_t structure whose dataType is sought.
1643  *
1644  * @return the value of the "dataType" attribute of this SampledField_t as a
1645  * const char *.
1646  *
1647  * @copydetails doc_returned_unowned_char
1648  *
1649  * @copydetails doc_sampledfield_dataType
1650  * The possible values returned by this method are:
1651  * @li @c "uint"
1652  * @li @c "int"
1653  * @li @c "double"
1654  * @li @c "float"
1655  * @li @c "uint8"
1656  * @li @c "uint16"
1657  * @li @c "uint32"
1658  * @li @c "invalid DataKind value"
1659  *
1660  * @memberof SampledField_t
1661  */
1662 LIBSBML_EXTERN
1663 char *
1664 SampledField_getDataTypeAsString(const SampledField_t * sf);
1665 
1666 
1667 /**
1668  * Returns the value of the "numSamples1" attribute of this SampledField_t.
1669  *
1670  * @param sf the SampledField_t structure whose numSamples1 is sought.
1671  *
1672  * @return the value of the "numSamples1" attribute of this SampledField_t as a
1673  * integer.
1674  *
1675  * @memberof SampledField_t
1676  */
1677 LIBSBML_EXTERN
1678 int
1679 SampledField_getNumSamples1(const SampledField_t * sf);
1680 
1681 
1682 /**
1683  * Returns the value of the "numSamples2" attribute of this SampledField_t.
1684  *
1685  * @param sf the SampledField_t structure whose numSamples2 is sought.
1686  *
1687  * @return the value of the "numSamples2" attribute of this SampledField_t as a
1688  * integer.
1689  *
1690  * @memberof SampledField_t
1691  */
1692 LIBSBML_EXTERN
1693 int
1694 SampledField_getNumSamples2(const SampledField_t * sf);
1695 
1696 
1697 /**
1698  * Returns the value of the "numSamples3" attribute of this SampledField_t.
1699  *
1700  * @param sf the SampledField_t structure whose numSamples3 is sought.
1701  *
1702  * @return the value of the "numSamples3" attribute of this SampledField_t as a
1703  * integer.
1704  *
1705  * @memberof SampledField_t
1706  */
1707 LIBSBML_EXTERN
1708 int
1709 SampledField_getNumSamples3(const SampledField_t * sf);
1710 
1711 
1712 /**
1713  * Returns the value of the "interpolationType" attribute of this
1714  * SampledField_t.
1715  *
1716  * @param sf the SampledField_t structure whose interpolationType is sought.
1717  *
1718  * @return the value of the "interpolationType" attribute of this
1719  * SampledField_t as a InterpolationKind_t.
1720  *
1721  * @copydetails doc_sampledfield_interpolationType
1722  * @if clike The value is drawn from the enumeration @ref InterpolationKind_t
1723  * @endif
1724  * The possible values returned by this method are:
1725  * @li @sbmlconstant{SPATIAL_INTERPOLATIONKIND_NEARESTNEIGHBOR,
1726  * InterpolationKind_t}
1727  * @li @sbmlconstant{SPATIAL_INTERPOLATIONKIND_LINEAR, InterpolationKind_t}
1728  * @li @sbmlconstant{SPATIAL_INTERPOLATIONKIND_INVALID, InterpolationKind_t}
1729  *
1730  * @memberof SampledField_t
1731  */
1732 LIBSBML_EXTERN
1733 InterpolationKind_t
1734 SampledField_getInterpolationType(const SampledField_t * sf);
1735 
1736 
1737 /**
1738  * Returns the value of the "interpolationType" attribute of this
1739  * SampledField_t.
1740  *
1741  * @param sf the SampledField_t structure whose interpolationType is sought.
1742  *
1743  * @return the value of the "interpolationType" attribute of this
1744  * SampledField_t as a const char *.
1745  *
1746  * @copydetails doc_returned_unowned_char
1747  *
1748  * @copydetails doc_sampledfield_interpolationType
1749  * The possible values returned by this method are:
1750  * @li @c "nearestNeighbor"
1751  * @li @c "linear"
1752  * @li @c "invalid InterpolationKind value"
1753  *
1754  * @memberof SampledField_t
1755  */
1756 LIBSBML_EXTERN
1757 char *
1758 SampledField_getInterpolationTypeAsString(const SampledField_t * sf);
1759 
1760 
1761 /**
1762  * Returns the value of the "compression" attribute of this SampledField_t.
1763  *
1764  * @param sf the SampledField_t structure whose compression is sought.
1765  *
1766  * @return the value of the "compression" attribute of this SampledField_t as a
1767  * CompressionKind_t.
1768  *
1769  * @copydetails doc_sampledfield_compression
1770  * @if clike The value is drawn from the enumeration @ref CompressionKind_t
1771  * @endif
1772  * The possible values returned by this method are:
1773  * @li @sbmlconstant{SPATIAL_COMPRESSIONKIND_UNCOMPRESSED, CompressionKind_t}
1774  * @li @sbmlconstant{SPATIAL_COMPRESSIONKIND_DEFLATED, CompressionKind_t}
1775  * @li @sbmlconstant{SPATIAL_COMPRESSIONKIND_INVALID, CompressionKind_t}
1776  *
1777  * @memberof SampledField_t
1778  */
1779 LIBSBML_EXTERN
1780 CompressionKind_t
1781 SampledField_getCompression(const SampledField_t * sf);
1782 
1783 
1784 /**
1785  * Returns the value of the "compression" attribute of this SampledField_t.
1786  *
1787  * @param sf the SampledField_t structure whose compression is sought.
1788  *
1789  * @return the value of the "compression" attribute of this SampledField_t as a
1790  * const char *.
1791  *
1792  * @copydetails doc_returned_unowned_char
1793  *
1794  * @copydetails doc_sampledfield_compression
1795  * The possible values returned by this method are:
1796  * @li @c "uncompressed"
1797  * @li @c "deflated"
1798  * @li @c "invalid CompressionKind value"
1799  *
1800  * @memberof SampledField_t
1801  */
1802 LIBSBML_EXTERN
1803 char *
1804 SampledField_getCompressionAsString(const SampledField_t * sf);
1805 
1806 
1807 /**
1808  * Returns the value of the "samplesLength" attribute of this SampledField_t.
1809  *
1810  * @param sf the SampledField_t structure whose samplesLength is sought.
1811  *
1812  * @return the value of the "samplesLength" attribute of this SampledField_t as
1813  * a integer.
1814  *
1815  * @memberof SampledField_t
1816  */
1817 LIBSBML_EXTERN
1818 int
1819 SampledField_getSamplesLength(const SampledField_t * sf);
1820 
1821 
1822 /**
1823  * Predicate returning @c 1 (true) if this SampledField_t's "id" attribute is
1824  * set.
1825  *
1826  * @param sf the SampledField_t structure.
1827  *
1828  * @return @c 1 (true) if this SampledField_t's "id" attribute has been set,
1829  * otherwise @c 0 (false) is returned.
1830  *
1831  * @memberof SampledField_t
1832  */
1833 LIBSBML_EXTERN
1834 int
1835 SampledField_isSetId(const SampledField_t * sf);
1836 
1837 
1838 /**
1839  * Predicate returning @c 1 (true) if this SampledField_t's "name" attribute is
1840  * set.
1841  *
1842  * @param sf the SampledField_t structure.
1843  *
1844  * @return @c 1 (true) if this SampledField_t's "name" attribute has been set,
1845  * otherwise @c 0 (false) is returned.
1846  *
1847  * @memberof SampledField_t
1848  */
1849 LIBSBML_EXTERN
1850 int
1851 SampledField_isSetName(const SampledField_t * sf);
1852 
1853 
1854 /**
1855  * Predicate returning @c 1 (true) if this SampledField_t's "dataType"
1856  * attribute is set.
1857  *
1858  * @param sf the SampledField_t structure.
1859  *
1860  * @return @c 1 (true) if this SampledField_t's "dataType" attribute has been
1861  * set, otherwise @c 0 (false) is returned.
1862  *
1863  * @copydetails doc_sampledfield_dataType
1864  *
1865  * @memberof SampledField_t
1866  */
1867 LIBSBML_EXTERN
1868 int
1869 SampledField_isSetDataType(const SampledField_t * sf);
1870 
1871 
1872 /**
1873  * Predicate returning @c 1 (true) if this SampledField_t's "numSamples1"
1874  * attribute is set.
1875  *
1876  * @param sf the SampledField_t structure.
1877  *
1878  * @return @c 1 (true) if this SampledField_t's "numSamples1" attribute has
1879  * been set, otherwise @c 0 (false) is returned.
1880  *
1881  * @memberof SampledField_t
1882  */
1883 LIBSBML_EXTERN
1884 int
1885 SampledField_isSetNumSamples1(const SampledField_t * sf);
1886 
1887 
1888 /**
1889  * Predicate returning @c 1 (true) if this SampledField_t's "numSamples2"
1890  * attribute is set.
1891  *
1892  * @param sf the SampledField_t structure.
1893  *
1894  * @return @c 1 (true) if this SampledField_t's "numSamples2" attribute has
1895  * been set, otherwise @c 0 (false) is returned.
1896  *
1897  * @memberof SampledField_t
1898  */
1899 LIBSBML_EXTERN
1900 int
1901 SampledField_isSetNumSamples2(const SampledField_t * sf);
1902 
1903 
1904 /**
1905  * Predicate returning @c 1 (true) if this SampledField_t's "numSamples3"
1906  * attribute is set.
1907  *
1908  * @param sf the SampledField_t structure.
1909  *
1910  * @return @c 1 (true) if this SampledField_t's "numSamples3" attribute has
1911  * been set, otherwise @c 0 (false) is returned.
1912  *
1913  * @memberof SampledField_t
1914  */
1915 LIBSBML_EXTERN
1916 int
1917 SampledField_isSetNumSamples3(const SampledField_t * sf);
1918 
1919 
1920 /**
1921  * Predicate returning @c 1 (true) if this SampledField_t's "interpolationType"
1922  * attribute is set.
1923  *
1924  * @param sf the SampledField_t structure.
1925  *
1926  * @return @c 1 (true) if this SampledField_t's "interpolationType" attribute
1927  * has been set, otherwise @c 0 (false) is returned.
1928  *
1929  * @copydetails doc_sampledfield_interpolationType
1930  *
1931  * @memberof SampledField_t
1932  */
1933 LIBSBML_EXTERN
1934 int
1935 SampledField_isSetInterpolationType(const SampledField_t * sf);
1936 
1937 
1938 /**
1939  * Predicate returning @c 1 (true) if this SampledField_t's "compression"
1940  * attribute is set.
1941  *
1942  * @param sf the SampledField_t structure.
1943  *
1944  * @return @c 1 (true) if this SampledField_t's "compression" attribute has
1945  * been set, otherwise @c 0 (false) is returned.
1946  *
1947  * @copydetails doc_sampledfield_compression
1948  *
1949  * @memberof SampledField_t
1950  */
1951 LIBSBML_EXTERN
1952 int
1953 SampledField_isSetCompression(const SampledField_t * sf);
1954 
1955 
1956 /**
1957  * Predicate returning @c 1 (true) if this SampledField_t's samples entries
1958  * is set.
1959  *
1960  * @param sf the SampledField_t structure.
1961  *
1962  * @return @c 1 (true) if this SampledField_t's samples entries has been
1963  * set, otherwise @c 0 (false) is returned.
1964  *
1965  * @memberof SampledField_t
1966  */
1967 LIBSBML_EXTERN
1968 int
1969 SampledField_isSetSamples(const SampledField_t * sf);
1970 
1971 
1972 /**
1973  * Predicate returning @c 1 (true) if this SampledField_t's "samplesLength"
1974  * attribute is set.
1975  *
1976  * @param sf the SampledField_t structure.
1977  *
1978  * @return @c 1 (true) if this SampledField_t's "samplesLength" attribute has
1979  * been set, otherwise @c 0 (false) is returned.
1980  *
1981  * @memberof SampledField_t
1982  */
1983 LIBSBML_EXTERN
1984 int
1985 SampledField_isSetSamplesLength(const SampledField_t * sf);
1986 
1987 
1988 /**
1989  * Sets the value of the "id" attribute of this SampledField_t.
1990  *
1991  * @param sf the SampledField_t structure.
1992  *
1993  * @param id const char * value of the "id" attribute to be set.
1994  *
1995  * @copydetails doc_returns_success_code
1996  * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t}
1997  * @li @sbmlconstant{LIBSBML_INVALID_ATTRIBUTE_VALUE, OperationReturnValues_t}
1998  * @li @sbmlconstant{LIBSBML_INVALID_OBJECT, OperationReturnValues_t}
1999  *
2000  * Calling this function with @p id = @c NULL or an empty string is equivalent
2001  * to calling SampledField_unsetId().
2002  *
2003  * @memberof SampledField_t
2004  */
2005 LIBSBML_EXTERN
2006 int
2007 SampledField_setId(SampledField_t * sf, const char * id);
2008 
2009 
2010 /**
2011  * Sets the value of the "name" attribute of this SampledField_t.
2012  *
2013  * @param sf the SampledField_t structure.
2014  *
2015  * @param name const char * value of the "name" attribute to be set.
2016  *
2017  * @copydetails doc_returns_success_code
2018  * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t}
2019  * @li @sbmlconstant{LIBSBML_INVALID_OBJECT, OperationReturnValues_t}
2020  *
2021  * Calling this function with @p name = @c NULL or an empty string is
2022  * equivalent to calling SampledField_unsetName().
2023  *
2024  * @memberof SampledField_t
2025  */
2026 LIBSBML_EXTERN
2027 int
2028 SampledField_setName(SampledField_t * sf, const char * name);
2029 
2030 
2031 /**
2032  * Sets the value of the "dataType" attribute of this SampledField_t.
2033  *
2034  * @param sf the SampledField_t structure.
2035  *
2036  * @param dataType DataKind_t value of the "dataType" attribute to be set.
2037  *
2038  * @copydetails doc_returns_success_code
2039  * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t}
2040  * @li @sbmlconstant{LIBSBML_INVALID_ATTRIBUTE_VALUE, OperationReturnValues_t}
2041  * @li @sbmlconstant{LIBSBML_INVALID_OBJECT, OperationReturnValues_t}
2042  *
2043  * @copydetails doc_sampledfield_dataType
2044  *
2045  * @memberof SampledField_t
2046  */
2047 LIBSBML_EXTERN
2048 int
2049 SampledField_setDataType(SampledField_t * sf, DataKind_t dataType);
2050 
2051 
2052 /**
2053  * Sets the value of the "dataType" attribute of this SampledField_t.
2054  *
2055  * @param sf the SampledField_t structure.
2056  *
2057  * @param dataType const char * of the "dataType" attribute to be set.
2058  *
2059  * @copydetails doc_returns_success_code
2060  * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t}
2061  * @li @sbmlconstant{LIBSBML_INVALID_ATTRIBUTE_VALUE, OperationReturnValues_t}
2062  * @li @sbmlconstant{LIBSBML_INVALID_OBJECT, OperationReturnValues_t}
2063  *
2064  * @copydetails doc_sampledfield_dataType
2065  *
2066  * @memberof SampledField_t
2067  */
2068 LIBSBML_EXTERN
2069 int
2070 SampledField_setDataTypeAsString(SampledField_t * sf, const char * dataType);
2071 
2072 
2073 /**
2074  * Sets the value of the "numSamples1" attribute of this SampledField_t.
2075  *
2076  * @param sf the SampledField_t structure.
2077  *
2078  * @param numSamples1 int value of the "numSamples1" attribute to be set.
2079  *
2080  * @copydetails doc_returns_success_code
2081  * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t}
2082  * @li @sbmlconstant{LIBSBML_INVALID_ATTRIBUTE_VALUE, OperationReturnValues_t}
2083  * @li @sbmlconstant{LIBSBML_INVALID_OBJECT, OperationReturnValues_t}
2084  *
2085  * @memberof SampledField_t
2086  */
2087 LIBSBML_EXTERN
2088 int
2089 SampledField_setNumSamples1(SampledField_t * sf, int numSamples1);
2090 
2091 
2092 /**
2093  * Sets the value of the "numSamples2" attribute of this SampledField_t.
2094  *
2095  * @param sf the SampledField_t structure.
2096  *
2097  * @param numSamples2 int value of the "numSamples2" attribute to be set.
2098  *
2099  * @copydetails doc_returns_success_code
2100  * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t}
2101  * @li @sbmlconstant{LIBSBML_INVALID_ATTRIBUTE_VALUE, OperationReturnValues_t}
2102  * @li @sbmlconstant{LIBSBML_INVALID_OBJECT, OperationReturnValues_t}
2103  *
2104  * @memberof SampledField_t
2105  */
2106 LIBSBML_EXTERN
2107 int
2108 SampledField_setNumSamples2(SampledField_t * sf, int numSamples2);
2109 
2110 
2111 /**
2112  * Sets the value of the "numSamples3" attribute of this SampledField_t.
2113  *
2114  * @param sf the SampledField_t structure.
2115  *
2116  * @param numSamples3 int value of the "numSamples3" attribute to be set.
2117  *
2118  * @copydetails doc_returns_success_code
2119  * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t}
2120  * @li @sbmlconstant{LIBSBML_INVALID_ATTRIBUTE_VALUE, OperationReturnValues_t}
2121  * @li @sbmlconstant{LIBSBML_INVALID_OBJECT, OperationReturnValues_t}
2122  *
2123  * @memberof SampledField_t
2124  */
2125 LIBSBML_EXTERN
2126 int
2127 SampledField_setNumSamples3(SampledField_t * sf, int numSamples3);
2128 
2129 
2130 /**
2131  * Sets the value of the "interpolationType" attribute of this SampledField_t.
2132  *
2133  * @param sf the SampledField_t structure.
2134  *
2135  * @param interpolationType InterpolationKind_t value of the
2136  * "interpolationType" attribute to be set.
2137  *
2138  * @copydetails doc_returns_success_code
2139  * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t}
2140  * @li @sbmlconstant{LIBSBML_INVALID_ATTRIBUTE_VALUE, OperationReturnValues_t}
2141  * @li @sbmlconstant{LIBSBML_INVALID_OBJECT, OperationReturnValues_t}
2142  *
2143  * @copydetails doc_sampledfield_interpolationType
2144  *
2145  * @memberof SampledField_t
2146  */
2147 LIBSBML_EXTERN
2148 int
2149 SampledField_setInterpolationType(SampledField_t * sf,
2150                                   InterpolationKind_t interpolationType);
2151 
2152 
2153 /**
2154  * Sets the value of the "interpolationType" attribute of this SampledField_t.
2155  *
2156  * @param sf the SampledField_t structure.
2157  *
2158  * @param interpolationType const char * of the "interpolationType" attribute
2159  * to be set.
2160  *
2161  * @copydetails doc_returns_success_code
2162  * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t}
2163  * @li @sbmlconstant{LIBSBML_INVALID_ATTRIBUTE_VALUE, OperationReturnValues_t}
2164  * @li @sbmlconstant{LIBSBML_INVALID_OBJECT, OperationReturnValues_t}
2165  *
2166  * @copydetails doc_sampledfield_interpolationType
2167  *
2168  * @memberof SampledField_t
2169  */
2170 LIBSBML_EXTERN
2171 int
2172 SampledField_setInterpolationTypeAsString(SampledField_t * sf,
2173                                           const char * interpolationType);
2174 
2175 
2176 /**
2177  * Sets the value of the "compression" attribute of this SampledField_t.
2178  *
2179  * @param sf the SampledField_t structure.
2180  *
2181  * @param compression CompressionKind_t value of the "compression" attribute to
2182  * be set.
2183  *
2184  * @copydetails doc_returns_success_code
2185  * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t}
2186  * @li @sbmlconstant{LIBSBML_INVALID_ATTRIBUTE_VALUE, OperationReturnValues_t}
2187  * @li @sbmlconstant{LIBSBML_INVALID_OBJECT, OperationReturnValues_t}
2188  *
2189  * @copydetails doc_sampledfield_compression
2190  *
2191  * @memberof SampledField_t
2192  */
2193 LIBSBML_EXTERN
2194 int
2195 SampledField_setCompression(SampledField_t * sf,
2196                             CompressionKind_t compression);
2197 
2198 
2199 /**
2200  * Sets the value of the "compression" attribute of this SampledField_t.
2201  *
2202  * @param sf the SampledField_t structure.
2203  *
2204  * @param compression const char * of the "compression" attribute to be set.
2205  *
2206  * @copydetails doc_returns_success_code
2207  * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t}
2208  * @li @sbmlconstant{LIBSBML_INVALID_ATTRIBUTE_VALUE, OperationReturnValues_t}
2209  * @li @sbmlconstant{LIBSBML_INVALID_OBJECT, OperationReturnValues_t}
2210  *
2211  * @copydetails doc_sampledfield_compression
2212  *
2213  * @memberof SampledField_t
2214  */
2215 LIBSBML_EXTERN
2216 int
2217 SampledField_setCompressionAsString(SampledField_t * sf,
2218                                     const char * compression);
2219 
2220 
2221 /**
2222  * Sets the value of the samples entries of this SampledField_t.
2223  *
2224  * @param sf the SampledField_t structure.
2225  *
2226  * @param samples pointer value of the samples entries to be set.
2227  *
2228  * @param arrayLength int value for the length of the samples entries to be
2229  * set.
2230  *
2231  * @copydetails doc_returns_success_code
2232  * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t}
2233  * @li @sbmlconstant{LIBSBML_INVALID_ATTRIBUTE_VALUE, OperationReturnValues_t}
2234  *
2235  * @memberof SampledField_t
2236  */
2237 LIBSBML_EXTERN
2238 int
2239 SampledField_setSamples(SampledField_t* sf, int* samples, int arrayLength);
2240 
2241 
2242 /**
2243  * Sets the value of the "samplesLength" attribute of this SampledField_t.
2244  *
2245  * @param sf the SampledField_t structure.
2246  *
2247  * @param samplesLength int value of the "samplesLength" attribute to be set.
2248  *
2249  * @copydetails doc_returns_success_code
2250  * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t}
2251  * @li @sbmlconstant{LIBSBML_INVALID_ATTRIBUTE_VALUE, OperationReturnValues_t}
2252  * @li @sbmlconstant{LIBSBML_INVALID_OBJECT, OperationReturnValues_t}
2253  *
2254  * @memberof SampledField_t
2255  */
2256 LIBSBML_EXTERN
2257 int
2258 SampledField_setSamplesLength(SampledField_t * sf, int samplesLength);
2259 
2260 
2261 /**
2262  * Unsets the value of the "id" attribute of this SampledField_t.
2263  *
2264  * @param sf the SampledField_t structure.
2265  *
2266  * @copydetails doc_returns_success_code
2267  * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t}
2268  * @li @sbmlconstant{LIBSBML_OPERATION_FAILED, OperationReturnValues_t}
2269  * @li @sbmlconstant{LIBSBML_INVALID_OBJECT, OperationReturnValues_t}
2270  *
2271  * @memberof SampledField_t
2272  */
2273 LIBSBML_EXTERN
2274 int
2275 SampledField_unsetId(SampledField_t * sf);
2276 
2277 
2278 /**
2279  * Unsets the value of the "name" attribute of this SampledField_t.
2280  *
2281  * @param sf the SampledField_t structure.
2282  *
2283  * @copydetails doc_returns_success_code
2284  * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t}
2285  * @li @sbmlconstant{LIBSBML_OPERATION_FAILED, OperationReturnValues_t}
2286  * @li @sbmlconstant{LIBSBML_INVALID_OBJECT, OperationReturnValues_t}
2287  *
2288  * @memberof SampledField_t
2289  */
2290 LIBSBML_EXTERN
2291 int
2292 SampledField_unsetName(SampledField_t * sf);
2293 
2294 
2295 /**
2296  * Unsets the value of the "dataType" attribute of this SampledField_t.
2297  *
2298  * @param sf the SampledField_t structure.
2299  *
2300  * @copydetails doc_returns_success_code
2301  * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t}
2302  * @li @sbmlconstant{LIBSBML_INVALID_OBJECT, OperationReturnValues_t}
2303  *
2304  * @copydetails doc_sampledfield_dataType
2305  *
2306  * @memberof SampledField_t
2307  */
2308 LIBSBML_EXTERN
2309 int
2310 SampledField_unsetDataType(SampledField_t * sf);
2311 
2312 
2313 /**
2314  * Unsets the value of the "numSamples1" attribute of this SampledField_t.
2315  *
2316  * @param sf the SampledField_t structure.
2317  *
2318  * @copydetails doc_returns_success_code
2319  * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t}
2320  * @li @sbmlconstant{LIBSBML_OPERATION_FAILED, OperationReturnValues_t}
2321  * @li @sbmlconstant{LIBSBML_INVALID_OBJECT, OperationReturnValues_t}
2322  *
2323  * @memberof SampledField_t
2324  */
2325 LIBSBML_EXTERN
2326 int
2327 SampledField_unsetNumSamples1(SampledField_t * sf);
2328 
2329 
2330 /**
2331  * Unsets the value of the "numSamples2" attribute of this SampledField_t.
2332  *
2333  * @param sf the SampledField_t structure.
2334  *
2335  * @copydetails doc_returns_success_code
2336  * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t}
2337  * @li @sbmlconstant{LIBSBML_OPERATION_FAILED, OperationReturnValues_t}
2338  * @li @sbmlconstant{LIBSBML_INVALID_OBJECT, OperationReturnValues_t}
2339  *
2340  * @memberof SampledField_t
2341  */
2342 LIBSBML_EXTERN
2343 int
2344 SampledField_unsetNumSamples2(SampledField_t * sf);
2345 
2346 
2347 /**
2348  * Unsets the value of the "numSamples3" attribute of this SampledField_t.
2349  *
2350  * @param sf the SampledField_t structure.
2351  *
2352  * @copydetails doc_returns_success_code
2353  * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t}
2354  * @li @sbmlconstant{LIBSBML_OPERATION_FAILED, OperationReturnValues_t}
2355  * @li @sbmlconstant{LIBSBML_INVALID_OBJECT, OperationReturnValues_t}
2356  *
2357  * @memberof SampledField_t
2358  */
2359 LIBSBML_EXTERN
2360 int
2361 SampledField_unsetNumSamples3(SampledField_t * sf);
2362 
2363 
2364 /**
2365  * Unsets the value of the "interpolationType" attribute of this
2366  * SampledField_t.
2367  *
2368  * @param sf the SampledField_t structure.
2369  *
2370  * @copydetails doc_returns_success_code
2371  * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t}
2372  * @li @sbmlconstant{LIBSBML_INVALID_OBJECT, OperationReturnValues_t}
2373  *
2374  * @copydetails doc_sampledfield_interpolationType
2375  *
2376  * @memberof SampledField_t
2377  */
2378 LIBSBML_EXTERN
2379 int
2380 SampledField_unsetInterpolationType(SampledField_t * sf);
2381 
2382 
2383 /**
2384  * Unsets the value of the "compression" attribute of this SampledField_t.
2385  *
2386  * @param sf the SampledField_t structure.
2387  *
2388  * @copydetails doc_returns_success_code
2389  * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t}
2390  * @li @sbmlconstant{LIBSBML_INVALID_OBJECT, OperationReturnValues_t}
2391  *
2392  * @copydetails doc_sampledfield_compression
2393  *
2394  * @memberof SampledField_t
2395  */
2396 LIBSBML_EXTERN
2397 int
2398 SampledField_unsetCompression(SampledField_t * sf);
2399 
2400 
2401 /**
2402  * Unsets the value of the samples entries of this SampledField_t.
2403  *
2404  * @param sf the SampledField_t structure.
2405  *
2406  * @copydetails doc_returns_success_code
2407  * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t}
2408  * @li @sbmlconstant{LIBSBML_OPERATION_FAILED, OperationReturnValues_t}
2409  * @li @sbmlconstant{LIBSBML_INVALID_OBJECT, OperationReturnValues_t}
2410  *
2411  * @memberof SampledField_t
2412  */
2413 LIBSBML_EXTERN
2414 int
2415 SampledField_unsetSamples(SampledField_t * sf);
2416 
2417 
2418 /**
2419  * Unsets the value of the "samplesLength" attribute of this SampledField_t.
2420  *
2421  * @param sf the SampledField_t structure.
2422  *
2423  * @copydetails doc_returns_success_code
2424  * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t}
2425  * @li @sbmlconstant{LIBSBML_OPERATION_FAILED, OperationReturnValues_t}
2426  * @li @sbmlconstant{LIBSBML_INVALID_OBJECT, OperationReturnValues_t}
2427  *
2428  * @memberof SampledField_t
2429  */
2430 LIBSBML_EXTERN
2431 int
2432 SampledField_unsetSamplesLength(SampledField_t * sf);
2433 
2434 
2435 /**
2436  * Predicate returning @c 1 (true) if all the required attributes for this
2437  * SampledField_t object have been set.
2438  *
2439  * @param sf the SampledField_t structure.
2440  *
2441  * @return @c 1 (true) to indicate that all the required attributes of this
2442  * SampledField_t have been set, otherwise @c 0 (false) is returned.
2443  *
2444  *
2445  * @note The required attributes for the SampledField_t object are:
2446  * @li "id"
2447  * @li "dataType"
2448  * @li "numSamples1"
2449  * @li "interpolationType"
2450  * @li "compression"
2451  * @li "samples"
2452  * @li "samplesLength"
2453  *
2454  * @memberof SampledField_t
2455  */
2456 LIBSBML_EXTERN
2457 int
2458 SampledField_hasRequiredAttributes(const SampledField_t * sf);
2459 
2460 
2461 
2462 
2463 END_C_DECLS
2464 
2465 
2466 
2467 
2468 LIBSBML_CPP_NAMESPACE_END
2469 
2470 
2471 
2472 
2473 #endif /* !SWIG */
2474 
2475 
2476 
2477 
2478 #endif /* !SampledField_H__ */
2479 
2480 
2481