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

Class represents a netCDF attribute local to a netCDF variable. More...

#include "ncVarAtt.h"

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

Public Member Functions

 NcVarAtt ()
 Constructor generates a null object. More...
 
 NcVarAtt (const NcGroup &grp, const NcVar &ncVar, const int index)
 Constructor for an existing local attribute. More...
 
 NcVarAtt (const NcVarAtt &rhs)
 The copy constructor. 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...
 
NcVar getParentVar () const
 Returns the NcVar parent object. 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...
 
void inq_atttype (const char *name, nc_type *xtypep)
 Query a variable attribute type. More...
 
bool isNull () const
 Returns true if this object is null (i.e. More...
 
bool operator!= (const NcAtt &rhs) const
 != operator More...
 
NcVarAttoperator= (const NcVarAtt &rhs)
 assignment operator More...
 
bool operator== (const NcAtt &rhs) const
 equivalence operator More...
 

Protected Attributes

int groupId
 
std::string myName
 
bool nullObject
 
int varId
 

Friends

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

Detailed Description

Class represents a netCDF attribute local to a netCDF variable.

Definition at line 13 of file ncVarAtt.h.

Constructor & Destructor Documentation

◆ NcVarAtt() [1/3]

NcVarAtt::NcVarAtt ( )

Constructor generates a null object.

Definition at line 42 of file ncVarAtt.cpp.

◆ NcVarAtt() [2/3]

NcVarAtt::NcVarAtt ( const NcVarAtt rhs)

The copy constructor.

Definition at line 36 of file ncVarAtt.cpp.

◆ NcVarAtt() [3/3]

NcVarAtt::NcVarAtt ( const NcGroup grp,
const NcVar ncVar,
const int  index 
)

Constructor for an existing local attribute.

Parameters
grpParent Group object.
NcVarParent NcVar object.
indexThe index (id) of the attribute.

Definition at line 48 of file ncVarAtt.cpp.

Member Function Documentation

◆ getAttLength()

size_t NcAtt::getAttLength ( ) const
inherited

Gets attribute length.

Definition at line 87 of file ncAtt.cpp.

◆ getName()

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

Get the attribute name.

Definition at line 30 of file ncAtt.h.

◆ getParentGroup()

netCDF::NcGroup NcAtt::getParentGroup ( ) const
inherited

Gets parent group.

Definition at line 58 of file ncAtt.cpp.

◆ getParentVar()

NcVar NcVarAtt::getParentVar ( ) const

Returns the NcVar parent object.

Definition at line 68 of file ncVarAtt.cpp.

◆ getType()

NcType NcAtt::getType ( ) const
inherited

Returns the attribute type.

Definition at line 64 of file ncAtt.cpp.

◆ getValues() [1/15]

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

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
inherited

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
inherited

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
inherited

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
inherited

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
inherited

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
inherited

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
inherited

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
inherited

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
inherited

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
inherited

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
inherited

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
inherited

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
inherited

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
inherited

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.

◆ inq_atttype()

void NcVarAtt::inq_atttype ( const char *  name,
nc_type *  xtypep 
)

Query a variable attribute type.

Definition at line 61 of file ncVarAtt.cpp.

◆ isNull()

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

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
inherited

!= operator

Definition at line 52 of file ncAtt.cpp.

◆ operator=()

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

assignment operator

Definition at line 29 of file ncVarAtt.cpp.

◆ operator==()

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

equivalence operator

Definition at line 43 of file ncAtt.cpp.

Friends And Related Function Documentation

◆ operator<

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

comparator operator

Definition at line 12 of file ncVarAtt.cpp.

◆ operator>

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

comparator operator

Definition at line 18 of file ncVarAtt.cpp.

Field Documentation

◆ groupId

int netCDF::NcAtt::groupId
protectedinherited

Definition at line 113 of file ncAtt.h.

◆ myName

std::string netCDF::NcAtt::myName
protectedinherited

Definition at line 111 of file ncAtt.h.

◆ nullObject

bool netCDF::NcAtt::nullObject
protectedinherited

Definition at line 109 of file ncAtt.h.

◆ varId

int netCDF::NcAtt::varId
protectedinherited

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.