mirror of
https://github.com/Unidata/netcdf-cxx4.git
synced 2024-11-21 03:13:46 +08:00
Merge branch 'compiler_warnings_operators' of https://github.com/jarlela/netcdf-cxx4 into jarlela-compiler_warnings_operators
This commit is contained in:
commit
3b43a4c012
@ -98,7 +98,7 @@ void NcAtt::getValues(string& dataValues) const {
|
||||
char* tmpValues;
|
||||
tmpValues = (char *) malloc(att_len + 1); /* + 1 for trailing null */
|
||||
|
||||
if(typeClass == NcType::nc_VLEN | typeClass == NcType::nc_OPAQUE | typeClass == NcType::nc_ENUM | typeClass == NcType::nc_COMPOUND)
|
||||
if(typeClass == NcType::nc_VLEN || typeClass == NcType::nc_OPAQUE || typeClass == NcType::nc_ENUM || typeClass == NcType::nc_COMPOUND)
|
||||
ncCheck(nc_get_att(groupId,varId,myName.c_str(),tmpValues),__FILE__,__LINE__);
|
||||
else
|
||||
ncCheck(nc_get_att_text(groupId,varId,myName.c_str(),tmpValues),__FILE__,__LINE__);
|
||||
@ -109,7 +109,7 @@ void NcAtt::getValues(string& dataValues) const {
|
||||
// Gets a netCDF variable attribute.
|
||||
void NcAtt::getValues(char* dataValues) const {
|
||||
NcType::ncType typeClass(getType().getTypeClass());
|
||||
if(typeClass == NcType::nc_VLEN | typeClass == NcType::nc_OPAQUE | typeClass == NcType::nc_ENUM | typeClass == NcType::nc_COMPOUND)
|
||||
if(typeClass == NcType::nc_VLEN || typeClass == NcType::nc_OPAQUE || typeClass == NcType::nc_ENUM || typeClass == NcType::nc_COMPOUND)
|
||||
ncCheck(nc_get_att(groupId,varId,myName.c_str(),dataValues),__FILE__,__LINE__);
|
||||
else
|
||||
ncCheck(nc_get_att_text(groupId,varId,myName.c_str(),dataValues),__FILE__,__LINE__);
|
||||
@ -119,7 +119,7 @@ void NcAtt::getValues(char* dataValues) const {
|
||||
// Gets a netCDF variable attribute.
|
||||
void NcAtt::getValues(unsigned char* dataValues) const {
|
||||
NcType::ncType typeClass(getType().getTypeClass());
|
||||
if(typeClass == NcType::nc_VLEN | typeClass == NcType::nc_OPAQUE | typeClass == NcType::nc_ENUM | typeClass == NcType::nc_COMPOUND)
|
||||
if(typeClass == NcType::nc_VLEN || typeClass == NcType::nc_OPAQUE || typeClass == NcType::nc_ENUM || typeClass == NcType::nc_COMPOUND)
|
||||
ncCheck(nc_get_att(groupId,varId,myName.c_str(),dataValues),__FILE__,__LINE__);
|
||||
else
|
||||
ncCheck(nc_get_att_uchar(groupId,varId,myName.c_str(),dataValues),__FILE__,__LINE__);
|
||||
@ -128,7 +128,7 @@ void NcAtt::getValues(unsigned char* dataValues) const {
|
||||
// Gets a netCDF variable attribute.
|
||||
void NcAtt::getValues(signed char* dataValues) const {
|
||||
NcType::ncType typeClass(getType().getTypeClass());
|
||||
if(typeClass == NcType::nc_VLEN | typeClass == NcType::nc_OPAQUE | typeClass == NcType::nc_ENUM | typeClass == NcType::nc_COMPOUND)
|
||||
if(typeClass == NcType::nc_VLEN || typeClass == NcType::nc_OPAQUE || typeClass == NcType::nc_ENUM || typeClass == NcType::nc_COMPOUND)
|
||||
ncCheck(nc_get_att(groupId,varId,myName.c_str(),dataValues),__FILE__,__LINE__);
|
||||
else
|
||||
ncCheck(nc_get_att_schar(groupId,varId,myName.c_str(),dataValues),__FILE__,__LINE__);
|
||||
@ -137,7 +137,7 @@ void NcAtt::getValues(signed char* dataValues) const {
|
||||
// Gets a netCDF variable attribute.
|
||||
void NcAtt::getValues(short* dataValues) const {
|
||||
NcType::ncType typeClass(getType().getTypeClass());
|
||||
if(typeClass == NcType::nc_VLEN | typeClass == NcType::nc_OPAQUE | typeClass == NcType::nc_ENUM | typeClass == NcType::nc_COMPOUND)
|
||||
if(typeClass == NcType::nc_VLEN || typeClass == NcType::nc_OPAQUE || typeClass == NcType::nc_ENUM || typeClass == NcType::nc_COMPOUND)
|
||||
ncCheck(nc_get_att(groupId,varId,myName.c_str(),dataValues),__FILE__,__LINE__);
|
||||
else
|
||||
ncCheck(nc_get_att_short(groupId,varId,myName.c_str(),dataValues),__FILE__,__LINE__);
|
||||
@ -146,7 +146,7 @@ void NcAtt::getValues(short* dataValues) const {
|
||||
// Gets a netCDF variable attribute.
|
||||
void NcAtt::getValues(int* dataValues) const {
|
||||
NcType::ncType typeClass(getType().getTypeClass());
|
||||
if(typeClass == NcType::nc_VLEN | typeClass == NcType::nc_OPAQUE | typeClass == NcType::nc_ENUM | typeClass == NcType::nc_COMPOUND)
|
||||
if(typeClass == NcType::nc_VLEN || typeClass == NcType::nc_OPAQUE || typeClass == NcType::nc_ENUM || typeClass == NcType::nc_COMPOUND)
|
||||
ncCheck(nc_get_att(groupId,varId,myName.c_str(),dataValues),__FILE__,__LINE__);
|
||||
else
|
||||
ncCheck(nc_get_att_int(groupId,varId,myName.c_str(),dataValues),__FILE__,__LINE__);
|
||||
@ -155,7 +155,7 @@ void NcAtt::getValues(int* dataValues) const {
|
||||
// Gets a netCDF variable attribute.
|
||||
void NcAtt::getValues(long* dataValues) const {
|
||||
NcType::ncType typeClass(getType().getTypeClass());
|
||||
if(typeClass == NcType::nc_VLEN | typeClass == NcType::nc_OPAQUE | typeClass == NcType::nc_ENUM | typeClass == NcType::nc_COMPOUND)
|
||||
if(typeClass == NcType::nc_VLEN || typeClass == NcType::nc_OPAQUE || typeClass == NcType::nc_ENUM || typeClass == NcType::nc_COMPOUND)
|
||||
ncCheck(nc_get_att(groupId,varId,myName.c_str(),dataValues),__FILE__,__LINE__);
|
||||
else
|
||||
ncCheck(nc_get_att_long(groupId,varId,myName.c_str(),dataValues),__FILE__,__LINE__);
|
||||
@ -164,7 +164,7 @@ void NcAtt::getValues(long* dataValues) const {
|
||||
// Gets a netCDF variable attribute.
|
||||
void NcAtt::getValues(float* dataValues) const {
|
||||
NcType::ncType typeClass(getType().getTypeClass());
|
||||
if(typeClass == NcType::nc_VLEN | typeClass == NcType::nc_OPAQUE | typeClass == NcType::nc_ENUM | typeClass == NcType::nc_COMPOUND)
|
||||
if(typeClass == NcType::nc_VLEN || typeClass == NcType::nc_OPAQUE || typeClass == NcType::nc_ENUM || typeClass == NcType::nc_COMPOUND)
|
||||
ncCheck(nc_get_att(groupId,varId,myName.c_str(),dataValues),__FILE__,__LINE__);
|
||||
else
|
||||
ncCheck(nc_get_att_float(groupId,varId,myName.c_str(),dataValues),__FILE__,__LINE__);
|
||||
@ -173,7 +173,7 @@ void NcAtt::getValues(float* dataValues) const {
|
||||
// Gets a netCDF variable attribute.
|
||||
void NcAtt::getValues(double* dataValues) const {
|
||||
NcType::ncType typeClass(getType().getTypeClass());
|
||||
if(typeClass == NcType::nc_VLEN | typeClass == NcType::nc_OPAQUE | typeClass == NcType::nc_ENUM | typeClass == NcType::nc_COMPOUND)
|
||||
if(typeClass == NcType::nc_VLEN || typeClass == NcType::nc_OPAQUE || typeClass == NcType::nc_ENUM || typeClass == NcType::nc_COMPOUND)
|
||||
ncCheck(nc_get_att(groupId,varId,myName.c_str(),dataValues),__FILE__,__LINE__);
|
||||
else
|
||||
ncCheck(nc_get_att_double(groupId,varId,myName.c_str(),dataValues),__FILE__,__LINE__);
|
||||
@ -182,7 +182,7 @@ void NcAtt::getValues(double* dataValues) const {
|
||||
// Gets a netCDF variable attribute.
|
||||
void NcAtt::getValues(unsigned short* dataValues) const {
|
||||
NcType::ncType typeClass(getType().getTypeClass());
|
||||
if(typeClass == NcType::nc_VLEN | typeClass == NcType::nc_OPAQUE | typeClass == NcType::nc_ENUM | typeClass == NcType::nc_COMPOUND)
|
||||
if(typeClass == NcType::nc_VLEN || typeClass == NcType::nc_OPAQUE || typeClass == NcType::nc_ENUM || typeClass == NcType::nc_COMPOUND)
|
||||
ncCheck(nc_get_att(groupId,varId,myName.c_str(),dataValues),__FILE__,__LINE__);
|
||||
else
|
||||
ncCheck(nc_get_att_ushort(groupId,varId,myName.c_str(),dataValues),__FILE__,__LINE__);
|
||||
@ -191,7 +191,7 @@ void NcAtt::getValues(unsigned short* dataValues) const {
|
||||
// Gets a netCDF variable attribute.
|
||||
void NcAtt::getValues(unsigned int* dataValues) const {
|
||||
NcType::ncType typeClass(getType().getTypeClass());
|
||||
if(typeClass == NcType::nc_VLEN | typeClass == NcType::nc_OPAQUE | typeClass == NcType::nc_ENUM | typeClass == NcType::nc_COMPOUND)
|
||||
if(typeClass == NcType::nc_VLEN || typeClass == NcType::nc_OPAQUE || typeClass == NcType::nc_ENUM || typeClass == NcType::nc_COMPOUND)
|
||||
ncCheck(nc_get_att(groupId,varId,myName.c_str(),dataValues),__FILE__,__LINE__);
|
||||
else
|
||||
ncCheck(nc_get_att_uint(groupId,varId,myName.c_str(),dataValues),__FILE__,__LINE__);
|
||||
@ -200,7 +200,7 @@ void NcAtt::getValues(unsigned int* dataValues) const {
|
||||
// Gets a netCDF variable attribute.
|
||||
void NcAtt::getValues(long long* dataValues) const {
|
||||
NcType::ncType typeClass(getType().getTypeClass());
|
||||
if(typeClass == NcType::nc_VLEN | typeClass == NcType::nc_OPAQUE | typeClass == NcType::nc_ENUM | typeClass == NcType::nc_COMPOUND)
|
||||
if(typeClass == NcType::nc_VLEN || typeClass == NcType::nc_OPAQUE || typeClass == NcType::nc_ENUM || typeClass == NcType::nc_COMPOUND)
|
||||
ncCheck(nc_get_att(groupId,varId,myName.c_str(),dataValues),__FILE__,__LINE__);
|
||||
else
|
||||
ncCheck(nc_get_att_longlong(groupId,varId,myName.c_str(),dataValues),__FILE__,__LINE__);
|
||||
@ -209,7 +209,7 @@ void NcAtt::getValues(long long* dataValues) const {
|
||||
// Gets a netCDF variable attribute.
|
||||
void NcAtt::getValues(unsigned long long* dataValues) const {
|
||||
NcType::ncType typeClass(getType().getTypeClass());
|
||||
if(typeClass == NcType::nc_VLEN | typeClass == NcType::nc_OPAQUE | typeClass == NcType::nc_ENUM | typeClass == NcType::nc_COMPOUND)
|
||||
if(typeClass == NcType::nc_VLEN || typeClass == NcType::nc_OPAQUE || typeClass == NcType::nc_ENUM || typeClass == NcType::nc_COMPOUND)
|
||||
ncCheck(nc_get_att(groupId,varId,myName.c_str(),dataValues),__FILE__,__LINE__);
|
||||
else
|
||||
ncCheck(nc_get_att_ulonglong(groupId,varId,myName.c_str(),dataValues),__FILE__,__LINE__);
|
||||
@ -218,7 +218,7 @@ void NcAtt::getValues(unsigned long long* dataValues) const {
|
||||
// Gets a netCDF variable attribute.
|
||||
void NcAtt::getValues(char** dataValues) const {
|
||||
NcType::ncType typeClass(getType().getTypeClass());
|
||||
if(typeClass == NcType::nc_VLEN | typeClass == NcType::nc_OPAQUE | typeClass == NcType::nc_ENUM | typeClass == NcType::nc_COMPOUND)
|
||||
if(typeClass == NcType::nc_VLEN || typeClass == NcType::nc_OPAQUE || typeClass == NcType::nc_ENUM || typeClass == NcType::nc_COMPOUND)
|
||||
ncCheck(nc_get_att(groupId,varId,myName.c_str(),dataValues),__FILE__,__LINE__);
|
||||
else
|
||||
ncCheck(nc_get_att_string(groupId,varId,myName.c_str(),dataValues),__FILE__,__LINE__);
|
||||
|
@ -611,7 +611,7 @@ NcGroupAtt NcGroup::putAtt(const string& name, const string& dataValues) const {
|
||||
// Creates a new NetCDF group attribute or if already exisiting replaces it.
|
||||
NcGroupAtt NcGroup::putAtt(const string& name, const NcType& type, size_t len, const unsigned char* dataValues) const {
|
||||
NcType::ncType typeClass(type.getTypeClass());
|
||||
if(typeClass == NcType::nc_VLEN | typeClass == NcType::nc_OPAQUE | typeClass == NcType::nc_ENUM | typeClass == NcType::nc_COMPOUND)
|
||||
if(typeClass == NcType::nc_VLEN || typeClass == NcType::nc_OPAQUE || typeClass == NcType::nc_ENUM || typeClass == NcType::nc_COMPOUND)
|
||||
ncCheck(nc_put_att(myId,NC_GLOBAL,name.c_str(),type.getId(),len,dataValues),__FILE__,__LINE__);
|
||||
else
|
||||
ncCheck(nc_put_att_uchar(myId,NC_GLOBAL,name.c_str(),type.getId(),len,dataValues),__FILE__,__LINE__);
|
||||
@ -623,7 +623,7 @@ NcGroupAtt NcGroup::putAtt(const string& name, const NcType& type, size_t len, c
|
||||
// Creates a new NetCDF group attribute or if already exisiting replaces it.
|
||||
NcGroupAtt NcGroup::putAtt(const string& name, const NcType& type, size_t len, const signed char* dataValues) const {
|
||||
NcType::ncType typeClass(type.getTypeClass());
|
||||
if(typeClass == NcType::nc_VLEN | typeClass == NcType::nc_OPAQUE | typeClass == NcType::nc_ENUM | typeClass == NcType::nc_COMPOUND)
|
||||
if(typeClass == NcType::nc_VLEN || typeClass == NcType::nc_OPAQUE || typeClass == NcType::nc_ENUM || typeClass == NcType::nc_COMPOUND)
|
||||
ncCheck(nc_put_att(myId,NC_GLOBAL,name.c_str(),type.getId(),len,dataValues),__FILE__,__LINE__);
|
||||
else
|
||||
ncCheck(nc_put_att_schar(myId,NC_GLOBAL,name.c_str(),type.getId(),len,dataValues),__FILE__,__LINE__);
|
||||
@ -635,7 +635,7 @@ NcGroupAtt NcGroup::putAtt(const string& name, const NcType& type, size_t len, c
|
||||
// Creates a new NetCDF group attribute or if already exisiting replaces it.
|
||||
NcGroupAtt NcGroup::putAtt(const string& name, const NcType& type, short datumValue) const {
|
||||
NcType::ncType typeClass(type.getTypeClass());
|
||||
if(typeClass == NcType::nc_VLEN | typeClass == NcType::nc_OPAQUE | typeClass == NcType::nc_ENUM | typeClass == NcType::nc_COMPOUND)
|
||||
if(typeClass == NcType::nc_VLEN || typeClass == NcType::nc_OPAQUE || typeClass == NcType::nc_ENUM || typeClass == NcType::nc_COMPOUND)
|
||||
ncCheck(nc_put_att(myId,NC_GLOBAL,name.c_str(),type.getId(),1,&datumValue),__FILE__,__LINE__);
|
||||
else
|
||||
ncCheck(nc_put_att_short(myId,NC_GLOBAL,name.c_str(),type.getId(),1,&datumValue),__FILE__,__LINE__);
|
||||
@ -647,7 +647,7 @@ NcGroupAtt NcGroup::putAtt(const string& name, const NcType& type, short datumVa
|
||||
// Creates a new NetCDF group attribute or if already exisiting replaces it.
|
||||
NcGroupAtt NcGroup::putAtt(const string& name, const NcType& type, int datumValue) const {
|
||||
NcType::ncType typeClass(type.getTypeClass());
|
||||
if(typeClass == NcType::nc_VLEN | typeClass == NcType::nc_OPAQUE | typeClass == NcType::nc_ENUM | typeClass == NcType::nc_COMPOUND)
|
||||
if(typeClass == NcType::nc_VLEN || typeClass == NcType::nc_OPAQUE || typeClass == NcType::nc_ENUM || typeClass == NcType::nc_COMPOUND)
|
||||
ncCheck(nc_put_att(myId,NC_GLOBAL,name.c_str(),type.getId(),1,&datumValue),__FILE__,__LINE__);
|
||||
else
|
||||
ncCheck(nc_put_att_int(myId,NC_GLOBAL,name.c_str(),type.getId(),1,&datumValue),__FILE__,__LINE__);
|
||||
@ -658,7 +658,7 @@ NcGroupAtt NcGroup::putAtt(const string& name, const NcType& type, int datumValu
|
||||
// Creates a new NetCDF group attribute or if already exisiting replaces it.
|
||||
NcGroupAtt NcGroup::putAtt(const string& name, const NcType& type, long datumValue) const {
|
||||
NcType::ncType typeClass(type.getTypeClass());
|
||||
if(typeClass == NcType::nc_VLEN | typeClass == NcType::nc_OPAQUE | typeClass == NcType::nc_ENUM | typeClass == NcType::nc_COMPOUND)
|
||||
if(typeClass == NcType::nc_VLEN || typeClass == NcType::nc_OPAQUE || typeClass == NcType::nc_ENUM || typeClass == NcType::nc_COMPOUND)
|
||||
ncCheck(nc_put_att(myId,NC_GLOBAL,name.c_str(),type.getId(),1,&datumValue),__FILE__,__LINE__);
|
||||
else
|
||||
ncCheck(nc_put_att_long(myId,NC_GLOBAL,name.c_str(),type.getId(),1,&datumValue),__FILE__,__LINE__);
|
||||
@ -669,7 +669,7 @@ NcGroupAtt NcGroup::putAtt(const string& name, const NcType& type, long datumVal
|
||||
// Creates a new NetCDF group attribute or if already exisiting replaces it.
|
||||
NcGroupAtt NcGroup::putAtt(const string& name, const NcType& type, float datumValue) const {
|
||||
NcType::ncType typeClass(type.getTypeClass());
|
||||
if(typeClass == NcType::nc_VLEN | typeClass == NcType::nc_OPAQUE | typeClass == NcType::nc_ENUM | typeClass == NcType::nc_COMPOUND)
|
||||
if(typeClass == NcType::nc_VLEN || typeClass == NcType::nc_OPAQUE || typeClass == NcType::nc_ENUM || typeClass == NcType::nc_COMPOUND)
|
||||
ncCheck(nc_put_att(myId,NC_GLOBAL,name.c_str(),type.getId(),1,&datumValue),__FILE__,__LINE__);
|
||||
else
|
||||
ncCheck(nc_put_att_float(myId,NC_GLOBAL,name.c_str(),type.getId(),1,&datumValue),__FILE__,__LINE__);
|
||||
@ -681,7 +681,7 @@ NcGroupAtt NcGroup::putAtt(const string& name, const NcType& type, float datumVa
|
||||
// Creates a new NetCDF group attribute or if already exisiting replaces it.
|
||||
NcGroupAtt NcGroup::putAtt(const string& name, const NcType& type, double datumValue) const {
|
||||
NcType::ncType typeClass(type.getTypeClass());
|
||||
if(typeClass == NcType::nc_VLEN | typeClass == NcType::nc_OPAQUE | typeClass == NcType::nc_ENUM | typeClass == NcType::nc_COMPOUND)
|
||||
if(typeClass == NcType::nc_VLEN || typeClass == NcType::nc_OPAQUE || typeClass == NcType::nc_ENUM || typeClass == NcType::nc_COMPOUND)
|
||||
ncCheck(nc_put_att(myId,NC_GLOBAL,name.c_str(),type.getId(),1,&datumValue),__FILE__,__LINE__);
|
||||
else
|
||||
ncCheck(nc_put_att_double(myId,NC_GLOBAL,name.c_str(),type.getId(),1,&datumValue),__FILE__,__LINE__);
|
||||
@ -693,7 +693,7 @@ NcGroupAtt NcGroup::putAtt(const string& name, const NcType& type, double datumV
|
||||
// Creates a new NetCDF group attribute or if already exisiting replaces it.
|
||||
NcGroupAtt NcGroup::putAtt(const string& name, const NcType& type, unsigned short datumValue) const {
|
||||
NcType::ncType typeClass(type.getTypeClass());
|
||||
if(typeClass == NcType::nc_VLEN | typeClass == NcType::nc_OPAQUE | typeClass == NcType::nc_ENUM | typeClass == NcType::nc_COMPOUND)
|
||||
if(typeClass == NcType::nc_VLEN || typeClass == NcType::nc_OPAQUE || typeClass == NcType::nc_ENUM || typeClass == NcType::nc_COMPOUND)
|
||||
ncCheck(nc_put_att(myId,NC_GLOBAL,name.c_str(),type.getId(),1,&datumValue),__FILE__,__LINE__);
|
||||
else
|
||||
ncCheck(nc_put_att_ushort(myId,NC_GLOBAL,name.c_str(),type.getId(),1,&datumValue),__FILE__,__LINE__);
|
||||
@ -704,7 +704,7 @@ NcGroupAtt NcGroup::putAtt(const string& name, const NcType& type, unsigned shor
|
||||
// Creates a new NetCDF group attribute or if already exisiting replaces it.
|
||||
NcGroupAtt NcGroup::putAtt(const string& name, const NcType& type, unsigned int datumValue) const {
|
||||
NcType::ncType typeClass(type.getTypeClass());
|
||||
if(typeClass == NcType::nc_VLEN | typeClass == NcType::nc_OPAQUE | typeClass == NcType::nc_ENUM | typeClass == NcType::nc_COMPOUND)
|
||||
if(typeClass == NcType::nc_VLEN || typeClass == NcType::nc_OPAQUE || typeClass == NcType::nc_ENUM || typeClass == NcType::nc_COMPOUND)
|
||||
ncCheck(nc_put_att(myId,NC_GLOBAL,name.c_str(),type.getId(),1,&datumValue),__FILE__,__LINE__);
|
||||
else
|
||||
ncCheck(nc_put_att_uint(myId,NC_GLOBAL,name.c_str(),type.getId(),1,&datumValue),__FILE__,__LINE__);
|
||||
@ -715,7 +715,7 @@ NcGroupAtt NcGroup::putAtt(const string& name, const NcType& type, unsigned int
|
||||
// Creates a new NetCDF group attribute or if already exisiting replaces it.
|
||||
NcGroupAtt NcGroup::putAtt(const string& name, const NcType& type, long long datumValue) const {
|
||||
NcType::ncType typeClass(type.getTypeClass());
|
||||
if(typeClass == NcType::nc_VLEN | typeClass == NcType::nc_OPAQUE | typeClass == NcType::nc_ENUM | typeClass == NcType::nc_COMPOUND)
|
||||
if(typeClass == NcType::nc_VLEN || typeClass == NcType::nc_OPAQUE || typeClass == NcType::nc_ENUM || typeClass == NcType::nc_COMPOUND)
|
||||
ncCheck(nc_put_att(myId,NC_GLOBAL,name.c_str(),type.getId(),1,&datumValue),__FILE__,__LINE__);
|
||||
else
|
||||
ncCheck(nc_put_att_longlong(myId,NC_GLOBAL,name.c_str(),type.getId(),1,&datumValue),__FILE__,__LINE__);
|
||||
@ -727,7 +727,7 @@ NcGroupAtt NcGroup::putAtt(const string& name, const NcType& type, long long dat
|
||||
// Creates a new NetCDF group attribute or if already exisiting replaces it.
|
||||
NcGroupAtt NcGroup::putAtt(const string& name, const NcType& type, unsigned long long datumValue) const {
|
||||
NcType::ncType typeClass(type.getTypeClass());
|
||||
if(typeClass == NcType::nc_VLEN | typeClass == NcType::nc_OPAQUE | typeClass == NcType::nc_ENUM | typeClass == NcType::nc_COMPOUND)
|
||||
if(typeClass == NcType::nc_VLEN || typeClass == NcType::nc_OPAQUE || typeClass == NcType::nc_ENUM || typeClass == NcType::nc_COMPOUND)
|
||||
ncCheck(nc_put_att(myId,NC_GLOBAL,name.c_str(),type.getId(),1,&datumValue),__FILE__,__LINE__);
|
||||
else
|
||||
ncCheck(nc_put_att_ulonglong(myId,NC_GLOBAL,name.c_str(),type.getId(),1,&datumValue),__FILE__,__LINE__);
|
||||
@ -739,7 +739,7 @@ NcGroupAtt NcGroup::putAtt(const string& name, const NcType& type, unsigned long
|
||||
// Creates a new NetCDF group attribute or if already exisiting replaces it.
|
||||
NcGroupAtt NcGroup::putAtt(const string& name, const NcType& type, size_t len, const short* dataValues) const {
|
||||
NcType::ncType typeClass(type.getTypeClass());
|
||||
if(typeClass == NcType::nc_VLEN | typeClass == NcType::nc_OPAQUE | typeClass == NcType::nc_ENUM | typeClass == NcType::nc_COMPOUND)
|
||||
if(typeClass == NcType::nc_VLEN || typeClass == NcType::nc_OPAQUE || typeClass == NcType::nc_ENUM || typeClass == NcType::nc_COMPOUND)
|
||||
ncCheck(nc_put_att(myId,NC_GLOBAL,name.c_str(),type.getId(),len,dataValues),__FILE__,__LINE__);
|
||||
else
|
||||
ncCheck(nc_put_att_short(myId,NC_GLOBAL,name.c_str(),type.getId(),len,dataValues),__FILE__,__LINE__);
|
||||
@ -751,7 +751,7 @@ NcGroupAtt NcGroup::putAtt(const string& name, const NcType& type, size_t len, c
|
||||
// Creates a new NetCDF group attribute or if already exisiting replaces it.
|
||||
NcGroupAtt NcGroup::putAtt(const string& name, const NcType& type, size_t len, const int* dataValues) const {
|
||||
NcType::ncType typeClass(type.getTypeClass());
|
||||
if(typeClass == NcType::nc_VLEN | typeClass == NcType::nc_OPAQUE | typeClass == NcType::nc_ENUM | typeClass == NcType::nc_COMPOUND)
|
||||
if(typeClass == NcType::nc_VLEN || typeClass == NcType::nc_OPAQUE || typeClass == NcType::nc_ENUM || typeClass == NcType::nc_COMPOUND)
|
||||
ncCheck(nc_put_att(myId,NC_GLOBAL,name.c_str(),type.getId(),len,dataValues),__FILE__,__LINE__);
|
||||
else
|
||||
ncCheck(nc_put_att_int(myId,NC_GLOBAL,name.c_str(),type.getId(),len,dataValues),__FILE__,__LINE__);
|
||||
@ -762,7 +762,7 @@ NcGroupAtt NcGroup::putAtt(const string& name, const NcType& type, size_t len, c
|
||||
// Creates a new NetCDF group attribute or if already exisiting replaces it.
|
||||
NcGroupAtt NcGroup::putAtt(const string& name, const NcType& type, size_t len, const long* dataValues) const {
|
||||
NcType::ncType typeClass(type.getTypeClass());
|
||||
if(typeClass == NcType::nc_VLEN | typeClass == NcType::nc_OPAQUE | typeClass == NcType::nc_ENUM | typeClass == NcType::nc_COMPOUND)
|
||||
if(typeClass == NcType::nc_VLEN || typeClass == NcType::nc_OPAQUE || typeClass == NcType::nc_ENUM || typeClass == NcType::nc_COMPOUND)
|
||||
ncCheck(nc_put_att(myId,NC_GLOBAL,name.c_str(),type.getId(),len,dataValues),__FILE__,__LINE__);
|
||||
else
|
||||
ncCheck(nc_put_att_long(myId,NC_GLOBAL,name.c_str(),type.getId(),len,dataValues),__FILE__,__LINE__);
|
||||
@ -773,7 +773,7 @@ NcGroupAtt NcGroup::putAtt(const string& name, const NcType& type, size_t len, c
|
||||
// Creates a new NetCDF group attribute or if already exisiting replaces it.
|
||||
NcGroupAtt NcGroup::putAtt(const string& name, const NcType& type, size_t len, const float* dataValues) const {
|
||||
NcType::ncType typeClass(type.getTypeClass());
|
||||
if(typeClass == NcType::nc_VLEN | typeClass == NcType::nc_OPAQUE | typeClass == NcType::nc_ENUM | typeClass == NcType::nc_COMPOUND)
|
||||
if(typeClass == NcType::nc_VLEN || typeClass == NcType::nc_OPAQUE || typeClass == NcType::nc_ENUM || typeClass == NcType::nc_COMPOUND)
|
||||
ncCheck(nc_put_att(myId,NC_GLOBAL,name.c_str(),type.getId(),len,dataValues),__FILE__,__LINE__);
|
||||
else
|
||||
ncCheck(nc_put_att_float(myId,NC_GLOBAL,name.c_str(),type.getId(),len,dataValues),__FILE__,__LINE__);
|
||||
@ -785,7 +785,7 @@ NcGroupAtt NcGroup::putAtt(const string& name, const NcType& type, size_t len, c
|
||||
// Creates a new NetCDF group attribute or if already exisiting replaces it.
|
||||
NcGroupAtt NcGroup::putAtt(const string& name, const NcType& type, size_t len, const double* dataValues) const {
|
||||
NcType::ncType typeClass(type.getTypeClass());
|
||||
if(typeClass == NcType::nc_VLEN | typeClass == NcType::nc_OPAQUE | typeClass == NcType::nc_ENUM | typeClass == NcType::nc_COMPOUND)
|
||||
if(typeClass == NcType::nc_VLEN || typeClass == NcType::nc_OPAQUE || typeClass == NcType::nc_ENUM || typeClass == NcType::nc_COMPOUND)
|
||||
ncCheck(nc_put_att(myId,NC_GLOBAL,name.c_str(),type.getId(),len,dataValues),__FILE__,__LINE__);
|
||||
else
|
||||
ncCheck(nc_put_att_double(myId,NC_GLOBAL,name.c_str(),type.getId(),len,dataValues),__FILE__,__LINE__);
|
||||
@ -797,7 +797,7 @@ NcGroupAtt NcGroup::putAtt(const string& name, const NcType& type, size_t len, c
|
||||
// Creates a new NetCDF group attribute or if already exisiting replaces it.
|
||||
NcGroupAtt NcGroup::putAtt(const string& name, const NcType& type, size_t len, const unsigned short* dataValues) const {
|
||||
NcType::ncType typeClass(type.getTypeClass());
|
||||
if(typeClass == NcType::nc_VLEN | typeClass == NcType::nc_OPAQUE | typeClass == NcType::nc_ENUM | typeClass == NcType::nc_COMPOUND)
|
||||
if(typeClass == NcType::nc_VLEN || typeClass == NcType::nc_OPAQUE || typeClass == NcType::nc_ENUM || typeClass == NcType::nc_COMPOUND)
|
||||
ncCheck(nc_put_att(myId,NC_GLOBAL,name.c_str(),type.getId(),len,dataValues),__FILE__,__LINE__);
|
||||
else
|
||||
ncCheck(nc_put_att_ushort(myId,NC_GLOBAL,name.c_str(),type.getId(),len,dataValues),__FILE__,__LINE__);
|
||||
@ -808,7 +808,7 @@ NcGroupAtt NcGroup::putAtt(const string& name, const NcType& type, size_t len, c
|
||||
// Creates a new NetCDF group attribute or if already exisiting replaces it.
|
||||
NcGroupAtt NcGroup::putAtt(const string& name, const NcType& type, size_t len, const unsigned int* dataValues) const {
|
||||
NcType::ncType typeClass(type.getTypeClass());
|
||||
if(typeClass == NcType::nc_VLEN | typeClass == NcType::nc_OPAQUE | typeClass == NcType::nc_ENUM | typeClass == NcType::nc_COMPOUND)
|
||||
if(typeClass == NcType::nc_VLEN || typeClass == NcType::nc_OPAQUE || typeClass == NcType::nc_ENUM || typeClass == NcType::nc_COMPOUND)
|
||||
ncCheck(nc_put_att(myId,NC_GLOBAL,name.c_str(),type.getId(),len,dataValues),__FILE__,__LINE__);
|
||||
else
|
||||
ncCheck(nc_put_att_uint(myId,NC_GLOBAL,name.c_str(),type.getId(),len,dataValues),__FILE__,__LINE__);
|
||||
@ -819,7 +819,7 @@ NcGroupAtt NcGroup::putAtt(const string& name, const NcType& type, size_t len, c
|
||||
// Creates a new NetCDF group attribute or if already exisiting replaces it.
|
||||
NcGroupAtt NcGroup::putAtt(const string& name, const NcType& type, size_t len, const long long* dataValues) const {
|
||||
NcType::ncType typeClass(type.getTypeClass());
|
||||
if(typeClass == NcType::nc_VLEN | typeClass == NcType::nc_OPAQUE | typeClass == NcType::nc_ENUM | typeClass == NcType::nc_COMPOUND)
|
||||
if(typeClass == NcType::nc_VLEN || typeClass == NcType::nc_OPAQUE || typeClass == NcType::nc_ENUM || typeClass == NcType::nc_COMPOUND)
|
||||
ncCheck(nc_put_att(myId,NC_GLOBAL,name.c_str(),type.getId(),len,dataValues),__FILE__,__LINE__);
|
||||
else
|
||||
ncCheck(nc_put_att_longlong(myId,NC_GLOBAL,name.c_str(),type.getId(),len,dataValues),__FILE__,__LINE__);
|
||||
@ -831,7 +831,7 @@ NcGroupAtt NcGroup::putAtt(const string& name, const NcType& type, size_t len, c
|
||||
// Creates a new NetCDF group attribute or if already exisiting replaces it.
|
||||
NcGroupAtt NcGroup::putAtt(const string& name, const NcType& type, size_t len, const unsigned long long* dataValues) const {
|
||||
NcType::ncType typeClass(type.getTypeClass());
|
||||
if(typeClass == NcType::nc_VLEN | typeClass == NcType::nc_OPAQUE | typeClass == NcType::nc_ENUM | typeClass == NcType::nc_COMPOUND)
|
||||
if(typeClass == NcType::nc_VLEN || typeClass == NcType::nc_OPAQUE || typeClass == NcType::nc_ENUM || typeClass == NcType::nc_COMPOUND)
|
||||
ncCheck(nc_put_att(myId,NC_GLOBAL,name.c_str(),type.getId(),len,dataValues),__FILE__,__LINE__);
|
||||
else
|
||||
ncCheck(nc_put_att_ulonglong(myId,NC_GLOBAL,name.c_str(),type.getId(),len,dataValues),__FILE__,__LINE__);
|
||||
|
304
cxx4/ncVar.cpp
304
cxx4/ncVar.cpp
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user