NetCDF-C++ 4.3.1
netCDF::NcAtt Class Referenceabstract

Abstract base class represents inherited by ncVarAtt and ncGroupAtt. More...

#include "ncAtt.h"

Inheritance diagram for netCDF::NcAtt:
netCDF::NcGroupAtt netCDF::NcVarAtt

Public Member Functions

 NcAtt ()
 Constructor generates a null object. More...
 
 NcAtt (bool nullObject)
 Constructor for non-null instances. More...
 
 NcAtt (const NcAtt &rhs)
 The copy constructor. More...
 
virtual ~NcAtt ()=0
 destructor More...
 
size_t getAttLength () const
 Gets attribute length. More...
 
std::string getName () const
 Get the attribute name. More...
 
NcGroup getParentGroup () const
 Gets parent group. More...
 
NcType getType () const
 Returns the attribute type. More...
 
void getValues (char **dataValues) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
 
void getValues (char *dataValues) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
 
void getValues (double *dataValues) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
 
void getValues (float *dataValues) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
 
void getValues (int *dataValues) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
 
void getValues (long *dataValues) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
 
void getValues (long long *dataValues) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
 
void getValues (short *dataValues) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
 
void getValues (signed char *dataValues) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
 
void getValues (std::string &dataValues) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. (The string variable does not need preallocating.) More...
 
void getValues (unsigned char *dataValues) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
 
void getValues (unsigned int *dataValues) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
 
void getValues (unsigned long long *dataValues) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
 
void getValues (unsigned short *dataValues) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
 
void getValues (void *dataValues) const
 Gets a netCDF attribute. More...
 
bool isNull () const
 Returns true if this object is null (i.e. More...
 
bool operator!= (const NcAtt &rhs) const
 != operator More...
 
bool operator== (const NcAtt &rhs) const
 equivalence operator More...
 

Protected Member Functions

NcAttoperator= (const NcAtt &rhs)
 assignment operator More...
 

Protected Attributes

int groupId
 
std::string myName
 
bool nullObject
 
int varId
 

Detailed Description

Abstract base class represents inherited by ncVarAtt and ncGroupAtt.

Definition at line 13 of file ncAtt.h.

Constructor & Destructor Documentation

◆ ~NcAtt()

NcAtt::~NcAtt ( )
pure virtual

destructor

Definition at line 11 of file ncAtt.cpp.

◆ NcAtt() [1/3]

NcAtt::NcAtt ( )

Constructor generates a null object.

Definition at line 24 of file ncAtt.cpp.

◆ NcAtt() [2/3]

NcAtt::NcAtt ( bool  nullObject)

Constructor for non-null instances.

Definition at line 29 of file ncAtt.cpp.

◆ NcAtt() [3/3]

NcAtt::NcAtt ( const NcAtt rhs)

The copy constructor.

Definition at line 34 of file ncAtt.cpp.

Member Function Documentation

◆ getAttLength()

size_t NcAtt::getAttLength ( ) const

Gets attribute length.

Definition at line 87 of file ncAtt.cpp.

◆ getName()

std::string netCDF::NcAtt::getName ( ) const
inline

Get the attribute name.

Definition at line 30 of file ncAtt.h.

◆ getParentGroup()

netCDF::NcGroup NcAtt::getParentGroup ( ) const

Gets parent group.

Definition at line 58 of file ncAtt.cpp.

◆ getType()

NcType NcAtt::getType ( ) const

Returns the attribute type.

Definition at line 64 of file ncAtt.cpp.

◆ getValues() [1/15]

void NcAtt::getValues ( char **  dataValues) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 219 of file ncAtt.cpp.

◆ getValues() [2/15]

void NcAtt::getValues ( char *  dataValues) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 110 of file ncAtt.cpp.

◆ getValues() [3/15]

void NcAtt::getValues ( double *  dataValues) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 174 of file ncAtt.cpp.

◆ getValues() [4/15]

void NcAtt::getValues ( float *  dataValues) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 165 of file ncAtt.cpp.

◆ getValues() [5/15]

void NcAtt::getValues ( int *  dataValues) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 147 of file ncAtt.cpp.

◆ getValues() [6/15]

void NcAtt::getValues ( long *  dataValues) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 156 of file ncAtt.cpp.

◆ getValues() [7/15]

void NcAtt::getValues ( long long *  dataValues) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 201 of file ncAtt.cpp.

◆ getValues() [8/15]

void NcAtt::getValues ( short *  dataValues) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 138 of file ncAtt.cpp.

◆ getValues() [9/15]

void NcAtt::getValues ( signed char *  dataValues) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 129 of file ncAtt.cpp.

◆ getValues() [10/15]

void netCDF::NcAtt::getValues ( std::string &  dataValues) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. (The string variable does not need preallocating.)

◆ getValues() [11/15]

void NcAtt::getValues ( unsigned char *  dataValues) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 120 of file ncAtt.cpp.

◆ getValues() [12/15]

void NcAtt::getValues ( unsigned int *  dataValues) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 192 of file ncAtt.cpp.

◆ getValues() [13/15]

void NcAtt::getValues ( unsigned long long *  dataValues) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 210 of file ncAtt.cpp.

◆ getValues() [14/15]

void NcAtt::getValues ( unsigned short *  dataValues) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 183 of file ncAtt.cpp.

◆ getValues() [15/15]

void NcAtt::getValues ( void *  dataValues) const

Gets a netCDF attribute.

The user must ensure that the variable "dataValues" has sufficient space to hold the attribute.

Parameters
dataValuesOn return contains the value of the attribute. If the type of data values differs from the netCDF variable type, type conversion will occur. (However, no type conversion is carried out for variables using the user-defined data types: nc_Vlen, nc_Opaque, nc_Compound and nc_Enum.)

Definition at line 228 of file ncAtt.cpp.

◆ isNull()

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

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

it has no contents); otherwise returns false.

Definition at line 103 of file ncAtt.h.

◆ operator!=()

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

!= operator

Definition at line 52 of file ncAtt.cpp.

◆ operator=()

NcAtt & NcAtt::operator= ( const NcAtt rhs)
protected

assignment operator

Definition at line 14 of file ncAtt.cpp.

◆ operator==()

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

equivalence operator

Definition at line 43 of file ncAtt.cpp.

Field Documentation

◆ groupId

int netCDF::NcAtt::groupId
protected

Definition at line 113 of file ncAtt.h.

◆ myName

std::string netCDF::NcAtt::myName
protected

Definition at line 111 of file ncAtt.h.

◆ nullObject

bool netCDF::NcAtt::nullObject
protected

Definition at line 109 of file ncAtt.h.

◆ varId

int netCDF::NcAtt::varId
protected

Definition at line 115 of file ncAtt.h.


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.