#include <sc_report.h>
Public メソッド | |
sc_report () | |
sc_report (const sc_report &) | |
sc_report & | operator= (const sc_report &) |
virtual | ~sc_report () throw () |
const char * | get_msg_type () const |
const char * | get_msg () const |
sc_severity | get_severity () const |
const char * | get_file_name () const |
int | get_line_number () const |
const sc_time & | get_time () const |
const char * | get_process_name () const |
bool | valid () const |
virtual const char * | what () const throw () |
int | get_id () const |
Static Public メソッド | |
static const char * | get_message (int id) |
static bool | is_suppressed (int id) |
static void | make_warnings_errors (bool) |
static void | register_id (int id, const char *msg) |
static void | suppress_id (int id, bool) |
static void | suppress_infos (bool) |
static void | suppress_warnings (bool) |
Protected メソッド | |
sc_report (sc_severity, const sc_msg_def *, const char *msg, const char *file, int line) | |
Protected 変数 | |
sc_severity | severity |
const sc_msg_def * | md |
char * | msg |
char * | file |
int | line |
sc_time * | timestamp |
sc_object * | process |
char * | m_what |
フレンド | |
class | sc_report_handler |
sc_report.h の 104 行で定義されています。
sc_core::sc_report::sc_report | ( | ) |
sc_core::sc_report::sc_report | ( | const sc_report & | other | ) |
sc_report.cpp の 122 行で定義されています。
00123 : severity(other.severity), 00124 md(other.md), 00125 msg(empty_dup(other.msg)), 00126 file(empty_dup(other.file)), 00127 line(other.line), 00128 timestamp(new sc_time(*other.timestamp)), 00129 process(other.process), 00130 m_what(empty_dup(other.m_what)) 00131 { 00132 }
sc_core::sc_report::~sc_report | ( | ) | throw () [virtual] |
sc_core::sc_report::sc_report | ( | sc_severity | severity_, | |
const sc_msg_def * | md_, | |||
const char * | msg, | |||
const char * | file, | |||
int | line | |||
) | [protected] |
sc_report.cpp の 106 行で定義されています。
00111 : severity(severity_), 00112 md(md_), 00113 msg(empty_dup(msg_)), 00114 file(empty_dup(file_)), 00115 line(line_), 00116 timestamp(new sc_time(sc_time_stamp())), 00117 process(sc_get_current_process_b()), 00118 m_what(strdup(sc_report_compose_message(*this).c_str())) 00119 { 00120 }
sc_report.cpp の 134 行で定義されています。
00135 { 00136 severity = other.severity; 00137 md = other.md; 00138 00139 if ( msg != empty_str ) free(msg); 00140 msg = empty_dup(other.msg); 00141 00142 if ( file != empty_str ) free(file); 00143 file = empty_dup(other.file); 00144 00145 line = other.line; 00146 delete timestamp; 00147 timestamp = new sc_time(*other.timestamp); 00148 process = other.process; 00149 00150 if ( m_what != empty_str ) free(m_what); 00151 m_what = empty_dup(other.m_what); 00152 00153 return *this; 00154 }
const char * sc_core::sc_report::get_msg_type | ( | ) | const |
const char* sc_core::sc_report::get_msg | ( | ) | const [inline] |
sc_severity sc_core::sc_report::get_severity | ( | ) | const [inline] |
const char* sc_core::sc_report::get_file_name | ( | ) | const [inline] |
int sc_core::sc_report::get_line_number | ( | ) | const [inline] |
const sc_time& sc_core::sc_report::get_time | ( | ) | const [inline] |
const char * sc_core::sc_report::get_process_name | ( | ) | const |
bool sc_core::sc_report::valid | ( | ) | const [inline] |
virtual const char* sc_core::sc_report::what | ( | ) | const throw () [inline, virtual] |
const char * sc_core::sc_report::get_message | ( | int | id | ) | [static] |
sc_report.cpp の 241 行で定義されています。
00242 { 00243 sc_deprecated_report_ids("sc_report::get_message()"); 00244 sc_msg_def* md = sc_report_handler::mdlookup(id); 00245 00246 return md ? md->msg_type: unknown_id; 00247 }
bool sc_core::sc_report::is_suppressed | ( | int | id | ) | [static] |
sc_report.cpp の 249 行で定義されています。
00250 { 00251 sc_deprecated_report_ids("sc_report::is_suppressed()"); 00252 sc_msg_def* md = sc_report_handler::mdlookup(id); 00253 00254 return md ? md->actions == SC_DO_NOTHING: false; // only do-nothing set 00255 }
void sc_core::sc_report::make_warnings_errors | ( | bool | flag | ) | [static] |
sc_report.cpp の 280 行で定義されています。
00281 { 00282 sc_deprecated_report_ids("sc_report::make_warnings_errors"); 00283 warnings_are_errors = flag; 00284 }
void sc_core::sc_report::register_id | ( | int | id, | |
const char * | msg | |||
) | [static] |
sc_report.cpp の 210 行で定義されています。
00211 { 00212 sc_deprecated_report_ids("sc_report::register_id()"); 00213 if( id < 0 ) { 00214 SC_REPORT_ERROR( SC_ID_REGISTER_ID_FAILED_, 00215 "invalid report id" ); 00216 } 00217 if( msg == 0 ) { 00218 SC_REPORT_ERROR( SC_ID_REGISTER_ID_FAILED_, 00219 "invalid report message" ); 00220 } 00221 sc_msg_def * md = sc_report_handler::mdlookup(id); 00222 00223 if ( !md ) 00224 md = sc_report_handler::add_msg_type(msg); 00225 00226 if ( !md ) { 00227 SC_REPORT_ERROR( SC_ID_REGISTER_ID_FAILED_, 00228 "report_map insertion error" ); 00229 } 00230 00231 if( md->id != -1 ) { 00232 if( strcmp( msg, md->msg_type ) != 0 ) { 00233 SC_REPORT_ERROR( SC_ID_REGISTER_ID_FAILED_, 00234 "report id already exists" ); 00235 } 00236 return; 00237 } 00238 md->id = id; 00239 }
void sc_core::sc_report::suppress_id | ( | int | id, | |
bool | suppress | |||
) | [static] |
sc_report.cpp の 257 行で定義されています。
00258 { 00259 sc_deprecated_report_ids("sc_report::suppress_id()"); 00260 sc_msg_def* md = sc_report_handler::mdlookup(id_); 00261 00262 if ( md ) 00263 md->actions = suppress ? SC_DO_NOTHING: SC_UNSPECIFIED; 00264 }
void sc_core::sc_report::suppress_infos | ( | bool | suppress | ) | [static] |
sc_report.cpp の 266 行で定義されています。
00267 { 00268 sc_deprecated_report_ids("sc_report::supress_infos"); 00269 sc_report_handler::sev_actions[SC_INFO] = 00270 suppress ? SC_DO_NOTHING: SC_DEFAULT_INFO_ACTIONS; 00271 }
void sc_core::sc_report::suppress_warnings | ( | bool | suppress | ) | [static] |
sc_report.cpp の 273 行で定義されています。
00274 { 00275 sc_deprecated_report_ids("sc_report::suppress_warnings"); 00276 sc_report_handler::sev_actions[SC_WARNING] = 00277 suppress ? SC_DO_NOTHING: SC_DEFAULT_WARNING_ACTIONS; 00278 }
int sc_core::sc_report::get_id | ( | ) | const |
friend class sc_report_handler [friend] |
sc_report.h の 147 行で定義されています。
sc_severity sc_core::sc_report::severity [protected] |
sc_report.h の 158 行で定義されています。
const sc_msg_def* sc_core::sc_report::md [protected] |
sc_report.h の 159 行で定義されています。
char* sc_core::sc_report::msg [protected] |
sc_report.h の 160 行で定義されています。
char* sc_core::sc_report::file [protected] |
sc_report.h の 161 行で定義されています。
int sc_core::sc_report::line [protected] |
sc_report.h の 162 行で定義されています。
sc_time* sc_core::sc_report::timestamp [protected] |
sc_report.h の 163 行で定義されています。
sc_object* sc_core::sc_report::process [protected] |
sc_report.h の 164 行で定義されています。
char* sc_core::sc_report::m_what [protected] |
sc_report.h の 165 行で定義されています。