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