Commit 3fef70b7 authored by Marco Amagliani's avatar Marco Amagliani
Browse files

The file interface now containsdifferent methods to set and query the option to have debug outputs.

parent 35c0782c
......@@ -173,20 +173,13 @@ public:
double_format_ = str;
}
bool enable_console_output(const bool _enbl)
{
auto prev_val = enbl_cnsl_;
enbl_cnsl_ = _enbl;
return prev_val;
}
void set_console_output_on(const bool _enbl) { enbl_cnsl_ = _enbl; }
bool enable_file_log(const bool _enbl)
{
auto prev_val = enbl_file_log_;
enbl_file_log_ = _enbl;
return prev_val;
}
bool console_output_on() const { return enbl_cnsl_; }
void set_file_log_on(const bool _enbl) { enbl_file_log_ = _enbl; }
bool file_log_on() const { return enbl_file_log_; }
void print(double _d)
{
......@@ -448,14 +441,24 @@ void File::set_double_format(const char* const str)
impl_->set_double_format(str);
}
bool File::enable_console_output(const bool _enbl)
bool File::console_output_on()
{
return impl_->console_output_on();
}
void File::set_console_output_on(const bool _enbl)
{
impl_->set_console_output_on(_enbl);
}
bool File::file_log_on()
{
return impl_->enable_console_output(_enbl);
return impl_->file_log_on();
}
bool File::enable_file_log(const bool _enbl)
void File::set_file_log_on(const bool _enbl)
{
return impl_->enable_file_log(_enbl);
return impl_->set_file_log_on(_enbl);
}
}//namespace Debug
......
......@@ -43,8 +43,11 @@ public:
const char* double_format() const;
void set_double_format(const char* const str);
bool enable_console_output(const bool _enbl);
bool enable_file_log(const bool _enbl);
bool console_output_on();
void set_console_output_on(const bool _enbl);
bool file_log_on();
void set_file_log_on(const bool _enbl);
private:
class Impl;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment