34 Compare::~Compare() =
default;
36 Compare& Compare::operator=(
const Compare& c)
38 VarBase::operator=(c);
44 void Compare::set_val()
46 if(m_v1.is_bool() && m_v2.is_bool())
47 VarBase::operator=(bool_cmp(
bool(m_v1),
bool(m_v2)));
48 else if(m_v1.is_int() && m_v2.is_int())
49 VarBase::operator=(int_cmp(
int(m_v1),
int(m_v2)));
50 else if(m_v1.is_double() && m_v2.is_double())
51 VarBase::operator=(double_cmp(
double(m_v1),
double(m_v2)));
52 else if(m_v1.is_string() && m_v2.is_string()) {
53 std::string s1 = std::string(m_v1), s2 = std::string(m_v2);
54 VarBase::operator=(string_cmp(s1, s2));
57 VarBase::operator=(VarBase());
60 Equal::~Equal() =
default;
62 bool Equal::bool_cmp(
bool b1,
bool b2)
67 bool Equal::int_cmp(
int i1,
int i2)
72 bool Equal::double_cmp(
double d1,
double d2)
77 bool Equal::string_cmp(
const std::string& s1,
const std::string& s2)
82 NotEq::~NotEq() =
default;
84 bool NotEq::bool_cmp(
bool b1,
bool b2)
89 bool NotEq::int_cmp(
int i1,
int i2)
94 bool NotEq::double_cmp(
double d1,
double d2)
99 bool NotEq::string_cmp(
const std::string& s1,
const std::string& s2)
104 Greater::~Greater() =
default;
106 bool Greater::bool_cmp(
bool b1,
bool b2)
111 bool Greater::int_cmp(
int i1,
int i2)
116 bool Greater::double_cmp(
double d1,
double d2)
121 bool Greater::string_cmp(
const std::string& s1,
const std::string& s2)
126 GreaterEq::~GreaterEq() =
default;
128 bool GreaterEq::bool_cmp(
bool b1,
bool b2)
133 bool GreaterEq::int_cmp(
int i1,
int i2)
138 bool GreaterEq::double_cmp(
double d1,
double d2)
143 bool GreaterEq::string_cmp(
const std::string& s1,
const std::string& s2)
148 Less::~Less() =
default;
150 bool Less::bool_cmp(
bool b1,
bool b2)
155 bool Less::int_cmp(
int i1,
int i2)
160 bool Less::double_cmp(
double d1,
double d2)
165 bool Less::string_cmp(
const std::string& s1,
const std::string& s2)
170 LessEq::~LessEq() =
default;
172 bool LessEq::bool_cmp(
bool b1,
bool b2)
177 bool LessEq::int_cmp(
int i1,
int i2)
182 bool LessEq::double_cmp(
double d1,
double d2)
187 bool LessEq::string_cmp(
const std::string& s1,
const std::string& s2)