/usr/include/ncDim.h is in libnetcdf-c++4-dev 4.2.1-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 | #include <string>
#include "netcdf.h"
#ifndef NcDimClass
#define NcDimClass
namespace netCDF
{
class NcGroup; // forward declaration.
/*! Class represents a netCDF dimension */
class NcDim {
public:
/*! destructor*/
~NcDim(){};
/*! Constructor generates a \ref isNull "null object". */
NcDim ();
/*!
Constructor for a dimension .
The dimension must already exist in the netCDF file. New netCDF variables can be added using NcGroup::addNcDim();
\param grp Parent NcGroup object.
\param dimId Id of the NcDim object.
*/
NcDim(const NcGroup& grp, int dimId);
/*! assignment operator */
NcDim& operator =(const NcDim &);
/*! equivalence operator */
bool operator==(const NcDim& rhs) const;
/*! != operator */
bool operator!=(const NcDim& rhs) const;
/*! The copy constructor. */
NcDim(const NcDim& ncDim);
/*! The name of this dimension.*/
const std::string getName() const;
/*! The netCDF Id of this dimension. */
const int getId() const {return myId;};
/*! Gets a NcGroup object of the parent group. */
NcGroup getParentGroup() const;
/*! Returns true if this is an unlimited dimension */
bool isUnlimited() const;
/*! The size of the dimension; for unlimited, this is the number of records written so far. */
size_t getSize() const;
/*!renames the dimension */
void rename( const std::string& newName);
/*! Returns true if this object is null (i.e. it has no contents); otherwise returns false. */
bool isNull() const {return nullObject;}
/*! comparator operator */
friend bool operator<(const NcDim& lhs,const NcDim& rhs);
/*! comparator operator */
friend bool operator>(const NcDim& lhs,const NcDim& rhs);
private:
bool nullObject;
int myId;
int groupId;
};
}
#endif
|