General Purpose Geodetic Library
SgNcdfAttribute Class Reference

#include <SgNetCdf.h>

Public Member Functions

 SgNcdfAttribute ()
 
 SgNcdfAttribute (const QString name, nc_type typeOfData, size_t numOfElements, void *data)
 
 SgNcdfAttribute (const SgNcdfAttribute &)
 
 ~SgNcdfAttribute ()
 
const QString & getName () const
 
nc_type getTypeOfData () const
 
size_t getNumOfElements () const
 
const void * getData () const
 
void setName (const QString &str)
 
void setTypeOfData (nc_type type)
 
void setNumOfElements (size_t num)
 
void setData (const void *, size_t)
 
int nc_get_attr (int ncid, int varid)
 
int nc_put_attr (int ncid, int varid)
 
void debug_output ()
 

Static Public Member Functions

static const QString className ()
 

Private Attributes

QString name_
 
nc_type typeOfData_
 
size_t numOfElements_
 
void * data_
 

Detailed Description

Definition at line 133 of file SgNetCdf.h.

Constructor & Destructor Documentation

◆ SgNcdfAttribute() [1/3]

SgNcdfAttribute::SgNcdfAttribute ( )

A constructor. Creates a default copy of the object.

Definition at line 277 of file SgNetCdf.cpp.

References data_, numOfElements_, and typeOfData_.

◆ SgNcdfAttribute() [2/3]

SgNcdfAttribute::SgNcdfAttribute ( const QString  name,
nc_type  typeOfData,
size_t  numOfElements,
void *  data 
)

Definition at line 288 of file SgNetCdf.cpp.

References data_, ncdfaux_data_allocate_n_copy(), numOfElements_, and typeOfData_.

◆ SgNcdfAttribute() [3/3]

SgNcdfAttribute::SgNcdfAttribute ( const SgNcdfAttribute attr)

◆ ~SgNcdfAttribute()

SgNcdfAttribute::~SgNcdfAttribute ( )

A destructor. Destroys the object.

Definition at line 313 of file SgNetCdf.cpp.

References data_, ncdfaux_data_free(), and typeOfData_.

Member Function Documentation

◆ className()

const QString SgNcdfAttribute::className ( )
static

Returns name of the class (for debug output).

Definition at line 269 of file SgNetCdf.cpp.

Referenced by nc_get_attr(), and nc_put_attr().

◆ debug_output()

void SgNcdfAttribute::debug_output ( )

Definition at line 403 of file SgNetCdf.cpp.

◆ getData()

const void* SgNcdfAttribute::getData ( ) const
inline

Definition at line 159 of file SgNetCdf.h.

References data_.

Referenced by SgNcdfAttribute(), SgNcdfVariable::debug_output(), and SgNetCdf::getData().

◆ getName()

const QString& SgNcdfAttribute::getName ( ) const
inline

Definition at line 156 of file SgNetCdf.h.

References name_.

Referenced by SgNcdfVariable::addAttribute(), SgNcdfVariable::debug_output(), and SgNetCdf::putData().

◆ getNumOfElements()

size_t SgNcdfAttribute::getNumOfElements ( ) const
inline

Definition at line 158 of file SgNetCdf.h.

References numOfElements_.

Referenced by SgNcdfAttribute(), SgNcdfVariable::debug_output(), and SgNetCdf::getData().

◆ getTypeOfData()

nc_type SgNcdfAttribute::getTypeOfData ( ) const
inline

Definition at line 157 of file SgNetCdf.h.

References typeOfData_.

Referenced by SgNcdfAttribute(), SgNcdfVariable::debug_output(), and SgNetCdf::getData().

◆ nc_get_attr()

int SgNcdfAttribute::nc_get_attr ( int  ncid,
int  varid 
)

◆ nc_put_attr()

int SgNcdfAttribute::nc_put_attr ( int  ncid,
int  varid 
)

◆ setData()

void SgNcdfAttribute::setData ( const void *  src,
size_t  num 
)

Definition at line 322 of file SgNetCdf.cpp.

References data_, ncdfaux_data_allocate_n_copy(), ncdfaux_data_free(), and typeOfData_.

Referenced by SgVgosDb::setupFormat().

◆ setName()

void SgNcdfAttribute::setName ( const QString &  str)
inline

Definition at line 161 of file SgNetCdf.h.

References name_.

Referenced by SgNetCdf::getData(), and SgVgosDb::setupFormat().

◆ setNumOfElements()

void SgNcdfAttribute::setNumOfElements ( size_t  num)
inline

Definition at line 163 of file SgNetCdf.h.

References numOfElements_.

Referenced by SgNcdfAttribute(), SgNetCdf::getData(), and SgVgosDb::setupFormat().

◆ setTypeOfData()

void SgNcdfAttribute::setTypeOfData ( nc_type  type)
inline

Definition at line 162 of file SgNetCdf.h.

References typeOfData_.

Referenced by SgNcdfAttribute(), SgNetCdf::getData(), and SgVgosDb::setupFormat().

Member Data Documentation

◆ data_

void* SgNcdfAttribute::data_
private

◆ name_

QString SgNcdfAttribute::name_
private

Definition at line 185 of file SgNetCdf.h.

Referenced by getName(), nc_get_attr(), nc_put_attr(), and setName().

◆ numOfElements_

size_t SgNcdfAttribute::numOfElements_
private

◆ typeOfData_

nc_type SgNcdfAttribute::typeOfData_
private

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