netcdf-C++
|
#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 } |
Public Member Functions | |
nc_type | getId () const |
std::string | getName () const |
netCDF::NcGroup | getParentGroup () const |
size_t | getSize () const |
ncType | getTypeClass () const |
std::string | getTypeClassName () const |
bool | isNull () const |
NcType () | |
NcType (const NcType &rhs) | |
NcType (const netCDF::NcGroup &grp, const std::string &name) | |
NcType (const netCDF::NcGroup &grp, nc_type id) | |
NcType (nc_type id) | |
bool | operator!= (const NcType &) const |
bool | operator== (const NcType &) const |
virtual | ~NcType () |
Protected Member Functions | |
NcType & | operator= (const NcType &rhs) |
Protected Attributes | |
int | g_fileId |
int | groupId |
nc_type | myId |
Friends | |
bool | operator< (const NcType &lhs, const NcType &rhs) |
bool | operator> (const NcType &lhs, const NcType &rhs) |
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.
netCDF::NcType::NcType | ( | const netCDF::NcGroup & | grp, |
const std::string & | name | ||
) |
NcType::NcType | ( | const netCDF::NcGroup & | grp, |
nc_type | id | ||
) |
NcType::NcType | ( | nc_type | id | ) |
Constructor for a global type This object describes the "essential" information for a netCDF global type.
id | type id |
NcType::NcType | ( | const NcType & | rhs | ) |
The copy constructor.
|
inlinevirtual |
destructor
|
inline |
The netCDF Id of this type.
string NcType::getName | ( | ) | const |
The name of this type. For atomic types, the CDL type names are returned. These are as follows:
NcGroup NcType::getParentGroup | ( | ) | const |
Gets parent group. For an atomic type, returns a Null object.
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.
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.
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"
|
inline |
Returns true if this object is null (i.e. it has no contents); otherwise returns false.
bool NcType::operator!= | ( | const NcType & | rhs | ) | const |
!= operator
bool NcType::operator== | ( | const NcType & | rhs | ) | const |
equivalence operator
|
protected |
An ncid associated with a particular open file (returned from nc_open). This is required by many of the functions ncType uses, such as nc_inq_type
|
protected |
the group Id
|
protected |
the type Id