Represents a netCDF enum type.
More...
#include <NetCDF/cpp4/src/NcEnumType.h>
- Copyright:
- Original C++ API developed by Lynton Appel.
Portions of this software were developed by the Unidata Program at the
University Corporation for Atmospheric Research.
Modifications: Copyright 2013 Colorado State University. All rights reserved.
- Organization:
- Natural Resource Ecology Laboratory
Colorado State University, Fort Collins, CO 80523 USA
www.nrel.colostate.edu
- Project:
- IRC <www.nrel.colostate.edu/projects/irc/>
- Author
- Tom Hilinski tom.h.nosp@m.ilin.nosp@m.ski@c.nosp@m.olos.nosp@m.tate..nosp@m.edu
- Date
- 2013Jan
|
enum | ncEnumType {
nc_BYTE = NC_BYTE,
nc_SHORT = NC_SHORT,
nc_INT = NC_INT,
nc_UBYTE = NC_UBYTE,
nc_USHORT = NC_USHORT,
nc_UINT = NC_UINT,
nc_INT64 = NC_INT64,
nc_UINT64 = NC_UINT64
} |
|
enum | ncType {
nc_NAT = NC_NAT,
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,
nc_Unknown
} |
|
|
| NcEnumType () |
|
| NcEnumType (int const useFileID, NcGroup const &grp, std::string const name, int const typeID) |
| ID returned by "nc_def*". More...
|
|
| NcEnumType (NcEnumType const &rhs) |
|
virtual std::string const | getTypeClassName () const |
|
template<class T > |
void | addMember (std::string const name, T memberValue) |
|
size_t | GetCount () const |
|
std::string | GetNameFromIndex (int const index) const |
|
template<class T > |
std::string | GetNameFromValue (const T memberValue) const |
|
template<class T > |
void | GetValue (int const index, T &memberValue) const |
|
NcType | GetBaseType () const |
|
| NcTypeUserDef (int const useFileID, NcGroup const &grp, std::string const &myClassName, ncType const classTypeID, int const typeID) |
| ID returned by "nc_def*". More...
|
|
| NcTypeUserDef (NcTypeUserDef const &rhs) |
|
int | GetFileID () const |
| file ID More...
|
|
int | GetGroupID () const |
| group ID More...
|
|
int | GetTypeID () const |
| type ID from nc_def* More...
|
|
virtual std::string | GetName () const |
| name of this type More...
|
|
virtual size_t | Size () const |
| size of type in bytes More...
|
|
NcGroup | GetParentGroup () const |
| parent group More...
|
|
virtual ncType | getTypeClass () const |
| return enum ncType More...
|
|
NcTypeUserDef & | operator= (NcTypeUserDef const &rhs) |
|
bool | operator== (NcTypeUserDef const &rhs) const |
|
bool | operator!= (const NcTypeUserDef &rhs) const |
|
bool | operator< (NcTypeUserDef const &rhs) const |
|
| NcType () |
|
| NcType (std::string const myClassName, ncType const id) |
| enumerated type value More...
|
|
| NcType (NcType const &rhs) |
|
virtual | ~NcType () |
|
NcType & | operator= (NcType const &rhs) |
|
bool | operator== (NcType const &rhs) const |
|
bool | operator!= (NcType const &rhs) const |
|
bool | operator< (NcType const &rhs) const |
|
ncType | GetID () const |
|
virtual ncType | GetTypeClass () const |
|
std::string const & | getTypeClassName () const |
|
std::string const & | GetTypeClassName () const |
|
bool | IsNull () const |
|
virtual | ~NcTypeV4 ()=0 |
|
void | VerifyVersion4 (int const fileID) |
|
List of NetCDF-4 Enumeration types.
Enumerator |
---|
nc_BYTE |
signed 1 byte integer
|
nc_SHORT |
signed 2 byte integer
|
nc_INT |
signed 4 byte integer
|
nc_UBYTE |
unsigned 1 byte int
|
nc_USHORT |
unsigned 2-byte int
|
nc_UINT |
unsigned 4-byte int
|
nc_INT64 |
signed 8-byte int
|
nc_UINT64 |
unsigned 8-byte int
|
netcdf::NcEnumType::NcEnumType |
( |
| ) |
|
netcdf::NcEnumType::NcEnumType |
( |
int const |
useFileID, |
|
|
NcGroup const & |
grp, |
|
|
std::string const |
name, |
|
|
int const |
typeID |
|
) |
| |
Constructor. The enum Type must already exist in the netCDF file. New netCDF enum types can be added using NcGroup::addNcEnumType();
- Parameters
-
grp | The parent group where this type is defined. |
name | Name of new type. |
- Parameters
-
useFileID | netCDF file ID number |
grp | parent group where this type is defined |
name | Name of new type |
netcdf::NcEnumType::NcEnumType |
( |
NcEnumType const & |
rhs | ) |
|
|
inline |
template<class T >
void netcdf::NcEnumType::addMember |
( |
std::string const |
name, |
|
|
T |
memberValue |
|
) |
| |
|
inline |
Adds a new member to this NcEnumType type.
- Parameters
-
name | Name for this new Enum memebr. |
memberValue | Member value, must be of the correct NcType. |
NcType netcdf::NcEnumType::GetBaseType |
( |
| ) |
const |
size_t netcdf::NcEnumType::GetCount |
( |
| ) |
const |
Returns number of members in this NcEnumType object.
std::string netcdf::NcEnumType::GetNameFromIndex |
( |
int const |
index | ) |
const |
Returns the member name for the given zero-based index.
template<class T >
std::string netcdf::NcEnumType::GetNameFromValue |
( |
const T |
memberValue | ) |
const |
|
inline |
Returns the member name for the given NcEnumType value.
virtual std::string const netcdf::NcEnumType::getTypeClassName |
( |
| ) |
const |
|
inlinevirtual |
template<class T >
void netcdf::NcEnumType::GetValue |
( |
int const |
index, |
|
|
T & |
memberValue |
|
) |
| const |
|
inline |
Returns the value of a member with the given zero-based index.
- Parameters
-
name | Name for this new Enum member. |
memberValue | Member value, returned by this routine. |
The documentation for this class was generated from the following files: