1 #ifndef OPENPOSE_UTILITIES_CHECK_HPP
2 #define OPENPOSE_UTILITIES_CHECK_HPP
10 void check(
const bool condition,
const T& message =
"",
const int line = -1,
const std::string&
function =
"",
const std::string& file =
"")
13 error(
"Check failed: " +
tToString(message), line,
function, file);
16 template<
typename T,
typename T1,
typename T2>
17 void checkE(
const T1& conditionA,
const T2& conditionB,
const T& message =
"",
const int line = -1,
const std::string&
function =
"",
const std::string& file =
"")
19 if (conditionA != conditionB)
23 template<
typename T,
typename T1,
typename T2>
24 void checkNE(
const T1& conditionA,
const T2& conditionB,
const T& message =
"",
const int line = -1,
const std::string&
function =
"",
const std::string& file =
"")
26 if (conditionA == conditionB)
30 template<
typename T,
typename T1,
typename T2>
31 void checkLE(
const T1& conditionA,
const T2& conditionB,
const T& message =
"",
const int line = -1,
const std::string&
function =
"",
const std::string& file =
"")
33 if (conditionA > conditionB)
37 template<
typename T,
typename T1,
typename T2>
38 void checkLT(
const T1& conditionA,
const T2& conditionB,
const T& message =
"",
const int line = -1,
const std::string&
function =
"",
const std::string& file =
"")
40 if (conditionA >= conditionB)
44 template<
typename T,
typename T1,
typename T2>
45 void checkGE(
const T1& conditionA,
const T2& conditionB,
const T& message =
"",
const int line = -1,
const std::string&
function =
"",
const std::string& file =
"")
47 if (conditionA < conditionB)
51 template<
typename T,
typename T1,
typename T2>
52 void checkGT(
const T1& conditionA,
const T2& conditionB,
const T& message =
"",
const int line = -1,
const std::string&
function =
"",
const std::string& file =
"")
54 if (conditionA <= conditionB)
59 #endif // OPENPOSE_UTILITIES_CHECK_HPP
void checkLT(const T1 &conditionA, const T2 &conditionB, const T &message="", const int line=-1, const std::string &function="", const std::string &file="")
Definition: check.hpp:38
void checkNE(const T1 &conditionA, const T2 &conditionB, const T &message="", const int line=-1, const std::string &function="", const std::string &file="")
Definition: check.hpp:24
OP_API void error(const std::string &message, const int line=-1, const std::string &function="", const std::string &file="")
void checkGE(const T1 &conditionA, const T2 &conditionB, const T &message="", const int line=-1, const std::string &function="", const std::string &file="")
Definition: check.hpp:45
std::string tToString(const T &message)
Definition: errorAndLog.hpp:15
void checkE(const T1 &conditionA, const T2 &conditionB, const T &message="", const int line=-1, const std::string &function="", const std::string &file="")
Definition: check.hpp:17
void check(const bool condition, const T &message="", const int line=-1, const std::string &function="", const std::string &file="")
Definition: check.hpp:10
void checkLE(const T1 &conditionA, const T2 &conditionB, const T &message="", const int line=-1, const std::string &function="", const std::string &file="")
Definition: check.hpp:31
void checkGT(const T1 &conditionA, const T2 &conditionB, const T &message="", const int line=-1, const std::string &function="", const std::string &file="")
Definition: check.hpp:52