General Purpose Geodetic Library
SgNcdfVariable Class Reference

#include <SgNetCdf.h>

Public Member Functions

 SgNcdfVariable ()
 
 ~SgNcdfVariable ()
 
const QString & getName () const
 
int getId () const
 
nc_type getTypeOfData () const
 
const void * getData () const
 
const char * data2char () const
 
char * data2char ()
 
const short * data2short () const
 
short * data2short ()
 
const int * data2int () const
 
int * data2int ()
 
const double * data2double () const
 
double * data2double ()
 
void *& data ()
 
size_t numOfElements () const
 
void setName (const QString &name)
 
void setId (int id)
 
void setTypeOfData (nc_type type)
 
void setData (void *d)
 
const QMap< QString, SgNcdfDimension * > & dimensionByName () const
 
const QList< SgNcdfDimension * > & dimensions () const
 
const QMap< QString, SgNcdfAttribute * > & attributeByName () const
 
void addDimension (const SgNcdfDimension &d, int idx=-1)
 
void addDimension (const QString &name, int n, int id, int idx=-1)
 
void delDimension (const QString &)
 
void addAttribute (const SgNcdfAttribute &)
 
void addAttribute (SgNcdfAttribute *)
 
void delAttribute (const QString &)
 
int nc_get_var (int ncid)
 
int nc_put_var (int ncid)
 
void debug_output ()
 
int sizeOfData () const
 
void allocateData ()
 
void multiplyData (int)
 
void check4multiplication ()
 

Static Public Member Functions

static const QString className ()
 

Private Member Functions

void calcNumOfElements ()
 

Private Attributes

QString name_
 
int id_
 
QMap< QString, SgNcdfDimension * > dimensionByName_
 
QList< SgNcdfDimension * > dimensions_
 
QMap< QString, SgNcdfAttribute * > attributeByName_
 
nc_type typeOfData_
 
size_t numOfElements_
 
void * data_
 

Detailed Description

Definition at line 201 of file SgNetCdf.h.

Constructor & Destructor Documentation

◆ SgNcdfVariable()

SgNcdfVariable::SgNcdfVariable ( )

A constructor. Creates a default copy of the object.

Definition at line 427 of file SgNetCdf.cpp.

References data_, id_, numOfElements_, and typeOfData_.

◆ ~SgNcdfVariable()

SgNcdfVariable::~SgNcdfVariable ( )

A destructor. Destroys the object.

Definition at line 442 of file SgNetCdf.cpp.

References attributeByName_, data_, dimensionByName_, dimensions_, ncdfaux_data_free(), and typeOfData_.

Member Function Documentation

◆ addAttribute() [1/2]

◆ addAttribute() [2/2]

void SgNcdfVariable::addAttribute ( SgNcdfAttribute a)

◆ addDimension() [1/2]

void SgNcdfVariable::addDimension ( const QString &  name,
int  n,
int  id,
int  idx = -1 
)

◆ addDimension() [2/2]

void SgNcdfVariable::addDimension ( const SgNcdfDimension d,
int  idx = -1 
)
inline

◆ allocateData()

◆ attributeByName()

const QMap<QString, SgNcdfAttribute*>& SgNcdfVariable::attributeByName ( ) const
inline

Definition at line 248 of file SgNetCdf.h.

References attributeByName_.

Referenced by SgNetCdf::getData(), and SgNetCdf::putData().

◆ calcNumOfElements()

void SgNcdfVariable::calcNumOfElements ( )
private

Definition at line 657 of file SgNetCdf.cpp.

References dimensions_, and numOfElements_.

◆ check4multiplication()

◆ className()

const QString SgNcdfVariable::className ( )
static

Returns name of the class (for debug output).

Definition at line 419 of file SgNetCdf.cpp.

Referenced by addAttribute(), allocateData(), check4multiplication(), data2char(), data2double(), data2int(), data2short(), delAttribute(), delDimension(), multiplyData(), nc_get_var(), and nc_put_var().

◆ data()

void*& SgNcdfVariable::data ( )
inline

Returns a reference on the pointer – full access.

Definition at line 236 of file SgNetCdf.h.

References data_.

◆ data2char() [1/2]

char * SgNcdfVariable::data2char ( )

◆ data2char() [2/2]

const char * SgNcdfVariable::data2char ( ) const

Definition at line 459 of file SgNetCdf.cpp.

References className(), data_, SgLogger::IO_NCDF, logger, ncdfaux_type_2_string(), typeOfData_, SgLogger::write(), and SgLogger::WRN.

Referenced by SgVgosDb::loadAntennaApriories(), SgVgosDb::loadAtmSetup(), SgVgosDb::loadCalcEop(), SgVgosDb::loadCalcInfo(), SgVgosDb::loadCalibrations(), SgVgosDb::loadClockApriories(), SgVgosDb::loadClockBreaks(), SgVgosDb::loadClockSetup(), SgVgosDb::loadEccentricities(), SgVgosDb::loadMiscCable(), SgVgosDb::loadMiscFourFit(), SgVgosDb::loadObsChannelInfoMk4(), SgVgosDb::loadObsCorrelatorInfoCrl(), SgVgosDb::loadObsCorrelatorInfoMk3(), SgVgosDb::loadObsCorrelatorInfoMk4(), SgVgosDb::loadObsCorrelatorInfoS2(), SgVgosDb::loadObsObjectNames(), SgVgosDb::loadObsQualityCodes(), SgVgosDb::loadScanCrootFname(), SgVgosDb::loadScanName(), SgVgosDb::loadSessionHead(), SgVgosDb::loadSolveWeights(), SgVgosDb::loadSourcesApriories(), SgVgosDb::loadStationMet(), SgVgosDb::loadStationName(), SgVgosDb::loadStationsApriories(), SgVgosDb::loadStationTsys(), SgVgosDb::loadStdObsCalibration(), SgNetCdf::setServiceVar(), SgVgosDb::storeAntennaApriories(), SgVgosDb::storeAtmSetup(), SgVgosDb::storeCalcEop(), SgVgosDb::storeCalcInfo(), SgVgosDb::storeClockApriories(), SgVgosDb::storeIonoSetup(), SgVgosDb::storeMiscFourFit(), SgVgosDb::storeObsChannelInfo(), SgVgosDb::storeObsCorrelatorInfo(), SgVgosDb::storeObsObjectNames(), SgVgosDb::storeObsQualityCodes(), SgVgosDb::storeScanCrootFname(), SgVgosDb::storeScanName(), SgVgosDb::storeSourceCrossRefs(), SgVgosDb::storeSourcesApriories(), SgVgosDb::storeStationCrossRefs(), SgVgosDb::storeStationsApriories(), and SgVgosDb::storeStationTsys().

◆ data2double() [1/2]

double * SgNcdfVariable::data2double ( )

◆ data2double() [2/2]

const double * SgNcdfVariable::data2double ( ) const

Definition at line 525 of file SgNetCdf.cpp.

References className(), data_, SgLogger::IO_NCDF, logger, ncdfaux_type_2_string(), typeOfData_, SgLogger::write(), and SgLogger::WRN.

Referenced by SgVgosDb::loadAntennaApriories(), SgVgosDb::loadAtmSetup(), SgVgosDb::loadCalcEop(), SgVgosDb::loadCalcInfo(), SgVgosDb::loadClockApriories(), SgVgosDb::loadClockBreaks(), SgVgosDb::loadClockSetup(), SgVgosDb::loadEccentricities(), SgVgosDb::loadEpochs4Obs(), SgVgosDb::loadEpochs4Scans(), SgVgosDb::loadErpApriori(), SgVgosDb::loadLeapSecond(), SgVgosDb::loadMiscFourFit(), SgVgosDb::loadObsAmbigSpacing(), SgVgosDb::loadObsCalFeedCorr(), SgVgosDb::loadObsCalHiFyErp(), SgVgosDb::loadObsCalHiFyLibration(), SgVgosDb::loadObsCalIonGroup(), SgVgosDb::loadObsCalUnphase(), SgVgosDb::loadObsCalWobble(), SgVgosDb::loadObsChannelInfoMk3(), SgVgosDb::loadObsChannelInfoMk4(), SgVgosDb::loadObsChannelInfoS2(), SgVgosDb::loadObsCorrelation(), SgVgosDb::loadObsCorrelatorInfoCrl(), SgVgosDb::loadObsCorrelatorInfoMk3(), SgVgosDb::loadObsCorrelatorInfoMk4(), SgVgosDb::loadObsCorrelatorInfoS2(), SgVgosDb::loadObsDtec(), SgVgosDb::loadObsEffFreqs(), SgVgosDb::loadObsFractC(), SgVgosDb::loadObsGroupDelays(), SgVgosDb::loadObsPartBend(), SgVgosDb::loadObsPartEOP(), SgVgosDb::loadObsPartGamma(), SgVgosDb::loadObsPartNut2KXY(), SgVgosDb::loadObsPartParallax(), SgVgosDb::loadObsPartPoleTides(), SgVgosDb::loadObsPartRaDec(), SgVgosDb::loadObsPartXYZ(), SgVgosDb::loadObsPhase(), SgVgosDb::loadObsPhaseCalInfoMk3(), SgVgosDb::loadObsPhaseCalInfoMk4(), SgVgosDb::loadObsPhaseCalInfoS2(), SgVgosDb::loadObsRates(), SgVgosDb::loadObsRefFreqs(), SgVgosDb::loadObsSingleBandDelays(), SgVgosDb::loadObsSNR(), SgVgosDb::loadObsTheoreticals(), SgVgosDb::loadObsUserCorrections(), SgVgosDb::loadObsUVFperAsec(), SgVgosDb::loadScanEphemeris(), SgVgosDb::loadScanNutationEqx(), SgVgosDb::loadScanNutationEqxWahr(), SgVgosDb::loadScanNutationNro(), SgVgosDb::loadScanTrf2crf(), SgVgosDb::loadSolveWeights(), SgVgosDb::loadSourcesApriories(), SgVgosDb::loadStationAzEl(), SgVgosDb::loadStationCalOceanLoad(), SgVgosDb::loadStationEpochs(), SgVgosDb::loadStationMet(), SgVgosDb::loadStationOceanLdDisp(), SgVgosDb::loadStationParAngle(), SgVgosDb::loadStationPartAxisOffset(), SgVgosDb::loadStationPartHorizonGrad(), SgVgosDb::loadStationPartZenithDelayDry(), SgVgosDb::loadStationPartZenithDelayWet(), SgVgosDb::loadStationRefClockOffset(), SgVgosDb::loadStationsApriories(), SgVgosDb::loadStationTsys(), SgVgosDb::loadStdObsCalibration(), SgVgosDb::storeAntennaApriories(), SgVgosDb::storeAtmSetup(), SgVgosDb::storeCalcEop(), SgVgosDb::storeCalcInfo(), SgVgosDb::storeClockApriories(), SgVgosDb::storeEpochs4Obs(), SgVgosDb::storeEpochs4Scans(), SgVgosDb::storeErpApriori(), SgVgosDb::storeErpSetup(), SgVgosDb::storeMiscFourFit(), SgVgosDb::storeObsAmbigSpacing(), SgVgosDb::storeObsCalFeedCorr(), SgVgosDb::storeObsCalIonGroup(), SgVgosDb::storeObsCalUnphase(), SgVgosDb::storeObsChannelInfo(), SgVgosDb::storeObsCorrelation(), SgVgosDb::storeObsCorrelatorInfo(), SgVgosDb::storeObsDelayTheoretical(), SgVgosDb::storeObsDtec(), SgVgosDb::storeObsEffFreqs(), SgVgosDb::storeObsFractC(), SgVgosDb::storeObsGroupDelays(), SgVgosDb::storeObsGroupDelaysFull(), SgVgosDb::storeObsPartBend(), SgVgosDb::storeObsPartEOP(), SgVgosDb::storeObsPartGamma(), SgVgosDb::storeObsPartNut2KXY(), SgVgosDb::storeObsPartParallax(), SgVgosDb::storeObsPartPoleTides(), SgVgosDb::storeObsPartRaDec(), SgVgosDb::storeObsPartXYZ(), SgVgosDb::storeObsPhase(), SgVgosDb::storeObsPhaseCalInfo(), SgVgosDb::storeObsPhaseDelaysFull(), SgVgosDb::storeObsRates(), SgVgosDb::storeObsRateTheoretical(), SgVgosDb::storeObsRefFreqs(), SgVgosDb::storeObsSingleBandDelays(), SgVgosDb::storeObsSNR(), SgVgosDb::storeObsStd1Contribution(), SgVgosDb::storeObsStd2Contribution(), SgVgosDb::storeObsUVFperAsec(), SgVgosDb::storeScanEphemeris(), SgVgosDb::storeScanNutationEqx(), SgVgosDb::storeScanNutationEqxWahr(), SgVgosDb::storeScanNutationNro(), SgVgosDb::storeScanTimeMjd(), SgVgosDb::storeScanTrf2crf(), SgVgosDb::storeSourcesApriories(), SgVgosDb::storeStationAzEl(), SgVgosDb::storeStationCalAxisOffset(), SgVgosDb::storeStationCalCable(), SgVgosDb::storeStationCalOceanLoad(), SgVgosDb::storeStationCalSlantPathTropDry(), SgVgosDb::storeStationCalSlantPathTropWet(), SgVgosDb::storeStationEpochs(), SgVgosDb::storeStationMet(), SgVgosDb::storeStationOceanLdDisp(), SgVgosDb::storeStationParAngle(), SgVgosDb::storeStationPartAxisOffset(), SgVgosDb::storeStationPartHorizonGrad(), SgVgosDb::storeStationPartZenithDelayDry(), SgVgosDb::storeStationPartZenithDelayWet(), SgVgosDb::storeStationRefClockOffset(), SgVgosDb::storeStationsApriories(), and SgVgosDb::storeStationTsys().

◆ data2int() [1/2]

int * SgNcdfVariable::data2int ( )

◆ data2int() [2/2]

◆ data2short() [1/2]

short * SgNcdfVariable::data2short ( )

◆ data2short() [2/2]

const short * SgNcdfVariable::data2short ( ) const

Definition at line 481 of file SgNetCdf.cpp.

References className(), data_, SgLogger::IO_NCDF, logger, ncdfaux_type_2_string(), typeOfData_, SgLogger::write(), and SgLogger::WRN.

Referenced by SgVgosDb::loadAntennaApriories(), SgVgosDb::loadCalcInfo(), SgVgosDb::loadCalibrations(), SgVgosDb::loadClockBreaks(), SgVgosDb::loadEpochs4Obs(), SgVgosDb::loadEpochs4Scans(), SgVgosDb::loadMiscFourFit(), SgVgosDb::loadObsCalIonGroup(), SgVgosDb::loadObsChannelInfoMk3(), SgVgosDb::loadObsChannelInfoMk4(), SgVgosDb::loadObsChannelInfoS2(), SgVgosDb::loadObsCorrelatorInfoCrl(), SgVgosDb::loadObsCorrelatorInfoMk4(), SgVgosDb::loadObsCorrelatorInfoS2(), SgVgosDb::loadObsDataFlag(), SgVgosDb::loadObsDelayDataFlag(), SgVgosDb::loadObsEditData(), SgVgosDb::loadObsNumGroupAmbigs(), SgVgosDb::loadObsPhaseCalInfoMk3(), SgVgosDb::loadObsPhaseCalInfoMk4(), SgVgosDb::loadObsUserSup(), SgVgosDb::loadSelectionStatus(), SgVgosDb::loadSessionHead(), SgVgosDb::loadStationEpochs(), SgVgosDb::storeAntennaApriories(), SgVgosDb::storeCalcInfo(), SgVgosDb::storeEpochs4Obs(), SgVgosDb::storeEpochs4Scans(), SgVgosDb::storeIonoBits(), SgVgosDb::storeIonoSetup(), SgVgosDb::storeLeapSecond(), SgVgosDb::storeMiscFourFit(), SgVgosDb::storeObsCalIonGroup(), SgVgosDb::storeObsChannelInfo(), SgVgosDb::storeObsCorrelatorInfo(), SgVgosDb::storeObsCrossRefs(), SgVgosDb::storeObsDataFlag(), SgVgosDb::storeObsEditData(), SgVgosDb::storeObsNumGroupAmbigs(), SgVgosDb::storeObsPhaseCalInfo(), SgVgosDb::storeObsUserSup(), and SgVgosDb::storeStationEpochs().

◆ debug_output()

◆ delAttribute()

void SgNcdfVariable::delAttribute ( const QString &  name)

Definition at line 641 of file SgNetCdf.cpp.

References attributeByName_, className(), SgLogger::IO_NCDF, logger, SgLogger::write(), and SgLogger::WRN.

Referenced by addAttribute().

◆ delDimension()

void SgNcdfVariable::delDimension ( const QString &  name)

◆ dimensionByName()

const QMap<QString, SgNcdfDimension*>& SgNcdfVariable::dimensionByName ( ) const
inline

Definition at line 246 of file SgNetCdf.h.

References dimensionByName_.

◆ dimensions()

◆ getData()

const void* SgNcdfVariable::getData ( ) const
inline

Definition at line 223 of file SgNetCdf.h.

References data_.

◆ getId()

int SgNcdfVariable::getId ( ) const
inline

Definition at line 221 of file SgNetCdf.h.

References id_.

Referenced by SgNetCdf::putData().

◆ getName()

const QString& SgNcdfVariable::getName ( ) const
inline

◆ getTypeOfData()

nc_type SgNcdfVariable::getTypeOfData ( ) const
inline

◆ multiplyData()

◆ nc_get_var()

int SgNcdfVariable::nc_get_var ( int  ncid)

◆ nc_put_var()

int SgNcdfVariable::nc_put_var ( int  ncid)

◆ numOfElements()

size_t SgNcdfVariable::numOfElements ( ) const
inline

Definition at line 238 of file SgNetCdf.h.

References numOfElements_.

◆ setData()

void SgNcdfVariable::setData ( void *  d)
inline

Definition at line 244 of file SgNetCdf.h.

References data_.

◆ setId()

void SgNcdfVariable::setId ( int  id)
inline

Definition at line 241 of file SgNetCdf.h.

References id_.

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

◆ setName()

void SgNcdfVariable::setName ( const QString &  name)
inline

Definition at line 240 of file SgNetCdf.h.

References name_.

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

◆ setTypeOfData()

void SgNcdfVariable::setTypeOfData ( nc_type  type)
inline

Definition at line 242 of file SgNetCdf.h.

References typeOfData_.

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

◆ sizeOfData()

int SgNcdfVariable::sizeOfData ( ) const

Definition at line 855 of file SgNetCdf.cpp.

References ncdfaux_type_2_size(), numOfElements_, and typeOfData_.

Referenced by check4multiplication().

Member Data Documentation

◆ attributeByName_

QMap<QString, SgNcdfAttribute*> SgNcdfVariable::attributeByName_
private

◆ data_

◆ dimensionByName_

QMap<QString, SgNcdfDimension*> SgNcdfVariable::dimensionByName_
private

◆ dimensions_

◆ id_

int SgNcdfVariable::id_
private

Definition at line 291 of file SgNetCdf.h.

Referenced by SgNcdfVariable(), debug_output(), getId(), nc_get_var(), nc_put_var(), and setId().

◆ name_

QString SgNcdfVariable::name_
private

◆ numOfElements_

◆ typeOfData_


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