NetCDF-C++
4.3.1-developer
|
Base class inherited by NcOpaque, NcVlen, NcCompound and NcEnum classes. More...
#include "ncType.h"
Public Types | |
enum | ncType { nc_BYTE = NC_BYTE, nc_CHAR = NC_CHAR, nc_SHORT = NC_SHORT, nc_INT = NC_INT, nc_FLOAT = NC_FLOAT, nc_DOUBLE = NC_DOUBLE, nc_UBYTE = NC_UBYTE, nc_USHORT = NC_USHORT, nc_UINT = NC_UINT, nc_INT64 = NC_INT64, nc_UINT64 = NC_UINT64, nc_STRING = NC_STRING, nc_VLEN = NC_VLEN, nc_OPAQUE = NC_OPAQUE, nc_ENUM = NC_ENUM, nc_COMPOUND = NC_COMPOUND } |
List of netCDF types that can be represented. More... | |
Public Member Functions | |
NcType () | |
Constructor generates a null object. More... | |
NcType (const netCDF::NcGroup &grp, const std::string &name) | |
Constructor for a non-global type. More... | |
NcType (const netCDF::NcGroup &grp, nc_type id) | |
Constructor for a non-global type. More... | |
NcType (nc_type id) | |
Constructor for a global type This object describes the "essential" information for a netCDF global type. More... | |
NcType (const NcType &rhs) | |
The copy constructor. More... | |
virtual | ~NcType () |
destructor More... | |
nc_type | getId () const |
The netCDF Id of this type. More... | |
std::string | getName () const |
The name of this type. More... | |
netCDF::NcGroup | getParentGroup () const |
Gets parent group. More... | |
size_t | getSize () const |
The size in bytes. More... | |
ncType | getTypeClass () const |
The type class returned as enumeration type. More... | |
std::string | getTypeClassName () const |
Return a string containing the name of the enumerated type. More... | |
bool | isNull () const |
Returns true if this object is null (i.e. More... | |
bool | operator!= (const NcType &) const |
!= operator More... | |
bool | operator== (const NcType &) const |
equivalence operator More... | |
Protected Member Functions | |
NcType & | operator= (const NcType &rhs) |
assignment operator More... | |
Protected Attributes | |
int | g_fileId |
An ncid associated with a particular open file (returned from nc_open). More... | |
int | groupId |
the group Id More... | |
nc_type | myId |
the type Id More... | |
bool | nullObject |
Friends | |
bool | operator< (const NcType &lhs, const NcType &rhs) |
comparator operator More... | |
bool | operator> (const NcType &lhs, const NcType &rhs) |
comparator operator More... | |
Base class inherited by NcOpaque, NcVlen, NcCompound and NcEnum classes.
List of netCDF types that can be represented.
The enumeration list contains the complete set of netCDF variable types. In addition, the type NC_TYPE is included. This enables the user to instantiate a netCDF type object without explcitly needing to know it precise type.
NcType::NcType | ( | ) |
Constructor generates a null object.
Definition at line 44 of file ncType.cpp.
netCDF::NcType::NcType | ( | const netCDF::NcGroup & | grp, |
const std::string & | name | ||
) |
NcType::NcType | ( | const netCDF::NcGroup & | grp, |
nc_type | id | ||
) |
Constructor for a non-global type.
This object describes the "essential" information for all netCDF types required by NcVar, NcAtt objects. New netCDF types can be added using the appropriate "add" method in the NcGroup object.
grp | Parent NcGroup object. |
id | type id |
Definition at line 66 of file ncType.cpp.
NcType::NcType | ( | nc_type | id | ) |
Constructor for a global type This object describes the "essential" information for a netCDF global type.
id | type id |
Definition at line 58 of file ncType.cpp.
NcType::NcType | ( | const NcType & | rhs | ) |
The copy constructor.
Definition at line 36 of file ncType.cpp.
|
inlinevirtual |
|
inline |
string NcType::getName | ( | ) | const |
The name of this type.
For atomic types, the CDL type names are returned. These are as follows:
Definition at line 94 of file ncType.cpp.
NcGroup NcType::getParentGroup | ( | ) | const |
Gets parent group.
For an atomic type, returns a Null object.
Definition at line 89 of file ncType.cpp.
size_t NcType::getSize | ( | ) | const |
The size in bytes.
This function will work on any type, including atomic and any user defined type, whether compound, opaque, enumeration, or variable length array.
Definition at line 108 of file ncType.cpp.
NcType::ncType NcType::getTypeClass | ( | ) | const |
The type class returned as enumeration type.
Valid for all types, whether atomic or user-defined. User-defined types are returned as one of the following enumeration types: nc_VLEN, nc_OPAQUE, nc_ENUM, or nc_COMPOUND.
Definition at line 116 of file ncType.cpp.
string NcType::getTypeClassName | ( | ) | const |
Return a string containing the name of the enumerated type.
(ie one of the following strings: "nc_BYTE", "nc_CHAR", "nc_SHORT", "nc_INT", "nc_FLOAT", "nc_DOUBLE", "nc_UBYTE", "nc_USHORT", "nc_UINT", "nc_INT64", "nc_UINT64", "nc_STRING", "nc_VLEN", "nc_OPAQUE", "nc_ENUM", "nc_COMPOUND"
Definition at line 144 of file ncType.cpp.
|
inline |
bool NcType::operator!= | ( | const NcType & | rhs | ) | const |
!= operator
Definition at line 83 of file ncType.cpp.
assignment operator
Definition at line 27 of file ncType.cpp.
bool NcType::operator== | ( | const NcType & | rhs | ) | const |
equivalence operator
Definition at line 74 of file ncType.cpp.
comparator operator
Definition at line 12 of file ncType.cpp.
comparator operator
Definition at line 18 of file ncType.cpp.
|
protected |