クラス sc_core::sc_report

#include <sc_report.h>

すべてのメンバ一覧

Public メソッド

 sc_report ()
 sc_report (const sc_report &)
sc_reportoperator= (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_timeget_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_defmd
char * msg
char * file
int line
sc_timetimestamp
sc_objectprocess
char * m_what

フレンド

class sc_report_handler


説明

sc_report.h104 行で定義されています。


コンストラクタとデストラクタ

sc_core::sc_report::sc_report (  ) 

sc_report.cpp94 行で定義されています。

00095 : severity(SC_INFO),
00096   md(0),
00097   msg(empty_dup(0)),
00098   file(empty_dup(0)),
00099   line(0),
00100   timestamp(new sc_time(sc_time_stamp())),
00101   process(0),
00102   m_what(empty_dup(0))
00103 {
00104 }

sc_core::sc_report::sc_report ( const sc_report other  ) 

sc_report.cpp122 行で定義されています。

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_report.cpp156 行で定義されています。

00157 {
00158     if ( file != empty_str )
00159         free(file);
00160     if ( msg != empty_str )
00161         free(msg);
00162     delete timestamp;
00163     if ( m_what != empty_str )
00164     free(m_what);
00165 }

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.cpp106 行で定義されています。

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 & sc_core::sc_report::operator= ( const sc_report other  ) 

sc_report.cpp134 行で定義されています。

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

sc_report.cpp167 行で定義されています。

00168 {
00169     return md->msg_type;
00170 }

const char* sc_core::sc_report::get_msg (  )  const [inline]

sc_report.h118 行で定義されています。

00119         { return msg; }

sc_severity sc_core::sc_report::get_severity (  )  const [inline]

sc_report.h121 行で定義されています。

00122         { return severity; }

const char* sc_core::sc_report::get_file_name (  )  const [inline]

sc_report.h124 行で定義されています。

00125         { return file; }

int sc_core::sc_report::get_line_number (  )  const [inline]

sc_report.h127 行で定義されています。

00128         { return line; }

const sc_time& sc_core::sc_report::get_time (  )  const [inline]

sc_report.h130 行で定義されています。

00131         { return *timestamp; }

const char * sc_core::sc_report::get_process_name (  )  const

sc_report_handler.cpp132 行で定義されています。

00133 {
00134         return process ? process->name() : 0;
00135 }

bool sc_core::sc_report::valid (  )  const [inline]

sc_report.h135 行で定義されています。

00136         {
00137             return process != 0;
00138         }

virtual const char* sc_core::sc_report::what (  )  const throw () [inline, virtual]

sc_report.h140 行で定義されています。

00141         { 
00142             return m_what;
00143         }

const char * sc_core::sc_report::get_message ( int  id  )  [static]

sc_report.cpp241 行で定義されています。

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.cpp249 行で定義されています。

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.cpp280 行で定義されています。

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.cpp210 行で定義されています。

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.cpp257 行で定義されています。

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.cpp266 行で定義されています。

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.cpp273 行で定義されています。

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

sc_report.cpp286 行で定義されています。

00287 {
00288     return md->id;
00289 }


フレンドと関連する関数

friend class sc_report_handler [friend]

sc_report.h147 行で定義されています。


変数

sc_report.h158 行で定義されています。

const sc_msg_def* sc_core::sc_report::md [protected]

sc_report.h159 行で定義されています。

char* sc_core::sc_report::msg [protected]

sc_report.h160 行で定義されています。

char* sc_core::sc_report::file [protected]

sc_report.h161 行で定義されています。

int sc_core::sc_report::line [protected]

sc_report.h162 行で定義されています。

sc_report.h163 行で定義されています。

sc_report.h164 行で定義されています。

char* sc_core::sc_report::m_what [protected]

sc_report.h165 行で定義されています。


このクラスの説明は次のファイルから生成されました:

SystemCに対してFri Jun 6 20:12:24 2008に生成されました。  doxygen 1.5.6