1 #ifndef OPENPOSE_UTILITIES_CHECK_HPP
2 #define OPENPOSE_UTILITIES_CHECK_HPP
11 const bool condition,
const T& message =
"",
const int line = -1,
const std::string&
function =
"",
12 const std::string& file =
"")
15 error(
"Check failed: " +
tToString(message), line,
function, file);
18 template<
typename T,
typename T1,
typename T2>
20 const T1& conditionA,
const T2& conditionB,
const T& message =
"",
const int line = -1,
21 const std::string&
function =
"",
const std::string& file =
"")
23 if (conditionA != conditionB)
25 +
tToString(message), line,
function, file);
28 template<
typename T,
typename T1,
typename T2>
30 const T1& conditionA,
const T2& conditionB,
const T& message =
"",
const int line = -1,
31 const std::string&
function =
"",
const std::string& file =
"")
33 if (conditionA == conditionB)
35 +
tToString(message), line,
function, file);
38 template<
typename T,
typename T1,
typename T2>
40 const T1& conditionA,
const T2& conditionB,
const T& message =
"",
const int line = -1,
41 const std::string&
function =
"",
const std::string& file =
"")
43 if (conditionA > conditionB)
45 +
tToString(message), line,
function, file);
48 template<
typename T,
typename T1,
typename T2>
50 const T1& conditionA,
const T2& conditionB,
const T& message =
"",
const int line = -1,
51 const std::string&
function =
"",
const std::string& file =
"")
53 if (conditionA >= conditionB)
55 +
tToString(message), line,
function, file);
58 template<
typename T,
typename T1,
typename T2>
60 const T1& conditionA,
const T2& conditionB,
const T& message =
"",
const int line = -1,
61 const std::string&
function =
"",
const std::string& file =
"")
63 if (conditionA < conditionB)
65 +
tToString(message), line,
function, file);
68 template<
typename T,
typename T1,
typename T2>
70 const T1& conditionA,
const T2& conditionB,
const T& message =
"",
const int line = -1,
71 const std::string&
function =
"",
const std::string& file =
"")
73 if (conditionA <= conditionB)
75 +
tToString(message), line,
function, file);
void checkLessThan(const T1 &conditionA, const T2 &conditionB, const T &message="", const int line=-1, const std::string &function="", const std::string &file="")
void checkGreaterThan(const T1 &conditionA, const T2 &conditionB, const T &message="", const int line=-1, const std::string &function="", const std::string &file="")
void checkBool(const bool condition, const T &message="", const int line=-1, const std::string &function="", const std::string &file="")
OP_API void error(const std::string &message, const int line=-1, const std::string &function="", const std::string &file="")
void checkLessOrEqual(const T1 &conditionA, const T2 &conditionB, const T &message="", const int line=-1, const std::string &function="", const std::string &file="")
void checkGreaterOrEqual(const T1 &conditionA, const T2 &conditionB, const T &message="", const int line=-1, const std::string &function="", const std::string &file="")
void checkNotEqual(const T1 &conditionA, const T2 &conditionB, const T &message="", const int line=-1, const std::string &function="", const std::string &file="")
void checkEqual(const T1 &conditionA, const T2 &conditionB, const T &message="", const int line=-1, const std::string &function="", const std::string &file="")
std::string tToString(const T &message)