Class SGIO, used to do input output operations throughout shogun.
Any debug or error or progress message is passed through the functions of this class to be in the end written to the screen. Note that messages don't have to be written to stdout or stderr, but can be redirected to a file.
Public 成员函数 | |
SGIO () | |
SGIO (const SGIO &orig) | |
virtual | ~SGIO () |
void | set_loglevel (EMessageType level) |
EMessageType | get_loglevel () const |
bool | loglevel_above (EMessageType type) const |
bool | get_show_progress () const |
EMessageLocation | get_location_info () const |
bool | get_syntax_highlight () const |
void | message (EMessageType prio, const char *function, const char *file, int32_t line, const char *fmt,...) const |
void | progress (float64_t current_val, float64_t min_val=0.0, float64_t max_val=1.0, int32_t decimals=1, const char *prefix="PROGRESS:\t") |
void | absolute_progress (float64_t current_val, float64_t val, float64_t min_val=0.0, float64_t max_val=1.0, int32_t decimals=1, const char *prefix="PROGRESS:\t") |
void | done () |
void | not_implemented (const char *function, const char *file, int32_t line) const |
void | deprecated (const char *function, const char *file, int32_t line) const |
void | buffered_message (EMessageType prio, const char *fmt,...) const |
FILE * | get_target () const |
void | set_target (FILE *target) |
void | set_target_to_stderr () |
void | set_target_to_stdout () |
void | enable_progress () |
void | disable_progress () |
void | set_location_info (EMessageLocation location) |
void | enable_syntax_highlighting () |
void | disable_syntax_highlighting () |
int32_t | ref () |
int32_t | ref_count () const |
int32_t | unref () |
const char * | get_name () |
静态 Public 成员函数 | |
static char * | skip_spaces (char *str) |
static char * | skip_blanks (char *str) |
static void | set_dirname (const char *dirname) |
static char * | concat_filename (const char *filename) |
static int | filter (CONST_DIRENT_T *d) |
static char * | c_string_of_substring (substring s) |
static void | print_substring (substring s) |
static float32_t | float_of_substring (substring s) |
static float64_t | double_of_substring (substring s) |
static int32_t | int_of_substring (substring s) |
static uint32_t | ulong_of_substring (substring s) |
static uint32_t | ss_length (substring s) |
Protected 成员函数 | |
const char * | get_msg_intro (EMessageType prio) const |
Protected 属性 | |
FILE * | target |
float64_t | last_progress_time |
float64_t | progress_start_time |
float64_t | last_progress |
bool | show_progress |
EMessageLocation | location_info |
bool | syntax_highlight |
EMessageType | loglevel |
静态 Protected 属性 | |
static const EMessageType | levels [NUM_LOG_LEVELS] |
static const char * | message_strings_highlighted [NUM_LOG_LEVELS] |
static const char * | message_strings [NUM_LOG_LEVELS] |
static char | file_buffer [FBUFSIZE] |
file name buffer 更多... | |
static char | directory_name [FBUFSIZE] |
directory name buffer 更多... | |
void buffered_message | ( | EMessageType | prio, |
const char * | fmt, | ||
... | |||
) | const |
|
static |
|
static |
void deprecated | ( | const char * | function, |
const char * | file, | ||
int32_t | line | ||
) | const |
void done | ( | ) |
|
static |
EMessageLocation get_location_info | ( | ) | const |
EMessageType get_loglevel | ( | ) | const |
|
protected |
bool get_syntax_highlight | ( | ) | const |
|
static |
bool loglevel_above | ( | EMessageType | type | ) | const |
void message | ( | EMessageType | prio, |
const char * | function, | ||
const char * | file, | ||
int32_t | line, | ||
const char * | fmt, | ||
... | |||
) | const |
print a message
optionally prefixed with file name and line number from (use -1 in line to disable this)
prio | message priority |
function | the function name from where the message is called |
file | file name from where the message is called |
line | line number from where the message is called |
fmt | format string |
void not_implemented | ( | const char * | function, |
const char * | file, | ||
int32_t | line | ||
) | const |
|
static |
|
static |
void set_location_info | ( | EMessageLocation | location | ) |
void set_loglevel | ( | EMessageType | level | ) |
void set_target | ( | FILE * | target | ) |
|
static |
|
static |
|
static |
|
static |
int32_t unref | ( | ) |
|
staticprotected |
|
staticprotected |
available log levels
|
protected |
|
protected |
|
staticprotected |
|
staticprotected |