netcdf-C++
Public Types | Public Member Functions | List of all members
netCDF::NcFile Class Reference

#include <ncFile.h>

Inheritance diagram for netCDF::NcFile:
Inheritance graph
[legend]

Public Types

- Public Types inherited from netCDF::NcGroup

Public Member Functions

 NcFile (const NcGroup &rhs)
 The copy constructor. More...
 
 NcFile ()
 
 NcFile (const std::string &filePath, FileMode fMode)
 
 NcFile (const std::string &filePath, FileMode fMode, FileFormat fFormat)
 
NcFileoperator= (const NcGroup &rhs)
 
virtual ~NcFile ()
 
- Public Member Functions inherited from netCDF::NcGroup
NcCompoundType addCompoundType (const std::string &name, size_t size) const
 
NcDim addDim (const std::string &name, size_t dimSize) const
 
NcDim addDim (const std::string &name) const
 
NcEnumType addEnumType (const std::string &name, NcEnumType::ncEnumType basetype) const
 
NcGroup addGroup (const std::string &name) const
 
NcOpaqueType addOpaqueType (const std::string &name, size_t size) const
 
NcVar addVar (const std::string &name, const std::string &typeName, const std::string &dimName) const
 
NcVar addVar (const std::string &name, const NcType &ncType, const NcDim &ncDim) const
 
NcVar addVar (const std::string &name, const std::string &typeName, const std::vector< std::string > &dimNames) const
 
NcVar addVar (const std::string &name, const NcType &ncType, const std::vector< NcDim > &ncDimVector) const
 
NcVlenType addVlenType (const std::string &name, NcType &basetype) const
 
NcGroupAtt getAtt (const std::string &name, NcGroup::Location location=Current) const
 
int getAttCount (NcGroup::Location location=Current) const
 
std::multimap< std::string, NcGroupAttgetAtts (NcGroup::Location location=Current) const
 
std::set< NcGroupAttgetAtts (const std::string &name, NcGroup::Location location=Current) const
 
void getCoordVar (std::string &coordVarName, NcDim &ncDim, NcVar &ncVar, NcGroup::Location location=Current) const
 
std::map< std::string, NcGroupgetCoordVars (NcGroup::Location location=Current) const
 
NcDim getDim (const std::string &name, NcGroup::Location location=Current) const
 
int getDimCount (NcGroup::Location location=Current) const
 
std::multimap< std::string, NcDimgetDims (NcGroup::Location location=Current) const
 
std::set< NcDimgetDims (const std::string &name, NcGroup::Location location=Current) const
 
NcGroup getGroup (const std::string &name, NcGroup::GroupLocation location=ChildrenGrps) const
 
int getGroupCount (NcGroup::GroupLocation location=ChildrenGrps) const
 
std::multimap< std::string, NcGroupgetGroups (NcGroup::GroupLocation location=ChildrenGrps) const
 
std::set< NcGroupgetGroups (const std::string &name, NcGroup::GroupLocation location=ChildrenGrps) const
 
int getId () const
 
std::string getName (bool fullName=false) const
 
NcGroup getParentGroup () const
 
NcType getType (const std::string &name, NcGroup::Location location=Current) const
 
int getTypeCount (NcGroup::Location location=Current) const
 
int getTypeCount (NcType::ncType enumType, NcGroup::Location location=Current) const
 
std::multimap< std::string, NcTypegetTypes (NcGroup::Location location=Current) const
 
std::set< NcTypegetTypes (const std::string &name, NcGroup::Location location=Current) const
 
std::set< NcTypegetTypes (NcType::ncType enumType, NcGroup::Location location=Current) const
 
std::set< NcTypegetTypes (const std::string &name, NcType::ncType enumType, NcGroup::Location location=Current) const
 
NcVar getVar (const std::string &name, NcGroup::Location location=Current) const
 
int getVarCount (NcGroup::Location location=Current) const
 
std::multimap< std::string, NcVargetVars (NcGroup::Location location=Current) const
 
std::set< NcVargetVars (const std::string &name, NcGroup::Location location=Current) const
 
bool isNull () const
 
bool isRootGroup () const
 
 NcGroup ()
 
 NcGroup (const NcGroup &rhs)
 
bool operator!= (const NcGroup &rhs) const
 
NcGroupoperator= (const NcGroup &rhs)
 
bool operator== (const NcGroup &rhs) const
 
NcGroupAtt putAtt (const std::string &name, size_t len, const char **dataValues) const
 
NcGroupAtt putAtt (const std::string &name, const std::string &dataValues) const
 
NcGroupAtt putAtt (const std::string &name, const NcType &type, short datumValue) const
 
NcGroupAtt putAtt (const std::string &name, const NcType &type, int datumValue) const
 
NcGroupAtt putAtt (const std::string &name, const NcType &type, long datumValue) const
 
NcGroupAtt putAtt (const std::string &name, const NcType &type, float datumValue) const
 
NcGroupAtt putAtt (const std::string &name, const NcType &type, double datumValue) const
 
NcGroupAtt putAtt (const std::string &name, const NcType &type, unsigned short datumValue) const
 
NcGroupAtt putAtt (const std::string &name, const NcType &type, unsigned int datumValue) const
 
NcGroupAtt putAtt (const std::string &name, const NcType &type, unsigned long long datumValue) const
 
NcGroupAtt putAtt (const std::string &name, const NcType &type, long long datumValue) const
 
NcGroupAtt putAtt (const std::string &name, const NcType &type, size_t len, const unsigned char *dataValues) const
 
NcGroupAtt putAtt (const std::string &name, const NcType &type, size_t len, const signed char *dataValues) const
 
NcGroupAtt putAtt (const std::string &name, const NcType &type, size_t len, const short *dataValues) const
 
NcGroupAtt putAtt (const std::string &name, const NcType &type, size_t len, const int *dataValues) const
 
NcGroupAtt putAtt (const std::string &name, const NcType &type, size_t len, const long *dataValues) const
 
NcGroupAtt putAtt (const std::string &name, const NcType &type, size_t len, const float *dataValues) const
 
NcGroupAtt putAtt (const std::string &name, const NcType &type, size_t len, const double *dataValues) const
 
NcGroupAtt putAtt (const std::string &name, const NcType &type, size_t len, const unsigned short *dataValues) const
 
NcGroupAtt putAtt (const std::string &name, const NcType &type, size_t len, const unsigned int *dataValues) const
 
NcGroupAtt putAtt (const std::string &name, const NcType &type, size_t len, const unsigned long long *dataValues) const
 
NcGroupAtt putAtt (const std::string &name, const NcType &type, size_t len, const long long *dataValues) const
 
NcGroupAtt putAtt (const std::string &name, const NcType &type, size_t len, const void *dataValues) const
 
virtual ~NcGroup ()
 

Additional Inherited Members

- Protected Attributes inherited from netCDF::NcGroup
bool nullObject
 

Detailed Description

Class represents a netCDF root group. The Ncfile class is the same as the NcGroup class with the additional functionality for opening and closing files.

Member Enumeration Documentation

Enumerator
classic 

Classic format, classic data model.

classic64 

64-bit offset format, classic data model

nc4 

(default) netCDF-4/HDF5 format, enhanced data model

nc4classic 

netCDF-4/HDF5 format, classic data model

Enumerator
read 

File exists, open read-only.

write 

File exists, open for writing.

replace 

Create new file, even if already exists.

newFile 

Create new file, fail if already exists.

Constructor & Destructor Documentation

NcFile::NcFile ( const NcGroup rhs)

The copy constructor.

The copy constructor.

NcFile::NcFile ( )

Constructor generates a null object.

netCDF::NcFile::NcFile ( const std::string &  filePath,
FileMode  fMode 
)

Opens a netCDF file.

Parameters
filePathName of netCDF optional path.
fModeThe file mode:
  • 'read' File exists, open for read-only.
  • 'write' File exists, open for writing.
  • 'replace' Create new file, even it already exists.
  • 'newFile' Create new file, fail it exists already.
netCDF::NcFile::NcFile ( const std::string &  filePath,
FileMode  fMode,
FileFormat  fFormat 
)

Creates a netCDF file of a specified format.

Parameters
filePathName of netCDF optional path.
fModeThe file mode:
  • 'replace' Create new file, even it already exists.
  • 'newFile' Create new file, fail it exists already.
NcFile::~NcFile ( )
virtual

destructor

Member Function Documentation

NcFile & NcFile::operator= ( const NcGroup rhs)

assignment operator


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