-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFMCodeFM12.cpp
97 lines (79 loc) · 2.41 KB
/
FMCodeFM12.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
97
/*
* File: FMCodeFM12.cpp
* Author: kavlar
*
* Created on 201421
*/
#include "FMCodeFM12.h"
MetCode::FMCodeFM12::FMCodeFM12()
{
}
MetCode::FMCodeFM12::FMCodeFM12(const FMCodeFM12& orig)
{
}
MetCode::FMCodeFM12::~FMCodeFM12()
{
}
bool MetCode::FMCodeFM12::canIdentify(const std::string& headFragment) const throw ()
{
// TODO: FM list
if (headFragment.substr(0, 4) == "AAXX")
return true;
else
return false;
}
bool is_digits(const std::string& s);
bool MetCode::FMCodeFM12::onMiMiMjMj(std::string& mimimjmj, bool& isNextGroupYYGG) const throw ()
{
isNextGroupYYGG = false;
std::cerr << "FMCodeFM12 - onMiMiMjMj : " << mimimjmj << std::endl;
return true;
}
bool MetCode::FMCodeFM12::onMiMiMjMj(std::string& mimimjmj, StreamWriter& streamwriter) throw ()
{
return streamwriter.put(mimimjmj, o_group, o_line, true, false);
}
bool MetCode::FMCodeFM12::onYYGG(std::string& yygg) const throw ()
{
std::cerr << "FMCodeFM12 - onYYGG : " << yygg << std::endl;
return true;
}
bool MetCode::FMCodeFM12::onYYGG(std::string& yygg, StreamWriter& streamwriter) throw ()
{
return streamwriter.put(yygg, o_group, o_line, true, false);
}
bool MetCode::FMCodeFM12::onGroup(std::string& reportGroup) const throw ()
{
std::cerr << "FMCodeFM12 - onGroup : " << reportGroup << std::endl;
return true;
}
bool MetCode::FMCodeFM12::onGroup(std::string& reportGroup, StreamWriter& streamwriter) throw ()
{
return streamwriter.put(reportGroup, o_group, o_line, true, false);
}
bool MetCode::FMCodeFM12::onHeadGroup(std::string& reportHeadGroup) const throw ()
{
std::cerr << "FMCodeFM12 - onHeadGroup : " << reportHeadGroup << std::endl;
return true;
}
bool MetCode::FMCodeFM12::onHeadGroup(std::string& reportHeadGroup, StreamWriter& streamwriter) throw ()
{
return streamwriter.put(reportHeadGroup, o_group, o_line, false, true);
}
bool MetCode::FMCodeFM12::onEndGroup(std::string& reportEndGroup) const throw ()
{
std::cerr << "FMCodeFM12 - onEndGroup : " << reportEndGroup << std::endl;
return true;
}
bool MetCode::FMCodeFM12::onEndGroup(std::string& reportEndGroup, StreamWriter& streamwriter) throw ()
{
return streamwriter.put(reportEndGroup, o_group, o_line, false, true);
}
bool MetCode::FMCodeFM12::onEND(std::string& end) const throw ()
{
return true;
}
bool MetCode::FMCodeFM12::onEND(std::string& end, StreamWriter& streamwriter) throw ()
{
return true;
}