scc  2022.4.0
SystemC components library
scc::ScLogger< SEVERITY > Struct Template Reference

the logger class More...

#include <report.h>

Public Member Functions

 ScLogger (const char *file, int line, int verbosity=sc_core::SC_MEDIUM)
 
 ScLogger (const ScLogger &)=delete
 
 ScLogger (ScLogger &&)=delete
 
ScLoggeroperator= (const ScLogger &)=delete
 
ScLoggeroperator= (ScLogger &&)=delete
 
virtual ~ScLogger ()
 the destructor generating the SystemC report
 
ScLoggertype ()
 reset the category of the log entry More...
 
ScLoggertype (char const *t)
 set the category of the log entry More...
 
ScLoggertype (std::string const &t)
 set the category of the log entry More...
 
std::ostream & get ()
 get the underlying ostringstream More...
 

Protected Attributes

std::ostringstream os {}
 
char * t {nullptr}
 
const char * file
 
const int line
 
const int level
 

Detailed Description

template<sc_core::sc_severity SEVERITY>
struct scc::ScLogger< SEVERITY >

the logger class

The ScLogger creates a RTTI based output stream to be used similar to std::cout

Template Parameters
SEVERITY

Definition at line 341 of file report.h.

Constructor & Destructor Documentation

◆ ScLogger()

template<sc_core::sc_severity SEVERITY>
scc::ScLogger< SEVERITY >::ScLogger ( const char *  file,
int  line,
int  verbosity = sc_core::SC_MEDIUM 
)
inline
Parameters
filewhere the log entry originates
linenumber where the log entry originates
verbositythe log level

Definition at line 350 of file report.h.

Member Function Documentation

◆ get()

template<sc_core::sc_severity SEVERITY>
std::ostream & scc::ScLogger< SEVERITY >::get ( )
inline

get the underlying ostringstream

Returns
the output stream collecting the log message

Definition at line 409 of file report.h.

◆ type() [1/3]

template<sc_core::sc_severity SEVERITY>
ScLogger & scc::ScLogger< SEVERITY >::type ( )
inline

reset the category of the log entry

Returns
reference to self for chaining

Definition at line 377 of file report.h.

◆ type() [2/3]

template<sc_core::sc_severity SEVERITY>
ScLogger & scc::ScLogger< SEVERITY >::type ( char const *  t)
inline

set the category of the log entry

Parameters
ttype of th elog entry
Returns
reference to self for chaining

Definition at line 388 of file report.h.

◆ type() [3/3]

template<sc_core::sc_severity SEVERITY>
ScLogger & scc::ScLogger< SEVERITY >::type ( std::string const &  t)
inline

set the category of the log entry

Parameters
ttype of th elog entry
Returns
reference to self for chaining

Definition at line 399 of file report.h.


The documentation for this struct was generated from the following file: