#include <ncCompoundType.h>
|
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
} |
|
NcType & | operator= (const NcType &rhs) |
|
int | g_fileId |
|
int | groupId |
|
nc_type | myId |
|
Class represents a netCDF compound type
◆ NcCompoundType() [1/4]
NcCompoundType::NcCompoundType |
( |
| ) |
|
◆ NcCompoundType() [2/4]
netCDF::NcCompoundType::NcCompoundType |
( |
const NcGroup & |
grp, |
|
|
const std::string & |
name |
|
) |
| |
Constructor. The compound Type must already exist in the netCDF file. New netCDF compound types can be added using NcGroup::addNcCompoundType();
- Parameters
-
grp | The parent group where this type is defined. |
name | Name of new type. |
◆ NcCompoundType() [3/4]
NcCompoundType::NcCompoundType |
( |
const NcType & |
ncType | ) |
|
Constructor. Constructs from the base type NcType object. Will throw an exception if the NcType is not the base of a Compound type.
- Parameters
-
◆ NcCompoundType() [4/4]
◆ ~NcCompoundType()
netCDF::NcCompoundType::~NcCompoundType |
( |
| ) |
|
|
inline |
◆ addMember() [1/2]
void netCDF::NcCompoundType::addMember |
( |
const std::string & |
memName, |
|
|
const NcType & |
newMemberType, |
|
|
size_t |
offset |
|
) |
| |
Adds a named field.
\param memName Name of new field.
\param newMemberType The type of the new member.
\param offset Offset of this member in bytes, obtained by a call to offsetof. For example
the offset of a member "mem4" in structure struct1 is: offsetof(struct1,mem4).
◆ addMember() [2/2]
void netCDF::NcCompoundType::addMember |
( |
const std::string & |
memName, |
|
|
const NcType & |
newMemberType, |
|
|
size_t |
offset, |
|
|
const std::vector< int > & |
shape |
|
) |
| |
Adds a named array field.
- Parameters
-
memName | Name of new field. |
newMemberType | The type of the new member. |
offset | Offset of this member in bytes, obtained by a call to offsetof. For example the offset of a member "mem4" in structure struct1 is: offsetof(struct1,mem4). |
shape | The shape of the array field. |
◆ getMember()
NcType NcCompoundType::getMember |
( |
int |
memberIndex | ) |
const |
Returns a NcType object for a single member.
◆ getMemberCount()
size_t NcCompoundType::getMemberCount |
( |
| ) |
const |
◆ getMemberDimCount()
int NcCompoundType::getMemberDimCount |
( |
int |
memberIndex | ) |
const |
Returns the number of dimensions of a member with the given index.
- Parameters
-
Index | of member (numbering starts at zero). |
- Returns
- The number of dimensions of the field. Non-array fields have 0 dimensions.
◆ getMemberIndex()
int NcCompoundType::getMemberIndex |
( |
const std::string & |
memberName | ) |
const |
Returns index of named member field.
◆ getMemberName()
std::string NcCompoundType::getMemberName |
( |
int |
memberIndex | ) |
const |
Returns name of member field.
◆ getMemberOffset()
size_t NcCompoundType::getMemberOffset |
( |
const int |
index | ) |
const |
Returns the offset of the member with given index.
◆ getMemberShape()
vector< int > NcCompoundType::getMemberShape |
( |
int |
memberIndex | ) |
const |
Returns the shape of a given member.
- Parameters
-
Index | of member (numbering starts at zero). |
- Returns
- The size of the dimensions of the field. Non-array fields have 0 dimensions.
◆ 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 a Compound type.
◆ operator==()
The documentation for this class was generated from the following files:
- ncCompoundType.h
- ncCompoundType.cpp