NetCDF-C++
4.3.2
Toggle main menu visibility
Loading...
Searching...
No Matches
ncCompoundType.h
1
#include <string>
2
#include <vector>
3
#include "ncType.h"
4
#include "netcdf.h"
5
6
#ifndef NcCompoundTypeClass
7
#define NcCompoundTypeClass
8
9
10
namespace
netCDF
11
{
12
class
NcGroup
;
// forward declaration.
13
17
class
NcCompoundType
:
public
NcType
18
{
19
public
:
20
22
NcCompoundType
();
23
31
NcCompoundType
(
const
NcGroup
& grp,
const
std::string& name);
32
38
NcCompoundType
(
const
NcType
&
ncType
);
39
41
NcCompoundType
&
operator=
(
const
NcCompoundType
& rhs);
42
47
NcCompoundType
&
operator=
(
const
NcType
& rhs);
48
50
NcCompoundType
(
const
NcCompoundType
& rhs);
51
53
bool
operator==
(
const
NcCompoundType
& rhs);
54
56
~NcCompoundType
(){;}
57
58
66
void
addMember
(
const
std::string& memName,
const
NcType
& newMemberType,
size_t
offset);
67
76
void
addMember
(
const
std::string& memName,
const
NcType
& newMemberType,
size_t
offset,
const
std::vector<int>& shape);
77
78
80
size_t
getMemberCount
()
const
;
81
83
NcType
getMember
(
int
memberIndex)
const
;
84
86
std::string
getMemberName
(
int
memberIndex)
const
;
87
89
int
getMemberIndex
(
const
std::string& memberName)
const
;
90
92
size_t
getMemberOffset
(
const
int
index)
const
;
93
99
int
getMemberDimCount
(
int
memberIndex)
const
;
100
101
107
std::vector<int>
getMemberShape
(
int
memberIndex)
const
;
108
109
110
private
:
111
112
int
myOffset;
113
114
};
115
116
}
117
118
119
#endif
netCDF::NcCompoundType::operator==
bool operator==(const NcCompoundType &rhs)
equivalence operator
Definition
ncCompoundType.cpp:51
netCDF::NcCompoundType::addMember
void addMember(const std::string &memName, const NcType &newMemberType, size_t offset)
netCDF::NcCompoundType::getMemberDimCount
int getMemberDimCount(int memberIndex) const
Returns the number of dimensions of a member with the given index.
Definition
ncCompoundType.cpp:147
netCDF::NcCompoundType::getMemberShape
std::vector< int > getMemberShape(int memberIndex) const
Returns the shape of a given member.
Definition
ncCompoundType.cpp:156
netCDF::NcCompoundType::getMemberIndex
int getMemberIndex(const std::string &memberName) const
Returns index of named member field.
Definition
ncCompoundType.cpp:140
netCDF::NcCompoundType::NcCompoundType
NcCompoundType()
Constructor generates a null object.
Definition
ncCompoundType.cpp:60
netCDF::NcCompoundType::getMemberCount
size_t getMemberCount() const
Returns number of members in this NcCompoundType object.
Definition
ncCompoundType.cpp:99
netCDF::NcCompoundType::getMemberOffset
size_t getMemberOffset(const int index) const
Returns the offset of the member with given index.
Definition
ncCompoundType.cpp:166
netCDF::NcCompoundType::getMemberName
std::string getMemberName(int memberIndex) const
Returns name of member field.
Definition
ncCompoundType.cpp:132
netCDF::NcCompoundType::NcCompoundType
NcCompoundType(const NcGroup &grp, const std::string &name)
Constructor.
netCDF::NcCompoundType::getMember
NcType getMember(int memberIndex) const
Returns a NcType object for a single member.
Definition
ncCompoundType.cpp:108
netCDF::NcCompoundType::~NcCompoundType
~NcCompoundType()
destructor
Definition
ncCompoundType.h:56
netCDF::NcCompoundType::operator=
NcCompoundType & operator=(const NcCompoundType &rhs)
assignment operator
Definition
ncCompoundType.cpp:25
netCDF::NcCompoundType::addMember
void addMember(const std::string &memName, const NcType &newMemberType, size_t offset, const std::vector< int > &shape)
Adds a named array field.
netCDF::NcGroup
Class represents a netCDF group.
Definition
ncGroup.h:26
netCDF::NcType::NcType
NcType()
Constructor generates a null object.
Definition
ncType.cpp:43
netCDF::NcType::ncType
ncType
List of netCDF types that can be represented.
Definition
ncType.h:26
netCDF
C++ API for netCDF4.
Definition
ncAtt.h:10
Return to the Main Unidata NetCDF page.
Generated on
for NetCDF-C++. NetCDF is a
Unidata
library.