106
1 ODV API for C++ Reiner Schlitzer Version 3.0 Fri Mar 16 2018

ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

  • Upload
    lekien

  • View
    214

  • Download
    0

Embed Size (px)

Citation preview

Page 1: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

1

ODV API for C++

Reiner Schlitzer Version 3.0

Fri Mar 16 2018

Page 2: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

2

Page 3: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

3

Table of Contents ODV Application Programming Interface for C++ ....................................................... 2

Introduction ................................................................................................................ 2

Main Classes ........................................................................................................... 2

Installation ............................................................................................................... 2

Example Code ......................................................................................................... 3

HowTo Build Your Own Application ..................................................................... 3

Hierarchical Index .......................................................................................................... 4

Class Index ..................................................................................................................... 5

File Index ....................................................................................................................... 6

Class Documentation ..................................................................................................... 7

ODV............................................................................................................................ 7

ODVCollection ......................................................................................................... 12

ODVCollectionInventory ......................................................................................... 24

ODVCompositeLabel ............................................................................................... 30

ODVCruiseInfo ........................................................................................................ 34

ODVMapDomain ..................................................................................................... 38

ODVQualityFlagSet ................................................................................................. 43

ODVSampleFilter ..................................................................................................... 48

ODVStation .............................................................................................................. 54

ODVVariable ............................................................................................................ 70

File Documentation ...................................................................................................... 83

macros.h .................................................................................................................... 83

odv.h ......................................................................................................................... 84

odvDate.h .................................................................................................................. 85

Index ............................................................................................................................ 92

Page 4: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

4

Page 5: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

1

Page 6: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

2

ODV Application Programming Interface for C++

Author: Reiner Schlitzer

Copyright: © 2018 Reiner Schlitzer, Alfred Wegener Institute, Am Alten Hafen 26, 27568 Bremerhaven, Germany E-mail: [email protected]

Introduction The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating and writing new collections. This opens the way for custom data usage strategies not covered by the Ocean Data View software itself. Compiled versions of the ODV API are provided for Windows, Mac OS X and Linux systems as 64 bit libraries. The API package includes detailed documentation of all provided classes and their functions. The package also includes example C++ code showing how to use the API.

Main Classes The ODV API provides three fundamental classes that every application requires to successfully create a new ODV data collection or open an existing collection and read its data: (1) ODVCollection , (2) ODVVariable , and (3) ODVStation . (1) An ODVCollection object represents an ODV data collection on a local or network-attached storage device. This class provides functions for creating, opening and closing the collection, inquiring the number and kind of metadata and data variables maintained by the collection and inquiring the number of stations in the collection. (2) Metadata and data variables are described by ODVVariable objects. ODVVariable objects have name and unit labels as well as variable and value types. ODVVariable objects can hold numeric or string data. (3) ODVStation objects can hold the metadata and data of one station in the collection. This class provides functions for reading the metadata and data of a given station and for providing access to the numeric or string data of arbitrary metadata and data variables for the given station. The readData() function can be called repeatedly to load the data of arbitrary stations into the ODVStation object, thereby overwriting any previously loaded station data. If you need the data of two or more stations at the same time, for instance for calculating geostrophic flows, you create two or more ODVStation objects and load the required station data into the respective objects. The ODVCollectionInventory and ODVCruiseInfo classes are not necessarily required for basic metadata and data access, but provide convenient and fast access to basic metadata, such as longitudes, latitudes, dates and times. These metadata can be used for quickly scanning over large data collections and filtering station subsets in particular space and time domains.

Installation Installation information for your platform and descriptions of the content of the ODV API package can be found in the install_odvApi_c++_....txt file shipped with the ODV API.

Page 7: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

3

Example Code Three example projects, simpleCollectionInfo , exportSpreadsheet , and createCollection are provided to show how to use the ODV API. The source code of the examples as well as template Qt .pro project files are found in directories examples/src and examples/project , respectively. Compiled executables of the examples are in the examples/bin directory. The exportSpreadsheet application opens an ODV collection, reads station by station and writes the station metadata and data to a spreadsheet text file. The function exportAsTextTable() in file exportSpreadsheet.cpp shows a typical use of the ODV API for reading data from a collection. First, an ODVCollection object is created and the ODVCollection::open() function is called. Then an ODVStation object is created using a pointer to the collection object as argument. The metadata and data of a particular station are then read from the collection using the ODVStation::readData() function. Pointers to the collection's data and metadata variables are obtained via the ODVCollection::dataVar() or ODVCollection::metaVar() functions. Finally, numeric or string data for metadata and data variables in the given station are obtained with them ODVStation::value() and ODVStation::stringValue() functions. The ODVStation::data() function is called to obtain a pointer to the array of data values of a particular variable for all the samples of the given station. A pointer to the quality flag data of a variable is obtained with the ODVStation::qfData() function. The ODVCollectionInventory class is useful for quickly retrieving position and date/time information for all or some stations in the collection.

HowTo Build Your Own Application Before developing your own C++ ODV API application you must install the 64 bit version of Qt 5 (http://www.qt.io) on your development system. In your C++ code you must include the Qt headers as well as the ODV header files contained in directory include . You must link against the ODV API and Qt5Core.lib . As a first step you must prepare a project file (extension .pro ) that will be used by the Qt qmake utility to create a Makefile or Visual Studio or XCode project file, which then can be used to build your application. Example .pro project files can be found in examples/project . Use these project files as templates for your own application. Normally only few changes are needed for adaptation. Simply assign your own source files to the variable SOURCES and your own header files to the variable HEADERS . If you need additional libraries add them to the variable LIBS . Note that "USEDLL" must always be defined when using the ODV API. qmake project files allow many options and settings, please see the Qt qmake manual for details. Your application executable will have the same name as the project file (without extension). See the comments at the top of the example project files for the qmake calling syntax.

Page 8: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

4

Hierarchical Index Class Hierarchy

ODV ......................................................................................................................... 7

ODVCollection ...................................................................................................... 12

ODVCollectionInventory ....................................................................................... 24

ODVCruiseInfo ...................................................................................................... 34

ODVMapDomain ................................................................................................... 38

ODVQualityFlagSet ............................................................................................... 43

ODVSampleFilter .................................................................................................. 48

ODVStation............................................................................................................ 54

ODVVariable ......................................................................................................... 70

QString

ODVCompositeLabel ...................................................................................... 30

Page 9: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

5

Class Index Class List Here are the classes, structs, unions and interfaces with brief descriptions:

ODV (Declarations for global use ) ..................................................................... 7

ODVCollection (Class for handling ODVCF6 (*.odv), ODVCF5 (*.odv) and GENERIC (*.var) data collections ) ................................................................. 12

ODVCollectionInventory (The collection inventory holds information for all cruises of a collection as well as cruise IDs, position, date/time, sample count and data availability for all stations of the collection ) ................................... 24

ODVCompositeLabel ....................................................................................... 30

ODVCruiseInfo (Holds summary information for one cruise of a collection ) ................................................................................................................................ 34

ODVMapDomain (Holds bounding map domain information and provides functions to append individual lon/lat points or other ODVMapDomain objects ) ................................................................................................................ 38

ODVQualityFlagSet (Represents an ODV Quality Flag Schema. See appendix of "ODV User's Guide" , section "Quality Flag Schemes" for further details on various schemes ) ............................................................................... 43

ODVSampleFilter (The ODVSampleFilter object maintains quality, range (numeric variables) and wildcard (text variables) sample filter specifications for data variables ) ............................................................................................. 48

ODVStation (Class for maintaining metadata and data of one station ) ...... 54

ODVVariable (Represents a collection variable ) ........................................... 70

Page 10: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

6

File Index File List Here is a list of all documented files with brief descriptions:

declspec.h .................................................... Fehler! Textmarke nicht definiert.

macros.h (This file declares some helpful macros to deal with certain enumerations ) .................................................................................................... 83

odv.h (This file provides globally used declarations ) ..................................... 84

ODVCollection.h ........................................ Fehler! Textmarke nicht definiert.

ODVCollectionInventory.h ....................... Fehler! Textmarke nicht definiert.

ODVCompositeLabel.h ............................. Fehler! Textmarke nicht definiert.

ODVCruiseInfo.h ....................................... Fehler! Textmarke nicht definiert.

odvDate.h (This file declares global functions for date and time manipulations ) ................................................................................................... 85

ODVMapDomain.h .................................... Fehler! Textmarke nicht definiert.

ODVQualityFlagSet.h ............................... Fehler! Textmarke nicht definiert.

ODVSampleFilter.h ................................... Fehler! Textmarke nicht definiert.

ODVStation.h ............................................. Fehler! Textmarke nicht definiert.

ODVVariable.h .......................................... Fehler! Textmarke nicht definiert.

Page 11: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

7

Class Documentation ODV Class Reference Declarations for global use. #include "odv.h"

Public Types • enum Status { NoErr =0, UserAbort, EOD, CollReadOnly, UnknownFileTypeErr, NoSuchDirErr,

DirCreateErr, FileOpenErr, FileReadErr, FileWriteErr, FileErr, CollOpenErr, CollCreateErr, CollDelErr, CollCopyErr, CollFormatUnsupported, CollReadErr, CollRenameErr, CollWriteErr, CollNotSorted, ImportErr, ImportProblems, AnalyzeFileErr, MacroErr, VarNotFound, PSPreambleNotFound, StatIDOutOfRange, InvalidStationData, OutOfMemory, BadParameter, NotImplemented }

• enum AccessMode { NoAccess =0, ReadOnly =1, ReadWrite =3 } • enum DateFormat { IsoDate, mmddyyyyDate, mmmddyyyyDate, ddmonthyyyyDate,

ddmmmyyyyDate, yyyymmddDate } • enum TimeFormat { IsoTime, hhmmssTime, hhmmTime }

Static Public Attributes • static const qint8 missINT8 • static const quint8 missUINT8 • static const qint16 missINT16 • static const quint16 missUINT16 • static const qint32 missINT32 • static const quint32 missUINT32 • static const float missFLOAT • static const double missDOUBLE • static const qint8 largeINT8 • static const quint8 largeUINT8 • static const qint16 largeINT16 • static const quint16 largeUINT16 • static const qint32 largeINT32 • static const quint32 largeUINT32 • static const float largeFLOAT • static const double largeDOUBLE • static const qint32 STREAMVERSION

Detailed Description Declarations for global use. The ODV class contains declarations and definitions used throughout ODV. This includes the return status of functions and constants.

Member Enumeration Documentation

enum ODV::AccessMode File and collection access modes

Page 12: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

8

Enumerator: NoAccess No access.

ReadOnly Read-only access.

ReadWrite Read-write access.

enum ODV::DateFormat Date text formats supported by ODV.

Enumerator: IsoDate Date format according to ISO 8601.

Example: 2006-02-23 for Feb/23/2006

mmddyyyyDate Date in one pass with separators. Example: 02/23/2006 for Feb/23/2006

mmmddyyyyDate Date with abbreviated english month name in front. Example: Feb 23 2006 for Feb/23/2006

ddmonthyyyyDate Date with full english month name. Example: 23 February 2006 for Feb/23/2006.

ddmmmyyyyDate Date with abbreviated english month name. Example: 23 Feb 2006 for Feb/23/2006

yyyymmddDate Date in one pass without separators. Example: 20060223 for Feb/23/2006

enum ODV::Status Status values returned by many functions.

Enumerator: NoErr OK

UserAbort Aborted by user

EOD End of data reached

CollReadOnly Collection not writable

UnknownFileType

Err Unknown file type

Page 13: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

9

NoSuchDirErr Directory does not exist

DirCreateErr Could not create directory

FileOpenErr Could not open file

FileReadErr Error on read in file

FileWriteErr Error on write to file

FileErr A general error on file operation occured

CollOpenErr Could not open collection

CollCreateErr Could not create collection

CollDelErr Could not delete collection

CollCopyErr Could not copy collection

CollFormatUnsupported

The collection format is not supported

CollReadErr Error on read in collection

CollRenameErr Could not rename collection

CollWriteErr Error on write to collection

CollNotSorted Could not sort & condense collection

ImportErr Error on import

ImportProblems Import was done but there were problems. Probably not all data could be imported.

AnalyzeFileErr Error on analyzing file

MacroErr Syntax error in macro

VarNotFound A variable could not be identified

PSPreambleNotFound

Postscript preamble file not found.

StatIDOutOfRange ID of requested station is out of range.

InvalidStationData Data of station is invalid or unreasonable.

Page 14: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

10

OutOfMemory Machine is out of memory.

BadParameter A bad parameter value was supplied.

NotImplemented The requested functionality is not implemented.

enum ODV::TimeFormat Time text formats supported by ODV.

Enumerator: IsoTime Time format according to ISO 8601.

Example: 21:03:59 for 3 min and 59 sec after 9pm

hhmmssTime Time format without separators. Example: 210359 for 3 min and 59 sec after 9pm

hhmmTime Time format without separators. Example: 2103 for 3 min and 59 sec after 9pm

Member Data Documentation

const double ODV::largeDOUBLE[static] Large positive value for double data type.

const float ODV::largeFLOAT[static] Large positive value for float data type.

const qint16 ODV::largeINT16[static] Large positive value for qint16 data type.

const qint32 ODV::largeINT32[static] Large positive value for qint32 data type.

const qint8 ODV::largeINT8[static] Large value constants for different data types. Large positive value for qint8 data type.

const quint16 ODV::largeUINT16[static] Large positive value for quint16 data type.

const quint32 ODV::largeUINT32[static] Large positive value for quint32 data type.

Page 15: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

11

const quint8 ODV::largeUINT8[static] Large positive value for quint8 data type.

const double ODV::missDOUBLE[static] Missing value for double data type.

const float ODV::missFLOAT[static] Missing value for float data type.

const qint16 ODV::missINT16[static] Missing value for qint16 data type.

const qint32 ODV::missINT32[static] Missing value for qint32 data type.

const qint8 ODV::missINT8[static] Missing value constants for different data types. Missing value for qint8 data type.

const quint16 ODV::missUINT16[static] Missing value for quint16 data type.

const quint32 ODV::missUINT32[static] Missing value for quint32 data type.

const quint8 ODV::missUINT8[static] Missing value for quint8 data type.

Page 16: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

12

ODVCollection Class Reference Class for handling ODVCF6 (*.odv), ODVCF5 (*.odv) and GENERIC (*.var) data collections. #include "collection/ODVCollection.h"

Public Types • enum DataField { GeneralField =0, Ocean, Atmosphere, Land, IceSheet, SeaIce, Sediment } • enum DataType { GeneralType =0, Profiles, Trajectories, TimeSeries } • enum StateFlag { ColUndefined =0, ColDefined =1, ColDeleteWhenClosed =2,

ColEmptyNetCDF =16, ColVarsRead =32, ColOpen =64 }

Public Member Functions • Q_DECLARE_FLAGS (State, StateFlag) • ODVCollection (const QString &collectionName, const QString &userString=QString())

Creates a new ODVCollection object. • ODV::AccessMode accessMode () • int appendDataVar (ODVVariable *var)

Appends variable var to the set of data variables. • quint32 appendHistoryString (quint32 accession, const QString &string)

Appends the string string as a new history record of the station with accession number accession . • int appendHistoryStrings (quint32 accession, const QStringList &stringList)

Appends all strings in stringList as new history records of the station with accession number accession .

• int appendMetaVar (ODVVariable *var) Appends meta variable var to the list of meta variables.

• QString baseDir () const • bool changePassword (const QString &newPassWord, const QString &oldPassWord=QString())

Changes the password of the collection from oldPassWord to newPassWord . • void close ()

Closes the collection and deletes all temporary files. • ODVCollectionInventory * collectionInventory () • ODV::Status create (QList< ODVVariable *> metaVars, QList< ODVVariable *> dataVars, int

primaryVarID=0, ODVCollection::DataField dataField=ODVCollection::GeneralField, ODVCollection::DataType dataType=ODVCollection::GeneralType, ODVQualityFlagSet::QFSetID sampleQFSetID=ODVQualityFlagSet::ODV, ODVQualityFlagSet::QFSetID stationQFSetID=ODVQualityFlagSet::ODV) Creates an empty collection based on specifications passed as arguments.

• ODV::AccessMode currentAccessMode () • virtual ODVVariable * dataVar (int varID) const • int dataVarCount () const

Returns the number of basic data variables in this collection. • QList< int > dataVarIdList () const • QList< ODVVariable * > dataVarPtrList () const • QList< ODVVariable * > extendedMetaVars () • QString extension () const • QString filePath () const • void generalProperties (DataField &dField, DataType &dType) const • QStringList historyStrings (quint32 accession) const

Retrieves all history strings for the station with accession number accession . • int instanceID () const • QString inventoryFilePath () const

Page 17: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

13

• bool isOpen () const • bool isPasswordProtected () • QDateTime lastModified () const • ODV::Status loadCollectionFile ()

Loads the .odv or .var collection file and creates the meta and data variables. • int mandatoryMetaVarCount () • ODVVariable * metaVar (int varID) const • ODVVariable * metaVar (ODVVariable::VarType varType) const

Returns pointer to meta variable with type varType , or NULL if no such variable is found. • int metaVarCount () const • int metaVarID (ODVVariable::VarType varType) const • QList< int > metaVarIdList (bool includeMandatoryVars=true, bool includeExtendedVars=true) • QList< ODVVariable * > metaVarPtrList () const • QString name () const • ODV::Status open (ODV::AccessMode requestedAccessMode, const QString

&password=QString()) Opens the collection in access mode requestedAccessMode using password password .

• QString pathName () const • ODVVariable * primaryVar () const • int primaryVarID () const • QString rootDir () const • const ODVQualityFlagSet & sampleQfSet () • bool setAccessLock (bool doLock)

Locks (doLock=true ) or unlocks (doLock=false ) access to this collection. • QString settingsFilePath () const • qint64 sizeOfDataFile () const • State state () const • int stationCount () const • const ODVQualityFlagSet & stationQfSet () • int userCount ()

Returns the number of applications currently using this collection. • QBitArray varsWithErrorValues (int *stationIDs, int stationsCount) • QBitArray varsWithInfoStrings (int *stationIDs, int stationsCount) • void writeChangeRecord (const QString &action, const QString &change, ODVStation *pst=0)

Creates a history or log record composed of action and change and adds it to collection's history pool or log file.

• void writeLogRecord (const QString &action, const QString &change, ODVStation *pst=0) Creates a log record composed of action and change and adds it to collection's log file.

• ODV::Status writeStationCount () Writes the current station count to the collection file.

Static Public Member Functions • static DataField dataFieldID (const QString &fieldName) • static DataType dataTypeID (const QString &typeName) • static bool isInUse (const QString &filePath) • static void mandatoryMetaVars (QList< ODVVariable *> *mv)

Creates the ODVCF6 mandatory meta variables and appends the meta variable pointers to mv .

Protected Member Functions • const PCollection * dFunc () const • PCollection * dFunc () • void setCollection (PCollection *pColl)

This function is not for public use.

Page 18: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

14

Detailed Description Class for handling ODVCF6 (*.odv), ODVCF5 (*.odv) and GENERIC (*.var) data collections. ODVCollection provides a wide range of functions for creating, opening and retrieving properties from ODV collections. Meta variables and basic data variables have 0-based variable IDs (varID ). Reading and writing of data from/to an ODV collection is performed using the readData(), readMetaData(), writeData(), and writeMetaData() functions of ODVStation objects.

Member Enumeration Documentation

enum ODVCollection::DataField This property describes the field to which the collection data belongs.

Enumerator: GeneralField General data field (default)

Ocean Oceanographic data

Atmosphere Atmospheric data

Land Data is related to land

IceSheet Data on ice sheets

SeaIce Sea ice data

Sediment Sediment data

enum ODVCollection::DataType This property describes the type of data in the collection.

Enumerator: GeneralType General data type (default)

Profiles Profile data

Trajectories Data collected from a moving platform reapeated over time

TimeSeries Data at a fixed location reapeated over time

Page 19: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

15

enum ODVCollection::StateFlag This flag describes the current state of the collection

Enumerator: ColUndefined Collection object is not initialized, format unknown.

ColDefined Collection associated with collection file name, format is set, basic

initialization is done but no files are checked or read. This state is set if the collection object was constructed successfully.

ColDeleteWhenClosed

This flag is currently not used.

ColEmptyNetCDF This flag applies to NetCDF collections only.

ColVarsRead Collection file was read successfully but no data files are opened yet. This flag is set when loadCollectionFile() was called successfully.

ColOpen Collection has been opened successfully (via open()) and is ready to work with. If this flag is set, ODVCollection::ColVarsRead and ODVCollection::ColDefined are also set.

Constructor & Destructor Documentation

ODVCollection::ODVCollection (const QString & collectionName, const QString & userString = QString())

Creates a new ODVCollection object.

The full path name to the collection file must be supplied in collectionName . The format of the collection is inferred from the collectionName extension, which must be one of ".odv" or ".var". The userString parameter is for internal usage only.

Member Function Documentation

ODV::AccessMode ODVCollection::accessMode ()

Returns: The access mode for the collection granted during the open() call.

See also: currentAccessMode()

int ODVCollection::appendDataVar (ODVVariable * var) Appends variable var to the set of data variables.

Page 20: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

16

Returns: The ID of the new variable.

Assigns the next available variable ID. Note: The var IDs of basic data variables 0-based index values.

quint32 ODVCollection::appendHistoryString (quint32 accession, const QString & string)

Appends the string string as a new history record of the station with accession number accession .

If on entry accession is equal to ODV::missUINT32 the history string string is appended to every station in the collection.

Returns: The string index for string in the history string pool, or ODV::missUINT32 if the append failed.

int ODVCollection::appendHistoryStrings (quint32 accession, const QStringList & stringList)

Appends all strings in stringList as new history records of the station with accession number accession .

If on entry accession is equal to ODV::missUINT32 the history strings stringList are appended to every station in the collection.

Returns: The number of history records appended.

int ODVCollection::appendMetaVar (ODVVariable * var) Appends meta variable var to the list of meta variables.

Returns: The ID (0-based index) of the appended meta variable.

QString ODVCollection::baseDir () const

Returns: The name of the collection's base directory, i.e. the directory that contains the collection's metadata and data files.

bool ODVCollection::changePassword (const QString & newPassWord, const QString & oldPassWord = QString())

Changes the password of the collection from oldPassWord to newPassWord .

Note: By default newly created ODV collections have no password. To establish password protection for a previously unprotected collection simply use changePassword(newPassWord) . Also note that password protection is only available for ODVCF6 collections.

Page 21: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

17

Returns: true if successful or false if the password was not changed, for instance, because oldPassWord was wrong or the collection is not ODVCF6 .

void ODVCollection::close () Closes the collection and deletes all temporary files.

ODVCollectionInventory * ODVCollection::collectionInventory ()

Returns: A pointer to the collection inventory.

ODV::Status ODVCollection::create (QList< ODVVariable *> metaVars, QList< ODVVariable *> dataVars, int primaryVarID = 0, ODVCollection::DataField dataField = ODVCollection::GeneralField, ODVCollection::DataType dataType = ODVCollection::GeneralType, ODVQualityFlagSet::QFSetID sampleQFSetID = ODVQualityFlagSet::ODV, ODVQualityFlagSet::QFSetID stationQFSetID = ODVQualityFlagSet::ODV)

Creates an empty collection based on specifications passed as arguments.

Returns: ODV::NoErr if successful, or ODV::CollCreateErr if the collection already exists.

Note: On successful return the collection state is ODVCollection::ColVarsRead . The open() function still needs to be called to open the collection.

ODV::AccessMode ODVCollection::currentAccessMode ()

Returns: The current access mode for the collection.

Note: The current access mode may be less than the access mode granted during the open() call. For instance, ODV::ReadWrite access is downgraded to ODV::ReadOnly if more than one application are using this collection at the same time.

See also: accessMode()

ODVCollection::DataField ODVCollection::dataFieldID (const QString & fieldName)[static]

Returns: The ODVCollection::DataField ID for data field name fieldName , or ODVCollection::GeneralField if fieldName is invalid.

ODVCollection::DataType ODVCollection::dataTypeID (const QString & typeName)[static]

Page 22: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

18

Returns: The ODVCollection::DataType ID for data type name typeName , or ODVCollection::GeneralType if typeName is invalid.

ODVVariable * ODVCollection::dataVar (int varID) const[virtual]

Returns: A pointer to the data variable with variable ID varID or NULL , if varID is not found.

int ODVCollection::dataVarCount () const Returns the number of basic data variables in this collection.

See also: metaVarCount()

QList< int > ODVCollection::dataVarIdList () const

Returns: The list of data variable IDs.

QList< ODVVariable * > ODVCollection::dataVarPtrList () const

Returns: The list of pointers to the data variables.

QList< ODVVariable * > ODVCollection::extendedMetaVars ()

Returns: A list of pointers to the collection's extended meta variables.

Extended meta variables are those with types outside the [METACRUISE,METAPRIMVARMAX] range.

QString ODVCollection::extension () const

Returns: The extension of the collection file including the leading dot.

QString ODVCollection::filePath () const

Returns: The collection's full file path including extension.

void ODVCollection::generalProperties (ODVCollection::DataField & dField, ODVCollection::DataType & dType) const

Returns: The general properties of this collection in dField and dType .

Page 23: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

19

QStringList ODVCollection::historyStrings (quint32 accession) const Retrieves all history strings for the station with accession number accession .

int ODVCollection::instanceID () const

Returns: The unique instance ID of the collection session.

QString ODVCollection::inventoryFilePath () const

Returns: The path to the inventory file.

bool ODVCollection::isInUse (const QString & filePath)[static]

Returns: true if the collection filePath is in use or false otherwise.

filePath must be an absolute file path to the collection (including extension). This function always returns false if filePath is a .var collection.

bool ODVCollection::isOpen () const

Returns: true if the collection is open and false otherwise.

bool ODVCollection::isPasswordProtected ()

Returns: true if the collection is password protected or false otherwise.

QDateTime ODVCollection::lastModified () const

Returns: The date/time of collection's last change.

ODV::Status ODVCollection::loadCollectionFile () Loads the .odv or .var collection file and creates the meta and data variables.

Note: This function does not open the collection; no data can be accessed yet.

Returns: • ODV::NoErr if successful • ODV::CollFormatUnsupported if file format is unsupported • ODV::FileOpenErr if collection file not found or incomplete

Page 24: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

20

• ODV::CollReadErr if parameters in collection file were not found See also:

open()

int ODVCollection::mandatoryMetaVarCount ()

Returns: The number of mandatory meta variables of this collection.

void ODVCollection::mandatoryMetaVars (QList< ODVVariable *> * mv)[static] Creates the ODVCF6 mandatory meta variables and appends the meta variable pointers to mv .

mv must be empty on entry.

Note: The caller is responsible for deleting the ODVVariable objects returned in mv .

ODVVariable * ODVCollection::metaVar (int varID) const

Returns: Pointer to meta variable with variable ID varID , or NULL , if varID is not found.

ODVVariable * ODVCollection::metaVar (ODVVariable::VarType varType) const

Returns pointer to meta variable with type varType , or NULL if no such variable is found.

int ODVCollection::metaVarCount () const

Returns: The number of meta variables.

See also: dataVarCount()

int ODVCollection::metaVarID (ODVVariable::VarType varType) const

Returns: The meta variable ID of meta variable with VarType varType , or ODV::missINT32 , if no such meta variable is found.

QList< int > ODVCollection::metaVarIdList (bool includeMandatoryVars = true, bool includeExtendedVars = true)

Returns: The list of metadata variable IDs.

Depending on the values of includeMandatoryVars and includeExtendedVars , the list of IDs includes mandatory and/or extended metadata variables.

QList< ODVVariable * > ODVCollection::metaVarPtrList () const

Page 25: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

21

Returns: The list of pointers to meta variables.

QString ODVCollection::name () const

Returns: The collection name.

See also: filePath()

ODV::Status ODVCollection::open (ODV::AccessMode requestedAccessMode, const QString & password = QString())

Opens the collection in access mode requestedAccessMode using password password .

Checks the supported access modes and automatically switches to ODV::ReadOnly if ODV::ReadWrite access is requested but not supported. Leave password empty if the collection is not password protected.

Returns: • ODV::NoErr if collection was successfully opened, • ODV::CollReadOnly if collection was successfully opened but is read-only, • ODV::CollOpenErr on failure.

See also: close(), isOpen(), currentAccessMode(), isPasswordProtected()

QString ODVCollection::pathName () const

Returns: The full pathname of the collection excluding the extension.

See also: filePath(), name()

ODVVariable * ODVCollection::primaryVar () const

Returns: A pointer to the primary variable of the collection.

int ODVCollection::primaryVarID () const

Returns: The variable ID of the collection's primary variable.

QString ODVCollection::rootDir () const

Returns: The pathname of the collection's root directory (i.e., the directory containing the .odv or .var collection file).

Page 26: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

22

const ODVQualityFlagSet & ODVCollection::sampleQfSet ()

Returns: A reference to the sample QF set of the collection.

bool ODVCollection::setAccessLock (bool doLock)

Locks (doLock=true ) or unlocks (doLock=false ) access to this collection.

Returns: true if the lock/unlock operation was successful, or false otherwise.

Open requests from other applications fail if a collection is locked.

Note: An application needs to have ODV::ReadWrite access to be able to lock a collection.

void ODVCollection::setCollection (PCollection * pColl)[protected] This function is not for public use.

QString ODVCollection::settingsFilePath () const

Returns: The full pathname of the collection's settings file.

qint64 ODVCollection::sizeOfDataFile () const

Returns: The size in bytes of the collection's data file, or 0 , if no data file exists.

ODVCollection::State ODVCollection::state () const

Returns: Collection state.

This is an Qt QFlags object which constitutes an "OR" combination of ODVCollection::StateFlag.

int ODVCollection::stationCount () const

Returns: The number of stations in this collection.

const ODVQualityFlagSet & ODVCollection::stationQfSet ()

Returns: A reference to the station QF set of the collection.

Page 27: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

23

int ODVCollection::userCount () Returns the number of applications currently using this collection.

QBitArray ODVCollection::varsWithErrorValues (int * stationIDs, int stationsCount)

Returns: A QBitArray of length dataVarCount() indicating for every basic data variable whether at least one of the stations in stationIDs contains data error values.

QBitArray ODVCollection::varsWithInfoStrings (int * stationIDs, int stationsCount)

Returns: A QBitArray of length dataVarCount() indicating for every basic data variable whether at least one of the stations in stationIDs contains data info strings.

void ODVCollection::writeChangeRecord (const QString & action, const QString & change, ODVStation * pst = 0)

Creates a history or log record composed of action and change and adds it to collection's history pool or log file.

A history record is created if the collection format is ODVCF6 and pst is non-zero, otherwise a log record is created in the collection's log file. Log records include a station identifier string that best represents the station if pst is non-zero. The string change should contain a detailed description of the change that was made. action should describe the type of change. The following action keywords are currently defined: EDITMETADATA , EDITDATA , EDITFLAGS , EDITERRORDATA , EDITINFO , DELETEDATA , DELETEERRORDATA , INSERTSAMPLE , DELETESAMPLE , USERCOMMENT .

See also: ODVStation::identifierString()

void ODVCollection::writeLogRecord (const QString & action, const QString & change, ODVStation * pst = 0)

Creates a log record composed of action and change and adds it to collection's log file.

If pst is non-zero a station identifier that best represents the station is appended to the log record (see ODVStation::identifierString()).

ODV::Status ODVCollection::writeStationCount () Writes the current station count to the collection file.

Page 28: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

24

ODVCollectionInventory Class Reference The collection inventory holds information for all cruises of a collection as well as cruise IDs, position, date/time, sample count and data availability for all stations of the collection. #include "collection/ODVCollectionInventory.h"

Public Member Functions • ODVCollectionInventory (ODVCollection *col)

Creates an new inventory object for collection col . • virtual ~ODVCollectionInventory ()

Deletes the inventory object. • const quint32 * accessionNumberData () const • quint32 accessionNumber (qint32 statID) const

Returns the accession number of station statID . • QVector< QBitArray * > * availabilityData () • int cruiseCount () const • qint32 cruiseID (qint32 statID) const • const qint32 * cruiseIdData () const • bool cruiseIDs (qint32 *crIDs, int nStats, int *statIDs) const

Returns at crIDs the cruise IDs of the nStats stations in statIDs . • const ODVCruiseInfo * cruiseInfo (const QString &cruiseName) const • QStringList cruiseNames () const • qint32 dataCount (qint32 varID) const • const qint16 * dayTimeData () const

A pointer to the day-time data (in units of 0.1 min since mid-night) of all stations in the collection. • double decimalYear (qint32 statID) const • bool decimalYears (double *decYears, int nStats, int *statIDs) const • const qint32 * gregorianDayData () const • qint32 load ()

Loads the collection inventory of the parent collection. • double latitude (qint32 statID) const • bool latitudes (double *lats, int nStats, int *statIDs) const

Returns at lats the decimal latitudes of the nStats stations in statIDs . • double longitude (qint32 statID) const • bool longitudes (double *lons, int nStats, int *statIDs) const

Returns at lons the longitudes of the nStats stations in statIDs . • const ODVMapDomain * nativeMapDomain () const • qint32 sampleCount (qint32 statID=-1) const • int sampleCount (int nStats, int *statIDs) const • const qint32 * sampleCountData () const

Returns a pointer to the sample count data of all stations in the collection. • qint32 stationIDFromAccessionNumber (quint32 accNum) const • const ODVCruiseInfo * summaryCruiseInfo () const

Protected Member Functions • const PCollectionInventory * dFunc () const • PCollectionInventory * dFunc ()

Page 29: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

25

Detailed Description The collection inventory holds information for all cruises of a collection as well as cruise IDs, position, date/time, sample count and data availability for all stations of the collection. The collection inventory provides fast access to various metadata of the stations in the collection without requiring reading individual station metadata from the collection files. Detailed per-cruise information is available via the ODVCruiseInfo object returned by cruiseInfo(). A summary of all cruises is provided by summaryCruiseInfo(). Each cruise is assigned a unique ID in the range [0 <= ID < nCruise]. Assignment is in the order of appearance of the cruises in the collection and does not imply lexical ordering.

Constructor & Destructor Documentation

ODVCollectionInventory::ODVCollectionInventory (ODVCollection * col) Creates an new inventory object for collection col .

ODVCollectionInventory::~ODVCollectionInventory ()[virtual] Deletes the inventory object.

Member Function Documentation

quint32 ODVCollectionInventory::accessionNumber (qint32 statID) const Returns the accession number of station statID .

Every station in a collection has a unique and un-modifiable accession number that is assigned when a station is added to the collection (normally during import) and preserved during Sort and Condense operations. This is in contrast to station IDs, which change when the order of stations in the collection changes.

Note: Collection formats ODVGENERIC and ODVCF5 do not maintain accession numbers. ODV::missUINT32 is returned in these cases.

const quint32 * ODVCollectionInventory::accessionNumberData () const

Returns: The array of accession numbers for all station IDs in the collection.

Every station in a collection has a unique and un-modifiable accession number that is assigned when a station is added to the collection (normally during import) and preserved during Sort and Condense operations. This is in contrast to station IDs, which change when the order of stations in the collection changes.

QVector< QBitArray * > * ODVCollectionInventory::availabilityData ()

Page 30: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

26

Returns: A pointer to the vector of bit arrays indicating whether a given station contains data for a particular basic data variable.

int ODVCollectionInventory::cruiseCount () const

Returns: The number of cruises in this ODVCollectionInventory.

qint32 ODVCollectionInventory::cruiseID (qint32 statID) const

Returns: Cruise ID of station with station ID statID , or -1 if statID is out of range.

const qint32 * ODVCollectionInventory::cruiseIdData () const

Returns: A pointer to the cruise IDs of all stations in the collection.

Index values range from 0 to ODVCollection::stationCount()-1 .

bool ODVCollectionInventory::cruiseIDs (qint32 * crIDs, int nStats, int * statIDs) const

Returns at crIDs the cruise IDs of the nStats stations in statIDs .

Note: The memory at crIDs must be allocated outside this function and must be sufficient to hold nStats qint32 values for all the entries in statIDs .

Returns: true if successful, or false otherwise.

const ODVCruiseInfo * ODVCollectionInventory::cruiseInfo (const QString & cruiseName) const

Returns: A pointer to the ODVCruiseInfo object of cruise cruiseName , or NULL , if no such cruise exists.

QStringList ODVCollectionInventory::cruiseNames () const

Returns: A list of all cruise names in the collection.

qint32 ODVCollectionInventory::dataCount (qint32 varID) const

Returns: The total number of non-ODV::missDOUBLE samples for variable ID varID of all cruises in this ODVCollectionInventory.

Page 31: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

27

const qint16 * ODVCollectionInventory::dayTimeData () const A pointer to the day-time data (in units of 0.1 min since mid-night) of all stations in the collection.

Example: A value of 5121 represents 08:32:06 am. A value of ODV::missINT16 indicates that day-time is not available or incomplete. Hour, minute and second day-time values can be obtained from a dayTimeData() value dt as: daytimeFromFractionalDay (dt/14400.,hour,min,sec).

double ODVCollectionInventory::decimalYear (qint32 statID) const

Returns: The date/time of station statID as decimal years.

Stations without date and time information return ODV::missDOUBLE. If daytime is missing or incomplete 00:00h is assumed. The retrieved decimal year can be converted to date & time by dateFromDecimalYear() and getDayOfYear().

bool ODVCollectionInventory::decimalYears (double * decYears, int nStats, int * statIDs) const

Returns: At decYears the date/time of the nStats stations in statIDs as decimal years.

Stations without date and time information return ODV::missDOUBLE. If daytime is missing or incomplete 00:00h is assumed.

Note: The memory at decYears must be allocated outside this function and must be sufficient to hold nStats double values for all the entries in statIDs .

Returns: true if successful, or false otherwise.

The retrieved decimal years can be converted to date & time by methods like dateFromDecimalYear() and getDayOfYear().

const qint32 * ODVCollectionInventory::gregorianDayData () const

Returns: A pointer to the date data (in Gregorian days) of all stations in the collection.

A value of ODV::missINT32 indicates that date information is not available or incomplete. The retrieved gregorian days can be converted to decimal years by decimalYearFromGregorianDay() and then be converted to date & time by other methods in odvDate.h. An ISO date string can be created directly with isoDateFromGregorianDay().

double ODVCollectionInventory::latitude (qint32 statID) const

Returns: The decimal latitude of station statID .

Page 32: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

28

bool ODVCollectionInventory::latitudes (double * lats, int nStats, int * statIDs) const

Returns at lats the decimal latitudes of the nStats stations in statIDs .

Note: The memory at lats must be allocated outside this function and must be sufficient to hold nStats double values for all the entries in statIDs .

Returns: true if successful, or false otherwise.

qint32 ODVCollectionInventory::load () Loads the collection inventory of the parent collection.

Note: The inventory is automatically loaded when the collection is opened so there is no need to call this method explicitly.

double ODVCollectionInventory::longitude (qint32 statID) const

Returns: The decimal longitude of station statID .

bool ODVCollectionInventory::longitudes (double * lons, int nStats, int * statIDs) const

Returns at lons the longitudes of the nStats stations in statIDs .

Note: The memory at lons must be allocated outside this function and must be sufficient to hold nStats double values for all the entries in statIDs .

Returns: true if successful, or false otherwise.

const ODVMapDomain * ODVCollectionInventory::nativeMapDomain () const

Returns: A pointer to the native map domain covered by this collection.

qint32 ODVCollectionInventory::sampleCount (qint32 statID = -1) const

Returns: The number of samples of station statID , or the total number of samples of all cruises in this ODVCollectionInventory if statID is -1 on entry (the default).

int ODVCollectionInventory::sampleCount (int nStats, int * statIDs) const

Page 33: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

29

Returns: The total number of samples of the nStats stations statIDs .

const qint32 * ODVCollectionInventory::sampleCountData () const Returns a pointer to the sample count data of all stations in the collection.

The value at index statID (0-based station ID) is the number of samples of station statID .

qint32 ODVCollectionInventory::stationIDFromAccessionNumber (quint32 accNum) const

Returns: The 0-based station ID of the station with accession number accNum , or -1 if no such station exists or the cruise inventory does not have accession number data.

const ODVCruiseInfo * ODVCollectionInventory::summaryCruiseInfo () const

Returns: The pointer to the summary ODVCruiseInfo containing information about all cruises in the collection together.

Page 34: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

30

ODVCompositeLabel Class Reference #include "collection/ODVCompositeLabel.h" Inheritance diagram for ODVCompositeLabel:

Public Member Functions • ODVCompositeLabel (const QChar *unicode, int size) • ODVCompositeLabel (const QChar *unicode) • ODVCompositeLabel (QChar ch) • ODVCompositeLabel (int size, QChar ch) • ODVCompositeLabel (const QLatin1String &str) • ODVCompositeLabel (const QString &other) • ODVCompositeLabel (const char *str) • ODVCompositeLabel (const QByteArray &ba) • ODVCompositeLabel (const QString &nameLabel, const QString &unitsLabel)

This constructor builds a full variable label using the supplied nameLabel and unitsLabel . Sets this string with the built label.

• ODVCompositeLabel & compositeLabel (const ODVVariable *var, int primaryVarID=-1, bool withQualifiers=true) Sets this composite label to a fully qualified composite label for the supplied variable var and returns a reference to it.

• QString fullLabel () const • ODVCompositeLabel & fullVariableLabel (const QString &nameLabel, const QString

&unitsLabel) Constructs a full variable label from nameLabel and unitsLabel . Sets this string to the constructed label and returns a reference to it.

• QString nameLabel (bool allowSubstitution=true) const Returns the name part from compositeLabel .

• ODVCompositeLabel & qfCompositeLabel (const ODVQualityFlagSet &qfSet) Sets this composite label to the quality flag label of the supplied quality flag set qfSet and returns a reference to it.

• ODVQualityFlagSet::QFSetID qfSetID () const • QString qualifierLabel () const • QString unitLabel () const

Static Public Member Functions • static void defaultVarProperties (ODVVariable::VarType &varType, ODVVariable::ValueType

&valType, int &valBytes, int &sigDigits, ODVQualityFlagSet::QFSetID &qfSetID, bool &isPrimaryVar) Sets var type varType , value type valType , byte length valBytes , number of significant digits sigDigits , quality flag set ID qfSetID , and primary variable flag isPrimaryVar to default values.

• static QString fullLabel (const QString &nameLabel, const QString &unitsLabel) Constructs and returns a full variable label from nameLabel and unitsLabel .

• static bool varProperties (const QString &str, ODVVariable::VarType &varType, ODVVariable::ValueType &valType, int &valBytes, int &sigDigits, ODVQualityFlagSet::QFSetID &qfSetID, bool &isPrimaryVar)

Page 35: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

31

Extracts var type varType , value type valType , byte length valBytes , number of significant digits sigDigits , quality flag set ID qfSetID , and primary variable flag isPrimaryVar from the variable label or qualifier str .

Detailed Description ODVCompositeLabel is a QString representing a variable label consisting of the variable's name, units, quality flag and possibly more qualifiers specifying the type of the data values and whether the variable is a meta or a primary data variable. Member functions exist to compose, extract or manipulate these properties. The syntax of variable labels is explained in detail in Appendix 16.3 "Generic ODV Spreadsheet Format" paragraph 16.3.2 "Column Labels" of "ODV User's Guide" . All constructors work similar to the corresponding QString constructors.

Constructor & Destructor Documentation

ODVCompositeLabel::ODVCompositeLabel (const QString & nameLabel, const QString & unitsLabel)

This constructor builds a full variable label using the supplied nameLabel and unitsLabel . Sets this string with the built label.

See also: fullVariableLabel()

Member Function Documentation

ODVCompositeLabel & ODVCompositeLabel::compositeLabel (const ODVVariable * var, int primaryVarID = -1, bool withQualifiers = true)

Sets this composite label to a fully qualified composite label for the supplied variable var and returns a reference to it.

Appropriate qualifiers are appended to the label if it is a variable of known type, the data type or the data byte length differ from the default values and withQualifiers is true . The ":PRIMARYVAR" suffix is appended to the label if the primaryVarID parameter is provided and the variable ID of var matches primaryVarID .

See also: nameLabel(), unitLabel(), qfSetID(), varProperties(), qfCompositeLabel()

void ODVCompositeLabel::defaultVarProperties (ODVVariable::VarType & varType, ODVVariable::ValueType & valType, int & valBytes, int & sigDigits, ODVQualityFlagSet::QFSetID & qfSetID, bool & isPrimaryVar)[static]

Sets var type varType , value type valType , byte length valBytes , number of significant digits sigDigits , quality flag set ID qfSetID , and primary variable flag isPrimaryVar to default values.

Page 36: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

32

QString ODVCompositeLabel::fullLabel () const

Returns: The full variable label exclusive the qualifier part from this composite label.

See also: nameLabel(), unitLabel()

QString ODVCompositeLabel::fullLabel (const QString & nameLabel, const QString & unitsLabel)[static]

Constructs and returns a full variable label from nameLabel and unitsLabel .

See also: fullVariableLabel(), ODVVariable::fullLabel()

ODVCompositeLabel & ODVCompositeLabel::fullVariableLabel (const QString & nameLabel, const QString & unitsLabel)

Constructs a full variable label from nameLabel and unitsLabel . Sets this string to the constructed label and returns a reference to it.

See also: fullLabel(), ODVVariable::fullLabel()

QString ODVCompositeLabel::nameLabel (bool allowSubstitution = true) const Returns the name part from compositeLabel .

Any units within square or curved brackets are excluded (last occurrence). If allowSubstitution is true (the default) and compositeLabel starts with a known label the respective substitute is returned.

Note: Any ';' is replaced by a ',' (ODV variable labels may not contain ';').

See also: unitLabel()

ODVCompositeLabel & ODVCompositeLabel::qfCompositeLabel (const ODVQualityFlagSet & qfSet)

Sets this composite label to the quality flag label of the supplied quality flag set qfSet and returns a reference to it.

See also: qfSetID(), compositeLabel()

ODVQualityFlagSet::QFSetID ODVCompositeLabel::qfSetID () const

Page 37: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

33

Returns: The Quality flag schema ID from this composite label or ODVQualityFlagSet::ODV , if no valid schema name is found.

See also: qfCompositeLabel()

QString ODVCompositeLabel::qualifierLabel () const

Returns: The qualifier part from this composite label.

See also: nameLabel(), unitLabel()

QString ODVCompositeLabel::unitLabel () const

Returns: The units part from this composite label or an empty string, if no square or curved brackets are found.

The units in this composite label are assumed within square or curved brackets (last occurrence).

Note: Any ';' is replaced by a ',' (ODV variable labels may not contain ';').

See also: nameLabel()

bool ODVCompositeLabel::varProperties (const QString & str, ODVVariable::VarType & varType, ODVVariable::ValueType & valType, int & valBytes, int & sigDigits, ODVQualityFlagSet::QFSetID & qfSetID, bool & isPrimaryVar)[static]

Extracts var type varType , value type valType , byte length valBytes , number of significant digits sigDigits , quality flag set ID qfSetID , and primary variable flag isPrimaryVar from the variable label or qualifier str .

Returns: true if successful or false if no :

string or recognized variable label is found.

Page 38: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

34

ODVCruiseInfo Class Reference Holds summary information for one cruise of a collection. #include "collection/ODVCruiseInfo.h"

Public Member Functions • virtual QString availabilityString () const • int cruiseID () const • int dataCount (int varID) const • QString dateString (bool endDate, ODV::DateFormat dateFormat=ODV::ddmmmyyyyDate) const • QString latitudeRangeString () const • QString longitudeRangeString () const • int maxGregorianDay () const • int maxStationID () const • int minGregorianDay () const • int minStationID () const • const ODVMapDomain * nativeMapDomain () const • int sampleCount () const • int stationCount () const • int variableCount () const

Static Public Attributes • static const QString missString =QString("unavailable")

String for unavailable values.

Protected Member Functions • ODVCruiseInfo (ODVCollectionInventory *colInv)

Creates an empty ODVCruiseInfo object. • ODVCruiseInfo (ODVCollectionInventory *colInv, ODVStation *stat, int cruiseID)

Creates an ODVCruiseInfo object with ID cruiseID using the station information in stat . • ODVCruiseInfo (ODVCollectionInventory *colInv, QDataStream &in)

Creates an ODVCruiseInfo object and reads its data from in . • const PCruiseInfo * dFunc () const • PCruiseInfo * dFunc ()

Detailed Description Holds summary information for one cruise of a collection. Each cruise is assigned a unique ID in the range [0 <= ID < nCruises]. Assignment is in the order of appearance of the cruises in the collection and does not imply lexical ordering. Note that the cruise name is not part of the ODVCruiseInfo class.

Constructor & Destructor Documentation

ODVCruiseInfo::ODVCruiseInfo (ODVCollectionInventory * colInv)[protected] Creates an empty ODVCruiseInfo object.

Page 39: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

35

Note: The constructor is protected because cruise info objects are only created by ODVCollectionInventory.

ODVCruiseInfo::ODVCruiseInfo (ODVCollectionInventory * colInv, ODVStation * stat, int cruiseID)[protected]

Creates an ODVCruiseInfo object with ID cruiseID using the station information in stat .

Note: The constructor is protected because cruise info objects are only created by ODVCollectionInventory.

ODVCruiseInfo::ODVCruiseInfo (ODVCollectionInventory * colInv, QDataStream & in)[protected]

Creates an ODVCruiseInfo object and reads its data from in .

Note: The constructor is protected because cruise info objects are only created by ODVCollectionInventory.

Member Function Documentation

QString ODVCruiseInfo::availabilityString () const[virtual]

Returns: The data availability indicators of all basic variables for this ODVCruiseInfo as string.

Data availability indicators are single digit numbers from 0 to 9, with, for instance, 9 indicating that more than 90 % of the samples containing data for the particular variable. There is a '.' separator every five variables and a '|' separator every ten variables. A '-' indicates that there are no data for the given variable in this cruise.

int ODVCruiseInfo::cruiseID () const

Returns: The ID of the cruise kept by this object (0-based index in inventory).

int ODVCruiseInfo::dataCount (int varID) const

Returns: The number of non- ODV::missDOUBLE samples for basic variable ID varID in this cruise.

The possible varIDs range from 0 to variableCount() - 1.

QString ODVCruiseInfo::dateString (bool endDate, ODV::DateFormat dateFormat = ODV::ddmmmyyyyDate) const

Page 40: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

36

Returns: The start (endDate = false ) or end (endDate = true ) date of the cruise as string. If the date should be unavailable, missString is returned.

The string format can be chosen via dateFormat , the default is as in "30 Sep 2007" for example.

QString ODVCruiseInfo::latitudeRangeString () const

Returns: The latitudinal range of the cruise.

QString ODVCruiseInfo::longitudeRangeString () const

Returns: The longitudinal range of the cruise.

int ODVCruiseInfo::maxGregorianDay () const

Returns: The maximal gregorian day of this cruise.

See also: minGregorianDay()

int ODVCruiseInfo::maxStationID () const

Returns: The maximal station ID (0-based index).

Note that between minimal and maximal station ID may be station IDs which are not part of the cruise.

See also: minStationID()

int ODVCruiseInfo::minGregorianDay () const

Returns: The minimal gregorian day of this cruise.

See also: maxGregorianDay()

int ODVCruiseInfo::minStationID () const

Returns: The minimal station ID (0-based index).

Note that between minimal and maximal station ID may be station IDs which are not part of the cruise.

See also: maxStationID()

Page 41: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

37

const ODVMapDomain * ODVCruiseInfo::nativeMapDomain () const

Returns: A pointer to the native map domain of this cruise.

int ODVCruiseInfo::sampleCount () const

Returns: The total number of samples in this cruise.

int ODVCruiseInfo::stationCount () const

Returns: The number of stations in this cruise.

int ODVCruiseInfo::variableCount () const

Returns: The number of basic variables for which counts are kept.

See also: dataCount()

Member Data Documentation

const QString ODVCruiseInfo::missString =QString("unavailable")[static] String for unavailable values.

Page 42: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

38

ODVMapDomain Class Reference The ODVMapDomain class holds bounding map domain information and provides functions to append individual lon/lat points or other ODVMapDomain objects. #include "geography/ODVMapDomain.h"

Public Member Functions • ODVMapDomain ()

Creates an empty ODVMapDomain object. • ODVMapDomain (double lonmin, double lonmax, double latmin, double latmax)

Creates an ODVMapDomain object with specified longitude/latitude bounds. • ODVMapDomain (const ODVMapDomain &otherDomain)

Creates a copy of ODVMapDomain otherDomain . • ~ODVMapDomain ()

Deletes the ODVMapDomain object. • void append (double lon, double lat)

Appends point lon / lat to the domain. • void append (int n, double *lon, double *lat)

Appends n points in lon / lat to the domain. • void append (int nLon, double *lon, int nLat, double *lat)

Appends a grid consisting of nLon points in lon and nLat points lat to the domain. • void append (double lonmin, double lonmax, double latmin, double latmax)

Appends the domain specified by the input parameters. • void append (const ODVMapDomain &otherDomain)

Appends ODVMapDomain otherDomain . • double centerLatitude () const • double centerLongitude () const • void clear () • bool domain (double &lonmin, double &lonmax, double &latmin, double &latmax, bool

autoEnlarge=true) const Retrieves the ODVMapDomain's domain.

• void domainValues (double &xlVal, double &XlVal, double &xrVal, double &XrVal, double &ybVal, double &ytVal) const Retrieves the internal domain values.

• double eastLongitude () const • bool intersects (const ODVMapDomain *otherDomain) const • bool isEmpty () const • bool isInsideOf (ODVMapDomain *otherDomain) const • double latitudeRange () const • QString latitudeRangeString (int nDigits=1) const • double longitudeRange () const • QString longitudeRangeString (int nDigits=1) const • double northLatitude () const • void setDomain (double lonmin, double lonmax, double latmin, double latmax)

Sets the domain to the specified longitude/latitude bounds. • void setDomainValues (double xlVal, double XlVal, double xrVal, double XrVal, double ybVal,

double ytVal) Sets the ODVMapDomain's internal domain parameters to the specified values.

• double southLatitude () const • double westLongitude () const • ODVMapDomain & operator= (const ODVMapDomain &otherDomain)

Page 43: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

39

Assigns otherDomain to this map domain and returns a reference to this ODVMapDomain.

Protected Member Functions • const PMapDomain * dFunc () const • PMapDomain * dFunc ()

Detailed Description The ODVMapDomain class holds bounding map domain information and provides functions to append individual lon/lat points or other ODVMapDomain objects.

Constructor & Destructor Documentation

ODVMapDomain::ODVMapDomain () Creates an empty ODVMapDomain object.

ODVMapDomain::ODVMapDomain (double lonmin, double lonmax, double latmin, double latmax)

Creates an ODVMapDomain object with specified longitude/latitude bounds.

ODVMapDomain::ODVMapDomain (const ODVMapDomain & otherDomain) Creates a copy of ODVMapDomain otherDomain .

ODVMapDomain::~ODVMapDomain () Deletes the ODVMapDomain object.

Member Function Documentation

void ODVMapDomain::append (double lon, double lat) Appends point lon / lat to the domain.

The point is not used if either lon or lat is equal to ODV::missDOUBLE .

void ODVMapDomain::append (int n, double * lon, double * lat) Appends n points in lon / lat to the domain.

Points with either lon or lat equal to ODV::missDOUBLE are not used.

void ODVMapDomain::append (int nLon, double * lon, int nLat, double * lat) Appends a grid consisting of nLon points in lon and nLat points lat to the domain.

Page 44: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

40

void ODVMapDomain::append (double lonmin, double lonmax, double latmin, double latmax)

Appends the domain specified by the input parameters.

void ODVMapDomain::append (const ODVMapDomain & otherDomain) Appends ODVMapDomain otherDomain .

double ODVMapDomain::centerLatitude () const

Returns: The latitude of the map domain center.

double ODVMapDomain::centerLongitude () const

Returns: The longitude of the map domain center.

void ODVMapDomain::clear () Resets the ODVMapDomain object to an empty (invalid) state.

bool ODVMapDomain::domain (double & lonmin, double & lonmax, double & latmin, double & latmax, bool autoEnlarge = true) const

Retrieves the ODVMapDomain's domain.

The domain is automatically enlarged if autoEnlarge is true on entry. This ensures that none of the added lon / lat points will lie on the domain boundaries.

Returns: true if successful and false if the object is empty.

void ODVMapDomain::domainValues (double & xlVal, double & XlVal, double & xrVal, double & XrVal, double & ybVal, double & ytVal) const

Retrieves the internal domain values.

double ODVMapDomain::eastLongitude () const

Returns: The eastern border longitude of the map domain.

bool ODVMapDomain::intersects (const ODVMapDomain * otherDomain) const

Returns: true if this ODVMapDomain intersects otherDomain , or false otherwise.

bool ODVMapDomain::isEmpty () const

Page 45: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

41

Returns: true if this ODVMapDomain is empty.

bool ODVMapDomain::isInsideOf (ODVMapDomain * otherDomain) const

Returns: true if this ODVMapDomain is inside of otherDomain , or false otherwise.

double ODVMapDomain::latitudeRange () const

Returns: The latitudinal range of the map domain.

QString ODVMapDomain::latitudeRangeString (int nDigits = 1) const

Returns: The latitudinal range as a string.

The latitude values are rounded to nDigits significant digits before producing the text representation.

double ODVMapDomain::longitudeRange () const

Returns: The longitudinal range of the map domain.

QString ODVMapDomain::longitudeRangeString (int nDigits = 1) const

Returns: The longitudinal range as a string.

The longitude values are rounded to nDigits significant digits before producing the text representation.

double ODVMapDomain::northLatitude () const

Returns: The northern border latitude of the map domain.

ODVMapDomain & ODVMapDomain::operator= (const ODVMapDomain & otherDomain)

Assigns otherDomain to this map domain and returns a reference to this ODVMapDomain.

void ODVMapDomain::setDomain (double lonmin, double lonmax, double latmin, double latmax)

Sets the domain to the specified longitude/latitude bounds.

Page 46: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

42

void ODVMapDomain::setDomainValues (double xlVal, double XlVal, double xrVal, double XrVal, double ybVal, double ytVal)

Sets the ODVMapDomain's internal domain parameters to the specified values.

double ODVMapDomain::southLatitude () const

Returns: The southern border latitude of the map domain.

double ODVMapDomain::westLongitude () const

Returns: The western border longitude of the map domain.

Page 47: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

43

ODVQualityFlagSet Class Reference Represents an ODV Quality Flag Schema. See appendix of "ODV User's Guide" , section "Quality Flag Schemes" for further details on various schemes. #include "collection/ODVQualityFlagSet.h"

Public Types • enum QFSetID { ODV =0, GTSPP =1, ARGO =2, SEADATANET =3, ESEAS =4, WOD =5,

WODSTATION =6, WOCEBOTTLE =7, WOCECTD =8, WOCESAMPLE =9, QARTOD =10, BODC =11, PANGAEA =12, SMHI =13, OCEANSITES =14, IODE =15 }

Public Member Functions • ODVQualityFlagSet (QFSetID setID=ODV)

Creates a ODVQualityFlagSet of type setID . • ODVQualityFlagSet (const ODVQualityFlagSet &other)

Creates a ODVQualityFlagSet from other . • char badQfVal () const • char defaultQfVal (bool isDrvd=false) const • QStringList descriptions () const • char genericQfVal (char qfVal) const • char goodQfVal () const • int indexOf (char qfVal) const • char mapTo (char qfVal, QFSetID targetSetID) const

Maps the quality flag value qfVal of this set to the corresponding quality flag value of the target set targetSetID .

• char mapTo (char qfVal, const ODVQualityFlagSet &targetSet) const Maps the quality flag value qfVal of this set to the corresponding quality flag value of the target set targetSet .

• char missQfVal () const • QString qfString (int i) const • QString qfString (char qfVal) const • char qfVal (int i) const • int safeIndexOf (char qfVal) const • QFSetID setID () const • int size () const • const QString & text () const • QStringList values () const • ODVQualityFlagSet & operator= (QFSetID setID)

Assignment operator: Sets ODVQualityFlagSet to type setID . • ODVQualityFlagSet & operator= (const ODVQualityFlagSet &other)

Assignment operator: Sets ODVQualityFlagSet to type of other . • bool operator== (QFSetID setID) const • bool operator== (const ODVQualityFlagSet &other) const

Protected Member Functions • const PQualityFlagSet * dFunc () const • PQualityFlagSet * dFunc ()

Page 48: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

44

Detailed Description Represents an ODV Quality Flag Schema. See appendix of "ODV User's Guide" , section "Quality Flag Schemes" for further details on various schemes. ODVQualityFlagSet contains a general text description of the quality flag set and a list of quality flags. The default constructor creates the default ODVQualityFlagSet::ODV quality flag set. Quality flags can be mapped between different schemes using the mapTo() functions.

Member Enumeration Documentation

enum ODVQualityFlagSet::QFSetID List of available quality flag set identifiers for quality flag sets.

Enumerator: ODV Ocean Data View quality flags (default)

GTSPP GTSPP quality flags.

ARGO ARGO quality flags.

SEADATANET SEADATANET quality flags.

ESEAS ESEAS quality flags.

WOD World Ocean Database observed level quality codes.

WODSTATION World Ocean Database entire station quality flags.

WOCEBOTTLE WOCE bottle data quality flags.

WOCECTD WOCE CTD data quality flags.

WOCESAMPLE WOCE quality flags for the water bottle itself.

QARTOD QARTOD quality flags.

BODC British Oceanographic Data Centre quality flags.

PANGAEA PANGAEA quality flags.

SMHI Swedish Meteorological and Hydrographic Institute quality codes.

OCEANSITES OceanSITES quality flags.

IODE IODE quality flags.

Page 49: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

45

Constructor & Destructor Documentation

ODVQualityFlagSet::ODVQualityFlagSet (QFSetID setID = ODV) Creates a ODVQualityFlagSet of type setID .

ODVQualityFlagSet::ODVQualityFlagSet (const ODVQualityFlagSet & other) Creates a ODVQualityFlagSet from other .

Member Function Documentation

char ODVQualityFlagSet::badQfVal () const

Returns: The bad quality flag of this set.

char ODVQualityFlagSet::defaultQfVal (bool isDrvd = false) const

Returns: The default quality flag for derived variables if isDrvd is true or the default quality flag for basic variables if isDrvd is false of this set.

QStringList ODVQualityFlagSet::descriptions () const

Returns: The list of flag descriptions.

char ODVQualityFlagSet::genericQfVal (char qfVal) const

Returns: The corresponding ODV generic quality flag value for quality flag value qfVal .

char ODVQualityFlagSet::goodQfVal () const

Returns: The good quality flag of this set.

int ODVQualityFlagSet::indexOf (char qfVal) const

Returns: 0-based index in the set for quality flag value qfVal , or -1 if qfVal is not in set.

char ODVQualityFlagSet::mapTo (char qfVal, QFSetID targetSetID) const

Page 50: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

46

Maps the quality flag value qfVal of this set to the corresponding quality flag value of the target set targetSetID .

If qfVal is an invalid member of this quality flag set, the default quality flag of this set is mapped.

Returns: The mapped quality flag value.

char ODVQualityFlagSet::mapTo (char qfVal, const ODVQualityFlagSet & targetSet) const

Maps the quality flag value qfVal of this set to the corresponding quality flag value of the target set targetSet .

If qfVal is an invalid member of this quality flag set, the default quality flag of this set is mapped.

Returns: The mapped quality flag value.

char ODVQualityFlagSet::missQfVal () const

Returns: The quality flag for missing values.

ODVQualityFlagSet & ODVQualityFlagSet::operator= (QFSetID setID) Assignment operator: Sets ODVQualityFlagSet to type setID .

ODVQualityFlagSet & ODVQualityFlagSet::operator= (const ODVQualityFlagSet & other)

Assignment operator: Sets ODVQualityFlagSet to type of other .

bool ODVQualityFlagSet::operator== (QFSetID setID) const

Returns: true if quality flags set represents the quality flag set setID .

bool ODVQualityFlagSet::operator== (const ODVQualityFlagSet & other) const

Returns: true if quality flags sets are equal. They are considered equal if they have the same set ID, i.e. describe the same set.

QString ODVQualityFlagSet::qfString (int i) const

Returns: The description for quality flag value at 0-based index i or the default quality flag description if i is invalid.

Page 51: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

47

QString ODVQualityFlagSet::qfString (char qfVal) const

Returns: The description for native quality flag value qfVal or the default quality flag description if qfVal is invalid.

char ODVQualityFlagSet::qfVal (int i) const

Returns: The native quality flag value for 0-based index i in set or the default quality flag if i is invalid.

int ODVQualityFlagSet::safeIndexOf (char qfVal) const

Returns: 0-based index in set for quality flag value qfVal , or the index of the default quality flag if qfVal is invalid.

ODVQualityFlagSet::QFSetID ODVQualityFlagSet::setID () const

Returns: The quality flag set ID.

int ODVQualityFlagSet::size () const

Returns: The number of flags in set.

const QString & ODVQualityFlagSet::text () const

Returns: The description of the quality flag set.

QStringList ODVQualityFlagSet::values () const

Returns: The list of flag values.

Page 52: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

48

ODVSampleFilter Class Reference The ODVSampleFilter object maintains quality, range (numeric variables) and wildcard (text variables) sample filter specifications for data variables. #include "collection/ODVSampleFilter.h"

Public Member Functions • ODVSampleFilter ()

Creates a default sample filter object. • ODVSampleFilter (const ODVSampleFilter &other)

Copy constructor for sample filter. • ~ODVSampleFilter ()

Deletes the sample filter object. • void clear ()

Clears this filter by removing all filter specifications. • int clearQualityFilter (int varID)

Clears any existing quality filter for data variable varID . • int clearRangeFilter (int varID)

Clears any existing range filter for data variable varID . • int clearWildCardFilter (int varID)

Clears any existing wildcard filter for data variable varID . • bool isQualityFiltering (int varID=-1) const

Checks whether a quality filter is defined for variable with 0-based variable ID varID , or, if varID is -1 (the default) whether there is any variable with a quality filter.

• bool isRangeFiltering (int varID=-1) const Checks whether a numeric range filter is defined for variable with 0-based variable ID varID , or, if varID is -1 (the default) whether there is any variable with a numeric range filter.

• bool isWildCardFiltering (int varID=-1) const Checks whether a wildcard text filter is defined for variable with 0-based variable ID varID , or, if varID is -1 (the default) whether there is any variable with a wildcard text filter.

• QBitArray qualityFilter (int varID) const Returns the quality filter for data variable varID , or a QBitArray of length 128 with all bits set to 1, if no quality filter exists for variable varID .

• QList< int > qualityFilterVarIDs () const Returns a list of variable IDs of those data variables with active quality filters.

• QPair< double, double > rangeFilter (int varID) const Returns the range filter for data variable varID , or a ODV::missDOUBLE , ODV::largeDOUBLE range, if no range filter exists for variable varID .

• int rangeFilterCount () const Returns the number of data variables with active range filters.

• QList< int > rangeFilterVarIDs () const Returns a list of variable IDs of those data variables with active range filters.

• bool setQualityFilter (int varID, const QBitArray &ba) Sets the quality filter for data variable varID to ba .

• bool setRangeFilter (int varID, const QPair< double, double > &minMaxPair) Sets the range filter for data variable varID to range between minMaxPair.first and minMaxPair.second .

• bool setRangeFilter (int varID, double minVal, double maxVal) Sets the range filter for data variable varID to range between minVal and maxVal .

Page 53: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

49

• bool setWildCardFilter (int varID, const QStringList &wcf) Sets the wildcard filter for data variable varID to wcf .

• QString statusString () const Returns the ODV status-bar string of this sample filter.

• QStringList wildCardFilter (int varID) const Returns the wildcard filter for data variable varID , or an empty QStringList, if no wildcard filter exists for variable varID .

• QList< int > wildCardFilterVarIDs () const Returns a list of variable IDs of those data variables with active wildcard filters.

• ODVSampleFilter & operator= (const ODVSampleFilter &other) Assigns other to this sample filter and returns a reference to this sample filter.

• bool operator== (const ODVSampleFilter &other) const Compares this object with other .

Static Public Member Functions • static bool matchesWildCardFilter (const QString &str, const QStringList &wcf)

Checks whether string str matches any of the wildcard text filters in wcf .

Protected Member Functions • const PSampleFilter * dFunc () const • PSampleFilter * dFunc ()

Detailed Description The ODVSampleFilter object maintains quality, range (numeric variables) and wildcard (text variables) sample filter specifications for data variables. The quality, range and wildcard filter specifications are held in three QHash containers qfFil , rangeFil , and wildCardFil . All these containers use the variable ID of the variable for which a filter is specified as key. The type of values in the QHash containers depends on the filter type: 1. quality filter The value is a QBitArray of size 128. A quality flag value qf is acceptable if testBit(qf) is true. Note

that ODV treats quality flag values as char, e.g., flag '1' is represented as ASCII code value 49. '1' is an acceptable quality flag if testBit(49) is true. As a consequence of limiting the size of the QBitArray to 128 ODV only supports quality flag sets strictly limited to the ASCII character set (0-127).

2. range filter The value is a QPair of double values representing the acceptable lower and upper bounds as first and

second . 3. wildcard filter The value is a QStringList containing the wildcard specifications to be statisfied by a text data value. Variables that do not have an entry in the qfFil container are not quality filtered. Variables that do not have an entry in the rangeFil or wildCardFil container are not used for sample filtering. A default ODVSampleFilter with empty containers accepts all data.

Page 54: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

50

Constructor & Destructor Documentation

ODVSampleFilter::ODVSampleFilter () Creates a default sample filter object.

ODVSampleFilter::ODVSampleFilter (const ODVSampleFilter & other) Copy constructor for sample filter.

ODVSampleFilter::~ODVSampleFilter () Deletes the sample filter object.

Member Function Documentation

void ODVSampleFilter::clear () Clears this filter by removing all filter specifications.

int ODVSampleFilter::clearQualityFilter (int varID) Clears any existing quality filter for data variable varID .

Returns: 1 if a quality filter for data variable varID existed before this call, or 0 otherwise.

int ODVSampleFilter::clearRangeFilter (int varID) Clears any existing range filter for data variable varID .

Returns: 1 if a range filter for data variable varID existed before this call, or 0 otherwise.

int ODVSampleFilter::clearWildCardFilter (int varID) Clears any existing wildcard filter for data variable varID .

Returns: 1 if a wildcard filter for data variable varID existed before this call, or 0 otherwise.

bool ODVSampleFilter::isQualityFiltering (int varID = -1) const Checks whether a quality filter is defined for variable with 0-based variable ID varID , or, if varID is -1 (the default) whether there is any variable with a quality filter.

Page 55: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

51

Returns: true if a suitable range filter is found, or, false otherwise.

bool ODVSampleFilter::isRangeFiltering (int varID = -1) const Checks whether a numeric range filter is defined for variable with 0-based variable ID varID , or, if varID is -1 (the default) whether there is any variable with a numeric range filter.

Returns: true if a suitable range filter is found, or, false otherwise.

bool ODVSampleFilter::isWildCardFiltering (int varID = -1) const Checks whether a wildcard text filter is defined for variable with 0-based variable ID varID , or, if varID is -1 (the default) whether there is any variable with a wildcard text filter.

Returns: true if a suitable range filter is found, or, false otherwise.

bool ODVSampleFilter::matchesWildCardFilter (const QString & str, const QStringList & wcf)[static]

Checks whether string str matches any of the wildcard text filters in wcf .

Returns: true if a match is found, or, false otherwise.

ODVSampleFilter & ODVSampleFilter::operator= (const ODVSampleFilter & other) Assigns other to this sample filter and returns a reference to this sample filter.

bool ODVSampleFilter::operator== (const ODVSampleFilter & other) const Compares this object with other .

Returns: true if the two objects are identical, or false if they differ.

QBitArray ODVSampleFilter::qualityFilter (int varID) const Returns the quality filter for data variable varID , or a QBitArray of length 128 with all bits set to 1, if no quality filter exists for variable varID .

QList< int > ODVSampleFilter::qualityFilterVarIDs () const Returns a list of variable IDs of those data variables with active quality filters.

Page 56: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

52

QPair< double, double > ODVSampleFilter::rangeFilter (int varID) const Returns the range filter for data variable varID , or a ODV::missDOUBLE , ODV::largeDOUBLE range, if no range filter exists for variable varID .

int ODVSampleFilter::rangeFilterCount () const Returns the number of data variables with active range filters.

QList< int > ODVSampleFilter::rangeFilterVarIDs () const Returns a list of variable IDs of those data variables with active range filters.

bool ODVSampleFilter::setQualityFilter (int varID, const QBitArray & ba) Sets the quality filter for data variable varID to ba .

Note: ba must be of length 128. Acceptable flag values must have their bit values set to 1, unacceptable flag values have their bit set to 0.

Returns: true if the quality filter for data variable varID changed, or, false otherwise.

bool ODVSampleFilter::setRangeFilter (int varID, const QPair< double, double > & minMaxPair)

Sets the range filter for data variable varID to range between minMaxPair.first and minMaxPair.second .

Returns: true if the range filter for data variable varID changed, or, false otherwise.

bool ODVSampleFilter::setRangeFilter (int varID, double minVal, double maxVal) Sets the range filter for data variable varID to range between minVal and maxVal .

Returns: true if the range filter for data variable varID changed, or, false otherwise.

bool ODVSampleFilter::setWildCardFilter (int varID, const QStringList & wcf) Sets the wildcard filter for data variable varID to wcf .

Returns: true if the wildcard filter for data variable varID changed, or, false otherwise.

Page 57: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

53

QString ODVSampleFilter::statusString () const Returns the ODV status-bar string of this sample filter.

QStringList ODVSampleFilter::wildCardFilter (int varID) const Returns the wildcard filter for data variable varID , or an empty QStringList, if no wildcard filter exists for variable varID .

QList< int > ODVSampleFilter::wildCardFilterVarIDs () const Returns a list of variable IDs of those data variables with active wildcard filters.

Page 58: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

54

ODVStation Class Reference Class for maintaining metadata and data of one station. #include "collection/ODVStation.h"

Public Member Functions • ODVStation (ODVCollection *col, int valueCountHint=10000)

Creates a new ODVStation object for collection col . • quint32 accessionNumber () const

Retrieves the accession number of the station. • void applySampleFilter (int varID, double *doubleData)

Applies the sample quality, range and wildcard filters of this station for variable varID to the data at doubleData .

• void clear () Clears the current station data (if any) and prepares the station's metadata and data arrays to receive a new station.

• bool containsDataErrors (int varID) const • bool containsDataInfos (int varID) const • virtual double * data (ODVVariable *var, bool filtered=false)

Returns a pointer to the double data values of variable var , or NULL if var is NULL, a meta or derived variable, or non-numeric, or there are no samples.

• int dataCount (int varID) const • quint32 dataTotalByteSize () const • double * errorData (ODVVariable *var)

Returns a pointer to the double data error values of variable var , or NULL if var is NULL, meta, derived or non-numeric, or there are no error values.

• double errorValue (ODVVariable *var, int sampleID) • QString errorStringValue (ODVVariable *var, int sampleID, int decimalCount=-1) • QStringList historyStrings () const

Retrieves all history strings for this station. • QString identifierHeaderString (bool withID=false, bool withBrackets=false) • QString identifierString (bool withID=false, bool withBrackets=false) • QString infoStringValue (ODVVariable *var, int sampleID) • QStringList infoStringValues (ODVVariable *var) • void initializeMetaVars ()

Sets all meta variable values and quality flags to their miss- and default values. • double metaDecimalDay (char *qFlag=NULL) const • QString metaFullName () • double metaLatitude (char *qFlag=NULL) const • double metaLongitude (char *qFlag=NULL) const • QString metaName () • QString metaStringDate (ODV::DateFormat dateFormat=ODV::mmmddyyyyDate, char

*qFlagYear=NULL, char *qFlagMonth=NULL, char *qFlagDay=NULL) const • quint32 metaStringIndex (int metaVarID) const

Retrieves the string index for meta variable metaVarID from the meta data area. • QString metaStringIsoDateTime () const • QString metaStringPosition (int decimalCount=-1, char *qFlagLon=NULL, char

*qFlagLat=NULL) const • QString metaStringPrimVarRange (char *qFlagMin=NULL, char *qFlagMax=NULL) • QString metaStringStationType (char *qFlag=NULL) • QString metaStringTime (ODV::TimeFormat timeFormat=ODV::IsoTime, char

*qFlagHour=NULL, char *qFlagMinute=NULL, char *qFlagSecond=NULL) const

Page 59: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

55

• QString metaStringValue (ODVVariable::MetaVarID mvID, char *qFlag=NULL, int decimalCount=-1) const

• QString metaStringValue (ODVVariable::VarType metaVarType, char *qFlag=NULL, int decimalCount=-1)

• QString metaStringValue (ODVVariable *var, char *qFlag=NULL, int decimalCount=-1) • double metaValue (ODVVariable *var, char *qFlag=NULL) • double metaValue (ODVVariable::VarType metaVarType, char *qFlag=NULL) • double metaValue (ODVVariable::MetaVarID mvID, char *qFlag=NULL) const • char * qfData (ODVVariable *var) • ODV::Status readData (int statID)

Reads metadata and data of station with station ID statID (0-based index) from the collection files. • ODV::Status readMetaData (int statID)

Reads the metadata of station with station ID statID (0-based index) from the collection files. • int sampleCount () const • ODVSampleFilter * sampleFilter () • char * sampleQfData () • ODV::Status setInfoStringValue (ODVVariable *var, int sampleID, const QString &infoValue,

bool replaceAll=false) Sets the data info string of variable var at sample sampleID to infoValue .

• ODV::Status setInfoStringValues (ODVVariable *var, int sampleCount, const QStringList &infoValues) Sets the data info strings of variable var to infoValues .

• ODV::Status setMetaValue (int varID, double value, char qFlag=ODV::missINT8) Sets the value of numeric meta-variable with variable ID varID to value .

• ODV::Status setMetaValue (ODVVariable::VarType metaVarType, double value, char qFlag=ODV::missINT8) Sets the value and quality flag of numeric meta-variable of type metaVarType to value and qFlag , respectively.

• ODV::Status setMetaValue (int varID, const QString &value, char qFlag=ODV::missINT8) Sets the value of string meta-variable with variable ID varID to value .

• ODV::Status setMetaValue (ODVVariable::VarType metaVarType, const QString &value, char qFlag=ODV::missINT8) Sets the value of string meta-variable of type metaVarType to value .

• ODV::Status setRawErrorValue (ODVVariable *var, int sampleID, double errValue) Sets the raw data error value of data variable var at sample sampleID to errValue .

• ODV::Status setRawErrorValues (ODVVariable *var, int sampleCount, double *errValues) Sets the raw data error values of data variable var using data error values at errValues .

• ODV::Status setRawValue (ODVVariable *var, int sampleID, double value, char qFlag=ODV::missINT8) Sets the raw data and quality flag values of variable var for sample sampleID to value and qFlag , respectively.

• ODV::Status setRawValues (ODVVariable *var, int sampleCount, double *values, char *qFlags=NULL) Sets the raw data and associated quality flags of data variable var to the data values and quality flags provided at values and qFlags , respectively.

• void setSampleQfValues (int sampleCount, char *qFlags=NULL) Appends the sample quality flags in qFlags to the raw data arrays.

• void setStationQfValue (char qf) • ODV::Status setStringValue (ODVVariable *var, int sampleID, QString value, char

qFlag=ODV::missINT8, bool indexedTextReplaceAll=false) Sets the string data and quality flag values of variable var for sample sampleID to value and qFlag , respectively.

Page 60: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

56

• ODV::Status setStringValues (ODVVariable *var, int sampleCount, const QStringList &values, char *qFlags=NULL) Sets the string data and associated quality flags of data variable var using string values at values and quality flags at qFlags .

• int state () const • int stationID () const • int stationLabelToInt (int dfltVal=ODV::missINT32)

Tries to read an integer station number from the first 10 characters of the Station label. • char stationQfValue () • QString stringValue (ODVVariable *var, int sampleID, char *qFlag=NULL, int decimalCount=-1,

bool filtered=false) • const char * textData (ODVVariable *var) • const char * textValue (ODVVariable *var, int sampleID=0, char *qFlag=NULL, bool

qFiltered=false) Returns a pointer to the text value of variable var for sample sampleID (0-based index) of this station or NULL , if the variable is not of value type ODVVariable::TEXT or sampleID is out of range.

• double value (ODVVariable *var, int sampleID, char *qFlag=NULL, bool filtered=false) • ODV::Status writeData (int statID, bool doSort=true, bool doCheckMetaVars=true)

Writes raw observed data into slot statID (0-based index) of metadata and data files. • ODV::Status writeMetaData (int statID)

Writes metadata to slot statID (0-based index) of the collection's metadata file.

Static Public Member Functions • static const char * stationTypeFromSampleCount (const int sampleCount)

Protected Member Functions • const PStation * dFunc () const • PStation * dFunc ()

Detailed Description Class for maintaining metadata and data of one station. The ODVStation object maintains a ODVSampleFilter sample filter that can be used to filter the data using numerical value ranges, text wildcard expressions or sets of acceptable or unacceptable quality flag values. Reading the metadata and/or data of one station is done using functions readMetaData() and readData(). The metadata of the station can be accessed using a large number of meta<...>() functions. The (filtered) data of a collection variable are accessed via value() and stringValue().

Constructor & Destructor Documentation

ODVStation::ODVStation (ODVCollection * col, int valueCountHint = 10000) Creates a new ODVStation object for collection col .

Also allocates and prepares sufficient memory to handle valueCountHint data values. The size of the ODVStation memory grows automatically if a station requires more storage. The default value for valueCountHint (10000) should be sufficient for most cases. You can provide your own valueCountHint estimate (typical number of samples times number of data variables) to save memory or minimize the number of automatic re-allocations.

Page 61: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

57

Member Function Documentation

quint32 ODVStation::accessionNumber () const Retrieves the accession number of the station.

Returns: The accession number of the station, or ODV::missUINT32 if the station does not have one.

void ODVStation::applySampleFilter (int varID, double * doubleData) Applies the sample quality, range and wildcard filters of this station for variable varID to the data at doubleData .

void ODVStation::clear () Clears the current station data (if any) and prepares the station's metadata and data arrays to receive a new station.

See also: initializeMetaVars()

bool ODVStation::containsDataErrors (int varID) const

Returns: true if this station contains data error values for data variable varID , or false otherwise.

bool ODVStation::containsDataInfos (int varID) const

Returns: true if this station contains data info values for data variable varID , or false otherwise.

double * ODVStation::data (ODVVariable * var, bool filtered = false)[virtual] Returns a pointer to the double data values of variable var , or NULL if var is NULL, a meta or derived variable, or non-numeric, or there are no samples.

The data are filtered using the station's sample filter if filtered is true . Values not passing the filter are set to ODV::missDOUBLE.

int ODVStation::dataCount (int varID) const

Returns: The number of non-miss values of variable with ID varID as recorded in the station metadata.

Page 62: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

58

quint32 ODVStation::dataTotalByteSize () const

Returns: The total number of bytes in the file data record, including quality flags.

double * ODVStation::errorData (ODVVariable * var)

Returns a pointer to the double data error values of variable var , or NULL if var is NULL, meta, derived or non-numeric, or there are no error values.

QString ODVStation::errorStringValue (ODVVariable * var, int sampleID, int decimalCount = -1)

Returns: The text representation of the error value of variable var for sample sampleID (0-based index) of this station, or an empty string, if the error value is missing.

The error value is rounded to decimalCount significant digits before producing the text representation. The variable's digit count value (see ODVVariable::decimalCount()) is used, if decimalCount is less than zero on entry.

double ODVStation::errorValue (ODVVariable * var, int sampleID)

Returns: The error value of variable var for sample sampleID (0-based index) of this station.

ODV::missDOUBLE is returned if no error value exists for this sample or the sample ID is out of range.

Warning: Always returns ODV::missDOUBLE for meta variables.

QStringList ODVStation::historyStrings () const Retrieves all history strings for this station.

Returns: The list of strings.

QString ODVStation::identifierHeaderString (bool withID = false, bool withBrackets = false)

Returns: The description of the station identifier string contents.

See also: metaFullName(), identifierString()

QString ODVStation::identifierString (bool withID = false, bool withBrackets = false)

Page 63: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

59

Returns: A string that best identifies the station.

The string is the metaFullName(), or, if meta variables ODVVariable::METALOCALCDIID and ODVVariable::METAEDMOCODE exist, the concatenation of local CDI ID and EDMO code. The identifier is prepended with a suitable station number if withID is true and enclosed in brackets if withBrackets is true .

Note: ODVCF6 collections use the unique accession number for station number and [] as brackets. Other collections use the sequential station ID for station number and <> as brackets.

Example ODVCF6 identifier with ID and brackets: [67: A20_316N151_3 55 (B)]

See also: identifierHeaderString(), metaFullName()

QString ODVStation::infoStringValue (ODVVariable * var, int sampleID)

Returns: The data info string value of variable var for sample sampleID (0-based index) of this station, or an empty string, if the data info string is missing.

QStringList ODVStation::infoStringValues (ODVVariable * var)

Returns: The data info string values of variable var of this station, or an empty string list, if the variable does not contain data info strings.

void ODVStation::initializeMetaVars () Sets all meta variable values and quality flags to their miss- and default values.

double ODVStation::metaDecimalDay (char * qFlag = NULL) const

Returns: The metadata date/time of the station in decimal Gregorian Days.

If qFlag is non-zero returns '1' in qFlag .

QString ODVStation::metaFullName ()

Returns: The full name of the station consisting of cruise, station label and station type.

See also: metaName()

double ODVStation::metaLatitude (char * qFlag = NULL) const

Returns: The latitude of the station.

Page 64: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

60

If qFlag is non-zero, also returns the associated quality flag in qFlag .

double ODVStation::metaLongitude (char * qFlag = NULL) const

Returns: The longitude of the station.

If qFlag is non-zero, also returns the associated quality flag in qFlag .

QString ODVStation::metaName ()

Returns: The name of the station consisting of the station label and station type (in parantheses).

See also: metaFullName()

QString ODVStation::metaStringDate (ODV::DateFormat dateFormat = ODV::mmmddyyyyDate, char * qFlagYear = NULL, char * qFlagMonth = NULL, char * qFlagDay = NULL) const

Returns: The metadata date in dateFormat format.

If any one of the pointers qFlagYear , qFlagMonth , or qFlagDay is non-NULL on entry also returns the respective quality flags.

quint32 ODVStation::metaStringIndex (int metaVarID) const Retrieves the string index for meta variable metaVarID from the meta data area.

Returns: The retrieved string index, or ODV::missUINT32 if the meta variable is not of value type INDEXED_TEXT or the string value is empty.

QString ODVStation::metaStringIsoDateTime () const

Returns: The metadata date and time in ISO date format.

Example: 2006-02-23T10:23:06 for Feb/23/2006 10:23:06.

QString ODVStation::metaStringPosition (int decimalCount = -1, char * qFlagLon = NULL, char * qFlagLat = NULL) const

Returns: The metadata lon/lat position as formatted string "lon / lat" .

lon and lat are rounded to decimalCount digits (if decimalCount is supplied and greater than or equal to zero), or to the decimal count property of the longitude/latitude meta variables otherwise. If qFlagLon or qFlagLat are non-NULL on entry also returns the respective quality flag.

Page 65: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

61

QString ODVStation::metaStringPrimVarRange (char * qFlagMin = NULL, char * qFlagMax = NULL)

Returns: The range of observed primary variable values as formatted string "[ min , max ]".

If qFlagMin or qFlagMax are non-zero on entry also returns the respective quality flag.

QString ODVStation::metaStringStationType (char * qFlag = NULL)

Returns: The station type as string.

If qFlag is non-zero on entry also returns the associated quality flag.

QString ODVStation::metaStringTime (ODV::TimeFormat timeFormat = ODV::IsoTime, char * qFlagHour = NULL, char * qFlagMinute = NULL, char * qFlagSecond = NULL) const

Returns: The metadata time in form timeFormat .

If there is no value for minutes only the hours are returned, if there is no value for seconds only hours and minutes are returned. If any one of the pointers qFlagHour , qFlagMinute , or qFlagSecond is non-null on entry also returns the respective quality flag.

QString ODVStation::metaStringValue (ODVVariable::MetaVarID mvID, char * qFlag = NULL, int decimalCount = -1) const

Returns: The text representation of meta variable with index mvID for this station, or an empty string if the value is missing.

Using a ODVVariable::MetaVarID parameter to specify the meta variable is the most efficent way of accessing meta variable values. This function is only available for mandatory meta variables. If qFlag is non-zero, also returns the associated quality flag in qFlag . If the meta variable is numeric it is rounded to decimalCount significant digits before producing the text representation (decimalCount > -1 ). If decimalCount is -1 on entry, the variable's ODVVariable::decimalCount() value is used. If decimalCount is -2 on entry, the number of significant digits is derived from variable's value type.

QString ODVStation::metaStringValue (ODVVariable::VarType metaVarType, char * qFlag = NULL, int decimalCount = -1)

Returns: The text representation of meta variable metaVarType for this station, or an empty string if the value is missing.

If qFlag is non-zero, also returns the associated quality flag in qFlag . If the meta variable is numeric it is rounded to decimalCount significant digits before producing the text representation (decimalCount > -1 ). If decimalCount is -1 on entry,

Page 66: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

62

the variable's ODVVariable::decimalCount() value is used. If decimalCount is -2 on entry, the number of significant digits is derived from variable's value type.

Warning: This function must not be called for metaVarType == ODVVariable::METABASIC or any derived meta variable, such as ODVVariable::METADAYOFYEAR or ODVVariable::METATIME.

QString ODVStation::metaStringValue (ODVVariable * var, char * qFlag = NULL, int decimalCount = -1)

Returns: The text representation of meta variable var for this station, or an empty string if the value is missing.

If qFlag is non-null, also returns the associated quality flag in qFlag . If the meta variable is numeric it is rounded to decimalCount significant digits before producing the text representation (decimalCount > -1 ). If decimalCount is -1 on entry, the variable's ODVVariable::decimalCount() value is used. If decimalCount is -2 on entry, the number of significant digits is derived from variable's value type.

double ODVStation::metaValue (ODVVariable * var, char * qFlag = NULL)

Returns: The numeric value of meta variable var for this station, or ODV::missDOUBLE if the variable does not exist, the value is missing or the variable is a text variable.

If qFlag is non-null, also returns the associated quality flag in qFlag .

double ODVStation::metaValue (ODVVariable::VarType metaVarType, char * qFlag = NULL)

Returns: The numeric value of meta variable of type metaVarType for this station, or ODV::missDOUBLE if the variable does not exist, the value is missing or the variable is a text variable.

If qFlag is non-null, also returns the associated quality flag in qFlag .

Warning: This function should not be called for metaVarType = ODVVariable::METABASIC.

double ODVStation::metaValue (ODVVariable::MetaVarID mvID, char * qFlag = NULL) const

Returns: The numeric value of meta variable with index mvID for this station, or ODV::missDOUBLE if the value is missing or the variable is a text variable.

Using a ODVVariable::MetaVarID parameter to specify the meta variable is the most efficent way of accessing meta variable values. This function is only available for mandatory meta variables. If qFlag is non-null, also returns the associated quality flag in qFlag .

Page 67: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

63

char * ODVStation::qfData (ODVVariable * var)

Returns: A pointer to the quality flags of meta or data variable var , or NULL if no quality flags exist.

Note: This function must not be called for derived meta variables, i.e. ODVVariable::METATIME and ODVVariable::METADAYOFYEAR.

ODV::Status ODVStation::readData (int statID) Reads metadata and data of station with station ID statID (0-based index) from the collection files.

This function must be called before any meta or data variable values or quality flags can be accessed.

Returns: • ODV::NoErr if data was successfully read, • ODV::StatIDOutOfRange if statID is not in collection or • another error status in case of failure.

ODV::Status ODVStation::readMetaData (int statID) Reads the metadata of station with station ID statID (0-based index) from the collection files.

Returns: • ODV::NoErr if meta data was successfully read, • ODV::StatIDOutOfRange if statID is not in collection or • another error status in case of failure.

int ODVStation::sampleCount () const

Returns: The number of samples of this station.

ODVSampleFilter * ODVStation::sampleFilter ()

Returns: A pointer to the station's sample filter.

char * ODVStation::sampleQfData ()

Returns: Pointer to the sample quality flags data.

ODV::Status ODVStation::setInfoStringValue (ODVVariable * var, int sampleID, const QString & infoValue, bool replaceAll = false)

Sets the data info string of variable var at sample sampleID to infoValue .

Page 68: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

64

If replaceAll is true on entry (default is false ), and a previous string value existed, this previous string is replaced with infoValue at all occurences in the parent collection.

Returns: ODV::NoErr if successful and an error code otherwise.

See also: setStringValue, setStringValues

ODV::Status ODVStation::setInfoStringValues (ODVVariable * var, int sampleCount, const QStringList & infoValues)

Sets the data info strings of variable var to infoValues .

Note: sampleCount is the number of elements in the errValues array and must aggree with the station's sample count.

Returns: ODV::NoErr if successful and an error code otherwise.

See also: setStringValue, setStringValues

ODV::Status ODVStation::setMetaValue (int varID, double value, char qFlag = ODV::missINT8)

Sets the value of numeric meta-variable with variable ID varID to value .

Returns: ODV::NoErr if successful, or some error status otherwise.

ODV::Status ODVStation::setMetaValue (ODVVariable::VarType metaVarType, double value, char qFlag = ODV::missINT8)

Sets the value and quality flag of numeric meta-variable of type metaVarType to value and qFlag , respectively.

The quality flag value qFlag is ignored if equal to ODV::missINT8 (the default).

Returns: ODV::NoErr if successful, or some error status otherwise.

ODV::Status ODVStation::setMetaValue (int varID, const QString & value, char qFlag = ODV::missINT8)

Sets the value of string meta-variable with variable ID varID to value .

Returns: ODV::NoErr if successful, or some error status otherwise.

Page 69: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

65

ODV::Status ODVStation::setMetaValue (ODVVariable::VarType metaVarType, const QString & value, char qFlag = ODV::missINT8)

Sets the value of string meta-variable of type metaVarType to value .

Returns: ODV::NoErr if successful, or some error status otherwise.

ODV::Status ODVStation::setRawErrorValue (ODVVariable * var, int sampleID, double errValue)

Sets the raw data error value of data variable var at sample sampleID to errValue .

Note: This function returns ODV::NotImplemented for text data variables or for meta variables.

See also: setRawValues, setStringValue, setStringValues, setInfoStringValues

ODV::Status ODVStation::setRawErrorValues (ODVVariable * var, int sampleCount, double * errValues)

Sets the raw data error values of data variable var using data error values at errValues .

Note: sampleCount is the number of elements in the errValues array and must aggree with the station's sample count. This function returns ODV::NotImplemented for text data variables or for meta variables.

See also: setRawValues, setStringValue, setStringValues

ODV::Status ODVStation::setRawValue (ODVVariable * var, int sampleID, double value, char qFlag = ODV::missINT8)

Sets the raw data and quality flag values of variable var for sample sampleID to value and qFlag , respectively.

Returns: ODV::NoErr if successful, or some error status otherwise.

Note: This function returns ODV::NotImplemented for non-numeric data or meta variables. The quality flag value qFlag is ignored if equal to ODV::missINT8 (the default) or the variable does not support quality flags.

See also: setRawValues, setStringValue, setStringValues

Page 70: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

66

ODV::Status ODVStation::setRawValues (ODVVariable * var, int sampleCount, double * values, char * qFlags = NULL)

Sets the raw data and associated quality flags of data variable var to the data values and quality flags provided at values and qFlags , respectively.

Sets all quality flags to the variable's default quality flag if qFlags is NULL on entry (the default).

Note: sampleCount is the number of elements in the values and qFlags arrays and must aggree with the station's sample count, except when the call operates on an empty, clean station, in which case sampleCount is used as the new station's sample count. This function returns ODV::NotImplemented for text data variables or for meta variables.

See also: setRawValue, setStringValue, setStringValues

void ODVStation::setSampleQfValues (int sampleCount, char * qFlags = NULL) Appends the sample quality flags in qFlags to the raw data arrays.

Uses default quality flags if qFlags is NULL on entry (the default).

void ODVStation::setStationQfValue (char qf)

Returns: The station quality flag value.

ODV::Status ODVStation::setStringValue (ODVVariable * var, int sampleID, QString value, char qFlag = ODV::missINT8, bool indexedTextReplaceAll = false)

Sets the string data and quality flag values of variable var for sample sampleID to value and qFlag , respectively.

If var is a ODVVariable::INDEXED_TEXT variable, indexedTextReplaceAll is true on entry (default is false ), and a previous string value existed, this previous string is replaced with value at all occurences in the parent collection.

Returns: ODV::NoErr if successful and an error otherwise.

Note: Returns ODV::NotImplemented if called for numeric variable var . The quality flag value qFlag is ignored if equal to ODV::missINT8 (the default) or the variable does not support quality flags.

See also: setStringValues

ODV::Status ODVStation::setStringValues (ODVVariable * var, int sampleCount, const QStringList & values, char * qFlags = NULL)

Sets the string data and associated quality flags of data variable var using string values at values and quality flags at qFlags .

Page 71: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

67

Sets all quality flags to the variable's default quality flag if qFlags is NULL on entry (the default).

Note: values must be supplied and sampleCount , the number of elements in values and qFlags , must equal to station's sample count except the call happens on a clean station in which case sampleCount is used as the new station's sample count! This function returns ODV::NotImplemented for non-text data variables or for meta variables.

See also: setRawValue, setRawValues, setStringValue

int ODVStation::state () const

Returns: The current status of the station object which can be a combination of the following: • 0 : EMPTY • 1 : Meta Data Loaded • 2 : Meta Data Modified • 4 : Data Loaded • 8 : Data Modified

int ODVStation::stationID () const

Returns: The 0-based station ID of the currently loaded station. -1 is returned if no station is currently loaded.

Note: The station ID member variable is set when the metadata are read, thus a valid returned station ID implies that the respective metadata have been loaded. However, the station data may not have been loaded yet.

See also: readMetaData(), readData()

int ODVStation::stationLabelToInt (int dfltVal = ODV::missINT32) Tries to read an integer station number from the first 10 characters of the Station label.

Returns: The retrieved station number, if successful, or dfltVal otherwise.

char ODVStation::stationQfValue ()

Returns: The station quality flag value.

const char * ODVStation::stationTypeFromSampleCount (const int sampleCount)[static]

Page 72: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

68

Returns: The station type based on the station's sampleCount .

"B" is returned for sample counts of up to 250, while "C" is returned otherwise.

QString ODVStation::stringValue (ODVVariable * var, int sampleID, char * qFlag = NULL, int decimalCount = -1, bool filtered = false)

Returns: The text representation of variable var value for sample sampleID (0-based index) of this station, or an empty string, if the value is missing.

An empty string is also returned if filtered is true and the sample does not pass the filter. If qFlag is non-NULL, also returns in qFlag the associated quality flag, or the default quality flag, if no flags are available. If the variable is numeric the value is rounded to decimalCount significant digits before producing the text representation. The variable's digit count value (see ODVVariable::decimalCount()) is used, if decimalCount is less than zero on entry.

Warning: Always returns an empty string for numeric variables.

const char * ODVStation::textData (ODVVariable * var)

Returns: A pointer to the text data of variable pv , or NULL if the variable is not of value type ODVVariable::TEXT .

const char * ODVStation::textValue (ODVVariable * var, int sampleID = 0, char * qFlag = NULL, bool qFiltered = false)

Returns a pointer to the text value of variable var for sample sampleID (0-based index) of this station or NULL , if the variable is not of value type ODVVariable::TEXT or sampleID is out of range.

If qFlag is non-zero, also returns in qFlag the associated quality flag, or the default quality flag, if no flags are available. Returns NULL if qFiltered is true and the value's quality flag is unacceptable.

double ODVStation::value (ODVVariable * var, int sampleID, char * qFlag = NULL, bool filtered = false)

Returns: The filtered or unfiltered value of variable var for sample sampleID (0-based index) of this station.

ODV::missDOUBLE is returned if no value exists for this sample or the sample ID is out of range. ODV::missDOUBLE is also returned if filtered is true and the sample does not pass the filter. If qFlag is non-zero, also returns in qFlag the associated quality flag, or the default (value exists) or miss (value does not exist) quality flag, if no flags are available.

Warning: Always returns ODV::missDOUBLE for meta variables.

Page 73: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

69

ODV::Status ODVStation::writeData (int statID, bool doSort = true, bool doCheckMetaVars = true)

Writes raw observed data into slot statID (0-based index) of metadata and data files.

The data are sorted in ascending order of the primary collection variable if doSort is true . The meta variable values are checked before writing if doCheckMetaVars is true . Platform independent binary format. If statID >= nStations or statID < 0 the station is appended after the last existing station.

Note:

• Collection must be open on entry; it remains open on exit. • Possibly increments the ODVCollection's nStations variable, but does not update the

nStations value in the collection files. This must be done outside this function. • The calling program must write the nStations value to the collection files after one or more

calls to writeData() in order to make the nStations value change permanent. Returns:

ODV::NoErr on success, ODV::CollWriteErr if we don't have write permission, ODV::InvalidStationData if station data is invalid or the return value of ODVCollection::writeData().

ODV::Status ODVStation::writeMetaData (int statID) Writes metadata to slot statID (0-based index) of the collection's metadata file.

Returns: ODV::NoErr in case of success, ODV::StatIDOutOfRange if statID is not in collection or the return value of ODVCollection::writeMetaData().

Page 74: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

70

ODVVariable Class Reference Represents a collection variable. #include "collection/ODVVariable.h"

Public Types • enum ValueType { FLOAT =1, DOUBLE =2, INTEGER =5, SHORT =4, SIGNED_BYTE =8,

UNSIGNED_INTEGER =7, UNSIGNED_SHORT =6, BYTE =3, TEXT =10, INDEXED_TEXT =12, UNICODETEXT =15, UNKNOWN =32768 }

• Variable value types. enum VarType { BASIC =-1, DERIVED =999, METADRVD =1000, METATIME =1001, METADAYOFYEAR =1002, METABASIC =2000, METACRUISE, METASTATION, METATYPE, METALONGITUDE, METALATITUDE, METADAY, METAMINUTE, METAMONTH, METAHOUR, METAYEAR, METASECOND, METAACCESSIONNUMBER, METAPRIMVARMIN, METAPRIMVARMAX, METABOTDEPTH, METALOCALCDIID, METAEDMOCODE, METASENSORDEPTH, METADURATION, METAEXTRACRUISEINFO, METAORIGCRUISE, METAORIGSTATION, METAINVESTIGATOR, METAGTSPPDATATYPE, METACOMMENTSLINK, METACRUISEREPORTLINK, METAREFERENCE, METASDNINSTRUMENTINFO, METAPROJECT, METAPLATFORM, METAINSTITUTION, METAINSTRUMENTS, METASDNP01CODES, METASDNP35CONTRIBUTORCODES }

• The enumeration values represent the type of the variable. enum MetaVarID { InvalidMetaVarID =-1, CruiseMetaVarID =0, StationMetaVarID =1, TypeMetaVarID =2, LongitudeMetaVarID =3, LatitudeMetaVarID =4, YearMetaVarID =5, MonthMetaVarID =6, DayMetaVarID =7, HourMetaVarID =8, MinuteMetaVarID =9, SecondMetaVarID =10, AccessionMetaVarID =11 }

Fixed IDs of mandatory meta variables allowing fast access to values. Public Member Functions • ODVVariable (const QString &varName="", const QString &varUnits="", VarType

varType=BASIC, int decimals=2, ValueType valType=FLOAT, int valBytes=4, ODVQualityFlagSet::QFSetID qfSetID=ODVQualityFlagSet::ODV) Creates and initializes an ODVVariable.

• ODVVariable (const QString &varName, const QString &varUnits, int decimals=2, ODVQualityFlagSet::QFSetID qfSetID=ODVQualityFlagSet::ODV, VarType varType=BASIC, ValueType valType=FLOAT, int valBytes=4) Creates and initializes an ODVVariable.

• ODVVariable (const QString &varFullLabel, int decimals, VarType varType=BASIC, ValueType valType=FLOAT, int valBytes=4, ODVQualityFlagSet::QFSetID qfSetID=ODVQualityFlagSet::ODV) Creates and initializes an ODVVariable.

• ODVVariable (const QString &varName, const QString &varUnits, const QString &varComment, int decimals=2, ODVQualityFlagSet::QFSetID qfSetID=ODVQualityFlagSet::ODV, VarType varType=BASIC, ValueType valType=FLOAT, int valBytes=4) Creates and initializes an ODVVariable.

• ODVVariable (const ODVVariable &var) Copy constructor.

• virtual ~ODVVariable () Deletes all resources used by the variable.

• void appendCodesInCommentLabel (const QString &codes) Appends the codes codes to the codes in the comment member of this variable if not already present.

• char badQfVal ()

Page 75: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

71

• QStringList codeListFromCommentLabel () const • QString codesFromCommentLabel () const • QString commentLabel () const • bool compareCodes (const QString &otherCodes) const

Compares variable's codes string with otherCodes . • bool compareFullName (const QString &otherName, const QString &otherUnit,

Qt::CaseSensitivity cs=Qt::CaseInsensitive) const Compares the variable's raw name and unit strings with otherName and otherUnit .

• bool compareFullNameAndCodes (ODVVariable *otherVar, Qt::CaseSensitivity cs=Qt::CaseInsensitive) const Compares the variable's name, unit and code strings with the respective strings of variable otherVar .

• bool compareName (const QString &otherName, Qt::CaseSensitivity cs=Qt::CaseInsensitive) const Compares variable's raw name string with otherName .

• bool compareUnit (const QString &otherUnit, Qt::CaseSensitivity cs=Qt::CaseInsensitive) const Compares variable's raw unit string with otherUnit .

• virtual ODVVariable * createClone () const • int decimalCount (int extraDigits=0) const • char defaultQfVal () • char defaultQfVal (double dVal) • int errorVarID () const • virtual QString fullLabel (bool doClean=false, bool prependID=false) const

Returns the full label of the variable, consisting of variable name and units. • void getRange (double &min, double &max) const • char goodQfVal () • virtual bool isDerived () const • virtual bool isLatitude () const • virtual bool isLongitude () const • bool isMandatoryMetaVar () const • bool isMetaVar () const • bool isNumeric () const • double maxVal () const

Returns the current maximal value for this variable. • double minVal () const

Returns the current minimal value for this variable. • char missQfVal () • QString nameLabel (bool doClean=false) const • int nativeDecimalCount () const • char qfGenericValue (char qfVal) const • const ODVQualityFlagSet & qfSet () const • double relativeRange () const • void setCodesInCommentLabel (const QString &codes)

Sets the codes codes in the comment member of this variable. • void setComment (const QString &cmt)

Sets the comment member of this variable to cmt . • void setDecimalCount (int decimals)

Sets the number of decimal places (digits following the decimal point) for this variable to decimals .

• void setErrorVarID (int errID) Sets the error variable ID of this variable to errID (0-based; -1: no error variable)

• void setMaxVal (double max) Sets the current maximal value for this variable to max .

Page 76: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

72

• void setMinVal (double min) Sets the current minimal value for this variable to min .

• void setName (const QString &nameLabel) Sets the name label of the variable to nameLabel .

• virtual void setProperties (const ODVVariable &var) Applies the properties of var to this ODVVariable object.

• void setQFSet (ODVQualityFlagSet::QFSetID qfSetID) Sets the quality flag scheme of this variable to qfSetID .

• void setRange (double min, double max) Sets the current value range for this variable to [min , max ].

• void setType (VarType type) Sets the variable type of this variable to type .

• void setUnits (const QString &unitLabel) Sets the unit label of the variable to unitLabel .

• void setValueType (ValueType vt, unsigned int byteLengths=21) Sets the value type of the variable to vt .

• void setVarID (int varID) Sets the variable ID of this variable to varID .

• QString stringValue (double d, int decimals) • VarType type () const • QString unitLabel (bool doClean=false) const • void updateRange (double min, double max, bool doAutoScale=true)

Updates the current range of the variable values to [min , max ] range. • unsigned int valueByteSize () const • ValueType valueType () const • int varID () const

Static Public Member Functions • static bool isMandatoryMetaVar (VarType varType) • static bool isMetaVar (VarType varType) • static MetaVarID metaVarIDByVarType (VarType varType)

Returns the meta variable ID (0-based index) of the mandatory meta variable with variable type varType .

• static QString uniqueNameLabel (const QString &nameLabel, const QStringList &nameLabels) Constructs a unique name label from nameLabel that is not already in nameLabels .

• static unsigned int valueByteSize (ValueType valueType, unsigned int nBytes=21)

Protected Member Functions • const PVariable * dFunc () const • PVariable * dFunc ()

Detailed Description Represents a collection variable. ODV collections maintain meta and data variables. Meta variables have just one value per station, whereas data variables have values for each sample of a station. ODV variables maintain information about their name, units, value type, value size, and the quality flag set used by the variable. ODV variables are used as parameters in ODVStation member functions to retrieve the data values for a particular variable.

Page 77: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

73

Member Enumeration Documentation

enum ODVVariable::MetaVarID Fixed IDs of mandatory meta variables allowing fast access to values.

The values should be self-explanatory, for further details see "ODV User's Guide" , section 3 "ODVCollections" , paragraph "Meta-variables" .

enum ODVVariable::ValueType Variable value types.

enum ODVVariable::VarType The enumeration values represent the type of the variable.

All basic data variables have the type BASIC. The META... values should be self-explanatory, for further details see "ODV User's Guide" , section 3 "ODVCollections" , paragraph "Meta-variables" .

Constructor & Destructor Documentation

ODVVariable::ODVVariable (const QString & varName = "", const QString & varUnits = "", VarType varType = BASIC, int decimals = 2, ValueType valType = FLOAT, int valBytes = 4, ODVQualityFlagSet::QFSetID qfSetID = ODVQualityFlagSet::ODV)

Creates and initializes an ODVVariable.

Value bytes are set according to value type valType , only variables with value type ODVVariable::TEXT use the valBytes argument.

ODVVariable::ODVVariable (const QString & varName, const QString & varUnits, int decimals = 2, ODVQualityFlagSet::QFSetID qfSetID = ODVQualityFlagSet::ODV, VarType varType = BASIC, ValueType valType = FLOAT, int valBytes = 4)

Creates and initializes an ODVVariable.

Value bytes are set according to value type valType , only variables with value type ODVVariable::TEXT use the valBytes argument.

ODVVariable::ODVVariable (const QString & varFullLabel, int decimals, VarType varType = BASIC, ValueType valType = FLOAT, int valBytes = 4, ODVQualityFlagSet::QFSetID qfSetID = ODVQualityFlagSet::ODV)

Creates and initializes an ODVVariable.

Value bytes are set according to value type valType , only variables with value type ODVVariable::TEXT use the valBytes argument.

Page 78: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

74

ODVVariable::ODVVariable (const QString & varName, const QString & varUnits, const QString & varComment, int decimals = 2, ODVQualityFlagSet::QFSetID qfSetID = ODVQualityFlagSet::ODV, VarType varType = BASIC, ValueType valType = FLOAT, int valBytes = 4)

Creates and initializes an ODVVariable.

Value bytes are set according to value type valType , only variables with value type ODVVariable::TEXT use the valBytes argument.

ODVVariable::ODVVariable (const ODVVariable & var) Copy constructor.

ODVVariable::~ODVVariable ()[virtual] Deletes all resources used by the variable.

Member Function Documentation

void ODVVariable::appendCodesInCommentLabel (const QString & codes) Appends the codes codes to the codes in the comment member of this variable if not already present.

char ODVVariable::badQfVal ()

Returns: The bad quality flag value of this variable.

See also: defaultQfVal(), goodQfVal(), missQfVal()

QStringList ODVVariable::codeListFromCommentLabel () const

Returns: The list of code strings contained in the comment for the variable.

QString ODVVariable::codesFromCommentLabel () const

Returns: The codes string contained in the comment for the variable.

QString ODVVariable::commentLabel () const

Returns: The comment for the variable.

Page 79: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

75

bool ODVVariable::compareCodes (const QString & otherCodes) const Compares variable's codes string with otherCodes .

Returns: true if the strings are equal and false otherwise.

See also: ODVVariable::compareFullName(), ODVVariable::compareUnit()

bool ODVVariable::compareFullName (const QString & otherName, const QString & otherUnit, Qt::CaseSensitivity cs = Qt::CaseInsensitive) const

Compares the variable's raw name and unit strings with otherName and otherUnit .

Parameters: in otherName name label to compare with in otherUnit unit label to compare with in cs case-sensitivity of the comparison

Returns: true if the strings are equal and false otherwise.

See also: ODVVariable::compareName(), ODVVariable::compareUnit()

bool ODVVariable::compareFullNameAndCodes (ODVVariable * otherVar, Qt::CaseSensitivity cs = Qt::CaseInsensitive) const

Compares the variable's name, unit and code strings with the respective strings of variable otherVar .

Returns: true if all strings match, or false otherwise.

See also: ODVVariable::compareFullName(), ODVVariable::compareName(), ODVVariable::compareUnit()

bool ODVVariable::compareName (const QString & otherName, Qt::CaseSensitivity cs = Qt::CaseInsensitive) const

Compares variable's raw name string with otherName .

Parameters: in otherName name label to compare with in cs case-sensitivity of the comparison

Returns: true if the strings are equal and false otherwise.

See also: ODVVariable::compareFullName(), ODVVariable::compareUnit()

Page 80: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

76

bool ODVVariable::compareUnit (const QString & otherUnit, Qt::CaseSensitivity cs = Qt::CaseInsensitive) const

Compares variable's raw unit string with otherUnit .

Parameters: in otherUnit unit label to compare with in cs case-sensitivity of the comparison

Returns: true if the strings are equal and false otherwise.

See also: ODVVariable::compareFullName(), ODVVariable::compareName()

ODVVariable * ODVVariable::createClone () const[virtual]

Returns: A new cloned ODVVariable object with the same properties.

int ODVVariable::decimalCount (int extraDigits = 0) const

Returns: The number of digits following the decimal point to be used in formatted output for this variable.

extraDigits is the number of extra digits to be added to the decimal count of the variable (default extra digit count is zero).

char ODVVariable::defaultQfVal ()

Returns: The default quality flag value of this variable.

See also: badQfVal(), goodQfVal(), missQfVal()

char ODVVariable::defaultQfVal (double dVal)

Returns: The missing value quality flag of this variable if dVal is equal to ODV::missDOUBLE , or otherwise the default quality flag value of this variable.

See also: badQfVal(), goodQfVal(), missQfVal()

int ODVVariable::errorVarID () const

Returns: The (0-based) variable ID of the error variable for this variable, or -1 if variable has no error variable.

Page 81: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

77

QString ODVVariable::fullLabel (bool doClean = false, bool prependID = false) const[virtual]

Returns the full label of the variable, consisting of variable name and units.

~-style control sequences are removed, if doClean is true . If prependID is true the label is prepended with the 1-based variable ID.

See also: nameLabel(), unitLabel()

void ODVVariable::getRange (double & min, double & max) const

Returns: The current minimal and maximal values of the variable in min & max .

If min/max values are not known ODV::missDOUBLE and ODV::largeDOUBLE are returned.

char ODVVariable::goodQfVal ()

Returns: The good quality flag value of this variable.

See also: badQfVal(), defaultQfVal(), missQfVal()

virtual bool ODVVariable::isDerived () const[inline], [virtual]

Returns: Always false.

bool ODVVariable::isLatitude () const[virtual]

Returns: true if this is a Latitude variable, and false otherwise.

Essentially checks whether the variable's name contains the string "latitude" (case insensitive check).

bool ODVVariable::isLongitude () const[virtual]

Returns: true if this is a Longitude variable, and false otherwise.

Essentially checks whether the variable's name contains the string "longitude" (case insensitive check).

bool ODVVariable::isMandatoryMetaVar () const

Returns: true if this variable is a mandatory meta variable or false otherwise.

Page 82: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

78

bool ODVVariable::isMandatoryMetaVar (VarType varType)[static]

Returns: true if varType is one of the mandatory meta variable types or false otherwise.

bool ODVVariable::isMetaVar () const

Returns: true if this variable is a meta variable.

bool ODVVariable::isMetaVar (VarType varType)[static]

Returns: true if varType is one of the meta variable types or false otherwise.

bool ODVVariable::isNumeric () const

Returns: true if this variable has one of the numeric value types.

See also: ODVVariable::ValueType

double ODVVariable::maxVal () const Returns the current maximal value for this variable.

See also: setMaxVal(), minVal()

ODVVariable::MetaVarID ODVVariable::metaVarIDByVarType (VarType varType)[static]

Returns the meta variable ID (0-based index) of the mandatory meta variable with variable type varType .

Note: Returns InvalidMetaVarID if varType does not correspond to a mandatory meta variable.

double ODVVariable::minVal () const Returns the current minimal value for this variable.

See also: setMinVal(), maxVal()

Page 83: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

79

char ODVVariable::missQfVal ()

Returns: The missing value quality flag value of this variable.

Note: Some quality flag schemes such as ODVQualityFlagSet::ODV do not have a special flag for missing values. The default quality flag is returned if this variable uses one of these schemes.

See also: badQfVal(), defaultQfVal(), goodQfVal()

QString ODVVariable::nameLabel (bool doClean = false) const

Returns: The name label of the variable.

~-style control sequences are removed, if doClean is true .

See also: fullLabel(), unitLabel()

int ODVVariable::nativeDecimalCount () const

Returns: The default number of decimal places (digits following the decimal point) for the variable's value type.

See also: decimalCount()

char ODVVariable::qfGenericValue (char qfVal) const

Returns: The corresponding ODVQualityFlagSet::ODV quality flag value for quality flag qfVal in the variable's quality flag set.

const ODVQualityFlagSet & ODVVariable::qfSet () const

Returns: A reference to the variable's quality flag set.

double ODVVariable::relativeRange () const

Returns: The current relative value range of the variable.

The relative range is defined as: (maxVal-minVal)/max(abs(maxVal),abs(minVal)). ODV::missDOUBLE is returned if min/max values are not known.

void ODVVariable::setCodesInCommentLabel (const QString & codes) Sets the codes codes in the comment member of this variable.

Page 84: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

80

void ODVVariable::setComment (const QString & cmt) Sets the comment member of this variable to cmt .

void ODVVariable::setDecimalCount (int decimals) Sets the number of decimal places (digits following the decimal point) for this variable to decimals .

void ODVVariable::setErrorVarID (int errID) Sets the error variable ID of this variable to errID (0-based; -1: no error variable)

void ODVVariable::setMaxVal (double max) Sets the current maximal value for this variable to max .

See also: setRange()

void ODVVariable::setMinVal (double min) Sets the current minimal value for this variable to min .

See also: setRange()

void ODVVariable::setName (const QString & nameLabel) Sets the name label of the variable to nameLabel .

void ODVVariable::setProperties (const ODVVariable & var)[virtual] Applies the properties of var to this ODVVariable object.

void ODVVariable::setQFSet (ODVQualityFlagSet::QFSetID qfSetID) Sets the quality flag scheme of this variable to qfSetID .

void ODVVariable::setRange (double min, double max) Sets the current value range for this variable to [min , max ].

See also: setMinVal(), setMaxVal()

Page 85: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

81

void ODVVariable::setType (VarType type) Sets the variable type of this variable to type .

Warning: It is dangerous to change the type of an existing variable! Use this function only if you know what your are doing.

void ODVVariable::setUnits (const QString & unitLabel) Sets the unit label of the variable to unitLabel .

void ODVVariable::setValueType (ValueType vt, unsigned int byteLengths = 21) Sets the value type of the variable to vt .

byteLengths is only used for value type ODVVariable::TEXT . For ODVVariable::TEXT variables add 1 Byte for the terminating zero character.

void ODVVariable::setVarID (int varID) Sets the variable ID of this variable to varID .

Warning: The user is responsible for providing a valid varID . It is not checked whether a variable with varID already exists!

See also: varID()

QString ODVVariable::stringValue (double d, int decimals)

Returns: The text representation of the value d or an empty string, if d is ODV::missDOUBLE .

The value is rounded to decimals decimal places before producing the text representation. If decimals is -1 on entry, the variable's decimalCount() value is used. If decimals is -2 on entry, the number of significant digits is derived from variable's value type. If decimals is -3 on entry, the variable's decimalCount() value plus 3 is used.

ODVVariable::VarType ODVVariable::type () const

Returns: The type of the variable.

QString ODVVariable::uniqueNameLabel (const QString & nameLabel, const QStringList & nameLabels)[static]

Constructs a unique name label from nameLabel that is not already in nameLabels .

Page 86: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

82

Returns: The constructed name label.

QString ODVVariable::unitLabel (bool doClean = false) const

Returns: The units label of the variable.

~-style control sequences are removed, if doClean is true.

See also: fullLabel(), nameLabel()

void ODVVariable::updateRange (double min, double max, bool doAutoScale = true)

Updates the current range of the variable values to [min , max ] range.

Autoscales the range if doAutoScale is true.

unsigned int ODVVariable::valueByteSize (ValueType valueType, unsigned int nBytes = 21)[static]

Returns: The size of data values in bytes for the given valueType , or nBytes , if valueType is ODVVariable::TEXT, or 0 if type is unknown

unsigned int ODVVariable::valueByteSize () const

Returns: The number of bytes per raw value of this variable.

ODVVariable::ValueType ODVVariable::valueType () const

Returns: The value type of the variable.

int ODVVariable::varID () const

Returns: The variable ID of the variable.

See also: setVarID()

Page 87: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

83

File Documentation macros.h File Reference This file declares some helpful macros to deal with certain enumerations. #include <QMetaEnum>

Macros • #define ENUM_OBJ(o,

e) (o::staticMetaObject.enumerator(o::staticMetaObject.indexOfEnumerator(#e))) • #define ENUM_NAME(o, e, v) (ENUM_OBJ(o,e).valueToKey((v))) • #define HIGHINT(int64) (int64 >> 32) • #define LOWINT(int64) (int64 & 0xffffffff) • #define MAKEINT64(lowInt, highInt) ((qint64) highInt << 32 | lowInt)

Detailed Description This file declares some helpful macros to deal with certain enumerations.

Macro Definition Documentation

#define ENUM_NAME( o, e, v) (ENUM_OBJ(o,e).valueToKey((v))) This macro returns the name of an enumeration object member v . The class name o and the enumeration object name e must be specified too.

See also: ENUM_OBJ()

#define ENUM_OBJ( o, e) (o::staticMetaObject.enumerator(o::staticMetaObject.indexOfEnumerator(#e)))

This macro returns the QMetaEnum object for class o and enumeration object e . For more information on QMetaEnums see Qt documentation.

#define HIGHINT( int64) (int64 >> 32) HIGHINT(int64) returns the high-order 32 bit int of int64.

#define LOWINT( int64) (int64 & 0xffffffff) LOWINT(int64) returns the low-order 32 bit int of int64.

#define MAKEINT64( lowInt, highInt) ((qint64) highInt << 32 | lowInt) MAKEINT64(lowInt,highInt) returns the 64 bit combination of lowInt and highInt.

Page 88: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

84

odv.h File Reference This file provides globally used declarations. #include <QObject> #include <QtGlobal> #include "tools/declspec.h"

Classes • class ODV

Declarations for global use.

Macros • #define VID_NONE ODV::missINT32

Detailed Description This file provides globally used declarations.

Macro Definition Documentation

#define VID_NONE ODV::missINT32 Definition for a not assigned variable ID

Page 89: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

85

odvDate.h File Reference This file declares global functions for date and time manipulations. #include <QDateTime> #include <QString> #include "tools/declspec.h" #include "tools/odv.h"

Functions • DECLSPEC void dateFromDecimalYear (double decYear, int &year, int &month, int &day, int

&hour, int &minute, double &sec) Converts a decimal time decYear (in decimal years) to a Gregorian date consisting of year year , month month , day day and daytime hour , minute and sec .

• DECLSPEC void dateFromGregorianDay (double gregDay, int &year, int &month, int &day, int &hour, int &minute, double &sec) Converts a given fractional Gregorian Day gregDay to a Gregorian date consisting of year , month , day and daytime hour , minute and sec .

• DECLSPEC void dateFromJulianDay (double julDay, int &year, int &month, int &day, int &hour, int &minute, double &sec, bool isChronological=true) Converts a Chronological Julian Day julDay to a Gregorian date consisting of year , month , day and daytime hour , minute and sec .

• DECLSPEC QString dateString (ODV::DateFormat dateFormat, int year, int month, int day) • DECLSPEC QString dateString (ODV::DateFormat dateFormat, double dYear, double dMonth,

double dDay) • DECLSPEC QDateTime dateTimeFromString (const QString &dateTimeString, const QString

&format="MMM dd yyyy hh:mm:ss") Extracts date and time from string dateTimeString using format format .

• DECLSPEC QString dateTimeIsoString (double dYear, double dMonth, double dDay, double dHH, double dMM, double dSS)

• DECLSPEC void daytimeFromFractionalDay (double fracDay, int &hour, int &minute, double &sec) Retrieves daytime hour , minute , and sec from fractional day fracDay .

• DECLSPEC double decimalDay (int hour, int minute, double sec=0.) Calculates and returns the fractional day from daytime hour , minute , and sec .

• DECLSPEC double decimalYear (int year, int month, int day, int hour, int minute, double sec=0.) • DECLSPEC double decimalYearFromGregorianDay (int gregDay) • DECLSPEC double decimalYearFromGregorianDay (double gregDay) • DECLSPEC void getDateAndTime (char *szDT)

Retrieves the current date and time in szDT . • DECLSPEC int getDayOfYear (int year, int month, int day) • DECLSPEC int getDayOfYear (double decYear) • DECLSPEC void gregorianDate (int gregDay, int &year, int &month, int &day)

Given the Gregorian day gregDay calculates the associated date. • DECLSPEC void gregorianDateInYear (int year, int dayOfYear, int &month, int &day)

Given the year year and the day in this year dayOfYear calculates and returns the month month and day day .

• DECLSPEC int gregorianDay (int year, int month, int day) • DECLSPEC int gregorianDayOfWeek (int year, int month, int day)

Returns the day of the week (Gregorian calender) given a date on the Gregorian calender. • DECLSPEC int gregorianDayOfYear (int year, int month, int day) • DECLSPEC int gregorianDaysInMonth (int year, int month) • DECLSPEC int gregorianDaysInYear (int year)

Page 90: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

86

• DECLSPEC bool isGregorianLeapYear (int year) • DECLSPEC QString isoDateFromGregorianDay (double gregDay) • DECLSPEC int julianDay (int year, int month, int day) • DECLSPEC QString timeString (ODV::TimeFormat timeFormat, double dHH, double dMM,

double dSS) • DECLSPEC bool validateDate (short &sYear, short &sMonth, short &sDay, short &sHH, short

&sMM, double &sec) Ensures that the specified date values are valid, and make modifications if necessary.

• DECLSPEC bool validateDate (int &year, int &month, int &day, int &hour, int &minute, double &sec)

• DECLSPEC bool validateDate (double &year, double &month, double &day, double &hour, double &minute, double &sec)

• DECLSPEC bool validateTime (short &sHH, short &sMM, double &sec, int &dayShift) • DECLSPEC bool validateTime (int &hour, int &min, double &sec, int &dayShift) • DECLSPEC bool validateTime (double &hour, double &min, double &sec, int &dayShift)

Detailed Description This file declares global functions for date and time manipulations.

Function Documentation

DECLSPEC void dateFromDecimalYear (double decYear, int & year, int & month, int & day, int & hour, int & minute, double & sec)

Converts a decimal time decYear (in decimal years) to a Gregorian date consisting of year year , month month , day day and daytime hour , minute and sec .

Returns: The date & time values in the parameter references.

DECLSPEC void dateFromGregorianDay (double gregDay, int & year, int & month, int & day, int & hour, int & minute, double & sec)

Converts a given fractional Gregorian Day gregDay to a Gregorian date consisting of year , month , day and daytime hour , minute and sec .

Returns: The date & time values in the parameter references.

DECLSPEC void dateFromJulianDay (double julDay, int & year, int & month, int & day, int & hour, int & minute, double & sec, bool isChronological)

Converts a Chronological Julian Day julDay to a Gregorian date consisting of year , month , day and daytime hour , minute and sec .

julDay is considered to be a Chronological Julian Date if isChronological is true (the default). Otherwise, julDay is considered to be an Astronomical Julian Date. For the definition of CJD see here.

Page 91: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

87

The chronological Julian date in the GMT timezone is the number of days and fraction of a day which have elapsed since midnight GMT at the start of -4712-01-01 in the proleptic Julian Calendar. For example, for 17:13 GMT on 2007-01-19 CE the corresponding chronological Julian date is 2454120.7176. The chronological Julian date at a particular timezone is the number of days and fraction of a day which have elapsed since midnight in that timezone at the start of -4712-01-01 in the proleptic Julian Calendar. For example, for 01:13 Beijing standard time on 2007-01-20 CE the corresponding chronological Julian date is 2454121.0509.

Returns: The date & time values in the parameter references.

DECLSPEC QString dateString (ODV::DateFormat dateFormat, int year, int month, int day)

Returns: The date string given by year , sMonth , and sDay in dateFormat format.

DECLSPEC QString dateString (ODV::DateFormat dateFormat, double dYear, double dMonth, double dDay)

Returns: The date string given by dYear , dMonth , and dDay in dateFormat format.

See also: dateTimeIsoString(), timeString()

DECLSPEC QDateTime dateTimeFromString (const QString & dateTimeString, const QString & format)

Extracts date and time from string dateTimeString using format format .

The default for format is 'MMM dd yyyy hh:mm:ss' where 'MMM' represents the month as american english abbreviation (e.g. May).

Returns: A QDateTime object that holds date and time. An invalid date/time is returned if the extraction fails.

DECLSPEC QString dateTimeIsoString (double dYear, double dMonth, double dDay, double dHH, double dMM, double dSS)

Returns: The ISO8601 date and time string for dYear , dMonth , dDay , dHH , dMM , and dSS .

See also: dateString(), timeString()

DECLSPEC void daytimeFromFractionalDay (double fracDay, int & hour, int & minute, double & sec)

Retrieves daytime hour , minute , and sec from fractional day fracDay .

fracDay must be between 0 and 1.

Page 92: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

88

DECLSPEC double decimalDay (int hour, int minute, double sec) Calculates and returns the fractional day from daytime hour , minute , and sec .

Note: Invalid input values are set to zero.

Fractional day values are between 0 and 1.

DECLSPEC double decimalYear (int year, int month, int day, int hour, int minute, double sec)

Returns: Time (in decimal years) for a given calendar date & time.

ODV::missDOUBLE is returned for invalid date. Invalid hour , minute , or sec values are set to zero.

DECLSPEC double decimalYearFromGregorianDay (int gregDay)

Returns: Time (in decimal years) for a given Gregorian day gregDay .

DECLSPEC double decimalYearFromGregorianDay (double gregDay)

Returns: Time (in decimal years) for a given Gregorian day gregDay including daytime as fractional part.

DECLSPEC void getDateAndTime (char * szDT) Retrieves the current date and time in szDT .

szDT must be at least 26 characters long.

DECLSPEC int getDayOfYear (int year, int month, int day)

Returns: Gregorian day of the year for a Gregorian calendar date.

DECLSPEC int getDayOfYear (double decYear)

Returns: Gregorian day of the year for a decimal time [years] decYear .

DECLSPEC void gregorianDate (int gregDay, int & year, int & month, int & day) Given the Gregorian day gregDay calculates the associated date.

Page 93: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

89

DECLSPEC void gregorianDateInYear (int year, int dayOfYear, int & month, int & day)

Given the year year and the day in this year dayOfYear calculates and returns the month month and day day .

DECLSPEC int gregorianDay (int year, int month, int day)

Returns: The Gregorian days for a date on the Gregorian calender.

DECLSPEC int gregorianDayOfWeek (int year, int month, int day) Returns the day of the week (Gregorian calender) given a date on the Gregorian calender.

Returns: 0=Monday, ... 5=Saturday, 6=Sunday

Reference: C. Zeller, Kalender-Formeln, Acta Mathematica, 9 (1887) 131-136

DECLSPEC int gregorianDayOfYear (int year, int month, int day)

Returns: The day of the year (Gregorian calender) given a date on the Gregorian calender.

DECLSPEC int gregorianDaysInMonth (int year, int month)

Returns: The last day of month for the Gregorian calendar.

DECLSPEC int gregorianDaysInYear (int year)

Returns: The number of days in year .

DECLSPEC bool isGregorianLeapYear (int year)

Returns: true if year is a leap year according to the Gregorian calendar, or false otherwise.

DECLSPEC QString isoDateFromGregorianDay (double gregDay)

Returns: The ISO date/time string for fractional Gregorian day gregDay .

DECLSPEC int julianDay (int year, int month, int day)

Page 94: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

90

Returns: Julian day for a given date on the Gregorian calender.

DECLSPEC QString timeString (ODV::TimeFormat timeFormat, double dHH, double dMM, double dSS)

Returns: The time as string in form timeFormat .

If hour dHH is invalid an empty string is returned, if minute dMM is invalid only the hours are returned in string, if second dSS is invalid it is omitted. Only the integer part of dSS is used.

See also: dateTimeIsoString(), dateString()

DECLSPEC bool validateDate (short & year, short & month, short & day, short & hour, short & minute, double & sec)

Ensures that the specified date values are valid, and make modifications if necessary.

Returns: true if modifications were made and false otherwise.

DECLSPEC bool validateDate (int & year, int & month, int & day, int & hour, int & minute, double & sec)

Overloaded method.

See also: validateDate(short&,short&,short&,short&,short&,double&)

DECLSPEC bool validateDate (double & year, double & month, double & day, double & hour, double & minute, double & sec)

Overloaded method.

DECLSPEC bool validateTime (short & hour, short & minute, double & sec, int & dayShift)

Ensures that the specified time values are valid, and make modifications if necessary. If a day shift arises from the modifications it is returned in dayShift .

Returns: true if modifications were made and false otherwise.

DECLSPEC bool validateTime (int & hour, int & minute, double & sec, int & dayShift)

Overloaded method.

See also: validateTime(short&,short&,double&,short&)

DECLSPEC bool validateTime (double & hour, double & minute, double & sec, int & dayShift)

Overloaded method.

Page 95: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

91

See also: validateTime(short&,short&,double&,short&)

Page 96: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

92

Index ~ODVCollectionInventory

ODVCollectionInventory 25 ~ODVMapDomain

ODVMapDomain 39 ~ODVSampleFilter

ODVSampleFilter 50 ~ODVVariable

ODVVariable 74 accessionNumber

ODVCollectionInventory 25 ODVStation 57

accessionNumberData ODVCollectionInventory 25

accessMode ODVCollection 15

AccessMode ODV 7

AnalyzeFileErr ODV 9

append ODVMapDomain 39, 40

appendCodesInCommentLabel ODVVariable 74

appendDataVar ODVCollection 15

appendHistoryString ODVCollection 16

appendHistoryStrings ODVCollection 16

appendMetaVar ODVCollection 16

applySampleFilter ODVStation 57

ARGO ODVQualityFlagSet 44

Atmosphere ODVCollection 14

availabilityData ODVCollectionInventory 25

availabilityString ODVCruiseInfo 35

BadParameter ODV 10

badQfVal ODVQualityFlagSet 45 ODVVariable 74

baseDir ODVCollection 16

BODC ODVQualityFlagSet 44

centerLatitude ODVMapDomain 40

centerLongitude ODVMapDomain 40

changePassword ODVCollection 16

clear ODVMapDomain 40 ODVSampleFilter 50 ODVStation 57

clearQualityFilter ODVSampleFilter 50

clearRangeFilter ODVSampleFilter 50

clearWildCardFilter ODVSampleFilter 50

close ODVCollection 17

codeListFromCommentLabel ODVVariable 74

codesFromCommentLabel ODVVariable 74

ColDefined ODVCollection 15

ColDeleteWhenClosed ODVCollection 15

ColEmptyNetCDF ODVCollection 15

CollCopyErr ODV 9

CollCreateErr ODV 9

CollDelErr ODV 9

collectionInventory ODVCollection 17

CollFormatUnsupported ODV 9

CollNotSorted ODV 9

CollOpenErr ODV 9

CollReadErr ODV 9

CollReadOnly ODV 8

CollRenameErr ODV 9

CollWriteErr ODV 9

ColOpen ODVCollection 15

ColUndefined ODVCollection 15

ColVarsRead ODVCollection 15

commentLabel ODVVariable 74

compareCodes ODVVariable 75

compareFullName ODVVariable 75

Page 97: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

93

compareFullNameAndCodes ODVVariable 75

compareName ODVVariable 75

compareUnit ODVVariable 76

compositeLabel ODVCompositeLabel 31

containsDataErrors ODVStation 57

containsDataInfos ODVStation 57

create ODVCollection 17

createClone ODVVariable 76

cruiseCount ODVCollectionInventory 26

cruiseID ODVCollectionInventory 26 ODVCruiseInfo 35

cruiseIdData ODVCollectionInventory 26

cruiseIDs ODVCollectionInventory 26

cruiseInfo ODVCollectionInventory 26

cruiseNames ODVCollectionInventory 26

currentAccessMode ODVCollection 17

data ODVStation 57

dataCount ODVCollectionInventory 26 ODVCruiseInfo 35 ODVStation 57

DataField ODVCollection 14

dataFieldID ODVCollection 17

dataTotalByteSize ODVStation 58

DataType ODVCollection 14

dataTypeID ODVCollection 17

dataVar ODVCollection 18

dataVarCount ODVCollection 18

dataVarIdList ODVCollection 18

dataVarPtrList ODVCollection 18

DateFormat ODV 8

dateFromDecimalYear odvDate.h 86

dateFromGregorianDay

odvDate.h 86 dateFromJulianDay

odvDate.h 86 dateString

ODVCruiseInfo 35 odvDate.h 87

dateTimeFromString odvDate.h 87

dateTimeIsoString odvDate.h 87

dayTimeData ODVCollectionInventory 27

daytimeFromFractionalDay odvDate.h 87

ddmmmyyyyDate ODV 8

ddmonthyyyyDate ODV 8

decimalCount ODVVariable 76

decimalDay odvDate.h 88

decimalYear ODVCollectionInventory 27 odvDate.h 88

decimalYearFromGregorianDay odvDate.h 88

decimalYears ODVCollectionInventory 27

defaultQfVal ODVQualityFlagSet 45 ODVVariable 76

defaultVarProperties ODVCompositeLabel 31

descriptions ODVQualityFlagSet 45

DirCreateErr ODV 9

domain ODVMapDomain 40

domainValues ODVMapDomain 40

eastLongitude ODVMapDomain 40

ENUM_NAME macros.h 83

ENUM_OBJ macros.h 83

EOD ODV 8

errorData ODVStation 58

errorStringValue ODVStation 58

errorValue ODVStation 58

errorVarID ODVVariable 76

ESEAS ODVQualityFlagSet 44

Page 98: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

94

extendedMetaVars ODVCollection 18

extension ODVCollection 18

FileErr ODV 9

FileOpenErr ODV 9

filePath ODVCollection 18

FileReadErr ODV 9

FileWriteErr ODV 9

fullLabel ODVCompositeLabel 31, 32 ODVVariable 77

fullVariableLabel ODVCompositeLabel 32

GeneralField ODVCollection 14

generalProperties ODVCollection 18

GeneralType ODVCollection 14

genericQfVal ODVQualityFlagSet 45

getDateAndTime odvDate.h 88

getDayOfYear odvDate.h 88

getRange ODVVariable 77

goodQfVal ODVQualityFlagSet 45 ODVVariable 77

gregorianDate odvDate.h 88

gregorianDateInYear odvDate.h 89

gregorianDay odvDate.h 89

gregorianDayData ODVCollectionInventory 27

gregorianDayOfWeek odvDate.h 89

gregorianDayOfYear odvDate.h 89

gregorianDaysInMonth odvDate.h 89

gregorianDaysInYear odvDate.h 89

GTSPP ODVQualityFlagSet 44

hhmmssTime ODV 10

hhmmTime ODV 10

HIGHINT macros.h 83

historyStrings ODVCollection 19 ODVStation 58

IceSheet ODVCollection 14

identifierHeaderString ODVStation 58

identifierString ODVStation 59

ImportErr ODV 9

ImportProblems ODV 9

indexOf ODVQualityFlagSet 45

infoStringValue ODVStation 59

infoStringValues ODVStation 59

initializeMetaVars ODVStation 59

instanceID ODVCollection 19

intersects ODVMapDomain 40

InvalidStationData ODV 9

inventoryFilePath ODVCollection 19

IODE ODVQualityFlagSet 44

isDerived ODVVariable 77

isEmpty ODVMapDomain 40

isGregorianLeapYear odvDate.h 89

isInsideOf ODVMapDomain 41

isInUse ODVCollection 19

isLatitude ODVVariable 77

isLongitude ODVVariable 77

isMandatoryMetaVar ODVVariable 77, 78

isMetaVar ODVVariable 78

isNumeric ODVVariable 78

IsoDate ODV 8

isoDateFromGregorianDay odvDate.h 89

isOpen ODVCollection 19

IsoTime ODV 10

isPasswordProtected

Page 99: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

95

ODVCollection 19 isQualityFiltering

ODVSampleFilter 50 isRangeFiltering

ODVSampleFilter 51 isWildCardFiltering

ODVSampleFilter 51 julianDay

odvDate.h 89 Land

ODVCollection 14 largeDOUBLE

ODV 10 largeFLOAT

ODV 10 largeINT16

ODV 10 largeINT32

ODV 10 largeINT8

ODV 10 largeUINT16

ODV 10 largeUINT32

ODV 10 largeUINT8

ODV 11 lastModified

ODVCollection 19 latitude

ODVCollectionInventory 27 latitudeRange

ODVMapDomain 41 latitudeRangeString

ODVCruiseInfo 36 ODVMapDomain 41

latitudes ODVCollectionInventory 28

load ODVCollectionInventory 28

loadCollectionFile ODVCollection 19

longitude ODVCollectionInventory 28

longitudeRange ODVMapDomain 41

longitudeRangeString ODVCruiseInfo 36 ODVMapDomain 41

longitudes ODVCollectionInventory 28

LOWINT macros.h 83

MacroErr ODV 9

macros.h 83 ENUM_NAME 83 ENUM_OBJ 83 HIGHINT 83 LOWINT 83

MAKEINT64 83 MAKEINT64

macros.h 83 mandatoryMetaVarCount

ODVCollection 20 mandatoryMetaVars

ODVCollection 20 mapTo

ODVQualityFlagSet 45, 46 matchesWildCardFilter

ODVSampleFilter 51 maxGregorianDay

ODVCruiseInfo 36 maxStationID

ODVCruiseInfo 36 maxVal

ODVVariable 78 metaDecimalDay

ODVStation 59 metaFullName

ODVStation 59 metaLatitude

ODVStation 60 metaLongitude

ODVStation 60 metaName

ODVStation 60 metaStringDate

ODVStation 60 metaStringIndex

ODVStation 60 metaStringIsoDateTime

ODVStation 60 metaStringPosition

ODVStation 60 metaStringPrimVarRange

ODVStation 61 metaStringStationType

ODVStation 61 metaStringTime

ODVStation 61 metaStringValue

ODVStation 61, 62 metaValue

ODVStation 62 metaVar

ODVCollection 20 metaVarCount

ODVCollection 20 metaVarID

ODVCollection 20 MetaVarID

ODVVariable 73 metaVarIDByVarType

ODVVariable 78 metaVarIdList

ODVCollection 20 metaVarPtrList

ODVCollection 20 minGregorianDay

Page 100: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

96

ODVCruiseInfo 36 minStationID

ODVCruiseInfo 36 minVal

ODVVariable 78 missDOUBLE

ODV 11 missFLOAT

ODV 11 missINT16

ODV 11 missINT32

ODV 11 missINT8

ODV 11 missQfVal

ODVQualityFlagSet 46 ODVVariable 79

missString ODVCruiseInfo 37

missUINT16 ODV 11

missUINT32 ODV 11

missUINT8 ODV 11

mmddyyyyDate ODV 8

mmmddyyyyDate ODV 8

name ODVCollection 21

nameLabel ODVCompositeLabel 32 ODVVariable 79

nativeDecimalCount ODVVariable 79

nativeMapDomain ODVCollectionInventory 28 ODVCruiseInfo 37

NoAccess ODV 8

NoErr ODV 8

northLatitude ODVMapDomain 41

NoSuchDirErr ODV 9

NotImplemented ODV 10

Ocean ODVCollection 14

OCEANSITES ODVQualityFlagSet 44

ODV 7 AccessMode 7 AnalyzeFileErr 9 BadParameter 10 CollCopyErr 9 CollCreateErr 9

CollDelErr 9 CollFormatUnsupported 9 CollNotSorted 9 CollOpenErr 9 CollReadErr 9 CollReadOnly 8 CollRenameErr 9 CollWriteErr 9 DateFormat 8 ddmmmyyyyDate 8 ddmonthyyyyDate 8 DirCreateErr 9 EOD 8 FileErr 9 FileOpenErr 9 FileReadErr 9 FileWriteErr 9 hhmmssTime 10 hhmmTime 10 ImportErr 9 ImportProblems 9 InvalidStationData 9 IsoDate 8 IsoTime 10 largeDOUBLE 10 largeFLOAT 10 largeINT16 10 largeINT32 10 largeINT8 10 largeUINT16 10 largeUINT32 10 largeUINT8 11 MacroErr 9 missDOUBLE 11 missFLOAT 11 missINT16 11 missINT32 11 missINT8 11 missUINT16 11 missUINT32 11 missUINT8 11 mmddyyyyDate 8 mmmddyyyyDate 8 NoAccess 8 NoErr 8 NoSuchDirErr 9 NotImplemented 10 ODVQualityFlagSet 44 OutOfMemory 10 PSPreambleNotFound 9 ReadOnly 8 ReadWrite 8 StatIDOutOfRange 9 Status 8 TimeFormat 10 UnknownFileTypeErr 8 UserAbort 8 VarNotFound 9 yyyymmddDate 8

odv.h 84

Page 101: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

97

VID_NONE 84 ODVCollection 12

accessMode 15 appendDataVar 15 appendHistoryString 16 appendHistoryStrings 16 appendMetaVar 16 Atmosphere 14 baseDir 16 changePassword 16 close 17 ColDefined 15 ColDeleteWhenClosed 15 ColEmptyNetCDF 15 collectionInventory 17 ColOpen 15 ColUndefined 15 ColVarsRead 15 create 17 currentAccessMode 17 DataField 14 dataFieldID 17 DataType 14 dataTypeID 17 dataVar 18 dataVarCount 18 dataVarIdList 18 dataVarPtrList 18 extendedMetaVars 18 extension 18 filePath 18 GeneralField 14 generalProperties 18 GeneralType 14 historyStrings 19 IceSheet 14 instanceID 19 inventoryFilePath 19 isInUse 19 isOpen 19 isPasswordProtected 19 Land 14 lastModified 19 loadCollectionFile 19 mandatoryMetaVarCount 20 mandatoryMetaVars 20 metaVar 20 metaVarCount 20 metaVarID 20 metaVarIdList 20 metaVarPtrList 20 name 21 Ocean 14 ODVCollection 15 open 21 pathName 21 primaryVar 21 primaryVarID 21 Profiles 14 rootDir 21

sampleQfSet 22 SeaIce 14 Sediment 14 setAccessLock 22 setCollection 22 settingsFilePath 22 sizeOfDataFile 22 state 22 StateFlag 15 stationCount 22 stationQfSet 22 TimeSeries 14 Trajectories 14 userCount 23 varsWithErrorValues 23 varsWithInfoStrings 23 writeChangeRecord 23 writeLogRecord 23 writeStationCount 23

ODVCollectionInventory 24 ~ODVCollectionInventory 25 accessionNumber 25 accessionNumberData 25 availabilityData 25 cruiseCount 26 cruiseID 26 cruiseIdData 26 cruiseIDs 26 cruiseInfo 26 cruiseNames 26 dataCount 26 dayTimeData 27 decimalYear 27 decimalYears 27 gregorianDayData 27 latitude 27 latitudes 28 load 28 longitude 28 longitudes 28 nativeMapDomain 28 ODVCollectionInventory 25 sampleCount 28 sampleCountData 29 stationIDFromAccessionNumber 29 summaryCruiseInfo 29

ODVCompositeLabel 30 compositeLabel 31 defaultVarProperties 31 fullLabel 31, 32 fullVariableLabel 32 nameLabel 32 ODVCompositeLabel 31 qfCompositeLabel 32 qfSetID 32 qualifierLabel 33 unitLabel 33 varProperties 33

ODVCruiseInfo 34 availabilityString 35

Page 102: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

98

cruiseID 35 dataCount 35 dateString 35 latitudeRangeString 36 longitudeRangeString 36 maxGregorianDay 36 maxStationID 36 minGregorianDay 36 minStationID 36 missString 37 nativeMapDomain 37 ODVCruiseInfo 34, 35 sampleCount 37 stationCount 37 variableCount 37

odvDate.h 85 dateFromDecimalYear 86 dateFromGregorianDay 86 dateFromJulianDay 86 dateString 87 dateTimeFromString 87 dateTimeIsoString 87 daytimeFromFractionalDay 87 decimalDay 88 decimalYear 88 decimalYearFromGregorianDay 88 getDateAndTime 88 getDayOfYear 88 gregorianDate 88 gregorianDateInYear 89 gregorianDay 89 gregorianDayOfWeek 89 gregorianDayOfYear 89 gregorianDaysInMonth 89 gregorianDaysInYear 89 isGregorianLeapYear 89 isoDateFromGregorianDay 89 julianDay 89 timeString 90 validateDate 90 validateTime 90

ODVMapDomain 38 ~ODVMapDomain 39 append 39, 40 centerLatitude 40 centerLongitude 40 clear 40 domain 40 domainValues 40 eastLongitude 40 intersects 40 isEmpty 40 isInsideOf 41 latitudeRange 41 latitudeRangeString 41 longitudeRange 41 longitudeRangeString 41 northLatitude 41 ODVMapDomain 39 operator= 41

setDomain 41 setDomainValues 42 southLatitude 42 westLongitude 42

ODVQualityFlagSet 43 ARGO 44 badQfVal 45 BODC 44 defaultQfVal 45 descriptions 45 ESEAS 44 genericQfVal 45 goodQfVal 45 GTSPP 44 indexOf 45 IODE 44 mapTo 45, 46 missQfVal 46 OCEANSITES 44 ODV 44 ODVQualityFlagSet 45 operator= 46 operator== 46 PANGAEA 44 QARTOD 44 QFSetID 44 qfString 46, 47 qfVal 47 safeIndexOf 47 SEADATANET 44 setID 47 size 47 SMHI 44 text 47 values 47 WOCEBOTTLE 44 WOCECTD 44 WOCESAMPLE 44 WOD 44 WODSTATION 44

ODVSampleFilter 48 ~ODVSampleFilter 50 clear 50 clearQualityFilter 50 clearRangeFilter 50 clearWildCardFilter 50 isQualityFiltering 50 isRangeFiltering 51 isWildCardFiltering 51 matchesWildCardFilter 51 ODVSampleFilter 50 operator= 51 operator== 51 qualityFilter 51 qualityFilterVarIDs 51 rangeFilter 52 rangeFilterCount 52 rangeFilterVarIDs 52 setQualityFilter 52 setRangeFilter 52

Page 103: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

99

setWildCardFilter 52 statusString 53 wildCardFilter 53 wildCardFilterVarIDs 53

ODVStation 54 accessionNumber 57 applySampleFilter 57 clear 57 containsDataErrors 57 containsDataInfos 57 data 57 dataCount 57 dataTotalByteSize 58 errorData 58 errorStringValue 58 errorValue 58 historyStrings 58 identifierHeaderString 58 identifierString 59 infoStringValue 59 infoStringValues 59 initializeMetaVars 59 metaDecimalDay 59 metaFullName 59 metaLatitude 60 metaLongitude 60 metaName 60 metaStringDate 60 metaStringIndex 60 metaStringIsoDateTime 60 metaStringPosition 60 metaStringPrimVarRange 61 metaStringStationType 61 metaStringTime 61 metaStringValue 61, 62 metaValue 62 ODVStation 56 qfData 63 readData 63 readMetaData 63 sampleCount 63 sampleFilter 63 sampleQfData 64 setInfoStringValue 64 setInfoStringValues 64 setMetaValue 64, 65 setRawErrorValue 65 setRawErrorValues 65 setRawValue 65 setRawValues 66 setSampleQfValues 66 setStationQfValue 66 setStringValue 66 setStringValues 67 state 67 stationID 67 stationLabelToInt 67 stationQfValue 67 stationTypeFromSampleCount 68 stringValue 68

textData 68 textValue 68 value 68 writeData 69 writeMetaData 69

ODVVariable 70 ~ODVVariable 74 appendCodesInCommentLabel 74 badQfVal 74 codeListFromCommentLabel 74 codesFromCommentLabel 74 commentLabel 74 compareCodes 75 compareFullName 75 compareFullNameAndCodes 75 compareName 75 compareUnit 76 createClone 76 decimalCount 76 defaultQfVal 76 errorVarID 76 fullLabel 77 getRange 77 goodQfVal 77 isDerived 77 isLatitude 77 isLongitude 77 isMandatoryMetaVar 77, 78 isMetaVar 78 isNumeric 78 maxVal 78 MetaVarID 73 metaVarIDByVarType 78 minVal 78 missQfVal 79 nameLabel 79 nativeDecimalCount 79 ODVVariable 73, 74 qfGenericValue 79 qfSet 79 relativeRange 79 setCodesInCommentLabel 79 setComment 80 setDecimalCount 80 setErrorVarID 80 setMaxVal 80 setMinVal 80 setName 80 setProperties 80 setQFSet 80 setRange 80 setType 81 setUnits 81 setValueType 81 setVarID 81 stringValue 81 type 81 uniqueNameLabel 81 unitLabel 82 updateRange 82

Page 104: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

100

valueByteSize 82 valueType 82 ValueType 73 varID 82 VarType 73

open ODVCollection 21

operator= ODVMapDomain 41 ODVQualityFlagSet 46 ODVSampleFilter 51

operator== ODVQualityFlagSet 46 ODVSampleFilter 51

OutOfMemory ODV 10

PANGAEA ODVQualityFlagSet 44

pathName ODVCollection 21

primaryVar ODVCollection 21

primaryVarID ODVCollection 21

Profiles ODVCollection 14

PSPreambleNotFound ODV 9

QARTOD ODVQualityFlagSet 44

qfCompositeLabel ODVCompositeLabel 32

qfData ODVStation 63

qfGenericValue ODVVariable 79

qfSet ODVVariable 79

qfSetID ODVCompositeLabel 32

QFSetID ODVQualityFlagSet 44

qfString ODVQualityFlagSet 46, 47

qfVal ODVQualityFlagSet 47

qualifierLabel ODVCompositeLabel 33

qualityFilter ODVSampleFilter 51

qualityFilterVarIDs ODVSampleFilter 51

rangeFilter ODVSampleFilter 52

rangeFilterCount ODVSampleFilter 52

rangeFilterVarIDs ODVSampleFilter 52

readData ODVStation 63

readMetaData ODVStation 63

ReadOnly ODV 8

ReadWrite ODV 8

relativeRange ODVVariable 79

rootDir ODVCollection 21

safeIndexOf ODVQualityFlagSet 47

sampleCount ODVCollectionInventory 28 ODVCruiseInfo 37 ODVStation 63

sampleCountData ODVCollectionInventory 29

sampleFilter ODVStation 63

sampleQfData ODVStation 64

sampleQfSet ODVCollection 22

SEADATANET ODVQualityFlagSet 44

SeaIce ODVCollection 14

Sediment ODVCollection 14

setAccessLock ODVCollection 22

setCodesInCommentLabel ODVVariable 79

setCollection ODVCollection 22

setComment ODVVariable 80

setDecimalCount ODVVariable 80

setDomain ODVMapDomain 41

setDomainValues ODVMapDomain 42

setErrorVarID ODVVariable 80

setID ODVQualityFlagSet 47

setInfoStringValue ODVStation 64

setInfoStringValues ODVStation 64

setMaxVal ODVVariable 80

setMetaValue ODVStation 64, 65

setMinVal ODVVariable 80

setName ODVVariable 80

Page 105: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

101

setProperties ODVVariable 80

setQFSet ODVVariable 80

setQualityFilter ODVSampleFilter 52

setRange ODVVariable 80

setRangeFilter ODVSampleFilter 52

setRawErrorValue ODVStation 65

setRawErrorValues ODVStation 65

setRawValue ODVStation 65

setRawValues ODVStation 66

setSampleQfValues ODVStation 66

setStationQfValue ODVStation 66

setStringValue ODVStation 66

setStringValues ODVStation 67

settingsFilePath ODVCollection 22

setType ODVVariable 81

setUnits ODVVariable 81

setValueType ODVVariable 81

setVarID ODVVariable 81

setWildCardFilter ODVSampleFilter 52

size ODVQualityFlagSet 47

sizeOfDataFile ODVCollection 22

SMHI ODVQualityFlagSet 44

southLatitude ODVMapDomain 42

state ODVCollection 22 ODVStation 67

StateFlag ODVCollection 15

StatIDOutOfRange ODV 9

stationCount ODVCollection 22 ODVCruiseInfo 37

stationID ODVStation 67

stationIDFromAccessionNumber ODVCollectionInventory 29

stationLabelToInt ODVStation 67

stationQfSet ODVCollection 22

stationQfValue ODVStation 67

stationTypeFromSampleCount ODVStation 68

Status ODV 8

statusString ODVSampleFilter 53

stringValue ODVStation 68 ODVVariable 81

summaryCruiseInfo ODVCollectionInventory 29

text ODVQualityFlagSet 47

textData ODVStation 68

textValue ODVStation 68

TimeFormat ODV 10

TimeSeries ODVCollection 14

timeString odvDate.h 90

Trajectories ODVCollection 14

type ODVVariable 81

uniqueNameLabel ODVVariable 81

unitLabel ODVCompositeLabel 33 ODVVariable 82

UnknownFileTypeErr ODV 8

updateRange ODVVariable 82

UserAbort ODV 8

userCount ODVCollection 23

validateDate odvDate.h 90

validateTime odvDate.h 90

value ODVStation 68

valueByteSize ODVVariable 82

values ODVQualityFlagSet 47

valueType ODVVariable 82

ValueType ODVVariable 73

Page 106: ODV API for C++ · The ODV API for C++ provides a set of classes that can be used in your own C++ applications for reading existing Ocean Data View data collections as well as creating

102

variableCount ODVCruiseInfo 37

varID ODVVariable 82

VarNotFound ODV 9

varProperties ODVCompositeLabel 33

varsWithErrorValues ODVCollection 23

varsWithInfoStrings ODVCollection 23

VarType ODVVariable 73

VID_NONE odv.h 84

westLongitude ODVMapDomain 42

wildCardFilter ODVSampleFilter 53

wildCardFilterVarIDs ODVSampleFilter 53

WOCEBOTTLE ODVQualityFlagSet 44

WOCECTD ODVQualityFlagSet 44

WOCESAMPLE ODVQualityFlagSet 44

WOD ODVQualityFlagSet 44

WODSTATION ODVQualityFlagSet 44

writeChangeRecord ODVCollection 23

writeData ODVStation 69

writeLogRecord ODVCollection 23

writeMetaData ODVStation 69

writeStationCount ODVCollection 23

yyyymmddDate ODV 8