NetCDF-C++ 4.3.1
netCDF::NcDim Class Reference

Class represents a netCDF dimension. More...

#include "ncDim.h"

Public Member Functions

 NcDim ()
 Constructor generates a null object. More...
 
 NcDim (const NcDim &ncDim)
 The copy constructor. More...
 
 NcDim (const NcGroup &grp, int dimId)
 Constructor for a dimension . More...
 
 ~NcDim ()
 destructor More...
 
int getId () const
 The netCDF Id of this dimension. More...
 
std::string getName () const
 The name of this dimension. More...
 
NcGroup getParentGroup () const
 Gets a NcGroup object of the parent group. More...
 
size_t getSize () const
 The size of the dimension; for unlimited, this is the number of records written so far. More...
 
bool isNull () const
 Returns true if this object is null (i.e. More...
 
bool isUnlimited () const
 Returns true if this is an unlimited dimension. More...
 
bool operator!= (const NcDim &rhs) const
 != operator More...
 
NcDimoperator= (const NcDim &)
 assignment operator
More...
 
bool operator== (const NcDim &rhs) const
 equivalence operator More...
 
void rename (const std::string &newName)
 renames the dimension More...
 

Friends

bool operator< (const NcDim &lhs, const NcDim &rhs)
 comparator operator
More...
 
bool operator> (const NcDim &lhs, const NcDim &rhs)
 comparator operator
More...
 

Detailed Description

Class represents a netCDF dimension.

Definition at line 13 of file ncDim.h.

Constructor & Destructor Documentation

◆ ~NcDim()

netCDF::NcDim::~NcDim ( )
inline

destructor

Definition at line 18 of file ncDim.h.

◆ NcDim() [1/3]

NcDim::NcDim ( )

Constructor generates a null object.

Definition at line 64 of file ncDim.cpp.

◆ NcDim() [2/3]

NcDim::NcDim ( const NcGroup grp,
int  dimId 
)

Constructor for a dimension .

The dimension must already exist in the netCDF file. New netCDF variables can be added using NcGroup::addNcDim();

Parameters
grpParent NcGroup object.
dimIdId of the NcDim object.

Definition at line 69 of file ncDim.cpp.

◆ NcDim() [3/3]

NcDim::NcDim ( const NcDim ncDim)

The copy constructor.

Definition at line 35 of file ncDim.cpp.

Member Function Documentation

◆ getId()

int netCDF::NcDim::getId ( ) const
inline

The netCDF Id of this dimension.

Definition at line 47 of file ncDim.h.

◆ getName()

string NcDim::getName ( ) const

The name of this dimension.

Definition at line 106 of file ncDim.cpp.

◆ getParentGroup()

NcGroup NcDim::getParentGroup ( ) const

Gets a NcGroup object of the parent group.

Definition at line 59 of file ncDim.cpp.

◆ getSize()

size_t NcDim::getSize ( ) const

The size of the dimension; for unlimited, this is the number of records written so far.

Definition at line 77 of file ncDim.cpp.

◆ isNull()

bool netCDF::NcDim::isNull ( ) const
inline

Returns true if this object is null (i.e.

it has no contents); otherwise returns false.

Definition at line 62 of file ncDim.h.

◆ isUnlimited()

bool NcDim::isUnlimited ( ) const

Returns true if this is an unlimited dimension.

Definition at line 86 of file ncDim.cpp.

◆ operator!=()

bool NcDim::operator!= ( const NcDim rhs) const

!= operator

Definition at line 52 of file ncDim.cpp.

◆ operator=()

NcDim & NcDim::operator= ( const NcDim rhs)

assignment operator

Definition at line 26 of file ncDim.cpp.

◆ operator==()

bool NcDim::operator== ( const NcDim rhs) const

equivalence operator

Definition at line 43 of file ncDim.cpp.

◆ rename()

void NcDim::rename ( const std::string &  newName)

renames the dimension

Definition at line 114 of file ncDim.cpp.

Friends And Related Function Documentation

◆ operator<

bool operator< ( const NcDim lhs,
const NcDim rhs 
)
friend

comparator operator

Definition at line 11 of file ncDim.cpp.

◆ operator>

bool operator> ( const NcDim lhs,
const NcDim rhs 
)
friend

comparator operator

Definition at line 17 of file ncDim.cpp.


The documentation for this class was generated from the following files:

Return to the Main Unidata NetCDF page.
Generated on Wed Nov 10 2021 15:25:08 for NetCDF-C++. NetCDF is a Unidata library.