34Compare::~Compare() =
default;
36Compare& Compare::operator=(
const Compare& c)
38 VarBase::operator=(c);
44void 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());
60Equal::~Equal() =
default;
62bool Equal::bool_cmp(
bool b1,
bool b2)
67bool Equal::int_cmp(
int i1,
int i2)
72bool Equal::double_cmp(
double d1,
double d2)
77bool Equal::string_cmp(
const std::string& s1,
const std::string& s2)
82NotEq::~NotEq() =
default;
84bool NotEq::bool_cmp(
bool b1,
bool b2)
89bool NotEq::int_cmp(
int i1,
int i2)
94bool NotEq::double_cmp(
double d1,
double d2)
99bool NotEq::string_cmp(
const std::string& s1,
const std::string& s2)
104Greater::~Greater() =
default;
106bool Greater::bool_cmp(
bool b1,
bool b2)
111bool Greater::int_cmp(
int i1,
int i2)
116bool Greater::double_cmp(
double d1,
double d2)
121bool Greater::string_cmp(
const std::string& s1,
const std::string& s2)
126GreaterEq::~GreaterEq() =
default;
128bool GreaterEq::bool_cmp(
bool b1,
bool b2)
133bool GreaterEq::int_cmp(
int i1,
int i2)
138bool GreaterEq::double_cmp(
double d1,
double d2)
143bool GreaterEq::string_cmp(
const std::string& s1,
const std::string& s2)
148Less::~Less() =
default;
150bool Less::bool_cmp(
bool b1,
bool b2)
155bool Less::int_cmp(
int i1,
int i2)
160bool Less::double_cmp(
double d1,
double d2)
165bool Less::string_cmp(
const std::string& s1,
const std::string& s2)
170LessEq::~LessEq() =
default;
172bool LessEq::bool_cmp(
bool b1,
bool b2)
177bool LessEq::int_cmp(
int i1,
int i2)
182bool LessEq::double_cmp(
double d1,
double d2)
187bool LessEq::string_cmp(
const std::string& s1,
const std::string& s2)