"Fossies" - the Fresh Open Source Software Archive

Member "netcdf-cxx4-4.3.1/cxx4/ncVar.h" (11 Sep 2019, 55264 Bytes) of package /linux/misc/netcdf-cxx4-4.3.1.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "ncVar.h" see the Fossies "Dox" file reference documentation.

    1 #include <exception>
    2 #include <string>
    3 #include <typeinfo>
    4 #include <map>
    5 #include <vector>
    6 #include "netcdf.h"
    7 #include "ncVarAtt.h"
    8 #include "ncGroup.h"
    9 #include "ncByte.h"
   10 #include "ncUbyte.h"
   11 #include "ncChar.h"
   12 #include "ncShort.h"
   13 #include "ncUshort.h"
   14 #include "ncInt.h"
   15 #include "ncUint.h"
   16 #include "ncInt64.h"
   17 #include "ncUint64.h"
   18 #include "ncFloat.h"
   19 #include "ncDouble.h"
   20 #include "ncString.h"
   21 
   22 #ifndef NcVarClass
   23 #define NcVarClass
   24 
   25 namespace netCDF
   26 {
   27   //  class NcGroup;  // forward declaration.
   28   class NcDim;    // forward declaration.
   29   //  class NcVarAtt; // forward declaration.
   30   class NcType;   // forward declaration.
   31 
   32   /*! Class represents a netCDF variable. */
   33   class NcVar
   34   {
   35   public:
   36 
   37     /*! Used for chunking specifications (see NcVar::setChunking,  NcVar::getChunkingParameters). */
   38     enum ChunkMode
   39       {
   40     /*!
   41       Chunked storage is used for this variable.
   42     */
   43         nc_CHUNKED    = NC_CHUNKED,
   44         /*! Contiguous storage is used for this variable. Variables with one or more unlimited
   45           dimensions cannot use contiguous storage. If contiguous storage is turned on, the
   46           chunkSizes parameter is ignored.
   47         */
   48         nc_CONTIGUOUS = NC_CONTIGUOUS
   49       };
   50 
   51     /*!
   52       Used to specifying the endianess of the data, (see NcVar::setEndianness, NcVar::getEndianness). By default this is NC_ENDIAN_NATIVE.
   53     */
   54     enum EndianMode
   55       {
   56     nc_ENDIAN_NATIVE = NC_ENDIAN_NATIVE, //!< Native endian.
   57     nc_ENDIAN_LITTLE = NC_ENDIAN_LITTLE, //!< Little endian.
   58     nc_ENDIAN_BIG    = NC_ENDIAN_BIG     //!< Big endian.
   59       };
   60 
   61     /*! Used for checksum specification (see NcVar::setChecksum, NcVar::getChecksum). */
   62     enum ChecksumMode
   63     {
   64       nc_NOCHECKSUM = NC_NOCHECKSUM, //!< No checksum (the default).
   65       nc_FLETCHER32 = NC_FLETCHER32  //!< Selects the Fletcher32 checksum filter.
   66       };
   67 
   68     /*! destructor */
   69     ~NcVar(){};
   70 
   71     /*! Constructor generates a \ref isNull "null object". */
   72     NcVar ();
   73 
   74     /*! Constructor for a variable .
   75 
   76       The variable must already exist in the netCDF file. New netCDF variables can be added using NcGroup::addNcVar();
   77       \param grp    Parent NcGroup object.
   78       \param varId  Id of the is NcVar object.
   79     */
   80     NcVar (const NcGroup& grp, const int& varId);
   81 
   82     /*! assignment operator  */
   83     NcVar& operator =(const NcVar& rhs);
   84 
   85     /*! equivalence operator */
   86     bool operator==(const NcVar& rhs) const;
   87 
   88     /*!  != operator */
   89     bool operator!=(const NcVar& rhs) const;
   90 
   91     /*! The copy constructor. */
   92     NcVar(const NcVar& ncVar);
   93 
   94     /*! Name of this NcVar object.*/
   95     std::string getName() const;
   96 
   97     /*! Gets parent group. */
   98     NcGroup  getParentGroup() const;
   99 
  100     /*! Returns the variable type. */
  101     NcType getType() const;
  102 
  103 
  104     /*! Rename the variable. */
  105     void rename( const std::string& newname ) const;
  106 
  107     /*! Define new variable for compression/decompression. */
  108     void setFilter(unsigned int id, size_t nparams, const unsigned int* parms) const;
  109 
  110     /*! Query filter properties (if a filter has been applied). */
  111     void getFilter(unsigned int* idp, size_t* nparamsp, unsigned int* params) const;
  112 
  113     /*! Query the length of a given ncType. */
  114     void getTypeLen(nc_type type) const;
  115 
  116     /*! Free memory allocated for a string. */
  117     void freeString(size_t len, char **data) const;
  118 
  119     /*! Change cache setttings for a chunked variable.  */
  120     void setChunkCache(size_t size, size_t nelems, float preemption) const;
  121 
  122     /*! Get the variable id. */
  123     int  getId() const;
  124 
  125     /*! Returns true if this object variable is not defined. */
  126     bool isNull() const  {return nullObject;}
  127 
  128     /*! comparator operator  */
  129     friend bool operator<(const NcVar& lhs,const NcVar& rhs);
  130 
  131     /*! comparator operator  */
  132     friend bool operator>(const NcVar& lhs,const NcVar& rhs);
  133 
  134     /////////////////
  135 
  136     // Information about Dimensions
  137 
  138     /////////////////
  139 
  140     /*! The the number of dimensions. */
  141     int getDimCount() const ;
  142 
  143     /*! Gets the i'th NcDim object. */
  144     NcDim getDim(int i) const;
  145 
  146     /*! Gets the set of NcDim objects. */
  147     std::vector<NcDim> getDims() const;
  148 
  149     /////////////////
  150 
  151     // Information about Attributes
  152 
  153     /////////////////
  154 
  155     /*! Gets the number of attributes. */
  156     int getAttCount() const;
  157 
  158     /*! Gets attribute by name */
  159     NcVarAtt getAtt(const std::string& name) const;
  160 
  161     /*! Gets the set of attributes. */
  162     std::map<std::string,NcVarAtt> getAtts() const;
  163 
  164 
  165 
  166 
  167     /////////////////////////
  168 
  169 
  170     /*! \overload
  171      */
  172     NcVarAtt putAtt(const std::string& name, size_t len, const char** dataValues) const ;
  173 
  174     /*! \overload
  175      */
  176     NcVarAtt putAtt(const std::string& name, const std::string& dataValues) const ;
  177 
  178     /*! \overload
  179      */
  180     NcVarAtt putAtt(const std::string& name, const NcType& type, size_t len, const unsigned char* dataValues) const ;
  181     /*! \overload
  182      */
  183     NcVarAtt putAtt(const std::string& name, const NcType& type, size_t len, const signed char* dataValues) const ;
  184     /*! \overload
  185      */
  186     NcVarAtt putAtt(const std::string& name, const NcType& type, short datumValue) const ;
  187     /*! \overload
  188      */
  189     NcVarAtt putAtt(const std::string& name, const NcType& type, int datumValue) const ;
  190     /*! \overload
  191      */
  192     NcVarAtt putAtt(const std::string& name, const NcType& type, long datumValue) const ;
  193     /*! \overload
  194      */
  195     NcVarAtt putAtt(const std::string& name, const NcType& type, float datumValue) const ;
  196     /*! \overload
  197      */
  198     NcVarAtt putAtt(const std::string& name, const NcType& type, double datumValue) const ;
  199     /*! \overload
  200      */
  201     NcVarAtt putAtt(const std::string& name, const NcType& type, unsigned short datumValue) const ;
  202     /*! \overload
  203      */
  204     NcVarAtt putAtt(const std::string& name, const NcType& type, unsigned int datumValue) const ;
  205     /*! \overload
  206      */
  207     NcVarAtt putAtt(const std::string& name, const NcType& type, unsigned long long datumValue) const ;
  208     /*! \overload
  209      */
  210     NcVarAtt putAtt(const std::string& name, const NcType& type, long long datumValue) const ;
  211     /*! \overload
  212      */
  213     NcVarAtt putAtt(const std::string& name, const NcType& type, size_t len, const short* dataValues) const ;
  214     /*! \overload
  215      */
  216     NcVarAtt putAtt(const std::string& name, const NcType& type, size_t len, const int* dataValues) const ;
  217     /*! \overload
  218      */
  219     NcVarAtt putAtt(const std::string& name, const NcType& type, size_t len, const long* dataValues) const ;
  220     /*! \overload
  221      */
  222     NcVarAtt putAtt(const std::string& name, const NcType& type, size_t len, const float* dataValues) const ;
  223     /*! \overload
  224      */
  225     NcVarAtt putAtt(const std::string& name, const NcType& type, size_t len, const double* dataValues) const ;
  226     /*! \overload
  227      */
  228     NcVarAtt putAtt(const std::string& name, const NcType& type, size_t len, const unsigned short* dataValues) const ;
  229     /*! \overload
  230      */
  231     NcVarAtt putAtt(const std::string& name, const NcType& type, size_t len, const unsigned int* dataValues) const ;
  232     /*! \overload
  233      */
  234     NcVarAtt putAtt(const std::string& name, const NcType& type, size_t len, const unsigned long long* dataValues) const ;
  235     /*! \overload
  236      */
  237     NcVarAtt putAtt(const std::string& name, const NcType& type, size_t len, const long long* dataValues) const ;
  238     /*!
  239       Creates a new variable attribute or if already exisiting replaces it.
  240       If you are writing a _Fill_Value_ attribute, and will tell the HDF5 layer to use
  241       the specified fill value for that variable.
  242       \par
  243       Although it's possible to create attributes of all types, text and double attributes are adequate for most purposes.
  244       \param name        Name of attribute.
  245       \param type        The attribute type.
  246       \param len         The length of the attribute (number of Nctype repeats).
  247       \param dataValues  Data Values to put into the new attribute.
  248       If the type of data values differs from the netCDF variable type, type conversion will occur.
  249       (However, no type conversion is carried out for variables using the user-defined data types:
  250       nc_Vlen, nc_Opaque, nc_Compound and nc_Enum.)
  251       \return            The NcVarAtt object for this new netCDF attribute.
  252     */
  253     NcVarAtt putAtt(const std::string& name, const NcType& type, size_t len, const void* dataValues) const ;
  254 
  255 
  256 
  257     ////////////////////
  258 
  259     // Chunking details
  260 
  261     ////////////////////
  262 
  263     /*! Sets chunking parameters.
  264       \param chunkMode   Enumeration type. Allowable parameters are: "nc_CONTIGUOUS", "nc_CHUNKED"
  265       \param chunksizes  Shape of chunking, used if ChunkMode=nc_CHUNKED.
  266     */
  267     void setChunking(ChunkMode chunkMode, std::vector<size_t>& chunksizes) const;
  268 
  269     /*! Gets the chunking parameters
  270       \param chunkMode   On return contains either: "nc_CONTIGUOUS" or "nc_CHUNKED"
  271       \param chunksizes  On return contains shape of chunking, used if ChunkMode=nc_CHUNKED.
  272     */
  273     void getChunkingParameters(ChunkMode& chunkMode, std::vector<size_t>& chunkSizes) const;
  274 
  275 
  276 
  277     ////////////////////
  278 
  279     // Fill details
  280 
  281     ////////////////////
  282 
  283     // Sets the fill parameters
  284     /*!
  285       \overload
  286     */
  287     void setFill(bool fillMode,void* fillValue=NULL) const;
  288 
  289     /*!
  290       This is an overloaded member function, provided for convenience.
  291       It differs from the above function in what argument(s) it accepts.
  292       The function can be used for any type, including user-defined types.
  293       \param fillMode   Setting to true, turns on fill mode.
  294       \param fillValue  Pointer to fill value.
  295       Must be the same type as the variable. Ignored if fillMode=.false.
  296     */
  297     void setFill(bool fillMode,const void* fillValue=NULL) const;
  298 
  299     /*! Sets the fill parameters
  300       \param fillMode   Setting to true, turns on fill mode.
  301       \param fillValue  Fill value for the variable.
  302       Must be the same type as the variable. Ignored if fillMode=.false.
  303     */
  304     template<class T>
  305       void setFill(bool fillMode, T fillValue) const
  306       {
  307     ncCheck(nc_def_var_fill(groupId,myId,static_cast<int> (!fillMode),&fillValue),__FILE__,__LINE__);
  308       }
  309 
  310 
  311 
  312 
  313     /*!
  314       This is an overloaded member function, provided for convenience.
  315       It differs from the above function in what argument(s) it accepts.
  316       The function can be used for any type, including user-defined types.
  317       \param fillMode   On return set to true  if fill mode is enabled.
  318       \param fillValue  On return containts a pointer to fill value.
  319       Must be the same type as the variable. Ignored if fillMode=.false.
  320     */
  321     void getFillModeParameters(bool& fillMode, void* fillValue=NULL) const;
  322 
  323 
  324     /*! Gets the fill parameters
  325       \param On return set to true  if fill mode is enabled.
  326       \param On return  is set to the fill value.
  327     */
  328     template <class T> void getFillModeParameters(bool& fillMode,T& fillValue) const{
  329        int fillModeInt;
  330       ncCheck(nc_inq_var_fill(groupId,myId,&fillModeInt,&fillValue),__FILE__,__LINE__);
  331       fillMode= static_cast<bool> (fillModeInt == 0);
  332     }
  333 
  334 
  335 
  336 
  337     ////////////////////
  338 
  339     // Compression details
  340 
  341     ////////////////////
  342 
  343 
  344     /*! Sets the compression parameters
  345       \param enableShuffleFilter Set to true to turn on shuffle filter.
  346       \param enableDeflateFilter Set to true to turn on deflate filter.
  347       \param deflateLevel        The deflate level, must be 0 and 9.
  348     */
  349     void setCompression(bool enableShuffleFilter, bool enableDeflateFilter, int deflateLevel) const;
  350 
  351     /*! Gets the compression parameters
  352       \param enableShuffleFilter  On return set to true if the shuffle filter is enabled.
  353       \param enableDeflateFilter  On return set to true if the deflate filter is enabled.
  354       \param deflateLevel         On return set to the deflate level.
  355     */
  356     void getCompressionParameters(bool& shuffleFilterEnabled, bool& deflateFilterEnabled, int& deflateLevel) const;
  357 
  358 
  359 
  360     ////////////////////
  361 
  362     // Endianness details
  363 
  364     ////////////////////
  365 
  366 
  367     /*! Sets the endianness of the variable.
  368       \param Endianness enumeration type. Allowable parameters are: "nc_ENDIAN_NATIVE" (the default), "nc_ENDIAN_LITTLE", "nc_ENDIAN_BIG"
  369     */
  370     void setEndianness(EndianMode endianMode) const;
  371 
  372     /*! Gets the endianness of the variable.
  373       \return Endianness enumeration type. Allowable parameters are: "nc_ENDIAN_NATIVE" (the default), "nc_ENDIAN_LITTLE", "nc_ENDIAN_BIG"
  374     */
  375     EndianMode getEndianness() const;
  376 
  377 
  378 
  379     ////////////////////
  380 
  381     // Checksum details
  382 
  383     ////////////////////
  384 
  385 
  386     /*! Sets the checksum parameters of a variable.
  387       \param ChecksumMode Enumeration type. Allowable parameters are: "nc_NOCHECKSUM", "nc_FLETCHER32".
  388     */
  389     void setChecksum(ChecksumMode checksumMode) const;
  390 
  391     /*! Gets the checksum parameters of the variable.
  392       \return ChecksumMode Enumeration type. Allowable parameters are: "nc_NOCHECKSUM", "nc_FLETCHER32".
  393     */
  394     ChecksumMode getChecksum() const;
  395 
  396 
  397 
  398     ////////////////////
  399 
  400     //  data  reading
  401 
  402     ////////////////////
  403 
  404 
  405 
  406     // Reads the entire data into the netCDF variable.
  407     /*!
  408       This is an overloaded member function, provided for convenience.
  409       It differs from the above function in what argument(s) it accepts.
  410       In addition, no data conversion is carried out. This means that
  411       the type of the data in memory must match the type of the variable.
  412     */
  413     void getVar(void* dataValues) const;
  414     /*! \overload
  415      */
  416     void getVar(char** dataValues) const;
  417     /*! \overload
  418      */
  419     void getVar(char* dataValues) const;
  420     /*! \overload
  421      */
  422     void getVar(unsigned char* dataValues) const;
  423     /*! \overload
  424      */
  425     void getVar(signed char* dataValues) const;
  426     /*! \overload
  427      */
  428     void getVar(short* dataValues) const;
  429     /*! \overload
  430      */
  431     void getVar(int* dataValues) const;
  432     /*! \overload
  433      */
  434     void getVar(long* dataValues) const;
  435     /*! \overload
  436      */
  437     void getVar(float* dataValues) const;
  438     /*! \overload
  439      */
  440     void getVar(double* dataValues) const;
  441     /*! \overload
  442      */
  443     void getVar(unsigned short* dataValues) const;
  444     /*! \overload
  445      */
  446     void getVar(unsigned int* dataValues) const;
  447     /*! \overload
  448      */
  449     void getVar(unsigned long long* dataValues) const;
  450     /*!
  451       Reads the entire data from an netCDF variable.
  452       This is the simplest interface to use for reading the value of a scalar variable
  453       or when all the values of a multidimensional variable can be read at once. The values
  454       are read into consecutive locations with the last dimension varying fastest.
  455 
  456       Take care when using the simplest forms of this interface with record variables when you
  457       don't specify how many records are to be read. If you try to read all the values of a
  458       record variable into an array but there are more records in the file than you assume,
  459       more data will be read than you expect, which may cause a segmentation violation.
  460 
  461       \param dataValues Pointer to the location into which the data value is read. If the type of
  462       data value differs from the netCDF variable type, type conversion will occur.
  463       (However, no type conversion is carried out for variables using the user-defined data types:
  464       nc_Vlen, nc_Opaque, nc_Compound and nc_Enum.)
  465     */
  466     void getVar(long long* dataValues) const;
  467 
  468 
  469     //////////////////////
  470 
  471     // Reads a single datum value from a variable of an open netCDF dataset.
  472     /*!
  473       This is an overloaded member function, provided for convenience.
  474       It differs from the above function in what argument(s) it accepts.
  475       In addition, no data conversion is carried out. This means that
  476       the type of the data in memory must match the type of the variable.
  477     */
  478     void getVar(const std::vector<size_t>& index, void* datumValue) const;
  479     /*! \overload
  480      */
  481     void getVar(const std::vector<size_t>& index, char** datumValue) const;
  482     /*! \overload
  483      */
  484     void getVar(const std::vector<size_t>& index, char* datumValue) const;
  485     /*! \overload
  486      */
  487     void getVar(const std::vector<size_t>& index, unsigned char* datumValue) const;
  488     /*! \overload
  489      */
  490     void getVar(const std::vector<size_t>& index, signed char* datumValue) const;
  491     /*! \overload
  492      */
  493     void getVar(const std::vector<size_t>& index, short* datumValue) const;
  494     /*! \overload
  495      */
  496     void getVar(const std::vector<size_t>& index, int* datumValue) const;
  497     /*! \overload
  498      */
  499     void getVar(const std::vector<size_t>& index, long* datumValue) const;
  500     /*! \overload
  501      */
  502     void getVar(const std::vector<size_t>& index, float* datumValue) const;
  503     /*! \overload
  504      */
  505     void getVar(const std::vector<size_t>& index, double* datumValue) const;
  506     /*! \overload
  507      */
  508     void getVar(const std::vector<size_t>& index, unsigned short* datumValue) const;
  509     /*! \overload
  510      */
  511     void getVar(const std::vector<size_t>& index, unsigned int* datumValue) const;
  512     /*! \overload
  513      */
  514     void getVar(const std::vector<size_t>& index, unsigned long long* datumValue) const;
  515     /*! Reads a single datum value from a variable of an open netCDF dataset.
  516       The value is converted from the external data type of the variable, if necessary.
  517 
  518       \param index       Vector specifying the index of the data value to be read.
  519       The indices are relative to 0, so for example, the first data value of a two-dimensional
  520       variable would have index (0,0). The elements of index must correspond to the variable's dimensions.
  521       Hence, if the variable is a record variable, the first index is the record number.
  522 
  523       \param datumValue Pointer to the location into which the data value is read. If the type of
  524       data value differs from the netCDF variable type, type conversion will occur.
  525       (However, no type conversion is carried out for variables using the user-defined data types:
  526       nc_Vlen, nc_Opaque, nc_Compound and nc_Enum.)
  527     */
  528     void getVar(const std::vector<size_t>& index, long long* datumValue) const;
  529 
  530     //////////////////////
  531 
  532     // Reads an array of values from a netCDF variable of an open netCDF dataset.
  533     /*!
  534       This is an overloaded member function, provided for convenience.
  535       It differs from the above function in what argument(s) it accepts.
  536       In addition, no data conversion is carried out. This means that
  537       the type of the data in memory must match the type of the variable.
  538     */
  539     void getVar(const std::vector<size_t>& start, const std::vector<size_t>& count, void* dataValues) const;
  540     /*! \overload
  541      */
  542     void getVar(const std::vector<size_t>& start, const std::vector<size_t>& count, char** dataValues) const;
  543     /*! \overload
  544      */
  545     void getVar(const std::vector<size_t>& start, const std::vector<size_t>& count, char* dataValues) const;
  546     /*! \overload
  547      */
  548     void getVar(const std::vector<size_t>& start, const std::vector<size_t>& count, unsigned char* dataValues) const;
  549     /*! \overload
  550      */
  551     void getVar(const std::vector<size_t>& start, const std::vector<size_t>& count, signed char* dataValues) const;
  552     /*! \overload
  553      */
  554     void getVar(const std::vector<size_t>& start, const std::vector<size_t>& count, short* dataValues) const;
  555     /*! \overload
  556      */
  557     void getVar(const std::vector<size_t>& start, const std::vector<size_t>& count, int* dataValues) const;
  558     /*! \overload
  559      */
  560     void getVar(const std::vector<size_t>& start, const std::vector<size_t>& count, long* dataValues) const;
  561     /*! \overload
  562      */
  563     void getVar(const std::vector<size_t>& start, const std::vector<size_t>& count, float* dataValues) const;
  564     /*! \overload
  565      */
  566     void getVar(const std::vector<size_t>& start, const std::vector<size_t>& count, double* dataValues) const;
  567     /*! \overload
  568      */
  569     void getVar(const std::vector<size_t>& start, const std::vector<size_t>& count, unsigned short* dataValues) const;
  570     /*! \overload
  571      */
  572     void getVar(const std::vector<size_t>& start, const std::vector<size_t>& count, unsigned int* dataValues) const;
  573     /*! \overload
  574      */
  575     void getVar(const std::vector<size_t>& start, const std::vector<size_t>& count, unsigned long long* dataValues) const;
  576     /*!
  577       Reads an array of values from a netCDF variable of an open netCDF dataset.
  578       The array is specified by giving a corner and a vector of edge lengths.
  579       The values are read into consecutive locations with the last dimension varying fastest.
  580 
  581       \param start
  582       Vector specifying the index in the variable where the first of the data values will be read.
  583       The indices are relative to 0, so for example, the first data value of a variable would have index (0, 0, ... , 0).
  584       The length of start must be the same as the number of dimensions of the specified variable.
  585       The elements of start correspond, in order, to the variable's dimensions. Hence, if the variable is a record variable,
  586       the first index would correspond to the starting record number for reading the data values.
  587 
  588       \param count
  589       Vector specifying the edge lengths along each dimension of the block of data values to be read.
  590       To read a single value, for example, specify count as (1, 1, ... , 1). The length of count is the number of
  591       dimensions of the specified variable. The elements of count correspond, in order, to the variable's dimensions.
  592       Hence, if the variable is a record variable, the first element of count corresponds to a count of the number of records to read.
  593       Note: setting any element of the count array to zero causes the function to exit without error, and without doing anything.
  594 
  595       \param dataValues Pointer to the location into which the data value is read. If the type of
  596       data value differs from the netCDF variable type, type conversion will occur.
  597       (However, no type conversion is carried out for variables using the user-defined data types:
  598       nc_Vlen, nc_Opaque, nc_Compound and nc_Enum.)
  599     */
  600     void getVar(const std::vector<size_t>& start, const std::vector<size_t>& count, long long* dataValues) const;
  601 
  602     //////////////////////
  603 
  604     // Reads a subsampled (strided) array section of values from a netCDF variable.
  605     /*!
  606       This is an overloaded member function, provided for convenience.
  607       It differs from the above function in what argument(s) it accepts.
  608       In addition, no data conversion is carried out. This means that
  609       the type of the data in memory must match the type of the variable.
  610     */
  611     void getVar(const std::vector<size_t>& start, const std::vector<size_t>& count,  const std::vector<ptrdiff_t>& stride, void* dataValues) const;
  612     /*! \overload
  613      */
  614     void getVar(const std::vector<size_t>& start, const std::vector<size_t>& count,  const std::vector<ptrdiff_t>& stride, char** dataValues) const;
  615     /*! \overload
  616      */
  617     void getVar(const std::vector<size_t>& start, const std::vector<size_t>& count,  const std::vector<ptrdiff_t>& stride, char* dataValues) const;
  618     /*! \overload
  619      */
  620     void getVar(const std::vector<size_t>& start, const std::vector<size_t>& count,  const std::vector<ptrdiff_t>& stride, unsigned char* dataValues) const;
  621     /*! \overload
  622      */
  623     void getVar(const std::vector<size_t>& start, const std::vector<size_t>& count,  const std::vector<ptrdiff_t>& stride, signed char* dataValues) const;
  624     /*! \overload
  625      */
  626     void getVar(const std::vector<size_t>& start, const std::vector<size_t>& count,  const std::vector<ptrdiff_t>& stride, short* dataValues) const;
  627     /*! \overload
  628      */
  629     void getVar(const std::vector<size_t>& start, const std::vector<size_t>& count,  const std::vector<ptrdiff_t>& stride, int* dataValues) const;
  630     /*! \overload
  631      */
  632     void getVar(const std::vector<size_t>& start, const std::vector<size_t>& count,  const std::vector<ptrdiff_t>& stride, long* dataValues) const;
  633     /*! \overload
  634      */
  635     void getVar(const std::vector<size_t>& start, const std::vector<size_t>& count,  const std::vector<ptrdiff_t>& stride, float* dataValues) const;
  636     /*! \overload
  637      */
  638     void getVar(const std::vector<size_t>& start, const std::vector<size_t>& count,  const std::vector<ptrdiff_t>& stride, double* dataValues) const;
  639     /*! \overload
  640      */
  641     void getVar(const std::vector<size_t>& start, const std::vector<size_t>& count,  const std::vector<ptrdiff_t>& stride, unsigned short* dataValues) const;
  642     /*! \overload
  643      */
  644     void getVar(const std::vector<size_t>& start, const std::vector<size_t>& count,  const std::vector<ptrdiff_t>& stride, unsigned int* dataValues) const;
  645     /*! \overload
  646      */
  647     void getVar(const std::vector<size_t>& start, const std::vector<size_t>& count,  const std::vector<ptrdiff_t>& stride, unsigned long long* dataValues) const;
  648     /*!
  649       Reads a subsampled (strided) array section of values from a netCDF variable.
  650       The subsampled array section is specified by giving a corner, a vector of edge lengths, and a stride vector.
  651       The values are read with the last dimension of the netCDF variable varying fastest.
  652 
  653       \param start
  654       Vector specifying the index in the variable where the first of the data values will be read.
  655       The indices are relative to 0, so for example, the first data value of a variable would have index (0, 0, ... , 0).
  656       The length of start must be the same as the number of dimensions of the specified variable.
  657       The elements of start correspond, in order, to the variable's dimensions. Hence, if the variable is a record variable,
  658       the first index would correspond to the starting record number for reading the data values.
  659 
  660       \param count
  661       Vector specifying the edge lengths along each dimension of the block of data values to be read.
  662       To read a single value, for example, specify count as (1, 1, ... , 1). The length of count is the number of
  663       dimensions of the specified variable. The elements of count correspond, in order, to the variable's dimensions.
  664       Hence, if the variable is a record variable, the first element of count corresponds to a count of the number of records to read.
  665       Note: setting any element of the count array to zero causes the function to exit without error, and without doing anything.
  666 
  667       \param stride
  668       Vector specifying the interval between selected indices. The elements of the stride vector correspond, in order,
  669       to the variable's dimensions. A value of 1 accesses adjacent values of the netCDF variable in the corresponding
  670       dimension; a value of 2 accesses every other value of the netCDF variable in the corresponding dimension; and so
  671       on. A NULL stride argument is treated as (1, 1, ... , 1).
  672 
  673       \param dataValues Pointer to the location into which the data value is read. If the type of
  674       data value differs from the netCDF variable type, type conversion will occur.
  675       (However, no type conversion is carried out for variables using the user-defined data types:
  676       nc_Vlen, nc_Opaque, nc_Compound and nc_Enum.)
  677     */
  678     void getVar(const std::vector<size_t>& start, const std::vector<size_t>& count,  const std::vector<ptrdiff_t>& stride, long long* dataValues) const;
  679 
  680 
  681     //////////////////////
  682 
  683     // Reads a mapped array section of values from a netCDF variable.
  684     /*!
  685       This is an overloaded member function, provided for convenience.
  686       It differs from the above function in what argument(s) it accepts.
  687       In addition, no data conversion is carried out. This means that
  688       the type of the data in memory must match the type of the variable.
  689     */
  690     void getVar(const std::vector<size_t>& start, const std::vector<size_t>& count,  const std::vector<ptrdiff_t>& stride, const std::vector<ptrdiff_t>& imap, void* dataValues) const;
  691     /*! \overload
  692      */
  693     void getVar(const std::vector<size_t>& start, const std::vector<size_t>& count,  const std::vector<ptrdiff_t>& stride, const std::vector<ptrdiff_t>& imap, char** dataValues) const;
  694     /*! \overload
  695      */
  696     void getVar(const std::vector<size_t>& start, const std::vector<size_t>& count,  const std::vector<ptrdiff_t>& stride, const std::vector<ptrdiff_t>& imap, char* dataValues) const;
  697     /*! \overload
  698      */
  699     void getVar(const std::vector<size_t>& start, const std::vector<size_t>& count,  const std::vector<ptrdiff_t>& stride, const std::vector<ptrdiff_t>& imap, unsigned char* dataValues) const;
  700     /*! \overload
  701      */
  702     void getVar(const std::vector<size_t>& start, const std::vector<size_t>& count,  const std::vector<ptrdiff_t>& stride, const std::vector<ptrdiff_t>& imap, signed char* dataValues) const;
  703     /*! \overload
  704      */
  705     void getVar(const std::vector<size_t>& start, const std::vector<size_t>& count,  const std::vector<ptrdiff_t>& stride, const std::vector<ptrdiff_t>& imap, short* dataValues) const;
  706     /*! \overload
  707      */
  708     void getVar(const std::vector<size_t>& start, const std::vector<size_t>& count,  const std::vector<ptrdiff_t>& stride, const std::vector<ptrdiff_t>& imap, int* dataValues) const;
  709     /*! \overload
  710      */
  711     void getVar(const std::vector<size_t>& start, const std::vector<size_t>& count,  const std::vector<ptrdiff_t>& stride, const std::vector<ptrdiff_t>& imap, long* dataValues) const;
  712     /*! \overload
  713      */
  714     void getVar(const std::vector<size_t>& start, const std::vector<size_t>& count,  const std::vector<ptrdiff_t>& stride, const std::vector<ptrdiff_t>& imap, float* dataValues) const;
  715     /*! \overload
  716      */
  717     void getVar(const std::vector<size_t>& start, const std::vector<size_t>& count,  const std::vector<ptrdiff_t>& stride, const std::vector<ptrdiff_t>& imap, double* dataValues) const;
  718     /*! \overload
  719      */
  720     void getVar(const std::vector<size_t>& start, const std::vector<size_t>& count,  const std::vector<ptrdiff_t>& stride, const std::vector<ptrdiff_t>& imap, unsigned short* dataValues) const;
  721     /*! \overload
  722      */
  723     void getVar(const std::vector<size_t>& start, const std::vector<size_t>& count,  const std::vector<ptrdiff_t>& stride, const std::vector<ptrdiff_t>& imap, unsigned int* dataValues) const;
  724     /*! \overload
  725      */
  726     void getVar(const std::vector<size_t>& start, const std::vector<size_t>& count,  const std::vector<ptrdiff_t>& stride, const std::vector<ptrdiff_t>& imap, unsigned long long* dataValues) const;
  727     /*!
  728       Reads a mapped array section of values from a netCDF variable.
  729       The mapped array section is specified by giving a corner, a vector of edge lengths, a stride vector, and an
  730       index mapping vector. The index mapping vector is a vector of integers that specifies the mapping between the
  731       dimensions of a netCDF variable and the in-memory structure of the internal data array. No assumptions are
  732       made about the ordering or length of the dimensions of the data array.
  733 
  734       \param start
  735       Vector specifying the index in the variable where the first of the data values will be read.
  736       The indices are relative to 0, so for example, the first data value of a variable would have index (0, 0, ... , 0).
  737       The length of start must be the same as the number of dimensions of the specified variable.
  738       The elements of start correspond, in order, to the variable's dimensions. Hence, if the variable is a record variable,
  739       the first index would correspond to the starting record number for reading the data values.
  740 
  741       \param count
  742       Vector specifying the edge lengths along each dimension of the block of data values to be read.
  743       To read a single value, for example, specify count as (1, 1, ... , 1). The length of count is the number of
  744       dimensions of the specified variable. The elements of count correspond, in order, to the variable's dimensions.
  745       Hence, if the variable is a record variable, the first element of count corresponds to a count of the number of records to read.
  746       Note: setting any element of the count array to zero causes the function to exit without error, and without doing anything.
  747 
  748       \param stride
  749       Vector specifying the interval between selected indices. The elements of the stride vector correspond, in order,
  750       to the variable's dimensions. A value of 1 accesses adjacent values of the netCDF variable in the corresponding
  751       dimension; a value of 2 accesses every other value of the netCDF variable in the corresponding dimension; and so
  752       on. A NULL stride argument is treated as (1, 1, ... , 1).
  753 
  754       \param imap
  755       Vector of integers that specifies the mapping between the dimensions of a netCDF variable and the in-memory
  756       structure of the internal data array. imap[0] gives the distance between elements of the internal array corresponding
  757       to the most slowly varying dimension of the netCDF variable. imap[n-1] (where n is the rank of the netCDF variable)
  758       gives the distance between elements of the internal array corresponding to the most rapidly varying dimension of the
  759       netCDF variable. Intervening imap elements correspond to other dimensions of the netCDF variable in the obvious way.
  760       Distances between elements are specified in type-independent units of elements (the distance between internal elements
  761       that occupy adjacent memory locations is 1 and not the element's byte-length as in netCDF 2).
  762 
  763       \param dataValues Pointer to the location into which the data value is read. If the type of
  764       data value differs from the netCDF variable type, type conversion will occur.
  765       (However, no type conversion is carried out for variables using the user-defined data types:
  766       nc_Vlen, nc_Opaque, nc_Compound and nc_Enum.)
  767     */
  768     void getVar(const std::vector<size_t>& start, const std::vector<size_t>& count,  const std::vector<ptrdiff_t>& stride, const std::vector<ptrdiff_t>& imap, long long* dataValues) const;
  769 
  770 
  771 
  772     ////////////////////
  773 
  774     //  data writing
  775 
  776     ////////////////////
  777 
  778 
  779     // Writes the entire data into the netCDF variable.
  780     /*!
  781       This is an overloaded member function, provided for convenience.
  782       It differs from the above function in what argument(s) it accepts.
  783       In addition, no data conversion is carried out. This means that
  784       the type of the data in memory must match the type of the variable.
  785     */
  786     void putVar(const void* dataValues) const;
  787     /*! \overload
  788      */
  789     void putVar(const char** dataValues) const;
  790     /*!  \overload
  791     */
  792     void putVar(const char* dataValues) const;
  793     /*!  \overload
  794     */
  795     void putVar(const unsigned char* dataValues) const;
  796     /*!  \overload
  797     */
  798     void putVar(const signed char* dataValues) const;
  799     /*!  \overload
  800     */
  801     void putVar(const short* dataValues) const;
  802     /*!  \overload
  803     */
  804     void putVar(const int* dataValues) const;
  805     /*!  \overload
  806     */
  807     void putVar(const long* dataValues) const;
  808     /*!  \overload
  809     */
  810     void putVar(const float* dataValues) const;
  811     /*!  \overload
  812     */
  813     void putVar(const double* dataValues) const;
  814     /*!  \overload
  815     */
  816     void putVar(const unsigned short* dataValues) const;
  817     /*!  \overload
  818     */
  819     void putVar(const unsigned int* dataValues) const;
  820     /*!  \overload
  821     */
  822     void putVar(const unsigned long long* dataValues) const;
  823     /*!
  824       Writes the entire data into the netCDF variable.
  825       This is the simplest interface to use for writing a value in a scalar variable
  826       or whenever all the values of a multidimensional variable can all be
  827       written at once. The values to be written are associated with the
  828       netCDF variable by assuming that the last dimension of the netCDF
  829       variable varies fastest in the C interface.
  830 
  831       Take care when using the simplest forms of this interface with
  832       record variables when you don't specify how many records are to be
  833       written. If you try to write all the values of a record variable
  834       into a netCDF file that has no record data yet (hence has 0 records),
  835       nothing will be written. Similarly, if you try to write all of a record
  836       variable but there are more records in the file than you assume, more data
  837       may be written to the file than you supply, which may result in a
  838       segmentation violation.
  839 
  840       \param dataValues The data values. The order in which the data will be written to the netCDF variable is with the last
  841       dimension of the specified variable varying fastest. If the type of data values differs from the netCDF variable type, type conversion will occur.
  842       (However, no type conversion is carried out for variables using the user-defined data types:
  843       nc_Vlen, nc_Opaque, nc_Compound and nc_Enum.)
  844     */
  845     void putVar(const long long* dataValues) const;
  846 
  847 
  848 
  849     /////////////////////////
  850 
  851 
  852     // Writes a single datum into the netCDF variable.
  853     /*!
  854       This is an overloaded member function, provided for convenience.
  855       It differs from the above function in what argument(s) it accepts.
  856       In addition, no data conversion is carried out. This means that
  857       the type of the data in memory must match the type of the variable.
  858     */
  859     void putVar(const std::vector<size_t>& index, const void* datumValue) const;
  860     /*! \overload
  861      */
  862     void putVar(const std::vector<size_t>& index, const char** datumValue) const;
  863     /*!  \overload
  864     */
  865     void putVar(const std::vector<size_t>& index, const std::string& datumValue) const;
  866     /*!  \overload
  867     */
  868     void putVar(const std::vector<size_t>& index, const unsigned char* datumValue) const;
  869     /*!  \overload
  870     */
  871     void putVar(const std::vector<size_t>& index, const signed char* datumValue) const;
  872     /*!  \overload
  873     */
  874     void putVar(const std::vector<size_t>& index, const short datumValue) const;
  875     /*!  \overload
  876     */
  877     void putVar(const std::vector<size_t>& index, const int datumValue) const;
  878     /*!  \overload
  879     */
  880     void putVar(const std::vector<size_t>& index, const long datumValue) const;
  881     /*!  \overload
  882     */
  883     void putVar(const std::vector<size_t>& index, const float datumValue) const;
  884     /*!  \overload
  885     */
  886     void putVar(const std::vector<size_t>& index, const double datumValue) const;
  887     /*!  \overload
  888     */
  889     void putVar(const std::vector<size_t>& index, const unsigned short datumValue) const;
  890     /*!  \overload
  891     */
  892     void putVar(const std::vector<size_t>& index, const unsigned int datumValue) const;
  893     /*!  \overload
  894     */
  895     void putVar(const std::vector<size_t>& index, const unsigned long long datumValue) const;
  896     /*!
  897       Writes a single datum into the netCDF variable.
  898 
  899       \param index      Vector specifying the index where the data values will be written. The indices are relative to 0, so for example,
  900       the first data value of a two-dimensional variable would have index (0,0). The elements of index must correspond to the variable's dimensions.
  901       Hence, if the variable uses the unlimited dimension, the first index would correspond to the unlimited dimension.
  902 
  903       \param datumValue The data value. If the type of data values differs from the netCDF variable type, type conversion will occur.
  904       (However, no type conversion is carried out for variables using the user-defined data types:
  905       nc_Vlen, nc_Opaque, nc_Compound and nc_Enum.)
  906     */
  907     void putVar(const std::vector<size_t>& index, const long long datumValue) const;
  908 
  909 
  910     /////////////////////////
  911 
  912 
  913 
  914     // Writes an array of values into the netCDF variable.
  915     /*!
  916       This is an overloaded member function, provided for convenience.
  917       It differs from the above function in what argument(s) it accepts.
  918       In addition, no data conversion is carried out. This means that
  919       the type of the data in memory must match the type of the variable.
  920     */
  921     void putVar(const std::vector<size_t>& startp, const std::vector<size_t>& countp, const void* dataValues) const;
  922     /*! \overload
  923      */
  924     void putVar(const std::vector<size_t>& startp, const std::vector<size_t>& countp, const char** dataValues) const;
  925     /*!  \overload
  926     */
  927     void putVar(const std::vector<size_t>& startp, const std::vector<size_t>& countp, const char* dataValues) const;
  928     /*!  \overload
  929     */
  930     void putVar(const std::vector<size_t>& startp, const std::vector<size_t>& countp, const unsigned char* dataValues) const;
  931     /*!  \overload
  932     */
  933     void putVar(const std::vector<size_t>& startp, const std::vector<size_t>& countp, const signed char* dataValues) const;
  934     /*!  \overload
  935     */
  936     void putVar(const std::vector<size_t>& startp, const std::vector<size_t>& countp, const short* dataValues) const;
  937     /*!  \overload
  938     */
  939     void putVar(const std::vector<size_t>& startp, const std::vector<size_t>& countp, const int* dataValues) const;
  940     /*!  \overload
  941     */
  942     void putVar(const std::vector<size_t>& startp, const std::vector<size_t>& countp, const long* dataValues) const;
  943     /*!  \overload
  944     */
  945     void putVar(const std::vector<size_t>& startp, const std::vector<size_t>& countp, const float* dataValues) const;
  946     /*!  \overload
  947     */
  948     void putVar(const std::vector<size_t>& startp, const std::vector<size_t>& countp, const double* dataValues) const;
  949     /*!  \overload
  950     */
  951     void putVar(const std::vector<size_t>& startp, const std::vector<size_t>& countp, const unsigned short* dataValues) const;
  952     /*!  \overload
  953     */
  954     void putVar(const std::vector<size_t>& startp, const std::vector<size_t>& countp, const unsigned int* dataValues) const;
  955     /*!  \overload
  956     */
  957     void putVar(const std::vector<size_t>& startp, const std::vector<size_t>& countp, const unsigned long long* dataValues) const;
  958     /*!
  959       Writes an array of values into the netCDF variable.
  960       The portion of the netCDF variable to write is specified by giving a corner and a vector of edge lengths
  961       that refer to an array section of the netCDF variable. The values to be written are associated with
  962       the netCDF variable by assuming that the last dimension of the netCDF variable varies fastest.
  963 
  964       \param startp  Vector specifying the index where the first data values will be written.  The indices are relative to 0, so for
  965       example, the first data value of a variable would have index (0, 0, ... , 0). The elements of start correspond, in order, to the
  966       variable's dimensions. Hence, if the variable is a record variable, the first index corresponds to the starting record number for writing the data values.
  967 
  968       \param countp  Vector specifying the number of indices selected along each dimension.
  969       To write a single value, for example, specify count as (1, 1, ... , 1). The elements of
  970       count correspond, in order, to the variable's dimensions. Hence, if the variable is a record
  971       variable, the first element of count corresponds to a count of the number of records to write. Note: setting any element
  972       of the count array to zero causes the function to exit without error, and without doing anything.
  973 
  974       \param dataValues The data values. The order in which the data will be written to the netCDF variable is with the last
  975       dimension of the specified variable varying fastest. If the type of data values differs from the netCDF variable
  976       type, type conversion will occur. (However, no type conversion is
  977       carried out for variables using the user-defined data types:
  978       nc_Vlen, nc_Opaque, nc_Compound and nc_Enum.)
  979     */
  980     void putVar(const std::vector<size_t>& startp, const std::vector<size_t>& countp, const long long* dataValues) const;
  981 
  982 
  983     ////////////////
  984 
  985 
  986 
  987     // Writes a set of subsampled array values into the netCDF variable.
  988     /*!
  989       This is an overloaded member function, provided for convenience.
  990       It differs from the above function in what argument(s) it accepts.
  991       In addition, no data conversion is carried out. This means that
  992       the type of the data in memory must match the type of the variable.
  993     */
  994     void putVar(const std::vector<size_t>& startp, const std::vector<size_t>& countp, const std::vector<ptrdiff_t>& stridep, const void* dataValues) const;
  995     /*! \overload
  996      */
  997     void putVar(const std::vector<size_t>& startp, const std::vector<size_t>& countp, const std::vector<ptrdiff_t>& stridep, const char** dataValues) const;
  998     /*!  \overload
  999     */
 1000     void putVar(const std::vector<size_t>& startp, const std::vector<size_t>& countp, const std::vector<ptrdiff_t>& stridep, const char* dataValues) const;
 1001     /*!  \overload
 1002     */
 1003     void putVar(const std::vector<size_t>& startp, const std::vector<size_t>& countp, const std::vector<ptrdiff_t>& stridep, const unsigned char* dataValues) const;
 1004     /*!  \overload
 1005     */
 1006     void putVar(const std::vector<size_t>& startp, const std::vector<size_t>& countp, const std::vector<ptrdiff_t>& stridep, const signed char* dataValues) const;
 1007     /*!  \overload
 1008     */
 1009     void putVar(const std::vector<size_t>& startp, const std::vector<size_t>& countp, const std::vector<ptrdiff_t>& stridep, const short* dataValues) const;
 1010     /*!  \overload
 1011     */
 1012     void putVar(const std::vector<size_t>& startp, const std::vector<size_t>& countp, const std::vector<ptrdiff_t>& stridep, const int* dataValues) const;
 1013     /*!  \overload
 1014     */
 1015     void putVar(const std::vector<size_t>& startp, const std::vector<size_t>& countp, const std::vector<ptrdiff_t>& stridep, const long* dataValues) const;
 1016     /*!  \overload
 1017     */
 1018     void putVar(const std::vector<size_t>& startp, const std::vector<size_t>& countp, const std::vector<ptrdiff_t>& stridep, const float* dataValues) const;
 1019     /*!  \overload
 1020     */
 1021     void putVar(const std::vector<size_t>& startp, const std::vector<size_t>& countp, const std::vector<ptrdiff_t>& stridep, const double* dataValues) const;
 1022     /*!  \overload
 1023     */
 1024     void putVar(const std::vector<size_t>& startp, const std::vector<size_t>& countp, const std::vector<ptrdiff_t>& stridep, const unsigned short* dataValues) const;
 1025     /*!  \overload
 1026     */
 1027     void putVar(const std::vector<size_t>& startp, const std::vector<size_t>& countp, const std::vector<ptrdiff_t>& stridep, const unsigned int* dataValues) const;
 1028     /*!  \overload
 1029     */
 1030     void putVar(const std::vector<size_t>& startp, const std::vector<size_t>& countp, const std::vector<ptrdiff_t>& stridep, const unsigned long long* dataValues) const;
 1031     /*!
 1032       Writes an array of values into the netCDF variable.
 1033       The subsampled array section is specified by giving a corner, a vector of counts, and a stride vector.
 1034 
 1035       \param startp  Vector specifying the index where the first data values will be written.  The indices are relative to 0, so for
 1036       example, the first data value of a variable would have index (0, 0, ... , 0). The elements of start correspond, in order, to the
 1037       variable's dimensions. Hence, if the variable is a record variable, the first index corresponds to the starting record number for writing the data values.
 1038 
 1039       \param countp  Vector specifying the number of indices selected along each dimension.
 1040       To write a single value, for example, specify count as (1, 1, ... , 1). The elements of
 1041       count correspond, in order, to the variable's dimensions. Hence, if the variable is a record
 1042       variable, the first element of count corresponds to a count of the number of records to write. Note: setting any element
 1043       of the count array to zero causes the function to exit without error, and without doing anything.
 1044 
 1045       \param stridep  A vector of ptrdiff_t integers that specifies the sampling interval along each dimension of the netCDF variable.
 1046       The elements of the stride vector correspond, in order, to the netCDF variable's dimensions (stride[0] gives the sampling interval
 1047       along the most slowly varying dimension of the netCDF variable). Sampling intervals are specified in type-independent units of
 1048       elements (a value of 1 selects consecutive elements of the netCDF variable along the corresponding dimension, a value of 2 selects
 1049       every other element, etc.). A NULL stride argument is treated as (1, 1, ... , 1).
 1050 
 1051       \param dataValues The data values. The order in which the data will be written to the netCDF variable is with the last
 1052       dimension of the specified variable varying fastest. If the type of data values differs from the netCDF variable type, type conversion will occur.
 1053       (However, no type conversion is  carried out for variables using the user-defined data types: nc_Vlen, nc_Opaque, nc_Compound and nc_Enum.
 1054     */
 1055     void putVar(const std::vector<size_t>& startp, const std::vector<size_t>& countp, const std::vector<ptrdiff_t>& stridep, const long long* dataValues) const;
 1056 
 1057     ////////////////
 1058 
 1059     // Writes a mapped array section of values into the netCDF variable.
 1060     /*!
 1061       This is an overloaded member function, provided for convenience.
 1062       It differs from the above function in what argument(s) it accepts.
 1063       In addition, no data conversion is carried out. This means that
 1064       the type of the data in memory must match the type of the variable.
 1065     */
 1066     void putVar(const std::vector<size_t>& startp, const std::vector<size_t>& countp, const std::vector<ptrdiff_t>& stridep, const std::vector<ptrdiff_t>& imapp, const void* dataValues) const;
 1067     /*! \overload
 1068      */
 1069     void putVar(const std::vector<size_t>& startp, const std::vector<size_t>& countp, const std::vector<ptrdiff_t>& stridep, const std::vector<ptrdiff_t>& imapp, const char** dataValues) const;
 1070     /*!  \overload
 1071     */
 1072     void putVar(const std::vector<size_t>& startp, const std::vector<size_t>& countp, const std::vector<ptrdiff_t>& stridep, const std::vector<ptrdiff_t>& imapp, const char* dataValues) const;
 1073     /*!  \overload
 1074     */
 1075     void putVar(const std::vector<size_t>& startp, const std::vector<size_t>& countp, const std::vector<ptrdiff_t>& stridep, const std::vector<ptrdiff_t>& imapp, const unsigned char* dataValues) const;
 1076     /*!  \overload
 1077     */
 1078     void putVar(const std::vector<size_t>& startp, const std::vector<size_t>& countp, const std::vector<ptrdiff_t>& stridep, const std::vector<ptrdiff_t>& imapp, const signed char* dataValues) const;
 1079     /*!  \overload
 1080     */
 1081     void putVar(const std::vector<size_t>& startp, const std::vector<size_t>& countp, const std::vector<ptrdiff_t>& stridep, const std::vector<ptrdiff_t>& imapp, const short* dataValues) const;
 1082     /*!  \overload
 1083     */
 1084     void putVar(const std::vector<size_t>& startp, const std::vector<size_t>& countp, const std::vector<ptrdiff_t>& stridep, const std::vector<ptrdiff_t>& imapp, const int* dataValues) const;
 1085     /*!  \overload
 1086     */
 1087     void putVar(const std::vector<size_t>& startp, const std::vector<size_t>& countp, const std::vector<ptrdiff_t>& stridep, const std::vector<ptrdiff_t>& imapp, const long* dataValues) const;
 1088     /*!  \overload
 1089     */
 1090     void putVar(const std::vector<size_t>& startp, const std::vector<size_t>& countp, const std::vector<ptrdiff_t>& stridep, const std::vector<ptrdiff_t>& imapp, const float* dataValues) const;
 1091     /*!  \overload
 1092     */
 1093     void putVar(const std::vector<size_t>& startp, const std::vector<size_t>& countp, const std::vector<ptrdiff_t>& stridep, const std::vector<ptrdiff_t>& imapp, const double* dataValues) const;
 1094     /*!  \overload
 1095     */
 1096     void putVar(const std::vector<size_t>& startp, const std::vector<size_t>& countp, const std::vector<ptrdiff_t>& stridep, const std::vector<ptrdiff_t>& imapp, const unsigned short* dataValues) const;
 1097     /*!  \overload
 1098     */
 1099     void putVar(const std::vector<size_t>& startp, const std::vector<size_t>& countp, const std::vector<ptrdiff_t>& stridep, const std::vector<ptrdiff_t>& imapp, const unsigned int* dataValues) const;
 1100     /*!  \overload
 1101     */
 1102     void putVar(const std::vector<size_t>& startp, const std::vector<size_t>& countp, const std::vector<ptrdiff_t>& stridep, const std::vector<ptrdiff_t>& imapp, const unsigned long long* dataValues) const;
 1103     /*!
 1104       Writes a mapped array section of values into the netCDF variable.
 1105       The mapped array section is specified by giving a corner, a vector of counts, a stride vector, and an index mapping vector.
 1106       The index mapping vector is a vector of integers that specifies the mapping between the dimensions of a netCDF variable and the in-memory structure of the internal data array.
 1107       No assumptions are made about the ordering or length of the dimensions of the data array.
 1108 
 1109       \param countp  Vector specifying the number of indices selected along each dimension.
 1110       To write a single value, for example, specify count as (1, 1, ... , 1). The elements of
 1111       count correspond, in order, to the variable's dimensions. Hence, if the variable is a record
 1112       variable, the first element of count corresponds to a count of the number of records to write. Note: setting any element
 1113       of the count array to zero causes the function to exit without error, and without doing anything.
 1114 
 1115       \param stridep  A vector of ptrdiff_t integers that specifies the sampling interval along each dimension of the netCDF variable.
 1116       The elements of the stride vector correspond, in order, to the netCDF variable's dimensions (stride[0] gives the sampling interval
 1117       along the most slowly varying dimension of the netCDF variable). Sampling intervals are specified in type-independent units of
 1118       elements (a value of 1 selects consecutive elements of the netCDF variable along the corresponding dimension, a value of 2 selects
 1119       every other element, etc.). A NULL stride argument is treated as (1, 1, ... , 1).
 1120 
 1121       \param imap Vector  specifies the mapping between the dimensions of a netCDF variable and the in-memory structure of the internal data array.
 1122       The elements of the index mapping vector correspond, in order, to the netCDF variable's dimensions (imap[0] gives the distance between elements
 1123       of the internal array corresponding to the most slowly varying dimension of the netCDF variable). Distances between elements are
 1124       specified in type-independent units of elements (the distance between internal elements that occupy adjacent memory locations is
 1125       1 and not the element's byte-length as in netCDF 2). A NULL argument means the memory-resident values have the same structure as
 1126       the associated netCDF variable.
 1127 
 1128       \param dataValues The data values. The order in which the data will be written to the netCDF variable is with the last
 1129       dimension of the specified variable varying fastest. If the type of data values differs from the netCDF variable type, type conversion will occur.
 1130      (However, no type conversion is carried out for variables using the user-defined data types:  nc_Vlen, nc_Opaque, nc_Compound and nc_Enum.)
 1131 */
 1132     void putVar(const std::vector<size_t>& startp, const std::vector<size_t>& countp, const std::vector<ptrdiff_t>& stridep, const std::vector<ptrdiff_t>& imapp, const long long* dataValues) const;
 1133 
 1134 
 1135 
 1136   private:
 1137 
 1138     bool nullObject;
 1139 
 1140     int myId;
 1141 
 1142     int groupId;
 1143 
 1144   };
 1145 
 1146 
 1147 }
 1148 
 1149 
 1150 
 1151 #endif