-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathWindDataRepair.h
49 lines (37 loc) · 5.11 KB
/
WindDataRepair.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#ifndef WIND_DATA_REPAIR_H
#define WIND_DATA_REPAIR_H
#include <vector>
#include <map>
#include <set>
#include <queue>
#include "timeutil.h"
/************使用前日期数据必须先排序**************/
namespace JGG
{
struct WindDataOnTime
{
JGG::TimePoint currTime;
std::vector<std::string> restdata;
bool operator < (const WindDataOnTime& winddataontime) const
{
return this->currTime < winddataontime.currTime;
}
};
class WindDataRepair
{
using QueueWindData = std::set<WindDataOnTime>;
public:
WindDataRepair();
~WindDataRepair();
// csv文件格式
void Start(const std::string& incsvFile,const std::string& outcsvFile);
private:
std::queue<QueueWindData> m_filereadtoanalysis;
std::queue<QueueWindData> m_analysistofileout;
std::vector<std::string> m_fileheader;
void ReadFileDataToQueue(const std::string& datafile);
void AnalysisDataToQueue(const QueueWindData& curdata);
void OutQueueToFile(std::ofstream* ofs, const QueueWindData& curdata);
};
}
#endif