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

Class represents a netCDF group attribute. More...

#include "ncGroupAtt.h"

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

Public Member Functions

 NcGroupAtt ()
 Constructor generates a null object. More...
 
 NcGroupAtt (const NcGroup &grp, const int index)
 Constructor for an existing global attribute. More...
 
 NcGroupAtt (const NcGroupAtt &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...
 
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...
 
NcGroupAttoperator= (const NcGroupAtt &rhs)
 assignment operator More...
 
bool operator== (const NcAtt &rhs) const
 equivalence operator More...
 
bool operator== (const NcGroupAtt &rhs)
 equivalence operator More...
 

Protected Attributes

int groupId
 
std::string myName
 
bool nullObject
 
int varId
 

Friends

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

Detailed Description

Class represents a netCDF group attribute.

Definition at line 12 of file ncGroupAtt.h.

Constructor & Destructor Documentation

◆ NcGroupAtt() [1/3]

NcGroupAtt::NcGroupAtt ( )

Constructor generates a null object.

Definition at line 40 of file ncGroupAtt.cpp.

◆ NcGroupAtt() [2/3]

NcGroupAtt::NcGroupAtt ( const NcGroupAtt rhs)

The copy constructor.

Definition at line 34 of file ncGroupAtt.cpp.

◆ NcGroupAtt() [3/3]

NcGroupAtt::NcGroupAtt ( const NcGroup grp,
const int  index 
)

Constructor for an existing global attribute.

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

Definition at line 54 of file ncGroupAtt.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.

◆ 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.

◆ 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=()

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

assignment operator

Definition at line 27 of file ncGroupAtt.cpp.

◆ operator==() [1/2]

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

equivalence operator

Definition at line 43 of file ncAtt.cpp.

◆ operator==() [2/2]

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

equivalence operator

Definition at line 45 of file ncGroupAtt.cpp.

Friends And Related Function Documentation

◆ operator<

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

comparator operator

Definition at line 11 of file ncGroupAtt.cpp.

◆ operator>

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

comparator operator

Definition at line 17 of file ncGroupAtt.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.