NotRegularMeasurement.h
Go to the documentation of this file.
1/*!
2 * \file NotRegularMeasurement.h
3 * \brief Not Regular hydroclimate data, i.e., for storm model
4 *
5 * Changelog:
6 * - 1. 2016-05-30 - lj - Replace mongoc_client_t by MongoClient interface.
7 * - 2. 2022-08-18 - lj - Change float to FLTPT.
8 *
9 * \author Junzhi Liu, Liangjun Zhu
10 * \version 2.1
11 */
12#ifndef SEIMS_NOTREGULAR_MEASUREMENT_H
13#define SEIMS_NOTREGULAR_MEASUREMENT_H
14
15#include "db_mongoc.h"
16#include "Measurement.h"
17#include <seims.h>
18
19/*!
20 * \ingroup data
21 * \class NotRegularMeasurement
22 * \brief Not Regular hydroclimate data
23 */
25public:
26 /*!
27 * \brief Constructor
28 *
29 * Initialize NotRegular Measurement instance from MongoDB
30 *
31 * \param[in] conn \a MongoClient, MongoDB client
32 * \param[in] hydroDBName \a string, HydroClimate database name
33 * \param[in] sitesList \a string, site list
34 * \param[in] siteType \a string, site type
35 * \param[in] startTime \a time_t, start date time
36 * \param[in] endTime \a time_t, end date time
37 */
38 NotRegularMeasurement(MongoClient* conn, const string& hydroDBName,
39 const string& sitesList, const string& siteType,
40 time_t startTime, time_t endTime);
41
42 //! Get site date by time \a pData
43 FLTPT* GetSiteDataByTime(time_t t) OVERRIDE;
44
45private:
46 vector<vector<time_t> > m_timeList; ///< time list of site data
47 vector<vector<FLTPT> > m_valueList; ///< site data corresponding to m_timeList
48 vector<int> m_curIndexList; ///< index
49};
50#endif /* SEIMS_NOTREGULAR_MEASUREMENT_H */
Measurement class to store HydroClimate site data.
#define OVERRIDE
A compatible reference to override or blank if not supported by the compiler.
Definition: basic.h:160
A simple wrapper of the class of MongoDB Client mongoc_client_t.
Definition: db_mongoc.h:46
Simple wrappers of the API of MongoDB C driver mongo-c-driver, see MongoDB C Driver for more informat...
NotRegularMeasurement(MongoClient *conn, const string &hydroDBName, const string &sitesList, const string &siteType, time_t startTime, time_t endTime)
Constructor.
FLTPT * GetSiteDataByTime(time_t t) OVERRIDE
Get site date by time pData.
Get HydroClimate measurement data from MongoDB.
Definition: Measurement.h:27
Not Regular hydroclimate data.
Definition: NotRegularMeasurement.h:24
The SEIMS related definitions and utilities header.