NetCDF4 C++ API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
NcDouble.h
Go to the documentation of this file.
1 
16 #ifndef INC_netcdf_NcDouble_h
17 #define INC_netcdf_NcDouble_h
18 
19 #include "NcType.h"
20 
21 namespace netcdf {
22 
23  class NcDouble : public NcType
24  {
25  public:
26  typedef double value_type;
27  typedef std::vector<value_type> vector_type;
28 
29  NcDouble();
30 
31  static value_type FillValue () { return fillValue; }
32  static value_type MinValue () { return minValue; }
33  static value_type MaxValue () { return maxValue; }
34  static std::size_t SizeOf () { return sizeof(value_type); }
35 
36  void Get (
37  int const groupID,
38  int const varID,
39  vector_type & data );
40 
41 // void Get ( ///< read a single value at indices
42 // int const groupID, ///< group ID
43 // int const varID, ///< variable ID
44 // TVecIndex const & indices, ///< indices at which to read
45 // value_type & data); ///< receives value
46 
47  void Get (
48  int const groupID,
49  int const varID,
50  TVecIndex const & start,
51  TVecIndex const & count,
52  vector_type & data);
53 
54 // void Get ( ///< read a subsampled (strided) section
55 // int const groupID, ///< group ID
56 // int const varID, ///< variable ID
57 // TVecIndex const & start, ///< zero-based index to start reading
58 // TVecIndex const & count, ///< count along each dimension (>= 1)
59 // TVecStride const & stride, ///< interval along each dimension
60 // vector_type & data); ///< vector to receive data values
61 
62 // void Get ( ///< read a mapped array section
63 // int const groupID, ///< group ID
64 // int const varID, ///< variable ID
65 // TVecIndex const & start, ///< zero-based index to start reading
66 // TVecIndex const & count, ///< count along each dimension (>= 1)
67 // TVecStride const & stride, ///< interval along each dimension
68 // TVecStride const & imap, ///< mapping intervals for each dimension (see NetCDF doc)
69 // vector_type & data); ///< vector to receive data values
70 
71  void Put (
72  int const groupID,
73  int const varID,
74  vector_type const & data );
75 
76 // void Put ( ///< write an array of values
77 // int const groupID, ///< group ID
78 // int const varID, ///< variable ID
79 // TVecIndex const & indices, ///< indices at which to write
80 // value_type const & data); ///< value to write
81 
82  void Put (
83  int const groupID,
84  int const varID,
85  TVecIndex const & start,
86  TVecIndex const & count,
87  vector_type const & data);
88 
89 // void Put ( ///< write a subsampled (strided) section
90 // int const groupID, ///< group ID
91 // int const varID, ///< variable ID
92 // TVecIndex const & start, ///< zero-based index to start write
93 // TVecIndex const & count, ///< count along each dimension (>= 1)
94 // TVecStride const & stride, ///< interval along each dimension
95 // vector_type const & data); ///< vector of values to write
96 
97 // void Put ( ///< write a mapped array section
98 // int const groupID, ///< group ID
99 // int const varID, ///< variable ID
100 // TVecIndex const & start, ///< zero-based index to start reading
101 // TVecIndex const & count, ///< count along each dimension (>= 1)
102 // TVecStride const & stride, ///< interval along each dimension
103 // TVecStride const & imap, ///< mapping intervals for each dimension (see NetCDF doc)
104 // vector_type const & data); ///< vector of values to write
105 
106  private:
107 
108  static char const * const myTypeName;
109  static value_type const fillValue; // = NC_FILL_DOUBLE;
110  static value_type const minValue; // = NC_MIN_DOUBLE;
111  static value_type const maxValue; // = NC_MAX_DOUBLE;
112 
113  };
114 
116  extern NcDouble ncDouble;
117 
118 } // namespace netcdf
119 #endif
Represents a netCDF atomic Double type.
Definition: NcDouble.h:23
std::vector< value_type > vector_type
Definition: NcDouble.h:27
void Put(int const groupID, int const varID, vector_type const &data)
data to write
Definition: NcDouble.cpp:92
static value_type MaxValue()
Definition: NcDouble.h:33
std::vector< std::size_t > TVecIndex
Definition: NcType.h:43
static std::size_t SizeOf()
Definition: NcDouble.h:34
void Get(int const groupID, int const varID, vector_type &data)
receives data
Definition: NcDouble.cpp:36
static value_type FillValue()
Definition: NcDouble.h:31
NcDouble()
Definition: NcDouble.cpp:31
double value_type
Definition: NcDouble.h:26
NcDouble ncDouble
Definition: NcDouble.cpp:24
static value_type MinValue()
Definition: NcDouble.h:32
Base class for all netCDF data types.
Definition: NcType.h:47