28 nullObject = rhs.nullObject;
30 groupId = rhs.groupId;
36 nullObject(rhs.nullObject),
46 return nullObject == rhs.nullObject;
48 return myId == rhs.myId && groupId == rhs.groupId;
54 return !(*
this == rhs);
72 groupId = grp.
getId();
80 ncCheck(nc_inq_dimlen(groupId, myId, &dimSize),__FILE__,__LINE__);
89 int* unlimdimidsp=NULL;
91 ncCheck(nc_inq_unlimdims(groupId,&numlimdims,unlimdimidsp),__FILE__,__LINE__);
94 vector<int> unlimdimid(numlimdims);
95 ncCheck(nc_inq_unlimdims(groupId,&numlimdims,&unlimdimid[0]),__FILE__,__LINE__);
96 vector<int>::iterator it;
98 it = find(unlimdimid.begin(),unlimdimid.end(),myId);
99 return it != unlimdimid.end();
108 char dimName[NC_MAX_NAME+1];
109 ncCheck(nc_inq_dimname(groupId, myId, dimName),__FILE__,__LINE__);
110 return string(dimName);
116 ncCheck(nc_rename_dim(groupId, myId, name.c_str()),__FILE__,__LINE__);
Class represents a netCDF dimension.
std::string getName() const
The name of this dimension.
size_t getSize() const
The size of the dimension; for unlimited, this is the number of records written so far.
bool isUnlimited() const
Returns true if this is an unlimited dimension.
bool operator!=(const NcDim &rhs) const
!= operator
NcGroup getParentGroup() const
Gets a NcGroup object of the parent group.
bool operator==(const NcDim &rhs) const
equivalence operator
void rename(const std::string &newName)
renames the dimension
NcDim()
Constructor generates a null object.
Class represents a netCDF group.
int getId() const
Gets the group id.
void ncCheck(int retCode, const char *file, int line)
Function checks error code and if necessary throws an exception.