16 #ifndef INC_netcdf_NcAtt_h
17 #define INC_netcdf_NcAtt_h
32 typedef std::multimap<std::string, NcType>
NcTypeMap;
40 NcAtt (
bool const isNullObject);
45 std::string
const attName,
46 int const useGroupID =
nullID,
85 void Get (
unsigned char & data)
const;
86 void Get (
signed char & data)
const;
87 void Get (
char & data)
const;
88 void Get (
short & data)
const;
89 void Get (
unsigned short & data)
const;
90 void Get (
int & data)
const;
91 void Get (
long & data)
const;
92 void Get (
unsigned int & data)
const;
93 void Get (
unsigned long & data)
const;
94 void Get (
float & data)
const;
95 void Get (
double & data)
const;
96 void Get (
long long & data)
const;
97 void Get (
unsigned long long & data)
const;
100 void Get (
unsigned char*
const data)
const;
101 void Get (
signed char*
const data)
const;
102 void Get (
char*
const data)
const;
103 void Get (
short*
const data)
const;
104 void Get (
unsigned short*
const data)
const;
105 void Get (
int*
const data)
const;
106 void Get (
long*
const data)
const;
107 void Get (
unsigned int*
const data)
const;
108 void Get (
float*
const data)
const;
109 void Get (
double*
const data)
const;
110 void Get (
long long*
const data)
const;
111 void Get (
unsigned long long*
const data)
const;
112 void Get (
char**
const data)
const;
113 void Get (std::string& data)
const;
123 void Get (
void* data)
const;
124 virtual void Rename( std::string
const & newname );
132 if (
GetType().getTypeClass() != typeWanted )
136 inline void CheckLength (
int const maxLengthWanted )
const
138 if (
Size() > maxLengthWanted )
139 NcEXCEPTION(
"attribute data length > length of variable" );
149 #endif // INC_netcdf_NcAtt_h
ncType
Definition: NcType.h:56
std::vector< unsigned int > TVecUint
Definition: NcType.h:37
virtual ~NcAtt()
Definition: NcAtt.h:34
std::vector< long long > TVecInt64
Definition: NcType.h:40
bool operator!=(NcAtt const &rhs) const
Definition: NcAtt.h:66
int Size() const
number of elements
Definition: NcAtt.cpp:144
std::vector< char > TVecChar
Definition: NcType.h:33
std::vector< signed char > TVecByte
Definition: NcType.h:28
std::multimap< std::string, NcType > NcTypeMap
Definition: NcAtt.h:32
NcAtt()
Definition: NcAtt.cpp:38
virtual void Rename(std::string const &newname)
Definition: NcAtt.cpp:88
std::vector< unsigned long long > TVecUint64
Definition: NcType.h:41
std::vector< short > TVecShort
Definition: NcType.h:34
std::vector< unsigned char > TVecUbyte
Definition: NcType.h:32
#define NcEXCEPTION(a_)
Definition: NcException.h:67
Represents a netCDF attribute.
Definition: NcAtt.h:27
bool operator<(NcAtt const &rhs) const
Definition: NcAtt.cpp:102
static int const nullID
Definition: NcItem.h:27
std::vector< std::string > TVecString
Definition: NcType.h:42
NcGroup GetParentGroup() const
Definition: NcAtt.cpp:110
NcAtt & operator=(NcAtt const &rhs)
Copy attribute to this variable.
Definition: NcAtt.cpp:80
NcType GetType() const
Definition: NcAtt.cpp:117
void Get(TVecUbyte &data) const
get NcUbyte vector
Definition: NcAtt.cpp:155
std::vector< float > TVecFloat
Definition: NcType.h:38
std::vector< unsigned short > TVecUshort
Definition: NcType.h:35
int const GetVarID() const
Definition: NcAtt.h:63
std::vector< int > TVecInt
Definition: NcType.h:36
Base class for NcAtt, NcVar, NcDim, NcGroup.
Definition: NcItem.h:22
Base class for all netCDF data types.
Definition: NcType.h:47
std::vector< double > TVecDouble
Definition: NcType.h:39
bool operator==(NcAtt const &rhs) const
Definition: NcAtt.cpp:94
Represents a netCDF group.
Definition: NcGroup.h:36