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