41 DebugMsg(
const char*
function,
const int task_id,
bool add_endl=
true)
43 function_name_ =
function;
45 prefix_ =
"[" + function_name_ +
":" + std::to_string(task_id) +
"] ";
46 banner_ = prefix_ +
"=============== " + function_name_ +
" ===============";
50 void banner() { std::cout << banner_ << std::endl; };
51 std::string prefix() {
return prefix_; };
53 template <
class T>
DebugMsg& operator<< (
const T& x)
62 if (add_endl_ && count_ == 2) {
63 std::cout << std::endl;
73 DebugMsg& operator<<(std::ostream& (*f)(std::ostream& o))
82 bool add_endl_ =
true;
85 std::string function_name_;
The DebugMsg is class is used to print debugging messages.
Definition: DebugMsg.h:38