BeeeOn Gateway  v2020.3.1-2-g6f737dc
Platform to interconnect the IoT world
LogicalExpression.h
1 #pragma once
2 
3 namespace BeeeOn {
4 
17 public:
18  enum Op {
19  OP_EQUAL,
20  OP_NOT_EQUAL,
21  };
22 
24  const std::string &left,
25  const std::string &right,
26  const Op op);
27 
32  bool result() const;
33 
34  std::string left() const;
35  std::string right() const;
36  Op op() const;
37 
38  static LogicalExpression parse(const std::string &input);
39 
40 private:
41  bool computeEqual() const;
42 
43 private:
44  const std::string m_left;
45  const std::string m_right;
46  const Op m_op;
47 };
48 
49 }
bool result() const
Evaluates the expression.
Definition: LogicalExpression.cpp:27
Representation of a logical expression in form: left operator right. The operator can be on of: ...
Definition: LogicalExpression.h:16