#include <ncEnumType.h>
|
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_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
} |
|
Class represents a netCDF enum type
◆ ncEnumType
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
|
◆ NcEnumType() [1/4]
NcEnumType::NcEnumType |
( |
| ) |
|
◆ NcEnumType() [2/4]
netCDF::NcEnumType::NcEnumType |
( |
const NcGroup & |
grp, |
|
|
const std::string & |
name |
|
) |
| |
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. |
◆ NcEnumType() [3/4]
NcEnumType::NcEnumType |
( |
const NcType & |
ncType | ) |
|
Constructor. Constructs from the base type NcType object. Will throw an exception if the NcType is not the base of an Enum type.
- Parameters
-
◆ NcEnumType() [4/4]
◆ ~NcEnumType()
netCDF::NcEnumType::~NcEnumType |
( |
| ) |
|
|
inline |
◆ addMember()
template<class T >
void netCDF::NcEnumType::addMember |
( |
const std::string & |
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. |
◆ getBaseType()
NcType NcEnumType::getBaseType |
( |
| ) |
const |
◆ getMemberCount()
size_t NcEnumType::getMemberCount |
( |
| ) |
const |
Returns number of members in this NcEnumType object.
◆ getMemberNameFromIndex()
string NcEnumType::getMemberNameFromIndex |
( |
int |
index | ) |
const |
Returns the member name for the given zero-based index.
◆ getMemberNameFromValue()
template<class T >
std::string netCDF::NcEnumType::getMemberNameFromValue |
( |
const T |
memberValue | ) |
const |
|
inline |
Returns the member name for the given NcEnumType value.
◆ getMemberValue()
template<class T >
void netCDF::NcEnumType::getMemberValue |
( |
int |
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. |
◆ operator=() [1/2]
◆ operator=() [2/2]
Assignment operator. This assigns from the base type NcType object. Will throw an exception if the NcType is not the base of an Enum type.
The documentation for this class was generated from the following files:
- ncEnumType.h
- ncEnumType.cpp