-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFMCodeAny.cpp
96 lines (79 loc) · 2.46 KB
/
FMCodeAny.cpp
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
/*
* File: FMCodeAny.cpp
* Author: kavlar
*
* Created on 20140821
*/
#include "FMCodeAny.h"
MetCode::FMCodeAny::FMCodeAny()
{
}
MetCode::FMCodeAny::FMCodeAny(const FMCodeAny& orig)
{
}
MetCode::FMCodeAny::~FMCodeAny()
{
}
bool MetCode::FMCodeAny::canIdentify(const std::string& headFragment) const throw ()
{
// TODO: FM list
return true;
}
bool MetCode::FMCodeAny::onMiMiMjMj(std::string& mimimjmj, bool& isNextGroupYYGG) const throw ()
{
isNextGroupYYGG = false;
if (mimimjmj == "AAXX")
isNextGroupYYGG = true;
if (mimimjmj == "CLIMAT")
isNextGroupYYGG = true;
//std::cerr << "FMCodeAny - onMiMiMjMj : " << mimimjmj << std::endl;
return true;
}
bool MetCode::FMCodeAny::onMiMiMjMj(std::string& mimimjmj, StreamWriter& streamwriter) throw ()
{
return streamwriter.put(mimimjmj, o_group, o_line, false, true);
}
bool MetCode::FMCodeAny::onYYGG(std::string& yygg) const throw ()
{
//std::cerr << "FMCodeAny - onYYGG : " << yygg << std::endl;
return true;
}
bool MetCode::FMCodeAny::onYYGG(std::string& yygg, StreamWriter& streamwriter) throw ()
{
return streamwriter.put(yygg, o_group, o_line, true, false);
}
bool MetCode::FMCodeAny::onGroup(std::string& reportGroup) const throw ()
{
//std::cerr << "FMCodeAny - onGroup : " << reportGroup << std::endl;
return true;
}
bool MetCode::FMCodeAny::onGroup(std::string& reportGroup, StreamWriter& streamwriter) throw ()
{
return streamwriter.put(reportGroup, o_group, o_line, true, false);
}
bool MetCode::FMCodeAny::onHeadGroup(std::string& reportHeadGroup) const throw ()
{
//std::cerr << "FMCodeAny - onHeadGroup : " << reportHeadGroup << std::endl;
return true;
}
bool MetCode::FMCodeAny::onHeadGroup(std::string& reportHeadGroup, StreamWriter& streamwriter) throw ()
{
return streamwriter.put(reportHeadGroup, o_group, o_line, false, true);
}
bool MetCode::FMCodeAny::onEndGroup(std::string& reportEndGroup) const throw ()
{
//std::cerr << "FMCodeAny - onEndGroup : " << reportEndGroup << std::endl;
return true;
}
bool MetCode::FMCodeAny::onEndGroup(std::string& reportEndGroup, StreamWriter& streamwriter) throw ()
{
return streamwriter.put(reportEndGroup, o_group, o_line, true, false);
}
bool MetCode::FMCodeAny::onEND(std::string& end) const throw ()
{
return true;
}
bool MetCode::FMCodeAny::onEND(std::string& end, StreamWriter& streamwriter) throw ()
{
return streamwriter.put(end, o_group, o_line, false, true, false, false);
}