27 #pragma warning(disable:4512) //we don't need any = operator!
42 DBO(
const std::string& configfile);
48 std::vector< std::vector<MeteoData> >& vecMeteo);
50 typedef struct ts_Meta {
51 ts_Meta(
const Date& i_since,
const Date& i_until,
const std::string& i_agg_type,
const double& i_ts_id,
const unsigned int& i_interval)
52 : since(i_since), until(i_until), agg_type(i_agg_type), ts_id(i_ts_id), interval(i_interval) {}
55 std::ostringstream os;
57 os << ((since.isUndef())?
"-∞" : since.toString(
Date::ISO)) <<
" - ";
58 os << ((until.isUndef())?
"∞" : until.toString(
Date::ISO)) <<
"] ";
59 os << agg_type <<
" - " << interval <<
" s";
69 void fillStationMeta();
70 void readData(
const Date& dateStart,
const Date& dateEnd, std::vector<MeteoData>& vecMeteo,
const size_t& stationindex);
71 void readTimeSerie(
const unsigned int& ts_id,
const MeteoData::Parameters& param,
const Date& dateStart,
const Date& dateEnd,
const StationData& sd, std::vector<MeteoData>& vecMeteo);
73 void initDBOConnection();
74 static size_t data_write(
void* buf,
size_t size,
size_t nmemb,
void* userp);
75 bool curl_read(
const std::string& url, std::ostream& os);
78 std::vector<std::string> vecStationName;
79 std::vector<StationData> vecMeta;
80 std::vector< std::map<std::string, std::vector<DBO::tsMeta> > > vecTsMeta;
81 std::string coordin, coordinparam, coordout, coordoutparam;
83 double default_timezone;
87 static const int http_timeout_dflt;
88 static const std::string metadata_endpoint, data_endpoint, null_string;
A class representing the IO Layer of the software Alpine3D. For each type of IO (File, DB, Webservice, etc) a derived class is to be created that holds the specific implementation of the appropriate virtual methods. The IOHandler class is a wrapper class that is able to deal with all above implementations of the IOInterface abstract base class.
Definition: IOInterface.h:43
ISO 8601 extended format combined date: YYYY-MM-DDTHH:mm:SS (fields might be dropped, in the least to the most significant order)
Definition: Date.h:83
virtual void readMeteoData(const Date &dateStart, const Date &dateEnd, std::vector< std::vector< MeteoData > > &vecMeteo)
Fill vecMeteo with a time series of objects corresponding to the interval indicated by dateStart and ...
Definition: DBO.cc:424
virtual void readStationData(const Date &date, std::vector< StationData > &vecStation)
Fill vecStation with StationData objects for a certain date of interest.
Definition: DBO.cc:417
This class enables the access to the DBO RESTful web service.
Definition: DBO.h:40
Parameters
Definition: MeteoData.h:119
A class that reads a key/value file. These files (typically named *.ini) follow the INI file format s...
Definition: Config.h:58
DBO(const std::string &configfile)
Definition: DBO.cc:382
A class to handle timestamps. This class handles conversion between different time display formats (I...
Definition: Date.h:79