HOPS
HOPS class reference
MHO_ControlConditionEvaluator.hh
Go to the documentation of this file.
1 #ifndef MHO_ControlConditionEvaluator_HH__
2 #define MHO_ControlConditionEvaluator_HH__
3 
5 #include "MHO_Message.hh"
6 
7 #include <list>
8 #include <stack>
9 #include <string>
10 #include <vector>
11 
12 namespace hops
13 {
14 
24 {
25 
26  public:
29 
38  void SetPassInformation(std::string baseline, std::string source, std::string fgroup, std::string scan_time);
39 
46  mho_json GetApplicableStatements(mho_json& control_contents);
47 
54  bool Evaluate(mho_json& control_condition);
55 
56  private:
57  using token_iter = std::vector< std::string >::iterator;
58 
66  int ProcessToken(token_iter& it, token_iter& it_end);
67 
74  int EvaluateStation(token_iter& it);
81  int EvaluateBaseline(token_iter& it);
88  int EvaluateSource(token_iter& it);
95  int EvaluateFrequencyGroup(token_iter& it);
103  int EvaluateScan(token_iter& it, token_iter& it_end);
104 
111  int ScanLessThan(std::string scan);
118  int ScanGreaterThan(std::string scan);
126  int ScanInBetween(std::string scan_low, std::string scan_high);
127 
134  int EvaluateBooleanOps(std::list< int > states);
135 
136  std::string fWildcard;
137 
138  std::string fBaseline;
139  std::string fRefStation;
140  std::string fRemStation;
141  std::string fSource;
142  std::string fFGroup;
143  std::string fScanTime;
144 
145  std::size_t fStartLineNumber;
146 };
147 
148 } // namespace hops
149 
150 #endif
nlohmann::json mho_json
Definition: MHO_JSONHeaderWrapper.hh:5
evaluates conditional statements encounterd in control file syntax
Definition: MHO_ControlConditionEvaluator.hh:24
bool Evaluate(mho_json &control_condition)
Evaluates a single condition from an mho_json object and returns the result as a boolean.
Definition: MHO_ControlConditionEvaluator.cc:70
void SetPassInformation(std::string baseline, std::string source, std::string fgroup, std::string scan_time)
Setter for pass (baseline, source, frequency group, scan) information.
Definition: MHO_ControlConditionEvaluator.cc:31
MHO_ControlConditionEvaluator()
Definition: MHO_ControlConditionEvaluator.cc:17
mho_json GetApplicableStatements(mho_json &control_contents)
reduces the contents of a control file to only those statements which are applicable for this pass
Definition: MHO_ControlConditionEvaluator.cc:42
virtual ~MHO_ControlConditionEvaluator()
Definition: MHO_ControlConditionEvaluator.cc:28
int baseline
Definition: fourfit3.c:62
Definition: MHO_ChannelLabeler.hh:17
Definition: vex.h:103