RegularMeasurement.h
Go to the documentation of this file.
1/*!
2 * \file RegularMeasurement.h
3 * \brief Regular hydroclimate data, e.g., daily data
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_REGULAR_MEASUREMENT_H
13#define SEIMS_REGULAR_MEASUREMENT_H
14
15#include "db_mongoc.h"
16#include "Measurement.h"
17
18/*!
19 * \ingroup data
20 * \class RegularMeasurement
21 * \brief Regular hydroclimate data, e.g., daily data
22 */
24public:
25 /*!
26 * \brief Initialize NotRegular Measurement instance from MongoDB
27 *
28 * \param[in] conn \a MongoClient, MongoDB client
29 * \param[in] hydroDBName \a string, HydroClimate database name
30 * \param[in] sitesList \a string, site list
31 * \param[in] siteType \a string, site type
32 * \param[in] startTime \a time_t, start date time
33 * \param[in] endTime \a time_t, end date time
34 * \param[in] interval \a time_t, time interval
35 */
37 const string& hydroDBName, const string& sitesList, const string& siteType,
38 time_t startTime, time_t endTime, time_t interval);
39
40 //! Destructor
42
43 //! Get site date by time \a pData
44 FLTPT* GetSiteDataByTime(time_t t) OVERRIDE;
45
46private:
47 vector<FLTPT*> m_siteData; ///< data array ordered by sites
48 time_t m_interval; ///< data record interval
49};
50#endif /* SEIMS_REGULAR_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...
~RegularMeasurement()
Destructor.
FLTPT * GetSiteDataByTime(time_t t) OVERRIDE
Get site date by time pData.
RegularMeasurement(MongoClient *conn, const string &hydroDBName, const string &sitesList, const string &siteType, time_t startTime, time_t endTime, time_t interval)
Initialize NotRegular Measurement instance from MongoDB.
Get HydroClimate measurement data from MongoDB.
Definition: Measurement.h:27
Regular hydroclimate data, e.g., daily data.
Definition: RegularMeasurement.h:23